html_url
stringlengths
51
51
comments
stringlengths
67
24.7k
title
stringlengths
6
280
body
stringlengths
51
36.2k
comment_length
int64
16
1.45k
text
stringlengths
190
38.3k
embeddings
sequence
https://github.com/huggingface/datasets/issues/6442
I reproduced too: - root: metadata file is ignored (https://huggingface.co/datasets/severo/doc-image-3) - data/ dir: metadata file is ignored (https://huggingface.co/datasets/severo/doc-image-4) - train/ dir: works (https://huggingface.co/datasets/severo/doc-image-5)
Trouble loading image folder with additional features - metadata file ignored
### Describe the bug Loading image folder with a caption column using `load_dataset(<image_folder_path>)` doesn't load the captions. When loading a local image folder with captions using `datasets==2.13.0` ``` from datasets import load_dataset data = load_dataset(<image_folder_path>) data.column_names ``` yields `{'train': ['image', 'prompt']}` but when using `datasets==2.15.0` yeilds `{'train': ['image']}` Putting the images and `metadata.jsonl` file into a nested `train` folder **or** loading with `load_dataset("imagefolder", data_dir=<image_folder_path>)` solves the issue and yields `{'train': ['image', 'prompt']}` ### Steps to reproduce the bug 1. create a folder `<image_folder_path>` that contains images and a metadata file with additional features- e.g. "prompt" 2. run: ``` from datasets import load_dataset data = load_dataset("<image_folder_path>") data.column_names ``` ### Expected behavior `{'train': ['image', 'prompt']}` ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.19.4 - PyArrow version: 9.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0
23
Trouble loading image folder with additional features - metadata file ignored ### Describe the bug Loading image folder with a caption column using `load_dataset(<image_folder_path>)` doesn't load the captions. When loading a local image folder with captions using `datasets==2.13.0` ``` from datasets import load_dataset data = load_dataset(<image_folder_path>) data.column_names ``` yields `{'train': ['image', 'prompt']}` but when using `datasets==2.15.0` yeilds `{'train': ['image']}` Putting the images and `metadata.jsonl` file into a nested `train` folder **or** loading with `load_dataset("imagefolder", data_dir=<image_folder_path>)` solves the issue and yields `{'train': ['image', 'prompt']}` ### Steps to reproduce the bug 1. create a folder `<image_folder_path>` that contains images and a metadata file with additional features- e.g. "prompt" 2. run: ``` from datasets import load_dataset data = load_dataset("<image_folder_path>") data.column_names ``` ### Expected behavior `{'train': ['image', 'prompt']}` ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.19.4 - PyArrow version: 9.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0 I reproduced too: - root: metadata file is ignored (https://huggingface.co/datasets/severo/doc-image-3) - data/ dir: metadata file is ignored (https://huggingface.co/datasets/severo/doc-image-4) - train/ dir: works (https://huggingface.co/datasets/severo/doc-image-5)
[ -0.005256466567516327, 0.07954807579517365, 0.025517955422401428, 0.6268149018287659, 0.4523826241493225, 0.11177997291088104, 0.42082440853118896, 0.046340543776750565, 0.2590237557888031, 0.058994755148887634, -0.07752669602632523, 0.4900439381599426, -0.20371121168136597, 0.14985094964504242, -0.17331674695014954, -0.1383182555437088, 0.021797843277454376, 0.04278971999883652, -0.22840863466262817, -0.0035430938005447388, -0.4590624272823334, 0.17551973462104797, -0.09534469991922379, 0.006659369915723801, -0.38083237409591675, 0.43762075901031494, -0.2151690572500229, 0.3830365836620331, -0.16716699302196503, -0.26390784978866577, 0.14523644745349884, 0.17550088465213776, 0.34428802132606506, 0.42101746797561646, -0.00012642110232263803, 0.00845193862915039, 0.2881329655647278, -0.1325942575931549, -0.1675431877374649, -0.3373396098613739, -0.003374435007572174, -0.101088747382164, 0.1194242388010025, -0.25364190340042114, -0.004283085465431213, -0.17952540516853333, -0.02828442119061947, 0.12327180802822113, -0.048593584448099136, 0.03710518032312393, 0.1309274584054947, 0.13358980417251587, -0.12164401262998581, 0.11397100985050201, 0.2509181499481201, 0.4693346619606018, -0.1752048283815384, 0.49168169498443604, 0.17594188451766968, -0.43891212344169617, -0.08677586913108826, 0.2694498300552368, 0.015348300337791443, -0.012188316322863102, 0.5086031556129456, 0.1511496603488922, 0.33122649788856506, -0.03341470658779144, 0.06315050274133682, 0.13176129758358002, 0.5216520428657532, 0.1329239457845688, -0.38162776827812195, -0.32081830501556396, -0.17549309134483337, -0.14933636784553528, 0.33150622248649597, 0.022628672420978546, -0.0034454017877578735, 0.039038196206092834, -0.042400095611810684, -0.10374931991100311, -0.36225372552871704, 0.2556823790073395, -0.08354147523641586, 0.22516219317913055, 0.10403451323509216, 0.06624412536621094, 0.06470569968223572, -0.185806006193161, -0.016812775284051895, -0.13872958719730377, -0.06777288019657135, 0.39510366320610046, -0.03897176682949066, 0.24298961460590363, 0.1606118381023407, -0.0976928249001503, 0.22609983384609222, 0.44349294900894165, -0.15908977389335632, 0.00986265018582344, -0.4395151436328888, 0.2005048394203186, 0.18514548242092133, 0.00685606524348259, 0.042594343423843384, 0.5006037354469299, 0.1567104160785675, 0.5379083156585693, -0.21058329939842224, -0.1073707789182663, -0.35414719581604004, 0.06182456389069557, -0.09830595552921295, -0.23869988322257996, 0.18565727770328522, -0.18230697512626648, -0.051969997584819794, -0.04447486251592636, -0.053513672202825546, -0.1617632806301117, 0.1615796983242035, 0.16238057613372803, 0.04262377694249153, 0.1459115445613861, 0.04418198764324188, 0.3775351941585541, -0.031429629772901535, 0.42423734068870544, -0.18906965851783752, -0.05919208750128746, -0.09203838557004929, 0.23992490768432617, 0.24132795631885529, 0.018203262239694595, 0.4299049973487854, 0.01598711684346199, -0.12421700358390808, 0.11383544653654099, -0.2523210048675537, -0.1435927301645279, -0.11584730446338654, 0.1949211061000824, -0.16631248593330383, 0.2781830132007599, 0.041300952434539795, 0.08207031339406967, -0.03477098047733307, 0.10389203578233719, -0.3570738136768341, -0.38575291633605957, 0.11750497668981552, 0.07774583250284195, -0.2897503972053528, -0.1691068708896637, -0.6241310238838196, 0.054967574775218964, -0.3598327040672302, -0.3093959093093872, 0.11456736922264099, 0.05567691847681999, -0.3650442063808441, -0.1927359700202942, 0.2263811230659485, 0.676781177520752, -0.0773419737815857, -0.19173237681388855, 0.14692702889442444, -0.1572270691394806, 0.0710412785410881, 0.08100905269384384, -0.2131900191307068, 0.04470384865999222, -0.5148174166679382, 0.06983032822608948, -0.0068909525871276855, -0.6675131916999817, -0.37303489446640015, 0.31643739342689514, 0.11857165396213531, 0.5162218809127808, 0.20565815269947052, 0.08293633908033371, -0.11109603941440582, -0.04748368635773659, -0.04738668352365494, 0.485821396112442, 0.0801728367805481, -0.034688789397478104, -0.031467653810977936, -0.24665844440460205, 0.2329157590866089, 0.36033397912979126, 0.12759418785572052, 0.29120081663131714, 0.11432523280382156, 0.0012064538896083832, 0.22336813807487488, -0.08060971647500992, -0.008638989180326462, 0.3300689160823822, 0.19077041745185852, 0.31768956780433655, 0.0859123170375824, -0.1379087120294571, -0.4303860366344452, 0.47469717264175415, 0.03395266830921173, 0.03432973846793175, -0.4266791343688965, 0.07765695452690125, -0.23656055331230164, -0.1317112147808075, -0.44976669549942017, -0.2893228232860565, -0.049880534410476685, 0.19341754913330078, -0.13810405135154724, -0.017586156725883484, -0.07240838557481766, 0.535782516002655, -0.11518728733062744, 0.303375244140625, 0.11618120223283768, 0.39749985933303833, 0.09090027213096619, -0.22285328805446625, -0.11864298582077026, 0.0965583547949791, 0.2359016239643097, -0.3644169270992279, -0.22412793338298798, 0.5061907172203064, 0.007629264146089554, 0.3503231108188629, -0.08884220570325851, 0.10877400636672974, 0.30746719241142273, -0.04057549685239792, -0.2081710696220398, -0.14737474918365479, 0.17767736315727234, -0.16374410688877106, -0.434165358543396, 0.17948217689990997, -0.0675233006477356, 0.37309208512306213, 0.15082761645317078, -0.1360170543193817, 0.041196390986442566, 0.012923769652843475, -0.19722190499305725, -0.2740415334701538, 0.09922822564840317, 0.4403235614299774, 0.1328008770942688, 0.19164225459098816, -0.1970011591911316, -0.09843520820140839, 0.2214888036251068, 0.17785495519638062, -0.15916769206523895, 0.12877687811851501, -0.018318701535463333, 0.1547941118478775, 0.09881152957677841, -0.14995405077934265, 0.3569929897785187, 0.16911259293556213, -0.18398025631904602, 0.09583836793899536, -0.10379056632518768, 0.012200731784105301, 0.08368639647960663, 0.11553238332271576, 0.13191018998622894, 0.2637162208557129, 0.30231398344039917, 0.1124192327260971, -0.24751798808574677, -0.15981130301952362, 0.0950356051325798, 0.11239117383956909, -0.251581609249115, 0.13153496384620667, -0.4057627320289612, -0.23272281885147095, 0.06375058740377426, -0.30266687273979187, -0.33294087648391724, -0.024292007088661194, -0.2335178405046463, 0.40985172986984253, -0.0597321093082428, 0.07944072782993317, -0.23415081202983856, 0.06128394603729248, 0.07161250710487366, -0.47766372561454773, -0.2689450979232788, 0.16127721965312958, -0.14613468945026398, -0.10484112799167633, 0.19508960843086243, -0.1388259381055832, 0.15139952301979065, -0.026392877101898193, 0.1074952483177185, -0.48623019456863403, -0.4854040741920471, 0.16820864379405975, -0.1599859744310379, 0.3886663615703583, -0.021689534187316895, 0.11341973394155502, 0.1866435408592224, 0.12019214034080505, 0.5118618011474609, 0.186974436044693, -0.03234812989830971, -0.07322319597005844, 0.11213475465774536, 0.140298530459404, -0.43109452724456787, -0.27700138092041016, -0.059929512441158295, -0.38055771589279175, 0.17918983101844788, 0.24089239537715912, 0.04456458240747452, 0.34902042150497437, -0.04612133651971817, -0.07222787290811539, 0.14325353503227234, 0.010820187628269196, -0.14280541241168976, -0.4432488679885864, 0.4906804859638214, -0.171634241938591, -0.21037626266479492, -0.06248997524380684, -0.04445420950651169, 0.09143821150064468, 0.13277927041053772, -0.45140892267227173, -0.47263264656066895, -0.16644763946533203, 0.30804991722106934, 0.006664560176432133, -0.058028675615787506, 0.24578753113746643, -0.03119456022977829, 0.15793955326080322, -0.2352742701768875, -0.2594209313392639, 0.2657599449157715, 0.17199377715587616, -0.02642584964632988, -0.03965506702661514, 0.46095937490463257, -0.09805537015199661, 0.2393495887517929, -0.24522608518600464, 0.2748240828514099, 0.715157687664032, -0.36243727803230286, 0.4651331305503845, -0.17764784395694733, -0.27384480834007263, -0.07916900515556335, -0.037471234798431396, 0.2802288234233856, 0.1914430409669876, 0.2550223469734192, 0.21444390714168549, -0.18337270617485046, -0.08156032115221024, -0.1483965665102005, 0.04306025803089142, -0.0032970309257507324, 0.14115461707115173, 0.23001034557819366, 0.02773183584213257, 0.012101933360099792, -0.13541138172149658, -0.13250982761383057, 0.23511147499084473, 0.5616046786308289, 0.4003591537475586, 0.18297132849693298, -0.21173082292079926, 0.04008964076638222, 0.05159841477870941, -0.14426425099372864, 0.15206633508205414, 0.11952686309814453, -0.0424937978386879, -0.008006177842617035, 0.06213176250457764, -0.15020307898521423, 0.7809889912605286, -0.08217519521713257, 0.18523994088172913, 0.05082184076309204, -0.18533532321453094, -0.713179886341095, -0.36948713660240173, -0.04341643676161766, -0.3302442133426666, -0.13393278419971466, 1.0534456968307495, -0.2096102237701416, -0.2271934151649475, 0.22323258221149445, 0.10300089418888092, -0.22715415060520172, -0.3199918270111084, -0.2021787166595459, -0.07747364044189453, -0.28709954023361206, -0.2269778847694397, 0.014686405658721924, 0.3343903422355652, 0.09517093002796173, -0.0745152160525322, 0.09683705866336823, -0.2970502972602844, -0.022773142904043198, 0.08643852174282074, 0.2405729591846466, -0.08501344919204712, 0.35194385051727295, 0.2552589178085327, 0.17454364895820618, 0.45958366990089417, 0.9005552530288696, -0.0707971379160881, -0.51300048828125, -0.006780227646231651, -0.439949095249176, 0.1298464834690094, 0.1815381944179535, -0.05886787176132202, 0.03316609933972359, -0.3408868908882141, -0.20516788959503174, -0.592757523059845, 0.2666977345943451, 0.45449671149253845, -0.07565301656723022, 0.050492871552705765, -0.2986469268798828, 0.5498540997505188, 0.308205783367157, -0.18177011609077454, -0.10994213819503784, 0.3222023546695709, -0.5421037077903748, 0.15914325416088104, -0.3369637131690979, 0.6204410791397095, 0.10131162405014038, 0.1657259464263916, 0.41686564683914185, -0.23500566184520721, 0.06421968340873718, -0.08521866798400879, -0.05061343312263489, -0.12576408684253693, -0.28179213404655457, 0.05117122083902359, -0.08973714709281921, 0.21386387944221497, 0.23037253320217133, 0.19366729259490967, 0.37386834621429443, -0.258427232503891, -0.008745799772441387, 0.015540249645709991, 0.1388896405696869, -0.00932597927749157, -0.2715962529182434, -0.06174401193857193, 0.0018073692917823792, 0.27520114183425903, 0.30221495032310486, -0.06846901029348373, -0.010826725512742996, -0.21980714797973633, -0.41213521361351013, -0.13131950795650482, 0.2795735001564026, -0.07995260506868362, -0.05757509544491768, 0.16762535274028778, 0.015165954828262329, 0.05959288775920868, 0.01249422412365675, -0.08786855638027191, -0.15652652084827423, -0.14700371026992798, 0.0855247974395752, -0.22197751700878143, 0.19743329286575317, -0.21775202453136444, -0.03192286193370819, 0.36569520831108093, -0.005402393639087677, -0.05401625484228134, -0.23847368359565735, -0.2358371466398239, -0.19777736067771912, -0.4347880780696869, -0.06752179563045502, 0.17377197742462158, -0.14997230470180511, -0.23071956634521484, -0.26934394240379333, 0.14484092593193054, -0.24494615197181702, 0.04554133862257004, -0.054786596447229385, 0.1820427030324936, 0.12133975327014923, -0.10871682316064835, -0.2352801263332367, -0.15948718786239624, 0.3629879653453827, -0.2542794346809387, -0.07097170501947403, 0.5877810716629028, 0.0904141440987587, 0.053181491792201996, -0.04772868752479553, 0.05192168056964874, 0.25946807861328125, -0.43596982955932617, 0.10983731597661972, 0.3546900153160095, -0.09686712175607681, 0.14273838698863983, 0.17296630144119263, 0.06334955990314484, -0.4582292437553406, -0.07240256667137146, -0.4895763695240021, -0.18488404154777527, 0.12018755823373795, -0.3215973377227783, -0.014615889638662338, -0.36059653759002686, 0.03877269849181175, -0.052895158529281616, -0.1771117001771927, -0.146511971950531, 0.2263762652873993, 0.07231679558753967, 0.2078675478696823, 0.5708094239234924, 0.22543378174304962, 0.1533586084842682, 0.04364171624183655, 0.09077087789773941, 0.07353682816028595, 0.05248815938830376, 0.020103000104427338, -0.5126922130584717, 0.19145052134990692, 0.14583580195903778, -0.0006122402846813202, -0.08670150488615036, -0.2449769675731659, -0.0986432135105133, -0.13356877863407135, 0.24201300740242004, 0.13748565316200256, -0.01313764974474907, 0.3092535734176636, -0.1440069079399109, 0.36217787861824036, 0.00424569845199585, 0.308572381734848, -0.272752046585083, 0.49307897686958313, 0.1817411482334137, -0.05553266778588295, -0.11385472118854523, -0.029679536819458008, -0.25155630707740784, -0.03760841488838196, -0.12752532958984375, 0.22077576816082, 0.40236955881118774, -0.029375512152910233, 0.36145898699760437, 0.17429345846176147, 0.2044505476951599, 0.03127568960189819, -0.1280559003353119, -0.16469451785087585, 0.20817044377326965, 0.1528182029724121, -0.3069624602794647, -0.3139982223510742, -0.061468012630939484, -0.1503681242465973, 0.13197240233421326, 0.19571182131767273, 0.0955568253993988, 0.06162743270397186, -0.10439649224281311, -0.01738099381327629, 0.4882027208805084, 0.3514711260795593, -0.0007603950798511505, 0.45730477571487427, -0.11136317253112793, 0.12164010107517242, 0.241426020860672, 0.08543965220451355, 0.07595746219158173, 0.5056772828102112, -0.0869593694806099, -0.01833682507276535, 0.09783303737640381, 0.19736707210540771, 0.3312499523162842, -0.45808786153793335, -0.37635189294815063, -0.1473846435546875, 0.1369752734899521, 0.32845935225486755, -0.27696874737739563, 0.2673087418079376, -0.150870680809021, 0.03711602836847305, 0.04094955325126648, -0.016920706257224083, -0.08225507289171219, -0.233279287815094, -0.2226184904575348, -0.3154882788658142, -0.2434403896331787, 0.1814262717962265, -0.18470074236392975, -0.18464811146259308, -0.0004599541425704956, -0.0026622749865055084, -0.1327904760837555, -0.1795002818107605, -0.21653707325458527, 0.1355486512184143, -0.0067780762910842896, -0.13380171358585358, 0.27565887570381165, 0.12881699204444885, -0.35229700803756714, 0.5360901355743408, 0.16219058632850647, 0.22985991835594177, 0.1849292665719986, 0.2248179018497467, -0.03126068040728569, -0.3842172920703888, 0.08319924026727676, -0.11468970775604248, 0.3046204745769501, -0.060358304530382156, -0.1102362871170044, 0.03886910527944565, 0.04295642673969269, -0.15833812952041626, 0.14215774834156036, 0.012744087725877762, 0.1495516300201416, -0.48068270087242126, 0.3663251996040344, -0.07036814093589783, -0.033078670501708984, 0.010719431564211845, 0.11095380038022995, -0.12401314079761505, -0.35582292079925537, 0.3514196574687958, 0.35626691579818726, 0.08462800085544586, 0.17699173092842102, 0.010461613535881042, -0.11683157086372375, 0.334372878074646, 0.5173889398574829, -0.2945600748062134, -0.10952691733837128, 0.09218397736549377, -0.8009622097015381, 0.10257066786289215, 0.18004131317138672, -0.3376617729663849, 0.08186785876750946, 0.006317980587482452, 0.0879811942577362, -0.3177752196788788, 0.21614889800548553, -0.03113657236099243, 0.16408389806747437, -0.06562097370624542, -0.40809154510498047, -0.06623184680938721, 0.0234525203704834, 0.05812478065490723, -0.1821904182434082, -0.30131393671035767, 0.05559813603758812, -0.2750040888786316, 0.00839926302433014, 0.031083643436431885, -0.08199526369571686, -0.22011199593544006, 0.16490182280540466, 0.3856586217880249, -0.0019578561186790466, 0.29326102137565613, -0.03028365597128868, -0.17928850650787354, -0.4289228618144989, -0.24620085954666138, -0.024481739848852158, 0.10945642739534378, -0.01868923380970955, 0.48335492610931396, -0.35223624110221863, -0.02089262194931507, -0.4672738015651703, 0.13142535090446472, -0.0769457221031189, -0.24578410387039185, -0.235909104347229, 0.4166886806488037, -0.09406237304210663, -0.05330047756433487, -0.09154849499464035, 0.25249534845352173, 0.01618156023323536, -0.08210814744234085, -0.08045225590467453, -0.4252287745475769, 0.49765878915786743, -0.19270643591880798, -0.25425827503204346, -0.010382141917943954, 0.13768135011196136, -0.08391965925693512, 0.15139012038707733, -0.37975171208381653, -0.035579778254032135, 0.352161169052124, 0.15608257055282593, -0.29094043374061584, 0.19078850746154785, 0.09149235486984253, 0.004571385681629181, -0.13053059577941895, -0.24817004799842834, 0.061027418822050095, -0.05369164049625397, 0.27581143379211426, 0.02044958621263504 ]
https://github.com/huggingface/datasets/issues/6441
> Also when they try to click the url link for the dataset they get a 404 error. This seems to be a Hub error then (cc @SBrandeis)
Trouble Loading a Gated Dataset For User with Granted Permission
### Describe the bug I have granted permissions to several users to access a gated huggingface dataset. The users accepted the invite and when trying to load the dataset using their access token they get `FileNotFoundError: Couldn't find a dataset script at .....` . Also when they try to click the url link for the dataset they get a 404 error. ### Steps to reproduce the bug 1. Grant access to gated dataset for specific users 2. Users accept invitation 3. Users login to hugging face hub using cli login 4. Users run load_dataset ### Expected behavior Dataset is loaded normally for users who were granted access to the gated dataset. ### Environment info datasets==2.15.0
28
Trouble Loading a Gated Dataset For User with Granted Permission ### Describe the bug I have granted permissions to several users to access a gated huggingface dataset. The users accepted the invite and when trying to load the dataset using their access token they get `FileNotFoundError: Couldn't find a dataset script at .....` . Also when they try to click the url link for the dataset they get a 404 error. ### Steps to reproduce the bug 1. Grant access to gated dataset for specific users 2. Users accept invitation 3. Users login to hugging face hub using cli login 4. Users run load_dataset ### Expected behavior Dataset is loaded normally for users who were granted access to the gated dataset. ### Environment info datasets==2.15.0 > Also when they try to click the url link for the dataset they get a 404 error. This seems to be a Hub error then (cc @SBrandeis)
[ -0.29226887226104736, -0.23708491027355194, 0.059749752283096313, 0.5143930912017822, -0.0005606310442090034, 0.010804161429405212, 0.4375983774662018, 0.01528296247124672, 0.49582868814468384, 0.22912351787090302, -0.24911551177501678, -0.1277315467596054, -0.11217568814754486, 0.11388504505157471, 0.03840219974517822, 0.13969369232654572, 0.15380659699440002, -0.062019091099500656, 0.015069032087922096, -0.1095392256975174, -0.38197243213653564, 0.04058888554573059, -0.3344862461090088, 0.4120281934738159, -0.38492557406425476, 0.20906145870685577, 0.016049981117248535, 0.6451938152313232, 0.17586089670658112, -0.07203275710344315, 0.1849418580532074, 0.20293419063091278, 0.361521452665329, 0.5117638111114502, -0.00012318434892222285, -0.1356937140226364, 0.38994094729423523, 0.16250625252723694, -0.26679348945617676, -0.258040189743042, -0.31815820932388306, -0.10354741662740707, -0.07885801047086716, -0.015886828303337097, -0.13300934433937073, -0.15558236837387085, 0.16678401827812195, -0.019877545535564423, 0.3043671250343323, -0.13929390907287598, 0.10286382585763931, 0.09418296813964844, -0.15431834757328033, -0.20870241522789001, -0.04210769012570381, 0.06975645571947098, 0.024563804268836975, 0.2878243327140808, 0.3993363678455353, -0.29043760895729065, -0.050245605409145355, -0.023889781907200813, -0.055915266275405884, -0.2239026129245758, 0.8815980553627014, -0.2002759426832199, -0.30736345052719116, -0.16790246963500977, 0.06540347635746002, 0.20937786996364594, 0.3068411350250244, 0.18095022439956665, -0.3168744444847107, -0.38626787066459656, -0.037735581398010254, 0.13491040468215942, 0.4110466241836548, 0.12815067172050476, -0.23668472468852997, 0.2668062746524811, -0.4524956941604614, -0.3177826404571533, -0.22121146321296692, 0.1037956178188324, -0.04842137545347214, 0.36618176102638245, 0.16678902506828308, 0.17669223248958588, -0.2626807987689972, -0.200977623462677, 0.16586938500404358, -0.0002819430083036423, -0.14176692068576813, 0.3519361615180969, -0.08447697758674622, 0.24757546186447144, 0.25406214594841003, 0.6010993719100952, 0.0958079919219017, 0.6005032062530518, -0.32872623205184937, 0.25868144631385803, -0.25610148906707764, 0.07643935084342957, 0.3444529175758362, 0.01714649423956871, 0.19035384058952332, 0.1835242360830307, 0.45358482003211975, 0.38787758350372314, -0.02450791746377945, 0.02103244513273239, -0.3654266595840454, -0.10909546911716461, -0.15642967820167542, -0.17578710615634918, 0.253050833940506, -0.21873769164085388, -0.3349873721599579, 0.06137346848845482, 0.17699237167835236, 0.029536079615354538, 0.21444815397262573, 0.6778121590614319, 0.05181485787034035, -0.4585026800632477, 0.07802173495292664, 0.09057588875293732, -0.13825532793998718, -0.3073078989982605, -0.23264923691749573, -0.19119605422019958, -0.1786501109600067, 0.3804630637168884, 0.029933705925941467, -0.14515180885791779, 0.19036033749580383, -0.16525176167488098, 0.02773958444595337, -0.09205512702465057, -0.1806790977716446, 0.2586580812931061, -0.0023063458502292633, 0.16059249639511108, 0.36536064743995667, 0.10888444632291794, 0.06358417123556137, -0.26586246490478516, 0.04947562515735626, 0.12800106406211853, -0.27531036734580994, -0.31168225407600403, 0.20328351855278015, -0.0402456670999527, -0.48370614647865295, 0.1097453385591507, -0.10429076850414276, 0.05824238806962967, -0.18149948120117188, -0.1659945547580719, -0.19750070571899414, 0.22497929632663727, -0.19919995963573456, -0.29029393196105957, 0.35962212085723877, 0.8837181925773621, 0.10983680933713913, -0.2502674162387848, 0.018322531133890152, -0.19341276586055756, -0.25566303730010986, 0.3264198303222656, -0.20434044301509857, 0.24976681172847748, -0.4542504549026489, 0.3892785608768463, -0.228886216878891, -0.5264030694961548, -0.5202945470809937, 0.03324327617883682, -0.19403885304927826, 0.2973855137825012, -0.05282248556613922, 0.08713921904563904, 0.17495781183242798, -0.1844056248664856, 0.4348028898239136, 0.29031312465667725, 0.25521981716156006, -0.18912836909294128, -0.0008800029754638672, -0.2101043462753296, 0.0532287172973156, 0.21678239107131958, 0.1717943251132965, 0.19591346383094788, 0.39202404022216797, -0.007836736738681793, 0.38853007555007935, -0.18373805284500122, 0.04410743713378906, 0.15989553928375244, 0.27934226393699646, 0.07470302283763885, 0.10259266942739487, -0.16592806577682495, -0.18351183831691742, 0.32979580760002136, -0.04432061314582825, -0.14020995795726776, 0.07597127556800842, -0.05707346647977829, -0.3344273567199707, 0.11298687756061554, -0.3406113088130951, 0.14657796919345856, -0.030382078140974045, -0.012718923389911652, -0.2295113056898117, -0.17007674276828766, -0.23104581236839294, 0.5261028409004211, -0.17407050728797913, 0.21044859290122986, -0.2372930943965912, 0.3473760783672333, 0.15675941109657288, -0.21890000998973846, 0.1747877448797226, 0.2813260555267334, 0.3631817102432251, -0.1550021767616272, -0.05046118050813675, 0.4263506531715393, -0.07284527271986008, 0.06672579050064087, 0.10192981362342834, -0.08110836893320084, 0.09627524018287659, -0.09423191845417023, -0.028273414820432663, -0.21945002675056458, 0.027217697352170944, -0.06602385640144348, 0.0013497425243258476, 0.3552151024341583, -0.05537961423397064, 0.06296336650848389, 0.037318915128707886, 0.15498247742652893, -0.062498465180397034, -0.05580535903573036, -0.1037091612815857, -0.07010415196418762, 0.4358152449131012, 0.09153135120868683, -0.20212754607200623, 0.004114260897040367, 0.0423031747341156, -0.06336260586977005, 0.02079450897872448, -0.05963509529829025, 0.1008138507604599, -0.07764375954866409, -0.043646253645420074, 0.08803736418485641, 0.3839554786682129, 0.15897782146930695, 0.19029740989208221, 0.030385911464691162, -0.20041245222091675, 0.05519118160009384, 0.2282629907131195, -0.053067468106746674, 0.06871776282787323, -0.18908408284187317, -0.13997882604599, 0.11131905019283295, -0.2819192707538605, -0.09765918552875519, -0.1759377121925354, -0.2838277220726013, 0.0736963078379631, 0.28614357113838196, -0.5047138929367065, -0.23092395067214966, -0.08477824926376343, -0.09986628592014313, 0.33996397256851196, -0.2857465445995331, -0.4141811728477478, -0.021577253937721252, -0.17682534456253052, 0.4167941212654114, 0.0752539411187172, 0.0671035498380661, -0.2728458642959595, 0.4546736478805542, -0.10027405619621277, 0.16263166069984436, -0.3460068106651306, 0.11529240012168884, -0.25263428688049316, -0.07097610086202621, 0.4136468470096588, 0.000978134572505951, 0.10380852967500687, -0.20342916250228882, 0.35378721356391907, -0.6152340769767761, -0.21762961149215698, -0.06704121083021164, -0.12395612895488739, 0.56879061460495, 0.02449510060250759, 0.22484508156776428, 0.005347549915313721, 0.02131706476211548, 0.08829142153263092, 0.09655216336250305, -0.02885831519961357, -0.03231118246912956, -0.02183026820421219, -0.37957659363746643, -0.048910271376371384, 0.008403437212109566, -0.01648346334695816, -0.26223036646842957, 0.28076013922691345, 0.10805484652519226, 0.09140962362289429, 0.24522972106933594, 0.009301193058490753, 0.037186019122600555, -0.0862131416797638, -0.17831774055957794, -0.08351916819810867, -0.3951190114021301, 0.2969585061073303, -0.2332097589969635, -0.3859347105026245, 0.1668732762336731, 0.2028767466545105, 0.15856090188026428, -0.06853877007961273, -0.41877561807632446, -0.00881287083029747, -0.1502736508846283, 0.14108294248580933, -0.13760603964328766, -0.26051953434944153, -0.06993845105171204, -0.24986201524734497, 0.23853185772895813, -0.08731813728809357, -0.30013906955718994, 0.2953640818595886, -0.0020573297515511513, 0.10776558518409729, 0.018924623727798462, -0.005874293390661478, -0.10469770431518555, 0.22091910243034363, 0.11754152923822403, 0.5642307996749878, 0.40007370710372925, 0.06568438559770584, 0.4092661142349243, 0.08254627883434296, -0.26950252056121826, 0.23395705223083496, 0.3440777659416199, -0.1393185555934906, 0.22386793792247772, 0.2984192371368408, 0.03655420243740082, -0.23759709298610687, -0.7047719359397888, -0.09419079124927521, -0.23746423423290253, -0.3754024803638458, 0.017822790890932083, 0.014590906910598278, 0.38207554817199707, 0.25013473629951477, -0.2629081904888153, -0.29752016067504883, 0.17439991235733032, 0.45933300256729126, 0.5946384072303772, -0.003177456557750702, -0.3360983431339264, -0.29096800088882446, -0.2600591778755188, 0.19355590641498566, -0.11959841102361679, 0.19822660088539124, -0.3567155599594116, 0.117902010679245, 0.19748644530773163, 0.13262824714183807, 0.49230989813804626, -0.26523348689079285, 0.48215925693511963, -0.2705218195915222, 0.16100573539733887, -0.40706318616867065, -0.11723296344280243, 0.2737891376018524, 0.14964419603347778, 0.07003596425056458, 0.6922134160995483, 0.003388136625289917, -0.1754581481218338, 0.057436831295490265, -0.29255539178848267, -0.2896571159362793, -0.46969863772392273, -0.1419672966003418, -0.2645033001899719, -0.3497333228588104, 0.04712020233273506, 0.007181830704212189, 0.21461139619350433, 0.08072745054960251, -0.2699689269065857, -0.07934822142124176, 0.1637398600578308, 0.008664373308420181, 0.20364464819431305, 0.32093098759651184, -0.03939557820558548, 0.19509881734848022, 0.3865489363670349, 0.18173754215240479, 0.20079118013381958, 0.5768281817436218, 0.3269497752189636, -0.33327534794807434, 0.1449192762374878, -0.1764744371175766, 0.07024677842855453, 0.5914216637611389, -0.16796807944774628, -0.02507632225751877, 0.44579076766967773, 0.10604515671730042, -0.16914638876914978, -0.11466764658689499, -0.05288122594356537, 0.05594351515173912, -0.4125923812389374, -0.2312854528427124, 0.021976273506879807, -0.03994263336062431, -0.05941198766231537, 0.3786015510559082, 0.5778257846832275, -0.20121002197265625, 0.25632086396217346, -0.04246867075562477, 1.1067273616790771, -0.13942685723304749, 0.16773444414138794, 0.39533597230911255, -0.06714299321174622, -0.10815753787755966, -0.1539742350578308, -0.13071048259735107, -0.43790990114212036, -0.335746705532074, -0.08382541686296463, -0.0602811723947525, -0.004372021183371544, 0.09439648687839508, 0.3146396279335022, 0.22375832498073578, -0.1467123031616211, -0.024812551215291023, 0.12665531039237976, -0.006238505244255066, -0.3586694002151489, 0.010172072798013687, 0.10038460046052933, -0.05388393625617027, 0.15377435088157654, 0.3107604682445526, -0.2295144498348236, -0.11379657685756683, -0.46445944905281067, -0.11364392936229706, -0.30902379751205444, 0.14600151777267456, 0.008473217487335205, -0.1538190245628357, 0.12086299061775208, -0.03661559522151947, 0.1768706738948822, 0.3337627649307251, 0.08798649907112122, 0.015141582116484642, -0.4528808295726776, 0.2094956636428833, -0.2631545960903168, -0.12449473142623901, -0.13560986518859863, 0.19136865437030792, 0.3935835361480713, -0.04060114175081253, -0.3387245535850525, -0.021659236401319504, -0.12129217386245728, -0.2152726948261261, -0.4663850963115692, 0.279283344745636, 0.012323452159762383, -0.2902134656906128, -0.2141844481229782, -0.14168867468833923, 0.12641173601150513, -0.05836324766278267, -0.013521106913685799, 0.11770214140415192, 0.13696451485157013, -0.16921761631965637, 0.4062984585762024, -0.31700456142425537, 0.028028488159179688, 0.3531271517276764, -0.2952445149421692, -0.19870612025260925, 0.46917563676834106, 0.07221264392137527, -0.014301232993602753, -0.014925971627235413, -0.0792645663022995, 0.46701866388320923, -0.4838476777076721, -0.1767292618751526, -0.03440757095813751, 0.25608882308006287, -0.03464983403682709, 0.07059800624847412, 0.2955242097377777, -0.36840546131134033, 0.025101833045482635, -0.46682092547416687, -0.09555215388536453, 0.10322965681552887, -0.3579431176185608, -0.11585864424705505, -0.03946258872747421, -0.19284284114837646, 0.025800399482250214, -0.28256848454475403, -0.12866489589214325, -0.12018916010856628, -0.15597054362297058, -0.20003816485404968, 0.2112504094839096, 0.20608443021774292, -0.12518349289894104, -0.24687810242176056, -0.012399997562170029, -0.12367433309555054, -0.10173645615577698, 0.010979529470205307, -0.1369718313217163, 0.2337249517440796, 0.21267832815647125, -0.19844339787960052, -0.21384184062480927, -0.22689130902290344, 0.056130148470401764, -0.18232157826423645, 0.036001056432724, 0.38375598192214966, 0.10450770705938339, -0.36603444814682007, 0.32495591044425964, 0.14767968654632568, -0.2826295495033264, 0.4647204279899597, 0.081210657954216, 0.0037205778062343597, -0.25131502747535706, 0.022004293277859688, -0.14611640572547913, -0.027722544968128204, 0.04165033623576164, 0.13421618938446045, 0.3268280029296875, 0.24583645164966583, 0.39314302802085876, -0.262552946805954, 0.28783655166625977, 0.16041511297225952, 0.25142502784729004, 0.02718791738152504, -0.20454150438308716, -0.06607457250356674, 0.06741781532764435, 0.04868931323289871, -0.02825833112001419, 0.011328775435686111, 0.24156492948532104, 0.06404653191566467, -0.3370380997657776, 0.22379004955291748, -0.07206570357084274, -0.2744821310043335, -0.190658301115036, 0.02329825609922409, 0.3589906692504883, 0.23796780407428741, 0.042782362550497055, 0.08479136228561401, -0.1489304006099701, 0.14160984754562378, 0.3060845732688904, 0.05367840453982353, -0.012345042079687119, 0.7479058504104614, -0.16947516798973083, -0.0585646852850914, -0.07559122890233994, 0.49242672324180603, -0.05870858207345009, -0.7070958614349365, -0.10716672241687775, -0.12787477672100067, -0.038560498505830765, -0.0980275422334671, -0.29500526189804077, 0.24938413500785828, -0.12993508577346802, -0.10656630992889404, -0.14648492634296417, 0.14774435758590698, -0.23846112191677094, 0.07745818793773651, -0.03303185850381851, -0.1226152777671814, -0.0156857892870903, -0.13834026455879211, -0.07245222479104996, -0.3304009735584259, -0.41626524925231934, 0.09833921492099762, -0.04092209413647652, -0.16290032863616943, 0.14460454881191254, 0.444772869348526, -0.008275456726551056, -0.18644292652606964, 0.12085647881031036, -0.19561278820037842, 0.04359003156423569, 0.6892469525337219, -0.031400032341480255, 0.39263585209846497, 0.29368865489959717, 0.19938039779663086, 0.3836261034011841, -0.021431248635053635, 0.060799725353717804, -0.00723189115524292, 0.4259566068649292, 0.14450375735759735, 0.5137650966644287, 0.07384859770536423, 0.05210578441619873, 0.003498561680316925, -0.09663752466440201, -0.011399250477552414, 0.13911116123199463, -0.29122933745384216, 0.3560091555118561, -0.48397400975227356, -0.28029295802116394, -0.2196497917175293, -0.1737385094165802, -0.11431221663951874, 0.12977057695388794, 0.13381150364875793, 0.16489681601524353, 0.13084250688552856, -0.3946154713630676, -0.04721001535654068, -0.07969631999731064, 0.15074163675308228, 0.44285693764686584, 0.15264953672885895, -0.11148709058761597, -0.38855206966400146, -0.6714122295379639, 0.4537396728992462, 0.15542630851268768, -0.08052871376276016, 0.19019757211208344, -0.12132974714040756, -0.27267637848854065, -0.4300953447818756, 0.39053115248680115, 0.3023133873939514, 0.18580850958824158, 0.2726899981498718, -0.1261385828256607, -0.10092490911483765, 0.0241084024310112, 0.27129554748535156, -0.3291216790676117, 0.058579400181770325, 0.42951130867004395, -0.17469006776809692, -0.15579387545585632, 0.20004582405090332, -0.15009477734565735, 0.04816402494907379, -0.0038572726771235466, 0.4370075762271881, -0.15980546176433563, 0.5608199238777161, 0.15932680666446686, 0.1448771208524704, -0.6401886940002441, -0.10512129217386246, -0.1735491156578064, 0.16621087491512299, -0.08320900797843933, 0.0433722659945488, -0.12607350945472717, -0.04640776664018631, -0.08209311962127686, 0.4609169065952301, -0.05355317145586014, 0.19794385135173798, -0.12855637073516846, 0.06266944855451584, -0.17241522669792175, 0.19767875969409943, 0.2472924441099167, -0.09087442606687546, -0.08699291944503784, 0.2167038470506668, -0.13875561952590942, -0.08981684595346451, 0.6664194464683533, -0.46311715245246887, -0.1140846461057663, 0.11793050169944763, 0.42937135696411133, 0.08576708287000656, -0.5171619057655334, -0.10966210067272186, -0.05691813677549362, 0.22583742439746857, 0.1233612671494484, 0.1194913387298584, 0.09290461242198944, -0.33131518959999084, 0.05253218114376068, -0.045635007321834564, 0.039898112416267395, 0.05565120279788971, -0.25457048416137695, 0.5924637317657471, 0.09936948120594025 ]
https://github.com/huggingface/datasets/issues/6441
Could you report this to https://discuss.huggingface.co/c/hub/23, providing the URL of the dataset, or at least if the dataset is public or private?
Trouble Loading a Gated Dataset For User with Granted Permission
### Describe the bug I have granted permissions to several users to access a gated huggingface dataset. The users accepted the invite and when trying to load the dataset using their access token they get `FileNotFoundError: Couldn't find a dataset script at .....` . Also when they try to click the url link for the dataset they get a 404 error. ### Steps to reproduce the bug 1. Grant access to gated dataset for specific users 2. Users accept invitation 3. Users login to hugging face hub using cli login 4. Users run load_dataset ### Expected behavior Dataset is loaded normally for users who were granted access to the gated dataset. ### Environment info datasets==2.15.0
22
Trouble Loading a Gated Dataset For User with Granted Permission ### Describe the bug I have granted permissions to several users to access a gated huggingface dataset. The users accepted the invite and when trying to load the dataset using their access token they get `FileNotFoundError: Couldn't find a dataset script at .....` . Also when they try to click the url link for the dataset they get a 404 error. ### Steps to reproduce the bug 1. Grant access to gated dataset for specific users 2. Users accept invitation 3. Users login to hugging face hub using cli login 4. Users run load_dataset ### Expected behavior Dataset is loaded normally for users who were granted access to the gated dataset. ### Environment info datasets==2.15.0 Could you report this to https://discuss.huggingface.co/c/hub/23, providing the URL of the dataset, or at least if the dataset is public or private?
[ -0.1947937309741974, -0.27182096242904663, 0.054994285106658936, 0.5652323961257935, -0.0011484064161777496, 0.013401776552200317, 0.4236222505569458, -0.05076004937291145, 0.40111419558525085, 0.14345966279506683, -0.2048477679491043, -0.15554077923297882, -0.1591770350933075, 0.2002495527267456, 0.15222010016441345, 0.1785740852355957, 0.15123775601387024, -0.062396660447120667, -0.028129756450653076, -0.10686295479536057, -0.3404427766799927, 0.15602391958236694, -0.2578815817832947, 0.43954670429229736, -0.3505611717700958, 0.1993952840566635, 0.031516656279563904, 0.6065978407859802, 0.21317805349826813, -0.14902366697788239, 0.27974504232406616, 0.14161059260368347, 0.22244670987129211, 0.5309414267539978, -0.0001244534651050344, -0.11745474487543106, 0.3228779137134552, 0.10955006629228592, -0.21443015336990356, -0.25421884655952454, -0.22866898775100708, -0.1682429313659668, -0.06253516674041748, 0.01698082685470581, -0.12791471183300018, -0.2532503306865692, 0.16094835102558136, -0.055914945900440216, 0.3430844843387604, -0.04366333782672882, 0.07849657535552979, 0.1605874001979828, -0.12441740930080414, -0.09721630811691284, -0.052680667489767075, 0.14910711348056793, 0.04996572434902191, 0.35861724615097046, 0.3664608597755432, -0.20578047633171082, -0.004694994539022446, 0.02651466801762581, -0.0682496652007103, -0.22630931437015533, 0.7994071245193481, -0.1514817476272583, -0.37396907806396484, -0.2363787591457367, 0.14212803542613983, 0.2364247739315033, 0.24063992500305176, 0.040092673152685165, -0.3666791021823883, -0.41021478176116943, 0.011351257562637329, 0.15276242792606354, 0.43509775400161743, 0.21010613441467285, -0.19059723615646362, 0.26478856801986694, -0.4850583076477051, -0.31852418184280396, -0.18546605110168457, 0.05587691068649292, -0.031069010496139526, 0.2937188744544983, 0.030688662081956863, 0.14850768446922302, -0.2677752375602722, -0.27014392614364624, 0.0004922747611999512, 0.014384821057319641, -0.07210321724414825, 0.3548808693885803, -0.07502541691064835, 0.15181903541088104, 0.2360485941171646, 0.49958235025405884, 0.17232497036457062, 0.5132898688316345, -0.3056156635284424, 0.2033521980047226, -0.2870761752128601, 0.0591488853096962, 0.4070466458797455, 0.03055182471871376, 0.18081699311733246, 0.14115270972251892, 0.3995493948459625, 0.4890199899673462, 0.018921583890914917, 0.03586174175143242, -0.31322628259658813, -0.06263813376426697, -0.18014413118362427, -0.22093406319618225, 0.3284571170806885, -0.21928943693637848, -0.4588134288787842, 0.1409839391708374, 0.12723828852176666, 0.02126939594745636, 0.19977441430091858, 0.6849765181541443, 0.0002561397850513458, -0.41565635800361633, 0.1266520619392395, 0.015847716480493546, -0.04621996730566025, -0.28752055764198303, -0.18120858073234558, -0.11968868970870972, -0.21577227115631104, 0.4502629339694977, -0.03675292059779167, -0.1811339408159256, 0.1877647340297699, -0.15045592188835144, 0.039814528077840805, -0.11953958868980408, -0.2321404218673706, 0.32400333881378174, 0.006625659763813019, 0.23247341811656952, 0.2754814624786377, 0.09201630204916, 0.0865221619606018, -0.17597731947898865, -0.016432538628578186, 0.0715225413441658, -0.31290608644485474, -0.3150279223918915, 0.10387023538351059, -0.04998378828167915, -0.4764931797981262, 0.14402833580970764, -0.09615243226289749, 0.10676965117454529, -0.21767064929008484, -0.15219779312610626, -0.08911222219467163, 0.24385851621627808, -0.23801884055137634, -0.3015054762363434, 0.46604835987091064, 0.9472731351852417, 0.10655245184898376, -0.32605627179145813, 0.02922050654888153, -0.21240000426769257, -0.11472730338573456, 0.33817940950393677, -0.2059251070022583, 0.1892821043729782, -0.5056841373443604, 0.333374559879303, -0.24500063061714172, -0.4599057734012604, -0.4288615584373474, 0.004237186163663864, -0.27505555748939514, 0.3434966802597046, -0.03582635521888733, 0.08031788468360901, 0.0445592887699604, -0.13074418902397156, 0.41710329055786133, 0.2603108286857605, 0.2512875199317932, -0.08203795552253723, -0.020487159490585327, -0.23657462000846863, 0.07436959445476532, 0.24110400676727295, 0.05765592306852341, 0.16597332060337067, 0.36613166332244873, -0.07788477838039398, 0.3612743318080902, -0.1575382649898529, -0.10641578584909439, 0.08066588640213013, 0.29095539450645447, 0.22696849703788757, 0.0712568461894989, -0.13151052594184875, -0.17452910542488098, 0.28128108382225037, 0.007198326289653778, -0.18629500269889832, 0.07210125774145126, -0.206525057554245, -0.3797808289527893, 0.25799041986465454, -0.2828593850135803, -0.02017718181014061, -0.06302007287740707, 0.005750691518187523, -0.18326830863952637, -0.023130279034376144, -0.2991566061973572, 0.5035668611526489, -0.2903989553451538, 0.23770441114902496, -0.28201019763946533, 0.23316577076911926, 0.24130545556545258, -0.13851384818553925, 0.19889140129089355, 0.28636160492897034, 0.3538045287132263, -0.10576187819242477, 0.04998055845499039, 0.4050724506378174, -0.12123753130435944, 0.16839739680290222, 0.11727357655763626, -0.01743534952402115, 0.09837085753679276, -0.17143212258815765, -0.06466267257928848, -0.112103670835495, -0.02591203711926937, 0.023077115416526794, -0.014757152646780014, 0.44675734639167786, -0.011552412062883377, 0.040608569979667664, 0.05242367088794708, 0.1998022496700287, -0.07959182560443878, -0.10403024405241013, -0.14743754267692566, -0.06482722610235214, 0.4284977912902832, 0.0607641339302063, -0.05095452442765236, 0.014320561662316322, -0.0843660905957222, -0.02736816555261612, 0.05581466481089592, -0.09034013003110886, 0.09722557663917542, 0.023941855877637863, -0.1265142261981964, 0.10646946728229523, 0.4046732783317566, 0.19376632571220398, 0.18181222677230835, 0.029086418449878693, -0.1981607973575592, 0.0887443870306015, 0.21005436778068542, -0.00893326848745346, 0.07270532101392746, -0.19660061597824097, -0.17613962292671204, 0.1472267508506775, -0.18370775878429413, -0.11131959408521652, -0.2428475022315979, -0.23505352437496185, -0.09713628888130188, 0.22317232191562653, -0.5771138668060303, -0.13181020319461823, -0.0470053069293499, -0.11582650244235992, 0.2071262151002884, -0.270601749420166, -0.4165736436843872, -0.010528337210416794, -0.19126616418361664, 0.33171287178993225, 0.06057043373584747, 0.005535610020160675, -0.3504047393798828, 0.5005037188529968, -0.14711521565914154, 0.21101096272468567, -0.29340970516204834, 0.20241595804691315, -0.2057960331439972, -0.10078133642673492, 0.3828895390033722, -0.04434334859251976, 0.22679556906223297, -0.26219967007637024, 0.3049166202545166, -0.6684069633483887, -0.24527952075004578, -0.05875222384929657, -0.019122818484902382, 0.6139768958091736, 0.11568859219551086, 0.20169615745544434, -0.020694531500339508, -0.07249981164932251, 0.07905584573745728, 0.07617595046758652, -0.03539358451962471, -0.06015554815530777, -0.03699429705739021, -0.2686653137207031, -0.07212457060813904, -0.004424493759870529, -0.04198059067130089, -0.19057637453079224, 0.4145900011062622, -0.014622300863265991, 0.16608399152755737, 0.2537056803703308, -0.0068891532719135284, 0.1707657128572464, -0.23164956271648407, -0.1507546603679657, -0.132901132106781, -0.5117901563644409, 0.31870779395103455, -0.18521934747695923, -0.4085276126861572, 0.13757045567035675, 0.1922817826271057, 0.08867010474205017, -0.0749758929014206, -0.4323054850101471, -0.05768432095646858, -0.1558675915002823, 0.08190764486789703, -0.10749871283769608, -0.22198989987373352, -0.07790140807628632, -0.28800296783447266, 0.21260613203048706, -0.08612789958715439, -0.37924039363861084, 0.160783588886261, -0.1014586091041565, 0.057674817740917206, 0.09195160865783691, 0.07205761969089508, -0.0630870908498764, 0.36329254508018494, 0.19638794660568237, 0.4596424400806427, 0.4055078327655792, 0.00698203407227993, 0.4267943799495697, 0.19387301802635193, -0.3849804699420929, 0.13115330040454865, 0.33786922693252563, -0.1631741225719452, 0.2174035608768463, 0.27571022510528564, 0.1768718957901001, -0.22107739746570587, -0.6246187090873718, -0.15997791290283203, -0.18075509369373322, -0.3626154959201813, 0.1458703875541687, 0.14636337757110596, 0.2680014967918396, 0.2168029099702835, -0.19071170687675476, -0.2657259702682495, 0.12315180152654648, 0.5667982697486877, 0.5822429656982422, 0.036081165075302124, -0.3045198321342468, -0.35575541853904724, -0.28179731965065, 0.16252194344997406, -0.14200088381767273, 0.24111966788768768, -0.39567017555236816, 0.08605919778347015, 0.2591587007045746, 0.09655167162418365, 0.5307021141052246, -0.1955721527338028, 0.5012329816818237, -0.2664834260940552, 0.0900951474905014, -0.37116843461990356, -0.08473005145788193, 0.24145641922950745, 0.1819053292274475, 0.10902636498212814, 0.7016728520393372, -0.07079468667507172, -0.10233452916145325, 0.13782089948654175, -0.34805068373680115, -0.2748721241950989, -0.3863568902015686, -0.21761980652809143, -0.28740495443344116, -0.30495673418045044, 0.0784202292561531, 0.01937069743871689, 0.14828342199325562, 0.1055697575211525, -0.2478114813566208, -0.024337032809853554, 0.2542089819908142, 0.08448254317045212, 0.24958091974258423, 0.2639501094818115, 0.042075540870428085, 0.14406895637512207, 0.3921438753604889, 0.14434756338596344, 0.17326326668262482, 0.6597055196762085, 0.3909955620765686, -0.39356791973114014, 0.08987034857273102, -0.007959723472595215, 0.156019926071167, 0.6420348882675171, -0.2425253987312317, -0.05310371518135071, 0.39090290665626526, 0.16781675815582275, -0.17780804634094238, -0.051656611263751984, 0.06652244180440903, 0.06616434454917908, -0.34688323736190796, -0.21021506190299988, 0.07909134030342102, 0.032294221222400665, -0.09165996313095093, 0.36676865816116333, 0.6229569911956787, -0.20572194457054138, 0.06898976117372513, -0.0955297201871872, 1.139647364616394, -0.1466922014951706, 0.23914068937301636, 0.38609766960144043, -0.12207567691802979, 0.013002324849367142, -0.09859339892864227, -0.1571997106075287, -0.37436816096305847, -0.23995383083820343, -0.08019723743200302, -0.11489111185073853, 0.019073940813541412, -0.022261980921030045, 0.28409063816070557, 0.26559069752693176, -0.1631283015012741, -0.03622138127684593, 0.12215426564216614, 0.07288315892219543, -0.357228547334671, 0.007534109055995941, -0.06254690140485764, -0.05835302919149399, 0.09051918983459473, 0.3860712945461273, -0.19665853679180145, -0.13001973927021027, -0.3647979497909546, -0.13273309171199799, -0.42125385999679565, 0.12630274891853333, -0.09286756068468094, -0.25798410177230835, 0.17072390019893646, -0.0980546697974205, 0.2307276427745819, 0.3356034457683563, 0.0253441259264946, -0.05080856755375862, -0.4491865038871765, 0.18667817115783691, -0.34095242619514465, -0.1366184651851654, -0.14714321494102478, 0.16331562399864197, 0.3380788266658783, -0.02560127153992653, -0.17784853279590607, 0.02144385315477848, -0.08043521642684937, -0.17152023315429688, -0.44798940420150757, 0.29337960481643677, -0.02846187725663185, -0.32143664360046387, -0.22150959074497223, -0.17057918012142181, 0.18684205412864685, -0.01740802824497223, -0.025464631617069244, 0.14985984563827515, 0.1202554702758789, -0.31288403272628784, 0.4178408086299896, -0.2409820705652237, 0.021169766783714294, 0.3519382178783417, -0.27173948287963867, -0.15360113978385925, 0.4195597767829895, 0.11792632937431335, -0.011588461697101593, 0.03341902047395706, -0.04438577592372894, 0.4663116931915283, -0.5063306093215942, -0.15488183498382568, 0.0038047172129154205, 0.3015865683555603, -0.15899063646793365, 0.06742607057094574, 0.30373215675354004, -0.36136606335639954, 0.0542374923825264, -0.4350162744522095, -0.14073210954666138, 0.14513126015663147, -0.34741830825805664, -0.14886362850666046, -0.02518390119075775, -0.0852535292506218, 0.048102959990501404, -0.2709934115409851, -0.11573881655931473, -0.0526835136115551, -0.18176981806755066, -0.3375298082828522, 0.3540744185447693, 0.29888519644737244, -0.010235365480184555, -0.1863519251346588, -0.04028858244419098, -0.08579283952713013, -0.08139194548130035, 0.02716350555419922, -0.14678935706615448, 0.26823532581329346, 0.1655045449733734, -0.18805274367332458, -0.15396666526794434, -0.1620216965675354, 0.10240979492664337, -0.14252838492393494, 0.052763476967811584, 0.42854565382003784, 0.17868784070014954, -0.35161492228507996, 0.18233299255371094, 0.11326009035110474, -0.2917964458465576, 0.3376237154006958, 0.10099054127931595, 0.058654073625802994, -0.19048047065734863, -0.02872658520936966, -0.17637859284877777, -0.06112270429730415, 0.04927588999271393, 0.15361347794532776, 0.35097581148147583, 0.20143717527389526, 0.4143390655517578, -0.2086578905582428, 0.18843409419059753, 0.1587354987859726, 0.2254098504781723, -0.0101095512509346, -0.35418248176574707, 0.03861275315284729, 0.03880666196346283, -0.0008437382057309151, -0.046272605657577515, -0.018959736451506615, 0.20757636427879333, 0.00599091500043869, -0.3875967860221863, 0.20115730166435242, -0.07241177558898926, -0.20398962497711182, -0.04070063307881355, 0.002665013074874878, 0.29764384031295776, 0.2611002027988434, 0.03529137745499611, 0.0600472129881382, -0.20362746715545654, 0.17335397005081177, 0.3726538419723511, 0.09577114880084991, 0.04986834526062012, 0.578599750995636, -0.1206006407737732, -0.010237261652946472, -0.15371868014335632, 0.41174036264419556, -0.11120127141475677, -0.6744491457939148, -0.16028496623039246, -0.06777729094028473, 0.006245732307434082, -0.027120385318994522, -0.3159124553203583, 0.43122756481170654, -0.1610245704650879, -0.0770357996225357, -0.1634814739227295, 0.1919945776462555, -0.24825966358184814, 0.06510896980762482, 0.0549326092004776, -0.10609416663646698, -0.08333100378513336, -0.06137377396225929, -0.0888398289680481, -0.35838642716407776, -0.3407873213291168, 0.027356360107660294, -0.1257840245962143, -0.20554986596107483, 0.02799893170595169, 0.47020378708839417, 0.09576443582773209, -0.19492995738983154, 0.13669051229953766, -0.21577796339988708, 0.05020541697740555, 0.6254991292953491, 0.06624729931354523, 0.42522111535072327, 0.1925835907459259, 0.33615657687187195, 0.3729872405529022, -0.0654255747795105, 0.11469345539808273, 0.07157150655984879, 0.4438435435295105, 0.05896543711423874, 0.49355262517929077, 0.0033671781420707703, 0.023929603397846222, 0.0043916255235672, -0.10687066614627838, -0.05937155336141586, 0.21498730778694153, -0.4246204197406769, 0.2976710796356201, -0.6605889201164246, -0.21596765518188477, -0.26762500405311584, -0.14000388979911804, -0.1679351031780243, 0.11910390853881836, 0.11084859073162079, 0.2557086646556854, 0.10323883593082428, -0.42791903018951416, -0.05102428048849106, 0.0216340571641922, 0.09049122780561447, 0.42667388916015625, 0.1900387704372406, -0.06054572016000748, -0.46492892503738403, -0.7800241708755493, 0.4397481679916382, 0.21472489833831787, -0.08313161879777908, 0.24240204691886902, -0.18585467338562012, -0.27490293979644775, -0.35054588317871094, 0.27281561493873596, 0.2082362323999405, 0.10725157707929611, 0.21093201637268066, -0.0381469763815403, -0.13643614947795868, -0.1222509890794754, 0.22817151248455048, -0.2422848492860794, 0.10440437495708466, 0.43739718198776245, -0.2408425360918045, -0.17780016362667084, 0.19878390431404114, -0.09413136541843414, -0.04999978095293045, 0.021445253863930702, 0.497235506772995, -0.11889386177062988, 0.47626635432243347, 0.08632980287075043, 0.07953111827373505, -0.5750808715820312, -0.12149007618427277, -0.1393793374300003, 0.19032704830169678, -0.12334354221820831, 0.05804954469203949, -0.10346844792366028, -0.14014625549316406, -0.09872326254844666, 0.4877426326274872, 0.04634370654821396, 0.1145026907324791, -0.08060683310031891, 0.030182458460330963, -0.15615692734718323, 0.1284201294183731, 0.2125626802444458, -0.008181584998965263, -0.07934069633483887, 0.17083191871643066, -0.11536164581775665, -0.11339341104030609, 0.6758303642272949, -0.5638273358345032, -0.03773992508649826, 0.1365802139043808, 0.5133485198020935, 0.13574886322021484, -0.5497490167617798, -0.17500358819961548, -0.01635095477104187, 0.20384225249290466, 0.16531822085380554, 0.1484161913394928, 0.11030661314725876, -0.45772913098335266, 0.04629398137331009, -0.041478924453258514, 0.1393563449382782, 0.037735577672719955, -0.2948595881462097, 0.642999529838562, 0.08383485674858093 ]
https://github.com/huggingface/datasets/issues/6440
Tried to upgrade Python to 3.11 - still get this message. A partial solution is to NOT use `num_proc` at all. It will be considerably longer to finish the job.
`.map` not hashing under python 3.9
### Describe the bug The `.map` function cannot hash under python 3.9. Tried to use [the solution here](https://github.com/huggingface/datasets/issues/4521#issuecomment-1205166653), but still get the same message: `Parameter 'function'=<function map_to_pred at 0x7fa0b49ead30> 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.` ### Steps to reproduce the bug ```python def map_to_pred(batch): """ Perform inference on an audio batch Parameters: batch (dict): A dictionary containing audio data and other related information. Returns: dict: The input batch dictionary with added prediction and transcription fields. """ audio = batch['audio'] input_features = processor( audio['array'], sampling_rate=audio['sampling_rate'], return_tensors="pt").input_features input_features = input_features.to('cuda') with torch.no_grad(): predicted_ids = model.generate(input_features) preds = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0] batch['prediction'] = processor.tokenizer._normalize(preds) batch["transcription"] = processor.tokenizer._normalize(batch['transcription']) return batch MODEL_CARD = "openai/whisper-small" MODEL_NAME = MODEL_CARD.rsplit('/', maxsplit=1)[-1] model = WhisperForConditionalGeneration.from_pretrained(MODEL_CARD) processor = AutoProcessor.from_pretrained( MODEL_CARD, language="english", task="transcribe") model = torch.compile(model) dt = load_dataset("audiofolder", data_dir=config['DATA']['dataset'], split="test") dt = dt.cast_column("audio", Audio(sampling_rate=16000)) result = coraal_dt.map(map_to_pred, num_proc=16) ``` ### Expected behavior Hashed and cached dataset starts inferencing ### Environment info - `transformers` version: 4.35.0 - Platform: Linux-5.14.0-284.30.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.9.18 - Huggingface_hub version: 0.17.3 - Safetensors version: 0.4.0 - Accelerate version: 0.24.1 - Accelerate config: not found - PyTorch version (GPU?): 2.1.0 (True) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: yes - Using distributed or parallel set-up in script?: no
30
`.map` not hashing under python 3.9 ### Describe the bug The `.map` function cannot hash under python 3.9. Tried to use [the solution here](https://github.com/huggingface/datasets/issues/4521#issuecomment-1205166653), but still get the same message: `Parameter 'function'=<function map_to_pred at 0x7fa0b49ead30> 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.` ### Steps to reproduce the bug ```python def map_to_pred(batch): """ Perform inference on an audio batch Parameters: batch (dict): A dictionary containing audio data and other related information. Returns: dict: The input batch dictionary with added prediction and transcription fields. """ audio = batch['audio'] input_features = processor( audio['array'], sampling_rate=audio['sampling_rate'], return_tensors="pt").input_features input_features = input_features.to('cuda') with torch.no_grad(): predicted_ids = model.generate(input_features) preds = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0] batch['prediction'] = processor.tokenizer._normalize(preds) batch["transcription"] = processor.tokenizer._normalize(batch['transcription']) return batch MODEL_CARD = "openai/whisper-small" MODEL_NAME = MODEL_CARD.rsplit('/', maxsplit=1)[-1] model = WhisperForConditionalGeneration.from_pretrained(MODEL_CARD) processor = AutoProcessor.from_pretrained( MODEL_CARD, language="english", task="transcribe") model = torch.compile(model) dt = load_dataset("audiofolder", data_dir=config['DATA']['dataset'], split="test") dt = dt.cast_column("audio", Audio(sampling_rate=16000)) result = coraal_dt.map(map_to_pred, num_proc=16) ``` ### Expected behavior Hashed and cached dataset starts inferencing ### Environment info - `transformers` version: 4.35.0 - Platform: Linux-5.14.0-284.30.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.9.18 - Huggingface_hub version: 0.17.3 - Safetensors version: 0.4.0 - Accelerate version: 0.24.1 - Accelerate config: not found - PyTorch version (GPU?): 2.1.0 (True) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: yes - Using distributed or parallel set-up in script?: no Tried to upgrade Python to 3.11 - still get this message. A partial solution is to NOT use `num_proc` at all. It will be considerably longer to finish the job.
[ -0.23779386281967163, -0.5131184458732605, 0.039723578840494156, -0.02358236536383629, 0.3392046391963959, -0.013328582048416138, 0.28753432631492615, 0.25054922699928284, 0.08202031254768372, 0.08945101499557495, 0.005709212273359299, 0.4939461648464203, -0.38324224948883057, 0.06804049015045166, 0.006320834159851074, 0.06341567635536194, 0.280681312084198, -0.03469262644648552, 0.05651281028985977, -0.17844447493553162, -0.3854026198387146, 0.10449262708425522, -0.30220353603363037, 0.184768944978714, 0.036298856139183044, -0.17473211884498596, -0.0013072043657302856, -0.16289955377578735, -0.2185537964105606, -0.1724831759929657, 0.1444474309682846, -0.15313585102558136, 0.20234104990959167, 0.6602954268455505, -0.00011445350537542254, 0.06230589747428894, 0.2620527744293213, -0.21827411651611328, 0.02630506083369255, -0.3737856149673462, -0.5196268558502197, 0.10118259489536285, -0.13094297051429749, -0.09770630300045013, -0.00988827645778656, 0.06081780046224594, -0.14925041794776917, -0.33938905596733093, 0.41840946674346924, 0.1670101284980774, 0.16846516728401184, 0.2986592650413513, 0.201091930270195, 0.1894061267375946, 0.22041326761245728, 0.14669570326805115, -0.21592587232589722, 0.30945390462875366, 0.1664610058069229, -0.2240506410598755, 0.008276309818029404, 0.3457348346710205, -0.007853224873542786, -0.09392324090003967, 0.2902304530143738, 0.036509379744529724, 0.14229489862918854, -0.5928539633750916, -0.07146590948104858, 0.223149374127388, -0.14243656396865845, -0.30260169506073, -0.5795167684555054, 0.03677600622177124, -0.31894823908805847, -0.2944576144218445, 0.1964215487241745, 0.04080398380756378, -0.16432669758796692, -0.16132794320583344, -0.4512472152709961, 0.12315186858177185, 0.20301349461078644, 0.1819215714931488, 0.12321658432483673, 0.32739636301994324, -0.16571806371212006, 0.1287519931793213, 0.3978763222694397, -0.37640491127967834, -0.22150811553001404, -0.06488466262817383, 0.10648872703313828, 0.2808224558830261, -0.21135444939136505, -0.1459597647190094, -0.05842467024922371, -0.21896962821483612, 0.02062355726957321, -0.23755522072315216, 0.1711755394935608, 0.35734954476356506, -0.018072914332151413, 0.1569453328847885, 0.09948025643825531, 0.12637470662593842, 0.17249609529972076, 0.36947834491729736, 0.2733730375766754, 0.1826251596212387, 0.007670678198337555, -0.013947814702987671, 0.05874400958418846, -0.2488652467727661, 0.275432288646698, 0.2112227827310562, 0.2180955708026886, 0.004047892987728119, 0.1882900595664978, -0.12915654480457306, -0.351154625415802, -0.07120925933122635, 0.007522214204072952, 0.144098699092865, 0.2637850046157837, -0.12211453914642334, 0.23287972807884216, 0.3061830997467041, -0.10123449563980103, 0.39368659257888794, -0.08974400162696838, -0.19622981548309326, -0.298805296421051, 0.21908460557460785, -0.10286656022071838, -0.22163161635398865, 0.3987489640712738, -0.16196824610233307, 0.10470792651176453, 0.14485763013362885, -0.11886110156774521, 0.18429052829742432, 0.5930718779563904, 0.10903719812631607, -0.2153252214193344, 0.32711586356163025, -0.020266752690076828, 0.16875502467155457, -0.10764149576425552, 0.17813493311405182, -0.38182201981544495, -0.25825852155685425, 0.2377905547618866, 0.1084042340517044, -0.1556067317724228, 0.3187639117240906, -0.3853502869606018, 0.20195508003234863, 0.38212621212005615, -0.17385563254356384, 0.18361997604370117, -0.34350037574768066, -0.3462948203086853, -0.2897445559501648, 0.3964841961860657, 0.013370253145694733, 0.12379549443721771, -0.00927327573299408, -0.05033020302653313, 0.02607845515012741, 0.05504366382956505, 0.2454032003879547, -0.1939539611339569, -0.2023724913597107, -0.2860718071460724, 0.39339351654052734, 0.38585710525512695, -0.3384007215499878, -0.3549330532550812, -0.016016822308301926, 0.12817825376987457, 0.009297557175159454, -0.2593536376953125, -0.13969162106513977, 0.09941248595714569, -0.2653595507144928, 0.11725147813558578, 0.14299868047237396, 0.1134880930185318, 0.10907814651727676, -0.17031064629554749, -0.12950631976127625, -0.05433506891131401, -0.327219694852829, 0.04322902113199234, 0.0005080774426460266, -0.06216049566864967, -0.07654573768377304, 0.3525601029396057, -0.03704100102186203, 0.3255369961261749, 0.04623596370220184, 0.4874856173992157, -0.4256587624549866, -0.03800325468182564, -0.2148648500442505, -0.16715478897094727, 0.19443917274475098, -0.09444223344326019, 0.014928673394024372, -0.49644437432289124, 0.0168253555893898, 0.14366412162780762, 0.12474890053272247, -0.09427189826965332, -0.13068528473377228, 0.017534635961055756, -0.10316866636276245, 0.1753661334514618, -0.043604761362075806, -0.28049975633621216, -0.3713495135307312, 0.2630797326564789, -0.12220793962478638, -0.41726019978523254, -0.05427689105272293, -0.1133396252989769, -0.3400213122367859, -0.039065830409526825, 0.21078163385391235, 0.25768905878067017, -0.05519738420844078, -0.15674273669719696, 0.1660153567790985, -0.2061796337366104, -0.15192627906799316, -0.3954627215862274, 0.37045469880104065, 0.17452478408813477, -0.4306299388408661, 0.084513820707798, 0.1855340600013733, 0.2226998209953308, -0.0688806101679802, 0.1159820705652237, 0.4802662432193756, 0.46371617913246155, 0.09725164622068405, -0.07295135408639908, 0.09781048446893692, -0.025234919041395187, 0.04316188395023346, -0.17984619736671448, -0.2773074805736542, -0.3796331584453583, -0.06290791183710098, 0.37929773330688477, 0.16608726978302002, 0.2282434105873108, -0.1141531839966774, 0.6678705811500549, -0.07787123322486877, 0.15509742498397827, 0.0773986354470253, -0.4287210702896118, -0.13333147764205933, -0.05001797527074814, -0.18801110982894897, 0.08136235922574997, -0.029225874692201614, 0.2752549648284912, 0.19669120013713837, 0.008402090519666672, -0.015418168157339096, 0.07746856659650803, 0.19257065653800964, 0.24232354760169983, 0.06252646446228027, 0.026762302964925766, -0.031876567751169205, -0.06874246150255203, 0.13454966247081757, 0.04304928332567215, 0.1655557006597519, -0.5193729400634766, 0.043298304080963135, -0.1286899894475937, 0.31655997037887573, -0.0947817862033844, -0.5940592885017395, -0.3146190345287323, -0.3139339089393616, 0.07316069304943085, 0.1638057976961136, -0.2547348141670227, 0.46090933680534363, 0.3254794180393219, -0.1085951030254364, 0.19958019256591797, -0.27975085377693176, -0.3332517445087433, -0.20667779445648193, -0.0032851966097950935, -0.022923801094293594, 0.027572602033615112, -0.2709079682826996, -0.12942446768283844, 0.203354150056839, -0.13083873689174652, -0.4305635988712311, -0.20189215242862701, -0.14958174526691437, -0.2658526301383972, 0.35241544246673584, -0.07587559521198273, 0.06720681488513947, -0.10586640983819962, -0.25482815504074097, 0.311879962682724, -0.4330577254295349, -0.2717996835708618, 0.1165224015712738, -0.006991498172283173, -0.0935974270105362, -0.0971144288778305, -0.16401854157447815, -0.05399499088525772, -0.3968866765499115, 0.28476420044898987, -0.337350070476532, -0.020781490951776505, 0.24025753140449524, 0.3030340075492859, 0.05454755946993828, -0.21124227344989777, -0.14642705023288727, -0.09231122583150864, -0.46456143260002136, 0.5462819337844849, -0.09208876639604568, -0.17064793407917023, -0.017436183989048004, -0.11057551950216293, 0.17012053728103638, 0.42110103368759155, -0.13408291339874268, -0.27165335416793823, -0.06257329136133194, 0.17571447789669037, 0.35175320506095886, 0.13835689425468445, 0.13992555439472198, 0.092670738697052, -0.04902971535921097, -0.19132941961288452, -0.45893916487693787, 0.018764881417155266, 0.18292313814163208, 0.2790606617927551, 0.4337095320224762, 0.48626089096069336, -0.06088733673095703, 1.108398199081421, 0.39550480246543884, -0.5543603301048279, 0.28218400478363037, 0.06544218957424164, 0.060792986303567886, 0.07609748840332031, -0.269440621137619, -0.2231941670179367, -0.04063315689563751, 0.23709750175476074, -0.07015758752822876, 0.0038825199007987976, -0.1904715895652771, -0.1422659456729889, 0.023339971899986267, -0.4749276638031006, -0.43567341566085815, 0.15503165125846863, -0.24302247166633606, 0.1443631947040558, -0.019423164427280426, 0.2943645715713501, -0.17533539235591888, -0.12690892815589905, 0.3738851547241211, -0.0861312597990036, 0.33783039450645447, 0.059540603309869766, -0.129627525806427, -0.07287445664405823, -0.3088003396987915, 0.33992326259613037, 0.17045578360557556, 0.6840860247612, -0.06316053867340088, -0.37375324964523315, -0.2093505561351776, 0.08917990326881409, 0.5225725173950195, -0.44626808166503906, 0.1924377977848053, -0.08630433678627014, -0.30468446016311646, -0.23335164785385132, -0.10370846092700958, -0.09125972539186478, 0.17522820830345154, 0.09639135003089905, 0.5553178191184998, -0.0879516676068306, 0.013675909489393234, -0.09954723715782166, 0.012764468789100647, -0.04358966648578644, 0.07207004725933075, -0.39612147212028503, -0.28182080388069153, -0.1737578809261322, 0.07184571772813797, 0.2527652382850647, -0.09035781025886536, 0.20943239331245422, -0.14291821420192719, 0.15746203064918518, -0.05906817689538002, 0.04027681052684784, 0.15250813961029053, 0.2576189935207367, 0.34795626997947693, 0.17826460301876068, 0.0602508969604969, 0.04030468687415123, -0.1065610721707344, 0.4089035987854004, -0.07351041585206985, -0.5828574299812317, -0.1807052493095398, 0.143911212682724, 0.2843391001224518, 0.3193138837814331, -0.08848534524440765, -0.05996532738208771, 0.4474048614501953, 0.1496889293193817, -0.34669867157936096, -0.09121403098106384, 0.5245773196220398, 0.103804811835289, -0.41230708360671997, -0.18594098091125488, 0.4367809593677521, 0.3047803044319153, -0.1245688647031784, 0.47198590636253357, -0.25834402441978455, -0.23155458271503448, 0.5084346532821655, 0.13000909984111786, 0.8452106714248657, -0.34146156907081604, -0.019289830699563026, 0.05118299648165703, 0.24202938377857208, -0.16301006078720093, 0.18409857153892517, 0.10035836696624756, -0.2746606469154358, -0.2607083320617676, 0.05299936980009079, -0.162876158952713, -0.058623477816581726, 0.12304328382015228, -0.04326797276735306, 0.1317683905363083, 0.1521953046321869, 0.2739797830581665, 0.02073553204536438, -0.1533748209476471, 0.2380729466676712, -0.11164160072803497, -0.13389191031455994, 0.12060798704624176, 0.2885867953300476, 0.08577398955821991, 0.10872532427310944, -0.2001660019159317, -0.07093912363052368, -0.39541757106781006, -0.19803395867347717, 0.20747968554496765, -0.5334346294403076, 0.160703644156456, 0.09139277040958405, -0.19199098646640778, 0.09290052950382233, 0.2176092565059662, 0.059616681188344955, 0.10605080425739288, -0.26374703645706177, 0.06679655611515045, 0.5651825666427612, 0.20614337921142578, -0.05914486572146416, -0.1389196813106537, 0.3374885618686676, 0.09150497615337372, -0.09260243922472, 0.11881116032600403, -0.08988682925701141, -0.29445281624794006, -0.17259982228279114, 0.1075332760810852, -0.0670546293258667, -0.18413035571575165, 0.038064997643232346, -0.056161750108003616, -0.10223404318094254, -0.05670219659805298, 0.09106512367725372, 0.09046616405248642, -0.301270067691803, 0.386666864156723, 0.0393846295773983, -0.3584911823272705, 0.16174468398094177, 0.6495710611343384, -0.21438027918338776, 0.0043382421135902405, 0.26990771293640137, -0.00769873708486557, -0.2421865612268448, -0.05383830890059471, -0.2483314573764801, 0.09341597557067871, -0.24735628068447113, 0.21616414189338684, 0.11446759104728699, 0.041656896471977234, 0.011371713131666183, 0.24523036181926727, 0.10980413854122162, -0.23595499992370605, -0.02449069917201996, -0.1430637240409851, -0.27528682351112366, 0.332996129989624, -0.18486672639846802, 0.3765914738178253, -0.15535816550254822, -0.04556158185005188, 0.2169543206691742, 0.16398502886295319, -0.2958166301250458, 0.15371248126029968, 0.11930238455533981, 0.24768193066120148, -0.0233980230987072, 0.06608635187149048, 0.292524129152298, 0.04906212165951729, 0.04198696091771126, 0.13710255920886993, -0.4975772500038147, -0.10468031466007233, -0.015483882278203964, 0.09945802390575409, 0.09426026046276093, -0.19737733900547028, 0.05837753415107727, -0.1109694316983223, -0.042690638452768326, -0.29259181022644043, 0.20998984575271606, 0.36615848541259766, 0.02380218729376793, 0.3190716803073883, 0.19192302227020264, -0.15965454280376434, 0.12317223846912384, -0.035328399389982224, -0.19849632680416107, 0.0585494190454483, 0.03224914148449898, -0.03583092987537384, -0.06483349949121475, -0.09729603677988052, 0.0036215484142303467, -0.14414218068122864, -0.00152679905295372, 0.02767060697078705, 0.3766281306743622, -0.038210105150938034, -0.11674004793167114, 0.21441099047660828, 0.35664817690849304, 0.10558454692363739, -0.3537302017211914, -0.001050800085067749, 0.20760655403137207, 0.12308618426322937, -0.27215781807899475, 0.22132396697998047, 0.07151606678962708, 0.15899939835071564, 0.15212401747703552, 0.17786987125873566, -0.014747090637683868, -0.18881666660308838, 0.05344473570585251, -0.16576874256134033, 0.14189961552619934, -0.2859084904193878, 0.3127502202987671, 0.1563960760831833, -0.11787720769643784, 0.1820942759513855, 0.27234455943107605, -0.027757318690419197, 0.2205566167831421, 0.14887076616287231, -0.12751829624176025, 0.28340446949005127, -0.035350799560546875, 0.10307857394218445, -0.1512601375579834, -0.41140884160995483, 0.020999092608690262, 0.17503541707992554, -0.054236650466918945, 0.28983035683631897, 0.24815914034843445, 0.34425991773605347, -0.1829802691936493, -0.1501544713973999, 0.013343662023544312, 0.1893768310546875, -0.21786580979824066, -0.07786980271339417, 0.02644301950931549, -0.028633393347263336, -0.14757540822029114, 0.09359709173440933, -0.0674191415309906, 0.0065400684252381325, 0.8534342050552368, 0.2370428740978241, -0.04838791489601135, 0.29843854904174805, -0.44377413392066956, 0.16776776313781738, 0.43560025095939636, -0.20677876472473145, 0.20154398679733276, -0.09967216104269028, -0.07890070229768753, 0.10120251774787903, 0.3839412331581116, 0.46330708265304565, 0.23475907742977142, -0.1698371171951294, 0.5514411926269531, 0.12753286957740784, 0.04411790519952774, -0.013867788016796112, 0.39732420444488525, 0.2691926062107086, 0.20886319875717163, 0.13491815328598022, 0.14637281000614166, -0.07348465174436569, 0.06909462809562683, -0.12797315418720245, 0.5555222034454346, 0.05995417758822441, 0.24622240662574768, -0.2796153128147125, -0.05469805747270584, -0.15895923972129822, -0.1732272207736969, -0.25425463914871216, 0.09002894163131714, 0.3002876341342926, -0.12437114119529724, 0.195682555437088, -0.16247880458831787, 0.06698027998209, 0.1535780131816864, 0.35282137989997864, 0.4438917636871338, -0.028805550187826157, -0.2790789008140564, 0.08637389540672302, -0.4634920656681061, 0.09661003947257996, 0.10279980301856995, 0.30544978380203247, -0.20158220827579498, -0.05015517771244049, 0.2784346640110016, 0.14637158811092377, 0.012374360114336014, -0.3357667326927185, -0.2119895964860916, 0.25463423132896423, -0.269944429397583, -0.0001821252517402172, -0.3178732395172119, 0.1754363477230072, 0.3097172975540161, -0.21153441071510315, 0.08032239973545074, -0.17635956406593323, 0.06080767512321472, -0.2158716917037964, -0.18704646825790405, 0.020770467817783356, 0.3063024878501892, 0.7786957025527954, 0.06998874247074127, 0.12582170963287354, -0.19795823097229004, -0.10289567708969116, -0.19233816862106323, 0.0486011803150177, -0.0035034045577049255, 0.06941689550876617, -0.17427608370780945, 0.3102794885635376, -0.07760801911354065, -0.10070915520191193, -0.4742588996887207, -0.2693427801132202, -0.1944005787372589, -0.16726070642471313, -0.2037099003791809, 0.22683653235435486, -0.04215580224990845, -0.1998530775308609, 0.11640800535678864, 0.21795667707920074, -0.19635169208049774, 0.07356952875852585, -0.30285003781318665, -0.4657237231731415, 0.5503382682800293, -0.44856077432632446, -0.15518882870674133, -0.02269238792359829, 0.15235036611557007, -0.44550150632858276, -0.0431918129324913, -0.810687780380249, -0.038024552166461945, 0.19738146662712097, 0.025615353137254715, -0.26196736097335815, 0.052090469747781754, -0.19247323274612427, 0.03303027153015137, -0.19975429773330688, 0.5945772528648376, 0.12023242563009262, -0.16990560293197632, 0.06747546046972275, -0.17000049352645874 ]
https://github.com/huggingface/datasets/issues/6440
Hi! The `model = torch.compile(model)` line is problematic for our hashing logic. We would have to merge https://github.com/huggingface/datasets/pull/5867 to support hashing `torch.compile`-ed models/functions. I've started refactoring the hashing logic and plan to incorporate a fix for `torch.compile` as part of it, so this should be addressed soon (probably this or next week).
`.map` not hashing under python 3.9
### Describe the bug The `.map` function cannot hash under python 3.9. Tried to use [the solution here](https://github.com/huggingface/datasets/issues/4521#issuecomment-1205166653), but still get the same message: `Parameter 'function'=<function map_to_pred at 0x7fa0b49ead30> 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.` ### Steps to reproduce the bug ```python def map_to_pred(batch): """ Perform inference on an audio batch Parameters: batch (dict): A dictionary containing audio data and other related information. Returns: dict: The input batch dictionary with added prediction and transcription fields. """ audio = batch['audio'] input_features = processor( audio['array'], sampling_rate=audio['sampling_rate'], return_tensors="pt").input_features input_features = input_features.to('cuda') with torch.no_grad(): predicted_ids = model.generate(input_features) preds = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0] batch['prediction'] = processor.tokenizer._normalize(preds) batch["transcription"] = processor.tokenizer._normalize(batch['transcription']) return batch MODEL_CARD = "openai/whisper-small" MODEL_NAME = MODEL_CARD.rsplit('/', maxsplit=1)[-1] model = WhisperForConditionalGeneration.from_pretrained(MODEL_CARD) processor = AutoProcessor.from_pretrained( MODEL_CARD, language="english", task="transcribe") model = torch.compile(model) dt = load_dataset("audiofolder", data_dir=config['DATA']['dataset'], split="test") dt = dt.cast_column("audio", Audio(sampling_rate=16000)) result = coraal_dt.map(map_to_pred, num_proc=16) ``` ### Expected behavior Hashed and cached dataset starts inferencing ### Environment info - `transformers` version: 4.35.0 - Platform: Linux-5.14.0-284.30.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.9.18 - Huggingface_hub version: 0.17.3 - Safetensors version: 0.4.0 - Accelerate version: 0.24.1 - Accelerate config: not found - PyTorch version (GPU?): 2.1.0 (True) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: yes - Using distributed or parallel set-up in script?: no
52
`.map` not hashing under python 3.9 ### Describe the bug The `.map` function cannot hash under python 3.9. Tried to use [the solution here](https://github.com/huggingface/datasets/issues/4521#issuecomment-1205166653), but still get the same message: `Parameter 'function'=<function map_to_pred at 0x7fa0b49ead30> 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.` ### Steps to reproduce the bug ```python def map_to_pred(batch): """ Perform inference on an audio batch Parameters: batch (dict): A dictionary containing audio data and other related information. Returns: dict: The input batch dictionary with added prediction and transcription fields. """ audio = batch['audio'] input_features = processor( audio['array'], sampling_rate=audio['sampling_rate'], return_tensors="pt").input_features input_features = input_features.to('cuda') with torch.no_grad(): predicted_ids = model.generate(input_features) preds = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0] batch['prediction'] = processor.tokenizer._normalize(preds) batch["transcription"] = processor.tokenizer._normalize(batch['transcription']) return batch MODEL_CARD = "openai/whisper-small" MODEL_NAME = MODEL_CARD.rsplit('/', maxsplit=1)[-1] model = WhisperForConditionalGeneration.from_pretrained(MODEL_CARD) processor = AutoProcessor.from_pretrained( MODEL_CARD, language="english", task="transcribe") model = torch.compile(model) dt = load_dataset("audiofolder", data_dir=config['DATA']['dataset'], split="test") dt = dt.cast_column("audio", Audio(sampling_rate=16000)) result = coraal_dt.map(map_to_pred, num_proc=16) ``` ### Expected behavior Hashed and cached dataset starts inferencing ### Environment info - `transformers` version: 4.35.0 - Platform: Linux-5.14.0-284.30.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.9.18 - Huggingface_hub version: 0.17.3 - Safetensors version: 0.4.0 - Accelerate version: 0.24.1 - Accelerate config: not found - PyTorch version (GPU?): 2.1.0 (True) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: yes - Using distributed or parallel set-up in script?: no Hi! The `model = torch.compile(model)` line is problematic for our hashing logic. We would have to merge https://github.com/huggingface/datasets/pull/5867 to support hashing `torch.compile`-ed models/functions. I've started refactoring the hashing logic and plan to incorporate a fix for `torch.compile` as part of it, so this should be addressed soon (probably this or next week).
[ -0.23779386281967163, -0.5131184458732605, 0.039723578840494156, -0.02358236536383629, 0.3392046391963959, -0.013328582048416138, 0.28753432631492615, 0.25054922699928284, 0.08202031254768372, 0.08945101499557495, 0.005709212273359299, 0.4939461648464203, -0.38324224948883057, 0.06804049015045166, 0.006320834159851074, 0.06341567635536194, 0.280681312084198, -0.03469262644648552, 0.05651281028985977, -0.17844447493553162, -0.3854026198387146, 0.10449262708425522, -0.30220353603363037, 0.184768944978714, 0.036298856139183044, -0.17473211884498596, -0.0013072043657302856, -0.16289955377578735, -0.2185537964105606, -0.1724831759929657, 0.1444474309682846, -0.15313585102558136, 0.20234104990959167, 0.6602954268455505, -0.00011445350537542254, 0.06230589747428894, 0.2620527744293213, -0.21827411651611328, 0.02630506083369255, -0.3737856149673462, -0.5196268558502197, 0.10118259489536285, -0.13094297051429749, -0.09770630300045013, -0.00988827645778656, 0.06081780046224594, -0.14925041794776917, -0.33938905596733093, 0.41840946674346924, 0.1670101284980774, 0.16846516728401184, 0.2986592650413513, 0.201091930270195, 0.1894061267375946, 0.22041326761245728, 0.14669570326805115, -0.21592587232589722, 0.30945390462875366, 0.1664610058069229, -0.2240506410598755, 0.008276309818029404, 0.3457348346710205, -0.007853224873542786, -0.09392324090003967, 0.2902304530143738, 0.036509379744529724, 0.14229489862918854, -0.5928539633750916, -0.07146590948104858, 0.223149374127388, -0.14243656396865845, -0.30260169506073, -0.5795167684555054, 0.03677600622177124, -0.31894823908805847, -0.2944576144218445, 0.1964215487241745, 0.04080398380756378, -0.16432669758796692, -0.16132794320583344, -0.4512472152709961, 0.12315186858177185, 0.20301349461078644, 0.1819215714931488, 0.12321658432483673, 0.32739636301994324, -0.16571806371212006, 0.1287519931793213, 0.3978763222694397, -0.37640491127967834, -0.22150811553001404, -0.06488466262817383, 0.10648872703313828, 0.2808224558830261, -0.21135444939136505, -0.1459597647190094, -0.05842467024922371, -0.21896962821483612, 0.02062355726957321, -0.23755522072315216, 0.1711755394935608, 0.35734954476356506, -0.018072914332151413, 0.1569453328847885, 0.09948025643825531, 0.12637470662593842, 0.17249609529972076, 0.36947834491729736, 0.2733730375766754, 0.1826251596212387, 0.007670678198337555, -0.013947814702987671, 0.05874400958418846, -0.2488652467727661, 0.275432288646698, 0.2112227827310562, 0.2180955708026886, 0.004047892987728119, 0.1882900595664978, -0.12915654480457306, -0.351154625415802, -0.07120925933122635, 0.007522214204072952, 0.144098699092865, 0.2637850046157837, -0.12211453914642334, 0.23287972807884216, 0.3061830997467041, -0.10123449563980103, 0.39368659257888794, -0.08974400162696838, -0.19622981548309326, -0.298805296421051, 0.21908460557460785, -0.10286656022071838, -0.22163161635398865, 0.3987489640712738, -0.16196824610233307, 0.10470792651176453, 0.14485763013362885, -0.11886110156774521, 0.18429052829742432, 0.5930718779563904, 0.10903719812631607, -0.2153252214193344, 0.32711586356163025, -0.020266752690076828, 0.16875502467155457, -0.10764149576425552, 0.17813493311405182, -0.38182201981544495, -0.25825852155685425, 0.2377905547618866, 0.1084042340517044, -0.1556067317724228, 0.3187639117240906, -0.3853502869606018, 0.20195508003234863, 0.38212621212005615, -0.17385563254356384, 0.18361997604370117, -0.34350037574768066, -0.3462948203086853, -0.2897445559501648, 0.3964841961860657, 0.013370253145694733, 0.12379549443721771, -0.00927327573299408, -0.05033020302653313, 0.02607845515012741, 0.05504366382956505, 0.2454032003879547, -0.1939539611339569, -0.2023724913597107, -0.2860718071460724, 0.39339351654052734, 0.38585710525512695, -0.3384007215499878, -0.3549330532550812, -0.016016822308301926, 0.12817825376987457, 0.009297557175159454, -0.2593536376953125, -0.13969162106513977, 0.09941248595714569, -0.2653595507144928, 0.11725147813558578, 0.14299868047237396, 0.1134880930185318, 0.10907814651727676, -0.17031064629554749, -0.12950631976127625, -0.05433506891131401, -0.327219694852829, 0.04322902113199234, 0.0005080774426460266, -0.06216049566864967, -0.07654573768377304, 0.3525601029396057, -0.03704100102186203, 0.3255369961261749, 0.04623596370220184, 0.4874856173992157, -0.4256587624549866, -0.03800325468182564, -0.2148648500442505, -0.16715478897094727, 0.19443917274475098, -0.09444223344326019, 0.014928673394024372, -0.49644437432289124, 0.0168253555893898, 0.14366412162780762, 0.12474890053272247, -0.09427189826965332, -0.13068528473377228, 0.017534635961055756, -0.10316866636276245, 0.1753661334514618, -0.043604761362075806, -0.28049975633621216, -0.3713495135307312, 0.2630797326564789, -0.12220793962478638, -0.41726019978523254, -0.05427689105272293, -0.1133396252989769, -0.3400213122367859, -0.039065830409526825, 0.21078163385391235, 0.25768905878067017, -0.05519738420844078, -0.15674273669719696, 0.1660153567790985, -0.2061796337366104, -0.15192627906799316, -0.3954627215862274, 0.37045469880104065, 0.17452478408813477, -0.4306299388408661, 0.084513820707798, 0.1855340600013733, 0.2226998209953308, -0.0688806101679802, 0.1159820705652237, 0.4802662432193756, 0.46371617913246155, 0.09725164622068405, -0.07295135408639908, 0.09781048446893692, -0.025234919041395187, 0.04316188395023346, -0.17984619736671448, -0.2773074805736542, -0.3796331584453583, -0.06290791183710098, 0.37929773330688477, 0.16608726978302002, 0.2282434105873108, -0.1141531839966774, 0.6678705811500549, -0.07787123322486877, 0.15509742498397827, 0.0773986354470253, -0.4287210702896118, -0.13333147764205933, -0.05001797527074814, -0.18801110982894897, 0.08136235922574997, -0.029225874692201614, 0.2752549648284912, 0.19669120013713837, 0.008402090519666672, -0.015418168157339096, 0.07746856659650803, 0.19257065653800964, 0.24232354760169983, 0.06252646446228027, 0.026762302964925766, -0.031876567751169205, -0.06874246150255203, 0.13454966247081757, 0.04304928332567215, 0.1655557006597519, -0.5193729400634766, 0.043298304080963135, -0.1286899894475937, 0.31655997037887573, -0.0947817862033844, -0.5940592885017395, -0.3146190345287323, -0.3139339089393616, 0.07316069304943085, 0.1638057976961136, -0.2547348141670227, 0.46090933680534363, 0.3254794180393219, -0.1085951030254364, 0.19958019256591797, -0.27975085377693176, -0.3332517445087433, -0.20667779445648193, -0.0032851966097950935, -0.022923801094293594, 0.027572602033615112, -0.2709079682826996, -0.12942446768283844, 0.203354150056839, -0.13083873689174652, -0.4305635988712311, -0.20189215242862701, -0.14958174526691437, -0.2658526301383972, 0.35241544246673584, -0.07587559521198273, 0.06720681488513947, -0.10586640983819962, -0.25482815504074097, 0.311879962682724, -0.4330577254295349, -0.2717996835708618, 0.1165224015712738, -0.006991498172283173, -0.0935974270105362, -0.0971144288778305, -0.16401854157447815, -0.05399499088525772, -0.3968866765499115, 0.28476420044898987, -0.337350070476532, -0.020781490951776505, 0.24025753140449524, 0.3030340075492859, 0.05454755946993828, -0.21124227344989777, -0.14642705023288727, -0.09231122583150864, -0.46456143260002136, 0.5462819337844849, -0.09208876639604568, -0.17064793407917023, -0.017436183989048004, -0.11057551950216293, 0.17012053728103638, 0.42110103368759155, -0.13408291339874268, -0.27165335416793823, -0.06257329136133194, 0.17571447789669037, 0.35175320506095886, 0.13835689425468445, 0.13992555439472198, 0.092670738697052, -0.04902971535921097, -0.19132941961288452, -0.45893916487693787, 0.018764881417155266, 0.18292313814163208, 0.2790606617927551, 0.4337095320224762, 0.48626089096069336, -0.06088733673095703, 1.108398199081421, 0.39550480246543884, -0.5543603301048279, 0.28218400478363037, 0.06544218957424164, 0.060792986303567886, 0.07609748840332031, -0.269440621137619, -0.2231941670179367, -0.04063315689563751, 0.23709750175476074, -0.07015758752822876, 0.0038825199007987976, -0.1904715895652771, -0.1422659456729889, 0.023339971899986267, -0.4749276638031006, -0.43567341566085815, 0.15503165125846863, -0.24302247166633606, 0.1443631947040558, -0.019423164427280426, 0.2943645715713501, -0.17533539235591888, -0.12690892815589905, 0.3738851547241211, -0.0861312597990036, 0.33783039450645447, 0.059540603309869766, -0.129627525806427, -0.07287445664405823, -0.3088003396987915, 0.33992326259613037, 0.17045578360557556, 0.6840860247612, -0.06316053867340088, -0.37375324964523315, -0.2093505561351776, 0.08917990326881409, 0.5225725173950195, -0.44626808166503906, 0.1924377977848053, -0.08630433678627014, -0.30468446016311646, -0.23335164785385132, -0.10370846092700958, -0.09125972539186478, 0.17522820830345154, 0.09639135003089905, 0.5553178191184998, -0.0879516676068306, 0.013675909489393234, -0.09954723715782166, 0.012764468789100647, -0.04358966648578644, 0.07207004725933075, -0.39612147212028503, -0.28182080388069153, -0.1737578809261322, 0.07184571772813797, 0.2527652382850647, -0.09035781025886536, 0.20943239331245422, -0.14291821420192719, 0.15746203064918518, -0.05906817689538002, 0.04027681052684784, 0.15250813961029053, 0.2576189935207367, 0.34795626997947693, 0.17826460301876068, 0.0602508969604969, 0.04030468687415123, -0.1065610721707344, 0.4089035987854004, -0.07351041585206985, -0.5828574299812317, -0.1807052493095398, 0.143911212682724, 0.2843391001224518, 0.3193138837814331, -0.08848534524440765, -0.05996532738208771, 0.4474048614501953, 0.1496889293193817, -0.34669867157936096, -0.09121403098106384, 0.5245773196220398, 0.103804811835289, -0.41230708360671997, -0.18594098091125488, 0.4367809593677521, 0.3047803044319153, -0.1245688647031784, 0.47198590636253357, -0.25834402441978455, -0.23155458271503448, 0.5084346532821655, 0.13000909984111786, 0.8452106714248657, -0.34146156907081604, -0.019289830699563026, 0.05118299648165703, 0.24202938377857208, -0.16301006078720093, 0.18409857153892517, 0.10035836696624756, -0.2746606469154358, -0.2607083320617676, 0.05299936980009079, -0.162876158952713, -0.058623477816581726, 0.12304328382015228, -0.04326797276735306, 0.1317683905363083, 0.1521953046321869, 0.2739797830581665, 0.02073553204536438, -0.1533748209476471, 0.2380729466676712, -0.11164160072803497, -0.13389191031455994, 0.12060798704624176, 0.2885867953300476, 0.08577398955821991, 0.10872532427310944, -0.2001660019159317, -0.07093912363052368, -0.39541757106781006, -0.19803395867347717, 0.20747968554496765, -0.5334346294403076, 0.160703644156456, 0.09139277040958405, -0.19199098646640778, 0.09290052950382233, 0.2176092565059662, 0.059616681188344955, 0.10605080425739288, -0.26374703645706177, 0.06679655611515045, 0.5651825666427612, 0.20614337921142578, -0.05914486572146416, -0.1389196813106537, 0.3374885618686676, 0.09150497615337372, -0.09260243922472, 0.11881116032600403, -0.08988682925701141, -0.29445281624794006, -0.17259982228279114, 0.1075332760810852, -0.0670546293258667, -0.18413035571575165, 0.038064997643232346, -0.056161750108003616, -0.10223404318094254, -0.05670219659805298, 0.09106512367725372, 0.09046616405248642, -0.301270067691803, 0.386666864156723, 0.0393846295773983, -0.3584911823272705, 0.16174468398094177, 0.6495710611343384, -0.21438027918338776, 0.0043382421135902405, 0.26990771293640137, -0.00769873708486557, -0.2421865612268448, -0.05383830890059471, -0.2483314573764801, 0.09341597557067871, -0.24735628068447113, 0.21616414189338684, 0.11446759104728699, 0.041656896471977234, 0.011371713131666183, 0.24523036181926727, 0.10980413854122162, -0.23595499992370605, -0.02449069917201996, -0.1430637240409851, -0.27528682351112366, 0.332996129989624, -0.18486672639846802, 0.3765914738178253, -0.15535816550254822, -0.04556158185005188, 0.2169543206691742, 0.16398502886295319, -0.2958166301250458, 0.15371248126029968, 0.11930238455533981, 0.24768193066120148, -0.0233980230987072, 0.06608635187149048, 0.292524129152298, 0.04906212165951729, 0.04198696091771126, 0.13710255920886993, -0.4975772500038147, -0.10468031466007233, -0.015483882278203964, 0.09945802390575409, 0.09426026046276093, -0.19737733900547028, 0.05837753415107727, -0.1109694316983223, -0.042690638452768326, -0.29259181022644043, 0.20998984575271606, 0.36615848541259766, 0.02380218729376793, 0.3190716803073883, 0.19192302227020264, -0.15965454280376434, 0.12317223846912384, -0.035328399389982224, -0.19849632680416107, 0.0585494190454483, 0.03224914148449898, -0.03583092987537384, -0.06483349949121475, -0.09729603677988052, 0.0036215484142303467, -0.14414218068122864, -0.00152679905295372, 0.02767060697078705, 0.3766281306743622, -0.038210105150938034, -0.11674004793167114, 0.21441099047660828, 0.35664817690849304, 0.10558454692363739, -0.3537302017211914, -0.001050800085067749, 0.20760655403137207, 0.12308618426322937, -0.27215781807899475, 0.22132396697998047, 0.07151606678962708, 0.15899939835071564, 0.15212401747703552, 0.17786987125873566, -0.014747090637683868, -0.18881666660308838, 0.05344473570585251, -0.16576874256134033, 0.14189961552619934, -0.2859084904193878, 0.3127502202987671, 0.1563960760831833, -0.11787720769643784, 0.1820942759513855, 0.27234455943107605, -0.027757318690419197, 0.2205566167831421, 0.14887076616287231, -0.12751829624176025, 0.28340446949005127, -0.035350799560546875, 0.10307857394218445, -0.1512601375579834, -0.41140884160995483, 0.020999092608690262, 0.17503541707992554, -0.054236650466918945, 0.28983035683631897, 0.24815914034843445, 0.34425991773605347, -0.1829802691936493, -0.1501544713973999, 0.013343662023544312, 0.1893768310546875, -0.21786580979824066, -0.07786980271339417, 0.02644301950931549, -0.028633393347263336, -0.14757540822029114, 0.09359709173440933, -0.0674191415309906, 0.0065400684252381325, 0.8534342050552368, 0.2370428740978241, -0.04838791489601135, 0.29843854904174805, -0.44377413392066956, 0.16776776313781738, 0.43560025095939636, -0.20677876472473145, 0.20154398679733276, -0.09967216104269028, -0.07890070229768753, 0.10120251774787903, 0.3839412331581116, 0.46330708265304565, 0.23475907742977142, -0.1698371171951294, 0.5514411926269531, 0.12753286957740784, 0.04411790519952774, -0.013867788016796112, 0.39732420444488525, 0.2691926062107086, 0.20886319875717163, 0.13491815328598022, 0.14637281000614166, -0.07348465174436569, 0.06909462809562683, -0.12797315418720245, 0.5555222034454346, 0.05995417758822441, 0.24622240662574768, -0.2796153128147125, -0.05469805747270584, -0.15895923972129822, -0.1732272207736969, -0.25425463914871216, 0.09002894163131714, 0.3002876341342926, -0.12437114119529724, 0.195682555437088, -0.16247880458831787, 0.06698027998209, 0.1535780131816864, 0.35282137989997864, 0.4438917636871338, -0.028805550187826157, -0.2790789008140564, 0.08637389540672302, -0.4634920656681061, 0.09661003947257996, 0.10279980301856995, 0.30544978380203247, -0.20158220827579498, -0.05015517771244049, 0.2784346640110016, 0.14637158811092377, 0.012374360114336014, -0.3357667326927185, -0.2119895964860916, 0.25463423132896423, -0.269944429397583, -0.0001821252517402172, -0.3178732395172119, 0.1754363477230072, 0.3097172975540161, -0.21153441071510315, 0.08032239973545074, -0.17635956406593323, 0.06080767512321472, -0.2158716917037964, -0.18704646825790405, 0.020770467817783356, 0.3063024878501892, 0.7786957025527954, 0.06998874247074127, 0.12582170963287354, -0.19795823097229004, -0.10289567708969116, -0.19233816862106323, 0.0486011803150177, -0.0035034045577049255, 0.06941689550876617, -0.17427608370780945, 0.3102794885635376, -0.07760801911354065, -0.10070915520191193, -0.4742588996887207, -0.2693427801132202, -0.1944005787372589, -0.16726070642471313, -0.2037099003791809, 0.22683653235435486, -0.04215580224990845, -0.1998530775308609, 0.11640800535678864, 0.21795667707920074, -0.19635169208049774, 0.07356952875852585, -0.30285003781318665, -0.4657237231731415, 0.5503382682800293, -0.44856077432632446, -0.15518882870674133, -0.02269238792359829, 0.15235036611557007, -0.44550150632858276, -0.0431918129324913, -0.810687780380249, -0.038024552166461945, 0.19738146662712097, 0.025615353137254715, -0.26196736097335815, 0.052090469747781754, -0.19247323274612427, 0.03303027153015137, -0.19975429773330688, 0.5945772528648376, 0.12023242563009262, -0.16990560293197632, 0.06747546046972275, -0.17000049352645874 ]
https://github.com/huggingface/datasets/issues/6438
Thank you, @severo ! I would be more than happy to help in any way I can. I am not familiar with this repo's codebase, but I would be eager to contribute. :) For the preview in Datasets Hub, I think it makes sense to just display the geospatial column as text. If there were a dataset loader, though, I think it should be able to support the geospatial components. Geopandas is probably the most user-friendly interface for that. I'm not sure if it's currently relevant in the context of geoparquet, but I think the pyogrio driver is faster than fiona. But the whole gdal dependency thing can be a real pain. If anything, it would need to be an optional dependency. Maybe it would be best if the loader tries importing relevant geospatial libraries, and in the event of an ImportError, falls back to text for the geometry column. Please let me know if I can be of assistance, and thanks again for creating this Issue. :)
Support GeoParquet
### Feature request Support the GeoParquet format ### Motivation GeoParquet (https://geoparquet.org/) is a common format for sharing vectorial geospatial data on the cloud, along with "traditional" data columns. It would be nice to be able to load this format with datasets, and more generally, in the Datasets Hub (see https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial/discussions/1). ### Your contribution I would be happy to help work on a PR (but I don't think I can do one on my own). Also, we have to define what we want to support: - load all the columns, but get the "geospatial" column in text-only mode for now - or, fully support the spatial features, maybe taking inspiration from (or depending upon) https://geopandas.org/en/stable/index.html (which itself depends on https://fiona.readthedocs.io/en/stable/, which requires a local install of https://gdal.org/)
168
Support GeoParquet ### Feature request Support the GeoParquet format ### Motivation GeoParquet (https://geoparquet.org/) is a common format for sharing vectorial geospatial data on the cloud, along with "traditional" data columns. It would be nice to be able to load this format with datasets, and more generally, in the Datasets Hub (see https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial/discussions/1). ### Your contribution I would be happy to help work on a PR (but I don't think I can do one on my own). Also, we have to define what we want to support: - load all the columns, but get the "geospatial" column in text-only mode for now - or, fully support the spatial features, maybe taking inspiration from (or depending upon) https://geopandas.org/en/stable/index.html (which itself depends on https://fiona.readthedocs.io/en/stable/, which requires a local install of https://gdal.org/) Thank you, @severo ! I would be more than happy to help in any way I can. I am not familiar with this repo's codebase, but I would be eager to contribute. :) For the preview in Datasets Hub, I think it makes sense to just display the geospatial column as text. If there were a dataset loader, though, I think it should be able to support the geospatial components. Geopandas is probably the most user-friendly interface for that. I'm not sure if it's currently relevant in the context of geoparquet, but I think the pyogrio driver is faster than fiona. But the whole gdal dependency thing can be a real pain. If anything, it would need to be an optional dependency. Maybe it would be best if the loader tries importing relevant geospatial libraries, and in the event of an ImportError, falls back to text for the geometry column. Please let me know if I can be of assistance, and thanks again for creating this Issue. :)
[ -0.18842795491218567, -0.007291898131370544, -0.004543256014585495, 0.08613798022270203, 0.20921705663204193, -0.2451484054327011, 0.10604145377874374, 0.4123835861682892, 0.17052997648715973, 0.05875986069440842, -0.04821088910102844, 0.4327125549316406, -0.19047911465168, 0.6723259687423706, 0.1622457206249237, -0.6249135136604309, 0.27740851044654846, 0.3452201187610626, 0.1335105001926422, 0.3172168731689453, 0.01461847871541977, 0.13549327850341797, -0.19498765468597412, 0.27150508761405945, -0.200278177857399, -0.08174651861190796, -0.30312755703926086, 0.2856977581977844, -0.7165160775184631, -0.43705257773399353, 0.25595006346702576, 0.13123555481433868, 0.5269457697868347, -0.10147011280059814, -0.00011296766751911491, 0.005294546484947205, 0.14479926228523254, 0.07846968621015549, -0.1102304756641388, -0.19821961224079132, -0.10788901150226593, -0.3924674093723297, 0.22810828685760498, -0.2528366446495056, -0.35745176672935486, -0.18613873422145844, -0.24079658091068268, -0.09156549721956253, 0.16852790117263794, -0.08844471722841263, 0.08389715850353241, 0.030296392738819122, 0.023928910493850708, -0.1580277681350708, 0.13164308667182922, 0.11845920979976654, -0.603945255279541, -0.1526275873184204, 0.629137396812439, 0.0763755738735199, -0.003953367471694946, 0.15172545611858368, -0.1247834712266922, -0.023534931242465973, 0.07589957118034363, 0.04976570978760719, 0.10059100389480591, -0.08755296468734741, -0.14644481241703033, 0.15033255517482758, 0.735188901424408, -0.36255916953086853, -0.264764666557312, -0.1387869119644165, 0.26515689492225647, -0.09651369601488113, -0.0503917932510376, 0.29068756103515625, 0.17706766724586487, 0.29635512828826904, 0.04315052181482315, -0.4400748610496521, -0.3095337748527527, 0.005067259073257446, -0.03672952950000763, 0.5109571218490601, -0.19287189841270447, -0.014373641461133957, -0.07229730486869812, -0.08265528082847595, 0.24889522790908813, -0.19877929985523224, 0.09167805314064026, 0.11232073605060577, -0.20588438212871552, -0.29432111978530884, -0.30083727836608887, 0.31926995515823364, 0.22405782341957092, 0.25040432810783386, 0.027709513902664185, 0.1487109214067459, 0.2380870133638382, 0.21877026557922363, 0.49216753244400024, -0.2921600341796875, -0.01372959092259407, 0.505289614200592, 0.009758061729371548, 0.12220950424671173, 0.4774208068847656, -0.11264288425445557, -0.16766223311424255, 0.2704241871833801, -0.5443950891494751, -0.27377036213874817, 0.2973748445510864, -0.22916987538337708, 0.027569584548473358, 0.0664454847574234, 0.3804669976234436, 0.1950644850730896, 0.10446985065937042, -0.12073421478271484, -0.1215863972902298, 0.2872927188873291, -0.14610126614570618, 0.29135674238204956, 0.1252068132162094, -0.430068701505661, -0.15455085039138794, 0.1477992832660675, -0.1610247939825058, 0.17025046050548553, 0.07429134845733643, 0.16078241169452667, -0.13584113121032715, 0.17722062766551971, 0.22522138059139252, -0.008308656513690948, 0.014072738587856293, 0.019326388835906982, -0.3440782427787781, 0.030361799523234367, -0.1886892318725586, -0.164244145154953, 0.2896598279476166, -0.19707375764846802, -0.23667317628860474, 0.2567006051540375, -0.38002809882164, -0.3536340296268463, -0.4404573142528534, 0.0449385829269886, -0.2956894040107727, 0.055240847170352936, -0.3031100332736969, 0.3495860993862152, -0.4713505208492279, -0.1359439343214035, -0.05478261411190033, 0.15663117170333862, -0.11024093627929688, -0.19309647381305695, 0.4241902828216553, 0.2816055417060852, -0.34729132056236267, -0.1741604059934616, 0.05932541564106941, -0.07589775323867798, 0.2824127674102783, -0.013000814244151115, -0.05203840136528015, -0.19572477042675018, -0.007472239434719086, 0.13305680453777313, 0.5549411773681641, -0.2295880913734436, 0.12729497253894806, 0.19360609352588654, -0.07462358474731445, 0.122821144759655, -0.06843950599431992, -0.05245358496904373, 0.17019692063331604, -0.0903591513633728, -0.182061567902565, 0.5732918977737427, -0.16592884063720703, 0.14819683134555817, -0.3062174618244171, -0.43407586216926575, 0.20928318798542023, 0.6787866353988647, 0.04150917008519173, 0.03753338381648064, 0.017720356583595276, 0.09682832658290863, 0.014565291814506054, -0.1568170189857483, -0.046783968806266785, -0.18948252499103546, 0.2403784692287445, 0.15483899414539337, -0.21396209299564362, -0.2728126049041748, -0.5099746584892273, 0.2154666781425476, 0.15989255905151367, -0.035764213651418686, 0.23762498795986176, -0.05848132073879242, -0.30332016944885254, 0.08885113894939423, 0.03564442694187164, 0.0286608524620533, 0.11891794204711914, -0.0776950865983963, 0.2176922708749771, 0.0781705230474472, -0.2848915755748749, 0.3618170917034149, -0.34706911444664, 0.04384307190775871, -0.1803613156080246, 0.4516333341598511, -0.019192960113286972, -0.03825708478689194, 0.12986862659454346, 0.25484418869018555, 0.22032231092453003, -0.005105603486299515, 0.20786359906196594, 0.5095310807228088, 0.06714513897895813, 0.1992301493883133, 0.2523456811904907, 0.4390932321548462, 0.048934146761894226, 0.024262383580207825, 0.284965455532074, -0.6374912858009338, 0.005305275321006775, -0.010875150561332703, -0.33237358927726746, 0.4384083151817322, -0.0634944811463356, -0.05791250988841057, -0.16269010305404663, 0.10613961517810822, -0.04094388335943222, 0.06550569832324982, -0.3627580404281616, -0.06672201305627823, -0.2162964940071106, -0.0794093906879425, -0.03246588259935379, -0.27199387550354004, -0.46280187368392944, -0.17930811643600464, 0.21495535969734192, -0.024904128164052963, 0.21618394553661346, 0.05706401914358139, -0.07755042612552643, 0.06028968095779419, 0.11882682889699936, 0.041482508182525635, 0.2629278302192688, 0.18769420683383942, -0.10614460706710815, 0.0538148507475853, 0.06961503624916077, -0.04387512803077698, 0.1472296416759491, 0.062361642718315125, -0.07427200675010681, -0.008388536050915718, 0.10926186293363571, -0.06878438591957092, -0.04859640821814537, 0.09797032177448273, 0.10053608566522598, 0.14166828989982605, 0.03127726912498474, -0.24588292837142944, -0.12308501452207565, 0.11232688277959824, 0.137135311961174, 0.03938886523246765, 0.09768465161323547, -0.02175768092274666, 0.25930118560791016, -0.1152852326631546, 0.05699443072080612, 0.19889569282531738, -0.26615339517593384, 0.7580868005752563, -0.31904229521751404, -0.28761136531829834, -0.2583332061767578, -0.1343318521976471, 0.043251726776361465, 0.14395704865455627, 0.20701166987419128, 0.12097135186195374, 0.14984968304634094, 0.15930186212062836, 0.21230155229568481, -0.23611970245838165, -0.24015146493911743, 0.21490709483623505, -0.11445081979036331, 0.19831372797489166, 0.21987751126289368, 0.014802169054746628, -0.0542212538421154, 0.09027976542711258, 0.43082287907600403, -0.08765813708305359, 0.09942028671503067, 0.028166234493255615, -0.07436726987361908, -0.14482127130031586, 0.030875273048877716, 0.03631597012281418, -0.499370813369751, -0.4271990656852722, 0.11723553389310837, 0.18760789930820465, 0.07500453293323517, -0.5680192112922668, 0.11980311572551727, -0.15822747349739075, -0.013143282383680344, -0.10332456231117249, -0.08131638169288635, -0.47596150636672974, 0.22503770887851715, -0.13052451610565186, -0.10392434895038605, -0.13588875532150269, 0.33056914806365967, 0.048756830394268036, -0.026715101674199104, -0.28924989700317383, -0.30343836545944214, -0.043842192739248276, 0.028389573097229004, 0.05347175896167755, -0.14717218279838562, 0.368520587682724, 0.02472742646932602, 0.013556815683841705, 0.04612109065055847, -0.14573906362056732, -0.2298329621553421, 0.4969075918197632, -0.2807900011539459, 0.19043320417404175, -0.24478492140769958, 0.21258127689361572, 0.14514926075935364, 0.051646888256073, 0.0630803257226944, 0.23858967423439026, 0.18604229390621185, 0.2976614832878113, -0.18303504586219788, -0.048718616366386414, 0.24625959992408752, -0.11713001132011414, 0.14442160725593567, 0.3714131712913513, 0.13649597764015198, -0.4200897216796875, -0.3208068013191223, 0.13685005903244019, -0.09931053966283798, 0.07945714145898819, 0.05269639939069748, 0.3203401565551758, 0.3616339862346649, -0.24582354724407196, -0.34879791736602783, -0.11183048039674759, -0.08910194039344788, 0.1701047122478485, 0.22026939690113068, 0.25189125537872314, 0.10597555339336395, -0.22416789829730988, 0.3567623496055603, -0.05481681972742081, 0.16400358080863953, -0.05201667547225952, 0.021569449454545975, -0.2602178454399109, -0.1412479281425476, 0.2093486785888672, -0.12394076585769653, 0.1755363941192627, -0.5091216564178467, -0.17467626929283142, 0.0731862410902977, -0.039237942546606064, -0.25696420669555664, -0.13377608358860016, -0.1744232177734375, -0.19461166858673096, 0.09097862243652344, 0.81122887134552, -0.23174598813056946, -0.40660569071769714, 0.22123420238494873, -0.14116494357585907, 0.06486684083938599, 0.014002185314893723, -0.1155262142419815, 0.18970784544944763, -0.24261972308158875, 0.2719103991985321, 0.11197476834058762, 0.16717495024204254, 0.23076483607292175, -0.07861589640378952, -0.2585660219192505, 0.08401237428188324, -0.26931971311569214, 0.09255114197731018, 0.17559033632278442, -0.27533453702926636, -0.015369392931461334, 0.29838278889656067, 0.028386153280735016, -0.2328648567199707, 0.29936620593070984, 0.000031072646379470825, 0.01988542638719082, 0.4011819362640381, 0.04211445897817612, 0.34752359986305237, 0.30561089515686035, 0.20185236632823944, -0.05910429731011391, -0.4542035758495331, 0.13708704710006714, -0.62391197681427, -0.3043181300163269, 0.0926288515329361, -0.3013240098953247, -0.2923137843608856, -0.2958087921142578, 0.46401447057724, 0.16429764032363892, -0.18906019628047943, 0.051576271653175354, 0.5549062490463257, -0.037586700171232224, 0.2551387846469879, 0.21524889767169952, 1.0888574123382568, -0.24279507994651794, -0.12191015481948853, 0.06587285548448563, -0.4455655515193939, 0.5298433899879456, -0.5803027749061584, -0.004220213741064072, -0.3340275287628174, -0.3629555106163025, -0.19423146545886993, 0.0029292255640029907, 0.5904098749160767, 0.046214450150728226, -0.3484157919883728, 0.04242841154336929, 0.2456110715866089, 0.25026947259902954, 0.030118003487586975, 0.22383272647857666, 0.08833857625722885, -0.2471085488796234, -0.4081503748893738, 0.19290322065353394, -0.32870450615882874, -0.43054336309432983, 0.0912540927529335, -0.11048099398612976, -0.045565322041511536, 0.013760961592197418, -0.3481079936027527, 0.20563116669654846, 0.07588423788547516, -0.09858254343271255, 0.12662602961063385, -0.38868021965026855, 0.4392978250980377, 0.2372654229402542, 0.1558566391468048, 0.002991507761180401, -0.3351515829563141, 0.21799544990062714, -0.23025715351104736, -0.23034390807151794, -0.23050937056541443, 0.06332676112651825, -0.023869063705205917, -0.015005029737949371, -0.002051040530204773, -0.07954644411802292, 0.00003299489617347717, -0.26545438170433044, -0.47571736574172974, -0.024897590279579163, 0.7554498314857483, -0.29380425810813904, -0.3159787654876709, -0.13047108054161072, 0.19422075152397156, -0.20328369736671448, 0.11541882157325745, 0.01080915704369545, -0.10589160025119781, -0.01604035496711731, 0.3565349578857422, -0.043083131313323975, 0.023619085550308228, 0.09820466488599777, 0.008956847712397575, 0.007787644863128662, -0.15745404362678528, 0.2777491807937622, -0.15964388847351074, -0.15664586424827576, 0.015728801488876343, 0.31047844886779785, -0.07558394968509674, -0.29603949189186096, -0.05614500120282173, -0.15488770604133606, 0.18312697112560272, 0.0930931568145752, 0.07324288785457611, -0.30682653188705444, 0.13508029282093048, -0.3112906217575073, 0.23965656757354736, 0.11380502581596375, -0.13824963569641113, 0.3117145001888275, 0.24104982614517212, -0.171368807554245, -0.21741673350334167, 0.08350340276956558, -0.27930423617362976, 0.11994969844818115, -0.2148752361536026, 0.1970551311969757, 0.6748470067977905, -0.04556909203529358, -0.1126461774110794, -0.17366744577884674, 0.06556851416826248, 0.0768715888261795, -0.17012295126914978, -0.11282822489738464, -0.008255276829004288, 0.16541782021522522, 0.26672807335853577, 0.19904497265815735, -0.23587843775749207, 0.046420544385910034, -0.20472458004951477, -0.0954536646604538, 0.29607781767845154, -0.19852349162101746, -0.09341850876808167, -0.035210683941841125, -0.14030757546424866, 0.22732727229595184, -0.19270966947078705, 0.02203996106982231, 0.029101092368364334, 0.026067586615681648, 0.2104445844888687, 0.08622002601623535, 0.0262489914894104, -0.16781935095787048, 0.1114453375339508, 0.4282981753349304, 0.4553283154964447, 0.25487545132637024, 0.47535794973373413, -0.02429550141096115, 0.09264374524354935, 0.086053267121315, 0.36939823627471924, -0.1704750955104828, -0.029060835018754005, -0.23265965282917023, 0.33926281332969666, 0.1947888284921646, -0.15143132209777832, -0.46438413858413696, 0.2960484027862549, 0.07359474897384644, 0.06450681388378143, 0.4037591218948364, 0.47671014070510864, 0.32654696702957153, -0.35723239183425903, 0.1549493670463562, 0.6604043841362, -0.14397543668746948, 0.2048872411251068, 0.20815327763557434, -0.022326894104480743, -0.20265108346939087, -0.17397473752498627, 0.3397681713104248, -0.07557845115661621, 0.35633569955825806, -0.15656587481498718, 0.11633319407701492, 0.3350309431552887, 0.28137603402137756, 0.03278854116797447, -0.3441512882709503, 0.2135661244392395, 0.36695578694343567, 0.3655758202075958, -0.052736394107341766, -0.18276408314704895, -0.07099956274032593, 0.1415034681558609, -0.15312382578849792, -0.2519775629043579, 0.07284959405660629, 0.0657196193933487, 0.13971297442913055, -0.20716241002082825, -0.22290870547294617, -0.4750034511089325, 0.10359171032905579, -0.1406330168247223, 0.13865207135677338, 0.31154611706733704, -0.1446215808391571, 0.3644038438796997, -0.2797028720378876, 0.06756240129470825, 0.40747299790382385, 0.24797524511814117, -0.28666186332702637, 0.3378574252128601, -0.055715009570121765, -0.23688849806785583, -0.07550236582756042, 0.08697305619716644, 0.08361779153347015, 0.1960683912038803, -0.16948775947093964, -0.07055263221263885, -0.18805238604545593, -0.05564814805984497, 0.324715256690979, -0.007691266946494579, 0.05981181189417839, 0.08140389621257782, 0.23287053406238556, 0.13139906525611877, -0.022577902302145958, 0.10336122661828995, -0.10085231065750122, 0.01750340685248375, -0.38605037331581116, 0.20075401663780212, 0.3289535939693451, -0.19891957938671112, 0.14240384101867676, -0.03727154806256294, -0.26347094774246216, -0.39436620473861694, -0.21094606816768646, 0.11389847844839096, -0.02617523819208145, 0.17353121936321259, 0.06165609136223793, 0.35664039850234985, 0.2224353551864624, 0.12141576409339905, -0.3023584485054016, -0.2745635211467743, -0.46616607904434204, -0.034277863800525665, 0.03708034008741379, -0.10496625304222107, -0.2167455554008484, 0.3820874094963074, 0.05992259830236435, 0.38257285952568054, 0.5759215354919434, -0.43065863847732544, 0.5356377363204956, -0.05312727764248848, 0.036122869700193405, -0.27021700143814087, 0.302649587392807, 0.3101124167442322, -0.06944572180509567, -0.06638746708631516, -0.03500381484627724, -0.0067159999161958694, 0.29319897294044495, -0.0943177193403244, 0.00006128102540969849, -0.0027434825897216797, -0.1877938210964203, -0.44227224588394165, 0.31124982237815857, 0.05726775527000427, 0.0682697519659996, -0.1202731505036354, 0.026739344000816345, -0.1713852435350418, -0.12647445499897003, -0.209050253033638, 0.11636710166931152, -0.09669321775436401, 0.2653876841068268, -0.2850205600261688, -0.3127470016479492, -0.38912346959114075, -0.08254429697990417, -0.018905602395534515, 0.36237210035324097, -0.03231202811002731, 0.004783421754837036, 0.09214155375957489, -0.05109419301152229, -0.0703124850988388, -0.05425727739930153, 0.056090593338012695, 0.0529874712228775, -0.016195878386497498, -0.15600238740444183, 0.29317301511764526, 0.10845904052257538, -0.3190095126628876, 0.22553977370262146, -0.08756225556135178, 0.3581496477127075, 0.1753140389919281, -0.4859524965286255, 0.0093468576669693, 0.06325004249811172, 0.09769009053707123, 0.2299472540616989, 0.4000605642795563, 0.2361103594303131, -0.1668461710214615, -0.2346162348985672, -0.013071682304143906, 0.008978495374321938, 0.03153914213180542, -0.22717756032943726, -0.3114442527294159 ]
https://github.com/huggingface/datasets/issues/6438
Just hitting into this same issue too showing GeoParquet files in Datasets Viewer. I tried to implement a custom reader for GeoParquet in https://huggingface.co/datasets/weiji14/clay_vector_embeddings/discussions/1, but it seems like HuggingFace has disabled datasets with custom loading scripts from using the dataset viewer according to https://discuss.huggingface.co/t/dataset-repo-requires-arbitrary-python-code-execution/59346 :frowning_face: ![image](https://github.com/huggingface/datasets/assets/23487320/2f84d8ce-91c2-48cb-b72c-547ea8583892) I'm thinking now if there's a way to simply map files with GeoParquet extensions (*.gpq, *.geoparquet, etc) to use the Parquet reader. Maybe we could allowlist these geoparquet file extensions at https://github.com/huggingface/datasets/blame/0caf91285116ec910f409e82cc6e1f4cff7496e3/src/datasets/packaged_modules/__init__.py#L30-L51? Having the table columns show up would be a quick win. Longer term though, it would certainly be nice if the WKB geometry columns could be displayed in a nicer form. Geopandas' [read_parquet](https://geopandas.org/en/v0.14.1/docs/reference/api/geopandas.read_parquet.html) function is supposedly faster than `pyogrio.read_dataframe` according to https://github.com/geopandas/geopandas/discussions/2724#discussioncomment-4606048, but there's also [`pyogrio.raw.read_arrow`](https://pyogrio.readthedocs.io/en/latest/api.html#pyogrio.raw.read_arrow) now that can read into a `pyarrow.Table` directly.
Support GeoParquet
### Feature request Support the GeoParquet format ### Motivation GeoParquet (https://geoparquet.org/) is a common format for sharing vectorial geospatial data on the cloud, along with "traditional" data columns. It would be nice to be able to load this format with datasets, and more generally, in the Datasets Hub (see https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial/discussions/1). ### Your contribution I would be happy to help work on a PR (but I don't think I can do one on my own). Also, we have to define what we want to support: - load all the columns, but get the "geospatial" column in text-only mode for now - or, fully support the spatial features, maybe taking inspiration from (or depending upon) https://geopandas.org/en/stable/index.html (which itself depends on https://fiona.readthedocs.io/en/stable/, which requires a local install of https://gdal.org/)
132
Support GeoParquet ### Feature request Support the GeoParquet format ### Motivation GeoParquet (https://geoparquet.org/) is a common format for sharing vectorial geospatial data on the cloud, along with "traditional" data columns. It would be nice to be able to load this format with datasets, and more generally, in the Datasets Hub (see https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial/discussions/1). ### Your contribution I would be happy to help work on a PR (but I don't think I can do one on my own). Also, we have to define what we want to support: - load all the columns, but get the "geospatial" column in text-only mode for now - or, fully support the spatial features, maybe taking inspiration from (or depending upon) https://geopandas.org/en/stable/index.html (which itself depends on https://fiona.readthedocs.io/en/stable/, which requires a local install of https://gdal.org/) Just hitting into this same issue too showing GeoParquet files in Datasets Viewer. I tried to implement a custom reader for GeoParquet in https://huggingface.co/datasets/weiji14/clay_vector_embeddings/discussions/1, but it seems like HuggingFace has disabled datasets with custom loading scripts from using the dataset viewer according to https://discuss.huggingface.co/t/dataset-repo-requires-arbitrary-python-code-execution/59346 :frowning_face: ![image](https://github.com/huggingface/datasets/assets/23487320/2f84d8ce-91c2-48cb-b72c-547ea8583892) I'm thinking now if there's a way to simply map files with GeoParquet extensions (*.gpq, *.geoparquet, etc) to use the Parquet reader. Maybe we could allowlist these geoparquet file extensions at https://github.com/huggingface/datasets/blame/0caf91285116ec910f409e82cc6e1f4cff7496e3/src/datasets/packaged_modules/__init__.py#L30-L51? Having the table columns show up would be a quick win. Longer term though, it would certainly be nice if the WKB geometry columns could be displayed in a nicer form. Geopandas' [read_parquet](https://geopandas.org/en/v0.14.1/docs/reference/api/geopandas.read_parquet.html) function is supposedly faster than `pyogrio.read_dataframe` according to https://github.com/geopandas/geopandas/discussions/2724#discussioncomment-4606048, but there's also [`pyogrio.raw.read_arrow`](https://pyogrio.readthedocs.io/en/latest/api.html#pyogrio.raw.read_arrow) now that can read into a `pyarrow.Table` directly.
[ -0.131269171833992, -0.04446607828140259, 0.0009181350469589233, 0.1977737843990326, 0.22396178543567657, -0.0637836903333664, 0.05105629935860634, 0.25741830468177795, 0.1787053346633911, 0.09568889439105988, -0.19080108404159546, 0.42543378472328186, -0.35302814841270447, 0.6135354042053223, 0.22288841009140015, -0.4768867492675781, 0.15343867242336273, 0.22553333640098572, 0.23951780796051025, 0.2852039337158203, -0.030418317764997482, 0.22194012999534607, 0.022335246205329895, 0.19664375483989716, -0.18472902476787567, 0.01782296411693096, -0.0894770622253418, 0.23141655325889587, -0.5751273036003113, -0.48249298334121704, 0.16553030908107758, 0.11361680924892426, 0.4517425000667572, 0.1325927972793579, -0.00011564743181224912, 0.1734919250011444, 0.17794111371040344, 0.07596700638532639, -0.1394713968038559, -0.2891167402267456, -0.11158055067062378, -0.2744176983833313, 0.26693376898765564, -0.11722427606582642, -0.43824923038482666, -0.2291458547115326, -0.04315216839313507, -0.2762160897254944, 0.18737515807151794, 0.003338586539030075, 0.05989709496498108, 0.20499636232852936, 0.11450095474720001, -0.015235448256134987, 0.08737606555223465, 0.22008442878723145, -0.4650794565677643, 0.00005861744284629822, 0.7685363292694092, 0.2534095048904419, -0.20659980177879333, 0.08064496517181396, -0.038907214999198914, -0.0018006078898906708, 0.24029240012168884, 0.04108763113617897, -0.027124211192131042, -0.05738474801182747, -0.12625424563884735, 0.15524938702583313, 0.44490933418273926, -0.35543444752693176, -0.31292110681533813, -0.4738807678222656, 0.0955577865242958, -0.14384792745113373, -0.004273038357496262, 0.26587778329849243, 0.19398032128810883, 0.3461095988750458, -0.11069317162036896, -0.4542795419692993, -0.23351097106933594, -0.06718410551548004, -0.1125677227973938, 0.32946139574050903, -0.29029107093811035, -0.03379551321268082, 0.011766919866204262, -0.15637004375457764, 0.0017591044306755066, -0.13029518723487854, 0.08841844648122787, 0.09881269931793213, -0.14093540608882904, -0.1567021906375885, -0.19408093392848969, 0.38253170251846313, 0.2535070776939392, 0.28129544854164124, -0.05681280419230461, 0.21278710663318634, 0.03281427547335625, 0.24730807542800903, 0.4186202883720398, -0.23256710171699524, 0.015803124755620956, 0.4800230860710144, 0.01715686172246933, 0.2859015166759491, 0.3376437723636627, -0.09667804837226868, -0.06038598716259003, 0.052258796989917755, -0.6097160577774048, -0.40324723720550537, 0.27884578704833984, -0.13034558296203613, 0.09647964686155319, 0.030241433531045914, 0.3588468134403229, 0.14931416511535645, 0.29301249980926514, -0.08100417256355286, 0.08634206652641296, 0.11140364408493042, -0.31436464190483093, 0.2948754131793976, 0.08304242044687271, -0.39662596583366394, -0.1519549936056137, 0.053296320140361786, -0.08719338476657867, 0.07943588495254517, 0.229622945189476, -0.2747868597507477, -0.09317423403263092, 0.08555673062801361, 0.2825493812561035, 0.012184999883174896, -0.038846902549266815, 0.010399788618087769, -0.24088682234287262, 0.050268206745386124, -0.14554166793823242, -0.07458744198083878, 0.2613541781902313, -0.3194909691810608, -0.23771977424621582, 0.050811316817998886, -0.4474557936191559, -0.27968716621398926, -0.35053229331970215, 0.02151864767074585, -0.3103812634944916, 0.09528686106204987, -0.510380744934082, 0.2643020749092102, -0.5416075587272644, -0.34419524669647217, -0.10818158835172653, 0.07121545821428299, -0.08959397673606873, -0.08240260183811188, 0.5060602426528931, 0.31419283151626587, -0.21403339505195618, -0.22638806700706482, 0.05817841738462448, -0.042972929775714874, 0.10345150530338287, 0.141758531332016, -0.17606736719608307, -0.22616015374660492, -0.19555452466011047, 0.249405175447464, 0.4714926779270172, -0.3210141062736511, 0.07983236014842987, 0.1425980031490326, -0.10968732833862305, 0.2937109172344208, 0.040244460105895996, -0.2610054910182953, 0.18091988563537598, -0.10364574193954468, -0.14077159762382507, 0.23167648911476135, -0.03882405161857605, 0.10734260827302933, -0.24404065310955048, -0.4071427285671234, 0.20493148267269135, 0.5574474334716797, 0.09558610618114471, 0.028144631534814835, 0.16751527786254883, -0.1495141237974167, -0.03083111345767975, -0.3042474091053009, -0.011046158149838448, -0.11609926074743271, 0.0688101053237915, 0.3593731224536896, -0.14132092893123627, -0.2722967863082886, -0.6179810166358948, 0.3929365277290344, 0.015920788049697876, -0.12178444862365723, 0.002389878034591675, -0.13328944146633148, -0.17470338940620422, -0.05837177857756615, -0.1064172089099884, -0.0018463442102074623, 0.09292566776275635, -0.09018179774284363, 0.221066415309906, 0.23377223312854767, -0.34855785965919495, 0.23182062804698944, -0.1673358678817749, 0.19211727380752563, -0.45827963948249817, 0.3337603509426117, 0.08524666726589203, -0.0072206370532512665, 0.16577306389808655, 0.23411422967910767, 0.19041940569877625, -0.09848472476005554, 0.26537084579467773, 0.37420377135276794, 0.1418883353471756, 0.45127081871032715, 0.2134457528591156, 0.39367613196372986, 0.12236339598894119, -0.016146332025527954, 0.18543943762779236, -0.4628683030605316, 0.0015336759388446808, 0.03405151516199112, -0.44021159410476685, 0.3886926770210266, -0.06963816285133362, 0.022388238459825516, -0.018653415143489838, 0.05809161812067032, -0.04065033048391342, 0.1875561773777008, -0.4205292761325836, -0.15881671011447906, -0.10267038643360138, -0.01663905382156372, 0.21246415376663208, -0.1876126229763031, -0.43153175711631775, -0.31720131635665894, 0.11114619672298431, 0.06449739634990692, 0.05813371762633324, 0.12466107308864594, -0.1765531301498413, 0.17763009667396545, 0.22383253276348114, 0.033689022064208984, 0.05032466724514961, 0.22713394463062286, 0.06649641692638397, 0.10982543975114822, 0.06374317407608032, -0.12774844467639923, 0.06838954985141754, 0.22482779622077942, -0.21885743737220764, 0.0535779669880867, 0.13618874549865723, 0.039475951343774796, -0.19739490747451782, 0.13036024570465088, -0.0012646988034248352, -0.004507660865783691, -0.26103857159614563, -0.17772963643074036, -0.2831408381462097, 0.0786990076303482, 0.002188369631767273, 0.031750235706567764, -0.07338813692331314, 0.0004324913024902344, 0.13653330504894257, -0.021036013960838318, 0.03621993958950043, -0.009671790525317192, -0.279752641916275, 0.7445710897445679, -0.37789255380630493, -0.44331273436546326, -0.27619925141334534, -0.0658668726682663, 0.04415067657828331, 0.10530950874090195, 0.3343000113964081, 0.10405109822750092, 0.20838458836078644, 0.08202389627695084, 0.2823941111564636, -0.31675541400909424, -0.2891564667224884, 0.22290486097335815, -0.14463311433792114, 0.27927365899086, 0.27254462242126465, -0.056509535759687424, -0.14443282783031464, 0.07878503203392029, 0.36492082476615906, -0.013048805296421051, 0.20940956473350525, -0.0927320122718811, 0.04709906131029129, 0.009981457144021988, -0.13746851682662964, 0.08058132231235504, -0.3546493649482727, -0.3841172158718109, 0.39915773272514343, 0.34110164642333984, -0.030515968799591064, -0.3747902810573578, 0.01982070505619049, 0.14066004753112793, -0.11309592425823212, -0.13630837202072144, -0.03502846136689186, -0.44973742961883545, 0.4692327380180359, -0.24006938934326172, -0.0747867077589035, 0.036920905113220215, 0.2598872780799866, 0.15504659712314606, 0.06018110737204552, -0.2969263195991516, -0.2604341208934784, -0.05540785193443298, -0.045174192637205124, 0.10019055008888245, -0.08270944654941559, 0.3183653652667999, 0.01338832825422287, 0.18154028058052063, -0.00093841552734375, -0.1665073037147522, -0.08186826854944229, 0.4211544990539551, -0.4499146044254303, 0.20618467032909393, -0.10615353286266327, 0.18162021040916443, 0.2529865801334381, 0.09417235851287842, 0.12329348921775818, 0.3248412013053894, 0.06199468672275543, 0.4464060068130493, -0.1568387895822525, -0.07951746881008148, 0.16473546624183655, -0.14330071210861206, 0.09831249713897705, 0.40112805366516113, 0.2910735309123993, -0.03421202301979065, -0.3188346028327942, -0.039413489401340485, -0.028165407478809357, -0.1243552416563034, 0.019170528277754784, 0.3768001198768616, 0.34317222237586975, -0.1837005615234375, -0.1520944982767105, -0.11994533240795135, -0.14044493436813354, 0.1592835783958435, 0.376383513212204, 0.45772749185562134, 0.18166318535804749, -0.2496967911720276, 0.21760332584381104, -0.08522532880306244, 0.19162845611572266, 0.04855172708630562, -0.11200294643640518, -0.23394744098186493, -0.00443229079246521, 0.2154652625322342, -0.12651515007019043, 0.28288424015045166, -0.2926797866821289, -0.08804991096258163, -0.030618540942668915, -0.1247662603855133, -0.3056810200214386, -0.03115229681134224, -0.009250596165657043, -0.22547076642513275, -0.043882206082344055, 0.8114933371543884, -0.2286985069513321, -0.36279425024986267, 0.05026918277144432, -0.13821764290332794, 0.0686192512512207, 0.07458612322807312, -0.05276509374380112, 0.17656145989894867, -0.3289993405342102, 0.10516339540481567, 0.2322702407836914, 0.13577380776405334, 0.1783842295408249, -0.058369338512420654, -0.27320417761802673, -0.000520847737789154, 0.00647374615073204, 0.15005512535572052, 0.2548995614051819, -0.08487685769796371, -0.16886603832244873, 0.4876270890235901, 0.17163866758346558, -0.10729563981294632, 0.48743656277656555, 0.004604816436767578, -0.4076806902885437, 0.28626328706741333, 0.05156875401735306, 0.35005807876586914, 0.24777576327323914, 0.11133112013339996, -0.09627747535705566, -0.10697025805711746, 0.02808694913983345, -0.6392072439193726, -0.10910643637180328, 0.19868424534797668, -0.3647838234901428, -0.36446791887283325, -0.300022691488266, 0.5488874316215515, 0.17812125384807587, -0.1081797182559967, 0.0474262610077858, 0.7436263561248779, -0.20084205269813538, 0.09599344432353973, 0.09329338371753693, 0.8236160278320312, -0.23239555954933167, -0.03289784491062164, 0.21294227242469788, -0.487157940864563, 0.6245015859603882, -0.5207985043525696, 0.05234353616833687, -0.19112233817577362, -0.22153308987617493, -0.2508445978164673, -0.01431119441986084, 0.6832267045974731, 0.17321175336837769, -0.23468951880931854, 0.19437293708324432, 0.24626286327838898, 0.2802344262599945, 0.04440051317214966, 0.35401657223701477, 0.06388779729604721, -0.2795019745826721, -0.4065651595592499, 0.11141854524612427, -0.24012568593025208, -0.3724009692668915, 0.1390455961227417, -0.19621318578720093, -0.04877333715558052, -0.034460123628377914, -0.2560180425643921, 0.024865277111530304, -0.09619636833667755, -0.13391558825969696, 0.1691019982099533, -0.3426731824874878, 0.5986862182617188, 0.19119948148727417, 0.10477544367313385, 0.029507990926504135, -0.5181103944778442, 0.19529160857200623, -0.26771432161331177, -0.2335122674703598, -0.32530832290649414, 0.03679550811648369, -0.023572783917188644, 0.1452559530735016, 0.19333751499652863, -0.10385255515575409, -0.01810416951775551, -0.27519166469573975, -0.4439071714878082, 0.10036388784646988, 0.5421767234802246, -0.2657720148563385, -0.39232897758483887, -0.2960948944091797, 0.17774036526679993, -0.08651911467313766, 0.046419378370046616, -0.05866251513361931, 0.04471738636493683, -0.1783842146396637, 0.2542611062526703, -0.005342215299606323, -0.0021401545964181423, 0.18826192617416382, -0.2706371545791626, -0.11848542839288712, -0.00138807762414217, 0.28392475843429565, -0.2654339671134949, -0.03186459094285965, -0.0979238823056221, 0.29955944418907166, -0.2032010406255722, -0.1767011433839798, 0.10751040279865265, -0.08185231685638428, 0.1341242492198944, 0.021049795672297478, -0.0023610894568264484, -0.5111362934112549, 0.1575569361448288, -0.22749930620193481, 0.17944864928722382, 0.05076116323471069, -0.2374674677848816, 0.22443369030952454, 0.48797690868377686, -0.07013849914073944, -0.18028929829597473, -0.0501229465007782, -0.23283949494361877, 0.2996900975704193, 0.008374042809009552, 0.05781744420528412, 0.7022396326065063, 0.034307513386011124, -0.09069794416427612, -0.2092243880033493, -0.004722166806459427, 0.1286625862121582, -0.2532237470149994, -0.0456392876803875, -0.04120704531669617, 0.16969427466392517, 0.2045358419418335, 0.11543004214763641, -0.2895600199699402, 0.0659102201461792, -0.14207777380943298, -0.1910443902015686, 0.34690138697624207, -0.1209503635764122, -0.05756297707557678, -0.0653025209903717, 0.03651421517133713, 0.06408026814460754, -0.2132588028907776, 0.06144500523805618, 0.052995070815086365, 0.09515173733234406, 0.22366806864738464, -0.02398115023970604, -0.0897105485200882, -0.06206981837749481, 0.0408155582845211, 0.4868028163909912, 0.5228947997093201, 0.28422290086746216, 0.4988948702812195, -0.06639355421066284, 0.052728042006492615, 0.14199408888816833, 0.2778749167919159, -0.004873631522059441, -0.11661259084939957, -0.17574083805084229, 0.4163427948951721, 0.07349585741758347, 0.013028033077716827, -0.37113118171691895, 0.5627474784851074, 0.06897038966417313, 0.1408674418926239, 0.351571649312973, 0.5244767665863037, 0.2584807276725769, -0.33653753995895386, 0.170693039894104, 0.6750242114067078, -0.1387312263250351, 0.30860158801078796, 0.20815089344978333, 0.031107306480407715, -0.2135782539844513, -0.11810074001550674, 0.380873441696167, 0.04482720419764519, 0.18058086931705475, -0.26949185132980347, 0.10012584924697876, 0.19152243435382843, 0.280627965927124, 0.16462558507919312, -0.4695770740509033, -0.025612426921725273, 0.2594742774963379, 0.26746076345443726, 0.0937274694442749, -0.16889548301696777, 0.13737699389457703, 0.1085367500782013, -0.05482661351561546, -0.2607685625553131, 0.10346627235412598, 0.015078814700245857, 0.04840715229511261, 0.052065372467041016, -0.28109943866729736, -0.4145420789718628, 0.12720023095607758, -0.2196759283542633, 0.1361255645751953, 0.008330784738063812, -0.12695561349391937, 0.2835295498371124, -0.18671917915344238, 0.07231268286705017, 0.14126786589622498, 0.2803551256656647, -0.14871281385421753, 0.3492620885372162, -0.08334265649318695, -0.21245087683200836, 0.07229137420654297, 0.1759241223335266, 0.04659648984670639, -0.0020758742466568947, 0.039475586265325546, -0.143798828125, -0.2439713329076767, -0.018938418477773666, 0.1601017564535141, 0.016266342252492905, -0.0938989520072937, 0.023171037435531616, 0.3177531361579895, 0.11475297063589096, 0.03509276732802391, -0.09484457224607468, -0.21815389394760132, 0.1053016185760498, -0.5670081377029419, 0.13767670094966888, 0.13501262664794922, -0.12072163820266724, 0.12255161255598068, -0.18880410492420197, -0.37572965025901794, -0.216781347990036, -0.09043578803539276, 0.0640665590763092, -0.04287049546837807, 0.14781512320041656, 0.03539036214351654, 0.4789634048938751, 0.3119960129261017, 0.17748868465423584, -0.2220446765422821, -0.13384319841861725, -0.40842205286026, -0.37650179862976074, 0.04130278527736664, 0.02220989018678665, -0.16427397727966309, 0.35194912552833557, -0.04836108535528183, 0.26182979345321655, 0.43642228841781616, -0.48610684275627136, 0.39809057116508484, -0.07140098512172699, -0.038495466113090515, -0.02208498865365982, 0.1823892891407013, 0.2689615786075592, -0.12604160606861115, -0.04994212090969086, 0.17361263930797577, 0.16138368844985962, 0.15017803013324738, -0.11296004056930542, 0.1119614839553833, 0.2837789058685303, -0.3970169723033905, -0.4948155879974365, 0.26826250553131104, 0.12657901644706726, 0.023723997175693512, -0.147098571062088, 0.06895095109939575, -0.3137102425098419, 0.007576923817396164, -0.2501470148563385, 0.2377837896347046, -0.23206603527069092, 0.35070905089378357, -0.39970189332962036, -0.4936504364013672, -0.39347368478775024, -0.1112162172794342, 0.0012268200516700745, 0.3593558371067047, -0.06774485111236572, 0.07807791233062744, -0.10688469558954239, -0.0009477920830249786, -0.012504912912845612, 0.04691312089562416, 0.07690168172121048, -0.006667327135801315, 0.14241763949394226, -0.14651528000831604, 0.26914340257644653, -0.23730041086673737, -0.29240500926971436, 0.23578202724456787, -0.15285438299179077, 0.4440745413303375, 0.06403881311416626, -0.5407330989837646, 0.04358324408531189, 0.16936199367046356, 0.10791151225566864, 0.2904074788093567, 0.3198697566986084, 0.19449655711650848, -0.2561071217060089, -0.25265830755233765, -0.1164749339222908, 0.27155986428260803, 0.14111942052841187, -0.08017709106206894, -0.26403093338012695 ]
https://github.com/huggingface/datasets/issues/6438
Update: It looks like renaming the GeoParquet file to have a file extension of `*.parquet` works (see https://huggingface.co/datasets/weiji14/clay_vector_embeddings). HuggingFace's default parquet reader is able to read the GeoParquet file, though the geometry column is of an unknown type: ![image](https://github.com/huggingface/datasets/assets/23487320/9060c300-d595-4409-9ccb-5e0207396883) I've opened a quick PR at #6508 to allow files with a `*.geoparquet` or `*.gpq` extension to be read the default Parquet reader. Let's see how that goes :smile:
Support GeoParquet
### Feature request Support the GeoParquet format ### Motivation GeoParquet (https://geoparquet.org/) is a common format for sharing vectorial geospatial data on the cloud, along with "traditional" data columns. It would be nice to be able to load this format with datasets, and more generally, in the Datasets Hub (see https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial/discussions/1). ### Your contribution I would be happy to help work on a PR (but I don't think I can do one on my own). Also, we have to define what we want to support: - load all the columns, but get the "geospatial" column in text-only mode for now - or, fully support the spatial features, maybe taking inspiration from (or depending upon) https://geopandas.org/en/stable/index.html (which itself depends on https://fiona.readthedocs.io/en/stable/, which requires a local install of https://gdal.org/)
68
Support GeoParquet ### Feature request Support the GeoParquet format ### Motivation GeoParquet (https://geoparquet.org/) is a common format for sharing vectorial geospatial data on the cloud, along with "traditional" data columns. It would be nice to be able to load this format with datasets, and more generally, in the Datasets Hub (see https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial/discussions/1). ### Your contribution I would be happy to help work on a PR (but I don't think I can do one on my own). Also, we have to define what we want to support: - load all the columns, but get the "geospatial" column in text-only mode for now - or, fully support the spatial features, maybe taking inspiration from (or depending upon) https://geopandas.org/en/stable/index.html (which itself depends on https://fiona.readthedocs.io/en/stable/, which requires a local install of https://gdal.org/) Update: It looks like renaming the GeoParquet file to have a file extension of `*.parquet` works (see https://huggingface.co/datasets/weiji14/clay_vector_embeddings). HuggingFace's default parquet reader is able to read the GeoParquet file, though the geometry column is of an unknown type: ![image](https://github.com/huggingface/datasets/assets/23487320/9060c300-d595-4409-9ccb-5e0207396883) I've opened a quick PR at #6508 to allow files with a `*.geoparquet` or `*.gpq` extension to be read the default Parquet reader. Let's see how that goes :smile:
[ -0.1853790283203125, -0.15920162200927734, -0.017098691314458847, 0.17653638124465942, 0.25480347871780396, -0.14688898622989655, -0.037101730704307556, 0.3081713020801544, 0.15877442061901093, 0.08432714641094208, -0.02328629419207573, 0.36783090233802795, -0.24566690623760223, 0.6476993560791016, 0.28587454557418823, -0.6183727979660034, 0.22334277629852295, 0.25724732875823975, 0.2929183840751648, 0.30164483189582825, -0.002637520432472229, 0.22653964161872864, -0.08774373680353165, 0.23250682651996613, -0.16781732439994812, -0.06615146994590759, -0.2403160035610199, 0.24130645394325256, -0.6547325849533081, -0.4136216640472412, 0.22633576393127441, 0.08234420418739319, 0.48545074462890625, -0.005051989108324051, -0.00011043052654713392, 0.055014029145240784, 0.11553612351417542, 0.07574918866157532, -0.11625121533870697, -0.23981231451034546, -0.17191441357135773, -0.3640350103378296, 0.12069924175739288, -0.1543702334165573, -0.4235887825489044, -0.170998677611351, -0.14083856344223022, -0.17046265304088593, 0.12082836031913757, -0.08189773559570312, 0.12016880512237549, 0.15025632083415985, 0.1570906937122345, -0.10169300436973572, 0.03304125368595123, 0.06954056769609451, -0.5194196701049805, -0.050004731863737106, 0.6569132208824158, 0.2110562026500702, -0.04430357366800308, 0.07678912580013275, -0.09043173491954803, 0.040275558829307556, 0.22492054104804993, 0.0923655554652214, 0.10345140099525452, 0.08661256730556488, -0.1700500249862671, 0.1848718822002411, 0.538622260093689, -0.33767491579055786, -0.22982659935951233, -0.2649611830711365, 0.18365409970283508, -0.15546229481697083, -0.04482614994049072, 0.29822540283203125, 0.17446961998939514, 0.30563047528266907, -0.03730521351099014, -0.5152571797370911, -0.29415133595466614, 0.004286792129278183, -0.07758361101150513, 0.36029183864593506, -0.2957809567451477, -0.0903768390417099, -0.025916505604982376, -0.1598493754863739, -0.006756298243999481, -0.12612277269363403, 0.053616803139448166, 0.017848670482635498, -0.16068419814109802, -0.24658149480819702, -0.21470315754413605, 0.4377879202365875, 0.30632758140563965, 0.24740783870220184, 0.12629857659339905, 0.18324415385723114, 0.18949496746063232, 0.2885940372943878, 0.43413105607032776, -0.27994638681411743, -0.04605662822723389, 0.40413641929626465, 0.011263216845691204, 0.22056585550308228, 0.3575848937034607, -0.15961334109306335, -0.09990967065095901, 0.16628600656986237, -0.5692145228385925, -0.3349790871143341, 0.34015655517578125, -0.0919337347149849, 0.07408621162176132, 0.09655466675758362, 0.3473162055015564, 0.24227698147296906, 0.22283443808555603, -0.11825403571128845, 0.036259036511182785, 0.2558152377605438, -0.2866019904613495, 0.2588616609573364, 0.08997534960508347, -0.45720773935317993, -0.225713849067688, 0.10396533459424973, -0.14062300324440002, 0.08407118916511536, 0.10971014201641083, -0.11934034526348114, -0.13945332169532776, 0.08649744093418121, 0.2766570448875427, -0.02964741736650467, -0.06909094005823135, 0.07698994874954224, -0.21571838855743408, 0.04093477874994278, -0.21354401111602783, -0.20188555121421814, 0.22900402545928955, -0.24603836238384247, -0.2712615132331848, 0.09069263935089111, -0.45586609840393066, -0.3296107053756714, -0.42088693380355835, 0.0666787400841713, -0.17030207812786102, 0.051093898713588715, -0.3523986339569092, 0.37096142768859863, -0.5144572854042053, -0.29153990745544434, -0.04849890619516373, 0.1355050951242447, -0.12164179980754852, -0.18912886083126068, 0.4665689766407013, 0.25659143924713135, -0.26204395294189453, -0.14225724339485168, 0.16478285193443298, 0.02503599226474762, 0.1185317263007164, 0.05818093195557594, -0.08752696216106415, -0.24382351338863373, -0.05717071145772934, 0.27415597438812256, 0.4176527261734009, -0.2530629336833954, 0.14312860369682312, 0.11357066035270691, -0.057609766721725464, 0.08062197268009186, -0.06294481456279755, -0.18066269159317017, 0.13341572880744934, -0.014459080994129181, -0.015967566519975662, 0.45718660950660706, -0.17080093920230865, 0.11200065910816193, -0.3317880630493164, -0.4247296154499054, 0.15026435256004333, 0.5418816804885864, 0.044697195291519165, -0.0020692870020866394, 0.04181467369198799, 0.0007106177508831024, -0.03840947151184082, -0.23279181122779846, -0.04275544732809067, -0.11356258392333984, 0.25953221321105957, 0.24968113005161285, -0.16696666181087494, -0.36181142926216125, -0.5573151707649231, 0.23460131883621216, 0.17072123289108276, -0.1040349155664444, 0.1595127284526825, -0.07583694159984589, -0.22804392874240875, 0.029816463589668274, -0.06212187185883522, -0.013677820563316345, 0.13714323937892914, -0.08708328753709793, 0.18936321139335632, 0.10432731360197067, -0.36063921451568604, 0.3194746673107147, -0.21070513129234314, 0.14834719896316528, -0.3757288455963135, 0.4004027247428894, 0.007350269705057144, -0.04767850413918495, 0.11494073271751404, 0.28563544154167175, 0.20633138716220856, -0.005253106355667114, 0.2814415395259857, 0.5044361352920532, 0.002159576863050461, 0.3187657296657562, 0.2591932713985443, 0.45089274644851685, 0.10285905003547668, 0.03263336420059204, 0.16156408190727234, -0.5500692129135132, -0.008405838161706924, 0.04406553506851196, -0.3641578257083893, 0.444560706615448, -0.04588763415813446, -0.06880190223455429, -0.09786176681518555, 0.09725673496723175, -0.041901517659425735, 0.1376655101776123, -0.33116966485977173, -0.11305569112300873, -0.16129347681999207, 0.023209210485219955, 0.0931345671415329, -0.3135111629962921, -0.5023535490036011, -0.20369453728199005, 0.13355271518230438, 0.05547751486301422, 0.15350918471813202, 0.06240438297390938, -0.16184204816818237, 0.10182228684425354, 0.18423554301261902, 0.06354866921901703, 0.14982999861240387, 0.24253641068935394, -0.001045488752424717, 0.09493350982666016, -0.004077505320310593, -0.10944783687591553, 0.09385934472084045, 0.12398333102464676, -0.19275566935539246, 0.025335948914289474, 0.16650161147117615, -0.00032266974449157715, -0.21908996999263763, 0.1371239274740219, 0.01951756328344345, 0.04351118952035904, -0.09608888626098633, -0.14740240573883057, -0.189284086227417, 0.16230911016464233, 0.05237739160656929, 0.11149059981107712, 0.01068050041794777, -0.023121271282434464, 0.1936694234609604, -0.06928697228431702, 0.03926742076873779, 0.03772122412919998, -0.31733936071395874, 0.8259690999984741, -0.3767511546611786, -0.3930748403072357, -0.3264802098274231, -0.10462059825658798, 0.041982196271419525, 0.1379861831665039, 0.14739608764648438, 0.12833116948604584, 0.20247440040111542, 0.17791640758514404, 0.3536914587020874, -0.2816506028175354, -0.2670779824256897, 0.2413589507341385, -0.13442504405975342, 0.28763970732688904, 0.3077273666858673, 0.03581912815570831, -0.15356306731700897, 0.09159199893474579, 0.4542941749095917, -0.11410153657197952, 0.08091191947460175, 0.008648820221424103, -0.009750671684741974, -0.08221772313117981, -0.13591314852237701, 0.06814920902252197, -0.34938785433769226, -0.41633573174476624, 0.32758864760398865, 0.26108813285827637, -0.00031759217381477356, -0.5189400315284729, 0.051826272159814835, 0.04212047904729843, -0.1602873057126999, -0.11167144775390625, -0.12926781177520752, -0.4928017854690552, 0.32804837822914124, -0.1706417351961136, -0.03066457062959671, -0.09404972195625305, 0.2804548144340515, 0.09629981219768524, -0.00472298264503479, -0.17019754648208618, -0.33370867371559143, -0.07114135473966599, 0.13177752494812012, 0.09348659962415695, -0.04243273288011551, 0.39970338344573975, -0.015247384086251259, 0.040675804018974304, 0.011385522782802582, -0.2106376588344574, -0.10254371166229248, 0.6291365623474121, -0.3555731177330017, 0.170492023229599, -0.24832609295845032, 0.22073312103748322, 0.13264326751232147, 0.033741578459739685, 0.12633688747882843, 0.3231377601623535, 0.08694037050008774, 0.40740910172462463, -0.17141030728816986, -0.05252379924058914, 0.24096491932868958, -0.15019631385803223, 0.08282837271690369, 0.4066026210784912, 0.293257474899292, -0.09986232221126556, -0.32229673862457275, -0.00309869647026062, -0.09186603128910065, -0.045139625668525696, -0.031322114169597626, 0.3120723366737366, 0.3506634533405304, -0.1772787868976593, -0.2701895236968994, -0.16497769951820374, -0.09511537104845047, 0.1445910930633545, 0.25215643644332886, 0.28035640716552734, 0.18307393789291382, -0.18073824048042297, 0.2670503556728363, -0.13372217118740082, 0.2678121328353882, 0.004173707216978073, -0.034717459231615067, -0.2507198750972748, -0.048109591007232666, 0.18303018808364868, -0.1535852551460266, 0.21724596619606018, -0.4434899389743805, -0.15363959968090057, -0.023618202656507492, 0.017199434340000153, -0.19731172919273376, -0.05322762951254845, -0.1187986359000206, -0.34557878971099854, 0.035601336508989334, 0.8044598698616028, -0.2864416539669037, -0.3003266453742981, 0.06829989701509476, -0.15541952848434448, 0.10542260855436325, 0.12251023948192596, -0.14559346437454224, 0.12826448678970337, -0.204209566116333, 0.24766062200069427, 0.19725346565246582, 0.24788527190685272, 0.3385156989097595, 0.03841613233089447, -0.23656398057937622, 0.04263409972190857, -0.0649174153804779, 0.10043298453092575, 0.3208495080471039, -0.15312407910823822, -0.14992496371269226, 0.4158174991607666, 0.11798195540904999, -0.26709243655204773, 0.3434496819972992, -0.00027772318571805954, -0.19653049111366272, 0.3351735472679138, 0.03013017773628235, 0.40658047795295715, 0.2818525433540344, 0.16972756385803223, -0.013221349567174911, -0.2035260796546936, 0.048643141984939575, -0.6363182663917542, -0.2336866706609726, 0.09253958612680435, -0.2935299277305603, -0.2508831024169922, -0.193956196308136, 0.4219377636909485, 0.12091425061225891, -0.09696095436811447, 0.10287699103355408, 0.7283226847648621, -0.12731948494911194, 0.23802806437015533, 0.14748087525367737, 1.0202194452285767, -0.20971503853797913, -0.025510422885417938, 0.19539403915405273, -0.47455814480781555, 0.5899209380149841, -0.5809460878372192, 0.08420470356941223, -0.2305334508419037, -0.1892503798007965, -0.2185717225074768, -0.030064500868320465, 0.6474766731262207, 0.052943553775548935, -0.2764431834220886, 0.08103504031896591, 0.23612533509731293, 0.29299864172935486, -0.031868837773799896, 0.25632452964782715, 0.09112013131380081, -0.2611377239227295, -0.4629625678062439, 0.1782320886850357, -0.3174033761024475, -0.4520817697048187, 0.08122111856937408, -0.22354131937026978, -0.004155158996582031, -0.08427898585796356, -0.37452757358551025, 0.06281541287899017, 0.03857886791229248, -0.10653132200241089, 0.25029534101486206, -0.35970860719680786, 0.4018353223800659, 0.15681856870651245, 0.2765952944755554, -0.017193634063005447, -0.5194118022918701, 0.21285085380077362, -0.25144311785697937, -0.24251948297023773, -0.24981454014778137, -0.008734073489904404, 0.0031343232840299606, 0.06347303092479706, 0.14508864283561707, -0.09294193238019943, 0.034054506570100784, -0.2918386459350586, -0.5401264429092407, 0.0989149659872055, 0.5394493937492371, -0.2668505311012268, -0.328453928232193, -0.14473100006580353, 0.2501755356788635, -0.1944088637828827, 0.12208187580108643, -0.05070529505610466, -0.023365557193756104, -0.16413404047489166, 0.35436081886291504, -0.05648157745599747, -0.00012222537770867348, 0.07704982161521912, -0.15255531668663025, -0.1220107227563858, -0.1461862027645111, 0.2886102795600891, -0.2546895146369934, -0.09238698333501816, -0.011799462139606476, 0.311855286359787, -0.10865481197834015, -0.21502509713172913, 0.027137525379657745, -0.15780489146709442, 0.22938597202301025, 0.1407172977924347, 0.002407375955954194, -0.44874709844589233, 0.1854933202266693, -0.21431542932987213, 0.2381315529346466, 0.1150139719247818, -0.25082600116729736, 0.1997736692428589, 0.419548898935318, -0.01786593720316887, -0.1475135087966919, -0.0034737009555101395, -0.2971506714820862, 0.225422203540802, -0.14589977264404297, 0.10138210654258728, 0.558049201965332, -0.058726564049720764, -0.09673865139484406, -0.21580086648464203, 0.05651449039578438, 0.1268162876367569, -0.24882252514362335, -0.09536436200141907, -0.09495440870523453, 0.1419455111026764, 0.24188610911369324, 0.247867614030838, -0.29865017533302307, 0.07497459650039673, -0.2040814906358719, -0.11706393957138062, 0.26381003856658936, -0.16416777670383453, -0.07939913868904114, -0.09298234432935715, -0.07789592444896698, 0.22530445456504822, -0.13388784229755402, -0.04230117425322533, 0.09686466306447983, 0.024534545838832855, 0.23321175575256348, -0.03660242632031441, -0.11850562691688538, -0.11221683025360107, 0.045431774109601974, 0.5371549725532532, 0.5157423615455627, 0.24342471361160278, 0.5035780668258667, -0.023693375289440155, -0.022137351334095, 0.0015969052910804749, 0.31695517897605896, -0.0850788801908493, -0.06154397130012512, -0.14200757443904877, 0.2826176583766937, 0.16674774885177612, -0.08266580104827881, -0.37676766514778137, 0.3981931507587433, 0.08632233738899231, 0.1263236552476883, 0.31766411662101746, 0.4834969639778137, 0.3015720248222351, -0.4311712384223938, 0.22723132371902466, 0.6092652082443237, -0.28079238533973694, 0.17775410413742065, 0.09175668656826019, 0.03779775649309158, -0.16670872271060944, -0.09687258303165436, 0.4082050323486328, 0.013557922095060349, 0.2927481532096863, -0.1974443644285202, 0.0010302066802978516, 0.30810070037841797, 0.2525206506252289, 0.1116822212934494, -0.39734119176864624, 0.11565382778644562, 0.27349579334259033, 0.336720734834671, 0.029062442481517792, -0.15967780351638794, 0.13882222771644592, 0.08968854695558548, -0.10261552035808563, -0.3028518557548523, 0.012401843443512917, -0.057221125811338425, 0.047234293073415756, -0.11256232857704163, -0.22801977396011353, -0.3389621376991272, 0.09307865798473358, -0.13854503631591797, 0.21192052960395813, 0.20113708078861237, -0.19974923133850098, 0.3738554120063782, -0.31356456875801086, 0.08459660410881042, 0.2599329948425293, 0.2347351610660553, -0.20889022946357727, 0.36375370621681213, -0.12628206610679626, -0.3267199397087097, -0.05105666071176529, 0.10638413578271866, 0.032912254333496094, 0.010848801583051682, -0.05270279198884964, -0.05168697237968445, -0.27675601840019226, -0.05322448909282684, 0.19097529351711273, -0.004739854484796524, 0.08585424721240997, 0.1028977483510971, 0.25918442010879517, 0.1717040091753006, 0.02368265390396118, 0.05363377928733826, -0.15611231327056885, 0.10874690860509872, -0.4886649250984192, 0.12656638026237488, 0.19781328737735748, -0.15962502360343933, 0.13911384344100952, -0.11751598119735718, -0.33748647570610046, -0.2655811309814453, -0.13168886303901672, 0.1337159276008606, -0.02716602198779583, 0.11821077764034271, 0.07202073931694031, 0.4625188112258911, 0.2763279676437378, 0.17667141556739807, -0.2991901636123657, -0.2503055930137634, -0.4197271168231964, -0.23032891750335693, 0.08919081091880798, -0.020496781915426254, -0.11561267077922821, 0.34029659628868103, 0.10059171169996262, 0.4293292462825775, 0.43310660123825073, -0.5532771944999695, 0.502638041973114, -0.18442820012569427, -0.019368957728147507, -0.1437504142522812, 0.2390015870332718, 0.30263471603393555, -0.11090535670518875, 0.030023202300071716, 0.10687948763370514, 0.118357814848423, 0.24364835023880005, -0.06273532658815384, 0.05181324854493141, 0.163855642080307, -0.3291251063346863, -0.4406108558177948, 0.21510940790176392, 0.08644092828035355, -0.04634889215230942, -0.169386088848114, -0.004555374383926392, -0.28969621658325195, -0.043975524604320526, -0.23806068301200867, 0.13996005058288574, -0.22370706498622894, 0.2717568278312683, -0.34424272179603577, -0.32773905992507935, -0.3366060256958008, -0.07252711057662964, 0.0334320068359375, 0.3600834608078003, -0.03841238468885422, 0.10408210754394531, 0.024892598390579224, 0.023443493992090225, -0.05313633754849434, 0.0065256282687187195, 0.06004534289240837, 0.010847307741641998, 0.1066504418849945, -0.19652211666107178, 0.27191585302352905, -0.0635862797498703, -0.32008782029151917, 0.24609211087226868, -0.057225778698921204, 0.5270557999610901, 0.11930837482213974, -0.6023509502410889, -0.027701683342456818, 0.07751870900392532, 0.14291076362133026, 0.17228367924690247, 0.3608338236808777, 0.13823863863945007, -0.18303102254867554, -0.265534907579422, -0.018292468041181564, 0.15499886870384216, 0.033477120101451874, -0.1396314650774002, -0.22611981630325317 ]
https://github.com/huggingface/datasets/issues/6438
@joshuasundance-swca, @weiji14, If I'm understanding this correctly, the code below wouldn't be recommended to due to dependency headaches? If that's the case, what solution would there be to see the geometry features for .gpq files in huggingfaceHub? code for dataset_loader.py ``` import geopandas as gpd # ... (other imports remain the same) class ClayVectorEmbeddings(datasets.ArrowBasedBuilder): # ... (other parts of the class remain the same) def _info(self): # Read the GeoParquet file to get the schema for the 'geometry' feature gdf = gpd.read_file("path/to/your/geoparquet/file.gpq") # Replace with your file path geometry_schema = str(gdf.geometry.dtype) return datasets.DatasetInfo( # This is the description that will appear on the datasets page. description="Clay Vector Embeddings in GeoParquet format.", # This defines the different columns of the dataset and their types features=datasets.Features( { "source_url": datasets.Value(dtype="string"), "date": datasets.Value(dtype="date32"), "embeddings": datasets.Value("string"), "geometry": datasets.Value(dtype=geometry_schema), # Use the schema read by GeoPandas # ... (other features) } ), ) # ... (rest of the script remains the same) ```
Support GeoParquet
### Feature request Support the GeoParquet format ### Motivation GeoParquet (https://geoparquet.org/) is a common format for sharing vectorial geospatial data on the cloud, along with "traditional" data columns. It would be nice to be able to load this format with datasets, and more generally, in the Datasets Hub (see https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial/discussions/1). ### Your contribution I would be happy to help work on a PR (but I don't think I can do one on my own). Also, we have to define what we want to support: - load all the columns, but get the "geospatial" column in text-only mode for now - or, fully support the spatial features, maybe taking inspiration from (or depending upon) https://geopandas.org/en/stable/index.html (which itself depends on https://fiona.readthedocs.io/en/stable/, which requires a local install of https://gdal.org/)
157
Support GeoParquet ### Feature request Support the GeoParquet format ### Motivation GeoParquet (https://geoparquet.org/) is a common format for sharing vectorial geospatial data on the cloud, along with "traditional" data columns. It would be nice to be able to load this format with datasets, and more generally, in the Datasets Hub (see https://huggingface.co/datasets/joshuasundance/govgis_nov2023-slim-spatial/discussions/1). ### Your contribution I would be happy to help work on a PR (but I don't think I can do one on my own). Also, we have to define what we want to support: - load all the columns, but get the "geospatial" column in text-only mode for now - or, fully support the spatial features, maybe taking inspiration from (or depending upon) https://geopandas.org/en/stable/index.html (which itself depends on https://fiona.readthedocs.io/en/stable/, which requires a local install of https://gdal.org/) @joshuasundance-swca, @weiji14, If I'm understanding this correctly, the code below wouldn't be recommended to due to dependency headaches? If that's the case, what solution would there be to see the geometry features for .gpq files in huggingfaceHub? code for dataset_loader.py ``` import geopandas as gpd # ... (other imports remain the same) class ClayVectorEmbeddings(datasets.ArrowBasedBuilder): # ... (other parts of the class remain the same) def _info(self): # Read the GeoParquet file to get the schema for the 'geometry' feature gdf = gpd.read_file("path/to/your/geoparquet/file.gpq") # Replace with your file path geometry_schema = str(gdf.geometry.dtype) return datasets.DatasetInfo( # This is the description that will appear on the datasets page. description="Clay Vector Embeddings in GeoParquet format.", # This defines the different columns of the dataset and their types features=datasets.Features( { "source_url": datasets.Value(dtype="string"), "date": datasets.Value(dtype="date32"), "embeddings": datasets.Value("string"), "geometry": datasets.Value(dtype=geometry_schema), # Use the schema read by GeoPandas # ... (other features) } ), ) # ... (rest of the script remains the same) ```
[ -0.2090664505958557, -0.26573559641838074, 0.04979145526885986, 0.31051427125930786, 0.17626544833183289, -0.16471150517463684, 0.10059749335050583, 0.3131271004676819, 0.41674306988716125, 0.03970740735530853, -0.1878364086151123, 0.3662434220314026, -0.1826562136411667, 0.5925236940383911, 0.2926942706108093, -0.6205489039421082, 0.17187966406345367, 0.34805771708488464, 0.08611900359392166, 0.1780557632446289, -0.040301915258169174, 0.25568899512290955, -0.12426445633172989, 0.2986798584461212, -0.21180766820907593, -0.10743159800767899, -0.24635478854179382, 0.36532312631607056, -0.5456879138946533, -0.4105745255947113, 0.25986605882644653, 0.13107991218566895, 0.5367165803909302, 0.06967881321907043, -0.00011898703087354079, 0.07049621641635895, 0.07562316954135895, 0.059052303433418274, -0.07868488132953644, 0.0013446211814880371, -0.25117093324661255, -0.4823262095451355, 0.1749628484249115, -0.19708983600139618, -0.4761752486228943, -0.1285189688205719, -0.28356680274009705, -0.09499398618936539, 0.18255582451820374, -0.15871065855026245, 0.04393594339489937, 0.1918112337589264, 0.1886543333530426, 0.011130370199680328, 0.04620583727955818, -0.03124150261282921, -0.4858415424823761, 0.07378475368022919, 0.7295354008674622, 0.23139478266239166, -0.028560377657413483, 0.14303945004940033, -0.0990595892071724, 0.04764144867658615, 0.20747512578964233, 0.13182294368743896, 0.108433298766613, 0.07595200836658478, -0.18393319845199585, 0.16689810156822205, 0.4997923970222473, -0.4486457109451294, -0.366843044757843, -0.3805747926235199, 0.07029319554567337, -0.2099522352218628, -0.05781242623925209, 0.27280980348587036, 0.19430162012577057, 0.2981530725955963, -0.04579102620482445, -0.487040638923645, -0.3277692198753357, -0.07316122949123383, -0.0915396437048912, 0.40230461955070496, -0.2557126581668854, -0.007088504731655121, -0.15428569912910461, -0.08770641684532166, -0.03871477395296097, -0.13211572170257568, 0.12995678186416626, 0.12333092093467712, -0.20245127379894257, -0.2553674876689911, -0.11392208188772202, 0.4459001123905182, 0.36853915452957153, 0.34433814883232117, 0.026882346719503403, 0.24431797862052917, 0.11721386760473251, 0.31921541690826416, 0.40915387868881226, -0.10476332902908325, -0.058963850140571594, 0.34276458621025085, 0.17773182690143585, 0.3370068073272705, 0.27627047896385193, -0.10112938284873962, -0.12057968974113464, 0.07956334948539734, -0.4016365706920624, -0.2296648919582367, 0.4054820239543915, -0.18401136994361877, 0.08921707421541214, 0.005555436015129089, 0.3748341202735901, 0.17828036844730377, 0.19409501552581787, -0.0009302478283643723, 0.009959165006875992, 0.19520513713359833, -0.21388445794582367, 0.32585158944129944, 0.025809697806835175, -0.3443426787853241, -0.18772652745246887, 0.1275777667760849, -0.10929546505212784, 0.10195933282375336, 0.06408052146434784, -0.09910780191421509, -0.059064678847789764, 0.07348720729351044, 0.3379412591457367, 0.1130056232213974, -0.08031703531742096, 0.14796409010887146, -0.3232741057872772, 0.13258028030395508, -0.22170449793338776, -0.15100324153900146, 0.27450764179229736, -0.13260985910892487, -0.34884458780288696, 0.027426239103078842, -0.3712165057659149, -0.2842314839363098, -0.29715511202812195, -0.014332759194076061, -0.2056872695684433, 0.17746557295322418, -0.4280894100666046, 0.24423937499523163, -0.4393655061721802, -0.26014500856399536, -0.0071399882435798645, 0.07178782671689987, -0.08332805335521698, -0.2425883412361145, 0.504867672920227, 0.44436442852020264, -0.32584673166275024, -0.3507481515407562, 0.24243751168251038, 0.028203971683979034, 0.08147283643484116, 0.09742794930934906, -0.07434766739606857, 0.01523209922015667, -0.08793644607067108, 0.2329026460647583, 0.37585318088531494, -0.35836338996887207, 0.03185027837753296, 0.18274816870689392, 0.02361340820789337, 0.2725334167480469, -0.006916902959346771, -0.23338179290294647, 0.09792312979698181, 0.08024165034294128, 0.03579064458608627, 0.48272213339805603, -0.058807291090488434, 0.20472249388694763, -0.3022090196609497, -0.42457857728004456, 0.22359952330589294, 0.49164339900016785, 0.07501919567584991, 0.08181244134902954, -0.06929328292608261, -0.19759443402290344, 0.03420500457286835, -0.2909572124481201, -0.08460819721221924, -0.138014554977417, 0.1318710595369339, 0.12621071934700012, -0.08429104834794998, -0.341031938791275, -0.6933673620223999, 0.45904740691185, -0.025280892848968506, -0.004377620294690132, -0.053341906517744064, 0.02026430517435074, -0.24740682542324066, 0.03890714794397354, -0.18677161633968353, -0.12119436264038086, 0.05746745318174362, -0.047102369368076324, 0.3376808762550354, 0.1031695306301117, -0.39767688512802124, 0.36367347836494446, -0.05000089854001999, 0.25472551584243774, -0.48478570580482483, 0.48725616931915283, 0.04576367884874344, -0.07178425043821335, 0.13120225071907043, 0.3393546938896179, 0.23998518288135529, -0.07483930140733719, 0.26603057980537415, 0.37023282051086426, 0.02988274395465851, 0.28313159942626953, 0.27051427960395813, 0.4264231324195862, 0.1420910507440567, 0.016390331089496613, 0.32135581970214844, -0.42262786626815796, 0.0734369307756424, 0.03886020928621292, -0.19719167053699493, 0.6193587779998779, 0.15666356682777405, 0.10465776920318604, -0.07976770401000977, 0.04230714589357376, -0.05492366850376129, 0.14414040744304657, -0.3307620882987976, 0.017870374023914337, -0.19106142222881317, -0.0748196542263031, 0.21735244989395142, -0.3451470732688904, -0.46457958221435547, -0.03967951983213425, 0.19754727184772491, 0.06969472765922546, 0.1577025055885315, -0.04639230668544769, -0.17200982570648193, 0.1800367832183838, 0.3194182217121124, -0.15115463733673096, 0.17679864168167114, 0.16404637694358826, -0.02554687112569809, 0.18968437612056732, -0.04342754930257797, -0.003544669598340988, -0.016894474625587463, 0.07612131536006927, -0.25205788016319275, 0.015224846079945564, 0.09743395447731018, -0.008285297080874443, -0.1844513714313507, 0.15939736366271973, -0.09783935546875, 0.09955084323883057, -0.24057689309120178, -0.04321249946951866, -0.14476284384727478, 0.10288043320178986, 0.047851692885160446, 0.08744345605373383, -0.018341856077313423, -0.0184195376932621, 0.06206285580992699, -0.14405760169029236, 0.03913773596286774, 0.20404061675071716, -0.2053939700126648, 0.7159321904182434, -0.27059704065322876, -0.5245054960250854, -0.30821141600608826, 0.018904663622379303, 0.01811925321817398, 0.03149630129337311, 0.07722167670726776, 0.14918255805969238, 0.17996416985988617, 0.11822640895843506, 0.3295223116874695, -0.40976887941360474, -0.19377578794956207, 0.2924208641052246, -0.21232356131076813, 0.30050015449523926, 0.413524329662323, 0.05327853560447693, -0.029672745615243912, 0.11244212836027145, 0.4406989812850952, -0.18606048822402954, 0.08031458407640457, -0.06467122584581375, -0.06976327300071716, -0.030750354751944542, -0.056833650916814804, 0.10481074452400208, -0.36585283279418945, -0.4084474444389343, 0.3880296051502228, 0.2822025418281555, 0.11171293258666992, -0.5917866230010986, 0.01710689812898636, 0.12041543424129486, -0.020694898441433907, -0.003017459064722061, -0.049931589514017105, -0.5036970973014832, 0.284803181886673, -0.09926922619342804, 0.004059404134750366, -0.08264046162366867, 0.020027518272399902, 0.27649468183517456, 0.0070950426161289215, -0.10215229541063309, -0.32712993025779724, -0.14616522192955017, 0.19142311811447144, 0.1555919051170349, 0.07526592910289764, 0.4369555115699768, -0.12411151826381683, 0.15950629115104675, 0.015823595225811005, -0.2709735333919525, -0.13808974623680115, 0.5803506374359131, -0.319306343793869, 0.17529535293579102, -0.16620872914791107, -0.016758501529693604, 0.24219578504562378, -0.021006744354963303, 0.2795294225215912, 0.30189886689186096, 0.0791289284825325, 0.38968825340270996, -0.11636514961719513, -0.07964741438627243, 0.22193577885627747, -0.0923178642988205, -0.048678383231163025, 0.36314019560813904, 0.2602442502975464, -0.05165727064013481, -0.32201242446899414, -0.023040935397148132, -0.16487807035446167, -0.15170365571975708, 0.04220803827047348, 0.44173726439476013, 0.2673397660255432, -0.22665533423423767, -0.22563378512859344, -0.10861922800540924, 0.13825036585330963, 0.19240401685237885, 0.2983359694480896, 0.3538132309913635, 0.21629533171653748, -0.2448967546224594, 0.07213781774044037, -0.16409048438072205, 0.28427034616470337, -0.0268862247467041, -0.09971749782562256, -0.15711110830307007, -0.016898266971111298, 0.23148170113563538, -0.18242602050304413, 0.2446204572916031, -0.46039053797721863, -0.06421725451946259, 0.09610749036073685, -0.17946785688400269, -0.16402947902679443, -0.09215916693210602, -0.10984347760677338, -0.39057159423828125, -0.007429394870996475, 0.7796212434768677, -0.43104875087738037, -0.27830758690834045, 0.03669155389070511, -0.05928122252225876, -0.04361814260482788, 0.08157001435756683, -0.21658547222614288, 0.06181028485298157, -0.35627350211143494, 0.23053793609142303, 0.1935480684041977, 0.21801769733428955, 0.3489009737968445, 0.057470083236694336, -0.22574809193611145, 0.003937244415283203, -0.08740438520908356, 0.18707263469696045, 0.29611140489578247, -0.2665519118309021, -0.16501352190971375, 0.4284740686416626, 0.050982628017663956, -0.4459990859031677, 0.527584433555603, -0.06553088128566742, -0.29970067739486694, 0.27341577410697937, 0.14240051805973053, 0.4489479064941406, 0.37888768315315247, 0.09853304922580719, 0.06684676557779312, -0.27804428339004517, 0.13277305662631989, -0.5493561029434204, -0.1976526826620102, 0.11940006166696548, -0.22222790122032166, -0.28384363651275635, -0.3381268382072449, 0.49212464690208435, 0.058483242988586426, -0.04675249755382538, 0.12968119978904724, 0.7989675998687744, -0.09335047006607056, 0.23751544952392578, 0.03670338913798332, 1.0041182041168213, -0.19045773148536682, 0.045886337757110596, 0.3959289789199829, -0.49020150303840637, 0.5853442549705505, -0.4907512068748474, -0.031072868034243584, -0.3428953289985657, -0.05152545124292374, -0.20272062718868256, -0.027203097939491272, 0.6390795707702637, -0.001407216303050518, -0.2508179545402527, 0.28361019492149353, 0.06834988296031952, 0.22259995341300964, 0.02217942848801613, 0.11624769866466522, 0.09906062483787537, -0.44324713945388794, -0.5738611817359924, 0.07474621385335922, -0.38578706979751587, -0.26773887872695923, -0.014900162816047668, -0.2164587527513504, 0.016944289207458496, -0.056825749576091766, -0.3663966655731201, 0.07603812217712402, -0.028009289875626564, -0.16698777675628662, 0.33963677287101746, -0.43229275941848755, 0.29733288288116455, 0.07699808478355408, 0.23618051409721375, -0.051753848791122437, -0.41409629583358765, 0.15421634912490845, -0.2965361475944519, -0.1787305772304535, -0.24358049035072327, 0.03001370280981064, 0.13121864199638367, 0.06199657917022705, 0.074116051197052, -0.011906564235687256, -0.08391633629798889, -0.2774125933647156, -0.3915412724018097, 0.10837843269109726, 0.4404734671115875, -0.24563540518283844, -0.38066914677619934, -0.14664536714553833, 0.26721784472465515, -0.22212278842926025, 0.028170663863420486, 0.23173478245735168, -0.12542787194252014, -0.08141367137432098, 0.25804269313812256, -0.13263876736164093, -0.03089698776602745, 0.05988047271966934, -0.0848616436123848, -0.11276400834321976, -0.13265517354011536, 0.36159569025039673, -0.1843029260635376, -0.03974398970603943, -0.13874459266662598, 0.4503079056739807, -0.12224602699279785, -0.12089567631483078, 0.0857439935207367, -0.20273911952972412, 0.07986840605735779, 0.12529365718364716, -0.011899889446794987, -0.4643968343734741, 0.1915331482887268, -0.25675392150878906, 0.11370222270488739, 0.2471645474433899, -0.21204352378845215, 0.2153393030166626, 0.44298499822616577, 0.017142683267593384, -0.14768975973129272, -0.028826558962464333, -0.22055312991142273, 0.15457305312156677, -0.19088539481163025, 0.0016388501971960068, 0.4593259394168854, 0.0018611174309626222, -0.04499834030866623, -0.12824828922748566, -0.014803087338805199, 0.0674896389245987, -0.2737976014614105, -0.035090863704681396, -0.18060998618602753, 0.20582321286201477, 0.24812892079353333, 0.30057933926582336, -0.16890856623649597, 0.10312961786985397, -0.056879863142967224, -0.1550094187259674, 0.4845735430717468, -0.18545934557914734, 0.003264050930738449, 0.013607405126094818, -0.03301284462213516, 0.07559676468372345, -0.24443402886390686, 0.08685014396905899, 0.12141042947769165, -0.15045344829559326, 0.35860714316368103, -0.09717901051044464, -0.26920056343078613, -0.12783657014369965, 0.16085731983184814, 0.46333423256874084, 0.40749654173851013, 0.2932482361793518, 0.5779165029525757, -0.10293067991733551, 0.02128995954990387, -0.11490688472986221, 0.3284982442855835, -0.12935087084770203, -0.08881153166294098, -0.12410666048526764, 0.13268578052520752, 0.04850572720170021, -0.10900773108005524, -0.367638498544693, 0.3081072270870209, -0.10140726715326309, 0.15747350454330444, 0.44644492864608765, 0.3853253126144409, 0.3105357587337494, -0.36494749784469604, 0.15008918941020966, 0.5989713072776794, -0.20525501668453217, 0.04536009952425957, 0.20946571230888367, -0.06006188318133354, -0.05492570251226425, 0.028679097071290016, 0.5277880430221558, -0.017353370785713196, 0.1862044632434845, -0.22579368948936462, 0.0010656211525201797, 0.11609102785587311, 0.18297967314720154, 0.08967293053865433, -0.5067118406295776, -0.0317644327878952, 0.25779539346694946, 0.3871448040008545, -0.10050142556428909, -0.254722535610199, 0.1363208293914795, -0.0038202665746212006, -0.19687584042549133, -0.17795616388320923, 0.00979943573474884, -0.06782122701406479, 0.03711715340614319, 0.11150948703289032, -0.18413898348808289, -0.2606086730957031, 0.07960636168718338, -0.21778281033039093, 0.05101749673485756, 0.04365267977118492, -0.2850652039051056, 0.2702038884162903, -0.312932550907135, 0.01031309925019741, 0.24207906424999237, 0.13014113903045654, -0.10262493789196014, 0.372524231672287, -0.05262448638677597, -0.17946253716945648, -0.16592392325401306, 0.0325755774974823, 0.019806187599897385, -0.050015728920698166, -0.05822228267788887, -0.1299789845943451, -0.2635287344455719, 0.011187054216861725, 0.15687459707260132, -0.06444765627384186, -0.04400418698787689, 0.15510617196559906, 0.27047497034072876, 0.08084473013877869, 0.03052547201514244, 0.03499512001872063, -0.22720471024513245, 0.09962940961122513, -0.4477868974208832, 0.3341251611709595, 0.003933770582079887, -0.22386440634727478, 0.14293700456619263, -0.05023184046149254, -0.3843965530395508, -0.2584160268306732, -0.10911895334720612, 0.11449730396270752, -0.04053930938243866, 0.1409531831741333, 0.00499376654624939, 0.33845943212509155, 0.4057936668395996, 0.1558271050453186, -0.07342509925365448, -0.35083091259002686, -0.2922156751155853, -0.3280622363090515, 0.0683334618806839, -0.028478289023041725, -0.2765497863292694, 0.40439626574516296, 0.1496421843767166, 0.3994116187095642, 0.44283437728881836, -0.4378756284713745, 0.5588003993034363, -0.07637424767017365, -0.20423533022403717, -0.16769294440746307, 0.1643625944852829, 0.22102577984333038, -0.036722950637340546, 0.04724801331758499, 0.03441061079502106, 0.1516348123550415, 0.3358868360519409, -0.1800844669342041, 0.17240360379219055, 0.1730499416589737, -0.30060869455337524, -0.45622506737709045, 0.21629101037979126, 0.10516182333230972, 0.0716819316148758, -0.17042160034179688, 0.018897563219070435, -0.28439435362815857, -0.10604774206876755, -0.2646348178386688, 0.07523435354232788, -0.36296793818473816, 0.4075890779495239, -0.20528805255889893, -0.20616880059242249, -0.40324667096138, 0.07131440937519073, 0.15309111773967743, 0.1872083842754364, 0.06865239888429642, 0.15977080166339874, -0.001989692449569702, 0.053567126393318176, -0.0014635026454925537, -0.0014780410565435886, 0.032048553228378296, -0.05936026945710182, 0.032781943678855896, -0.15306928753852844, 0.4480777382850647, 0.07897001504898071, -0.38556647300720215, 0.24293658137321472, -0.02413024753332138, 0.4738615155220032, 0.051367372274398804, -0.6734485626220703, 0.0013598650693893433, 0.053513865917921066, 0.1491110920906067, 0.16019314527511597, 0.4220884442329407, 0.1223020926117897, -0.16406454145908356, -0.22436664998531342, 0.0372643768787384, 0.09778006374835968, 0.08689695596694946, -0.14270058274269104, -0.22694073617458344 ]
https://github.com/huggingface/datasets/issues/6437
`split_dataset_by_node` doesn't give the exact same number of examples to each node in the case of iterable datasets, though it tries to be as equal as possible. In particular if your dataset is sharded and you have a number of shards that is a factor of the number of workers, then the shards will be evenly distributed among workers. If the shards don't contain the same number of examples, then some workers might end up with more examples than others. However if you use a Dataset you'll end up with the same amount of data, because we know the length of the dataset we can split it exactly where we want. Also Dataset objects don't load the full dataset in memory; instead it memory maps Arrow files from disk.
Problem in training iterable dataset
### Describe the bug I am using PyTorch DDP (Distributed Data Parallel) to train my model. Since the data is too large to load into memory at once, I am using load_dataset to read the data as an iterable dataset. I have used datasets.distributed.split_dataset_by_node to distribute the dataset. However, I have noticed that this distribution results in different processes having different amounts of data to train on. As a result, when the earliest process finishes training and starts predicting on the test set, other processes are still training, causing the overall training speed to be very slow. ### Steps to reproduce the bug ``` def train(args, model, device, train_loader, optimizer, criterion, epoch, length): model.train() idx_length = 0 for batch_idx, data in enumerate(train_loader): s_time = time.time() X = data['X'] target = data['y'].reshape(-1, 28) X, target = X.to(device), target.to(device) optimizer.zero_grad() output = model(X) loss = criterion(output, target) loss.backward() optimizer.step() idx_length += 1 if batch_idx % args.log_interval == 0: # print('Train Epoch: {} Batch_idx: {} Process: {} [{}/{} ({:.0f}%)]\tLoss: {:.6f}'.format( # epoch, batch_idx, torch.distributed.get_rank(), batch_idx * len(X), length / torch.distributed.get_world_size(), # 100. * batch_idx * len( # X) * torch.distributed.get_world_size() / length, loss.item())) print('Train Epoch: {} Batch_idx: {} Process: {} [{}/{} ({:.0f}%)]\t'.format( epoch, batch_idx, torch.distributed.get_rank(), batch_idx * len(X), length / torch.distributed.get_world_size(), 100. * batch_idx * len( X) * torch.distributed.get_world_size() / length)) if args.dry_run: break print('Process %s length: %s time: %s' % (torch.distributed.get_rank(), idx_length, datetime.datetime.now())) train_iterable_dataset = load_dataset("parquet", data_files=data_files, split="train", streaming=True) test_iterable_dataset = load_dataset("parquet", data_files=data_files, split="test", streaming=True) train_iterable_dataset = train_iterable_dataset.map(process_fn) test_iterable_dataset = test_iterable_dataset.map(process_fn) train_iterable_dataset = train_iterable_dataset.map(scale) test_iterable_dataset = test_iterable_dataset.map(scale) train_iterable_dataset = datasets.distributed.split_dataset_by_node(train_iterable_dataset, world_size=world_size, rank=local_rank).shuffle(seed=1234) test_iterable_dataset = datasets.distributed.split_dataset_by_node(test_iterable_dataset, world_size=world_size, rank=local_rank).shuffle(seed=1234) print(torch.distributed.get_rank(), train_iterable_dataset.n_shards, test_iterable_dataset.n_shards) train_kwargs = {'batch_size': args.batch_size} test_kwargs = {'batch_size': args.test_batch_size} if use_cuda: cuda_kwargs = {'num_workers': 3,#ngpus_per_node, 'pin_memory': True, 'shuffle': False} train_kwargs.update(cuda_kwargs) test_kwargs.update(cuda_kwargs) train_loader = torch.utils.data.DataLoader(train_iterable_dataset, **train_kwargs, # sampler=torch.utils.data.distributed.DistributedSampler( # train_iterable_dataset, # num_replicas=ngpus_per_node, # rank=0) ) test_loader = torch.utils.data.DataLoader(test_iterable_dataset, **test_kwargs, # sampler=torch.utils.data.distributed.DistributedSampler( # test_iterable_dataset, # num_replicas=ngpus_per_node, # rank=0) ) for epoch in range(1, args.epochs + 1): start_time = time.time() train_iterable_dataset.set_epoch(epoch) test_iterable_dataset.set_epoch(epoch) train(args, model, device, train_loader, optimizer, criterion, epoch, train_len) test(args, model, device, criterion2, test_loader) ``` And here’s the part of output: ``` Train Epoch: 1 Batch_idx: 5000 Process: 0 [320000/4710975.0 (7%)] Train Epoch: 1 Batch_idx: 5000 Process: 1 [320000/4710975.0 (7%)] Train Epoch: 1 Batch_idx: 5000 Process: 2 [320000/4710975.0 (7%)] Train Epoch: 1 Batch_idx: 5862 Process: 3 Data_length: 12 coststime: 0.04095172882080078 Train Epoch: 1 Batch_idx: 5862 Process: 0 Data_length: 3 coststime: 0.0751960277557373 Train Epoch: 1 Batch_idx: 5867 Process: 3 Data_length: 49 coststime: 0.0032558441162109375 Train Epoch: 1 Batch_idx: 5872 Process: 1 Data_length: 2 coststime: 0.022842884063720703 Train Epoch: 1 Batch_idx: 5876 Process: 3 Data_length: 63 coststime: 0.002694845199584961 Process 3 length: 5877 time: 2023-11-17 17:03:26.582317 Train epoch 1 costTime: 241.72063446044922s . Process 3 Start to test. 3 0 tensor(45508.8516, device='cuda:3') 3 100 tensor(45309.0469, device='cuda:3') 3 200 tensor(45675.3047, device='cuda:3') 3 300 tensor(45263.0273, device='cuda:3') Process 3 Reduce metrics. Train Epoch: 2 Batch_idx: 0 Process: 3 [0/4710975.0 (0%)] Train Epoch: 1 Batch_idx: 5882 Process: 1 Data_length: 63 coststime: 0.05185818672180176 Train Epoch: 1 Batch_idx: 5887 Process: 1 Data_length: 12 coststime: 0.006895303726196289 Process 1 length: 5888 time: 2023-11-17 17:20:48.578204 Train epoch 1 costTime: 1285.7279663085938s . Process 1 Start to test. 1 0 tensor(45265.9141, device='cuda:1') ``` ### Expected behavior I'd like to know how to fix this problem. ### Environment info ``` torch==2.0 datasets==2.14.0 ```
129
Problem in training iterable dataset ### Describe the bug I am using PyTorch DDP (Distributed Data Parallel) to train my model. Since the data is too large to load into memory at once, I am using load_dataset to read the data as an iterable dataset. I have used datasets.distributed.split_dataset_by_node to distribute the dataset. However, I have noticed that this distribution results in different processes having different amounts of data to train on. As a result, when the earliest process finishes training and starts predicting on the test set, other processes are still training, causing the overall training speed to be very slow. ### Steps to reproduce the bug ``` def train(args, model, device, train_loader, optimizer, criterion, epoch, length): model.train() idx_length = 0 for batch_idx, data in enumerate(train_loader): s_time = time.time() X = data['X'] target = data['y'].reshape(-1, 28) X, target = X.to(device), target.to(device) optimizer.zero_grad() output = model(X) loss = criterion(output, target) loss.backward() optimizer.step() idx_length += 1 if batch_idx % args.log_interval == 0: # print('Train Epoch: {} Batch_idx: {} Process: {} [{}/{} ({:.0f}%)]\tLoss: {:.6f}'.format( # epoch, batch_idx, torch.distributed.get_rank(), batch_idx * len(X), length / torch.distributed.get_world_size(), # 100. * batch_idx * len( # X) * torch.distributed.get_world_size() / length, loss.item())) print('Train Epoch: {} Batch_idx: {} Process: {} [{}/{} ({:.0f}%)]\t'.format( epoch, batch_idx, torch.distributed.get_rank(), batch_idx * len(X), length / torch.distributed.get_world_size(), 100. * batch_idx * len( X) * torch.distributed.get_world_size() / length)) if args.dry_run: break print('Process %s length: %s time: %s' % (torch.distributed.get_rank(), idx_length, datetime.datetime.now())) train_iterable_dataset = load_dataset("parquet", data_files=data_files, split="train", streaming=True) test_iterable_dataset = load_dataset("parquet", data_files=data_files, split="test", streaming=True) train_iterable_dataset = train_iterable_dataset.map(process_fn) test_iterable_dataset = test_iterable_dataset.map(process_fn) train_iterable_dataset = train_iterable_dataset.map(scale) test_iterable_dataset = test_iterable_dataset.map(scale) train_iterable_dataset = datasets.distributed.split_dataset_by_node(train_iterable_dataset, world_size=world_size, rank=local_rank).shuffle(seed=1234) test_iterable_dataset = datasets.distributed.split_dataset_by_node(test_iterable_dataset, world_size=world_size, rank=local_rank).shuffle(seed=1234) print(torch.distributed.get_rank(), train_iterable_dataset.n_shards, test_iterable_dataset.n_shards) train_kwargs = {'batch_size': args.batch_size} test_kwargs = {'batch_size': args.test_batch_size} if use_cuda: cuda_kwargs = {'num_workers': 3,#ngpus_per_node, 'pin_memory': True, 'shuffle': False} train_kwargs.update(cuda_kwargs) test_kwargs.update(cuda_kwargs) train_loader = torch.utils.data.DataLoader(train_iterable_dataset, **train_kwargs, # sampler=torch.utils.data.distributed.DistributedSampler( # train_iterable_dataset, # num_replicas=ngpus_per_node, # rank=0) ) test_loader = torch.utils.data.DataLoader(test_iterable_dataset, **test_kwargs, # sampler=torch.utils.data.distributed.DistributedSampler( # test_iterable_dataset, # num_replicas=ngpus_per_node, # rank=0) ) for epoch in range(1, args.epochs + 1): start_time = time.time() train_iterable_dataset.set_epoch(epoch) test_iterable_dataset.set_epoch(epoch) train(args, model, device, train_loader, optimizer, criterion, epoch, train_len) test(args, model, device, criterion2, test_loader) ``` And here’s the part of output: ``` Train Epoch: 1 Batch_idx: 5000 Process: 0 [320000/4710975.0 (7%)] Train Epoch: 1 Batch_idx: 5000 Process: 1 [320000/4710975.0 (7%)] Train Epoch: 1 Batch_idx: 5000 Process: 2 [320000/4710975.0 (7%)] Train Epoch: 1 Batch_idx: 5862 Process: 3 Data_length: 12 coststime: 0.04095172882080078 Train Epoch: 1 Batch_idx: 5862 Process: 0 Data_length: 3 coststime: 0.0751960277557373 Train Epoch: 1 Batch_idx: 5867 Process: 3 Data_length: 49 coststime: 0.0032558441162109375 Train Epoch: 1 Batch_idx: 5872 Process: 1 Data_length: 2 coststime: 0.022842884063720703 Train Epoch: 1 Batch_idx: 5876 Process: 3 Data_length: 63 coststime: 0.002694845199584961 Process 3 length: 5877 time: 2023-11-17 17:03:26.582317 Train epoch 1 costTime: 241.72063446044922s . Process 3 Start to test. 3 0 tensor(45508.8516, device='cuda:3') 3 100 tensor(45309.0469, device='cuda:3') 3 200 tensor(45675.3047, device='cuda:3') 3 300 tensor(45263.0273, device='cuda:3') Process 3 Reduce metrics. Train Epoch: 2 Batch_idx: 0 Process: 3 [0/4710975.0 (0%)] Train Epoch: 1 Batch_idx: 5882 Process: 1 Data_length: 63 coststime: 0.05185818672180176 Train Epoch: 1 Batch_idx: 5887 Process: 1 Data_length: 12 coststime: 0.006895303726196289 Process 1 length: 5888 time: 2023-11-17 17:20:48.578204 Train epoch 1 costTime: 1285.7279663085938s . Process 1 Start to test. 1 0 tensor(45265.9141, device='cuda:1') ``` ### Expected behavior I'd like to know how to fix this problem. ### Environment info ``` torch==2.0 datasets==2.14.0 ``` `split_dataset_by_node` doesn't give the exact same number of examples to each node in the case of iterable datasets, though it tries to be as equal as possible. In particular if your dataset is sharded and you have a number of shards that is a factor of the number of workers, then the shards will be evenly distributed among workers. If the shards don't contain the same number of examples, then some workers might end up with more examples than others. However if you use a Dataset you'll end up with the same amount of data, because we know the length of the dataset we can split it exactly where we want. Also Dataset objects don't load the full dataset in memory; instead it memory maps Arrow files from disk.
[ -0.3585677742958069, -0.43623197078704834, -0.06505583226680756, 0.244727224111557, 0.15072189271450043, 0.0003087371587753296, 0.22049580514431, 0.10808394849300385, -0.03405902534723282, 0.03095584362745285, 0.07104901969432831, 0.4075590670108795, -0.1007930338382721, -0.1486658751964569, 0.016371022909879684, -0.16175362467765808, -0.07227486371994019, 0.09274674952030182, -0.10523059964179993, -0.16402341425418854, -0.023536868393421173, -0.040097080171108246, -0.05709972232580185, -0.25741907954216003, -0.2704497277736664, -0.3226136863231659, -0.15708094835281372, 0.13287986814975739, 0.15150907635688782, -0.39821359515190125, 0.2246541678905487, 0.21711695194244385, 0.07113543152809143, 0.6111316084861755, -0.00011611040099523962, 0.12704065442085266, 0.11343953013420105, 0.05389542132616043, -0.2836292088031769, 0.09008464217185974, 0.06991222500801086, -0.16767987608909607, 0.1288556456565857, -0.2554227113723755, -0.017265167087316513, -0.2542388439178467, 0.08876854181289673, -0.22222766280174255, 0.19286681711673737, -0.061177827417850494, 0.18086019158363342, 0.3152311444282532, -0.3878982365131378, -0.13680021464824677, -0.09484134614467621, -0.023857172578573227, -0.05047329515218735, 0.5289285182952881, 0.45129120349884033, -0.09903743118047714, -0.34894004464149475, 0.13595694303512573, -0.05334830656647682, 0.4858725965023041, 0.11524223536252975, -0.17097161710262299, 0.1617196500301361, -0.12134912610054016, -0.22600847482681274, 0.0700855627655983, 0.20925454795360565, -0.1784752756357193, -0.13133037090301514, -0.6475405693054199, 0.056704334914684296, -0.19455043971538544, -0.04642026871442795, 0.20723748207092285, -0.2064751833677292, -0.10571934282779694, -0.34051117300987244, 0.1179606169462204, -0.11424816399812698, 0.06665761768817902, -0.034502021968364716, 0.43341559171676636, 0.12204329669475555, 0.10901765525341034, 0.17341767251491547, 0.33374470472335815, 0.2789934575557709, -0.026215538382530212, 0.23314636945724487, -0.12107981741428375, -0.3501068353652954, 0.004836961627006531, -0.028902534395456314, -0.27013710141181946, 0.20841045677661896, -0.030517490580677986, 0.20905975997447968, -0.11848641186952591, 0.3953094184398651, -0.16644874215126038, 0.5638719201087952, 0.07488226890563965, -0.40637364983558655, 0.5258411169052124, 0.06969736516475677, -0.005018461495637894, -0.2698233127593994, 0.040708161890506744, 0.060672327876091, -0.08875633031129837, 0.35089126229286194, -0.039708565920591354, 0.08949844539165497, 0.247198686003685, -0.35851606726646423, -0.20880556106567383, -0.038927335292100906, -0.06285429000854492, 0.1691676527261734, 0.2972572445869446, -0.0928339809179306, 0.26357024908065796, -0.19406692683696747, 0.21887166798114777, -0.4177860617637634, 0.11258156597614288, -0.2793479859828949, -0.132842019200325, -0.3078894019126892, 0.07514967024326324, -0.06503031402826309, 0.1454610526561737, 0.1476266086101532, 0.11995510756969452, 0.183994859457016, -0.02518448978662491, 0.2852550148963928, -0.36937999725341797, 0.308567076921463, 0.015029391273856163, -0.2960500121116638, 0.15146097540855408, -0.06459331512451172, 0.4246465265750885, -0.19559332728385925, 0.19168883562088013, -0.30208706855773926, -0.39741823077201843, 0.19607222080230713, 0.15077291429042816, 0.08966150134801865, 0.08991045504808426, -0.0026810579001903534, 0.18239307403564453, 0.32799232006073, -0.3139345049858093, 0.1443914771080017, -0.36140739917755127, -0.3742552399635315, -0.08707559108734131, 0.21682213246822357, 0.4756351113319397, 0.16111025214195251, -0.20727494359016418, -0.03740060701966286, -0.0031567979604005814, 0.44769302010536194, 0.2792888283729553, -0.1987209916114807, 0.31264743208885193, -0.2973940968513489, -0.29403966665267944, 0.023935701698064804, -0.171543151140213, -0.5276455879211426, 0.5280032157897949, -0.39437851309776306, 0.34481409192085266, 0.10092031955718994, 0.17946094274520874, 0.3943183422088623, -0.05604291334748268, 0.10319457948207855, 0.22442270815372467, -0.4505126178264618, 0.26622796058654785, -0.3217191994190216, -0.025330357253551483, 0.20731689035892487, 0.25477832555770874, 0.12550058960914612, 0.18854328989982605, -0.05705854669213295, 0.11734704673290253, 0.6822022795677185, 0.07497960329055786, 0.08174434304237366, 0.19653312861919403, -0.18675892055034637, -0.06413918733596802, 0.19466912746429443, -0.32779592275619507, -0.21012017130851746, 0.3620021343231201, 0.12041168659925461, -0.1950116753578186, -0.038668788969516754, -0.03351960703730583, -0.0506397970020771, -0.0443216934800148, -0.3493460714817047, -0.11438125371932983, 0.03683341667056084, 0.13337311148643494, 0.1690591275691986, -0.04859645664691925, -0.041579343378543854, 0.3022802770137787, -0.340412974357605, -0.28580886125564575, -0.314701646566391, 0.3260331451892853, 0.27942371368408203, -0.17171764373779297, 0.05374029278755188, 0.13760553300380707, 0.050215594470500946, -0.20017217099666595, -0.1356634646654129, 0.18755993247032166, 0.029026880860328674, 0.17810285091400146, -0.03647497296333313, 0.18096406757831573, 0.3300221562385559, -0.08104722201824188, -0.014025554060935974, 0.2520909905433655, -0.08684360235929489, -0.17566335201263428, 0.2104862481355667, 0.2729111313819885, -0.21152415871620178, 0.10991250723600388, 0.07591463625431061, -0.08814036101102829, 0.11127255111932755, -0.04443681612610817, -0.04005531221628189, 0.08165144920349121, 0.34083789587020874, -0.36809277534484863, 0.475405752658844, 0.0031172484159469604, -0.40744471549987793, 0.14277970790863037, 0.12165454030036926, -0.007623404264450073, -0.0738353356719017, -0.21709956228733063, 0.02139117941260338, 0.16504402458667755, 0.11712335795164108, 0.28293880820274353, 0.5696569085121155, 0.0782114788889885, 0.25085699558258057, -0.11773451417684555, 0.02687697857618332, -0.15472598373889923, -0.06747159361839294, 0.14257748425006866, 0.6344336271286011, 0.36770549416542053, 0.154094398021698, -0.003447849303483963, -0.195719376206398, -0.03545656055212021, 0.18566524982452393, -0.021744756028056145, -0.036058858036994934, 0.39401787519454956, -0.2547287940979004, -0.0025076642632484436, -0.48111990094184875, 0.15211918950080872, -0.03480338305234909, -0.015666157007217407, -0.08894430100917816, 0.5858089327812195, -0.013804242014884949, 0.1379181146621704, -0.05993744730949402, 0.20299632847309113, 0.03480374068021774, -0.2375182956457138, -0.21152184903621674, -0.21985064446926117, -0.11833924055099487, -0.0045829229056835175, -0.05412107706069946, -0.11602804064750671, 0.48487618565559387, 0.11556576937437057, -0.5529153943061829, -0.06901191920042038, 0.18491148948669434, -0.028402365744113922, -0.08813399076461792, -0.13817636668682098, -0.05951637774705887, -0.056128550320863724, -0.056624606251716614, -0.12415820360183716, 0.2268223762512207, -0.6403185129165649, 0.003446139395236969, 0.02713095396757126, -0.02161378599703312, -0.09213735163211823, 0.10621409118175507, -0.3307015299797058, -0.4303397238254547, -0.25505146384239197, 0.14046531915664673, -0.2055804282426834, 0.11887694150209427, 0.08402906358242035, -0.15682505071163177, -0.22552353143692017, 0.19612190127372742, -0.07526644319295883, -0.019879279658198357, -0.20871959626674652, 0.03993600606918335, -0.21590198576450348, -0.14391309022903442, -0.4435667097568512, -0.18478931486606598, -0.22608904540538788, 0.5612457394599915, -0.42092961072921753, -0.08417032659053802, -0.0739579126238823, 0.05332149565219879, -0.29736027121543884, -0.21504217386245728, 0.20625387132167816, -0.17472949624061584, 0.023913685232400894, -0.07042376697063446, 0.004435673356056213, 0.08124348521232605, 0.08605462312698364, 0.16298237442970276, -0.08782613277435303, 0.11883854866027832, 0.022607550024986267, 0.9377821683883667, 0.2341056615114212, 0.06790134310722351, 0.15149155259132385, -0.14922240376472473, -0.12777839601039886, -0.11897054314613342, -0.40367427468299866, 0.3819468915462494, -0.10460519045591354, -0.4430027902126312, 0.23181436955928802, -0.25538378953933716, -0.41014721989631653, 0.11807204782962799, -0.0902286022901535, 0.25341203808784485, -0.20608335733413696, 0.1309974193572998, -0.3799065947532654, 0.41509848833084106, -0.0329524427652359, 0.1117088720202446, -0.07008814066648483, -0.20380857586860657, -0.09386145323514938, -0.3125106394290924, 0.06911543756723404, -0.08815370500087738, -0.1339687556028366, 0.08238566666841507, -0.43767499923706055, -0.06768380105495453, 0.27557191252708435, 0.3341575264930725, -0.07777481526136398, -0.06749281287193298, 0.346395879983902, 0.08987385034561157, 0.8163269758224487, 0.3512887954711914, 0.10478243231773376, -0.01818760484457016, -0.41278237104415894, -0.16563591361045837, -0.17717666923999786, -0.18599936366081238, 0.5800560116767883, 0.3224273920059204, -0.08606851100921631, -0.36207443475723267, -0.15281017124652863, 0.14074254035949707, 0.03346022218465805, -0.06654085218906403, -0.3030884861946106, -0.3126663565635681, -0.2093391716480255, 0.0357099324464798, 0.6531062722206116, 0.209824800491333, 0.15366299450397491, -0.2652573883533478, -0.21560600399971008, -0.02715088240802288, 0.1251448690891266, -0.07827834784984589, 0.07042591273784637, 0.17366313934326172, 0.03832836449146271, 0.48278313875198364, 0.38014939427375793, 0.3556099534034729, 0.5275114178657532, 0.4789281189441681, -0.14186248183250427, -0.25577136874198914, 0.15426453948020935, 0.10544164478778839, 0.06543276458978653, 0.5280015468597412, 0.002673577517271042, -0.06657010316848755, 0.020698074251413345, 0.19840385019779205, -0.3294428884983063, -0.1991356760263443, 0.4031767249107361, -0.12366022169589996, -0.4971318542957306, -0.4723634421825409, 0.0808790922164917, -0.06149623543024063, -0.021293260157108307, 0.4977675676345825, -0.6380182504653931, -0.11919867992401123, 0.22368952631950378, 0.04176647588610649, 0.7814136743545532, -0.002718474715948105, 0.17712390422821045, 0.30557602643966675, 0.20593571662902832, 0.05154292657971382, -0.003328077495098114, 0.4947994649410248, -0.32356661558151245, -0.6020666360855103, 0.1895095705986023, -0.21921426057815552, -0.1308642327785492, 0.29044121503829956, 0.31410717964172363, 0.06486070156097412, -0.01858370006084442, -0.2583657503128052, -0.16455340385437012, 0.2818031907081604, 0.0013330038636922836, -0.1289837807416916, -0.11249032616615295, 0.07333508878946304, -0.1426013857126236, 0.12104557454586029, -0.0772285982966423, -0.1380043476819992, 0.12131392955780029, 0.10230638086795807, -0.06066010147333145, -0.040870118886232376, -0.35177433490753174, 0.25177666544914246, 0.07163076102733612, -0.5539745092391968, -0.12704282999038696, 0.24912355840206146, 0.03038429282605648, -0.32179465889930725, 0.04928535223007202, 0.3050149083137512, 0.011975044384598732, 0.1380324512720108, 0.023008622229099274, -0.18716759979724884, 0.26084598898887634, -0.026469916105270386, -0.16921576857566833, -0.26638925075531006, 0.026007220149040222, -0.41934964060783386, -0.004699349403381348, 0.3217304050922394, 0.3189460337162018, -0.03366215527057648, 0.06928685307502747, 0.11178815364837646, -0.038348741829395294, -0.3003872036933899, 0.09746228903532028, 0.13777555525302887, -0.26414602994918823, 0.4238375127315521, -0.3139909505844116, -0.3669893145561218, -0.11701793968677521, 0.19699518382549286, 0.195726215839386, 0.361106276512146, 0.42157861590385437, -0.1705789864063263, -0.11073065549135208, -0.13313207030296326, -0.01990038901567459, 0.08036421239376068, -0.26114434003829956, 0.4422667920589447, -0.2675746977329254, 0.1804046630859375, -0.034023217856884, -0.000046135857701301575, 0.12601059675216675, 0.03872403874993324, -0.11532904952764511, -0.15336951613426208, -0.21953779458999634, -0.23226423561573029, 0.038540564477443695, 0.15399840474128723, 0.17715862393379211, 0.1457502543926239, -0.1156667098402977, 0.3821944296360016, -0.2679536044597626, -0.2808438539505005, -0.1438075751066208, 0.11764772981405258, -0.038263529539108276, -0.13233233988285065, 0.252686470746994, -0.018630389124155045, 0.02323368936777115, 0.17662252485752106, 0.0704004168510437, -0.16890764236450195, -0.05693662539124489, 0.08682820200920105, 0.019718892872333527, 0.06537848711013794, -0.08221498131752014, -0.4007017910480499, -0.051823243498802185, -0.2761141359806061, 0.30315834283828735, 0.247430220246315, 0.06915989518165588, 0.08222329616546631, 0.48034384846687317, 0.022428156808018684, 0.052713871002197266, 0.3258543610572815, -0.05966300517320633, -0.13305598497390747, -0.0006741136312484741, 0.24509751796722412, 0.2531964182853699, -0.025395214557647705, -0.24105119705200195, -0.21229127049446106, 0.3027554750442505, -0.05550958588719368, 0.15609508752822876, -0.13499054312705994, 0.004979386925697327, 0.14673487842082977, 0.39645177125930786, 0.6535423398017883, -0.2390878051519394, -0.18629693984985352, 0.2042454481124878, 0.11737552285194397, 0.007360711693763733, -0.2018066644668579, 0.3225560486316681, -0.030483191832900047, 0.06860311329364777, 0.34255796670913696, 0.13495224714279175, -0.07959054410457611, -0.1602049022912979, 0.13109849393367767, 0.16085219383239746, -0.4705708920955658, 0.18557018041610718, 0.028953025117516518, 0.3269602060317993, -0.05362148582935333, 0.24710801243782043, 0.22618097066879272, 0.1547859162092209, 0.11101418733596802, 0.14044108986854553, 0.5335496068000793, 0.1617325097322464, -0.18759189546108246, -0.010595135390758514, -0.19667133688926697, -0.31546086072921753, -0.12810805439949036, -0.34544849395751953, 0.04249127581715584, -0.01960178092122078, 0.2007552981376648, -0.43553367257118225, -0.46908819675445557, -0.14124827086925507, 0.04633805528283119, -0.18898646533489227, 0.05031512677669525, -0.07157859951257706, 0.05427902936935425, 0.03700882941484451, -0.014717645943164825, 0.041696008294820786, -0.00918574072420597, 0.5697568655014038, 0.18338903784751892, -0.06607823073863983, -0.47352659702301025, 0.044137418270111084, 0.18499231338500977, 0.35598596930503845, -0.29705488681793213, -0.01332782581448555, -0.1571875959634781, -0.022859659045934677, 0.0008492958731949329, 0.31531891226768494, 0.12053355574607849, 0.3091117739677429, -0.08811765909194946, -0.15850141644477844, 0.24865597486495972, 0.03374967724084854, -0.10015091300010681, 0.44759297370910645, -0.10532303154468536, 0.16231507062911987, 0.40037891268730164, 0.008041556924581528, -0.15377287566661835, 0.043792687356472015, 0.4372967481613159, -0.18768617510795593, -0.2745163142681122, 0.6409139037132263, -0.061804041266441345, -0.1717430055141449, 0.09710495173931122, 0.03764164820313454, -0.26714026927948, 0.05889475345611572, 0.237760528922081, -0.4326745867729187, 0.21527725458145142, -0.043284397572278976, 0.03460564464330673, -0.21303102374076843, 0.5432323217391968, 0.018898794427514076, 0.23357033729553223, -0.28823161125183105, 0.018414512276649475, -0.4456021785736084, 0.310172438621521, -0.3749839663505554, -0.05684710666537285, 0.04591875150799751, 0.2722478210926056, -0.09743843972682953, -0.05730444937944412, -0.16247886419296265, -0.31626278162002563, -0.034081704914569855, 0.6070194840431213, -0.21963384747505188, -0.1292683333158493, -0.5112322568893433, 0.26172971725463867, 0.24064116179943085, -0.3800880014896393, 0.16256867349147797, -0.09966936707496643, -0.03765967860817909, 0.3446784019470215, -0.04806569963693619, 0.13904672861099243, -0.020807895809412003, -0.02829141914844513, 0.11951874196529388, 0.3678624927997589, -0.09867777675390244, -0.0056024640798568726, -0.28074565529823303, -0.210675910115242, -0.39888402819633484, 0.20681297779083252, 0.0729137659072876, 0.2071482539176941, -0.1890464574098587, -0.041292183101177216, -0.28263676166534424, 0.17720529437065125, 0.03879690170288086, 0.03842053934931755, -0.04716076701879501, 0.11059568077325821, 0.01152021437883377, 0.48660826683044434, 0.2276369035243988, 0.5645204782485962, -0.012442141771316528, 0.0072298794984817505, -0.23530313372612, -0.26485008001327515, 0.2814093828201294, -0.4936092495918274, -0.3519536256790161, -0.10182709991931915, 0.33150404691696167, 0.11954929679632187, 0.011435000225901604, -0.14833784103393555, -0.04707594960927963, 0.28553327918052673, -0.2442748099565506, 0.04708532989025116, 0.16511838138103485, 0.0852581262588501, -0.03546154499053955, -0.02281362935900688, 0.36127516627311707, 0.034248579293489456, -0.46516871452331543, 0.44341152906417847, -0.21140439808368683 ]
https://github.com/huggingface/datasets/issues/6432
You should use `datasets.load_dataset` instead of `nlp.load_dataset`, as the `nlp` package is outdated. If switching to `datasets.load_dataset` doesn't fix the issue, sharing the JSON file (feel free to replace the data with dummy data) would be nice so that we can reproduce it ourselves.
load_dataset does not load all of the data in my input file
### Describe the bug I have 127 elements in my input dataset. When I do a len on the dataset after loaded, it is only 124 elements. ### Steps to reproduce the bug train_dataset = nlp.load_dataset(data_args.dataset_path, name=data_args.qg_format, split=nlp.Split.TRAIN) valid_dataset = nlp.load_dataset(data_args.dataset_path, name=data_args.qg_format, split=nlp.Split.VALIDATION) logger.info(len(train_dataset)) logger.info(len(valid_dataset)) Both train and valid input are 127 items. However, they both only load 124 items. The input format is in json. At the end of the day, I am trying to create .pt files. ### Expected behavior I see all 127 elements in my dataset when performing len ### Environment info Python 3.10. CentOS operating system. nlp==0.40, datasets==2.14.5, transformers==4.26.1
44
load_dataset does not load all of the data in my input file ### Describe the bug I have 127 elements in my input dataset. When I do a len on the dataset after loaded, it is only 124 elements. ### Steps to reproduce the bug train_dataset = nlp.load_dataset(data_args.dataset_path, name=data_args.qg_format, split=nlp.Split.TRAIN) valid_dataset = nlp.load_dataset(data_args.dataset_path, name=data_args.qg_format, split=nlp.Split.VALIDATION) logger.info(len(train_dataset)) logger.info(len(valid_dataset)) Both train and valid input are 127 items. However, they both only load 124 items. The input format is in json. At the end of the day, I am trying to create .pt files. ### Expected behavior I see all 127 elements in my dataset when performing len ### Environment info Python 3.10. CentOS operating system. nlp==0.40, datasets==2.14.5, transformers==4.26.1 You should use `datasets.load_dataset` instead of `nlp.load_dataset`, as the `nlp` package is outdated. If switching to `datasets.load_dataset` doesn't fix the issue, sharing the JSON file (feel free to replace the data with dummy data) would be nice so that we can reproduce it ourselves.
[ -0.22444385290145874, -0.252759724855423, 0.0006521642208099365, 0.5328270196914673, 0.18958520889282227, -0.0704435408115387, 0.3324061632156372, 0.4615911543369293, -0.04259912669658661, -0.11367630958557129, 0.13742810487747192, 0.3046746850013733, 0.016711439937353134, 0.2498253881931305, 0.16968455910682678, 0.1278165876865387, 0.09968997538089752, 0.348788857460022, 0.100770503282547, -0.2723928689956665, -0.36264467239379883, 0.07417948544025421, -0.40202566981315613, -0.09890927374362946, -0.35217592120170593, 0.26073774695396423, 0.06242132931947708, 0.23463138937950134, 0.12456819415092468, -0.4364352822303772, 0.18611747026443481, -0.13271573185920715, 0.36001333594322205, 0.17085576057434082, -0.0001217702665599063, 0.028943724930286407, 0.5684619545936584, -0.015039406716823578, -0.5519042015075684, -0.0773821696639061, -0.07485435903072357, -0.49630019068717957, 0.393657386302948, -0.1668049842119217, 0.030418701469898224, -0.08346357941627502, -0.10060738772153854, -0.006236277520656586, 0.30904704332351685, 0.22580209374427795, 0.08592892438173294, 0.323620468378067, 0.041549116373062134, 0.2802042067050934, 0.22360490262508392, 0.23021435737609863, 0.08257488906383514, 0.3565593361854553, 0.300542414188385, -0.18386828899383545, -0.10722242295742035, 0.06807060539722443, 0.15647557377815247, 0.10571958124637604, 0.3037097156047821, 0.03042079508304596, 0.23945336043834686, -0.1504567265510559, -0.05563177913427353, 0.3870457708835602, 0.3355289399623871, -0.05746126547455788, -0.20106178522109985, -0.40945711731910706, 0.03108663111925125, -0.3997229039669037, 0.14803478121757507, 0.3133983612060547, -0.2723920941352844, -0.1123105064034462, -0.45473340153694153, 0.061054959893226624, -0.14301905035972595, 0.40296244621276855, -0.20040275156497955, 0.1657598316669464, -0.07629765570163727, 0.18328861892223358, 0.048852432519197464, -0.005453822668641806, -0.19280976057052612, -0.1885223686695099, -0.08351600170135498, 0.2114754021167755, -0.32072913646698, 0.14559738337993622, 0.04036140441894531, 0.00804365798830986, 0.2515256404876709, 0.3449164927005768, 0.1436671018600464, 0.254572331905365, -0.16158506274223328, 0.07844395935535431, 0.3726571798324585, 0.20350918173789978, 0.25727808475494385, 0.12761631608009338, 0.09690491855144501, -0.09336135536432266, -0.3059859275817871, -0.04518849775195122, -0.09693552553653717, -0.1827869415283203, 0.39948511123657227, -0.36248522996902466, 0.11544730514287949, -0.05506701394915581, -0.07121197134256363, 0.08286143839359283, -0.235702246427536, -0.21702656149864197, 0.12452854961156845, 0.15147998929023743, -0.07729700207710266, 0.5268687605857849, 0.018193930387496948, 0.23758581280708313, -0.20418384671211243, -0.2614453434944153, -0.13241632282733917, -0.15017972886562347, -0.26104581356048584, -0.12000657618045807, 0.32691073417663574, -0.4835475981235504, 0.27374526858329773, 0.14740121364593506, -0.0358971431851387, -0.4315969944000244, 0.0257699117064476, -0.1987391859292984, 0.026807034388184547, 0.09792492538690567, 0.1281553953886032, 0.10061438381671906, 0.05493404343724251, -0.23000705242156982, -0.022553540766239166, 0.3589298725128174, -0.3307251036167145, -0.018547795712947845, -0.08594111353158951, 0.08526977896690369, -0.17502114176750183, 0.27042338252067566, -0.24780821800231934, 0.14422959089279175, 0.2784059941768646, -0.04196508228778839, -0.1469070017337799, -0.34725600481033325, -0.06280921399593353, -0.2372479885816574, 0.3787122368812561, 0.36921021342277527, -0.10812816768884659, -0.18531768023967743, -0.12588679790496826, 0.09513214230537415, 0.30593007802963257, 0.22939710319042206, -0.3134552836418152, 0.21763834357261658, -0.1764569878578186, 0.19762906432151794, 0.6631984114646912, -0.15026283264160156, -0.18133637309074402, 0.47148042917251587, 0.06517426669597626, -0.023746110498905182, -0.22953470051288605, 0.13444533944129944, -0.07387258112430573, 0.08530625700950623, 0.24667905271053314, 0.4234028458595276, 0.12279261648654938, -0.09017893671989441, -0.41716668009757996, 0.0021731480956077576, 0.417354941368103, 0.3117784857749939, -0.020011557266116142, 0.013271115720272064, 0.07881008833646774, 0.11366671323776245, 0.3056933879852295, -0.0033761104568839073, 0.14156106114387512, 0.48932671546936035, -0.1747710108757019, -0.020294293761253357, 0.15940965712070465, -0.15695349872112274, -0.19216707348823547, 0.010677725076675415, -0.17847445607185364, -0.15576115250587463, 0.5500702261924744, 0.3635914921760559, -0.4279155135154724, 0.10439415276050568, -0.08665970712900162, -0.0827523022890091, -0.03147614002227783, 0.24595361948013306, -0.05991620197892189, 0.15583723783493042, -0.0428452268242836, 0.15812808275222778, -0.14592432975769043, 0.19335195422172546, -0.6411185264587402, 0.17167401313781738, 0.11235830932855606, -0.0531637966632843, 0.12986700236797333, 0.28662559390068054, 0.18021738529205322, -0.07765759527683258, -0.03415408357977867, 0.27578431367874146, 0.1759345531463623, -0.06033385172486305, -0.40528011322021484, -0.1552673727273941, 0.23802924156188965, -0.20264893770217896, 0.0403108224272728, 0.1258469671010971, 0.22101250290870667, -0.13857318460941315, -0.33492088317871094, 0.2347470223903656, -0.19019317626953125, 0.22192291915416718, 0.0023531317710876465, -0.08681508898735046, 0.17517346143722534, -0.18835672736167908, -0.24556808173656464, 0.05037097632884979, 0.46738648414611816, -0.06838978081941605, 0.6525615453720093, 0.30990928411483765, -0.22370922565460205, -0.24047477543354034, 0.2551991939544678, -0.18096190690994263, -0.12666058540344238, 0.43781620264053345, -0.5308259129524231, -0.19355465471744537, -0.03985108807682991, -0.15967465937137604, 0.2765963077545166, 0.20051489770412445, 0.012135408818721771, -0.18515215814113617, -0.021359873935580254, -0.14263463020324707, 0.1454637348651886, 0.13262535631656647, 0.12603136897087097, 0.29725953936576843, 0.20491501688957214, 0.049566321074962616, -0.14737319946289062, 0.040746621787548065, 0.10579059273004532, 0.3173702359199524, -0.34568995237350464, 0.1218060627579689, -0.18457648158073425, -0.047912340611219406, -0.11304053664207458, -0.22691568732261658, -0.3036734461784363, -0.24626216292381287, -0.2947980761528015, -0.07843448221683502, 0.2750406265258789, -0.20445333421230316, -0.18228542804718018, -0.16961194574832916, 0.23089997470378876, -0.2225542515516281, -0.040083155035972595, 0.18419569730758667, -0.5351235866546631, -0.08270538598299026, 0.29515188932418823, 0.3418937027454376, 0.09560705721378326, -0.06609387695789337, -0.07677371054887772, 0.35081422328948975, -0.3517037332057953, 0.09587694704532623, 0.12244416773319244, 0.14930696785449982, -0.17040163278579712, 0.20462433993816376, 0.01601158082485199, -0.22398380935192108, 0.22410832345485687, -0.016087058931589127, -0.15069375932216644, 0.5195223093032837, 0.08259135484695435, -0.025295211002230644, -0.09860105812549591, -0.22256287932395935, -0.07684191316366196, -0.24775904417037964, 0.4445320665836334, 0.49140214920043945, 0.11586128175258636, 0.3655412793159485, 0.10496017336845398, -0.027221813797950745, 0.15449804067611694, -0.04146219417452812, -0.1612549126148224, -0.06846430897712708, 0.43531668186187744, 0.08340074867010117, -0.3327881693840027, -0.31343185901641846, -0.2447945922613144, -0.02777775190770626, 0.2690586447715759, -0.6955977082252502, 0.06148014962673187, -0.2357233166694641, 0.12186065316200256, -0.2390357106924057, 0.024630600586533546, 0.07387998700141907, -0.17119145393371582, 0.09481194615364075, 0.08962004631757736, -0.19359660148620605, 0.009976673871278763, 0.0073487963527441025, 0.20384472608566284, 0.017159178853034973, 0.2816651165485382, -0.06934892386198044, 0.2543718218803406, 0.30481868982315063, -0.18913662433624268, 0.2597033977508545, -0.10328083485364914, 0.2361443042755127, -0.13057643175125122, -0.2489374428987503, 0.2689812183380127, 0.046016160398721695, 0.10548913478851318, 0.3733404278755188, 0.13708266615867615, -0.2963939607143402, -0.1862042248249054, -0.08767450600862503, -0.35069283843040466, -0.13472336530685425, 0.28247371315956116, -0.373739629983902, 0.19517481327056885, -0.004662409424781799, 0.16063636541366577, -0.08647629618644714, -0.3906336724758148, -0.3392753601074219, -0.03436651453375816, 0.2841910421848297, -0.04053490608930588, -0.5853840112686157, -0.22487150132656097, -0.21052995324134827, 0.0856076329946518, -0.04551497474312782, 0.6137227416038513, 0.03992832452058792, -0.21700887382030487, 0.2496340572834015, 0.10107041895389557, 0.516858696937561, 0.12293441593647003, 0.154852956533432, 0.31569188833236694, 0.03167935460805893, -0.7037754058837891, -0.04489840194582939, -0.13702285289764404, 0.29372942447662354, 0.46563583612442017, 0.5780347585678101, -0.23463758826255798, -0.05989644676446915, -0.04490900784730911, 0.40815213322639465, -0.26216620206832886, -0.3109591007232666, -0.27268093824386597, -0.08043031394481659, -0.21959394216537476, -0.22150076925754547, -0.1301524043083191, 0.42894989252090454, -0.10698793828487396, -0.10885821282863617, -0.10865460336208344, -0.11792975664138794, 0.24894683063030243, -0.0000460110604763031, 0.4192360043525696, 0.014432847499847412, 0.26180779933929443, -0.17544271051883698, 0.013315174728631973, 0.07258913666009903, 0.28814101219177246, 0.12677130103111267, -0.11000335216522217, 0.11257113516330719, -0.20745809376239777, 0.32741641998291016, 0.031234487891197205, 0.045913148671388626, -0.2116360068321228, -0.04660312831401825, 0.25166529417037964, -0.26463639736175537, 0.166843980550766, -0.05596092343330383, -0.040091171860694885, -0.46189063787460327, -0.35596540570259094, 0.42321738600730896, -0.03815370053052902, 0.09763562679290771, 0.17758393287658691, -0.6368569135665894, -0.17621055245399475, 0.3746711313724518, -0.11902627348899841, 0.6790524125099182, -0.00751061737537384, 0.23701316118240356, 0.11493070423603058, 0.2318744659423828, 0.31954824924468994, -0.4872644245624542, -0.09025254845619202, -0.5621885657310486, -0.12144559621810913, 0.05281165987253189, -0.2211409956216812, -0.1455114483833313, 0.3694370687007904, 0.08812278509140015, 0.1344434767961502, -0.04296543449163437, -0.29611337184906006, 0.05395851284265518, 0.5972745418548584, -0.016781337559223175, -0.19136062264442444, -0.3162905275821686, 0.030451886355876923, -0.22065705060958862, 0.2635633647441864, 0.13307708501815796, -0.23134368658065796, -0.09304329752922058, -0.2488483339548111, -0.2779451012611389, 0.1797676533460617, 0.07097381353378296, -0.0316762775182724, 0.4418855309486389, -0.45320844650268555, -0.060737963765859604, 0.367692232131958, 0.11317721754312515, 0.26169079542160034, -0.13733574748039246, 0.04261818155646324, -0.16788852214813232, 0.12147745490074158, 0.11303935199975967, 0.15115629136562347, 0.29472652077674866, -0.012995332479476929, -0.16297496855258942, -0.032829273492097855, -0.12634646892547607, -0.24916183948516846, -0.10080326348543167, 0.4868380129337311, 0.029975369572639465, -0.2998367249965668, -0.04076550900936127, 0.05794493108987808, -0.07194104045629501, -0.052110105752944946, 0.07114185392856598, 0.41216355562210083, -0.1169625073671341, 0.3908933401107788, 0.34005171060562134, -0.27683037519454956, 0.03038005903363228, 0.26425135135650635, 0.17766010761260986, 0.17407555878162384, 0.5823050737380981, 0.11764230579137802, 0.12647747993469238, -0.14505238831043243, 0.39444005489349365, 0.22737525403499603, -0.2898765206336975, -0.09584233164787292, 0.18216967582702637, 0.48582708835601807, -0.16693398356437683, -0.045120969414711, -0.07508917152881622, -0.023802973330020905, 0.1344001740217209, -0.6741447448730469, -0.39519229531288147, -0.016085714101791382, 0.09692563861608505, -0.020442809909582138, 0.15878726541996002, 0.1107606291770935, 0.18690453469753265, 0.3212977647781372, -0.16259142756462097, -0.04286711663007736, -0.12550288438796997, 0.2529062032699585, 0.08775873482227325, -0.2416006475687027, -0.14518575370311737, -0.01784127578139305, 0.02986011654138565, 0.04056986793875694, 0.0968354344367981, -0.14576873183250427, -0.10368576645851135, 0.16856177151203156, 0.14719514548778534, -0.30075815320014954, -0.28939902782440186, -0.12804579734802246, -0.10810213536024094, -0.23972806334495544, -0.3859040141105652, -0.13926896452903748, -0.036785971373319626, 0.28705406188964844, 0.2968316376209259, 0.238488107919693, -0.0730157420039177, 0.15712712705135345, -0.3536861836910248, 0.30360284447669983, 0.13447979092597961, 0.16237396001815796, 0.4531264305114746, 0.15615719556808472, -0.7785107493400574, -0.11112094670534134, 0.0017857067286968231, -0.11476530134677887, 0.19019867479801178, -0.35171204805374146, 0.06382676213979721, 0.1345777064561844, 0.15997523069381714, 0.5930716395378113, -0.32998958230018616, 0.37389057874679565, 0.1446465104818344, 0.07812294363975525, -0.15261636674404144, -0.23929965496063232, 0.23135310411453247, 0.013496633619070053, -0.18810272216796875, 0.017782997339963913, 0.03027939796447754, -0.4787985682487488, -0.01225491613149643, -0.050276726484298706, 0.12082220613956451, -0.23485934734344482, -0.016231287270784378, 0.44555220007896423, -0.016096964478492737, 0.007871105335652828, 0.04652778059244156, 0.2865641117095947, -0.05378793925046921, 0.19071045517921448, 0.2402593046426773, -0.04045452922582626, -0.06832757592201233, -0.10022660344839096, -0.2914615571498871, -0.40084636211395264, -0.18764004111289978, 0.611980140209198, -0.2682218551635742, 0.16674654185771942, 0.03155020251870155, 0.5129210352897644, 0.09641610085964203, -0.06018127128481865, -0.1925305724143982, -0.11110921949148178, -0.033888623118400574, -0.13329017162322998, -0.24160151183605194, 0.04060964286327362, -0.33129411935806274, 0.0025228112936019897, -0.0647963210940361, -0.3909033536911011, 0.10468808561563492, 0.4437541663646698, -0.4055318832397461, -0.48629331588745117, -0.10079988837242126, 0.3916836082935333, -0.14095552265644073, -0.35865646600723267, 0.28013285994529724, -0.0008256696164608002, 0.03831448778510094, 0.3191933333873749, -0.24174152314662933, 0.41166651248931885, 0.3928391933441162, 0.11651401221752167, 0.03279796987771988, 0.1895686686038971, -0.13596242666244507, -0.3819247782230377, 0.41511887311935425, 0.30784496665000916, 0.32027924060821533, 0.2519240081310272, 0.011987686157226562, -0.03672097995877266, 0.2499353587627411, 0.10802054405212402, 0.009085197001695633, -0.46672481298446655, 0.41281330585479736, 0.02627401426434517, -0.3717259466648102, -0.4192410111427307, -0.10773427039384842, -0.33229032158851624, 0.1414330154657364, 0.1431330442428589, 0.3219359517097473, 0.26659274101257324, -0.14969272911548615, 0.02141798660159111, -0.2120053619146347, 0.18523047864437103, 0.21112126111984253, -0.24969924986362457, -0.17801985144615173, -0.2997317314147949, -0.6384545564651489, 0.02754567191004753, -0.1401977241039276, -0.08874810487031937, 0.35638827085494995, 0.23140382766723633, -0.07106126844882965, 0.12940487265586853, -0.1533282995223999, 0.07896386086940765, 0.13139857351779938, 0.2486458569765091, -0.21459752321243286, -0.15692172944545746, -0.20948560535907745, 0.27723175287246704, -0.24207928776741028, -0.23956507444381714, 0.36915770173072815, -0.2942207157611847, -0.047776151448488235, -0.14593505859375, -0.05735974386334419, 0.1419578194618225, 0.7537988424301147, 0.2355993539094925, 0.23452316224575043, 0.3146165609359741, -0.12369459867477417, 0.11773493885993958, -0.2646280527114868, -0.0853305459022522, -0.19145147502422333, 0.32386666536331177, -0.14046162366867065, 0.12759366631507874, -0.18853121995925903, -0.16615891456604004, -0.055103011429309845, 0.08051647245883942, -0.11880096048116684, -0.32657381892204285, -0.03812471777200699, -0.2519034445285797, -0.1264946162700653, 0.07435347139835358, 0.17217141389846802, 0.18973791599273682, -0.00990910641849041, -0.21877846121788025, -0.11042501032352448, -0.2475452870130539, 0.13259510695934296, -0.5177541971206665, -0.3144540786743164, -0.030056357383728027, 0.14423644542694092, 0.016619548201560974, 0.1290895789861679, -0.18957063555717468, -0.03503398597240448, 0.6898503303527832, -0.1497618705034256, -0.19893616437911987, 0.2052973508834839, -0.23690208792686462, 0.11475884914398193, -0.08574916422367096, 0.23575696349143982, 0.3070056736469269, -0.3275735080242157, 0.17746464908123016, -0.29896432161331177 ]
https://github.com/huggingface/datasets/issues/6422
We have a config variable that controls the batch size in `save_to_disk`: ```python import datasets datasets.config.DEFAULT_MAX_BATCH_SIZE = <smaller_batch_size> ... ds.save_to_disk(...) ```
Allow to choose the `writer_batch_size` when using `save_to_disk`
### Feature request Add an argument in `save_to_disk` regarding batch size, which would be passed to `shard` and other methods. ### Motivation The `Dataset.save_to_disk` method currently calls `shard` without passing a `writer_batch_size` argument, thus implicitly using the default value (1000). This can result in RAM saturation when using a lot of processes on long text sequences or other modalities, or for specific IO configs. ### Your contribution I would be glad to submit a PR, as long as it does not imply extensive tests refactoring.
21
Allow to choose the `writer_batch_size` when using `save_to_disk` ### Feature request Add an argument in `save_to_disk` regarding batch size, which would be passed to `shard` and other methods. ### Motivation The `Dataset.save_to_disk` method currently calls `shard` without passing a `writer_batch_size` argument, thus implicitly using the default value (1000). This can result in RAM saturation when using a lot of processes on long text sequences or other modalities, or for specific IO configs. ### Your contribution I would be glad to submit a PR, as long as it does not imply extensive tests refactoring. We have a config variable that controls the batch size in `save_to_disk`: ```python import datasets datasets.config.DEFAULT_MAX_BATCH_SIZE = <smaller_batch_size> ... ds.save_to_disk(...) ```
[ -0.4314618706703186, -0.1805671751499176, -0.051898352801799774, -0.018587402999401093, 0.021444931626319885, -0.026462405920028687, 0.3796961307525635, 0.23060111701488495, -0.11458665132522583, 0.40544524788856506, 0.2738927900791168, -0.00015321001410484314, -0.3835754096508026, 0.3539934754371643, 0.046428680419921875, -0.07538360357284546, 0.08477093279361725, -0.053808290511369705, 0.2137255072593689, 0.17611338198184967, -0.25882503390312195, 0.11787295341491699, 0.007428504526615143, -0.20992368459701538, -0.14588727056980133, -0.026587380096316338, -0.005060158669948578, 0.03901432454586029, -0.15002477169036865, -0.3812127113342285, 0.004931457340717316, 0.3355003595352173, 0.37481266260147095, 0.15634188055992126, -0.00010956957703456283, -0.266801118850708, 0.3232892155647278, -0.12534719705581665, -0.3148212730884552, 0.04962132126092911, -0.20595771074295044, -0.3676255941390991, -0.11617688089609146, -0.4197853207588196, 0.19847239553928375, 0.26209908723831177, 0.20558735728263855, -0.05282250791788101, 0.07618966698646545, 0.11173392832279205, 0.266986608505249, 0.09967105090618134, -0.09081842750310898, -0.10821709781885147, 0.3324826657772064, 0.5160636305809021, -0.316806435585022, 0.035211436450481415, 0.23207707703113556, 0.08662710338830948, -0.2614925801753998, 0.131698340177536, -0.18692472577095032, 0.02844180539250374, 0.26372772455215454, 0.07173293828964233, 0.37700116634368896, -0.18415763974189758, 0.11334696412086487, 0.2750401198863983, 0.42208805680274963, -0.5202152132987976, -0.3177385628223419, -0.22323259711265564, 0.03423842415213585, -0.415510892868042, -0.12931552529335022, 0.11740793287754059, -0.46037715673446655, 0.03103656694293022, -0.31201624870300293, -0.28328317403793335, -0.21564123034477234, -0.2181178480386734, 0.2815171778202057, -0.16716544330120087, -0.15716566145420074, -0.1541488766670227, 0.34673720598220825, -0.07604074478149414, 0.20416724681854248, -0.18332165479660034, -0.0842745304107666, -0.13643306493759155, -0.25998276472091675, -0.1939956247806549, 0.06470929086208344, 0.26439064741134644, 0.30190593004226685, 0.1329849362373352, 0.08580400049686432, -0.11650057137012482, 0.3670978546142578, 0.037582941353321075, -0.05356253683567047, 0.13807474076747894, 0.28905433416366577, -0.1284789890050888, 0.20907634496688843, -0.08412446826696396, 0.3000046908855438, 0.04781818762421608, 0.366210401058197, -0.3583495318889618, 0.6581647396087646, -0.24148200452327728, 0.11234922707080841, 0.01338387280702591, 0.08888182789087296, 0.09917044639587402, 0.4678734242916107, -0.12612846493721008, -0.06932102143764496, 0.37589022517204285, 0.031158525496721268, -0.08773109316825867, -0.13029232621192932, 0.05070929974317551, -0.031086470931768417, -0.04083504155278206, -0.23258262872695923, -0.042040564119815826, 0.14579585194587708, 0.014760615304112434, 0.2109784483909607, 0.09795358777046204, -0.062434688210487366, -0.03960956633090973, 0.3348485827445984, 0.1894012838602066, 0.050785765051841736, -0.14198465645313263, 0.22458253800868988, 0.25755634903907776, -0.04816115275025368, 0.027999654412269592, -0.16867582499980927, -0.09998509287834167, -0.36019307374954224, 0.4521949589252472, -0.06575542688369751, -0.3699510097503662, -0.04674576222896576, 0.2247428596019745, -0.11705183237791061, -0.04243796318769455, -0.6762945652008057, 0.05872252956032753, 0.2717786431312561, 0.11101026833057404, 0.031863629817962646, -0.2676388621330261, -0.29665860533714294, -0.5773929357528687, 0.26106196641921997, 0.40370041131973267, -0.08515074104070663, 0.03127595782279968, -0.31528764963150024, -0.18527494370937347, 0.16705523431301117, 0.3095029294490814, 0.09218601882457733, -0.10048636794090271, -0.11977432668209076, 0.34700676798820496, 0.4141562581062317, -0.1110571026802063, -0.35416218638420105, 0.21766850352287292, 0.0031613633036613464, -0.17879782617092133, 0.5256275534629822, 0.3720870614051819, 0.5451399683952332, -0.11139148473739624, 0.21916857361793518, 0.41433143615722656, -0.1948627233505249, 0.2829262614250183, -0.4637396037578583, -0.4178599715232849, -0.28763964772224426, 0.22241544723510742, 0.15239453315734863, 0.061936601996421814, 0.020256029441952705, -0.280851274728775, 0.30264046788215637, 0.07054181396961212, 0.3007325530052185, 0.024731259793043137, 0.4984252452850342, -0.26617205142974854, -0.15414024889469147, -0.08980672061443329, -0.1603480875492096, 0.0891927033662796, 0.07008927315473557, -0.14651887118816376, 0.22388921678066254, -0.32104387879371643, 0.04339753836393356, 0.09223566949367523, 0.19935919344425201, 0.15746596455574036, 0.11611630022525787, -0.10183703154325485, -0.012887958437204361, 0.16494876146316528, -0.03650611639022827, 0.1195937767624855, -0.44860249757766724, -0.0708165243268013, -0.006661878898739815, -0.07421224564313889, -0.037531718611717224, -0.29932746291160583, -0.10869006812572479, -0.11685425043106079, -0.17826011776924133, 0.16137099266052246, 0.017458762973546982, 0.26565393805503845, -0.11894302070140839, 0.24830184876918793, -0.19648443162441254, 0.2415844202041626, -0.1489771157503128, 0.2061002552509308, 0.2943762242794037, -0.04210110008716583, -0.07964096963405609, -0.04376426711678505, -0.13044042885303497, 0.2619668245315552, 0.00484896544367075, 0.1540931612253189, 0.06335511803627014, -0.015509117394685745, 0.06764017790555954, -0.06038510799407959, -0.045672688633203506, -0.17656275629997253, -0.007364187389612198, 0.05761510506272316, -0.028632771223783493, -0.08347060531377792, -0.16310110688209534, 0.10548867285251617, 0.4220445156097412, 0.07594650238752365, 0.23963353037834167, 0.4773259162902832, 0.019119109958410263, -0.1217191070318222, -0.043658435344696045, 0.7396141290664673, 0.5237140655517578, 0.24326159060001373, -0.045753832906484604, -0.3014460802078247, -0.0941452831029892, -0.2293175756931305, 0.3014175593852997, 0.08611699193716049, -0.23578821122646332, 0.10900820791721344, -0.05783206224441528, -0.1193506270647049, -0.09552677720785141, -0.08685570955276489, -0.11511203646659851, 0.02690010331571102, -0.14552055299282074, -0.19634932279586792, 0.12857672572135925, 0.08686748147010803, -0.17442715167999268, 0.14728131890296936, -0.21668529510498047, -0.1810271292924881, 0.0921303927898407, 0.36357593536376953, -0.12000918388366699, -0.10426582396030426, 0.031240887939929962, 0.5166975855827332, -0.18827374279499054, -0.19819006323814392, -0.09564008563756943, 0.0326860249042511, 0.08914986252784729, 0.0982993096113205, 0.26398077607154846, -0.17235633730888367, 0.6056510806083679, -0.040801506489515305, 0.07532162219285965, -0.3483287990093231, 0.07283375412225723, -0.23181644082069397, 0.035135988146066666, 0.4599442780017853, 0.08905263245105743, 0.34313517808914185, 0.04031497240066528, -0.07216867804527283, 0.06804895401000977, 0.015301704406738281, -0.07315690070390701, -0.23252996802330017, 0.10924497246742249, -0.07149602472782135, -0.115511953830719, 0.08927632123231888, -0.2855164110660553, -0.48827236890792847, 0.41492822766304016, 0.011528626084327698, 0.1627586930990219, -0.19065088033676147, 0.22059644758701324, -0.06751406192779541, 0.18435688316822052, 0.08328883349895477, 0.009858287870883942, -0.4595079720020294, 0.2759065330028534, -0.296865314245224, -0.19560638070106506, -0.0030702054500579834, 0.14572836458683014, -0.09023497998714447, 0.2075907289981842, -0.31093457341194153, 0.0006325803697109222, -0.4350994825363159, 0.14725646376609802, 0.0017877905629575253, 0.3197996914386749, 0.3340808153152466, 0.1123839020729065, -0.05174737051129341, 0.23307448625564575, -0.38167139887809753, 0.07221304625272751, 0.0972333550453186, 0.14674219489097595, 0.10486194491386414, 0.4488651156425476, 0.12696345150470734, 0.7270860075950623, 0.004457429051399231, 0.055722031742334366, 0.14463648200035095, 0.18361099064350128, 0.17067667841911316, -0.09506532549858093, -0.1987350881099701, 0.23934024572372437, -0.025802701711654663, -0.21674589812755585, 0.008101295679807663, -0.0933891087770462, 0.13222670555114746, 0.2868742048740387, -0.3353424668312073, 0.1572282314300537, -0.2894892394542694, 0.3749534785747528, 0.04460086673498154, 0.2839987874031067, -0.31385189294815063, -0.22322043776512146, -0.3078223466873169, -0.173430934548378, -0.2959785461425781, 0.37282872200012207, 0.12450036406517029, -0.08782297372817993, -0.12681171298027039, 0.1312694251537323, -0.7616192102432251, 0.14048470556735992, 0.05010717734694481, -0.0011402778327465057, -0.04053495079278946, -0.19138674437999725, 0.16696757078170776, 0.19807033240795135, 0.6697558164596558, -0.1677824705839157, -0.15131837129592896, 0.08177858591079712, -0.11831837147474289, -0.25944891571998596, 0.030041471123695374, 0.08681930601596832, 0.09836051613092422, -0.020598001778125763, 0.211100772023201, -0.09864476323127747, -0.031058788299560547, 0.14979171752929688, 0.0939658135175705, -0.16779378056526184, -0.32242533564567566, 0.0066184550523757935, -0.06342058628797531, -0.3528912663459778, 0.2599162757396698, 0.3417678475379944, 0.056503526866436005, -0.2174643874168396, 0.16569100320339203, -0.16227521002292633, -0.08304695039987564, 0.22886818647384644, -0.06724400073289871, 0.26976457238197327, -0.23127707839012146, 0.23192763328552246, -0.42099180817604065, -0.29235973954200745, 0.2474663108587265, -0.17452409863471985, -0.3954787850379944, 0.046663202345371246, -0.06523837149143219, -0.028371669352054596, 0.2581399381160736, 0.29935747385025024, -0.08546750247478485, 0.17843183875083923, -0.04806496202945709, 0.24240455031394958, -0.4404122531414032, -0.25718554854393005, -0.007967429235577583, -0.20871558785438538, -0.35712647438049316, -0.22784042358398438, 0.4524223804473877, 0.053822509944438934, 0.0025575459003448486, 0.09889760613441467, 0.1410064399242401, -0.3565020263195038, 0.4670952260494232, 0.22050893306732178, 0.8824400305747986, -0.03464286029338837, 0.6052802205085754, -0.17812232673168182, 0.04631955921649933, -0.17045219242572784, 0.09891532361507416, 0.07924682646989822, -0.2877948582172394, -0.009169818833470345, 0.14043298363685608, -0.0959116518497467, 0.14744532108306885, 0.11072157323360443, -0.28879234194755554, -0.08689381182193756, -0.011784300208091736, -0.1871129870414734, -0.17007379233837128, 0.23554497957229614, -0.5055410861968994, -0.402098149061203, -0.027243534103035927, 0.17338056862354279, 0.09025412797927856, -0.4099350571632385, 0.08497674763202667, -0.1500200778245926, 0.15738320350646973, -0.11647482216358185, -0.37938395142555237, -0.3259362578392029, -0.17444825172424316, 0.20059406757354736, -0.2092897891998291, -0.3512347936630249, 0.29373812675476074, 0.2952943444252014, 0.4595559239387512, 0.36005210876464844, -0.09703341126441956, 0.035616979002952576, 0.0711764395236969, 0.179295152425766, 0.10729867964982986, -0.18977603316307068, 0.2448706328868866, -0.023766350001096725, -0.07663027942180634, -0.023432258516550064, 0.16634716093540192, -0.4879136085510254, -0.4171100854873657, 0.06299911439418793, 0.11109486222267151, -0.19398106634616852, -0.4861149489879608, -0.23459938168525696, -0.22280004620552063, -0.0711786150932312, 0.21293708682060242, 0.3772670328617096, 0.040740709751844406, 0.6749991178512573, -0.35765254497528076, -0.05294105410575867, -0.18257905542850494, 0.2652023434638977, 0.08282456547021866, -0.09191755205392838, 0.09626421332359314, -0.19448314607143402, -0.16143770515918732, -0.20483063161373138, 0.1777183711528778, -0.23473025858402252, -0.01211588829755783, 0.511260986328125, 0.011773388832807541, -0.000712662935256958, -0.18094836175441742, 0.05368632450699806, 0.06693249940872192, 0.02686261013150215, -0.20862635970115662, -0.00038880109786987305, -0.35709163546562195, 0.006020065397024155, 0.031311679631471634, 0.4791353940963745, -0.032122042030096054, -0.07359234243631363, -0.026111852377653122, 0.0717669427394867, -0.38232558965682983, 0.06212294101715088, 0.14218273758888245, -0.05545728653669357, 0.2666226029396057, 0.14645664393901825, 0.13992741703987122, -0.06079581379890442, 0.002317134290933609, 0.22049814462661743, -0.1422152817249298, -0.28487834334373474, -0.21335870027542114, 0.0918053463101387, -0.17505206167697906, 0.10367962718009949, 0.10559920221567154, -0.20980633795261383, -0.10160351544618607, -0.2049645185470581, 0.19725622236728668, 0.3785441517829895, -0.23897433280944824, 0.03932078555226326, 0.2779163420200348, 0.10183704644441605, 0.15099115669727325, 0.2116517573595047, 0.001681361347436905, 0.01866891235113144, -0.01989578828215599, 0.3364906311035156, -0.17062169313430786, -0.09647578001022339, 0.0035648681223392487, 0.08781761676073074, 0.13143420219421387, 0.14478175342082977, -0.03853871673345566, 0.06068456172943115, -0.3570810556411743, 0.11735129356384277, 0.3309939205646515, -0.055061496794223785, -0.19474902749061584, -0.030533771961927414, 0.30249857902526855, 0.312061071395874, 0.05390569567680359, -0.25336334109306335, 0.17677851021289825, -0.1332913190126419, 0.015144288539886475, 0.1875530481338501, 0.02519878000020981, 0.05319918692111969, -0.15041106939315796, 0.17361664772033691, 0.24936765432357788, -0.5100587606430054, -0.016690349206328392, 0.1885671466588974, 0.06402873992919922, 0.1216527670621872, 0.28368711471557617, 0.12044616788625717, 0.5465455055236816, 0.47463902831077576, 0.03745553642511368, 0.5213942527770996, 0.03629907965660095, -0.13060234487056732, 0.050311315804719925, -0.26817643642425537, 0.23440727591514587, -0.07527648657560349, -0.3427915573120117, 0.39240872859954834, 0.010090682655572891, 0.38552960753440857, -0.08051279932260513, 0.044508591294288635, -0.37470513582229614, -0.0300441961735487, -0.25688406825065613, -0.34561121463775635, 0.23895250260829926, -0.056999169290065765, 0.08352605998516083, 0.08486714959144592, -0.10398009419441223, -0.07168549299240112, 0.22940993309020996, 0.0768125131726265, 0.20427553355693817, 0.2786431312561035, 0.09847517311573029, 0.0006836922839283943, 0.1349962204694748, -0.3642531633377075, -0.3546146750450134, -0.19471749663352966, -0.13688623905181885, -0.05819351226091385, 0.32813119888305664, 0.49966293573379517, 0.2987620234489441, 0.23397661745548248, 0.035731155425310135, 0.005389627069234848, 0.07340554893016815, -0.29202353954315186, -0.03309476003050804, 0.22835126519203186, 0.2528299391269684, 0.08071533590555191, 0.21217863261699677, -0.1788613200187683, -0.030357124283909798, 0.082257479429245, -0.20195434987545013, -0.27708908915519714, 0.13770581781864166, 0.22348618507385254, -0.5397495031356812, -0.1205688863992691, 0.08121122419834137, -0.2966521978378296, -0.1341201663017273, 0.5850855708122253, -0.16552147269248962, 0.029789913445711136, -0.27490365505218506, 0.11207856982946396, -0.018142471089959145, 0.22374650835990906, -0.0005928687751293182, -0.2543954849243164, -0.42146608233451843, 0.028797447681427002, -0.34599557518959045, -0.1756446212530136, 0.1106497123837471, 0.24803340435028076, 0.03453248366713524, 0.2628902792930603, -0.10991519689559937, -0.032436303794384, 0.052173785865306854, -0.2534748613834381, -0.43069785833358765, 0.48479366302490234, -0.08130740374326706, -0.0072309584356844425, 0.13392069935798645, -0.2587220072746277, 0.2888546288013458, -0.337307870388031, 0.2076440304517746, 0.0053801387548446655, 0.11004827916622162, -0.3636629581451416, 0.3305667042732239, 0.41724106669425964, 0.044185057282447815, 0.20704057812690735, -0.05230983346700668, -0.052031010389328, -0.116239994764328, -0.19656670093536377, -0.10115267336368561, 0.25424548983573914, -0.18242591619491577, -0.2283763885498047, 0.17288243770599365, 0.5438427925109863, -0.39793720841407776, -0.11863914132118225, -0.18548771739006042, 0.21814581751823425, -0.14308461546897888, -0.12655210494995117, 0.14352580904960632, -0.053372304886579514, 0.16411276161670685, 0.07754352688789368, 0.1622934341430664, 0.24305374920368195, -0.06920741498470306, 0.34448903799057007, -0.35402539372444153, -0.3435290455818176, 0.17909064888954163, -0.08546549826860428, -0.0597565658390522, -0.24511440098285675, 0.3289031982421875, -0.15607133507728577, 0.07558970898389816, -0.4146276116371155, -0.09055472165346146, 0.11368666589260101, 0.04605107754468918, -0.05597931891679764, 0.504539966583252, 0.0071009621024131775, 0.15213096141815186, -0.03729879856109619, 0.24107474088668823, -0.11319290101528168, -0.07714863121509552, -0.1659938395023346, -0.4223158657550812 ]
https://github.com/huggingface/datasets/issues/6422
Thank you for your answer! From what I am reading in `https://github.com/huggingface/datasets/blob/2.14.5/src/datasets/arrow_dataset.py`, every function involved (`select`, `shard`, ...) has a default hardcoded batch size of 1000, as such: ```python def select( self, indices: Iterable, keep_in_memory: bool = False, indices_cache_file_name: Optional[str] = None, writer_batch_size: Optional[int] = 1000, new_fingerprint: Optional[str] = None, ) -> "Dataset": ... ``` Then, `ArrowWriter` is instantiated with the specified `writer_batch_size`. In `ArrowWriter`, `writer_batch_size` is set to `datasets.config.DEFAULT_MAX_BATCH_SIZE` if it is `None`(https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_writer.py#L345C14-L345C31). However, in our case, it is already set to 1000 by "parent" methods, so it won't happen. Nevertheless, due to this: ```python def _save_to_disk_single(job_id: int, shard: "Dataset", fpath: str, storage_options: Optional[dict]): batch_size = config.DEFAULT_MAX_BATCH_SIZE ... ``` it seems to work. I will use it as such, but it should maybe be added to documentation? And maybe improved in next versions?
Allow to choose the `writer_batch_size` when using `save_to_disk`
### Feature request Add an argument in `save_to_disk` regarding batch size, which would be passed to `shard` and other methods. ### Motivation The `Dataset.save_to_disk` method currently calls `shard` without passing a `writer_batch_size` argument, thus implicitly using the default value (1000). This can result in RAM saturation when using a lot of processes on long text sequences or other modalities, or for specific IO configs. ### Your contribution I would be glad to submit a PR, as long as it does not imply extensive tests refactoring.
134
Allow to choose the `writer_batch_size` when using `save_to_disk` ### Feature request Add an argument in `save_to_disk` regarding batch size, which would be passed to `shard` and other methods. ### Motivation The `Dataset.save_to_disk` method currently calls `shard` without passing a `writer_batch_size` argument, thus implicitly using the default value (1000). This can result in RAM saturation when using a lot of processes on long text sequences or other modalities, or for specific IO configs. ### Your contribution I would be glad to submit a PR, as long as it does not imply extensive tests refactoring. Thank you for your answer! From what I am reading in `https://github.com/huggingface/datasets/blob/2.14.5/src/datasets/arrow_dataset.py`, every function involved (`select`, `shard`, ...) has a default hardcoded batch size of 1000, as such: ```python def select( self, indices: Iterable, keep_in_memory: bool = False, indices_cache_file_name: Optional[str] = None, writer_batch_size: Optional[int] = 1000, new_fingerprint: Optional[str] = None, ) -> "Dataset": ... ``` Then, `ArrowWriter` is instantiated with the specified `writer_batch_size`. In `ArrowWriter`, `writer_batch_size` is set to `datasets.config.DEFAULT_MAX_BATCH_SIZE` if it is `None`(https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_writer.py#L345C14-L345C31). However, in our case, it is already set to 1000 by "parent" methods, so it won't happen. Nevertheless, due to this: ```python def _save_to_disk_single(job_id: int, shard: "Dataset", fpath: str, storage_options: Optional[dict]): batch_size = config.DEFAULT_MAX_BATCH_SIZE ... ``` it seems to work. I will use it as such, but it should maybe be added to documentation? And maybe improved in next versions?
[ -0.4530668258666992, -0.10187280178070068, 0.004923049360513687, 0.05907120928168297, 0.0542483814060688, -0.092894047498703, 0.3411109447479248, 0.13401763141155243, -0.17516355216503143, 0.2381095290184021, 0.20967498421669006, 0.07316283881664276, -0.35989850759506226, 0.14290781319141388, 0.07427024841308594, -0.040074631571769714, -0.01358797401189804, -0.031116623431444168, 0.0977465882897377, 0.14091332256793976, -0.27193811535835266, 0.16300658881664276, -0.0007354468107223511, -0.14165061712265015, -0.20352768898010254, -0.012424373999238014, 0.1187213808298111, 0.10953034460544586, -0.17624950408935547, -0.37939468026161194, 0.1291043758392334, 0.1908927708864212, 0.25690144300460815, 0.14661568403244019, -0.00011784116213675588, -0.14627069234848022, 0.36276039481163025, -0.2790983319282532, -0.4188910722732544, -0.040114402770996094, -0.06359966099262238, -0.22566550970077515, 0.015737950801849365, -0.35903477668762207, 0.2014588713645935, 0.007405146956443787, 0.23200109601020813, -0.1597711592912674, 0.14663366973400116, 0.0934099555015564, 0.20365580916404724, 0.15672893822193146, -0.013312600553035736, -0.0439731664955616, 0.2864335775375366, 0.5654528737068176, -0.32695263624191284, 0.07571566104888916, 0.1355225294828415, 0.18820500373840332, -0.2963252663612366, 0.24456289410591125, 0.018149681389331818, -0.044176917523145676, 0.3535667359828949, 0.14819954335689545, 0.23572620749473572, -0.09904804825782776, 0.21623285114765167, 0.21206538379192352, 0.36382949352264404, -0.5132626295089722, -0.4135500192642212, -0.31237924098968506, 0.0013515092432498932, -0.3933548927307129, -0.05183154717087746, 0.24180331826210022, -0.3728877305984497, -0.023784426972270012, -0.17016135156154633, -0.29481402039527893, -0.24153690040111542, -0.1329297572374344, 0.4180050492286682, -0.20366762578487396, -0.3438277542591095, 0.010600602254271507, 0.48252877593040466, -0.03951806575059891, 0.09930457174777985, -0.23996779322624207, -0.11463819444179535, -0.02000102400779724, -0.3087066113948822, -0.06010844558477402, -0.006651937961578369, 0.25302982330322266, 0.2930014729499817, 0.2527160942554474, 0.18715760111808777, -0.14510028064250946, 0.2894243896007538, -0.006230685859918594, 0.030357439070940018, 0.16896586120128632, 0.39413145184516907, -0.10980361700057983, 0.07842306792736053, 0.017034966498613358, 0.3842473328113556, 0.020951593294739723, 0.3386966586112976, -0.3967507779598236, 0.619819164276123, -0.2721213102340698, 0.23486417531967163, 0.04017709195613861, 0.06012658029794693, 0.09150794893503189, 0.3219810724258423, -0.12130983918905258, 0.009806126356124878, 0.3766137361526489, 0.09609736502170563, -0.06823334097862244, -0.09823275357484818, 0.11764900386333466, -0.017349466681480408, 0.06895686686038971, -0.18642769753932953, -0.08941707015037537, 0.1574157476425171, 0.11671451479196548, 0.2012007236480713, -0.05792168900370598, 0.11690366268157959, -0.11620330810546875, 0.2754737138748169, 0.19513565301895142, 0.030688568949699402, -0.1869920790195465, 0.30352821946144104, 0.3075617253780365, -0.06178382784128189, 0.11402368545532227, -0.2135532796382904, -0.045815467834472656, -0.24772655963897705, 0.4447745084762573, -0.0837801918387413, -0.47551971673965454, -0.12660855054855347, 0.09010149538516998, -0.04825490713119507, 0.053015291690826416, -0.8855423331260681, 0.04806335270404816, 0.36600035429000854, 0.10322694480419159, 0.17468313872814178, -0.25962895154953003, -0.2366848737001419, -0.5514506697654724, 0.24643105268478394, 0.35533425211906433, -0.10222853720188141, -0.06461018323898315, -0.29226231575012207, -0.11015605181455612, 0.17198660969734192, 0.2681596279144287, -0.06977483630180359, -0.2022668421268463, -0.11915718019008636, 0.41336432099342346, 0.41779401898384094, -0.04202286899089813, -0.4729042649269104, 0.18952421844005585, -0.09113703668117523, -0.09528212249279022, 0.4555465281009674, 0.1831764131784439, 0.40989935398101807, -0.1880856454372406, 0.19919727742671967, 0.3282218277454376, -0.06865755468606949, 0.18042652308940887, -0.40008148550987244, -0.4918174743652344, -0.4631585478782654, 0.04519334435462952, 0.006912899203598499, -0.07952209562063217, 0.009916603565216064, -0.31180939078330994, 0.3858058750629425, 0.03396341949701309, 0.4283738136291504, 0.18180397152900696, 0.4626375138759613, -0.33342844247817993, -0.08315803110599518, 0.0015107318758964539, -0.4732653498649597, 0.10657495260238647, -0.0367722362279892, -0.37679630517959595, -0.024864856153726578, -0.32697540521621704, 0.05435226857662201, 0.08206617832183838, 0.03984074294567108, 0.15987931191921234, 0.019211962819099426, 0.008166803047060966, 0.11205186694860458, 0.01804547756910324, -0.06898468732833862, -0.000451747328042984, -0.4614470601081848, 0.043000318109989166, -0.13869796693325043, -0.10483995079994202, 0.12124204635620117, -0.36720651388168335, -0.1735709309577942, -0.14737704396247864, -0.16691887378692627, 0.043468061834573746, 0.010890830308198929, 0.41479334235191345, -0.09051492810249329, 0.29427313804626465, -0.22712719440460205, 0.12219554930925369, -0.1769218146800995, 0.07357200980186462, 0.21669642627239227, -0.09572741389274597, -0.03355928882956505, 0.0655333399772644, -0.258611798286438, 0.26241838932037354, -0.12475872039794922, 0.2754284739494324, 0.08025036752223969, -0.0847679004073143, -0.07375442236661911, 0.1008867546916008, -0.060463543981313705, -0.18989138305187225, -0.13599881529808044, 0.05535460636019707, 0.1742415428161621, 0.027788640931248665, -0.20869657397270203, 0.13318365812301636, 0.39268958568573, 0.10813277959823608, 0.23989294469356537, 0.46541938185691833, -0.09948507696390152, -0.1690290868282318, 0.059428296983242035, 0.6300259232521057, 0.6138898134231567, 0.20277300477027893, -0.03303907439112663, -0.4044078290462494, 0.0023542121052742004, -0.200150266289711, 0.3869018852710724, 0.02993638999760151, -0.04520704597234726, 0.0925966203212738, -0.06397321820259094, -0.17334628105163574, -0.24779701232910156, 0.1092214360833168, -0.04929286986589432, -0.08984848111867905, -0.22904837131500244, -0.1344398409128189, 0.15096968412399292, 0.27761760354042053, -0.20978742837905884, 0.031138639897108078, -0.06610535085201263, -0.20685788989067078, 0.010454114526510239, 0.38718661665916443, -0.14552141726016998, -0.013802645727992058, -0.16699454188346863, 0.46281424164772034, -0.18112537264823914, -0.37343499064445496, -0.11025232076644897, 0.09466917812824249, 0.07916240394115448, 0.028071779757738113, 0.23695164918899536, -0.15698668360710144, 0.44354015588760376, 0.09369011968374252, 0.04143498092889786, -0.4367189109325409, 0.05141117423772812, -0.19660842418670654, -0.0544930100440979, 0.4139474928379059, 0.12044566124677658, 0.335209459066391, -0.10222826898097992, -0.05558096244931221, 0.10410763323307037, 0.05167502909898758, -0.15352800488471985, -0.2325313538312912, 0.010285351425409317, 0.037225645035505295, -0.13388293981552124, 0.13700738549232483, -0.24030795693397522, -0.3923545479774475, 0.571101725101471, 0.04860502481460571, 0.1756463646888733, -0.0461859367787838, 0.15603503584861755, -0.013404648751020432, 0.06393599510192871, 0.11481055617332458, -0.024348275735974312, -0.37880873680114746, 0.3008110523223877, -0.2871312201023102, -0.1314006745815277, -0.0727512389421463, 0.06890306621789932, -0.01384705025702715, 0.18832999467849731, -0.33724209666252136, -0.057664304971694946, -0.4206869900226593, 0.08700841665267944, -0.002527380594983697, 0.44362351298332214, 0.4498935341835022, 0.18226835131645203, -0.00840696319937706, 0.14295566082000732, -0.3266909122467041, 0.22530224919319153, 0.0855274647474289, 0.28714311122894287, 0.2170669138431549, 0.3183112144470215, 0.14039526879787445, 0.9834319949150085, 0.2256079763174057, 0.049774158746004105, 0.21091914176940918, 0.1354653388261795, 0.25741463899612427, -0.20072761178016663, -0.14613673090934753, 0.23266014456748962, -0.1675119400024414, -0.01895381137728691, -0.057679854333400726, -0.12397950142621994, 0.24464651942253113, 0.3889297544956207, -0.2649936378002167, 0.03916815668344498, -0.4071587324142456, 0.43542400002479553, -0.08018743991851807, 0.14527027308940887, -0.2838432192802429, -0.148013636469841, -0.259341299533844, -0.1123945415019989, -0.1716175079345703, 0.24199795722961426, 0.18213070929050446, -0.025210436433553696, -0.08037149161100388, 0.2450297772884369, -0.832638680934906, 0.24817611277103424, -0.02907700650393963, -0.0410722941160202, 0.15177978575229645, -0.28025752305984497, 0.18836283683776855, 0.07419091463088989, 0.5120736360549927, -0.049793411046266556, -0.17016096413135529, -0.09720531105995178, -0.08147759735584259, -0.5407686233520508, 0.08499174565076828, 0.051651425659656525, 0.20560675859451294, -0.28568726778030396, 0.0953112542629242, -0.42187678813934326, -0.15068839490413666, 0.16021443903446198, 0.07646364718675613, -0.07942144572734833, -0.16937041282653809, 0.005365945398807526, -0.06247488409280777, -0.2824406921863556, 0.26704850792884827, 0.24263297021389008, 0.13597111403942108, -0.14783935248851776, 0.2331676483154297, -0.1999729722738266, -0.21024580299854279, 0.07469215989112854, -0.1556788682937622, 0.39817532896995544, -0.19008931517601013, 0.20555852353572845, -0.17725656926631927, -0.09734199941158295, 0.45013511180877686, 0.19317784905433655, -0.45754873752593994, -0.06262241303920746, 0.002023015171289444, 0.013599853962659836, 0.35707932710647583, 0.4503154754638672, -0.2282206416130066, 0.19734656810760498, 0.10431195795536041, 0.1813068687915802, -0.32505491375923157, -0.2898072898387909, 0.060787104070186615, -0.2669948935508728, -0.17878088355064392, -0.03735439479351044, 0.5640683174133301, 0.12970565259456635, -0.014551013708114624, 0.33529165387153625, 0.49663954973220825, -0.32634836435317993, 0.3447929620742798, 0.28442174196243286, 0.9122337102890015, 0.12686799466609955, 0.5766191482543945, -0.16663067042827606, -0.05209989845752716, -0.20585660636425018, 0.2629042863845825, -0.00319519080221653, -0.2879731059074402, 0.06962808966636658, 0.19543829560279846, -0.08890610933303833, 0.05616811662912369, 0.14008894562721252, -0.17045721411705017, -0.10770624876022339, -0.11882716417312622, -0.14111381769180298, -0.23180869221687317, 0.2026359885931015, -0.603983998298645, -0.5135986804962158, -0.09896141290664673, 0.0587523952126503, 0.10243009030818939, -0.2909505367279053, 0.1349009871482849, -0.17797818779945374, 0.045144468545913696, -0.3213317394256592, -0.32709717750549316, -0.27521437406539917, -0.5325654149055481, 0.14111146330833435, -0.01713298261165619, -0.42507311701774597, 0.2908090651035309, 0.30406272411346436, 0.28369346261024475, 0.16973815858364105, -0.15354223549365997, 0.015390034765005112, 0.01628066599369049, 0.266093909740448, 0.04063692316412926, -0.318239688873291, 0.2193721979856491, 0.11353082209825516, 0.008277103304862976, -0.014026273041963577, -0.013236358761787415, -0.44977179169654846, -0.18491847813129425, 0.05402333289384842, -0.0852741152048111, -0.1771073341369629, -0.6211735606193542, -0.22315102815628052, -0.2967853546142578, -0.04661571979522705, 0.10478225350379944, 0.33596283197402954, 0.13385164737701416, 0.495343953371048, -0.33452388644218445, -0.05982749164104462, -0.12194423377513885, 0.3242832124233246, -0.005909234285354614, -0.05716289207339287, 0.3422952890396118, -0.2855897545814514, -0.057502537965774536, -0.10453847050666809, 0.221442312002182, 0.20664668083190918, -0.3631865978240967, 0.5074688196182251, 0.11707107722759247, 0.023418545722961426, -0.09942393004894257, 0.22918719053268433, 0.08850368112325668, 0.12346310913562775, -0.33561956882476807, 0.02455954998731613, -0.3739549517631531, 0.26532474160194397, -0.057238269597291946, 0.466006875038147, -0.08259797841310501, -0.22498798370361328, -0.006010077893733978, 0.18170206248760223, -0.29965999722480774, 0.11852523684501648, 0.17336654663085938, -0.015127258375287056, 0.2011849731206894, 0.19349676370620728, 0.3731788992881775, -0.03303217142820358, -0.07264707237482071, 0.24265481531620026, -0.21082279086112976, -0.18606562912464142, -0.23561562597751617, 0.11877963691949844, -0.07286036759614944, 0.012104399502277374, 0.016530383378267288, -0.263735830783844, -0.09772136807441711, -0.2513130307197571, 0.29787078499794006, 0.29733800888061523, -0.22273319959640503, -0.09014807641506195, 0.3498251438140869, 0.06958445906639099, 0.019738055765628815, 0.11442459374666214, -0.05701131001114845, 0.0942973792552948, -0.04499233514070511, 0.31600573658943176, -0.14418642222881317, -0.14714369177818298, 0.040382664650678635, 0.13183128833770752, 0.21065299212932587, 0.17966118454933167, -0.1927551031112671, -0.03498693183064461, -0.5035118460655212, -0.09783469140529633, 0.377175897359848, 0.1441342681646347, -0.08310383558273315, -0.10737782716751099, 0.09649384021759033, 0.21531027555465698, 0.0819673240184784, -0.1873931586742401, -0.0006679054349660873, -0.13418802618980408, 0.02692873775959015, 0.2828211486339569, -0.020936667919158936, 0.1034621149301529, -0.02451164275407791, 0.12792479991912842, -0.01704275980591774, -0.48182839155197144, 0.0013678967952728271, 0.29104048013687134, 0.06758379936218262, 0.11185552179813385, 0.44747599959373474, 0.1482146829366684, 0.6987130641937256, 0.33496785163879395, -0.15039268136024475, 0.5124015808105469, 0.12022411823272705, -0.10361309349536896, 0.12842190265655518, -0.39179348945617676, 0.12905317544937134, -0.10318344831466675, -0.23967520892620087, 0.3351059556007385, 0.061246588826179504, 0.631718635559082, -0.03498254343867302, -0.025171611458063126, -0.2833700478076935, 0.004581918008625507, -0.2606663703918457, -0.5054051876068115, -0.037967927753925323, -0.09230825304985046, 0.057640329003334045, 0.07775181531906128, -0.25205540657043457, -0.22088438272476196, 0.3774555027484894, -0.0280085988342762, 0.20398929715156555, 0.0886126458644867, 0.01830417849123478, 0.130408376455307, 0.1761169582605362, -0.2882775664329529, -0.045240603387355804, -0.020276617258787155, -0.1317768692970276, -0.12104351818561554, 0.40223389863967896, 0.434543639421463, 0.21195319294929504, 0.24653667211532593, -0.004647109657526016, 0.15704035758972168, 0.0228336900472641, -0.2560169994831085, -0.03885042667388916, 0.24427160620689392, -0.058891411870718, 0.15696892142295837, 0.13444164395332336, -0.17455047369003296, -0.045598290860652924, 0.10809282958507538, -0.08239983022212982, -0.1880294680595398, 0.13490831851959229, 0.07538636028766632, -0.5534680485725403, -0.07761120796203613, 0.0936666876077652, -0.19886644184589386, -0.0840025395154953, 0.5521771907806396, -0.16628624498844147, 0.025731369853019714, -0.26361608505249023, 0.05984307825565338, 0.055140502750873566, 0.4157384932041168, 0.06249803677201271, -0.3266480565071106, -0.41978219151496887, 0.07850776612758636, -0.31951403617858887, -0.25625085830688477, 0.04912407696247101, 0.2985396683216095, 0.0312923900783062, 0.32912975549697876, 0.038553815335035324, 0.001299743540585041, 0.20660853385925293, -0.017142627388238907, -0.20234134793281555, 0.5144088268280029, -0.08786941319704056, 0.059869807213544846, 0.3417545258998871, -0.17189890146255493, 0.2759662866592407, -0.39888709783554077, 0.15771391987800598, 0.05698077753186226, -0.022363055497407913, -0.3445321321487427, 0.3136023283004761, 0.35895097255706787, -0.035426340997219086, 0.3624969720840454, -0.07844361662864685, -0.13157719373703003, -0.07867510616779327, -0.29037603735923767, -0.08008338510990143, 0.2715856730937958, -0.16946816444396973, -0.14801223576068878, 0.24614211916923523, 0.7021610736846924, -0.3369837701320648, -0.17782437801361084, -0.2316094934940338, 0.15373072028160095, -0.09519528597593307, -0.13862837851047516, 0.15840335190296173, 0.0728420615196228, 0.00202951580286026, 0.08672872185707092, 0.13481725752353668, 0.26495885848999023, -0.03755219280719757, 0.31680580973625183, -0.4214450418949127, -0.43205583095550537, 0.3350280821323395, -0.09439502656459808, 0.05713371932506561, -0.07141359895467758, 0.3512411117553711, 0.04607551544904709, -0.06122688204050064, -0.5044707655906677, 0.00900992751121521, 0.10081019997596741, -0.0006301868706941605, -0.12079906463623047, 0.2859486937522888, -0.016057368367910385, 0.2532137930393219, -0.10067645460367203, 0.46724244952201843, -0.09552955627441406, -0.07401186227798462, -0.24753180146217346, -0.4644656181335449 ]
https://github.com/huggingface/datasets/issues/6417
Very strange: `datasets-cli env` > > Copy-and-paste the text below in your GitHub issue. > > - `datasets` version: 2.9.0 > - Platform: macOS-14.0-arm64-arm-64bit > - Python version: 3.9.13 > - PyArrow version: 8.0.0 > - Pandas version: 1.3.5 After updating datasets and pyarrow on base environment, although I am using a different one called layoutLM > Copy-and-paste the text below in your GitHub issue. > > - `datasets` version: 2.14.6 > - Platform: macOS-14.0-arm64-arm-64bit > - Python version: 3.9.18 > - Huggingface_hub version: 0.17.3 > - PyArrow version: 14.0.1 > - Pandas version: 2.1.3
Bug: LayoutLMv3 finetuning on FUNSD Notebook; Arrow Error
### Describe the bug Arrow issues when running the example Notebook laptop locally on Mac with M1. Works on Google Collab. **Notebook**: https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv3/Fine_tune_LayoutLMv3_on_FUNSD_(HuggingFace_Trainer).ipynb **Error**: `ValueError: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.` **Caused by**: ``` # we need to define custom features for `set_format` (used later on) to work properly features = Features({ 'pixel_values': Array3D(dtype="float32", shape=(3, 224, 224)), 'input_ids': Sequence(feature=Value(dtype='int64')), 'attention_mask': Sequence(Value(dtype='int64')), 'bbox': Array2D(dtype="int64", shape=(512, 4)), 'labels': Sequence(feature=Value(dtype='int64')), }) ``` ### Steps to reproduce the bug Run the notebook provided, locally. If possible also on M1. ### Expected behavior The cell where features are mapped to Array2D and Array3D should work without any issues. ### Environment info Tried with Python 3.9 and 3.10 conda envs. Running Mac M1. `pip show datasets` > Name: datasets Version: 2.14.6 Summary: HuggingFace community-driven open-source library of datasets `pip list` > Package Version > ------------------------- ------------ > accelerate 0.24.1 > aiohttp 3.8.6 > aiosignal 1.3.1 > anyio 3.5.0 > appnope 0.1.2 > argon2-cffi 21.3.0 > argon2-cffi-bindings 21.2.0 > asttokens 2.0.5 > async-timeout 4.0.3 > attrs 23.1.0 > backcall 0.2.0 > beautifulsoup4 4.12.2 > bleach 4.1.0 > certifi 2023.7.22 > cffi 1.15.1 > charset-normalizer 3.3.2 > comm 0.1.2 > datasets 2.14.6 > debugpy 1.6.7 > decorator 5.1.1 > defusedxml 0.7.1 > dill 0.3.7 > entrypoints 0.4 > exceptiongroup 1.0.4 > executing 0.8.3 > fastjsonschema 2.16.2 > filelock 3.13.1 > frozenlist 1.4.0 > fsspec 2023.10.0 > huggingface-hub 0.17.3 > idna 3.4 > importlib-metadata 6.0.0 > IProgress 0.4 > ipykernel 6.25.0 > ipython 8.15.0 > ipython-genutils 0.2.0 > jedi 0.18.1 > Jinja2 3.1.2 > joblib 1.3.2 > jsonschema 4.19.2 > jsonschema-specifications 2023.7.1 > jupyter_client 7.4.9 > jupyter_core 5.5.0 > jupyter-server 1.23.4 > jupyterlab-pygments 0.1.2 > MarkupSafe 2.1.1 > matplotlib-inline 0.1.6 > mistune 2.0.4 > mpmath 1.3.0 > multidict 6.0.4 > multiprocess 0.70.15 > nbclassic 1.0.0 > nbclient 0.8.0 > nbconvert 7.10.0 > nbformat 5.9.2 > nest-asyncio 1.5.6 > networkx 3.2.1 > notebook 6.5.4 > notebook_shim 0.2.3 > numpy 1.26.1 > packaging 23.1 > pandas 2.1.3 > pandocfilters 1.5.0 > parso 0.8.3 > pexpect 4.8.0 > pickleshare 0.7.5 > Pillow 10.1.0 > pip 23.3 > platformdirs 3.10.0 > prometheus-client 0.14.1 > prompt-toolkit 3.0.36 > psutil 5.9.0 > ptyprocess 0.7.0 > pure-eval 0.2.2 > pyarrow 14.0.1 > pycparser 2.21 > Pygments 2.15.1 > python-dateutil 2.8.2 > pytz 2023.3.post1 > PyYAML 6.0.1 > pyzmq 23.2.0 > referencing 0.30.2 > regex 2023.10.3 > requests 2.31.0 > rpds-py 0.10.6 > safetensors 0.4.0 > scikit-learn 1.3.2 > scipy 1.11.3 > Send2Trash 1.8.2 > seqeval 1.2.2 > setuptools 68.0.0 > six 1.16.0 > sniffio 1.2.0 > soupsieve 2.5 > stack-data 0.2.0 > sympy 1.12 > terminado 0.17.1 > threadpoolctl 3.2.0 > tinycss2 1.2.1 > tokenizers 0.14.1 > torch 2.1.0 > tornado 6.3.3 > tqdm 4.66.1 > traitlets 5.7.1 > transformers 4.36.0.dev0 > typing_extensions 4.7.1 > tzdata 2023.3 > urllib3 2.0.7 > wcwidth 0.2.5 > webencodings 0.5.1 > websocket-client 0.58.0 > wheel 0.41.2 > xxhash 3.4.1 > yarl 1.9.2 > zipp 3.11.0
95
Bug: LayoutLMv3 finetuning on FUNSD Notebook; Arrow Error ### Describe the bug Arrow issues when running the example Notebook laptop locally on Mac with M1. Works on Google Collab. **Notebook**: https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv3/Fine_tune_LayoutLMv3_on_FUNSD_(HuggingFace_Trainer).ipynb **Error**: `ValueError: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.` **Caused by**: ``` # we need to define custom features for `set_format` (used later on) to work properly features = Features({ 'pixel_values': Array3D(dtype="float32", shape=(3, 224, 224)), 'input_ids': Sequence(feature=Value(dtype='int64')), 'attention_mask': Sequence(Value(dtype='int64')), 'bbox': Array2D(dtype="int64", shape=(512, 4)), 'labels': Sequence(feature=Value(dtype='int64')), }) ``` ### Steps to reproduce the bug Run the notebook provided, locally. If possible also on M1. ### Expected behavior The cell where features are mapped to Array2D and Array3D should work without any issues. ### Environment info Tried with Python 3.9 and 3.10 conda envs. Running Mac M1. `pip show datasets` > Name: datasets Version: 2.14.6 Summary: HuggingFace community-driven open-source library of datasets `pip list` > Package Version > ------------------------- ------------ > accelerate 0.24.1 > aiohttp 3.8.6 > aiosignal 1.3.1 > anyio 3.5.0 > appnope 0.1.2 > argon2-cffi 21.3.0 > argon2-cffi-bindings 21.2.0 > asttokens 2.0.5 > async-timeout 4.0.3 > attrs 23.1.0 > backcall 0.2.0 > beautifulsoup4 4.12.2 > bleach 4.1.0 > certifi 2023.7.22 > cffi 1.15.1 > charset-normalizer 3.3.2 > comm 0.1.2 > datasets 2.14.6 > debugpy 1.6.7 > decorator 5.1.1 > defusedxml 0.7.1 > dill 0.3.7 > entrypoints 0.4 > exceptiongroup 1.0.4 > executing 0.8.3 > fastjsonschema 2.16.2 > filelock 3.13.1 > frozenlist 1.4.0 > fsspec 2023.10.0 > huggingface-hub 0.17.3 > idna 3.4 > importlib-metadata 6.0.0 > IProgress 0.4 > ipykernel 6.25.0 > ipython 8.15.0 > ipython-genutils 0.2.0 > jedi 0.18.1 > Jinja2 3.1.2 > joblib 1.3.2 > jsonschema 4.19.2 > jsonschema-specifications 2023.7.1 > jupyter_client 7.4.9 > jupyter_core 5.5.0 > jupyter-server 1.23.4 > jupyterlab-pygments 0.1.2 > MarkupSafe 2.1.1 > matplotlib-inline 0.1.6 > mistune 2.0.4 > mpmath 1.3.0 > multidict 6.0.4 > multiprocess 0.70.15 > nbclassic 1.0.0 > nbclient 0.8.0 > nbconvert 7.10.0 > nbformat 5.9.2 > nest-asyncio 1.5.6 > networkx 3.2.1 > notebook 6.5.4 > notebook_shim 0.2.3 > numpy 1.26.1 > packaging 23.1 > pandas 2.1.3 > pandocfilters 1.5.0 > parso 0.8.3 > pexpect 4.8.0 > pickleshare 0.7.5 > Pillow 10.1.0 > pip 23.3 > platformdirs 3.10.0 > prometheus-client 0.14.1 > prompt-toolkit 3.0.36 > psutil 5.9.0 > ptyprocess 0.7.0 > pure-eval 0.2.2 > pyarrow 14.0.1 > pycparser 2.21 > Pygments 2.15.1 > python-dateutil 2.8.2 > pytz 2023.3.post1 > PyYAML 6.0.1 > pyzmq 23.2.0 > referencing 0.30.2 > regex 2023.10.3 > requests 2.31.0 > rpds-py 0.10.6 > safetensors 0.4.0 > scikit-learn 1.3.2 > scipy 1.11.3 > Send2Trash 1.8.2 > seqeval 1.2.2 > setuptools 68.0.0 > six 1.16.0 > sniffio 1.2.0 > soupsieve 2.5 > stack-data 0.2.0 > sympy 1.12 > terminado 0.17.1 > threadpoolctl 3.2.0 > tinycss2 1.2.1 > tokenizers 0.14.1 > torch 2.1.0 > tornado 6.3.3 > tqdm 4.66.1 > traitlets 5.7.1 > transformers 4.36.0.dev0 > typing_extensions 4.7.1 > tzdata 2023.3 > urllib3 2.0.7 > wcwidth 0.2.5 > webencodings 0.5.1 > websocket-client 0.58.0 > wheel 0.41.2 > xxhash 3.4.1 > yarl 1.9.2 > zipp 3.11.0 Very strange: `datasets-cli env` > > Copy-and-paste the text below in your GitHub issue. > > - `datasets` version: 2.9.0 > - Platform: macOS-14.0-arm64-arm-64bit > - Python version: 3.9.13 > - PyArrow version: 8.0.0 > - Pandas version: 1.3.5 After updating datasets and pyarrow on base environment, although I am using a different one called layoutLM > Copy-and-paste the text below in your GitHub issue. > > - `datasets` version: 2.14.6 > - Platform: macOS-14.0-arm64-arm-64bit > - Python version: 3.9.18 > - Huggingface_hub version: 0.17.3 > - PyArrow version: 14.0.1 > - Pandas version: 2.1.3
[ -0.12534523010253906, -0.696060299873352, 0.06675893068313599, 0.3161044716835022, 0.36773860454559326, -0.21727141737937927, 0.570938229560852, 0.08089077472686768, -0.18083691596984863, -0.04032056778669357, -0.07140608876943588, 0.6541163921356201, -0.07819987833499908, 0.2054458111524582, -0.13464444875717163, -0.21977442502975464, 0.11867938935756683, 0.04870558902621269, -0.2793351709842682, -0.09834624826908112, -0.24747511744499207, 0.36471736431121826, -0.31691497564315796, 0.14043889939785004, -0.13122504949569702, -0.04667335003614426, 0.07013554126024246, -0.006347630172967911, -0.007894502952694893, -0.16618308424949646, 0.33295053243637085, -0.3438020944595337, 0.09941326081752777, 0.18481820821762085, -0.00012145263463025913, -0.03654574602842331, 0.44145384430885315, -0.008131574839353561, -0.0974501520395279, -0.09651193767786026, 0.09714213013648987, -0.21189171075820923, 0.25351107120513916, -0.2662365138530731, -0.10398924350738525, 0.007917549461126328, -0.5289362668991089, -0.2778090834617615, 0.4964022636413574, 0.3365890681743622, 0.15733130276203156, 0.3986642360687256, 0.09910573065280914, -0.1003585085272789, 0.6133680939674377, 0.4561447501182556, -0.34079140424728394, 0.3663225471973419, 0.23519547283649445, -0.028368255123496056, 0.2728923559188843, 0.4842063784599304, -0.1933593451976776, 0.12886935472488403, 0.3461785912513733, 0.21665948629379272, -0.03984852135181427, 0.01934605836868286, -0.12752732634544373, 0.3019849359989166, 0.23719367384910583, -0.3270748257637024, -0.25313788652420044, -0.37092137336730957, 0.019623469561338425, -0.43811389803886414, 0.3114137649536133, 0.011742666363716125, -0.1303609162569046, -0.021410973742604256, -0.21591916680335999, 0.03575240448117256, -0.3441670536994934, 0.12440384179353714, 0.015376269817352295, 0.32715362310409546, -0.31751322746276855, 0.1380406767129898, -0.11145436763763428, -0.030133895576000214, 0.23012590408325195, 0.2110556960105896, -0.01189169380813837, -0.07308676093816757, -0.17842720448970795, -0.038462165743112564, -0.10276835411787033, -0.17662759125232697, 0.00421268492937088, -0.12136472761631012, 0.04474722966551781, -0.1994406133890152, 0.30903956294059753, 0.021742582321166992, -0.11821508407592773, 0.32300910353660583, 0.03924570977687836, 0.24495401978492737, 0.09794625639915466, 0.21658068895339966, 0.3030691146850586, -0.04046168550848961, -0.008604723960161209, -0.16112296283245087, -0.2950296998023987, 0.04039709270000458, 0.4466570019721985, 0.011044792830944061, -0.298869788646698, 0.19922274351119995, -0.23719151318073273, 0.043688926845788956, 0.043481044471263885, 0.3199768662452698, 0.0206746943295002, -0.013129619881510735, 0.09933856874704361, 0.23359021544456482, -0.3060075044631958, 0.1828283965587616, 0.02308296039700508, 0.14660581946372986, -0.27688542008399963, -0.1773577630519867, -0.14081251621246338, 0.30855128169059753, 0.08265001326799393, -0.07189039140939713, -0.18546190857887268, 0.07684773206710815, -0.234370157122612, 0.1828969419002533, 0.2713305950164795, 0.19087594747543335, -0.33922311663627625, 0.0022307485342025757, -0.01707969605922699, 0.25045067071914673, -0.18041235208511353, 0.10067792236804962, -0.17757181823253632, -0.14915046095848083, -0.34003618359565735, 0.07882324606180191, -0.2586345672607422, 0.08527150750160217, -0.2883613705635071, 0.1057172566652298, -0.021334335207939148, 0.1327606439590454, 0.4869849383831024, -0.19292379915714264, -0.05577746406197548, -0.09742368757724762, 0.26880866289138794, 0.12558995187282562, -0.11502142250537872, -0.2942271828651428, -0.1411074697971344, 0.11133433878421783, 0.15547560155391693, 0.37615150213241577, 0.04414324834942818, -0.03788367658853531, -0.17656874656677246, 0.04953494668006897, 0.39448750019073486, -0.45270925760269165, -0.5630806088447571, -0.00801217183470726, -0.14294834434986115, 0.0414840504527092, 0.023634225130081177, -0.02191908098757267, -0.15740476548671722, 0.2757280468940735, -0.06347529590129852, 0.4356178939342499, 0.0038285553455352783, 0.05153612792491913, -0.2261921465396881, -0.1327921748161316, 0.2279190719127655, -0.023634623736143112, -0.13602977991104126, -0.25632673501968384, 0.10487980395555496, -0.2988581955432892, 0.14848162233829498, -0.1724599003791809, -0.12743788957595825, 0.13236914575099945, 0.529113233089447, -0.056830212473869324, 0.14269693195819855, -0.12669573724269867, -0.8501917123794556, 0.008993782103061676, -0.02566053345799446, 0.04298916459083557, -0.2701914608478546, 0.0090574249625206, -0.1950027048587799, 0.1405133157968521, -0.2136688530445099, -0.3861229717731476, -0.01798313856124878, -0.10737297683954239, 0.0523800253868103, -0.005741409957408905, -0.18663182854652405, 0.04056362062692642, 0.007464520633220673, 0.2530513405799866, -0.4582872986793518, 0.28149837255477905, 0.0000057872384786605835, -0.35302039980888367, -0.12271681427955627, 0.37781649827957153, 0.00482301227748394, -0.20007961988449097, -0.18731914460659027, 0.3001510500907898, 0.23274417221546173, 0.03586449846625328, -0.29222142696380615, -0.054989248514175415, 0.345184862613678, -0.3689199686050415, -0.027368534356355667, 0.1470244824886322, 0.06704922020435333, 0.35911083221435547, -0.4033459424972534, 0.5544772148132324, -0.06643994897603989, 0.1739121675491333, -0.15052202343940735, 0.34053468704223633, -0.04474802687764168, 0.08824694901704788, -0.1282983124256134, -0.356827974319458, 0.258712500333786, 0.28826358914375305, 0.3878117799758911, -0.022546250373125076, -0.13106346130371094, 0.11304111033678055, 0.31306952238082886, -0.001326039433479309, 0.2666402757167816, 0.11391977965831757, -0.40573957562446594, 0.11362888664007187, 0.43939757347106934, 0.014371730387210846, 0.32312488555908203, 0.05333234742283821, -0.1792595535516739, 0.32240739464759827, -0.1224234327673912, -0.05080248787999153, 0.23256950080394745, -0.009331416338682175, 0.2779378890991211, 0.008430203422904015, 0.3019275665283203, 0.14938390254974365, -0.24121981859207153, -0.06631110608577728, -0.11576336622238159, 0.06766779720783234, -0.48637616634368896, 0.013681486248970032, -0.20913849771022797, -0.24627017974853516, -0.14455269277095795, -0.38420963287353516, -0.23032522201538086, -0.0134071484208107, -0.10567326843738556, 0.13073933124542236, -0.03044682741165161, 0.36051690578460693, 0.2868976294994354, 0.2851731777191162, 0.2741606831550598, -0.080597423017025, -0.182038813829422, -0.1333712637424469, -0.28291386365890503, -0.07664033770561218, 0.10501347482204437, 0.08370048552751541, 0.026246657595038414, -0.08540324121713638, -0.007223963737487793, -0.4161306321620941, -0.6337041854858398, 0.2230602651834488, -0.3353947699069977, 0.39845505356788635, 0.4529262185096741, -0.17412179708480835, 0.011149242520332336, 0.1878199279308319, 0.5270155072212219, 0.01719704270362854, -0.40267279744148254, 0.17506146430969238, 0.03573383763432503, -0.19708076119422913, -0.12016907334327698, -0.10372558236122131, -0.054955173283815384, -0.18533393740653992, 0.6761680841445923, -0.39407601952552795, -0.02733476087450981, 0.32977408170700073, 0.16103163361549377, 0.19279424846172333, -0.13910628855228424, -0.05957804620265961, -0.046951498836278915, 0.3723604381084442, 0.3424873352050781, -0.14806652069091797, -0.26175302267074585, -0.24234187602996826, -0.06128275394439697, 0.1632096916437149, 0.20356154441833496, -0.3600442409515381, -0.2576644718647003, -0.47878706455230713, 0.31231480836868286, -0.12855181097984314, 0.13562168180942535, 0.32702118158340454, 0.06088544800877571, 0.1883464753627777, -0.17480528354644775, -0.3214896023273468, 0.25642427802085876, 0.14768902957439423, 0.025034664198756218, 0.13139423727989197, 0.4285260736942291, -0.11590775847434998, 0.20504210889339447, 0.22914321720600128, -0.017826862633228302, 0.30913013219833374, -0.193733349442482, 0.3082851469516754, -0.12413011491298676, -0.261010080575943, 0.2761947214603424, -0.025538936257362366, -0.10072383284568787, -0.02943240851163864, -0.035530734807252884, -0.0006783343851566315, -0.017551429569721222, -0.12254214286804199, -0.02747071534395218, -0.1784115731716156, -0.07338844239711761, -0.028780747205018997, 0.02629682421684265, -0.21594052016735077, 0.23374074697494507, 0.00035209208726882935, -0.04705965518951416, 0.4023664891719818, 0.01587323471903801, 0.016925910487771034, -0.0008368529379367828, -0.46614348888397217, -0.4018767774105072, -0.25948798656463623, 0.3158988058567047, 0.05696742981672287, 0.46913018822669983, -0.03427398204803467, -0.2820245027542114, 0.056439485400915146, 0.07886995375156403, 0.2599729299545288, -0.08172674477100372, -0.11436168849468231, 0.01731204241514206, -0.05934403836727142, -0.42600712180137634, -0.30188778042793274, -0.11274069547653198, -0.02761186473071575, 0.04524892568588257, 0.8554574847221375, -0.07230589538812637, -0.04765584319829941, 0.17061744630336761, -0.18661490082740784, 0.13150112330913544, -0.23054766654968262, -0.15937671065330505, -0.08812118321657181, -0.044695913791656494, 0.0765504315495491, 0.26702964305877686, 0.03986164554953575, 0.1973489671945572, -0.11832921952009201, -0.18422634899616241, -0.3291717767715454, -0.23950038850307465, 0.33319705724716187, 0.25625449419021606, -0.21150968968868256, 0.10378478467464447, 0.028548434376716614, 0.29201048612594604, 0.28017115592956543, 0.6490312814712524, 0.1183437705039978, -0.8898884654045105, -0.02178644761443138, -0.20390187203884125, 0.4125310182571411, 0.3699432611465454, -0.13044430315494537, -0.013272665441036224, -0.2471325546503067, 0.12340686470270157, -0.14466315507888794, -0.043081216514110565, 0.41048967838287354, 0.22098694741725922, 0.215646892786026, 0.22042210400104523, 0.4660000503063202, 0.10989221930503845, 0.06906741857528687, 0.32544124126434326, 0.018363116309046745, -0.2655954658985138, 0.15802139043807983, 0.35443875193595886, 0.6253793835639954, 0.11413956433534622, 0.1546269804239273, 0.5849330425262451, -0.31790632009506226, 0.49124860763549805, 0.5121313333511353, 0.19632834196090698, -0.41855472326278687, -0.2194409817457199, -0.00370614230632782, -0.2762893736362457, 0.18027612566947937, -0.3207347095012665, -0.09642671048641205, 0.026056788861751556, -0.025473006069660187, 0.19785624742507935, -0.11078214645385742, -0.05868671461939812, 0.07037024199962616, -0.18929213285446167, -0.5188755393028259, -0.022308889776468277, -0.06283517181873322, 0.17362836003303528, 0.07090796530246735, -0.04200422018766403, -0.4873078465461731, -0.3005646765232086, -0.40076369047164917, 0.1701899915933609, -0.6829379796981812, -0.11726273596286774, 0.4424038231372833, -0.6239643096923828, 0.08363564312458038, 0.1658734381198883, 0.07737880945205688, -0.09358078241348267, -0.17096646130084991, 0.05606730654835701, 0.3395838737487793, 0.12933194637298584, 0.18834227323532104, -0.26194870471954346, 0.10020215809345245, -0.055297575891017914, 0.18069124221801758, 0.15926256775856018, -0.01740066334605217, 0.002411291003227234, 0.02820645272731781, -0.08800700306892395, 0.13893966376781464, -0.12213683128356934, -0.017336759716272354, -0.4156929850578308, 0.237970769405365, -0.13953901827335358, -0.0001582866534590721, -0.21672779321670532, -0.038719575852155685, 0.012048188596963882, -0.1686810851097107, -0.30524879693984985, -0.13050203025341034, 0.01338956132531166, -0.2371637523174286, -0.061458948999643326, 0.13001692295074463, 0.4529447853565216, -0.11587758362293243, -0.05017855018377304, 0.21420684456825256, 0.4644380807876587, -0.5296173095703125, 0.061730798333883286, -0.3326205015182495, -0.3748682737350464, -0.022757727652788162, 0.7615768313407898, 0.3988116979598999, -0.15083429217338562, 0.03779838979244232, -0.110031858086586, -0.3412110209465027, 0.21857410669326782, -0.20928223431110382, 0.11530255526304245, 0.01725887507200241, 0.02413172647356987, -0.07387775182723999, -0.16520492732524872, -0.1876833736896515, -0.06989198923110962, 0.2611859440803528, -0.0016182968392968178, -0.005190527066588402, -0.10902832448482513, 0.13470806181430817, -0.04666801914572716, 0.05918242782354355, 0.16988658905029297, 0.009749259799718857, -0.056344084441661835, -0.19875961542129517, 0.12615707516670227, 0.06289611756801605, -0.27076950669288635, -0.09711484611034393, -0.04875701293349266, -0.16110943257808685, -0.3481003940105438, 0.10281272232532501, 0.07572151720523834, 0.025527557358145714, 0.09101533889770508, -0.12447210401296616, -0.17576631903648376, -0.012744933366775513, 0.17341990768909454, -0.06610377132892609, -0.034049708396196365, 0.038064099848270416, 0.138096421957016, 0.004340071231126785, 0.1512480080127716, -0.012886624783277512, -0.07505159825086594, -0.17658734321594238, 0.12895680963993073, 0.18434850871562958, -0.3119109272956848, -0.2712925970554352, -0.0043250806629657745, 0.3095836043357849, 0.3724922835826874, -0.18981096148490906, -0.2435145229101181, 0.2774921655654907, 0.10311991721391678, -0.3070523738861084, -0.06895487010478973, 0.08008107542991638, 0.17157001793384552, 0.04578813165426254, 0.46865421533584595, 0.15126237273216248, 0.17747557163238525, -0.1275116205215454, 0.15692901611328125, 0.15787377953529358, 0.16691045463085175, 0.13826054334640503, 0.1982087641954422, -0.014045588672161102, 0.19762611389160156, 0.44577139616012573, 0.08521490544080734, 0.38793113827705383, 0.08608755469322205, 0.1779722422361374, -0.2575432360172272, 0.11328708380460739, 0.2974449098110199, 0.11310990154743195, -0.12281802296638489, -0.2761599123477936, -0.32357606291770935, 0.08263704180717468, 0.2023909091949463, 0.0474986769258976, 0.4028932750225067, -0.1623571813106537, -0.41373148560523987, -0.11730092018842697, 0.11574758589267731, -0.3435744345188141, -0.04780988022685051, 0.14972883462905884, 0.05678172409534454, -0.1929156482219696, 0.04203715920448303, -0.2991088032722473, 0.12514528632164001, 0.7464714050292969, 0.15188920497894287, 0.013101648539304733, -0.2029692530632019, -0.03877393528819084, 0.42365211248397827, 0.1975306123495102, -0.2921440899372101, 0.5381500124931335, -0.13089177012443542, -0.1147095113992691, -0.2473423182964325, 0.3393949866294861, 0.43882715702056885, 0.44756442308425903, -0.3689444959163666, -0.25780802965164185, 0.05304750055074692, -0.020327281206846237, 0.05460527539253235, 0.0827101469039917, 0.1559615433216095, 0.21761104464530945, 0.16701741516590118, 0.04905072972178459, -0.0018974021077156067, 0.3978669345378876, -0.2107885330915451, 0.002175740897655487, -0.06791911274194717, -0.08580195903778076, -0.4921215772628784, -0.0701250284910202, -0.1432984173297882, -0.15550580620765686, -0.3343085050582886, 0.0815500020980835, 0.3406003713607788, 0.11420498788356781, 0.03479072079062462, 0.02355293184518814, 0.016059480607509613, 0.08494772762060165, 0.3985479474067688, 0.47035396099090576, 0.21631619334220886, -0.11333324015140533, -0.17388606071472168, -0.22850053012371063, 0.22218729555606842, -0.07417692244052887, -0.31102070212364197, 0.41028305888175964, 0.08553622663021088, 0.08264761418104172, 0.05065527558326721, 0.3875896632671356, 0.1930205225944519, 0.04072640836238861, 0.23571178317070007, -0.4566701650619507, -0.060578376054763794, 0.2098105251789093, -0.20703256130218506, 0.12582197785377502, -0.15178029239177704, 0.13190536201000214, 0.09488312155008316, -0.17469239234924316, -0.14353761076927185, 0.0955485850572586, -0.12985394895076752, 0.20121309161186218, 0.28925958275794983, 0.13929660618305206, 0.07166816294193268, -0.0037493109703063965, -0.32989707589149475, -0.21971495449543, -0.12848705053329468, -0.2368428111076355, 0.437583327293396, -0.09658530354499817, 0.22665777802467346, -0.09698536992073059, 0.21598993241786957, -0.5038161277770996, 0.27774301171302795, 0.36222758889198303, -0.08471947908401489, -0.14157846570014954, 0.5312905311584473, -0.3111187517642975, -0.0194772370159626, 0.1203899011015892, 0.2818703055381775, 0.0020251907408237457, 0.36012786626815796, -0.31873172521591187, -0.4479318857192993, 0.36160868406295776, -0.4161418080329895, -0.1680966317653656, 0.27484405040740967, 0.04063153266906738, 0.49539318680763245, -0.05714802443981171, -0.6938846111297607, -0.2602962255477905, 0.19602741301059723, -0.037261247634887695, -0.1259707659482956, 0.016873199492692947, 0.19719329476356506, -0.011752910912036896, -0.12864337861537933, 0.714934766292572, -0.01684688962996006, -0.18918222188949585, 0.060202471911907196, -0.2248130589723587 ]
https://github.com/huggingface/datasets/issues/6417
Hi! The latest (patch) release (published a few hours ago) includes a fix for this [PyArrow security issue](https://github.com/advisories/GHSA-5wvp-7f3h-6wmm). To install it, run `pip install -U datasets`.
Bug: LayoutLMv3 finetuning on FUNSD Notebook; Arrow Error
### Describe the bug Arrow issues when running the example Notebook laptop locally on Mac with M1. Works on Google Collab. **Notebook**: https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv3/Fine_tune_LayoutLMv3_on_FUNSD_(HuggingFace_Trainer).ipynb **Error**: `ValueError: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.` **Caused by**: ``` # we need to define custom features for `set_format` (used later on) to work properly features = Features({ 'pixel_values': Array3D(dtype="float32", shape=(3, 224, 224)), 'input_ids': Sequence(feature=Value(dtype='int64')), 'attention_mask': Sequence(Value(dtype='int64')), 'bbox': Array2D(dtype="int64", shape=(512, 4)), 'labels': Sequence(feature=Value(dtype='int64')), }) ``` ### Steps to reproduce the bug Run the notebook provided, locally. If possible also on M1. ### Expected behavior The cell where features are mapped to Array2D and Array3D should work without any issues. ### Environment info Tried with Python 3.9 and 3.10 conda envs. Running Mac M1. `pip show datasets` > Name: datasets Version: 2.14.6 Summary: HuggingFace community-driven open-source library of datasets `pip list` > Package Version > ------------------------- ------------ > accelerate 0.24.1 > aiohttp 3.8.6 > aiosignal 1.3.1 > anyio 3.5.0 > appnope 0.1.2 > argon2-cffi 21.3.0 > argon2-cffi-bindings 21.2.0 > asttokens 2.0.5 > async-timeout 4.0.3 > attrs 23.1.0 > backcall 0.2.0 > beautifulsoup4 4.12.2 > bleach 4.1.0 > certifi 2023.7.22 > cffi 1.15.1 > charset-normalizer 3.3.2 > comm 0.1.2 > datasets 2.14.6 > debugpy 1.6.7 > decorator 5.1.1 > defusedxml 0.7.1 > dill 0.3.7 > entrypoints 0.4 > exceptiongroup 1.0.4 > executing 0.8.3 > fastjsonschema 2.16.2 > filelock 3.13.1 > frozenlist 1.4.0 > fsspec 2023.10.0 > huggingface-hub 0.17.3 > idna 3.4 > importlib-metadata 6.0.0 > IProgress 0.4 > ipykernel 6.25.0 > ipython 8.15.0 > ipython-genutils 0.2.0 > jedi 0.18.1 > Jinja2 3.1.2 > joblib 1.3.2 > jsonschema 4.19.2 > jsonschema-specifications 2023.7.1 > jupyter_client 7.4.9 > jupyter_core 5.5.0 > jupyter-server 1.23.4 > jupyterlab-pygments 0.1.2 > MarkupSafe 2.1.1 > matplotlib-inline 0.1.6 > mistune 2.0.4 > mpmath 1.3.0 > multidict 6.0.4 > multiprocess 0.70.15 > nbclassic 1.0.0 > nbclient 0.8.0 > nbconvert 7.10.0 > nbformat 5.9.2 > nest-asyncio 1.5.6 > networkx 3.2.1 > notebook 6.5.4 > notebook_shim 0.2.3 > numpy 1.26.1 > packaging 23.1 > pandas 2.1.3 > pandocfilters 1.5.0 > parso 0.8.3 > pexpect 4.8.0 > pickleshare 0.7.5 > Pillow 10.1.0 > pip 23.3 > platformdirs 3.10.0 > prometheus-client 0.14.1 > prompt-toolkit 3.0.36 > psutil 5.9.0 > ptyprocess 0.7.0 > pure-eval 0.2.2 > pyarrow 14.0.1 > pycparser 2.21 > Pygments 2.15.1 > python-dateutil 2.8.2 > pytz 2023.3.post1 > PyYAML 6.0.1 > pyzmq 23.2.0 > referencing 0.30.2 > regex 2023.10.3 > requests 2.31.0 > rpds-py 0.10.6 > safetensors 0.4.0 > scikit-learn 1.3.2 > scipy 1.11.3 > Send2Trash 1.8.2 > seqeval 1.2.2 > setuptools 68.0.0 > six 1.16.0 > sniffio 1.2.0 > soupsieve 2.5 > stack-data 0.2.0 > sympy 1.12 > terminado 0.17.1 > threadpoolctl 3.2.0 > tinycss2 1.2.1 > tokenizers 0.14.1 > torch 2.1.0 > tornado 6.3.3 > tqdm 4.66.1 > traitlets 5.7.1 > transformers 4.36.0.dev0 > typing_extensions 4.7.1 > tzdata 2023.3 > urllib3 2.0.7 > wcwidth 0.2.5 > webencodings 0.5.1 > websocket-client 0.58.0 > wheel 0.41.2 > xxhash 3.4.1 > yarl 1.9.2 > zipp 3.11.0
26
Bug: LayoutLMv3 finetuning on FUNSD Notebook; Arrow Error ### Describe the bug Arrow issues when running the example Notebook laptop locally on Mac with M1. Works on Google Collab. **Notebook**: https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv3/Fine_tune_LayoutLMv3_on_FUNSD_(HuggingFace_Trainer).ipynb **Error**: `ValueError: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.` **Caused by**: ``` # we need to define custom features for `set_format` (used later on) to work properly features = Features({ 'pixel_values': Array3D(dtype="float32", shape=(3, 224, 224)), 'input_ids': Sequence(feature=Value(dtype='int64')), 'attention_mask': Sequence(Value(dtype='int64')), 'bbox': Array2D(dtype="int64", shape=(512, 4)), 'labels': Sequence(feature=Value(dtype='int64')), }) ``` ### Steps to reproduce the bug Run the notebook provided, locally. If possible also on M1. ### Expected behavior The cell where features are mapped to Array2D and Array3D should work without any issues. ### Environment info Tried with Python 3.9 and 3.10 conda envs. Running Mac M1. `pip show datasets` > Name: datasets Version: 2.14.6 Summary: HuggingFace community-driven open-source library of datasets `pip list` > Package Version > ------------------------- ------------ > accelerate 0.24.1 > aiohttp 3.8.6 > aiosignal 1.3.1 > anyio 3.5.0 > appnope 0.1.2 > argon2-cffi 21.3.0 > argon2-cffi-bindings 21.2.0 > asttokens 2.0.5 > async-timeout 4.0.3 > attrs 23.1.0 > backcall 0.2.0 > beautifulsoup4 4.12.2 > bleach 4.1.0 > certifi 2023.7.22 > cffi 1.15.1 > charset-normalizer 3.3.2 > comm 0.1.2 > datasets 2.14.6 > debugpy 1.6.7 > decorator 5.1.1 > defusedxml 0.7.1 > dill 0.3.7 > entrypoints 0.4 > exceptiongroup 1.0.4 > executing 0.8.3 > fastjsonschema 2.16.2 > filelock 3.13.1 > frozenlist 1.4.0 > fsspec 2023.10.0 > huggingface-hub 0.17.3 > idna 3.4 > importlib-metadata 6.0.0 > IProgress 0.4 > ipykernel 6.25.0 > ipython 8.15.0 > ipython-genutils 0.2.0 > jedi 0.18.1 > Jinja2 3.1.2 > joblib 1.3.2 > jsonschema 4.19.2 > jsonschema-specifications 2023.7.1 > jupyter_client 7.4.9 > jupyter_core 5.5.0 > jupyter-server 1.23.4 > jupyterlab-pygments 0.1.2 > MarkupSafe 2.1.1 > matplotlib-inline 0.1.6 > mistune 2.0.4 > mpmath 1.3.0 > multidict 6.0.4 > multiprocess 0.70.15 > nbclassic 1.0.0 > nbclient 0.8.0 > nbconvert 7.10.0 > nbformat 5.9.2 > nest-asyncio 1.5.6 > networkx 3.2.1 > notebook 6.5.4 > notebook_shim 0.2.3 > numpy 1.26.1 > packaging 23.1 > pandas 2.1.3 > pandocfilters 1.5.0 > parso 0.8.3 > pexpect 4.8.0 > pickleshare 0.7.5 > Pillow 10.1.0 > pip 23.3 > platformdirs 3.10.0 > prometheus-client 0.14.1 > prompt-toolkit 3.0.36 > psutil 5.9.0 > ptyprocess 0.7.0 > pure-eval 0.2.2 > pyarrow 14.0.1 > pycparser 2.21 > Pygments 2.15.1 > python-dateutil 2.8.2 > pytz 2023.3.post1 > PyYAML 6.0.1 > pyzmq 23.2.0 > referencing 0.30.2 > regex 2023.10.3 > requests 2.31.0 > rpds-py 0.10.6 > safetensors 0.4.0 > scikit-learn 1.3.2 > scipy 1.11.3 > Send2Trash 1.8.2 > seqeval 1.2.2 > setuptools 68.0.0 > six 1.16.0 > sniffio 1.2.0 > soupsieve 2.5 > stack-data 0.2.0 > sympy 1.12 > terminado 0.17.1 > threadpoolctl 3.2.0 > tinycss2 1.2.1 > tokenizers 0.14.1 > torch 2.1.0 > tornado 6.3.3 > tqdm 4.66.1 > traitlets 5.7.1 > transformers 4.36.0.dev0 > typing_extensions 4.7.1 > tzdata 2023.3 > urllib3 2.0.7 > wcwidth 0.2.5 > webencodings 0.5.1 > websocket-client 0.58.0 > wheel 0.41.2 > xxhash 3.4.1 > yarl 1.9.2 > zipp 3.11.0 Hi! The latest (patch) release (published a few hours ago) includes a fix for this [PyArrow security issue](https://github.com/advisories/GHSA-5wvp-7f3h-6wmm). To install it, run `pip install -U datasets`.
[ -0.12534523010253906, -0.696060299873352, 0.06675893068313599, 0.3161044716835022, 0.36773860454559326, -0.21727141737937927, 0.570938229560852, 0.08089077472686768, -0.18083691596984863, -0.04032056778669357, -0.07140608876943588, 0.6541163921356201, -0.07819987833499908, 0.2054458111524582, -0.13464444875717163, -0.21977442502975464, 0.11867938935756683, 0.04870558902621269, -0.2793351709842682, -0.09834624826908112, -0.24747511744499207, 0.36471736431121826, -0.31691497564315796, 0.14043889939785004, -0.13122504949569702, -0.04667335003614426, 0.07013554126024246, -0.006347630172967911, -0.007894502952694893, -0.16618308424949646, 0.33295053243637085, -0.3438020944595337, 0.09941326081752777, 0.18481820821762085, -0.00012145263463025913, -0.03654574602842331, 0.44145384430885315, -0.008131574839353561, -0.0974501520395279, -0.09651193767786026, 0.09714213013648987, -0.21189171075820923, 0.25351107120513916, -0.2662365138530731, -0.10398924350738525, 0.007917549461126328, -0.5289362668991089, -0.2778090834617615, 0.4964022636413574, 0.3365890681743622, 0.15733130276203156, 0.3986642360687256, 0.09910573065280914, -0.1003585085272789, 0.6133680939674377, 0.4561447501182556, -0.34079140424728394, 0.3663225471973419, 0.23519547283649445, -0.028368255123496056, 0.2728923559188843, 0.4842063784599304, -0.1933593451976776, 0.12886935472488403, 0.3461785912513733, 0.21665948629379272, -0.03984852135181427, 0.01934605836868286, -0.12752732634544373, 0.3019849359989166, 0.23719367384910583, -0.3270748257637024, -0.25313788652420044, -0.37092137336730957, 0.019623469561338425, -0.43811389803886414, 0.3114137649536133, 0.011742666363716125, -0.1303609162569046, -0.021410973742604256, -0.21591916680335999, 0.03575240448117256, -0.3441670536994934, 0.12440384179353714, 0.015376269817352295, 0.32715362310409546, -0.31751322746276855, 0.1380406767129898, -0.11145436763763428, -0.030133895576000214, 0.23012590408325195, 0.2110556960105896, -0.01189169380813837, -0.07308676093816757, -0.17842720448970795, -0.038462165743112564, -0.10276835411787033, -0.17662759125232697, 0.00421268492937088, -0.12136472761631012, 0.04474722966551781, -0.1994406133890152, 0.30903956294059753, 0.021742582321166992, -0.11821508407592773, 0.32300910353660583, 0.03924570977687836, 0.24495401978492737, 0.09794625639915466, 0.21658068895339966, 0.3030691146850586, -0.04046168550848961, -0.008604723960161209, -0.16112296283245087, -0.2950296998023987, 0.04039709270000458, 0.4466570019721985, 0.011044792830944061, -0.298869788646698, 0.19922274351119995, -0.23719151318073273, 0.043688926845788956, 0.043481044471263885, 0.3199768662452698, 0.0206746943295002, -0.013129619881510735, 0.09933856874704361, 0.23359021544456482, -0.3060075044631958, 0.1828283965587616, 0.02308296039700508, 0.14660581946372986, -0.27688542008399963, -0.1773577630519867, -0.14081251621246338, 0.30855128169059753, 0.08265001326799393, -0.07189039140939713, -0.18546190857887268, 0.07684773206710815, -0.234370157122612, 0.1828969419002533, 0.2713305950164795, 0.19087594747543335, -0.33922311663627625, 0.0022307485342025757, -0.01707969605922699, 0.25045067071914673, -0.18041235208511353, 0.10067792236804962, -0.17757181823253632, -0.14915046095848083, -0.34003618359565735, 0.07882324606180191, -0.2586345672607422, 0.08527150750160217, -0.2883613705635071, 0.1057172566652298, -0.021334335207939148, 0.1327606439590454, 0.4869849383831024, -0.19292379915714264, -0.05577746406197548, -0.09742368757724762, 0.26880866289138794, 0.12558995187282562, -0.11502142250537872, -0.2942271828651428, -0.1411074697971344, 0.11133433878421783, 0.15547560155391693, 0.37615150213241577, 0.04414324834942818, -0.03788367658853531, -0.17656874656677246, 0.04953494668006897, 0.39448750019073486, -0.45270925760269165, -0.5630806088447571, -0.00801217183470726, -0.14294834434986115, 0.0414840504527092, 0.023634225130081177, -0.02191908098757267, -0.15740476548671722, 0.2757280468940735, -0.06347529590129852, 0.4356178939342499, 0.0038285553455352783, 0.05153612792491913, -0.2261921465396881, -0.1327921748161316, 0.2279190719127655, -0.023634623736143112, -0.13602977991104126, -0.25632673501968384, 0.10487980395555496, -0.2988581955432892, 0.14848162233829498, -0.1724599003791809, -0.12743788957595825, 0.13236914575099945, 0.529113233089447, -0.056830212473869324, 0.14269693195819855, -0.12669573724269867, -0.8501917123794556, 0.008993782103061676, -0.02566053345799446, 0.04298916459083557, -0.2701914608478546, 0.0090574249625206, -0.1950027048587799, 0.1405133157968521, -0.2136688530445099, -0.3861229717731476, -0.01798313856124878, -0.10737297683954239, 0.0523800253868103, -0.005741409957408905, -0.18663182854652405, 0.04056362062692642, 0.007464520633220673, 0.2530513405799866, -0.4582872986793518, 0.28149837255477905, 0.0000057872384786605835, -0.35302039980888367, -0.12271681427955627, 0.37781649827957153, 0.00482301227748394, -0.20007961988449097, -0.18731914460659027, 0.3001510500907898, 0.23274417221546173, 0.03586449846625328, -0.29222142696380615, -0.054989248514175415, 0.345184862613678, -0.3689199686050415, -0.027368534356355667, 0.1470244824886322, 0.06704922020435333, 0.35911083221435547, -0.4033459424972534, 0.5544772148132324, -0.06643994897603989, 0.1739121675491333, -0.15052202343940735, 0.34053468704223633, -0.04474802687764168, 0.08824694901704788, -0.1282983124256134, -0.356827974319458, 0.258712500333786, 0.28826358914375305, 0.3878117799758911, -0.022546250373125076, -0.13106346130371094, 0.11304111033678055, 0.31306952238082886, -0.001326039433479309, 0.2666402757167816, 0.11391977965831757, -0.40573957562446594, 0.11362888664007187, 0.43939757347106934, 0.014371730387210846, 0.32312488555908203, 0.05333234742283821, -0.1792595535516739, 0.32240739464759827, -0.1224234327673912, -0.05080248787999153, 0.23256950080394745, -0.009331416338682175, 0.2779378890991211, 0.008430203422904015, 0.3019275665283203, 0.14938390254974365, -0.24121981859207153, -0.06631110608577728, -0.11576336622238159, 0.06766779720783234, -0.48637616634368896, 0.013681486248970032, -0.20913849771022797, -0.24627017974853516, -0.14455269277095795, -0.38420963287353516, -0.23032522201538086, -0.0134071484208107, -0.10567326843738556, 0.13073933124542236, -0.03044682741165161, 0.36051690578460693, 0.2868976294994354, 0.2851731777191162, 0.2741606831550598, -0.080597423017025, -0.182038813829422, -0.1333712637424469, -0.28291386365890503, -0.07664033770561218, 0.10501347482204437, 0.08370048552751541, 0.026246657595038414, -0.08540324121713638, -0.007223963737487793, -0.4161306321620941, -0.6337041854858398, 0.2230602651834488, -0.3353947699069977, 0.39845505356788635, 0.4529262185096741, -0.17412179708480835, 0.011149242520332336, 0.1878199279308319, 0.5270155072212219, 0.01719704270362854, -0.40267279744148254, 0.17506146430969238, 0.03573383763432503, -0.19708076119422913, -0.12016907334327698, -0.10372558236122131, -0.054955173283815384, -0.18533393740653992, 0.6761680841445923, -0.39407601952552795, -0.02733476087450981, 0.32977408170700073, 0.16103163361549377, 0.19279424846172333, -0.13910628855228424, -0.05957804620265961, -0.046951498836278915, 0.3723604381084442, 0.3424873352050781, -0.14806652069091797, -0.26175302267074585, -0.24234187602996826, -0.06128275394439697, 0.1632096916437149, 0.20356154441833496, -0.3600442409515381, -0.2576644718647003, -0.47878706455230713, 0.31231480836868286, -0.12855181097984314, 0.13562168180942535, 0.32702118158340454, 0.06088544800877571, 0.1883464753627777, -0.17480528354644775, -0.3214896023273468, 0.25642427802085876, 0.14768902957439423, 0.025034664198756218, 0.13139423727989197, 0.4285260736942291, -0.11590775847434998, 0.20504210889339447, 0.22914321720600128, -0.017826862633228302, 0.30913013219833374, -0.193733349442482, 0.3082851469516754, -0.12413011491298676, -0.261010080575943, 0.2761947214603424, -0.025538936257362366, -0.10072383284568787, -0.02943240851163864, -0.035530734807252884, -0.0006783343851566315, -0.017551429569721222, -0.12254214286804199, -0.02747071534395218, -0.1784115731716156, -0.07338844239711761, -0.028780747205018997, 0.02629682421684265, -0.21594052016735077, 0.23374074697494507, 0.00035209208726882935, -0.04705965518951416, 0.4023664891719818, 0.01587323471903801, 0.016925910487771034, -0.0008368529379367828, -0.46614348888397217, -0.4018767774105072, -0.25948798656463623, 0.3158988058567047, 0.05696742981672287, 0.46913018822669983, -0.03427398204803467, -0.2820245027542114, 0.056439485400915146, 0.07886995375156403, 0.2599729299545288, -0.08172674477100372, -0.11436168849468231, 0.01731204241514206, -0.05934403836727142, -0.42600712180137634, -0.30188778042793274, -0.11274069547653198, -0.02761186473071575, 0.04524892568588257, 0.8554574847221375, -0.07230589538812637, -0.04765584319829941, 0.17061744630336761, -0.18661490082740784, 0.13150112330913544, -0.23054766654968262, -0.15937671065330505, -0.08812118321657181, -0.044695913791656494, 0.0765504315495491, 0.26702964305877686, 0.03986164554953575, 0.1973489671945572, -0.11832921952009201, -0.18422634899616241, -0.3291717767715454, -0.23950038850307465, 0.33319705724716187, 0.25625449419021606, -0.21150968968868256, 0.10378478467464447, 0.028548434376716614, 0.29201048612594604, 0.28017115592956543, 0.6490312814712524, 0.1183437705039978, -0.8898884654045105, -0.02178644761443138, -0.20390187203884125, 0.4125310182571411, 0.3699432611465454, -0.13044430315494537, -0.013272665441036224, -0.2471325546503067, 0.12340686470270157, -0.14466315507888794, -0.043081216514110565, 0.41048967838287354, 0.22098694741725922, 0.215646892786026, 0.22042210400104523, 0.4660000503063202, 0.10989221930503845, 0.06906741857528687, 0.32544124126434326, 0.018363116309046745, -0.2655954658985138, 0.15802139043807983, 0.35443875193595886, 0.6253793835639954, 0.11413956433534622, 0.1546269804239273, 0.5849330425262451, -0.31790632009506226, 0.49124860763549805, 0.5121313333511353, 0.19632834196090698, -0.41855472326278687, -0.2194409817457199, -0.00370614230632782, -0.2762893736362457, 0.18027612566947937, -0.3207347095012665, -0.09642671048641205, 0.026056788861751556, -0.025473006069660187, 0.19785624742507935, -0.11078214645385742, -0.05868671461939812, 0.07037024199962616, -0.18929213285446167, -0.5188755393028259, -0.022308889776468277, -0.06283517181873322, 0.17362836003303528, 0.07090796530246735, -0.04200422018766403, -0.4873078465461731, -0.3005646765232086, -0.40076369047164917, 0.1701899915933609, -0.6829379796981812, -0.11726273596286774, 0.4424038231372833, -0.6239643096923828, 0.08363564312458038, 0.1658734381198883, 0.07737880945205688, -0.09358078241348267, -0.17096646130084991, 0.05606730654835701, 0.3395838737487793, 0.12933194637298584, 0.18834227323532104, -0.26194870471954346, 0.10020215809345245, -0.055297575891017914, 0.18069124221801758, 0.15926256775856018, -0.01740066334605217, 0.002411291003227234, 0.02820645272731781, -0.08800700306892395, 0.13893966376781464, -0.12213683128356934, -0.017336759716272354, -0.4156929850578308, 0.237970769405365, -0.13953901827335358, -0.0001582866534590721, -0.21672779321670532, -0.038719575852155685, 0.012048188596963882, -0.1686810851097107, -0.30524879693984985, -0.13050203025341034, 0.01338956132531166, -0.2371637523174286, -0.061458948999643326, 0.13001692295074463, 0.4529447853565216, -0.11587758362293243, -0.05017855018377304, 0.21420684456825256, 0.4644380807876587, -0.5296173095703125, 0.061730798333883286, -0.3326205015182495, -0.3748682737350464, -0.022757727652788162, 0.7615768313407898, 0.3988116979598999, -0.15083429217338562, 0.03779838979244232, -0.110031858086586, -0.3412110209465027, 0.21857410669326782, -0.20928223431110382, 0.11530255526304245, 0.01725887507200241, 0.02413172647356987, -0.07387775182723999, -0.16520492732524872, -0.1876833736896515, -0.06989198923110962, 0.2611859440803528, -0.0016182968392968178, -0.005190527066588402, -0.10902832448482513, 0.13470806181430817, -0.04666801914572716, 0.05918242782354355, 0.16988658905029297, 0.009749259799718857, -0.056344084441661835, -0.19875961542129517, 0.12615707516670227, 0.06289611756801605, -0.27076950669288635, -0.09711484611034393, -0.04875701293349266, -0.16110943257808685, -0.3481003940105438, 0.10281272232532501, 0.07572151720523834, 0.025527557358145714, 0.09101533889770508, -0.12447210401296616, -0.17576631903648376, -0.012744933366775513, 0.17341990768909454, -0.06610377132892609, -0.034049708396196365, 0.038064099848270416, 0.138096421957016, 0.004340071231126785, 0.1512480080127716, -0.012886624783277512, -0.07505159825086594, -0.17658734321594238, 0.12895680963993073, 0.18434850871562958, -0.3119109272956848, -0.2712925970554352, -0.0043250806629657745, 0.3095836043357849, 0.3724922835826874, -0.18981096148490906, -0.2435145229101181, 0.2774921655654907, 0.10311991721391678, -0.3070523738861084, -0.06895487010478973, 0.08008107542991638, 0.17157001793384552, 0.04578813165426254, 0.46865421533584595, 0.15126237273216248, 0.17747557163238525, -0.1275116205215454, 0.15692901611328125, 0.15787377953529358, 0.16691045463085175, 0.13826054334640503, 0.1982087641954422, -0.014045588672161102, 0.19762611389160156, 0.44577139616012573, 0.08521490544080734, 0.38793113827705383, 0.08608755469322205, 0.1779722422361374, -0.2575432360172272, 0.11328708380460739, 0.2974449098110199, 0.11310990154743195, -0.12281802296638489, -0.2761599123477936, -0.32357606291770935, 0.08263704180717468, 0.2023909091949463, 0.0474986769258976, 0.4028932750225067, -0.1623571813106537, -0.41373148560523987, -0.11730092018842697, 0.11574758589267731, -0.3435744345188141, -0.04780988022685051, 0.14972883462905884, 0.05678172409534454, -0.1929156482219696, 0.04203715920448303, -0.2991088032722473, 0.12514528632164001, 0.7464714050292969, 0.15188920497894287, 0.013101648539304733, -0.2029692530632019, -0.03877393528819084, 0.42365211248397827, 0.1975306123495102, -0.2921440899372101, 0.5381500124931335, -0.13089177012443542, -0.1147095113992691, -0.2473423182964325, 0.3393949866294861, 0.43882715702056885, 0.44756442308425903, -0.3689444959163666, -0.25780802965164185, 0.05304750055074692, -0.020327281206846237, 0.05460527539253235, 0.0827101469039917, 0.1559615433216095, 0.21761104464530945, 0.16701741516590118, 0.04905072972178459, -0.0018974021077156067, 0.3978669345378876, -0.2107885330915451, 0.002175740897655487, -0.06791911274194717, -0.08580195903778076, -0.4921215772628784, -0.0701250284910202, -0.1432984173297882, -0.15550580620765686, -0.3343085050582886, 0.0815500020980835, 0.3406003713607788, 0.11420498788356781, 0.03479072079062462, 0.02355293184518814, 0.016059480607509613, 0.08494772762060165, 0.3985479474067688, 0.47035396099090576, 0.21631619334220886, -0.11333324015140533, -0.17388606071472168, -0.22850053012371063, 0.22218729555606842, -0.07417692244052887, -0.31102070212364197, 0.41028305888175964, 0.08553622663021088, 0.08264761418104172, 0.05065527558326721, 0.3875896632671356, 0.1930205225944519, 0.04072640836238861, 0.23571178317070007, -0.4566701650619507, -0.060578376054763794, 0.2098105251789093, -0.20703256130218506, 0.12582197785377502, -0.15178029239177704, 0.13190536201000214, 0.09488312155008316, -0.17469239234924316, -0.14353761076927185, 0.0955485850572586, -0.12985394895076752, 0.20121309161186218, 0.28925958275794983, 0.13929660618305206, 0.07166816294193268, -0.0037493109703063965, -0.32989707589149475, -0.21971495449543, -0.12848705053329468, -0.2368428111076355, 0.437583327293396, -0.09658530354499817, 0.22665777802467346, -0.09698536992073059, 0.21598993241786957, -0.5038161277770996, 0.27774301171302795, 0.36222758889198303, -0.08471947908401489, -0.14157846570014954, 0.5312905311584473, -0.3111187517642975, -0.0194772370159626, 0.1203899011015892, 0.2818703055381775, 0.0020251907408237457, 0.36012786626815796, -0.31873172521591187, -0.4479318857192993, 0.36160868406295776, -0.4161418080329895, -0.1680966317653656, 0.27484405040740967, 0.04063153266906738, 0.49539318680763245, -0.05714802443981171, -0.6938846111297607, -0.2602962255477905, 0.19602741301059723, -0.037261247634887695, -0.1259707659482956, 0.016873199492692947, 0.19719329476356506, -0.011752910912036896, -0.12864337861537933, 0.714934766292572, -0.01684688962996006, -0.18918222188949585, 0.060202471911907196, -0.2248130589723587 ]
https://github.com/huggingface/datasets/issues/6417
> Hi! The latest (patch) release (published a few hours ago) includes a fix for this [PyArrow security issue](https://github.com/advisories/GHSA-5wvp-7f3h-6wmm). To install it, run `pip install -U datasets`. Thanks for the info and the latest release, it seems this has also solved my issue. First run after the update worked and I am training right now :D Will close the Issu
Bug: LayoutLMv3 finetuning on FUNSD Notebook; Arrow Error
### Describe the bug Arrow issues when running the example Notebook laptop locally on Mac with M1. Works on Google Collab. **Notebook**: https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv3/Fine_tune_LayoutLMv3_on_FUNSD_(HuggingFace_Trainer).ipynb **Error**: `ValueError: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.` **Caused by**: ``` # we need to define custom features for `set_format` (used later on) to work properly features = Features({ 'pixel_values': Array3D(dtype="float32", shape=(3, 224, 224)), 'input_ids': Sequence(feature=Value(dtype='int64')), 'attention_mask': Sequence(Value(dtype='int64')), 'bbox': Array2D(dtype="int64", shape=(512, 4)), 'labels': Sequence(feature=Value(dtype='int64')), }) ``` ### Steps to reproduce the bug Run the notebook provided, locally. If possible also on M1. ### Expected behavior The cell where features are mapped to Array2D and Array3D should work without any issues. ### Environment info Tried with Python 3.9 and 3.10 conda envs. Running Mac M1. `pip show datasets` > Name: datasets Version: 2.14.6 Summary: HuggingFace community-driven open-source library of datasets `pip list` > Package Version > ------------------------- ------------ > accelerate 0.24.1 > aiohttp 3.8.6 > aiosignal 1.3.1 > anyio 3.5.0 > appnope 0.1.2 > argon2-cffi 21.3.0 > argon2-cffi-bindings 21.2.0 > asttokens 2.0.5 > async-timeout 4.0.3 > attrs 23.1.0 > backcall 0.2.0 > beautifulsoup4 4.12.2 > bleach 4.1.0 > certifi 2023.7.22 > cffi 1.15.1 > charset-normalizer 3.3.2 > comm 0.1.2 > datasets 2.14.6 > debugpy 1.6.7 > decorator 5.1.1 > defusedxml 0.7.1 > dill 0.3.7 > entrypoints 0.4 > exceptiongroup 1.0.4 > executing 0.8.3 > fastjsonschema 2.16.2 > filelock 3.13.1 > frozenlist 1.4.0 > fsspec 2023.10.0 > huggingface-hub 0.17.3 > idna 3.4 > importlib-metadata 6.0.0 > IProgress 0.4 > ipykernel 6.25.0 > ipython 8.15.0 > ipython-genutils 0.2.0 > jedi 0.18.1 > Jinja2 3.1.2 > joblib 1.3.2 > jsonschema 4.19.2 > jsonschema-specifications 2023.7.1 > jupyter_client 7.4.9 > jupyter_core 5.5.0 > jupyter-server 1.23.4 > jupyterlab-pygments 0.1.2 > MarkupSafe 2.1.1 > matplotlib-inline 0.1.6 > mistune 2.0.4 > mpmath 1.3.0 > multidict 6.0.4 > multiprocess 0.70.15 > nbclassic 1.0.0 > nbclient 0.8.0 > nbconvert 7.10.0 > nbformat 5.9.2 > nest-asyncio 1.5.6 > networkx 3.2.1 > notebook 6.5.4 > notebook_shim 0.2.3 > numpy 1.26.1 > packaging 23.1 > pandas 2.1.3 > pandocfilters 1.5.0 > parso 0.8.3 > pexpect 4.8.0 > pickleshare 0.7.5 > Pillow 10.1.0 > pip 23.3 > platformdirs 3.10.0 > prometheus-client 0.14.1 > prompt-toolkit 3.0.36 > psutil 5.9.0 > ptyprocess 0.7.0 > pure-eval 0.2.2 > pyarrow 14.0.1 > pycparser 2.21 > Pygments 2.15.1 > python-dateutil 2.8.2 > pytz 2023.3.post1 > PyYAML 6.0.1 > pyzmq 23.2.0 > referencing 0.30.2 > regex 2023.10.3 > requests 2.31.0 > rpds-py 0.10.6 > safetensors 0.4.0 > scikit-learn 1.3.2 > scipy 1.11.3 > Send2Trash 1.8.2 > seqeval 1.2.2 > setuptools 68.0.0 > six 1.16.0 > sniffio 1.2.0 > soupsieve 2.5 > stack-data 0.2.0 > sympy 1.12 > terminado 0.17.1 > threadpoolctl 3.2.0 > tinycss2 1.2.1 > tokenizers 0.14.1 > torch 2.1.0 > tornado 6.3.3 > tqdm 4.66.1 > traitlets 5.7.1 > transformers 4.36.0.dev0 > typing_extensions 4.7.1 > tzdata 2023.3 > urllib3 2.0.7 > wcwidth 0.2.5 > webencodings 0.5.1 > websocket-client 0.58.0 > wheel 0.41.2 > xxhash 3.4.1 > yarl 1.9.2 > zipp 3.11.0
60
Bug: LayoutLMv3 finetuning on FUNSD Notebook; Arrow Error ### Describe the bug Arrow issues when running the example Notebook laptop locally on Mac with M1. Works on Google Collab. **Notebook**: https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv3/Fine_tune_LayoutLMv3_on_FUNSD_(HuggingFace_Trainer).ipynb **Error**: `ValueError: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.` **Caused by**: ``` # we need to define custom features for `set_format` (used later on) to work properly features = Features({ 'pixel_values': Array3D(dtype="float32", shape=(3, 224, 224)), 'input_ids': Sequence(feature=Value(dtype='int64')), 'attention_mask': Sequence(Value(dtype='int64')), 'bbox': Array2D(dtype="int64", shape=(512, 4)), 'labels': Sequence(feature=Value(dtype='int64')), }) ``` ### Steps to reproduce the bug Run the notebook provided, locally. If possible also on M1. ### Expected behavior The cell where features are mapped to Array2D and Array3D should work without any issues. ### Environment info Tried with Python 3.9 and 3.10 conda envs. Running Mac M1. `pip show datasets` > Name: datasets Version: 2.14.6 Summary: HuggingFace community-driven open-source library of datasets `pip list` > Package Version > ------------------------- ------------ > accelerate 0.24.1 > aiohttp 3.8.6 > aiosignal 1.3.1 > anyio 3.5.0 > appnope 0.1.2 > argon2-cffi 21.3.0 > argon2-cffi-bindings 21.2.0 > asttokens 2.0.5 > async-timeout 4.0.3 > attrs 23.1.0 > backcall 0.2.0 > beautifulsoup4 4.12.2 > bleach 4.1.0 > certifi 2023.7.22 > cffi 1.15.1 > charset-normalizer 3.3.2 > comm 0.1.2 > datasets 2.14.6 > debugpy 1.6.7 > decorator 5.1.1 > defusedxml 0.7.1 > dill 0.3.7 > entrypoints 0.4 > exceptiongroup 1.0.4 > executing 0.8.3 > fastjsonschema 2.16.2 > filelock 3.13.1 > frozenlist 1.4.0 > fsspec 2023.10.0 > huggingface-hub 0.17.3 > idna 3.4 > importlib-metadata 6.0.0 > IProgress 0.4 > ipykernel 6.25.0 > ipython 8.15.0 > ipython-genutils 0.2.0 > jedi 0.18.1 > Jinja2 3.1.2 > joblib 1.3.2 > jsonschema 4.19.2 > jsonschema-specifications 2023.7.1 > jupyter_client 7.4.9 > jupyter_core 5.5.0 > jupyter-server 1.23.4 > jupyterlab-pygments 0.1.2 > MarkupSafe 2.1.1 > matplotlib-inline 0.1.6 > mistune 2.0.4 > mpmath 1.3.0 > multidict 6.0.4 > multiprocess 0.70.15 > nbclassic 1.0.0 > nbclient 0.8.0 > nbconvert 7.10.0 > nbformat 5.9.2 > nest-asyncio 1.5.6 > networkx 3.2.1 > notebook 6.5.4 > notebook_shim 0.2.3 > numpy 1.26.1 > packaging 23.1 > pandas 2.1.3 > pandocfilters 1.5.0 > parso 0.8.3 > pexpect 4.8.0 > pickleshare 0.7.5 > Pillow 10.1.0 > pip 23.3 > platformdirs 3.10.0 > prometheus-client 0.14.1 > prompt-toolkit 3.0.36 > psutil 5.9.0 > ptyprocess 0.7.0 > pure-eval 0.2.2 > pyarrow 14.0.1 > pycparser 2.21 > Pygments 2.15.1 > python-dateutil 2.8.2 > pytz 2023.3.post1 > PyYAML 6.0.1 > pyzmq 23.2.0 > referencing 0.30.2 > regex 2023.10.3 > requests 2.31.0 > rpds-py 0.10.6 > safetensors 0.4.0 > scikit-learn 1.3.2 > scipy 1.11.3 > Send2Trash 1.8.2 > seqeval 1.2.2 > setuptools 68.0.0 > six 1.16.0 > sniffio 1.2.0 > soupsieve 2.5 > stack-data 0.2.0 > sympy 1.12 > terminado 0.17.1 > threadpoolctl 3.2.0 > tinycss2 1.2.1 > tokenizers 0.14.1 > torch 2.1.0 > tornado 6.3.3 > tqdm 4.66.1 > traitlets 5.7.1 > transformers 4.36.0.dev0 > typing_extensions 4.7.1 > tzdata 2023.3 > urllib3 2.0.7 > wcwidth 0.2.5 > webencodings 0.5.1 > websocket-client 0.58.0 > wheel 0.41.2 > xxhash 3.4.1 > yarl 1.9.2 > zipp 3.11.0 > Hi! The latest (patch) release (published a few hours ago) includes a fix for this [PyArrow security issue](https://github.com/advisories/GHSA-5wvp-7f3h-6wmm). To install it, run `pip install -U datasets`. Thanks for the info and the latest release, it seems this has also solved my issue. First run after the update worked and I am training right now :D Will close the Issu
[ -0.12534523010253906, -0.696060299873352, 0.06675893068313599, 0.3161044716835022, 0.36773860454559326, -0.21727141737937927, 0.570938229560852, 0.08089077472686768, -0.18083691596984863, -0.04032056778669357, -0.07140608876943588, 0.6541163921356201, -0.07819987833499908, 0.2054458111524582, -0.13464444875717163, -0.21977442502975464, 0.11867938935756683, 0.04870558902621269, -0.2793351709842682, -0.09834624826908112, -0.24747511744499207, 0.36471736431121826, -0.31691497564315796, 0.14043889939785004, -0.13122504949569702, -0.04667335003614426, 0.07013554126024246, -0.006347630172967911, -0.007894502952694893, -0.16618308424949646, 0.33295053243637085, -0.3438020944595337, 0.09941326081752777, 0.18481820821762085, -0.00012145263463025913, -0.03654574602842331, 0.44145384430885315, -0.008131574839353561, -0.0974501520395279, -0.09651193767786026, 0.09714213013648987, -0.21189171075820923, 0.25351107120513916, -0.2662365138530731, -0.10398924350738525, 0.007917549461126328, -0.5289362668991089, -0.2778090834617615, 0.4964022636413574, 0.3365890681743622, 0.15733130276203156, 0.3986642360687256, 0.09910573065280914, -0.1003585085272789, 0.6133680939674377, 0.4561447501182556, -0.34079140424728394, 0.3663225471973419, 0.23519547283649445, -0.028368255123496056, 0.2728923559188843, 0.4842063784599304, -0.1933593451976776, 0.12886935472488403, 0.3461785912513733, 0.21665948629379272, -0.03984852135181427, 0.01934605836868286, -0.12752732634544373, 0.3019849359989166, 0.23719367384910583, -0.3270748257637024, -0.25313788652420044, -0.37092137336730957, 0.019623469561338425, -0.43811389803886414, 0.3114137649536133, 0.011742666363716125, -0.1303609162569046, -0.021410973742604256, -0.21591916680335999, 0.03575240448117256, -0.3441670536994934, 0.12440384179353714, 0.015376269817352295, 0.32715362310409546, -0.31751322746276855, 0.1380406767129898, -0.11145436763763428, -0.030133895576000214, 0.23012590408325195, 0.2110556960105896, -0.01189169380813837, -0.07308676093816757, -0.17842720448970795, -0.038462165743112564, -0.10276835411787033, -0.17662759125232697, 0.00421268492937088, -0.12136472761631012, 0.04474722966551781, -0.1994406133890152, 0.30903956294059753, 0.021742582321166992, -0.11821508407592773, 0.32300910353660583, 0.03924570977687836, 0.24495401978492737, 0.09794625639915466, 0.21658068895339966, 0.3030691146850586, -0.04046168550848961, -0.008604723960161209, -0.16112296283245087, -0.2950296998023987, 0.04039709270000458, 0.4466570019721985, 0.011044792830944061, -0.298869788646698, 0.19922274351119995, -0.23719151318073273, 0.043688926845788956, 0.043481044471263885, 0.3199768662452698, 0.0206746943295002, -0.013129619881510735, 0.09933856874704361, 0.23359021544456482, -0.3060075044631958, 0.1828283965587616, 0.02308296039700508, 0.14660581946372986, -0.27688542008399963, -0.1773577630519867, -0.14081251621246338, 0.30855128169059753, 0.08265001326799393, -0.07189039140939713, -0.18546190857887268, 0.07684773206710815, -0.234370157122612, 0.1828969419002533, 0.2713305950164795, 0.19087594747543335, -0.33922311663627625, 0.0022307485342025757, -0.01707969605922699, 0.25045067071914673, -0.18041235208511353, 0.10067792236804962, -0.17757181823253632, -0.14915046095848083, -0.34003618359565735, 0.07882324606180191, -0.2586345672607422, 0.08527150750160217, -0.2883613705635071, 0.1057172566652298, -0.021334335207939148, 0.1327606439590454, 0.4869849383831024, -0.19292379915714264, -0.05577746406197548, -0.09742368757724762, 0.26880866289138794, 0.12558995187282562, -0.11502142250537872, -0.2942271828651428, -0.1411074697971344, 0.11133433878421783, 0.15547560155391693, 0.37615150213241577, 0.04414324834942818, -0.03788367658853531, -0.17656874656677246, 0.04953494668006897, 0.39448750019073486, -0.45270925760269165, -0.5630806088447571, -0.00801217183470726, -0.14294834434986115, 0.0414840504527092, 0.023634225130081177, -0.02191908098757267, -0.15740476548671722, 0.2757280468940735, -0.06347529590129852, 0.4356178939342499, 0.0038285553455352783, 0.05153612792491913, -0.2261921465396881, -0.1327921748161316, 0.2279190719127655, -0.023634623736143112, -0.13602977991104126, -0.25632673501968384, 0.10487980395555496, -0.2988581955432892, 0.14848162233829498, -0.1724599003791809, -0.12743788957595825, 0.13236914575099945, 0.529113233089447, -0.056830212473869324, 0.14269693195819855, -0.12669573724269867, -0.8501917123794556, 0.008993782103061676, -0.02566053345799446, 0.04298916459083557, -0.2701914608478546, 0.0090574249625206, -0.1950027048587799, 0.1405133157968521, -0.2136688530445099, -0.3861229717731476, -0.01798313856124878, -0.10737297683954239, 0.0523800253868103, -0.005741409957408905, -0.18663182854652405, 0.04056362062692642, 0.007464520633220673, 0.2530513405799866, -0.4582872986793518, 0.28149837255477905, 0.0000057872384786605835, -0.35302039980888367, -0.12271681427955627, 0.37781649827957153, 0.00482301227748394, -0.20007961988449097, -0.18731914460659027, 0.3001510500907898, 0.23274417221546173, 0.03586449846625328, -0.29222142696380615, -0.054989248514175415, 0.345184862613678, -0.3689199686050415, -0.027368534356355667, 0.1470244824886322, 0.06704922020435333, 0.35911083221435547, -0.4033459424972534, 0.5544772148132324, -0.06643994897603989, 0.1739121675491333, -0.15052202343940735, 0.34053468704223633, -0.04474802687764168, 0.08824694901704788, -0.1282983124256134, -0.356827974319458, 0.258712500333786, 0.28826358914375305, 0.3878117799758911, -0.022546250373125076, -0.13106346130371094, 0.11304111033678055, 0.31306952238082886, -0.001326039433479309, 0.2666402757167816, 0.11391977965831757, -0.40573957562446594, 0.11362888664007187, 0.43939757347106934, 0.014371730387210846, 0.32312488555908203, 0.05333234742283821, -0.1792595535516739, 0.32240739464759827, -0.1224234327673912, -0.05080248787999153, 0.23256950080394745, -0.009331416338682175, 0.2779378890991211, 0.008430203422904015, 0.3019275665283203, 0.14938390254974365, -0.24121981859207153, -0.06631110608577728, -0.11576336622238159, 0.06766779720783234, -0.48637616634368896, 0.013681486248970032, -0.20913849771022797, -0.24627017974853516, -0.14455269277095795, -0.38420963287353516, -0.23032522201538086, -0.0134071484208107, -0.10567326843738556, 0.13073933124542236, -0.03044682741165161, 0.36051690578460693, 0.2868976294994354, 0.2851731777191162, 0.2741606831550598, -0.080597423017025, -0.182038813829422, -0.1333712637424469, -0.28291386365890503, -0.07664033770561218, 0.10501347482204437, 0.08370048552751541, 0.026246657595038414, -0.08540324121713638, -0.007223963737487793, -0.4161306321620941, -0.6337041854858398, 0.2230602651834488, -0.3353947699069977, 0.39845505356788635, 0.4529262185096741, -0.17412179708480835, 0.011149242520332336, 0.1878199279308319, 0.5270155072212219, 0.01719704270362854, -0.40267279744148254, 0.17506146430969238, 0.03573383763432503, -0.19708076119422913, -0.12016907334327698, -0.10372558236122131, -0.054955173283815384, -0.18533393740653992, 0.6761680841445923, -0.39407601952552795, -0.02733476087450981, 0.32977408170700073, 0.16103163361549377, 0.19279424846172333, -0.13910628855228424, -0.05957804620265961, -0.046951498836278915, 0.3723604381084442, 0.3424873352050781, -0.14806652069091797, -0.26175302267074585, -0.24234187602996826, -0.06128275394439697, 0.1632096916437149, 0.20356154441833496, -0.3600442409515381, -0.2576644718647003, -0.47878706455230713, 0.31231480836868286, -0.12855181097984314, 0.13562168180942535, 0.32702118158340454, 0.06088544800877571, 0.1883464753627777, -0.17480528354644775, -0.3214896023273468, 0.25642427802085876, 0.14768902957439423, 0.025034664198756218, 0.13139423727989197, 0.4285260736942291, -0.11590775847434998, 0.20504210889339447, 0.22914321720600128, -0.017826862633228302, 0.30913013219833374, -0.193733349442482, 0.3082851469516754, -0.12413011491298676, -0.261010080575943, 0.2761947214603424, -0.025538936257362366, -0.10072383284568787, -0.02943240851163864, -0.035530734807252884, -0.0006783343851566315, -0.017551429569721222, -0.12254214286804199, -0.02747071534395218, -0.1784115731716156, -0.07338844239711761, -0.028780747205018997, 0.02629682421684265, -0.21594052016735077, 0.23374074697494507, 0.00035209208726882935, -0.04705965518951416, 0.4023664891719818, 0.01587323471903801, 0.016925910487771034, -0.0008368529379367828, -0.46614348888397217, -0.4018767774105072, -0.25948798656463623, 0.3158988058567047, 0.05696742981672287, 0.46913018822669983, -0.03427398204803467, -0.2820245027542114, 0.056439485400915146, 0.07886995375156403, 0.2599729299545288, -0.08172674477100372, -0.11436168849468231, 0.01731204241514206, -0.05934403836727142, -0.42600712180137634, -0.30188778042793274, -0.11274069547653198, -0.02761186473071575, 0.04524892568588257, 0.8554574847221375, -0.07230589538812637, -0.04765584319829941, 0.17061744630336761, -0.18661490082740784, 0.13150112330913544, -0.23054766654968262, -0.15937671065330505, -0.08812118321657181, -0.044695913791656494, 0.0765504315495491, 0.26702964305877686, 0.03986164554953575, 0.1973489671945572, -0.11832921952009201, -0.18422634899616241, -0.3291717767715454, -0.23950038850307465, 0.33319705724716187, 0.25625449419021606, -0.21150968968868256, 0.10378478467464447, 0.028548434376716614, 0.29201048612594604, 0.28017115592956543, 0.6490312814712524, 0.1183437705039978, -0.8898884654045105, -0.02178644761443138, -0.20390187203884125, 0.4125310182571411, 0.3699432611465454, -0.13044430315494537, -0.013272665441036224, -0.2471325546503067, 0.12340686470270157, -0.14466315507888794, -0.043081216514110565, 0.41048967838287354, 0.22098694741725922, 0.215646892786026, 0.22042210400104523, 0.4660000503063202, 0.10989221930503845, 0.06906741857528687, 0.32544124126434326, 0.018363116309046745, -0.2655954658985138, 0.15802139043807983, 0.35443875193595886, 0.6253793835639954, 0.11413956433534622, 0.1546269804239273, 0.5849330425262451, -0.31790632009506226, 0.49124860763549805, 0.5121313333511353, 0.19632834196090698, -0.41855472326278687, -0.2194409817457199, -0.00370614230632782, -0.2762893736362457, 0.18027612566947937, -0.3207347095012665, -0.09642671048641205, 0.026056788861751556, -0.025473006069660187, 0.19785624742507935, -0.11078214645385742, -0.05868671461939812, 0.07037024199962616, -0.18929213285446167, -0.5188755393028259, -0.022308889776468277, -0.06283517181873322, 0.17362836003303528, 0.07090796530246735, -0.04200422018766403, -0.4873078465461731, -0.3005646765232086, -0.40076369047164917, 0.1701899915933609, -0.6829379796981812, -0.11726273596286774, 0.4424038231372833, -0.6239643096923828, 0.08363564312458038, 0.1658734381198883, 0.07737880945205688, -0.09358078241348267, -0.17096646130084991, 0.05606730654835701, 0.3395838737487793, 0.12933194637298584, 0.18834227323532104, -0.26194870471954346, 0.10020215809345245, -0.055297575891017914, 0.18069124221801758, 0.15926256775856018, -0.01740066334605217, 0.002411291003227234, 0.02820645272731781, -0.08800700306892395, 0.13893966376781464, -0.12213683128356934, -0.017336759716272354, -0.4156929850578308, 0.237970769405365, -0.13953901827335358, -0.0001582866534590721, -0.21672779321670532, -0.038719575852155685, 0.012048188596963882, -0.1686810851097107, -0.30524879693984985, -0.13050203025341034, 0.01338956132531166, -0.2371637523174286, -0.061458948999643326, 0.13001692295074463, 0.4529447853565216, -0.11587758362293243, -0.05017855018377304, 0.21420684456825256, 0.4644380807876587, -0.5296173095703125, 0.061730798333883286, -0.3326205015182495, -0.3748682737350464, -0.022757727652788162, 0.7615768313407898, 0.3988116979598999, -0.15083429217338562, 0.03779838979244232, -0.110031858086586, -0.3412110209465027, 0.21857410669326782, -0.20928223431110382, 0.11530255526304245, 0.01725887507200241, 0.02413172647356987, -0.07387775182723999, -0.16520492732524872, -0.1876833736896515, -0.06989198923110962, 0.2611859440803528, -0.0016182968392968178, -0.005190527066588402, -0.10902832448482513, 0.13470806181430817, -0.04666801914572716, 0.05918242782354355, 0.16988658905029297, 0.009749259799718857, -0.056344084441661835, -0.19875961542129517, 0.12615707516670227, 0.06289611756801605, -0.27076950669288635, -0.09711484611034393, -0.04875701293349266, -0.16110943257808685, -0.3481003940105438, 0.10281272232532501, 0.07572151720523834, 0.025527557358145714, 0.09101533889770508, -0.12447210401296616, -0.17576631903648376, -0.012744933366775513, 0.17341990768909454, -0.06610377132892609, -0.034049708396196365, 0.038064099848270416, 0.138096421957016, 0.004340071231126785, 0.1512480080127716, -0.012886624783277512, -0.07505159825086594, -0.17658734321594238, 0.12895680963993073, 0.18434850871562958, -0.3119109272956848, -0.2712925970554352, -0.0043250806629657745, 0.3095836043357849, 0.3724922835826874, -0.18981096148490906, -0.2435145229101181, 0.2774921655654907, 0.10311991721391678, -0.3070523738861084, -0.06895487010478973, 0.08008107542991638, 0.17157001793384552, 0.04578813165426254, 0.46865421533584595, 0.15126237273216248, 0.17747557163238525, -0.1275116205215454, 0.15692901611328125, 0.15787377953529358, 0.16691045463085175, 0.13826054334640503, 0.1982087641954422, -0.014045588672161102, 0.19762611389160156, 0.44577139616012573, 0.08521490544080734, 0.38793113827705383, 0.08608755469322205, 0.1779722422361374, -0.2575432360172272, 0.11328708380460739, 0.2974449098110199, 0.11310990154743195, -0.12281802296638489, -0.2761599123477936, -0.32357606291770935, 0.08263704180717468, 0.2023909091949463, 0.0474986769258976, 0.4028932750225067, -0.1623571813106537, -0.41373148560523987, -0.11730092018842697, 0.11574758589267731, -0.3435744345188141, -0.04780988022685051, 0.14972883462905884, 0.05678172409534454, -0.1929156482219696, 0.04203715920448303, -0.2991088032722473, 0.12514528632164001, 0.7464714050292969, 0.15188920497894287, 0.013101648539304733, -0.2029692530632019, -0.03877393528819084, 0.42365211248397827, 0.1975306123495102, -0.2921440899372101, 0.5381500124931335, -0.13089177012443542, -0.1147095113992691, -0.2473423182964325, 0.3393949866294861, 0.43882715702056885, 0.44756442308425903, -0.3689444959163666, -0.25780802965164185, 0.05304750055074692, -0.020327281206846237, 0.05460527539253235, 0.0827101469039917, 0.1559615433216095, 0.21761104464530945, 0.16701741516590118, 0.04905072972178459, -0.0018974021077156067, 0.3978669345378876, -0.2107885330915451, 0.002175740897655487, -0.06791911274194717, -0.08580195903778076, -0.4921215772628784, -0.0701250284910202, -0.1432984173297882, -0.15550580620765686, -0.3343085050582886, 0.0815500020980835, 0.3406003713607788, 0.11420498788356781, 0.03479072079062462, 0.02355293184518814, 0.016059480607509613, 0.08494772762060165, 0.3985479474067688, 0.47035396099090576, 0.21631619334220886, -0.11333324015140533, -0.17388606071472168, -0.22850053012371063, 0.22218729555606842, -0.07417692244052887, -0.31102070212364197, 0.41028305888175964, 0.08553622663021088, 0.08264761418104172, 0.05065527558326721, 0.3875896632671356, 0.1930205225944519, 0.04072640836238861, 0.23571178317070007, -0.4566701650619507, -0.060578376054763794, 0.2098105251789093, -0.20703256130218506, 0.12582197785377502, -0.15178029239177704, 0.13190536201000214, 0.09488312155008316, -0.17469239234924316, -0.14353761076927185, 0.0955485850572586, -0.12985394895076752, 0.20121309161186218, 0.28925958275794983, 0.13929660618305206, 0.07166816294193268, -0.0037493109703063965, -0.32989707589149475, -0.21971495449543, -0.12848705053329468, -0.2368428111076355, 0.437583327293396, -0.09658530354499817, 0.22665777802467346, -0.09698536992073059, 0.21598993241786957, -0.5038161277770996, 0.27774301171302795, 0.36222758889198303, -0.08471947908401489, -0.14157846570014954, 0.5312905311584473, -0.3111187517642975, -0.0194772370159626, 0.1203899011015892, 0.2818703055381775, 0.0020251907408237457, 0.36012786626815796, -0.31873172521591187, -0.4479318857192993, 0.36160868406295776, -0.4161418080329895, -0.1680966317653656, 0.27484405040740967, 0.04063153266906738, 0.49539318680763245, -0.05714802443981171, -0.6938846111297607, -0.2602962255477905, 0.19602741301059723, -0.037261247634887695, -0.1259707659482956, 0.016873199492692947, 0.19719329476356506, -0.011752910912036896, -0.12864337861537933, 0.714934766292572, -0.01684688962996006, -0.18918222188949585, 0.060202471911907196, -0.2248130589723587 ]
https://github.com/huggingface/datasets/issues/6412
Indeed, this is not a good practice. I've opened a PR that removes the token value from the (deprecation) warning.
User token is printed out!
This line prints user token on command line! Is it safe? https://github.com/huggingface/datasets/blob/12ebe695b4748c5a26e08b44ed51955f74f5801d/src/datasets/load.py#L2091
20
User token is printed out! This line prints user token on command line! Is it safe? https://github.com/huggingface/datasets/blob/12ebe695b4748c5a26e08b44ed51955f74f5801d/src/datasets/load.py#L2091 Indeed, this is not a good practice. I've opened a PR that removes the token value from the (deprecation) warning.
[ -0.0031762495636940002, -0.1586783230304718, -0.1245645135641098, -0.01705431565642357, 0.22019343078136444, 0.023465313017368317, 0.41891172528266907, -0.0682024210691452, 0.007502242922782898, 0.07574683427810669, -0.003919064998626709, 0.028364498168230057, -0.009011231362819672, 0.2457588016986847, 0.0959167405962944, 0.26459887623786926, 0.13086429238319397, -0.28719717264175415, 0.11329568177461624, -0.06774617731571198, -0.08722633123397827, 0.09822756052017212, -0.06782342493534088, 0.7201300859451294, -0.3059472441673279, -0.09293162822723389, 0.19415387511253357, 0.07527488470077515, -0.08779053390026093, -0.24780631065368652, 0.05053827166557312, -0.032002151012420654, -0.028344515711069107, 0.28424593806266785, -0.00011234120756853372, -0.06370145082473755, 0.381061315536499, 0.19185996055603027, -0.2029271125793457, -0.1607045829296112, 0.1418745219707489, 0.07580284774303436, 0.18500463664531708, -0.4546998143196106, 0.21268031001091003, -0.04570749029517174, 0.06386777013540268, -0.14864890277385712, 0.43300336599349976, 0.028896614909172058, 0.21573226153850555, 0.42259469628334045, -0.12723445892333984, 0.3366922438144684, -0.11946418881416321, 0.38285553455352783, 0.15862874686717987, -0.15408150851726532, -0.04328892007470131, 0.10856741666793823, 0.30738741159439087, 0.1247723400592804, -0.06990303099155426, -0.4561874568462372, 0.15832632780075073, 0.1911078542470932, 0.07886774837970734, -0.1706756353378296, 0.15761283040046692, 0.18304213881492615, 0.25185590982437134, -0.17934280633926392, -0.1575709581375122, 0.018420733511447906, -0.040724992752075195, -0.2965846061706543, 0.10343147814273834, 0.24732431769371033, -0.11716888844966888, 0.20764809846878052, -0.4296739995479584, -0.4378170669078827, -0.017273470759391785, -0.13419269025325775, -0.2345736175775528, 0.6446107029914856, -0.26826781034469604, 0.24341389536857605, -0.044329725205898285, -0.17370831966400146, -0.409724622964859, 0.12116540968418121, -0.48011118173599243, -0.06626615673303604, 0.0042399195954203606, -0.28692594170570374, -0.3372964560985565, -0.07006624341011047, 0.1040101945400238, 0.013341588899493217, -0.025081217288970947, -0.12534531950950623, -0.13037517666816711, 0.07267113775014877, 0.37448081374168396, -0.07281991094350815, 0.23558542132377625, 0.06299716979265213, 0.23661939799785614, -0.2508527338504791, 0.5304461717605591, -0.1263488084077835, -0.022412844002246857, -0.07347851991653442, 0.244334876537323, -0.042295634746551514, 0.2587546706199646, -0.32553261518478394, -0.2885373532772064, 0.1183357983827591, 0.017573706805706024, -0.04007819667458534, 0.004168204963207245, 0.3978487253189087, -0.0021434910595417023, -0.23682013154029846, 0.04688511788845062, -0.0958772823214531, -0.12079814076423645, -0.43240687251091003, -0.10524073243141174, -0.02724318951368332, -0.23759548366069794, -0.10168910771608353, -0.5798221826553345, 0.09186137467622757, 0.05575525760650635, -0.03132019191980362, 0.21837610006332397, -0.13547387719154358, -0.06524180620908737, 0.1385515332221985, 0.4145585000514984, 0.2432897388935089, -0.0036246106028556824, 0.16071180999279022, 0.02936026081442833, -0.024849452078342438, -0.08625863492488861, 0.36032748222351074, -0.4936996102333069, -0.26987892389297485, -0.23966185748577118, 0.18074122071266174, -0.27062371373176575, -0.10807853937149048, -0.40939468145370483, -0.10890156030654907, 0.41837939620018005, 0.35690635442733765, 0.43824923038482666, -0.00969834253191948, -0.16604317724704742, -0.15310300886631012, 0.10335436463356018, 0.1847236007452011, -0.08118714392185211, -0.22223661839962006, 0.252666175365448, -0.34425199031829834, 0.31959056854248047, 0.4336460530757904, -0.15561485290527344, 0.38444218039512634, -0.19846364855766296, 0.2826894223690033, 0.2086566686630249, -0.182633638381958, 0.026607707142829895, 0.3562934696674347, -0.12248498946428299, -0.26921170949935913, 0.00510658323764801, -0.034127093851566315, 0.21197378635406494, -0.40408802032470703, -0.004841670393943787, 0.03603825345635414, 0.2576475739479065, 0.22489477694034576, -0.23159173130989075, -0.3266611695289612, -0.0028146817348897457, -0.19455046951770782, 0.13558636605739594, -0.014511313289403915, 0.02617057040333748, -0.103780597448349, 0.5955892205238342, -0.04919474571943283, 0.09656872600317001, -0.09815463423728943, 0.42525315284729004, 0.4935740828514099, -0.29309695959091187, 0.6098150014877319, -0.022143084555864334, -0.18118615448474884, 0.26500120759010315, -0.1492476910352707, -0.1059102863073349, -0.5035417079925537, 0.07035855948925018, 0.2983766198158264, -0.26775723695755005, 0.17765957117080688, -0.01696312054991722, 0.02526378072798252, 0.12324409186840057, 0.17495688796043396, -0.03718588873744011, 0.08882348984479904, -0.2544058561325073, 0.26355189085006714, -0.2877201735973358, 0.0648430734872818, 0.030623050406575203, 0.22444294393062592, -0.2198997288942337, -0.010413706302642822, 0.16836556792259216, -0.2875288724899292, 0.08107117563486099, 0.5250736474990845, -0.12978202104568481, 0.2564479112625122, -0.22403424978256226, 0.3185496926307678, 0.26071691513061523, -0.06997190415859222, 0.08883175253868103, -0.19792483747005463, 0.026966698467731476, 0.2419055998325348, 0.09294920414686203, 0.45585912466049194, 0.08586400747299194, -0.33978453278541565, -0.3028743267059326, 0.16939283907413483, -0.14612826704978943, 0.057552188634872437, -0.05960265174508095, -0.013623379170894623, -0.20175345242023468, 0.12909621000289917, -0.17177587747573853, -0.05358442664146423, -0.06290543079376221, -0.20917876064777374, 0.11699371039867401, -0.40404242277145386, -0.0544646680355072, -0.0632130429148674, 0.3910059332847595, -0.12299630045890808, 0.2483522742986679, -0.05965856835246086, 0.09704184532165527, 0.19162502884864807, -0.0005825310945510864, 0.09418178349733353, 0.1064058467745781, -0.09365551173686981, 0.12229610979557037, 0.09594331681728363, -0.28523847460746765, -0.1579199880361557, -0.2858133316040039, 0.05374319851398468, -0.1548740267753601, 0.260502427816391, 0.08048535883426666, 0.13576941192150116, -0.5313037633895874, 0.25929880142211914, 0.08130790293216705, -0.15076616406440735, 0.06633355468511581, -0.2059570550918579, -0.22274529933929443, -0.3846740424633026, -0.002072070725262165, -0.1911860704421997, -0.29964980483055115, 0.23547571897506714, -0.015475213527679443, 0.1132332980632782, -0.06906004250049591, 0.17080505192279816, -0.33553630113601685, 0.14082488417625427, 0.009622972458600998, 0.07175265997648239, 0.04032975435256958, -0.13167941570281982, 0.5824399590492249, -0.2307516634464264, -0.078158438205719, -0.5710612535476685, -0.24492208659648895, 0.23181426525115967, -0.18795359134674072, -0.0802478939294815, 0.15096691250801086, -0.08440355956554413, -0.11978582292795181, 0.1401422619819641, -0.16572639346122742, -0.5238727331161499, 0.005007974803447723, -0.3515380620956421, 0.15143577754497528, -0.09161323308944702, -0.3150947690010071, 0.20991384983062744, -0.2785087823867798, 0.20319396257400513, 0.07626605033874512, 0.07059095799922943, 0.14794576168060303, 0.011590421199798584, -0.23245254158973694, -0.07151453197002411, -0.14921386539936066, -0.29209157824516296, -0.460737019777298, -0.6043421626091003, -0.1644681692123413, -0.054884687066078186, -0.2023133933544159, 0.0886077880859375, 0.25815534591674805, 0.14857035875320435, -0.0699627473950386, -0.5034686923027039, -0.33519017696380615, -0.008654050529003143, 0.13010717928409576, -0.1965383142232895, 0.07572859525680542, -0.2995043992996216, -0.20576684176921844, -0.005180381238460541, 0.22541388869285583, 0.05857429653406143, 0.15969380736351013, -0.3231021761894226, 0.15323945879936218, 0.17954403162002563, 0.18375319242477417, 0.06943860650062561, 0.33536043763160706, -0.024949412792921066, 0.004588693380355835, 0.03851039707660675, -0.12326547503471375, 0.7318992614746094, 0.20846286416053772, 0.06406670808792114, -0.07340271770954132, 0.23608887195587158, -0.2242584228515625, 0.06320115923881531, 0.10499116033315659, 0.44025522470474243, 0.3169670104980469, -0.13194525241851807, -0.1544199287891388, -0.4114396572113037, -0.16110165417194366, 0.33602237701416016, -0.11759290844202042, -0.0023608356714248657, 0.22343994677066803, 0.14143745601177216, -0.1721038520336151, 0.16304564476013184, 0.6010722517967224, 0.15616875886917114, 0.06398177146911621, -0.4811638295650482, 0.09225240349769592, -0.6544455289840698, 0.3794557452201843, -0.21170657873153687, 0.2288450002670288, -0.034220047295093536, -0.13610810041427612, 0.18947675824165344, -0.04405294731259346, 0.5284057855606079, 0.13995714485645294, 0.41414669156074524, -0.08634261041879654, -0.19007861614227295, 0.35008272528648376, -0.09648355841636658, -0.25290244817733765, 0.046082355082035065, 0.4763779640197754, 0.1654852032661438, -0.15995517373085022, -0.33033764362335205, 0.0951182022690773, -0.5765710473060608, -0.3149634301662445, -0.106350377202034, -0.27314239740371704, -0.3188054859638214, -0.11764072626829147, 0.03381345421075821, -0.07130157202482224, -0.191646009683609, -0.13877475261688232, -0.08858849853277206, -0.07928062975406647, 0.0005104392766952515, 0.1180376186966896, -0.08463700115680695, 0.014208082109689713, -0.07437571883201599, -0.22259017825126648, 0.20088371634483337, 0.26343098282814026, 0.11138878017663956, 0.1610020399093628, 0.041522566229104996, -0.04433216527104378, -0.12766246497631073, -0.05907183140516281, 0.5131096839904785, 0.37345486879348755, -0.2003202587366104, 0.0870770514011383, -0.1733803153038025, 0.4732581675052643, -0.14415620267391205, 0.08109929412603378, 0.23575451970100403, 0.3841446340084076, -0.48484477400779724, -0.276765376329422, -0.07041189074516296, 0.012207552790641785, -0.10220257937908173, 0.051146239042282104, 0.3329833745956421, -0.4146135449409485, 0.09681569039821625, 0.4138469398021698, 0.8183950781822205, -0.2572375535964966, 0.35835760831832886, 0.4551238715648651, 0.2692817449569702, 0.5411073565483093, -0.13739940524101257, -0.46312764286994934, -0.5678384304046631, 0.2299269735813141, -0.07611887156963348, 0.09816360473632812, 0.013894299976527691, -0.24327842891216278, -0.28827783465385437, 0.17173069715499878, -0.12495575845241547, 0.17482846975326538, -0.2001158893108368, 0.22550299763679504, 0.11985400319099426, 0.05120030790567398, -0.2367713749408722, 0.06720110028982162, 0.22354911267757416, 0.11483413726091385, -0.28706926107406616, -0.01636585220694542, 0.2658829689025879, -0.37057238817214966, 0.08439891040325165, -0.11327752470970154, -0.06434659659862518, 0.3032166063785553, 0.2771635353565216, 0.03474929928779602, -0.04012361168861389, 0.08712740242481232, 0.5422907471656799, 0.39379674196243286, 0.14811570942401886, -0.010949281975626945, -0.2448405623435974, -0.006482776254415512, -0.29181692004203796, 0.24675270915031433, 0.023753555491566658, 0.07222884893417358, -0.354619562625885, 0.3032394051551819, 0.19352279603481293, -0.18134519457817078, -0.09280481189489365, -0.12845155596733093, 0.4206129014492035, -0.4483557641506195, 0.1587057113647461, -0.11241588741540909, -0.19535967707633972, 0.1425839513540268, 0.08204303681850433, 0.18545696139335632, -0.30229201912879944, -0.0295005664229393, 0.19928193092346191, -0.4388642907142639, -0.0741920918226242, -0.13025228679180145, 0.11499904096126556, -0.20488478243350983, 0.3074131906032562, 0.029880210757255554, -0.06444767862558365, -0.22415418922901154, 0.2233828902244568, 0.09344659745693207, -0.3255036473274231, -0.05147600919008255, 0.33571088314056396, 0.1244492381811142, -0.16925673186779022, 0.2263891100883484, 0.18768364191055298, 0.0983557254076004, -0.21399958431720734, -0.17853885889053345, -0.01856027916073799, 0.0680077075958252, -0.14313755929470062, 0.08861029148101807, 0.3003416061401367, 0.1320551037788391, -0.010292544960975647, -0.21691952645778656, -0.30308079719543457, 0.07895401865243912, -0.08748894929885864, -0.030645135790109634, 0.2779075503349304, -0.05369079113006592, 0.31320416927337646, -0.05544808506965637, 0.1171557605266571, 0.037622302770614624, -0.272677481174469, -0.16855444014072418, -0.039665088057518005, 0.12519299983978271, 0.11737938225269318, -0.28878873586654663, 0.0838671401143074, 0.049231983721256256, -0.12032176554203033, 0.09488144516944885, 0.36655253171920776, 0.5331294536590576, 0.15313945710659027, 0.2560446262359619, 0.33538466691970825, 0.22631019353866577, -0.0582437589764595, 0.13788090646266937, 0.21513237059116364, 0.26420900225639343, -0.10353207588195801, 0.2686173915863037, -0.2760923504829407, -0.05015645921230316, 0.2204577475786209, 0.38025909662246704, 0.3399736285209656, 0.03268713131546974, 0.04307863861322403, -0.32499369978904724, 0.07453881204128265, -0.22005467116832733, 0.2337302714586258, 0.055874183773994446, -0.4577510356903076, -0.48865923285484314, 0.3148384392261505, 0.1937686800956726, 0.08299383521080017, -0.06329286098480225, -0.12817412614822388, 0.3827184736728668, -0.3096776008605957, 0.521975040435791, 0.09659788757562637, -0.05415838211774826, 0.16449856758117676, -0.11041446775197983, 0.4193938672542572, -0.07170052081346512, 0.05611957237124443, 0.1532856673002243, -0.3801315426826477, 0.30524009466171265, 0.3850751519203186, 0.48363709449768066, 0.0012047924101352692, 0.1006101742386818, -0.11359527707099915, 0.25828319787979126, -0.014712776988744736, 0.32829099893569946, -0.16750450432300568, -0.27000361680984497, 0.059459712356328964, 0.2841755747795105, -0.26199090480804443, 0.09153986722230911, 0.1830620914697647, 0.3343942165374756, 0.27209335565567017, -0.06105174869298935, -0.2945138216018677, 0.32149139046669006, -0.36935365200042725, 0.020388074219226837, -0.07417511194944382, 0.16874754428863525, -0.0610915869474411, 0.03640761971473694, -0.054547764360904694, -0.4426564872264862, -0.39000070095062256, -0.02722831442952156, -0.004997264593839645, -0.01397896371781826, 0.13664431869983673, -0.028891148045659065, -0.032444633543491364, -0.16516563296318054, 0.006945278495550156, -0.29841116070747375, 0.2984248697757721, 0.5553311109542847, 0.17403952777385712, 0.4184669852256775, 0.24518966674804688, 0.5970750451087952, 0.11201684176921844, -0.285368949174881, 0.2943585515022278, 0.09947023540735245, 0.2560998499393463, 0.21402448415756226, -0.04754708334803581, 0.24680104851722717, 0.07978208363056183, -0.0817674845457077, -0.17667292058467865, 0.19395913183689117, 0.08967234939336777, -0.05294038727879524, 0.5554101467132568, -0.25634559988975525, -0.2756207287311554, -0.49090173840522766, 0.05251425504684448, -0.5385043621063232, 0.1927436888217926, 0.14085586369037628, -0.0257989764213562, 0.28310832381248474, -0.05501289665699005, 0.07926282286643982, -0.05571473762392998, 0.4006941020488739, 0.5329259037971497, -0.13494941592216492, -0.15745237469673157, 0.022882014513015747, -0.5486104488372803, 0.390211284160614, 0.23606815934181213, 0.04991026222705841, 0.10802756249904633, -0.0705726221203804, -0.0025708451867103577, 0.24349504709243774, 0.06139083579182625, 0.17828790843486786, -0.4208604395389557, -0.3622308075428009, 0.011674702167510986, 0.1529179960489273, 0.09250729531049728, 0.032374486327171326, -0.0752287209033966, -0.11787223815917969, 0.33577343821525574, -0.33746016025543213, -0.06907323747873306, -0.23327092826366425, 0.23445342481136322, -0.4791369140148163, 0.028704732656478882, 0.28981107473373413, 0.08582223951816559, 0.11086653172969818, 0.19553236663341522, 0.09736867994070053, 0.17716196179389954, -0.06898230314254761, -0.17302869260311127, 0.17212335765361786, -0.0332440510392189, -0.16635924577713013, 0.028547383844852448, -0.03696858137845993, -0.23181982338428497, 0.12027160823345184, 0.18371781706809998, -0.422913521528244, -0.1440371870994568, 0.12835460901260376, -0.08124341070652008, -0.20505103468894958, -0.18704506754875183, 0.08483502268791199, 0.181217759847641, 0.23912054300308228, -0.29270970821380615, 0.15876302123069763, 0.5162741541862488, -0.6274542808532715, 0.02065456658601761, -0.42950084805488586, 0.3758520185947418, 0.33577221632003784, -0.5495498180389404, -0.5109553337097168, 0.2867289185523987, 0.22139579057693481, -0.19647406041622162, -0.07012582570314407, 0.11844678223133087, -0.4452683627605438, -0.014273174107074738, -0.062393464148044586, 0.35182374715805054, 0.030310165137052536, -0.394156813621521, 0.29748594760894775, -0.2750541567802429 ]
https://github.com/huggingface/datasets/issues/6410
Hi! You can avoid the error by requesting only the `jsonl` files. `dataset = load_dataset("ai4privacy/pii-masking-200k", data_files=["*.jsonl"])`. Our data file inference does not filter out (incompatible) `json` files because `json` and `jsonl` use the same builder. Still, I think the inference should differentiate these extensions because it's safe to assume that loading them together will lead to an error. WDYT @lhoestq?
Datasets does not load HuggingFace Repository properly
### Describe the bug Dear Datasets team, We just have published a dataset on Huggingface: https://huggingface.co/ai4privacy However, when trying to read it using the Dataset library we get an error. As I understand jsonl files are compatible, could you please clarify how we can solve the issue? Please let me know and we would be more than happy to adapt the structure of the repository or meta data so it works easier: ```python from datasets import load_dataset dataset = load_dataset("ai4privacy/pii-masking-200k") ``` ``` Downloading readme: 100% 11.8k/11.8k [00:00<00:00, 512kB/s] Downloading data files: 100% 1/1 [00:11<00:00, 11.16s/it] Downloading data: 100% 64.3M/64.3M [00:02<00:00, 32.9MB/s] Downloading data: 100% 113M/113M [00:03<00:00, 35.0MB/s] Downloading data: 100% 97.7M/97.7M [00:02<00:00, 46.1MB/s] Downloading data: 100% 90.8M/90.8M [00:02<00:00, 44.9MB/s] Downloading data: 100% 7.63k/7.63k [00:00<00:00, 41.0kB/s] Downloading data: 100% 1.03k/1.03k [00:00<00:00, 9.44kB/s] Extracting data files: 100% 1/1 [00:00<00:00, 29.26it/s] Generating train split: 209261/0 [00:05<00:00, 41201.25 examples/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1939 ) -> 1940 writer.write_table(table) 1941 num_examples_progress_update += len(table) 8 frames [/usr/local/lib/python3.10/dist-packages/datasets/arrow_writer.py](https://localhost:8080/#) in write_table(self, pa_table, writer_batch_size) 571 pa_table = pa_table.combine_chunks() --> 572 pa_table = table_cast(pa_table, self._schema) 573 if self.embed_local_files: [/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in table_cast(table, schema) 2327 if table.schema != schema: -> 2328 return cast_table_to_schema(table, schema) 2329 elif table.schema.metadata != schema.metadata: [/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in cast_table_to_schema(table, schema) 2285 if sorted(table.column_names) != sorted(features): -> 2286 raise ValueError(f"Couldn't cast\n{table.schema}\nto\n{features}\nbecause column names don't match") 2287 arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] ValueError: Couldn't cast JOBTYPE: int64 PHONEIMEI: int64 ACCOUNTNAME: int64 VEHICLEVIN: int64 GENDER: int64 CURRENCYCODE: int64 CREDITCARDISSUER: int64 JOBTITLE: int64 SEX: int64 CURRENCYSYMBOL: int64 IP: int64 EYECOLOR: int64 MASKEDNUMBER: int64 SECONDARYADDRESS: int64 JOBAREA: int64 ACCOUNTNUMBER: int64 language: string BITCOINADDRESS: int64 MAC: int64 SSN: int64 EMAIL: int64 ETHEREUMADDRESS: int64 DOB: int64 VEHICLEVRM: int64 IPV6: int64 AMOUNT: int64 URL: int64 PHONENUMBER: int64 PIN: int64 TIME: int64 CREDITCARDNUMBER: int64 FIRSTNAME: int64 IBAN: int64 BIC: int64 COUNTY: int64 STATE: int64 LASTNAME: int64 ZIPCODE: int64 HEIGHT: int64 ORDINALDIRECTION: int64 MIDDLENAME: int64 STREET: int64 USERNAME: int64 CURRENCY: int64 PREFIX: int64 USERAGENT: int64 CURRENCYNAME: int64 LITECOINADDRESS: int64 CREDITCARDCVV: int64 AGE: int64 CITY: int64 PASSWORD: int64 BUILDINGNUMBER: int64 IPV4: int64 NEARBYGPSCOORDINATE: int64 DATE: int64 COMPANYNAME: int64 to {'masked_text': Value(dtype='string', id=None), 'unmasked_text': Value(dtype='string', id=None), 'privacy_mask': Value(dtype='string', id=None), 'span_labels': Value(dtype='string', id=None), 'bio_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'tokenised_text': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} because column names don't match The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) [<ipython-input-2-f1c6811e9c83>](https://localhost:8080/#) in <cell line: 3>() 1 from datasets import load_dataset 2 ----> 3 dataset = load_dataset("ai4privacy/pii-masking-200k") [/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://localhost:8080/#) in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 2151 2152 # Download and prepare data -> 2153 builder_instance.download_and_prepare( 2154 download_config=download_config, 2155 download_mode=download_mode, [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 952 if num_proc is not None: 953 prepare_split_kwargs["num_proc"] = num_proc --> 954 self._download_and_prepare( 955 dl_manager=dl_manager, 956 verification_mode=verification_mode, [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 1047 try: 1048 # Prepare split will record examples associated to the split -> 1049 self._prepare_split(split_generator, **prepare_split_kwargs) 1050 except OSError as e: 1051 raise OSError( [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1811 job_id = 0 1812 with pbar: -> 1813 for job_id, done, content in self._prepare_split_single( 1814 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1815 ): [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1956 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1957 e = e.__context__ -> 1958 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1959 1960 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` Thank you and have a great day ahead ### Steps to reproduce the bug Open Google Colab Notebook: Run command: !pip3 install datasets Run code: from datasets import load_dataset dataset = load_dataset("ai4privacy/pii-masking-200k") ### Expected behavior Download the dataset successfully from HuggingFace to the notebook so that we can start working with it ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.19.1 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
60
Datasets does not load HuggingFace Repository properly ### Describe the bug Dear Datasets team, We just have published a dataset on Huggingface: https://huggingface.co/ai4privacy However, when trying to read it using the Dataset library we get an error. As I understand jsonl files are compatible, could you please clarify how we can solve the issue? Please let me know and we would be more than happy to adapt the structure of the repository or meta data so it works easier: ```python from datasets import load_dataset dataset = load_dataset("ai4privacy/pii-masking-200k") ``` ``` Downloading readme: 100% 11.8k/11.8k [00:00<00:00, 512kB/s] Downloading data files: 100% 1/1 [00:11<00:00, 11.16s/it] Downloading data: 100% 64.3M/64.3M [00:02<00:00, 32.9MB/s] Downloading data: 100% 113M/113M [00:03<00:00, 35.0MB/s] Downloading data: 100% 97.7M/97.7M [00:02<00:00, 46.1MB/s] Downloading data: 100% 90.8M/90.8M [00:02<00:00, 44.9MB/s] Downloading data: 100% 7.63k/7.63k [00:00<00:00, 41.0kB/s] Downloading data: 100% 1.03k/1.03k [00:00<00:00, 9.44kB/s] Extracting data files: 100% 1/1 [00:00<00:00, 29.26it/s] Generating train split: 209261/0 [00:05<00:00, 41201.25 examples/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1939 ) -> 1940 writer.write_table(table) 1941 num_examples_progress_update += len(table) 8 frames [/usr/local/lib/python3.10/dist-packages/datasets/arrow_writer.py](https://localhost:8080/#) in write_table(self, pa_table, writer_batch_size) 571 pa_table = pa_table.combine_chunks() --> 572 pa_table = table_cast(pa_table, self._schema) 573 if self.embed_local_files: [/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in table_cast(table, schema) 2327 if table.schema != schema: -> 2328 return cast_table_to_schema(table, schema) 2329 elif table.schema.metadata != schema.metadata: [/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in cast_table_to_schema(table, schema) 2285 if sorted(table.column_names) != sorted(features): -> 2286 raise ValueError(f"Couldn't cast\n{table.schema}\nto\n{features}\nbecause column names don't match") 2287 arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] ValueError: Couldn't cast JOBTYPE: int64 PHONEIMEI: int64 ACCOUNTNAME: int64 VEHICLEVIN: int64 GENDER: int64 CURRENCYCODE: int64 CREDITCARDISSUER: int64 JOBTITLE: int64 SEX: int64 CURRENCYSYMBOL: int64 IP: int64 EYECOLOR: int64 MASKEDNUMBER: int64 SECONDARYADDRESS: int64 JOBAREA: int64 ACCOUNTNUMBER: int64 language: string BITCOINADDRESS: int64 MAC: int64 SSN: int64 EMAIL: int64 ETHEREUMADDRESS: int64 DOB: int64 VEHICLEVRM: int64 IPV6: int64 AMOUNT: int64 URL: int64 PHONENUMBER: int64 PIN: int64 TIME: int64 CREDITCARDNUMBER: int64 FIRSTNAME: int64 IBAN: int64 BIC: int64 COUNTY: int64 STATE: int64 LASTNAME: int64 ZIPCODE: int64 HEIGHT: int64 ORDINALDIRECTION: int64 MIDDLENAME: int64 STREET: int64 USERNAME: int64 CURRENCY: int64 PREFIX: int64 USERAGENT: int64 CURRENCYNAME: int64 LITECOINADDRESS: int64 CREDITCARDCVV: int64 AGE: int64 CITY: int64 PASSWORD: int64 BUILDINGNUMBER: int64 IPV4: int64 NEARBYGPSCOORDINATE: int64 DATE: int64 COMPANYNAME: int64 to {'masked_text': Value(dtype='string', id=None), 'unmasked_text': Value(dtype='string', id=None), 'privacy_mask': Value(dtype='string', id=None), 'span_labels': Value(dtype='string', id=None), 'bio_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'tokenised_text': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} because column names don't match The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) [<ipython-input-2-f1c6811e9c83>](https://localhost:8080/#) in <cell line: 3>() 1 from datasets import load_dataset 2 ----> 3 dataset = load_dataset("ai4privacy/pii-masking-200k") [/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://localhost:8080/#) in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 2151 2152 # Download and prepare data -> 2153 builder_instance.download_and_prepare( 2154 download_config=download_config, 2155 download_mode=download_mode, [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 952 if num_proc is not None: 953 prepare_split_kwargs["num_proc"] = num_proc --> 954 self._download_and_prepare( 955 dl_manager=dl_manager, 956 verification_mode=verification_mode, [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 1047 try: 1048 # Prepare split will record examples associated to the split -> 1049 self._prepare_split(split_generator, **prepare_split_kwargs) 1050 except OSError as e: 1051 raise OSError( [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1811 job_id = 0 1812 with pbar: -> 1813 for job_id, done, content in self._prepare_split_single( 1814 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1815 ): [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1956 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1957 e = e.__context__ -> 1958 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1959 1960 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` Thank you and have a great day ahead ### Steps to reproduce the bug Open Google Colab Notebook: Run command: !pip3 install datasets Run code: from datasets import load_dataset dataset = load_dataset("ai4privacy/pii-masking-200k") ### Expected behavior Download the dataset successfully from HuggingFace to the notebook so that we can start working with it ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.19.1 - PyArrow version: 9.0.0 - Pandas version: 1.5.3 Hi! You can avoid the error by requesting only the `jsonl` files. `dataset = load_dataset("ai4privacy/pii-masking-200k", data_files=["*.jsonl"])`. Our data file inference does not filter out (incompatible) `json` files because `json` and `jsonl` use the same builder. Still, I think the inference should differentiate these extensions because it's safe to assume that loading them together will lead to an error. WDYT @lhoestq?
[ -0.20247381925582886, -0.10110732913017273, -0.026749910786747932, 0.7637389898300171, 0.29011261463165283, -0.03652459383010864, -0.00203618872910738, 0.24976053833961487, 0.019404388964176178, 0.02537638321518898, -0.2364252805709839, 0.2252340018749237, -0.05940572917461395, 0.3319411277770996, -0.19770243763923645, -0.1540747433900833, 0.07021734118461609, -0.006713144481182098, -0.08052992820739746, -0.0777132511138916, -0.18396642804145813, 0.4110557734966278, -0.22362588346004486, 0.048237744718790054, -0.029984060674905777, -0.050648488104343414, 0.17149034142494202, 0.2671031057834625, -0.2626781165599823, -0.23698031902313232, 0.41195592284202576, -0.04391573369503021, 0.22523927688598633, 0.5600345134735107, -0.00011539299157448113, 0.1615813672542572, 0.42421501874923706, -0.10914666950702667, -0.06255194544792175, -0.4684293568134308, -0.2520654499530792, -0.23417679965496063, 0.14121964573860168, -0.06918185949325562, -0.36504292488098145, -0.11138422787189484, -0.013846205547451973, -0.19534263014793396, 0.49415263533592224, 0.07767350971698761, 0.2299177199602127, 0.43579956889152527, 0.37266749143600464, 0.06933656334877014, -0.04540553689002991, 0.1383909434080124, -0.13756510615348816, 0.3135141134262085, -0.06195805221796036, 0.28848955035209656, 0.05094379931688309, 0.3174719214439392, -0.05821172893047333, -0.15923380851745605, 0.3427146077156067, 0.035491298884153366, -0.17736898362636566, -0.2504197955131531, 0.12472650408744812, 0.19873879849910736, 0.4933810234069824, -0.27707797288894653, -0.38416001200675964, -0.2093866467475891, -0.06079214811325073, -0.12001122534275055, 0.4321158826351166, 0.10829818248748779, 0.07798556983470917, 0.3454264998435974, -0.28139713406562805, -0.21840068697929382, -0.2560521960258484, 0.28083789348602295, 0.13281914591789246, 0.11175303161144257, -0.30810704827308655, 0.09662841260433197, 0.1015547588467598, -0.2184198796749115, -0.22994962334632874, -0.004881901666522026, 0.03944507613778114, 0.15918801724910736, -0.24204447865486145, 0.0636955201625824, -0.2126559168100357, 0.22232328355312347, 0.4664997458457947, 0.4229540228843689, -0.17232125997543335, 0.0033791419118642807, -0.3544340133666992, 0.1232287809252739, 0.41831067204475403, 0.08599035441875458, -0.0703342854976654, 0.02304670959711075, 0.3201691508293152, 0.25729912519454956, 0.09269212186336517, 0.005155855789780617, -0.24215245246887207, -0.08543596416711807, -0.1889226734638214, -0.34445053339004517, 0.2618058919906616, -0.3669194281101227, -0.30931568145751953, 0.12911805510520935, -0.4007783830165863, -0.0770210325717926, 0.2157905101776123, 0.3830738663673401, -0.0940689891576767, 0.20471695065498352, 0.11308075487613678, 0.2081514149904251, -0.16297438740730286, -0.15690787136554718, -0.17517447471618652, -0.04473672807216644, -0.015653982758522034, -0.05961782857775688, 0.08046223223209381, -0.4342641234397888, 0.5156298279762268, -0.01775190979242325, 0.07787539809942245, -0.1281135082244873, -0.11275079846382141, -0.012671906501054764, -0.09444781392812729, 0.26114749908447266, 0.182745099067688, 0.12268348783254623, 0.03332594409584999, -0.10955783724784851, -0.22089587152004242, 0.0006975270807743073, -0.2639513611793518, 0.0005125477910041809, -0.045918356627225876, 0.13810187578201294, -0.3009098470211029, 0.07131382822990417, -0.6343059539794922, 0.10518451035022736, -0.12859535217285156, -0.03540191054344177, -0.03455980867147446, 0.050373367965221405, -0.08123699575662613, -0.16610021889209747, 0.4698207676410675, 0.39779502153396606, -0.13455399870872498, -0.2289409339427948, 0.05104236677289009, -0.4074133336544037, 0.0986461341381073, 0.47189369797706604, -0.0709756538271904, -0.19432583451271057, -0.19998714327812195, 0.15202057361602783, -0.0027768313884735107, -0.31749486923217773, -0.6252049207687378, 0.4136506915092468, -0.054185785353183746, 0.32945749163627625, -0.09750749170780182, 0.1796090453863144, -0.14945954084396362, 0.12647700309753418, -0.06219969317317009, 0.2430834323167801, 0.06176852434873581, -0.047011300921440125, -0.1572001874446869, -0.4699110686779022, 0.1463821679353714, 0.208766907453537, -0.11007589101791382, 0.05550960451364517, 0.07998000085353851, -0.036861710250377655, 0.34942084550857544, 0.15941943228244781, 0.0013812854886054993, 0.15586048364639282, 0.29573118686676025, 0.15482822060585022, 0.08039403706789017, 0.0045633465051651, -0.719307541847229, 0.1443624645471573, 0.15760928392410278, -0.028338059782981873, -0.2026827484369278, -0.07544037699699402, -0.28039538860321045, 0.07065233588218689, -0.33862099051475525, -0.016489118337631226, 0.01749492436647415, -0.03720365837216377, 0.1338711977005005, 0.10760891437530518, -0.28868603706359863, 0.5915172100067139, 0.07636106014251709, 0.24873054027557373, -0.7363873720169067, 0.3233528137207031, -0.12542986869812012, 0.07203540205955505, 0.3358306884765625, 0.2443688064813614, 0.14688372611999512, -0.2681550979614258, -0.0877724289894104, 0.3674442768096924, 0.0037030987441539764, 0.16281196475028992, -0.02457846701145172, 0.22790604829788208, 0.23427759110927582, -0.339971661567688, -0.06902336329221725, 0.2293630987405777, 0.048938579857349396, 0.0564642995595932, -0.15987133979797363, 0.32104986906051636, 0.0004015355370938778, 0.17622502148151398, -0.03989275544881821, -0.046712517738342285, 0.4249088764190674, -0.030492134392261505, -0.3012361228466034, -0.15077438950538635, 0.29908376932144165, -0.06348802149295807, 0.4037571847438812, 0.13242219388484955, -0.4345093369483948, -0.2680310606956482, 0.17172043025493622, -0.013786934316158295, -0.13268786668777466, 0.212445929646492, -0.25227075815200806, 0.09649944305419922, 0.1093510091304779, 0.022893905639648438, 0.14948713779449463, 0.11884309351444244, -0.21434485912322998, 0.22422415018081665, 0.10149255394935608, -0.18704605102539062, -0.06231077015399933, 0.037807561457157135, 0.14723056554794312, 0.028224939480423927, 0.0038126036524772644, 0.08014077693223953, -0.2904890477657318, -0.026990793645381927, -0.1443047970533371, 0.304863303899765, -0.3325057625770569, 0.02329941838979721, -0.24856220185756683, -0.34044381976127625, -0.17020630836486816, -0.035871472209692, -0.38324782252311707, -0.1299360990524292, -0.31002601981163025, 0.2699485421180725, 0.05326205492019653, 0.03153085708618164, -0.13614521920681, 0.15964923799037933, 0.04990626126527786, -0.16422204673290253, -0.2597730755805969, -0.014457469806075096, -0.32249951362609863, 0.03066021203994751, 0.45174074172973633, 0.10537516325712204, 0.33262374997138977, -0.2728821635246277, -0.012041963636875153, -0.22841182351112366, -0.3156462013721466, 0.1616477072238922, -0.10869335383176804, 0.33598434925079346, 0.03785330057144165, 0.11369973421096802, 0.0019060075283050537, -0.09790641069412231, 0.35575902462005615, -0.12058918178081512, -0.2926102578639984, -0.05828795209527016, -0.07153286039829254, -0.22865936160087585, -0.1409299522638321, -0.3686297535896301, -0.1472417116165161, -0.19850826263427734, 0.44963720440864563, 0.05118580907583237, -0.07792947441339493, 0.23582172393798828, 0.044223688542842865, 0.10916946828365326, -0.020174900069832802, -0.11052117496728897, -0.21282914280891418, -0.5246167182922363, 0.23329950869083405, -0.17592482268810272, -0.40888434648513794, 0.06409204006195068, 0.14724841713905334, 0.18747089803218842, 0.043454859405756, -0.5981349945068359, -0.18473701179027557, -0.12044757604598999, 0.08401434123516083, -0.07460775971412659, -0.009697582572698593, -0.10344693064689636, -0.08294669538736343, 0.19064778089523315, -0.15273919701576233, -0.3743157982826233, 0.17978470027446747, -0.27102038264274597, 0.2265336960554123, 0.20180284976959229, 0.5189445614814758, -0.13793639838695526, 0.3214723467826843, 0.5626819729804993, -0.24526721239089966, 0.2880084216594696, -0.04369952529668808, 0.4180394113063812, 0.04831235110759735, -0.25480708479881287, 0.02298378199338913, 0.08070202171802521, 0.12746453285217285, 0.2169894576072693, 0.20443326234817505, 0.18240506947040558, -0.2793238162994385, -0.1692337691783905, -0.3800141513347626, -0.19066491723060608, -0.13000302016735077, 0.22610673308372498, 0.1676926463842392, 0.09864534437656403, 0.0898553729057312, 0.12284907698631287, -0.17149706184864044, 0.21571992337703705, 0.5035191178321838, 0.1183001846075058, 0.21935966610908508, -0.5257463455200195, 0.01770680770277977, -0.5077208876609802, 0.2712343633174896, -0.037007447332143784, 0.25467026233673096, 0.01624617725610733, 0.2161630094051361, 0.10600767284631729, -0.07404495775699615, 0.6631454825401306, 0.049267709255218506, 0.033205870538949966, -0.0048127807676792145, -0.10114707797765732, -0.23984386026859283, 0.18723200261592865, -0.07081232964992523, 0.08888183534145355, 0.21213707327842712, 0.7063568830490112, -0.4514237642288208, -0.205423966050148, 0.12118011713027954, 0.1170271635055542, -0.13596543669700623, -0.28152796626091003, -0.30582940578460693, -0.38528895378112793, -0.297574907541275, -0.21367880702018738, -0.044338613748550415, 0.2446930706501007, 0.0742555633187294, 0.01120065152645111, -0.000026406720280647278, -0.07704184204339981, 0.18158499896526337, 0.3103819191455841, 0.3705393075942993, 0.07067522406578064, 0.34047287702560425, 0.5007094740867615, 0.26533204317092896, 0.49886247515678406, 0.8047419786453247, -0.017566755414009094, -0.45291656255722046, -0.12743821740150452, 0.0410950668156147, 0.12312151491641998, 0.05033431202173233, -0.19158899784088135, 0.09310274571180344, 0.19558849930763245, 0.02346508391201496, -0.24798209965229034, 0.11186490952968597, 0.23896852135658264, 0.15938003361225128, -0.4125639498233795, -0.5046042203903198, 0.4951016902923584, 0.14217479526996613, 0.13907869160175323, -0.13802842795848846, 0.35885629057884216, -0.16755875945091248, 0.08367954194545746, -0.15587234497070312, 0.7385651469230652, -0.1155073493719101, -0.12011274695396423, 0.48049360513687134, -0.1057872325181961, 0.4779641032218933, -0.18989232182502747, -0.07225483655929565, -0.3254937529563904, 0.06904979050159454, -0.07889396697282791, -0.06683141738176346, 0.10766765475273132, 0.03630317002534866, 0.01981174945831299, 0.25843629240989685, -0.023454822599887848, -0.0424172505736351, -0.044446494430303574, 0.37517687678337097, 0.05122346431016922, -0.03467342257499695, -0.5976720452308655, 0.13821664452552795, -0.0832802951335907, 0.37435582280158997, -0.07508177310228348, -0.1906377375125885, -0.2185959368944168, -0.1432088017463684, -0.2625606060028076, 0.15270791947841644, -0.2552364468574524, 0.022702425718307495, 0.3385937213897705, -0.18190442025661469, 0.3040744662284851, 0.2643658220767975, 0.3313003480434418, 0.08245178312063217, -0.3431508541107178, 0.12050871551036835, -0.29511040449142456, -0.11836545169353485, -0.033181995153427124, 0.12740734219551086, 0.07646050304174423, -0.10285557806491852, 0.003813132643699646, -0.11559457331895828, -0.013662058860063553, -0.2787899374961853, -0.014776602387428284, -0.039660464972257614, -0.08635636419057846, -0.1977434903383255, -0.2500403821468353, -0.10010409355163574, 0.1669895052909851, -0.1332099735736847, 0.04571014270186424, 0.29405078291893005, 0.12465085089206696, -0.15247654914855957, 0.29603099822998047, -0.1960182785987854, -0.13677799701690674, 0.334949791431427, -0.21826140582561493, -0.2151891589164734, 0.33152222633361816, 0.3177716135978699, -0.1263737678527832, -0.052233174443244934, 0.1045195460319519, 0.49760499596595764, -0.30954161286354065, -0.010570071637630463, 0.052190862596035004, 0.061163440346717834, -0.11487998068332672, 0.23551759123802185, 0.25996989011764526, -0.20308536291122437, 0.2971561551094055, -0.4844924509525299, -0.20171792805194855, 0.417865127325058, -0.0840476006269455, 0.006936594378203154, 0.21888378262519836, 0.09626324474811554, -0.19302085041999817, -0.21702560782432556, -0.2247096598148346, 0.12379767000675201, -0.2496105432510376, -0.07066783308982849, 0.3121757507324219, 0.08744111657142639, 0.31991738080978394, -0.09659530222415924, 0.06158430501818657, 0.04809524863958359, -0.26602014899253845, -0.07802993059158325, -0.31672459840774536, 0.106656014919281, 0.11895720660686493, -0.3156251907348633, -0.029633747413754463, -0.2004496306180954, -0.14277325570583344, -0.12373694777488708, 0.1252008080482483, 0.23697271943092346, 0.13535843789577484, -0.020597800612449646, -0.024470742791891098, 0.09801436960697174, -0.34452638030052185, 0.18352919816970825, 0.046415846794843674, 0.20472250878810883, 0.13039804995059967, -0.027025653049349785, -0.05414668098092079, 0.06255373358726501, -0.09367042779922485, 0.06099429726600647, 0.3488517999649048, 0.1019628494977951, 0.36800599098205566, -0.24989935755729675, 0.135209321975708, 0.41681477427482605, 0.39144548773765564, 0.35516372323036194, -0.2431180775165558, 0.11810844391584396, 0.25968635082244873, 0.1315154880285263, -0.26843562722206116, -0.04142438992857933, 0.3941543698310852, 0.0000745728611946106, -0.031743720173835754, 0.1768840253353119, 0.0887582004070282, 0.32140055298805237, -0.08776350319385529, 0.10360024869441986, 0.6137845516204834, 0.19308961927890778, 0.15527795255184174, 0.05887208133935928, -0.061545759439468384, 0.15549521148204803, 0.09089600294828415, 0.17786072194576263, 0.22377805411815643, 0.23561778664588928, -0.15413889288902283, 0.17565420269966125, -0.12040293216705322, 0.3127252161502838, 0.12142001837491989, -0.47684401273727417, -0.3155924677848816, 0.25574547052383423, -0.05966177210211754, 0.19492575526237488, -0.09525667130947113, 0.37133923172950745, 0.025914832949638367, -0.07254181057214737, -0.07804455608129501, 0.12425269186496735, -0.1427549421787262, -0.11395010352134705, -0.0007453262805938721, -0.2874169945716858, -0.23237355053424835, 0.048020631074905396, -0.194192036986351, -0.2181089222431183, 0.14890672266483307, 0.03446582704782486, -0.21625038981437683, -0.5780236721038818, -0.007441562134772539, 0.22299326956272125, -0.04324379563331604, -0.24772503972053528, 0.41296812891960144, 0.09426771104335785, -0.2560182213783264, 0.09598562121391296, 0.26610636711120605, 0.3129102289676666, 0.23274633288383484, 0.376072496175766, -0.1035202145576477, -0.045038703829050064, -0.05271563678979874, -0.12349959462881088, 0.20679005980491638, 0.04297396540641785, 0.07748628407716751, 0.2280910611152649, 0.10782625526189804, -0.06359187513589859, 0.0094867292791605, -0.00031491927802562714, 0.42210152745246887, -0.43171030282974243, 0.21660295128822327, -0.7187122702598572, -0.02084694802761078, -0.3436031937599182, -0.11631609499454498, -0.19316238164901733, 0.13252690434455872, 0.11412598192691803, 0.0709313154220581, 0.13272802531719208, -0.17743566632270813, 0.0521106943488121, 0.016774699091911316, 0.4220457971096039, 0.5924475193023682, 0.029078727588057518, -0.12553979456424713, -0.2913057804107666, -0.8193526268005371, 0.2971176505088806, -0.1558031439781189, 0.01796029508113861, 0.06036932021379471, 0.02670493721961975, -0.007836449891328812, 0.08274248987436295, -0.08318161964416504, -0.07084085792303085, 0.1285128891468048, -0.15619592368602753, -0.2198769599199295, -0.21486660838127136, -0.02280374988913536, -0.06620632857084274, 0.03666087985038757, -0.16657499969005585, 0.279208242893219, -0.07481153309345245, -0.1082414835691452, -0.2568657100200653, 0.2890550196170807, -0.3066962957382202, -0.19204148650169373, 0.13324615359306335, 0.29540014266967773, 0.3996942639350891, -0.08628296107053757, -0.23542366921901703, -0.3338446617126465, -0.22831711173057556, -0.2686620354652405, 0.3895230293273926, -0.10185723751783371, 0.5360655188560486, -0.2726183235645294, -0.1143788993358612, -0.4133925139904022, 0.14993233978748322, 0.017652302980422974, -0.15189620852470398, -0.34477320313453674, 0.2140440046787262, -0.30105462670326233, 0.06392881274223328, 0.11444735527038574, 0.3288857042789459, -0.04183449223637581, 0.04086829721927643, -0.12869785726070404, -0.13261716067790985, 0.44244441390037537, -0.4650469720363617, -0.08111011981964111, 0.0933157354593277, -0.07844720780849457, 0.1551327109336853, -0.3431030213832855, -0.529579222202301, 0.19848719239234924, 0.25112009048461914, -0.017208589240908623, -0.2855952978134155, 0.14555208384990692, 0.05116729810833931, -0.10156647861003876, 0.012636654078960419, 0.3728565275669098, 0.3334260880947113, -0.3731309771537781, 0.576646625995636, -0.10303734987974167 ]
https://github.com/huggingface/datasets/issues/6410
Raising an error if there is a mix of json and jsonl in the builder makes sense yea
Datasets does not load HuggingFace Repository properly
### Describe the bug Dear Datasets team, We just have published a dataset on Huggingface: https://huggingface.co/ai4privacy However, when trying to read it using the Dataset library we get an error. As I understand jsonl files are compatible, could you please clarify how we can solve the issue? Please let me know and we would be more than happy to adapt the structure of the repository or meta data so it works easier: ```python from datasets import load_dataset dataset = load_dataset("ai4privacy/pii-masking-200k") ``` ``` Downloading readme: 100% 11.8k/11.8k [00:00<00:00, 512kB/s] Downloading data files: 100% 1/1 [00:11<00:00, 11.16s/it] Downloading data: 100% 64.3M/64.3M [00:02<00:00, 32.9MB/s] Downloading data: 100% 113M/113M [00:03<00:00, 35.0MB/s] Downloading data: 100% 97.7M/97.7M [00:02<00:00, 46.1MB/s] Downloading data: 100% 90.8M/90.8M [00:02<00:00, 44.9MB/s] Downloading data: 100% 7.63k/7.63k [00:00<00:00, 41.0kB/s] Downloading data: 100% 1.03k/1.03k [00:00<00:00, 9.44kB/s] Extracting data files: 100% 1/1 [00:00<00:00, 29.26it/s] Generating train split: 209261/0 [00:05<00:00, 41201.25 examples/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1939 ) -> 1940 writer.write_table(table) 1941 num_examples_progress_update += len(table) 8 frames [/usr/local/lib/python3.10/dist-packages/datasets/arrow_writer.py](https://localhost:8080/#) in write_table(self, pa_table, writer_batch_size) 571 pa_table = pa_table.combine_chunks() --> 572 pa_table = table_cast(pa_table, self._schema) 573 if self.embed_local_files: [/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in table_cast(table, schema) 2327 if table.schema != schema: -> 2328 return cast_table_to_schema(table, schema) 2329 elif table.schema.metadata != schema.metadata: [/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in cast_table_to_schema(table, schema) 2285 if sorted(table.column_names) != sorted(features): -> 2286 raise ValueError(f"Couldn't cast\n{table.schema}\nto\n{features}\nbecause column names don't match") 2287 arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] ValueError: Couldn't cast JOBTYPE: int64 PHONEIMEI: int64 ACCOUNTNAME: int64 VEHICLEVIN: int64 GENDER: int64 CURRENCYCODE: int64 CREDITCARDISSUER: int64 JOBTITLE: int64 SEX: int64 CURRENCYSYMBOL: int64 IP: int64 EYECOLOR: int64 MASKEDNUMBER: int64 SECONDARYADDRESS: int64 JOBAREA: int64 ACCOUNTNUMBER: int64 language: string BITCOINADDRESS: int64 MAC: int64 SSN: int64 EMAIL: int64 ETHEREUMADDRESS: int64 DOB: int64 VEHICLEVRM: int64 IPV6: int64 AMOUNT: int64 URL: int64 PHONENUMBER: int64 PIN: int64 TIME: int64 CREDITCARDNUMBER: int64 FIRSTNAME: int64 IBAN: int64 BIC: int64 COUNTY: int64 STATE: int64 LASTNAME: int64 ZIPCODE: int64 HEIGHT: int64 ORDINALDIRECTION: int64 MIDDLENAME: int64 STREET: int64 USERNAME: int64 CURRENCY: int64 PREFIX: int64 USERAGENT: int64 CURRENCYNAME: int64 LITECOINADDRESS: int64 CREDITCARDCVV: int64 AGE: int64 CITY: int64 PASSWORD: int64 BUILDINGNUMBER: int64 IPV4: int64 NEARBYGPSCOORDINATE: int64 DATE: int64 COMPANYNAME: int64 to {'masked_text': Value(dtype='string', id=None), 'unmasked_text': Value(dtype='string', id=None), 'privacy_mask': Value(dtype='string', id=None), 'span_labels': Value(dtype='string', id=None), 'bio_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'tokenised_text': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} because column names don't match The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) [<ipython-input-2-f1c6811e9c83>](https://localhost:8080/#) in <cell line: 3>() 1 from datasets import load_dataset 2 ----> 3 dataset = load_dataset("ai4privacy/pii-masking-200k") [/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://localhost:8080/#) in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 2151 2152 # Download and prepare data -> 2153 builder_instance.download_and_prepare( 2154 download_config=download_config, 2155 download_mode=download_mode, [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 952 if num_proc is not None: 953 prepare_split_kwargs["num_proc"] = num_proc --> 954 self._download_and_prepare( 955 dl_manager=dl_manager, 956 verification_mode=verification_mode, [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 1047 try: 1048 # Prepare split will record examples associated to the split -> 1049 self._prepare_split(split_generator, **prepare_split_kwargs) 1050 except OSError as e: 1051 raise OSError( [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1811 job_id = 0 1812 with pbar: -> 1813 for job_id, done, content in self._prepare_split_single( 1814 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1815 ): [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1956 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1957 e = e.__context__ -> 1958 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1959 1960 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` Thank you and have a great day ahead ### Steps to reproduce the bug Open Google Colab Notebook: Run command: !pip3 install datasets Run code: from datasets import load_dataset dataset = load_dataset("ai4privacy/pii-masking-200k") ### Expected behavior Download the dataset successfully from HuggingFace to the notebook so that we can start working with it ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.19.1 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
18
Datasets does not load HuggingFace Repository properly ### Describe the bug Dear Datasets team, We just have published a dataset on Huggingface: https://huggingface.co/ai4privacy However, when trying to read it using the Dataset library we get an error. As I understand jsonl files are compatible, could you please clarify how we can solve the issue? Please let me know and we would be more than happy to adapt the structure of the repository or meta data so it works easier: ```python from datasets import load_dataset dataset = load_dataset("ai4privacy/pii-masking-200k") ``` ``` Downloading readme: 100% 11.8k/11.8k [00:00<00:00, 512kB/s] Downloading data files: 100% 1/1 [00:11<00:00, 11.16s/it] Downloading data: 100% 64.3M/64.3M [00:02<00:00, 32.9MB/s] Downloading data: 100% 113M/113M [00:03<00:00, 35.0MB/s] Downloading data: 100% 97.7M/97.7M [00:02<00:00, 46.1MB/s] Downloading data: 100% 90.8M/90.8M [00:02<00:00, 44.9MB/s] Downloading data: 100% 7.63k/7.63k [00:00<00:00, 41.0kB/s] Downloading data: 100% 1.03k/1.03k [00:00<00:00, 9.44kB/s] Extracting data files: 100% 1/1 [00:00<00:00, 29.26it/s] Generating train split: 209261/0 [00:05<00:00, 41201.25 examples/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1939 ) -> 1940 writer.write_table(table) 1941 num_examples_progress_update += len(table) 8 frames [/usr/local/lib/python3.10/dist-packages/datasets/arrow_writer.py](https://localhost:8080/#) in write_table(self, pa_table, writer_batch_size) 571 pa_table = pa_table.combine_chunks() --> 572 pa_table = table_cast(pa_table, self._schema) 573 if self.embed_local_files: [/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in table_cast(table, schema) 2327 if table.schema != schema: -> 2328 return cast_table_to_schema(table, schema) 2329 elif table.schema.metadata != schema.metadata: [/usr/local/lib/python3.10/dist-packages/datasets/table.py](https://localhost:8080/#) in cast_table_to_schema(table, schema) 2285 if sorted(table.column_names) != sorted(features): -> 2286 raise ValueError(f"Couldn't cast\n{table.schema}\nto\n{features}\nbecause column names don't match") 2287 arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] ValueError: Couldn't cast JOBTYPE: int64 PHONEIMEI: int64 ACCOUNTNAME: int64 VEHICLEVIN: int64 GENDER: int64 CURRENCYCODE: int64 CREDITCARDISSUER: int64 JOBTITLE: int64 SEX: int64 CURRENCYSYMBOL: int64 IP: int64 EYECOLOR: int64 MASKEDNUMBER: int64 SECONDARYADDRESS: int64 JOBAREA: int64 ACCOUNTNUMBER: int64 language: string BITCOINADDRESS: int64 MAC: int64 SSN: int64 EMAIL: int64 ETHEREUMADDRESS: int64 DOB: int64 VEHICLEVRM: int64 IPV6: int64 AMOUNT: int64 URL: int64 PHONENUMBER: int64 PIN: int64 TIME: int64 CREDITCARDNUMBER: int64 FIRSTNAME: int64 IBAN: int64 BIC: int64 COUNTY: int64 STATE: int64 LASTNAME: int64 ZIPCODE: int64 HEIGHT: int64 ORDINALDIRECTION: int64 MIDDLENAME: int64 STREET: int64 USERNAME: int64 CURRENCY: int64 PREFIX: int64 USERAGENT: int64 CURRENCYNAME: int64 LITECOINADDRESS: int64 CREDITCARDCVV: int64 AGE: int64 CITY: int64 PASSWORD: int64 BUILDINGNUMBER: int64 IPV4: int64 NEARBYGPSCOORDINATE: int64 DATE: int64 COMPANYNAME: int64 to {'masked_text': Value(dtype='string', id=None), 'unmasked_text': Value(dtype='string', id=None), 'privacy_mask': Value(dtype='string', id=None), 'span_labels': Value(dtype='string', id=None), 'bio_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'tokenised_text': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} because column names don't match The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) [<ipython-input-2-f1c6811e9c83>](https://localhost:8080/#) in <cell line: 3>() 1 from datasets import load_dataset 2 ----> 3 dataset = load_dataset("ai4privacy/pii-masking-200k") [/usr/local/lib/python3.10/dist-packages/datasets/load.py](https://localhost:8080/#) in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 2151 2152 # Download and prepare data -> 2153 builder_instance.download_and_prepare( 2154 download_config=download_config, 2155 download_mode=download_mode, [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 952 if num_proc is not None: 953 prepare_split_kwargs["num_proc"] = num_proc --> 954 self._download_and_prepare( 955 dl_manager=dl_manager, 956 verification_mode=verification_mode, [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 1047 try: 1048 # Prepare split will record examples associated to the split -> 1049 self._prepare_split(split_generator, **prepare_split_kwargs) 1050 except OSError as e: 1051 raise OSError( [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1811 job_id = 0 1812 with pbar: -> 1813 for job_id, done, content in self._prepare_split_single( 1814 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1815 ): [/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1956 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1957 e = e.__context__ -> 1958 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1959 1960 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` Thank you and have a great day ahead ### Steps to reproduce the bug Open Google Colab Notebook: Run command: !pip3 install datasets Run code: from datasets import load_dataset dataset = load_dataset("ai4privacy/pii-masking-200k") ### Expected behavior Download the dataset successfully from HuggingFace to the notebook so that we can start working with it ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.19.1 - PyArrow version: 9.0.0 - Pandas version: 1.5.3 Raising an error if there is a mix of json and jsonl in the builder makes sense yea
[ -0.20247381925582886, -0.10110732913017273, -0.026749910786747932, 0.7637389898300171, 0.29011261463165283, -0.03652459383010864, -0.00203618872910738, 0.24976053833961487, 0.019404388964176178, 0.02537638321518898, -0.2364252805709839, 0.2252340018749237, -0.05940572917461395, 0.3319411277770996, -0.19770243763923645, -0.1540747433900833, 0.07021734118461609, -0.006713144481182098, -0.08052992820739746, -0.0777132511138916, -0.18396642804145813, 0.4110557734966278, -0.22362588346004486, 0.048237744718790054, -0.029984060674905777, -0.050648488104343414, 0.17149034142494202, 0.2671031057834625, -0.2626781165599823, -0.23698031902313232, 0.41195592284202576, -0.04391573369503021, 0.22523927688598633, 0.5600345134735107, -0.00011539299157448113, 0.1615813672542572, 0.42421501874923706, -0.10914666950702667, -0.06255194544792175, -0.4684293568134308, -0.2520654499530792, -0.23417679965496063, 0.14121964573860168, -0.06918185949325562, -0.36504292488098145, -0.11138422787189484, -0.013846205547451973, -0.19534263014793396, 0.49415263533592224, 0.07767350971698761, 0.2299177199602127, 0.43579956889152527, 0.37266749143600464, 0.06933656334877014, -0.04540553689002991, 0.1383909434080124, -0.13756510615348816, 0.3135141134262085, -0.06195805221796036, 0.28848955035209656, 0.05094379931688309, 0.3174719214439392, -0.05821172893047333, -0.15923380851745605, 0.3427146077156067, 0.035491298884153366, -0.17736898362636566, -0.2504197955131531, 0.12472650408744812, 0.19873879849910736, 0.4933810234069824, -0.27707797288894653, -0.38416001200675964, -0.2093866467475891, -0.06079214811325073, -0.12001122534275055, 0.4321158826351166, 0.10829818248748779, 0.07798556983470917, 0.3454264998435974, -0.28139713406562805, -0.21840068697929382, -0.2560521960258484, 0.28083789348602295, 0.13281914591789246, 0.11175303161144257, -0.30810704827308655, 0.09662841260433197, 0.1015547588467598, -0.2184198796749115, -0.22994962334632874, -0.004881901666522026, 0.03944507613778114, 0.15918801724910736, -0.24204447865486145, 0.0636955201625824, -0.2126559168100357, 0.22232328355312347, 0.4664997458457947, 0.4229540228843689, -0.17232125997543335, 0.0033791419118642807, -0.3544340133666992, 0.1232287809252739, 0.41831067204475403, 0.08599035441875458, -0.0703342854976654, 0.02304670959711075, 0.3201691508293152, 0.25729912519454956, 0.09269212186336517, 0.005155855789780617, -0.24215245246887207, -0.08543596416711807, -0.1889226734638214, -0.34445053339004517, 0.2618058919906616, -0.3669194281101227, -0.30931568145751953, 0.12911805510520935, -0.4007783830165863, -0.0770210325717926, 0.2157905101776123, 0.3830738663673401, -0.0940689891576767, 0.20471695065498352, 0.11308075487613678, 0.2081514149904251, -0.16297438740730286, -0.15690787136554718, -0.17517447471618652, -0.04473672807216644, -0.015653982758522034, -0.05961782857775688, 0.08046223223209381, -0.4342641234397888, 0.5156298279762268, -0.01775190979242325, 0.07787539809942245, -0.1281135082244873, -0.11275079846382141, -0.012671906501054764, -0.09444781392812729, 0.26114749908447266, 0.182745099067688, 0.12268348783254623, 0.03332594409584999, -0.10955783724784851, -0.22089587152004242, 0.0006975270807743073, -0.2639513611793518, 0.0005125477910041809, -0.045918356627225876, 0.13810187578201294, -0.3009098470211029, 0.07131382822990417, -0.6343059539794922, 0.10518451035022736, -0.12859535217285156, -0.03540191054344177, -0.03455980867147446, 0.050373367965221405, -0.08123699575662613, -0.16610021889209747, 0.4698207676410675, 0.39779502153396606, -0.13455399870872498, -0.2289409339427948, 0.05104236677289009, -0.4074133336544037, 0.0986461341381073, 0.47189369797706604, -0.0709756538271904, -0.19432583451271057, -0.19998714327812195, 0.15202057361602783, -0.0027768313884735107, -0.31749486923217773, -0.6252049207687378, 0.4136506915092468, -0.054185785353183746, 0.32945749163627625, -0.09750749170780182, 0.1796090453863144, -0.14945954084396362, 0.12647700309753418, -0.06219969317317009, 0.2430834323167801, 0.06176852434873581, -0.047011300921440125, -0.1572001874446869, -0.4699110686779022, 0.1463821679353714, 0.208766907453537, -0.11007589101791382, 0.05550960451364517, 0.07998000085353851, -0.036861710250377655, 0.34942084550857544, 0.15941943228244781, 0.0013812854886054993, 0.15586048364639282, 0.29573118686676025, 0.15482822060585022, 0.08039403706789017, 0.0045633465051651, -0.719307541847229, 0.1443624645471573, 0.15760928392410278, -0.028338059782981873, -0.2026827484369278, -0.07544037699699402, -0.28039538860321045, 0.07065233588218689, -0.33862099051475525, -0.016489118337631226, 0.01749492436647415, -0.03720365837216377, 0.1338711977005005, 0.10760891437530518, -0.28868603706359863, 0.5915172100067139, 0.07636106014251709, 0.24873054027557373, -0.7363873720169067, 0.3233528137207031, -0.12542986869812012, 0.07203540205955505, 0.3358306884765625, 0.2443688064813614, 0.14688372611999512, -0.2681550979614258, -0.0877724289894104, 0.3674442768096924, 0.0037030987441539764, 0.16281196475028992, -0.02457846701145172, 0.22790604829788208, 0.23427759110927582, -0.339971661567688, -0.06902336329221725, 0.2293630987405777, 0.048938579857349396, 0.0564642995595932, -0.15987133979797363, 0.32104986906051636, 0.0004015355370938778, 0.17622502148151398, -0.03989275544881821, -0.046712517738342285, 0.4249088764190674, -0.030492134392261505, -0.3012361228466034, -0.15077438950538635, 0.29908376932144165, -0.06348802149295807, 0.4037571847438812, 0.13242219388484955, -0.4345093369483948, -0.2680310606956482, 0.17172043025493622, -0.013786934316158295, -0.13268786668777466, 0.212445929646492, -0.25227075815200806, 0.09649944305419922, 0.1093510091304779, 0.022893905639648438, 0.14948713779449463, 0.11884309351444244, -0.21434485912322998, 0.22422415018081665, 0.10149255394935608, -0.18704605102539062, -0.06231077015399933, 0.037807561457157135, 0.14723056554794312, 0.028224939480423927, 0.0038126036524772644, 0.08014077693223953, -0.2904890477657318, -0.026990793645381927, -0.1443047970533371, 0.304863303899765, -0.3325057625770569, 0.02329941838979721, -0.24856220185756683, -0.34044381976127625, -0.17020630836486816, -0.035871472209692, -0.38324782252311707, -0.1299360990524292, -0.31002601981163025, 0.2699485421180725, 0.05326205492019653, 0.03153085708618164, -0.13614521920681, 0.15964923799037933, 0.04990626126527786, -0.16422204673290253, -0.2597730755805969, -0.014457469806075096, -0.32249951362609863, 0.03066021203994751, 0.45174074172973633, 0.10537516325712204, 0.33262374997138977, -0.2728821635246277, -0.012041963636875153, -0.22841182351112366, -0.3156462013721466, 0.1616477072238922, -0.10869335383176804, 0.33598434925079346, 0.03785330057144165, 0.11369973421096802, 0.0019060075283050537, -0.09790641069412231, 0.35575902462005615, -0.12058918178081512, -0.2926102578639984, -0.05828795209527016, -0.07153286039829254, -0.22865936160087585, -0.1409299522638321, -0.3686297535896301, -0.1472417116165161, -0.19850826263427734, 0.44963720440864563, 0.05118580907583237, -0.07792947441339493, 0.23582172393798828, 0.044223688542842865, 0.10916946828365326, -0.020174900069832802, -0.11052117496728897, -0.21282914280891418, -0.5246167182922363, 0.23329950869083405, -0.17592482268810272, -0.40888434648513794, 0.06409204006195068, 0.14724841713905334, 0.18747089803218842, 0.043454859405756, -0.5981349945068359, -0.18473701179027557, -0.12044757604598999, 0.08401434123516083, -0.07460775971412659, -0.009697582572698593, -0.10344693064689636, -0.08294669538736343, 0.19064778089523315, -0.15273919701576233, -0.3743157982826233, 0.17978470027446747, -0.27102038264274597, 0.2265336960554123, 0.20180284976959229, 0.5189445614814758, -0.13793639838695526, 0.3214723467826843, 0.5626819729804993, -0.24526721239089966, 0.2880084216594696, -0.04369952529668808, 0.4180394113063812, 0.04831235110759735, -0.25480708479881287, 0.02298378199338913, 0.08070202171802521, 0.12746453285217285, 0.2169894576072693, 0.20443326234817505, 0.18240506947040558, -0.2793238162994385, -0.1692337691783905, -0.3800141513347626, -0.19066491723060608, -0.13000302016735077, 0.22610673308372498, 0.1676926463842392, 0.09864534437656403, 0.0898553729057312, 0.12284907698631287, -0.17149706184864044, 0.21571992337703705, 0.5035191178321838, 0.1183001846075058, 0.21935966610908508, -0.5257463455200195, 0.01770680770277977, -0.5077208876609802, 0.2712343633174896, -0.037007447332143784, 0.25467026233673096, 0.01624617725610733, 0.2161630094051361, 0.10600767284631729, -0.07404495775699615, 0.6631454825401306, 0.049267709255218506, 0.033205870538949966, -0.0048127807676792145, -0.10114707797765732, -0.23984386026859283, 0.18723200261592865, -0.07081232964992523, 0.08888183534145355, 0.21213707327842712, 0.7063568830490112, -0.4514237642288208, -0.205423966050148, 0.12118011713027954, 0.1170271635055542, -0.13596543669700623, -0.28152796626091003, -0.30582940578460693, -0.38528895378112793, -0.297574907541275, -0.21367880702018738, -0.044338613748550415, 0.2446930706501007, 0.0742555633187294, 0.01120065152645111, -0.000026406720280647278, -0.07704184204339981, 0.18158499896526337, 0.3103819191455841, 0.3705393075942993, 0.07067522406578064, 0.34047287702560425, 0.5007094740867615, 0.26533204317092896, 0.49886247515678406, 0.8047419786453247, -0.017566755414009094, -0.45291656255722046, -0.12743821740150452, 0.0410950668156147, 0.12312151491641998, 0.05033431202173233, -0.19158899784088135, 0.09310274571180344, 0.19558849930763245, 0.02346508391201496, -0.24798209965229034, 0.11186490952968597, 0.23896852135658264, 0.15938003361225128, -0.4125639498233795, -0.5046042203903198, 0.4951016902923584, 0.14217479526996613, 0.13907869160175323, -0.13802842795848846, 0.35885629057884216, -0.16755875945091248, 0.08367954194545746, -0.15587234497070312, 0.7385651469230652, -0.1155073493719101, -0.12011274695396423, 0.48049360513687134, -0.1057872325181961, 0.4779641032218933, -0.18989232182502747, -0.07225483655929565, -0.3254937529563904, 0.06904979050159454, -0.07889396697282791, -0.06683141738176346, 0.10766765475273132, 0.03630317002534866, 0.01981174945831299, 0.25843629240989685, -0.023454822599887848, -0.0424172505736351, -0.044446494430303574, 0.37517687678337097, 0.05122346431016922, -0.03467342257499695, -0.5976720452308655, 0.13821664452552795, -0.0832802951335907, 0.37435582280158997, -0.07508177310228348, -0.1906377375125885, -0.2185959368944168, -0.1432088017463684, -0.2625606060028076, 0.15270791947841644, -0.2552364468574524, 0.022702425718307495, 0.3385937213897705, -0.18190442025661469, 0.3040744662284851, 0.2643658220767975, 0.3313003480434418, 0.08245178312063217, -0.3431508541107178, 0.12050871551036835, -0.29511040449142456, -0.11836545169353485, -0.033181995153427124, 0.12740734219551086, 0.07646050304174423, -0.10285557806491852, 0.003813132643699646, -0.11559457331895828, -0.013662058860063553, -0.2787899374961853, -0.014776602387428284, -0.039660464972257614, -0.08635636419057846, -0.1977434903383255, -0.2500403821468353, -0.10010409355163574, 0.1669895052909851, -0.1332099735736847, 0.04571014270186424, 0.29405078291893005, 0.12465085089206696, -0.15247654914855957, 0.29603099822998047, -0.1960182785987854, -0.13677799701690674, 0.334949791431427, -0.21826140582561493, -0.2151891589164734, 0.33152222633361816, 0.3177716135978699, -0.1263737678527832, -0.052233174443244934, 0.1045195460319519, 0.49760499596595764, -0.30954161286354065, -0.010570071637630463, 0.052190862596035004, 0.061163440346717834, -0.11487998068332672, 0.23551759123802185, 0.25996989011764526, -0.20308536291122437, 0.2971561551094055, -0.4844924509525299, -0.20171792805194855, 0.417865127325058, -0.0840476006269455, 0.006936594378203154, 0.21888378262519836, 0.09626324474811554, -0.19302085041999817, -0.21702560782432556, -0.2247096598148346, 0.12379767000675201, -0.2496105432510376, -0.07066783308982849, 0.3121757507324219, 0.08744111657142639, 0.31991738080978394, -0.09659530222415924, 0.06158430501818657, 0.04809524863958359, -0.26602014899253845, -0.07802993059158325, -0.31672459840774536, 0.106656014919281, 0.11895720660686493, -0.3156251907348633, -0.029633747413754463, -0.2004496306180954, -0.14277325570583344, -0.12373694777488708, 0.1252008080482483, 0.23697271943092346, 0.13535843789577484, -0.020597800612449646, -0.024470742791891098, 0.09801436960697174, -0.34452638030052185, 0.18352919816970825, 0.046415846794843674, 0.20472250878810883, 0.13039804995059967, -0.027025653049349785, -0.05414668098092079, 0.06255373358726501, -0.09367042779922485, 0.06099429726600647, 0.3488517999649048, 0.1019628494977951, 0.36800599098205566, -0.24989935755729675, 0.135209321975708, 0.41681477427482605, 0.39144548773765564, 0.35516372323036194, -0.2431180775165558, 0.11810844391584396, 0.25968635082244873, 0.1315154880285263, -0.26843562722206116, -0.04142438992857933, 0.3941543698310852, 0.0000745728611946106, -0.031743720173835754, 0.1768840253353119, 0.0887582004070282, 0.32140055298805237, -0.08776350319385529, 0.10360024869441986, 0.6137845516204834, 0.19308961927890778, 0.15527795255184174, 0.05887208133935928, -0.061545759439468384, 0.15549521148204803, 0.09089600294828415, 0.17786072194576263, 0.22377805411815643, 0.23561778664588928, -0.15413889288902283, 0.17565420269966125, -0.12040293216705322, 0.3127252161502838, 0.12142001837491989, -0.47684401273727417, -0.3155924677848816, 0.25574547052383423, -0.05966177210211754, 0.19492575526237488, -0.09525667130947113, 0.37133923172950745, 0.025914832949638367, -0.07254181057214737, -0.07804455608129501, 0.12425269186496735, -0.1427549421787262, -0.11395010352134705, -0.0007453262805938721, -0.2874169945716858, -0.23237355053424835, 0.048020631074905396, -0.194192036986351, -0.2181089222431183, 0.14890672266483307, 0.03446582704782486, -0.21625038981437683, -0.5780236721038818, -0.007441562134772539, 0.22299326956272125, -0.04324379563331604, -0.24772503972053528, 0.41296812891960144, 0.09426771104335785, -0.2560182213783264, 0.09598562121391296, 0.26610636711120605, 0.3129102289676666, 0.23274633288383484, 0.376072496175766, -0.1035202145576477, -0.045038703829050064, -0.05271563678979874, -0.12349959462881088, 0.20679005980491638, 0.04297396540641785, 0.07748628407716751, 0.2280910611152649, 0.10782625526189804, -0.06359187513589859, 0.0094867292791605, -0.00031491927802562714, 0.42210152745246887, -0.43171030282974243, 0.21660295128822327, -0.7187122702598572, -0.02084694802761078, -0.3436031937599182, -0.11631609499454498, -0.19316238164901733, 0.13252690434455872, 0.11412598192691803, 0.0709313154220581, 0.13272802531719208, -0.17743566632270813, 0.0521106943488121, 0.016774699091911316, 0.4220457971096039, 0.5924475193023682, 0.029078727588057518, -0.12553979456424713, -0.2913057804107666, -0.8193526268005371, 0.2971176505088806, -0.1558031439781189, 0.01796029508113861, 0.06036932021379471, 0.02670493721961975, -0.007836449891328812, 0.08274248987436295, -0.08318161964416504, -0.07084085792303085, 0.1285128891468048, -0.15619592368602753, -0.2198769599199295, -0.21486660838127136, -0.02280374988913536, -0.06620632857084274, 0.03666087985038757, -0.16657499969005585, 0.279208242893219, -0.07481153309345245, -0.1082414835691452, -0.2568657100200653, 0.2890550196170807, -0.3066962957382202, -0.19204148650169373, 0.13324615359306335, 0.29540014266967773, 0.3996942639350891, -0.08628296107053757, -0.23542366921901703, -0.3338446617126465, -0.22831711173057556, -0.2686620354652405, 0.3895230293273926, -0.10185723751783371, 0.5360655188560486, -0.2726183235645294, -0.1143788993358612, -0.4133925139904022, 0.14993233978748322, 0.017652302980422974, -0.15189620852470398, -0.34477320313453674, 0.2140440046787262, -0.30105462670326233, 0.06392881274223328, 0.11444735527038574, 0.3288857042789459, -0.04183449223637581, 0.04086829721927643, -0.12869785726070404, -0.13261716067790985, 0.44244441390037537, -0.4650469720363617, -0.08111011981964111, 0.0933157354593277, -0.07844720780849457, 0.1551327109336853, -0.3431030213832855, -0.529579222202301, 0.19848719239234924, 0.25112009048461914, -0.017208589240908623, -0.2855952978134155, 0.14555208384990692, 0.05116729810833931, -0.10156647861003876, 0.012636654078960419, 0.3728565275669098, 0.3334260880947113, -0.3731309771537781, 0.576646625995636, -0.10303734987974167 ]
https://github.com/huggingface/datasets/issues/6405
The viewer is working now. Based on the repo commit history, the bug was due to the incorrect format of the `features` field in the README YAML (`Value` requires `dtype`, e.g., `Value("string")`, but it was not specified)
ConfigNamesError on a simple CSV file
See https://huggingface.co/datasets/Nguyendo1999/mmath/discussions/1 ``` Error code: ConfigNamesError Exception: TypeError Message: __init__() missing 1 required positional argument: 'dtype' Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 65, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, token=hf_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 351, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1512, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1489, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1039, in get_module dataset_infos = DatasetInfosDict.from_dataset_card_data(dataset_card_data) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/info.py", line 468, in from_dataset_card_data dataset_info = DatasetInfo._from_yaml_dict(dataset_card_data["dataset_info"]) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/info.py", line 399, in _from_yaml_dict yaml_data["features"] = Features._from_yaml_list(yaml_data["features"]) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1838, in _from_yaml_list return cls.from_dict(from_yaml_inner(yaml_data)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1690, in from_dict obj = generate_from_dict(dic) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1345, in generate_from_dict return {key: generate_from_dict(value) for key, value in obj.items()} File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1345, in <dictcomp> return {key: generate_from_dict(value) for key, value in obj.items()} File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1353, in generate_from_dict return class_type(**{k: v for k, v in obj.items() if k in field_names}) TypeError: __init__() missing 1 required positional argument: 'dtype' ``` This is the CSV file: https://huggingface.co/datasets/Nguyendo1999/mmath/blob/dbcdd7c2c6fc447f852ec136a7532292802bb46f/math_train.csv
37
ConfigNamesError on a simple CSV file See https://huggingface.co/datasets/Nguyendo1999/mmath/discussions/1 ``` Error code: ConfigNamesError Exception: TypeError Message: __init__() missing 1 required positional argument: 'dtype' Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 65, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, token=hf_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 351, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1512, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1489, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1039, in get_module dataset_infos = DatasetInfosDict.from_dataset_card_data(dataset_card_data) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/info.py", line 468, in from_dataset_card_data dataset_info = DatasetInfo._from_yaml_dict(dataset_card_data["dataset_info"]) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/info.py", line 399, in _from_yaml_dict yaml_data["features"] = Features._from_yaml_list(yaml_data["features"]) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1838, in _from_yaml_list return cls.from_dict(from_yaml_inner(yaml_data)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1690, in from_dict obj = generate_from_dict(dic) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1345, in generate_from_dict return {key: generate_from_dict(value) for key, value in obj.items()} File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1345, in <dictcomp> return {key: generate_from_dict(value) for key, value in obj.items()} File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1353, in generate_from_dict return class_type(**{k: v for k, v in obj.items() if k in field_names}) TypeError: __init__() missing 1 required positional argument: 'dtype' ``` This is the CSV file: https://huggingface.co/datasets/Nguyendo1999/mmath/blob/dbcdd7c2c6fc447f852ec136a7532292802bb46f/math_train.csv The viewer is working now. Based on the repo commit history, the bug was due to the incorrect format of the `features` field in the README YAML (`Value` requires `dtype`, e.g., `Value("string")`, but it was not specified)
[ -0.37286028265953064, -0.2837359309196472, -0.09386485815048218, 0.07334684580564499, 0.42209455370903015, 0.25863489508628845, 0.5016807913780212, 0.33707672357559204, -0.02036479488015175, 0.2753065824508667, 0.42774254083633423, -0.016560789197683334, 0.06351710855960846, 0.3721480965614319, -0.06033013015985489, 0.222202330827713, -0.12616011500358582, 0.4048022925853729, -0.10833527147769928, 0.05434730648994446, -0.235251784324646, 0.17973120510578156, -0.20320655405521393, -0.1290830820798874, -0.2305927574634552, 0.05717242509126663, -0.13108240067958832, 0.3435358703136444, -0.060357704758644104, -0.4837624430656433, 0.5365899205207825, -0.031030399724841118, 0.08979541063308716, 0.53114914894104, -0.00011046669533243403, 0.1851854920387268, 0.24787631630897522, -0.22179441154003143, -0.3810415267944336, -0.32725614309310913, -0.23974348604679108, -0.4717481732368469, 0.0009676367044448853, -0.2007453739643097, -0.06124863401055336, 0.04186377674341202, 0.06281625479459763, -0.2751818895339966, 0.3454481065273285, 0.3863113224506378, 0.2192433774471283, 0.0797910988330841, -0.13995960354804993, -0.29941484332084656, -0.22239983081817627, 0.2735176682472229, -0.031447429209947586, 0.4428776204586029, -0.13677017390727997, -0.005503449589014053, 0.1852380931377411, 0.030453845858573914, -0.020268794149160385, 0.15623456239700317, 0.22653110325336456, 0.08714422583580017, 0.21427372097969055, -0.31539660692214966, 0.1382649838924408, 0.12162280082702637, 0.4320542812347412, -0.26530542969703674, -0.22398662567138672, -0.20389315485954285, 0.07695405930280685, -0.4151639938354492, 0.2265016734600067, 0.03546976298093796, -0.2971196174621582, 0.0970548689365387, 0.2318858504295349, -0.07309387624263763, -0.3013240694999695, -0.027456868439912796, -0.09241566061973572, 0.10526531934738159, -0.194468155503273, -0.037903882563114166, 0.032438136637210846, 0.09073206782341003, 0.2738608717918396, -0.04134424030780792, 0.04563777893781662, -0.00781814381480217, -0.22603337466716766, -0.16873782873153687, 0.09844605624675751, -0.3417481780052185, -0.12001693248748779, -0.33174586296081543, 0.07369539141654968, -0.16953741014003754, 0.17271341383457184, 0.25134217739105225, -0.003112316131591797, 0.17921780049800873, 0.14685285091400146, 0.06617990136146545, 0.2811325490474701, 0.13157078623771667, 0.2847464680671692, -0.09948958456516266, -0.09406687319278717, -0.6587396264076233, -0.07804811745882034, 0.48072007298469543, 0.32185396552085876, -0.010148398578166962, -0.38236433267593384, -0.03441215679049492, -0.04933546856045723, 0.09740231931209564, 0.010126452893018723, 0.39415812492370605, 0.009883467108011246, 0.11410564184188843, 0.253987580537796, 0.09432309865951538, -0.08786964416503906, -0.02343910187482834, -0.1667012870311737, 0.22949689626693726, -0.05963858217000961, -0.10394833236932755, 0.16163289546966553, -0.20621652901172638, 0.2514064311981201, 0.13638244569301605, 0.25179529190063477, 0.1698591709136963, 0.07333225011825562, -0.29236191511154175, -0.010159250348806381, 0.28691425919532776, -0.03983301669359207, 0.07614569365978241, 0.3928813338279724, -0.14877834916114807, -0.12194564938545227, 0.009530508890748024, -0.32215067744255066, -0.33591628074645996, -0.19661571085453033, 0.26242899894714355, -0.061955105513334274, -0.06360828876495361, -0.3150022625923157, -0.019774340093135834, 0.2500462234020233, -0.19307902455329895, -0.18070314824581146, -0.3354235589504242, -0.021277770400047302, -0.3217845857143402, 0.12791937589645386, 0.5255284905433655, -0.5379647016525269, 0.13567176461219788, -0.03975716978311539, 0.15175138413906097, 0.18415775895118713, -0.050062838941812515, -0.1674945056438446, 0.4111221730709076, -0.267553448677063, 0.16401010751724243, 0.25572434067726135, -0.38311004638671875, -0.006923530250787735, 0.24148660898208618, -0.18380878865718842, -0.27030500769615173, 0.28197169303894043, -0.14639079570770264, 0.2587054967880249, 0.004238694906234741, -0.0669814869761467, 0.1667441427707672, 0.0390922948718071, -0.010415233671665192, -0.10414785891771317, -0.226458340883255, 0.06757930666208267, 0.09144829213619232, -0.06268361210823059, -0.007401611655950546, 0.046343110501766205, -0.3689878582954407, 0.2202509492635727, -0.19629910588264465, 0.03685463219881058, 0.3329803943634033, 0.26584580540657043, 0.13981245458126068, -0.09963829815387726, 0.11592365801334381, -0.28340277075767517, 0.13467618823051453, 0.18373003602027893, 0.28059273958206177, -0.2548217177391052, -0.09246236830949783, -0.18236885964870453, -0.026597660034894943, -0.22243261337280273, -0.19605842232704163, 0.20721372961997986, 0.28334397077560425, -0.29326915740966797, -0.18437112867832184, -0.12428721785545349, 0.22376611828804016, 0.03646491467952728, 0.0745924562215805, -0.21789951622486115, 0.19498896598815918, -0.3210984766483307, -0.06860529631376266, 0.2329845279455185, 0.03504716977477074, 0.21349897980690002, -0.2620867192745209, -0.1146136000752449, 0.26899415254592896, 0.207172691822052, 0.18484291434288025, 0.0433688685297966, -0.30230510234832764, 0.19324076175689697, 0.17868374288082123, -0.20660941302776337, 0.11812488734722137, 0.2298799753189087, 0.04778550565242767, -0.10192197561264038, 0.357191264629364, 0.03109889104962349, 0.1239459365606308, 0.04530985653400421, 0.11424260586500168, 0.3530840277671814, 0.08855048567056656, 0.17752370238304138, -0.20509061217308044, 0.1631391942501068, 0.35402458906173706, -0.057617854326963425, -0.0678677037358284, -0.142876535654068, 0.025546450167894363, 0.221364825963974, 0.11832185089588165, -0.009475482627749443, 0.027805868536233902, -0.03435627371072769, 0.00539785623550415, 0.1992071270942688, 0.13348588347434998, 0.6391035914421082, 0.15509822964668274, -0.23745928704738617, 0.13455183804035187, 0.005187634378671646, -0.32183921337127686, 0.3759848177433014, -0.0901634693145752, 0.20250162482261658, 0.3028180003166199, -0.09930500388145447, 0.13656514883041382, -0.3051334023475647, -0.6205883622169495, 0.06396930664777756, 0.256856232881546, -0.5462534427642822, 0.032723568379879, -0.2703125476837158, 0.021107904613018036, -0.022330250591039658, -0.0993889793753624, 0.07055539637804031, -0.3392489552497864, -0.11231118440628052, 0.0177009217441082, -0.03284763544797897, 0.14079314470291138, 0.04485435038805008, 0.24102526903152466, 0.2025047242641449, -0.2367665022611618, -0.22814175486564636, -0.174474835395813, -0.13863679766654968, 0.09013760834932327, -0.08394462615251541, 0.10680131614208221, 0.23286688327789307, -0.27440446615219116, -0.08775559067726135, 0.019771693274378777, -0.33163556456565857, -0.005474102683365345, -0.14114238321781158, 0.4031725227832794, 0.4304257333278656, 0.629952073097229, 0.11055191606283188, -0.23980386555194855, 0.209257110953331, 0.3164924085140228, -0.12995192408561707, 0.06785134971141815, -0.10616643726825714, -0.3718922734260559, -0.2912101745605469, -0.36217284202575684, -0.3139335513114929, -0.3805757462978363, 0.05187311768531799, 0.23950880765914917, 0.0210841353982687, 0.45750972628593445, 0.30595138669013977, 0.0632057636976242, 0.03813353553414345, 0.2130933701992035, -0.16363541781902313, -0.3072740435600281, 0.39163222908973694, -0.25675392150878906, -0.2976923882961273, 0.010681629180908203, -0.018373362720012665, 0.34479936957359314, 0.004189245402812958, -0.38071373105049133, -0.3553985357284546, -0.053297609090805054, 0.3346520960330963, -0.2354367971420288, 0.090359628200531, 0.41610705852508545, 0.2821374237537384, -0.10104501992464066, -0.15975748002529144, -0.2671663761138916, 0.10703197866678238, 0.13947366178035736, 0.17174078524112701, -0.05232391878962517, 0.4245516359806061, -0.05431438982486725, 0.38077178597450256, 0.2028980553150177, -0.3190893530845642, 0.14553207159042358, -0.21887332201004028, 0.4886987805366516, 0.001584663987159729, -0.46790698170661926, 0.22759798169136047, 0.014555253088474274, -0.029059715569019318, 0.08306697756052017, -0.35515865683555603, 0.24742522835731506, -0.2583513557910919, 0.061213426291942596, -0.2956218123435974, -0.16539664566516876, -0.03663197159767151, -0.0712069422006607, 0.2304772585630417, 0.009128645062446594, 0.04141800105571747, -0.33719730377197266, 0.20529744029045105, -0.0659593939781189, 0.5443927645683289, -0.0737706869840622, -0.08563344180583954, -0.05986107513308525, -0.3336079716682434, -0.33185869455337524, 0.19554054737091064, -0.04471471905708313, 0.2891853153705597, 0.0398794487118721, 0.102264404296875, -0.1761837899684906, 0.06400948762893677, 0.5923748016357422, -0.22567440569400787, -0.056408416479825974, 0.04021689295768738, 0.05274622142314911, -0.18567955493927002, -0.09793724864721298, -0.10348290205001831, 0.23959198594093323, 0.14607957005500793, 0.5356590151786804, -0.27497708797454834, -0.09603938460350037, 0.18104642629623413, 0.13247382640838623, -0.0524965301156044, -0.08103875815868378, -0.21606075763702393, -0.48123425245285034, -0.21158677339553833, -0.09619942307472229, -0.00991244986653328, 0.22327184677124023, 0.07392635941505432, 0.02698294073343277, -0.03255617991089821, -0.26912903785705566, 0.21968109905719757, 0.2802008390426636, -0.019442208111286163, -0.07719293981790543, 0.0013082623481750488, 0.10872797667980194, 0.12715588510036469, 0.525053858757019, 0.34580957889556885, 0.029367540031671524, -0.6089037656784058, 0.021184410899877548, -0.2233492136001587, 0.41589048504829407, 0.3246977925300598, -0.3761442005634308, 0.017489876598119736, -0.19706536829471588, 0.23723764717578888, -0.0652557834982872, 0.16522309184074402, 0.39799991250038147, 0.2337777316570282, -0.1623130887746811, -0.44524312019348145, 0.12363956868648529, -0.11823615431785583, 0.05507156252861023, 0.11464117467403412, -0.18832246959209442, -0.45094043016433716, 0.2515730559825897, 0.08861207962036133, 0.7092777490615845, 0.4514266848564148, 0.17557454109191895, 0.589468240737915, 0.13399383425712585, 0.37149983644485474, 0.04946011304855347, 0.23430123925209045, -0.31577998399734497, -0.36848264932632446, -0.18576376140117645, -0.21443228423595428, 0.4269132912158966, 0.1347908079624176, -0.40693482756614685, 0.3375695049762726, -0.09297765791416168, 0.2657714784145355, 0.02112460881471634, -0.022655092179775238, -0.0831642895936966, -0.26727011799812317, -0.27357223629951477, 0.14719925820827484, 0.06766195595264435, 0.16255150735378265, -0.18918496370315552, -0.21933478116989136, -0.18317225575447083, -0.29165899753570557, -0.1350182443857193, -0.050071705132722855, -0.7079551815986633, 0.34511086344718933, -0.11473199725151062, -0.10118754953145981, 0.2375630885362625, 0.10345348715782166, 0.3195647597312927, 0.27252018451690674, -0.10655602067708969, 0.0647396445274353, 0.06879910826683044, -0.1192811131477356, 0.009156711399555206, -0.055015239864587784, 0.18411271274089813, -0.1234116405248642, -0.18734240531921387, 0.14622762799263, -0.146406888961792, -0.09431342780590057, 0.2029101401567459, -0.00829290971159935, -0.30826231837272644, -0.26519328355789185, -0.2617326080799103, -0.011648491024971008, -0.05570057034492493, -0.18585188686847687, 0.14975705742835999, -0.03947831690311432, -0.07009419053792953, 0.1542072892189026, -0.10469668358564377, -0.27871131896972656, -0.13818717002868652, 0.14211025834083557, 0.05331612378358841, 0.128195121884346, 0.4802128076553345, -0.0778079405426979, -0.3103107810020447, -0.28742343187332153, 0.2521601915359497, -0.22730547189712524, -0.21593621373176575, 0.13901036977767944, 0.1748218536376953, -0.14199216663837433, -0.030976399779319763, 0.19810420274734497, 0.33796215057373047, 0.029526926577091217, -0.002126455307006836, -0.6001580953598022, -0.12234655022621155, 0.06158250570297241, -0.27767980098724365, 0.067548006772995, -0.028844259679317474, 0.6347405910491943, 0.07862427085638046, -0.2624194622039795, -0.3594333827495575, 0.1488969624042511, -0.011299774050712585, 0.08861570060253143, 0.11249051988124847, -0.09074362367391586, 0.33375653624534607, -0.057525523006916046, 0.2260642945766449, -0.021811075508594513, -0.15643943846225739, -0.2158544361591339, -0.04168300703167915, 0.11623454093933105, -0.08896014094352722, -0.03256870433688164, 0.17283380031585693, -0.10643915086984634, -0.4047919809818268, -0.073720283806324, -0.048955220729112625, 0.0547897145152092, -0.11965569108724594, 0.10351943969726562, -0.11209075897932053, 0.0984300896525383, -0.12047319114208221, 0.14593985676765442, -0.05841279774904251, 0.23808644711971283, -0.1161087155342102, 0.3402162194252014, -0.38281530141830444, -0.023726120591163635, -0.059430647641420364, 0.2363349348306656, -0.07914423197507858, -0.08792312443256378, 0.348854660987854, -0.365933895111084, 0.11718423664569855, 0.14669229090213776, 0.19165584444999695, 0.5087405443191528, -0.22486713528633118, 0.28462350368499756, 0.04955613613128662, 0.21885152161121368, -0.40831509232521057, 0.27003347873687744, -0.04161117970943451, -0.0626998171210289, 0.230326309800148, 0.1620139479637146, 0.048017919063568115, -0.179432213306427, -0.0352119505405426, 0.05814822390675545, 0.34225139021873474, -0.263083815574646, 0.1535305231809616, 0.33123987913131714, -0.21463727951049805, 0.25552329421043396, 0.3258211314678192, 0.4620879888534546, 0.20862556993961334, 0.4705713391304016, -0.0014934837818145752, 0.0582766979932785, 0.1453401893377304, -0.21689525246620178, -0.2960026264190674, -0.4535776376724243, 0.22759930789470673, 0.3338506519794464, -0.22110475599765778, -0.15255525708198547, 0.09532859176397324, 0.4051643908023834, -0.6395155191421509, 0.1464701145887375, -0.2178407609462738, -0.14825941622257233, -0.21269923448562622, 0.10110370814800262, 0.04702184349298477, 0.02317705750465393, -0.2307441234588623, -0.32286810874938965, 0.1517558991909027, -0.0334818959236145, 0.08004055917263031, 0.01747661456465721, -0.13549815118312836, -0.15108348429203033, 0.11642469465732574, 0.18648679554462433, 0.042797572910785675, -0.24012018740177155, 0.05396285653114319, 0.2095320075750351, 0.051368795335292816, -0.20758113265037537, 0.421622097492218, 0.8225266933441162, 0.33729416131973267, -0.07466049492359161, -0.262220174074173, -0.14743556082248688, -0.1295979768037796, 0.07998008280992508, -0.05253585800528526, -0.010716762393712997, 0.22574067115783691, 0.4154092073440552, 0.2924787700176239, -0.12396575510501862, 0.16017962992191315, 0.3417282998561859, -0.06393958628177643, -0.19186857342720032, 0.0838625356554985, -0.06790858507156372, -0.13999080657958984, 0.025126349180936813, -0.012278631329536438, -0.4767240285873413, -0.05688810721039772, 0.5320327877998352, 0.05882434919476509, 0.15889108180999756, -0.0028882361948490143, 0.11835160106420517, -0.0016965549439191818, 0.3079642057418823, 0.2794610559940338, -0.1422690451145172, -0.28246355056762695, 0.09083865582942963, -0.490580677986145, -0.0003707483410835266, 0.09957316517829895, -0.06418073922395706, -0.18383677303791046, 0.1649174988269806, 0.19692622125148773, 0.0688476413488388, 0.02293035387992859, -0.05049091577529907, 0.16756612062454224, -0.1101994514465332, -0.20796313881874084, -0.24247311055660248, -0.0299968421459198, -0.04625578224658966, 0.03158893436193466, -0.4662363529205322, 0.05544215440750122, -0.10790032148361206, 0.17818184196949005, -0.2251504510641098, 0.14078748226165771, 0.2121548056602478, -0.2687397301197052, 0.2711102366447449, -0.08102873712778091, 0.5036399960517883, -0.30734407901763916, -0.10771375894546509, 0.041378896683454514, -0.23136146366596222, -0.13785800337791443, 0.49653083086013794, 0.32634565234184265, 0.09502118080854416, -0.19848297536373138, -0.1029748022556305, -0.23212037980556488, 0.13833987712860107, 0.07906985282897949, -0.25243890285491943, -0.37035781145095825, 0.3035666346549988, -0.13157308101654053, 0.09486611187458038, -0.04078345000743866, 0.019509050995111465, -0.21910695731639862, 0.13905462622642517, -0.28071966767311096, -0.5006478428840637, 0.46219319105148315, 0.1020544171333313, -0.22853511571884155, -0.23347094655036926, 0.2168899029493332, -0.05271159112453461, 0.5275145769119263, -0.23876875638961792, 0.1711997091770172, 0.3456953167915344, -0.04120541363954544, -0.4768347442150116, 0.41124528646469116, -0.09011918306350708, 0.002433076500892639, -0.0755576640367508, 0.5727773904800415, -0.05552118644118309, -0.22111007571220398, -0.09852545708417892, -0.1636691391468048 ]
https://github.com/huggingface/datasets/issues/6403
You are most likely using an outdated version of `datasets` in the notebook, which can be verified with the `!datasets-cli env` command. You can run `!pip install -U datasets` to update the installation.
Cannot import datasets on google colab (python 3.10.12)
### Describe the bug I'm trying A full colab demo notebook of zero-shot-distillation from https://github.com/huggingface/transformers/tree/main/examples/research_projects/zero-shot-distillation but i got this type of error when importing datasets on my google colab (python version is 3.10.12) ![image](https://github.com/huggingface/datasets/assets/15389235/6f7758a2-681d-4436-87d0-5e557838e368) I found the same problem that have been solved in [#3326 ] but it seem still error on the google colab. I can't try on my local using jupyter notebook because of my laptop resource doesn't fulfill the requirements. Please can anyone help me solve this problem. Thank you 😅 ### Steps to reproduce the bug Error: ``` --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-8-b6e092f83978>](https://localhost:8080/#) in <cell line: 1>() ----> 1 from datasets import load_dataset 2 3 # Print all the available datasets 4 from huggingface_hub import list_datasets 5 print([dataset.id for dataset in list_datasets()]) 6 frames [/usr/lib/python3.10/functools.py](https://localhost:8080/#) in update_wrapper(wrapper, wrapped, assigned, updated) 59 # Issue #17482: set __wrapped__ last so we don't inadvertently copy it 60 # from the wrapped function when updating __dict__ ---> 61 wrapper.__wrapped__ = wrapped 62 # Return the wrapper so this can be used as a decorator via partial() 63 return wrapper AttributeError: readonly attribute ``` ### Expected behavior Run success on Google Colab (free) ### Environment info Windows 11 x64, Google Colab free
33
Cannot import datasets on google colab (python 3.10.12) ### Describe the bug I'm trying A full colab demo notebook of zero-shot-distillation from https://github.com/huggingface/transformers/tree/main/examples/research_projects/zero-shot-distillation but i got this type of error when importing datasets on my google colab (python version is 3.10.12) ![image](https://github.com/huggingface/datasets/assets/15389235/6f7758a2-681d-4436-87d0-5e557838e368) I found the same problem that have been solved in [#3326 ] but it seem still error on the google colab. I can't try on my local using jupyter notebook because of my laptop resource doesn't fulfill the requirements. Please can anyone help me solve this problem. Thank you 😅 ### Steps to reproduce the bug Error: ``` --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-8-b6e092f83978>](https://localhost:8080/#) in <cell line: 1>() ----> 1 from datasets import load_dataset 2 3 # Print all the available datasets 4 from huggingface_hub import list_datasets 5 print([dataset.id for dataset in list_datasets()]) 6 frames [/usr/lib/python3.10/functools.py](https://localhost:8080/#) in update_wrapper(wrapper, wrapped, assigned, updated) 59 # Issue #17482: set __wrapped__ last so we don't inadvertently copy it 60 # from the wrapped function when updating __dict__ ---> 61 wrapper.__wrapped__ = wrapped 62 # Return the wrapper so this can be used as a decorator via partial() 63 return wrapper AttributeError: readonly attribute ``` ### Expected behavior Run success on Google Colab (free) ### Environment info Windows 11 x64, Google Colab free You are most likely using an outdated version of `datasets` in the notebook, which can be verified with the `!datasets-cli env` command. You can run `!pip install -U datasets` to update the installation.
[ -0.22408875823020935, -0.2938651144504547, 0.08976825326681137, 0.43063440918922424, 0.21170759201049805, -0.08203870803117752, 0.3200898766517639, 0.04798250272870064, 0.08357463032007217, 0.14291954040527344, -0.5043290257453918, 0.30278438329696655, -0.17893865704536438, 0.2081073820590973, -0.12015672028064728, -0.3213287591934204, 0.08890585601329803, 0.14928191900253296, -0.0821414589881897, 0.17176654934883118, -0.33804380893707275, 0.40339863300323486, -0.5665119290351868, -0.24591228365898132, -0.270954966545105, -0.1801455020904541, -0.07484488934278488, 0.0029634200036525726, -0.20213857293128967, -0.3881393074989319, 0.39867478609085083, -0.12860248982906342, 0.012791410088539124, 0.5347661375999451, -0.0001263348531210795, 0.09302039444446564, 0.5041476488113403, -0.045544661581516266, -0.4212437570095062, -0.4583507776260376, -0.3600181043148041, -0.0908406674861908, 0.1768796443939209, 0.11536693572998047, 0.01589076966047287, 0.25055593252182007, -0.03191126510500908, -0.11223416775465012, 0.43792814016342163, 0.42231521010398865, 0.12322507798671722, 0.28344157338142395, 0.3651030659675598, -0.27874162793159485, 0.28503501415252686, -0.015222642570734024, -0.1505953073501587, 0.6048438549041748, 0.18018513917922974, 0.1719750165939331, 0.4286626875400543, 0.2533993124961853, -0.22349199652671814, 0.08147425949573517, 0.11549276858568192, -0.07011495530605316, -0.4394221305847168, -0.4718758761882782, 0.20078067481517792, 0.14412355422973633, 0.26496201753616333, -0.3139781951904297, -0.4992319345474243, -0.1809442937374115, 0.2451644241809845, -0.28598225116729736, 0.2151430994272232, 0.21236513555049896, 0.04669676721096039, 0.08425886929035187, -0.27616584300994873, -0.011071056127548218, -0.2731890082359314, 0.04716252535581589, -0.31578731536865234, 0.3641774356365204, -0.2670811414718628, 0.07903680205345154, 0.025731366127729416, -0.1287533938884735, 0.41179630160331726, -0.06862545013427734, -0.01553733553737402, 0.08971573412418365, -0.06890770047903061, 0.02621418982744217, -0.10330712795257568, 0.45208004117012024, -0.0006019473075866699, 0.13550534844398499, -0.17308470606803894, -0.12652185559272766, 0.10543517768383026, 0.324354887008667, 0.04769701510667801, 0.2160005420446396, 0.10011401772499084, 0.2681800127029419, 0.45957300066947937, 0.47055476903915405, -0.05163491517305374, -0.01117420382797718, -0.010696187615394592, -0.11710193753242493, -0.16259750723838806, -0.009662562981247902, 0.45142102241516113, -0.0961012989282608, -0.4296109080314636, 0.04967494308948517, -0.3298727869987488, 0.28603872656822205, 0.1829073429107666, 0.25062358379364014, -0.09417691826820374, -0.00037025194615125656, 0.1765856295824051, 0.08429046720266342, -0.129195898771286, -0.12502077221870422, -0.05248670279979706, 0.3771764636039734, -0.04830180108547211, 0.07127608358860016, 0.10153461247682571, -0.3857036828994751, 0.3258786201477051, 0.16166888177394867, 0.06800965964794159, 0.000570736825466156, -0.09250035136938095, -0.4168265461921692, -0.1461234986782074, 0.5084551572799683, 0.18744520843029022, 0.0001828521490097046, 0.07468153536319733, -0.46896785497665405, -0.10239431262016296, 0.12697261571884155, -0.3518471121788025, -0.3326677680015564, -0.14886943995952606, 0.040692754089832306, -0.4155961871147156, 0.1615367829799652, -0.45823341608047485, 0.06177017092704773, 0.10937687754631042, 0.0014115199446678162, -0.09434983134269714, -0.2625834345817566, -0.5889480113983154, -0.1313985288143158, 0.2281922996044159, 0.6596843004226685, -0.36773091554641724, -0.22093069553375244, -0.2537939250469208, 0.08424355089664459, 0.08707927167415619, 0.14932899177074432, -0.09622293710708618, -0.033698078244924545, -0.16756592690944672, -0.05120982229709625, -0.14903554320335388, -0.1800992786884308, -0.5586349368095398, -0.025235051289200783, -0.04207957535982132, 0.24892929196357727, 0.0019056573510169983, -0.2266097366809845, 0.13725322484970093, -0.05671723186969757, 0.38343000411987305, 0.240966796875, -0.19044090807437897, 0.018303826451301575, -0.3032734990119934, -0.004861488938331604, -0.06333689391613007, 0.10107994824647903, 0.10547830164432526, 0.18893620371818542, -0.008408896625041962, -0.014030363410711288, -0.22399812936782837, -0.09166300296783447, 0.07262233644723892, 0.4117027223110199, 0.5215376019477844, -0.042946334928274155, 0.0007394179701805115, -0.16482672095298767, -0.5322034358978271, 0.2090868353843689, -0.0702238380908966, 0.244474858045578, -0.46096453070640564, -0.15148615837097168, -0.4618833661079407, 0.27626872062683105, -0.05233442038297653, -0.1714191436767578, -0.02099096029996872, 0.02271992526948452, -0.04240715131163597, 0.3444930911064148, 0.05130442976951599, 0.6571918725967407, 0.28692084550857544, 0.16412004828453064, -0.35778382420539856, 0.2911623418331146, -0.27117741107940674, -0.2584749758243561, 0.06700587272644043, -0.0007954835891723633, 0.207123801112175, -0.1287946254014969, -0.13980691134929657, 0.030126627534627914, 0.1227949783205986, 0.061005380004644394, -0.1066664308309555, -0.15940895676612854, 0.2684806287288666, -0.10815495252609253, -0.034622155129909515, -0.06373870372772217, 0.271671324968338, 0.05765855312347412, 0.2109442949295044, 0.6630958914756775, -0.04459930211305618, 0.03262351453304291, -0.05696318671107292, 0.11182104051113129, 0.009717926383018494, 0.1171637624502182, -0.030062075704336166, -0.22104859352111816, 0.17296765744686127, 0.35955411195755005, 0.2685762047767639, -0.04199305176734924, -0.30356457829475403, 0.16590988636016846, 0.19135239720344543, 0.1382390260696411, -0.013407215476036072, 0.1060343012213707, -0.28595396876335144, -0.020947638899087906, 0.4183337986469269, 0.2054743766784668, 0.5454277992248535, 0.07427199184894562, -0.08339108526706696, 0.35844579339027405, 0.24580752849578857, -0.12132541835308075, 0.21193362772464752, 0.271268367767334, 0.3364526629447937, 0.0332467183470726, 0.1952126920223236, 0.1687706559896469, -0.1204037293791771, -0.2538761496543884, 0.18607263267040253, 0.4728596806526184, -0.4135996699333191, 0.2003692388534546, -0.3362031877040863, -0.3362843990325928, -0.11658961325883865, -0.07035982608795166, -0.11225362122058868, -0.31097620725631714, -0.19603285193443298, 0.5883021354675293, 0.07065670192241669, 0.07008875161409378, 0.33025550842285156, 0.36904263496398926, 0.044807903468608856, -0.12379352003335953, -0.2684996724128723, 0.07896628975868225, -0.0057064322754740715, -0.07373705506324768, 0.38832899928092957, -0.02452925220131874, 0.29349103569984436, -0.07667724043130875, -0.08235403150320053, 0.08897369354963303, -0.42661651968955994, 0.16041581332683563, -0.17014726996421814, 0.5040335059165955, 0.22762960195541382, 0.16977524757385254, -0.5096026659011841, -0.11013966798782349, 0.09190216660499573, 0.00006122887134552002, -0.3086942136287689, -0.005109436810016632, -0.14363977313041687, -0.03341587632894516, -0.16584128141403198, 0.046233437955379486, -0.251876562833786, -0.2391510009765625, 0.2971799969673157, -0.11579471826553345, 0.22178173065185547, 0.3553110957145691, 0.062334854155778885, 0.19955578446388245, 0.1911916583776474, -0.042394619435071945, -0.013622963801026344, -0.22058555483818054, 0.3824102282524109, -0.4404391646385193, -0.2825475037097931, 0.17388801276683807, -0.1920083910226822, 0.061137642711400986, -0.009082581847906113, -0.37838441133499146, -0.6019657254219055, -0.19663505256175995, 0.016453534364700317, -0.05552786588668823, 0.05765889585018158, 0.15031194686889648, -0.1166871041059494, 0.1506420373916626, -0.11711278557777405, -0.3045070767402649, -0.2560213506221771, -0.12235557287931442, -0.0913328230381012, 0.22759273648262024, 0.36313295364379883, -0.05430092662572861, 0.4749535620212555, 0.3621197044849396, 0.2220669388771057, 0.237322598695755, -0.017398318275809288, 0.2886766493320465, -0.22607330977916718, -0.45662736892700195, -0.047246795147657394, 0.050699632614851, -0.08774170279502869, 0.08783118426799774, -0.1565326452255249, 0.21728137135505676, -0.23996026813983917, -0.23427875339984894, -0.06895860284566879, -0.2382086217403412, -0.017737139016389847, 0.07851140946149826, 0.043039266020059586, -0.07365190982818604, -0.16014990210533142, -0.14315325021743774, -0.042176634073257446, -0.18453349173069, 0.2518294155597687, 0.026938214898109436, 0.1558171808719635, 0.41454023122787476, -0.12451358884572983, -0.5555307269096375, 0.49546465277671814, 0.2374035120010376, 0.19629302620887756, 0.03257864713668823, 0.18463222682476044, 0.024662615731358528, 0.06926025450229645, 0.2769860029220581, -0.16534295678138733, -0.20816347002983093, 0.07902632653713226, -0.4532618522644043, -0.42028477787971497, -0.1524830162525177, -0.24739310145378113, 0.09008030593395233, 0.32209548354148865, 0.14361318945884705, -0.20144329965114594, 0.1755518913269043, 0.36225995421409607, 0.023480035364627838, 0.05873452126979828, 0.12325581163167953, -0.1880364716053009, -0.509408712387085, -0.28572386503219604, -0.09677514433860779, 0.2592504918575287, 0.40029439330101013, 0.12962281703948975, 0.270719975233078, -0.1693105399608612, -0.06169069930911064, 0.04647200554609299, 0.1457870602607727, 0.1563940942287445, 0.1687687188386917, 0.32843655347824097, -0.027048733085393906, -0.22074103355407715, 0.4195321798324585, 0.8166214227676392, -0.05832197889685631, -0.4979093074798584, -0.07375206053256989, 0.125364288687706, -0.03598108887672424, 0.14759576320648193, -0.1959032118320465, 0.1474851667881012, -0.28641971945762634, 0.10959698259830475, 0.27058181166648865, 0.038154684007167816, -0.08815763145685196, 0.18061353266239166, -0.3866671323776245, -0.03917992115020752, 0.4038248658180237, 0.2075103372335434, 0.0592879056930542, 0.12041763216257095, 0.28389716148376465, -0.21055524051189423, 0.12213805317878723, 0.04102128744125366, 0.7523167729377747, 0.04173926264047623, -0.06571793556213379, 0.2753603756427765, -0.1078677698969841, 0.5590270757675171, 0.461740642786026, 0.12176379561424255, -0.330864816904068, -0.3517707288265228, -0.020354200154542923, -0.13963551819324493, 0.23292329907417297, -0.3771534860134125, -0.37335097789764404, 0.0035419948399066925, -0.10628695785999298, -0.06812597811222076, 0.1576542854309082, 0.01307273656129837, -0.0942283347249031, -0.08032719790935516, -0.19933463633060455, 0.02239680290222168, -0.12106483429670334, 0.4506022334098816, -0.1365518867969513, 0.01753932237625122, -0.2355274260044098, -0.11245345324277878, -0.5351715087890625, 0.060147881507873535, -0.4892379939556122, 0.028847750276327133, 0.3450508117675781, -0.4900326430797577, 0.42442381381988525, 0.16099867224693298, 0.41180795431137085, 0.07891148328781128, -0.26902034878730774, 0.041024722158908844, -0.1896251142024994, -0.27995526790618896, -0.01298767700791359, -0.07261119782924652, 0.4724270701408386, -0.0732189267873764, 0.03997662663459778, -0.2501727342605591, -0.0028467997908592224, -0.11269934475421906, 0.11758258938789368, 0.21061882376670837, -0.1719796359539032, -0.011429950594902039, -0.1656343787908554, -0.17185992002487183, 0.34537047147750854, -0.29822835326194763, -0.00790996290743351, -0.048335637897253036, -0.09629742801189423, 0.10580721497535706, -0.15345990657806396, -0.1161603033542633, -0.03566613793373108, 0.5569817423820496, 0.06487780809402466, 0.10098560899496078, 0.45548662543296814, 0.2462487518787384, -0.1711742877960205, -0.017356738448143005, 0.11781951040029526, -0.04750687628984451, -0.24464794993400574, 0.5226974487304688, -0.16531339287757874, 0.06894946098327637, -0.010999023914337158, 0.4429083466529846, 0.2120666354894638, 0.18614134192466736, 0.21504636108875275, -0.5193058252334595, -0.37610870599746704, 0.05212961137294769, 0.031696368008852005, -0.09302876889705658, 0.09982231259346008, 0.31732046604156494, 0.1534094214439392, -0.07626167684793472, -0.1690945029258728, 0.17490054666996002, -0.2556142508983612, -0.10481767356395721, 0.2585391700267792, -0.08219237625598907, 0.08991236984729767, -0.027973990887403488, -0.02732577733695507, 0.3879398703575134, 0.06210336461663246, -0.09676875174045563, -0.35352006554603577, 0.14951400458812714, 0.1356944739818573, -0.2096235305070877, 0.013219904154539108, 0.05122928321361542, -0.1662774682044983, -0.12992319464683533, 0.2512512803077698, 0.42504316568374634, 0.0007597692310810089, -0.053566716611385345, 0.08089333772659302, 0.1722632795572281, -0.14647097885608673, 0.20875129103660583, 0.058074772357940674, 0.24676337838172913, 0.079323410987854, 0.29785284399986267, 0.14731448888778687, 0.11894174665212631, -0.0875026136636734, -0.052269551903009415, -0.32684677839279175, 0.019884556531906128, 0.19723765552043915, -0.40017908811569214, 0.05438420921564102, -0.058658137917518616, 0.15956927835941315, 0.103297658264637, -0.36322319507598877, 0.06705784052610397, 0.2499956339597702, -0.044391557574272156, -0.2887490391731262, -0.05178325995802879, 0.12455455958843231, 0.11662939190864563, -0.017895713448524475, 0.3292231559753418, 0.010773859918117523, 0.2730664312839508, 0.07709702849388123, 0.09137041866779327, 0.3449519872665405, 0.33701398968696594, 0.33380430936813354, -0.049118123948574066, -0.030499763786792755, 0.1799364984035492, 0.24305550754070282, 0.1419939249753952, 0.13666744530200958, -0.019259782508015633, -0.21948571503162384, 0.08317497372627258, -0.35119688510894775, -0.006990276277065277, 0.43190574645996094, -0.5737301111221313, 0.1586015522480011, 0.2160060554742813, -0.042643044143915176, -0.008226793259382248, 0.09339892864227295, 0.3367854952812195, -0.38198956847190857, -0.2488958090543747, -0.03622755408287048, 0.5109575390815735, -0.19174839556217194, 0.041517890989780426, 0.11039553582668304, -0.05159404128789902, -0.2554921507835388, 0.1953832358121872, 0.0285766813904047, -0.2843274176120758, 0.24782279133796692, 0.12442728877067566, -0.34711357951164246, -0.06470409035682678, -0.06553275883197784, 0.30292370915412903, 0.20536844432353973, -0.16943830251693726, 0.2749864459037781, -0.0192127488553524, -0.10627917945384979, -0.18739038705825806, 0.490299254655838, 0.5535150170326233, 0.20494765043258667, 0.13270123302936554, -0.034680116921663284, 0.1332273632287979, -0.050517912954092026, 0.08940929174423218, -0.012194291688501835, 0.10020631551742554, 0.29827284812927246, 0.26109710335731506, -0.001987956464290619, -0.059499409049749374, 0.24365362524986267, 0.12570823729038239, 0.032813459634780884, -0.17094188928604126, 0.1123497486114502, -0.18229199945926666, -0.03238963335752487, -0.1651521474123001, -0.018777206540107727, -0.16205143928527832, 0.12175022065639496, -0.012409500777721405, -0.07424911856651306, 0.03738847374916077, 0.09370961040258408, -0.01831410638988018, 0.04560209810733795, 0.43018823862075806, 0.4466473460197449, 0.22009523212909698, -0.24045786261558533, -0.3289479911327362, -0.42382922768592834, 0.23159116506576538, -0.06855253875255585, -0.032110221683979034, 0.08000491559505463, -0.16966763138771057, -0.24353346228599548, 0.056928567588329315, -0.20072242617607117, 0.08634369820356369, -0.09213167428970337, -0.03560548648238182, -0.3864086866378784, -0.32032310962677, 0.2071065753698349, -0.504931628704071, 0.055983468890190125, -0.2207610160112381, 0.08362317085266113, -0.2684437930583954, -0.059677064418792725, -0.1633731722831726, 0.07350166141986847, -0.20372767746448517, -0.2738228142261505, 0.3533516824245453, 0.24032847583293915, 0.4313965439796448, 0.005841702222824097, 0.010897405445575714, -0.05499182268977165, -0.26225268840789795, -0.4290712773799896, 0.3171737492084503, 0.15705597400665283, 0.40173494815826416, 0.1345762312412262, -0.224324569106102, -0.21997873485088348, 0.3864026665687561, -0.008766956627368927, 0.25757163763046265, -0.235181987285614, 0.16973459720611572, -0.20768433809280396, 0.2996111214160919, 0.001551073044538498, 0.13167104125022888, -0.12527616322040558, 0.2263803631067276, -0.5028043985366821, -0.4196602404117584, 0.5630549192428589, -0.529217004776001, -0.22759893536567688, 0.12313199788331985, 0.18161065876483917, -0.05487329512834549, -0.482531875371933, -0.6626615524291992, 0.04129621386528015, 0.21086080372333527, -0.21811065077781677, -0.45236659049987793, 0.3578994870185852, 0.024907439947128296, 0.048431456089019775, -0.06543007493019104, 0.4352570176124573, 0.10593699663877487, -0.26380133628845215, 0.06382015347480774, -0.04446002468466759 ]
https://github.com/huggingface/datasets/issues/6401
Seems like it's a problem with the dataset, since in the [README](https://huggingface.co/datasets/Hyperspace-Technologies/scp-wiki-text/blob/main/README.md) the validation is not specified. Try cloning the dataset, removing the README (or validation split), and loading it locally/
dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") not working
### Describe the bug ``` (datasets) mruserbox@guru-X99:/media/10TB_HHD/_LLM_DATASETS$ python dataset.py Downloading readme: 100%|███████████████████████████████████| 360/360 [00:00<00:00, 2.16MB/s] Downloading data: 100%|█████████████████████████████████| 65.1M/65.1M [00:19<00:00, 3.38MB/s] Downloading data: 100%|█████████████████████████████████| 6.35k/6.35k [00:00<00:00, 20.7kB/s] Downloading data: 100%|█████████████████████████████████| 7.29M/7.29M [00:01<00:00, 3.99MB/s] Downloading data files: 100%|██████████████████████████████████| 3/3 [00:21<00:00, 7.14s/it] Extracting data files: 100%|█████████████████████████████████| 3/3 [00:00<00:00, 1624.23it/s] Generating train split: 100%|█████████████| 314294/314294 [00:00<00:00, 668186.58 examples/s] Generating validation split: 120 examples [00:00, 100422.28 examples/s] Generating test split: 100%|████████████████| 34922/34922 [00:00<00:00, 754683.41 examples/s] Traceback (most recent call last): File "/media/10TB_HHD/_LLM_DATASETS/dataset.py", line 3, in <module> dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/load.py", line 2153, in load_dataset builder_instance.download_and_prepare( File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/builder.py", line 954, in download_and_prepare self._download_and_prepare( File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/builder.py", line 1067, in _download_and_prepare verify_splits(self.info.splits, split_dict) File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/utils/info_utils.py", line 93, in verify_splits raise UnexpectedSplits(str(set(recorded_splits) - set(expected_splits))) datasets.utils.info_utils.UnexpectedSplits: {'validation'} ``` ### Steps to reproduce the bug Name: `dataset.py` Code: ``` from datasets import load_dataset dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") ``` ### Expected behavior Run without errors ### Environment info ``` name: datasets channels: - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - bzip2=1.0.8=h7b6447c_0 - ca-certificates=2023.08.22=h06a4308_0 - ld_impl_linux-64=2.38=h1181459_1 - libffi=3.4.4=h6a678d5_0 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - libuuid=1.41.5=h5eee18b_0 - ncurses=6.4=h6a678d5_0 - openssl=3.0.12=h7f8727e_0 - python=3.10.13=h955ad1f_0 - readline=8.2=h5eee18b_0 - setuptools=68.0.0=py310h06a4308_0 - sqlite=3.41.2=h5eee18b_0 - tk=8.6.12=h1ccaba5_0 - wheel=0.41.2=py310h06a4308_0 - xz=5.4.2=h5eee18b_0 - zlib=1.2.13=h5eee18b_0 - pip: - aiohttp==3.8.6 - aiosignal==1.3.1 - async-timeout==4.0.3 - attrs==23.1.0 - certifi==2023.7.22 - charset-normalizer==3.3.2 - click==8.1.7 - datasets==2.14.6 - dill==0.3.7 - filelock==3.13.1 - frozenlist==1.4.0 - fsspec==2023.10.0 - huggingface-hub==0.19.0 - idna==3.4 - multidict==6.0.4 - multiprocess==0.70.15 - numpy==1.26.1 - openai==0.27.8 - packaging==23.2 - pandas==2.1.3 - pip==23.3.1 - platformdirs==4.0.0 - pyarrow==14.0.1 - python-dateutil==2.8.2 - pytz==2023.3.post1 - pyyaml==6.0.1 - requests==2.31.0 - six==1.16.0 - tomli==2.0.1 - tqdm==4.66.1 - typer==0.9.0 - typing-extensions==4.8.0 - tzdata==2023.3 - urllib3==2.0.7 - xxhash==3.4.1 - yarl==1.9.2 prefix: /home/mruserbox/miniconda3/envs/datasets ```
31
dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") not working ### Describe the bug ``` (datasets) mruserbox@guru-X99:/media/10TB_HHD/_LLM_DATASETS$ python dataset.py Downloading readme: 100%|███████████████████████████████████| 360/360 [00:00<00:00, 2.16MB/s] Downloading data: 100%|█████████████████████████████████| 65.1M/65.1M [00:19<00:00, 3.38MB/s] Downloading data: 100%|█████████████████████████████████| 6.35k/6.35k [00:00<00:00, 20.7kB/s] Downloading data: 100%|█████████████████████████████████| 7.29M/7.29M [00:01<00:00, 3.99MB/s] Downloading data files: 100%|██████████████████████████████████| 3/3 [00:21<00:00, 7.14s/it] Extracting data files: 100%|█████████████████████████████████| 3/3 [00:00<00:00, 1624.23it/s] Generating train split: 100%|█████████████| 314294/314294 [00:00<00:00, 668186.58 examples/s] Generating validation split: 120 examples [00:00, 100422.28 examples/s] Generating test split: 100%|████████████████| 34922/34922 [00:00<00:00, 754683.41 examples/s] Traceback (most recent call last): File "/media/10TB_HHD/_LLM_DATASETS/dataset.py", line 3, in <module> dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/load.py", line 2153, in load_dataset builder_instance.download_and_prepare( File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/builder.py", line 954, in download_and_prepare self._download_and_prepare( File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/builder.py", line 1067, in _download_and_prepare verify_splits(self.info.splits, split_dict) File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/utils/info_utils.py", line 93, in verify_splits raise UnexpectedSplits(str(set(recorded_splits) - set(expected_splits))) datasets.utils.info_utils.UnexpectedSplits: {'validation'} ``` ### Steps to reproduce the bug Name: `dataset.py` Code: ``` from datasets import load_dataset dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") ``` ### Expected behavior Run without errors ### Environment info ``` name: datasets channels: - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - bzip2=1.0.8=h7b6447c_0 - ca-certificates=2023.08.22=h06a4308_0 - ld_impl_linux-64=2.38=h1181459_1 - libffi=3.4.4=h6a678d5_0 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - libuuid=1.41.5=h5eee18b_0 - ncurses=6.4=h6a678d5_0 - openssl=3.0.12=h7f8727e_0 - python=3.10.13=h955ad1f_0 - readline=8.2=h5eee18b_0 - setuptools=68.0.0=py310h06a4308_0 - sqlite=3.41.2=h5eee18b_0 - tk=8.6.12=h1ccaba5_0 - wheel=0.41.2=py310h06a4308_0 - xz=5.4.2=h5eee18b_0 - zlib=1.2.13=h5eee18b_0 - pip: - aiohttp==3.8.6 - aiosignal==1.3.1 - async-timeout==4.0.3 - attrs==23.1.0 - certifi==2023.7.22 - charset-normalizer==3.3.2 - click==8.1.7 - datasets==2.14.6 - dill==0.3.7 - filelock==3.13.1 - frozenlist==1.4.0 - fsspec==2023.10.0 - huggingface-hub==0.19.0 - idna==3.4 - multidict==6.0.4 - multiprocess==0.70.15 - numpy==1.26.1 - openai==0.27.8 - packaging==23.2 - pandas==2.1.3 - pip==23.3.1 - platformdirs==4.0.0 - pyarrow==14.0.1 - python-dateutil==2.8.2 - pytz==2023.3.post1 - pyyaml==6.0.1 - requests==2.31.0 - six==1.16.0 - tomli==2.0.1 - tqdm==4.66.1 - typer==0.9.0 - typing-extensions==4.8.0 - tzdata==2023.3 - urllib3==2.0.7 - xxhash==3.4.1 - yarl==1.9.2 prefix: /home/mruserbox/miniconda3/envs/datasets ``` Seems like it's a problem with the dataset, since in the [README](https://huggingface.co/datasets/Hyperspace-Technologies/scp-wiki-text/blob/main/README.md) the validation is not specified. Try cloning the dataset, removing the README (or validation split), and loading it locally/
[ -0.4304260015487671, -0.008432343602180481, -0.09224650263786316, 0.2506204843521118, 0.28447407484054565, 0.03460144251585007, 0.37043696641921997, 0.33112281560897827, -0.011478707194328308, 0.15837866067886353, 0.052000924944877625, 0.12657028436660767, -0.14188843965530396, 0.345798134803772, 0.07558038830757141, -0.13036516308784485, 0.014056038111448288, 0.17566224932670593, 0.0679481029510498, -0.017901353538036346, -0.19313788414001465, -0.06070883572101593, -0.3589591979980469, -0.1290331780910492, -0.3995784521102905, 0.009388858452439308, 0.0908045694231987, 0.18095648288726807, -0.17682771384716034, -0.46573060750961304, 0.41974949836730957, 0.0962134599685669, 0.22703194618225098, 0.49694061279296875, -0.00011065353464800864, 0.1873265653848648, 0.425473153591156, 0.055091023445129395, -0.3727896511554718, -0.17155735194683075, -0.2904924154281616, -0.3346790671348572, -0.034619737416505814, -0.2848356068134308, -0.10100185871124268, -0.02641444280743599, -0.09188365936279297, -0.014803119003772736, 0.33059704303741455, 0.5596951842308044, 0.24201160669326782, 0.23466764390468597, 0.07197939604520798, -0.11114884912967682, 0.36721792817115784, -0.0748835951089859, -0.06610886752605438, 0.30188220739364624, -0.09919330477714539, 0.07369618862867355, -0.030242279171943665, 0.28435060381889343, -0.01822102814912796, 0.10834553837776184, 0.4017752408981323, 0.11840757727622986, -0.3323627710342407, -0.1301724910736084, 0.029541071504354477, 0.3739520013332367, 0.6675487160682678, -0.17986992001533508, -0.015996364876627922, 0.0056103914976119995, -0.1092870682477951, -0.14651162922382355, 0.37976670265197754, 0.2910315692424774, -0.11298195272684097, 0.10920676589012146, -0.3617902994155884, 0.06104466691613197, -0.2743590772151947, 0.27189338207244873, -0.19756373763084412, 0.5019981265068054, -0.05928334966301918, -0.015688683837652206, 0.1977030634880066, 0.06316903233528137, 0.3460748493671417, -0.239395409822464, 0.02540791593492031, 0.05308049917221069, -0.31318411231040955, -0.06535506248474121, -0.09992459416389465, 0.023595096543431282, 0.22864893078804016, 0.12882892787456512, 0.06496401131153107, 0.07579521834850311, 0.2062598466873169, 0.06399142742156982, 0.01750253140926361, 0.22159376740455627, -0.15110275149345398, 0.2359064668416977, 0.35479840636253357, 0.41987693309783936, -0.17768505215644836, -0.08169521391391754, -0.049233417958021164, -0.14695940911769867, 0.08005204796791077, -0.22379504144191742, 0.23701903223991394, -0.04670306295156479, -0.2802261710166931, 0.3014677166938782, -0.3658096194267273, -0.08495748043060303, -0.029076114296913147, 0.5566491484642029, -0.049475543200969696, 0.22300568222999573, 0.22452625632286072, 0.2372422218322754, -0.1501493752002716, -0.15587162971496582, -0.2586236000061035, 0.13615399599075317, -0.3256351947784424, -0.03043975494801998, 0.3806806802749634, 0.2801552712917328, 0.28578612208366394, 0.006130419671535492, 0.05312194675207138, -0.321914941072464, 0.06141597777605057, -0.14322178065776825, -0.0167185477912426, 0.19969558715820312, 0.04253003001213074, 0.0636487826704979, -0.03204592317342758, 0.09386646747589111, 0.05438464879989624, 0.1610717475414276, -0.22722673416137695, -0.1563202142715454, -0.047125108540058136, 0.34636667370796204, 0.041565537452697754, -0.2142402082681656, -0.2569640576839447, 0.0881170704960823, 0.3096735179424286, -0.11606346070766449, -0.03276043012738228, -0.18349531292915344, -0.24357746541500092, -0.17655731737613678, 0.3825889229774475, 0.38444679975509644, -0.27782750129699707, -0.06704455614089966, 0.09649649262428284, -0.11053591221570969, 0.34121280908584595, -0.07156497985124588, -0.26784253120422363, 0.4575318992137909, -0.22586849331855774, 0.21618548035621643, 0.1915006935596466, -0.36072373390197754, -0.5163541436195374, 0.11233345419168472, -0.00936698168516159, -0.05843247473239899, 0.17142236232757568, -0.01658306084573269, 0.09725435078144073, 0.22284728288650513, -0.04988906532526016, 0.3086674213409424, 0.01691671647131443, 0.20969456434249878, -0.4382668733596802, -0.20554640889167786, 0.24069872498512268, 0.22068452835083008, 0.3376159369945526, -0.0013666972517967224, 0.24766162037849426, 0.43698257207870483, 0.4260879158973694, -0.07040804624557495, 0.11833728104829788, 0.21976913511753082, 0.08563625812530518, -0.11889216303825378, -0.17411823570728302, -0.3024146556854248, -0.38454470038414, 0.17318324744701385, -0.004854604601860046, 0.05805695801973343, 0.03035811521112919, -0.03746047616004944, -0.472032368183136, -0.08484233915805817, -0.4350564777851105, -0.22703266143798828, 0.17750486731529236, 0.038918282836675644, 0.293218195438385, -0.04936306178569794, -0.02373102307319641, 0.18491798639297485, -0.17072772979736328, 0.16506265103816986, -0.07453218102455139, 0.5730956196784973, -0.25164085626602173, -0.15997833013534546, -0.039613232016563416, 0.2513197958469391, 0.18132148683071136, -0.14317893981933594, -0.22105714678764343, 0.4068354368209839, -0.037622105330228806, -0.1676120162010193, -0.16814593970775604, -0.14490795135498047, 0.2542446255683899, -0.4764189124107361, 0.13433845341205597, 0.152616947889328, 0.1992867887020111, -0.002499327063560486, -0.3215765953063965, 0.15450826287269592, 0.1505826711654663, 0.16415709257125854, 0.09096910059452057, -0.03140818327665329, 0.14548805356025696, -0.36015552282333374, 0.18459343910217285, -0.09885525703430176, 0.2687673568725586, -0.07091660797595978, 0.32942962646484375, -0.04645179957151413, -0.03945980221033096, -0.11663534492254257, 0.3955598771572113, 0.07017695903778076, 0.06027057766914368, 0.09208661317825317, -0.23491054773330688, -0.24839772284030914, 0.005146374925971031, 0.31317517161369324, 0.2963561415672302, 0.217300683259964, 0.027018386870622635, 0.1573236584663391, 0.0029818005859851837, -0.21647420525550842, 0.16581031680107117, 0.04432832449674606, 0.23701761662960052, 0.35153719782829285, 0.1922065168619156, -0.040778521448373795, -0.4330924451351166, -0.04374644532799721, 0.1326165497303009, 0.21115536987781525, -0.29668980836868286, -0.00396525114774704, -0.29716888070106506, 0.037788741290569305, -0.11315406858921051, 0.21289502084255219, 0.022423580288887024, -0.3525296151638031, -0.05536723881959915, 0.07856369018554688, 0.007029570639133453, 0.24684211611747742, -0.4388487637042999, -0.009701922535896301, 0.07439098507165909, -0.1186918094754219, -0.2664340138435364, -0.029164999723434448, -0.32394760847091675, 0.12790250778198242, 0.12811434268951416, 0.16948585212230682, 0.28651517629623413, -0.010623905807733536, -0.18826450407505035, -0.10122909396886826, -0.15834486484527588, 0.19977174699306488, 0.10861852765083313, 0.010249586775898933, 0.03425326570868492, 0.22896982729434967, 0.14076052606105804, -0.19619733095169067, 0.39824581146240234, -0.2839892506599426, -0.1650056689977646, 0.17649897933006287, 0.10879355669021606, -0.13578063249588013, -0.1458916962146759, -0.4335576891899109, -0.4209810495376587, -0.47282981872558594, -0.25366106629371643, -0.010943129658699036, 0.03544989228248596, 0.3531795144081116, 0.19469667971134186, 0.0853261724114418, -0.055710554122924805, -0.05699075385928154, -0.2655768096446991, -0.18850985169410706, 0.3059762418270111, -0.18807941675186157, -0.40852344036102295, -0.005216002464294434, -0.11215010285377502, -0.09232880920171738, 0.2169841229915619, -0.4986535906791687, -0.07779920846223831, -0.40476924180984497, 0.34166419506073, -0.1205725222826004, 0.2427554428577423, 0.2383083552122116, -0.05542519688606262, -0.11310700327157974, -0.21267512440681458, 0.12808546423912048, 0.14627881348133087, -0.09693911671638489, 0.14049957692623138, 0.05371425300836563, 0.2573612332344055, 0.0924486368894577, 0.6970294713973999, 0.21572990715503693, -0.13261887431144714, 0.5545892119407654, -0.17392539978027344, 0.1649717390537262, -0.07067839801311493, -0.23696589469909668, 0.3256145417690277, -0.13179293274879456, 0.021061427891254425, 0.2744567394256592, -0.1601703017950058, 0.026821685954928398, -0.10253502428531647, 0.09475882351398468, -0.29547804594039917, -0.10617377609014511, 0.014750799164175987, -0.04669784754514694, 0.25295886397361755, 0.1390226185321808, 0.12370069324970245, 0.060846053063869476, -0.1958438754081726, 0.06675782054662704, 0.06470227986574173, -0.169964000582695, -0.03674639016389847, -0.36838650703430176, 0.1355709284543991, -0.47084224224090576, 0.19937963783740997, 0.20029762387275696, 0.19360390305519104, -0.0915733128786087, 0.06234072148799896, 0.1040944755077362, -0.1997172236442566, 0.6721083521842957, -0.20622184872627258, 0.4028860926628113, 0.03940407931804657, 0.35143470764160156, -0.04273324832320213, -0.24910275638103485, -0.25247493386268616, -0.20674565434455872, 0.06008131057024002, 0.13747946918010712, -0.3524986505508423, -0.2153671681880951, 0.5600380301475525, 0.08521738648414612, -0.08814249187707901, -0.04018760845065117, -0.13543444871902466, -0.2766624689102173, -0.2506752014160156, 0.05547592416405678, -0.046508606523275375, 0.5092905759811401, -0.22952774167060852, -0.19951947033405304, 0.029449885711073875, -0.13898104429244995, -0.04558977484703064, 0.11028210073709488, 0.36459869146347046, -0.006555166095495224, 0.10588456690311432, -0.05688832700252533, 0.031034884974360466, 0.47342661023139954, 0.6394997239112854, -0.145961195230484, -0.2935270071029663, -0.04993685334920883, -0.10958521068096161, 0.25402170419692993, 0.220293328166008, -0.16207656264305115, -0.11621697247028351, 0.14482653141021729, 0.2778766453266144, -0.20211629569530487, 0.14157164096832275, 0.25762850046157837, -0.08034604042768478, -0.18906475603580475, -0.4292069375514984, 0.6346045732498169, -0.022452693432569504, 0.13755211234092712, -0.25162273645401, 0.2021307498216629, -0.43684542179107666, 0.12714846432209015, -0.08203421533107758, 0.8030054569244385, 0.13461610674858093, 0.22138988971710205, 0.36997509002685547, 0.15973886847496033, 0.15697814524173737, -0.5928213596343994, 0.11121615767478943, -0.2420577108860016, -0.1060253232717514, -0.09730860590934753, -0.22226764261722565, 0.06821742653846741, 0.27954986691474915, -0.33304476737976074, 0.05829605087637901, -0.20147743821144104, 0.27808552980422974, 0.1101536750793457, 0.3422141373157501, -0.14201119542121887, -0.004875168204307556, -0.06489138305187225, 0.2365962564945221, -0.07479311525821686, 0.14851823449134827, -0.18679237365722656, -0.047688230872154236, -0.17245058715343475, -0.27062222361564636, -0.3144446015357971, 0.4104909300804138, -0.478839248418808, 0.22201016545295715, 0.013482479378581047, -0.3253641426563263, 0.03191734105348587, 0.1351080685853958, 0.05147586390376091, 0.20974256098270416, -0.11298628896474838, 0.3389541804790497, -0.1487758904695511, 0.04984369874000549, -0.09140470623970032, 0.0969250500202179, 0.17821693420410156, -0.1160358339548111, -0.19586816430091858, 0.035847991704940796, -0.12475050985813141, -0.31329140067100525, 0.13452094793319702, 0.09098286926746368, -0.03962056711316109, -0.48567622900009155, -0.07538879662752151, -0.05429953709244728, 0.009145312011241913, -0.41230475902557373, 0.16766318678855896, -0.022827882319688797, -0.2506539225578308, 0.09150929003953934, 0.15838587284088135, -0.22185978293418884, -0.11135226488113403, 0.33266887068748474, 0.049628905951976776, 0.24378666281700134, 0.5614925622940063, 0.11457967758178711, -0.16873601078987122, -0.2856435775756836, 0.23202702403068542, 0.21839703619480133, -0.3025096654891968, 0.23700623214244843, 0.03651268780231476, -0.008538365364074707, -0.07402601838111877, 0.47538095712661743, -0.014696042984724045, -0.03759504482150078, 0.03790438175201416, -0.488416850566864, 0.0268808975815773, 0.0403810478746891, 0.039082981646060944, 0.11506994813680649, -0.04818274453282356, 0.3321884274482727, 0.020850740373134613, 0.0614759624004364, -0.374154269695282, 0.08681341260671616, -0.24088138341903687, 0.0165862999856472, 0.11877931654453278, -0.20691123604774475, 0.1633378565311432, -0.20746465027332306, 0.1568458080291748, -0.000589330680668354, -0.09865988045930862, -0.3218470811843872, -0.3388354778289795, 0.10951858758926392, 0.21093463897705078, -0.04838487505912781, 0.01470205932855606, -0.10146266222000122, -0.13916605710983276, -0.08437834680080414, 0.16127237677574158, -0.017415732145309448, -0.06660054624080658, 0.3222784101963043, 0.06574457138776779, 0.1595868319272995, -0.23604851961135864, -0.0029606055468320847, -0.20383360981941223, 0.41149505972862244, -0.043199338018894196, 0.03083331137895584, 0.27952250838279724, 0.102145254611969, -0.35837695002555847, 0.11243589967489243, 0.2028011977672577, -0.11863788962364197, 0.26859724521636963, -0.5279077291488647, -0.04846353456377983, 0.23851481080055237, 0.3223676383495331, 0.4981517791748047, -0.22012002766132355, -0.05087222903966904, 0.0852990671992302, 0.3054766058921814, -0.4090595841407776, -0.09591974318027496, 0.08037903159856796, -0.1820557415485382, 0.16879549622535706, 0.044393546879291534, 0.2050648331642151, -0.0642973929643631, -0.18453843891620636, 0.12744441628456116, 0.32041701674461365, -0.11414210498332977, 0.1822027713060379, 0.3320300579071045, -0.021952681243419647, 0.17682263255119324, 0.21278588473796844, 0.012006029486656189, 0.08041413873434067, 0.5559011101722717, 0.1163405328989029, 0.5096237659454346, -0.000817484688013792, 0.21820582449436188, -0.2008732557296753, -0.35521697998046875, 0.0642460286617279, 0.0016939863562583923, -0.30867013335227966, 0.09232378005981445, -0.2025308459997177, 0.06010297313332558, -0.3195469379425049, -0.09218959510326385, -0.37666893005371094, 0.026596318930387497, -0.05704822763800621, -0.02308833785355091, -0.1358334869146347, -0.2216782122850418, -0.32922714948654175, 0.16398024559020996, 0.1340884268283844, 0.0012103840708732605, 0.18411779403686523, 0.08229122310876846, -0.26067280769348145, -0.36719509959220886, 0.13744120299816132, 0.15145981311798096, 0.054555896669626236, -0.4126284122467041, 0.21819756925106049, 0.07226584106683731, -0.19832229614257812, -0.018187955021858215, 0.3107129633426666, 0.3494475781917572, 0.30976927280426025, -0.1787986159324646, -0.22798413038253784, -0.05201864242553711, -0.11984274536371231, -0.1885332465171814, 0.2793012261390686, 0.4061090052127838, 0.1433488428592682, 0.19159188866615295, 0.18774442374706268, -0.31748467683792114, 0.013770203106105328, 0.15767790377140045, 0.01688937470316887, -0.29055947065353394, 0.2062949389219284, -0.07068373262882233, -0.2102525532245636, -0.15658313035964966, -0.09215762466192245, -0.26177793741226196, 0.21868929266929626, 0.18550315499305725, 0.07494817674160004, 0.2572934031486511, -0.17717266082763672, 0.09062308073043823, -0.026036739349365234, 0.561921238899231, 0.3039361834526062, -0.0515311136841774, -0.43138712644577026, -0.04698057472705841, -0.5314905047416687, 0.019759438931941986, -0.29617246985435486, -0.25308334827423096, -0.055590592324733734, 0.14391997456550598, -0.03608312830328941, 0.13191215693950653, 0.11837908625602722, -0.0341610386967659, 0.2695859372615814, 0.11208900064229965, -0.2473786175251007, 0.015421157702803612, 0.09341053664684296, 0.07430637627840042, -0.10550115257501602, -0.6078811287879944, 0.19187340140342712, -0.25154268741607666, 0.028183050453662872, -0.052684053778648376, -0.04525173455476761, 0.26280567049980164, -0.4704658091068268, 0.5863538980484009, -0.01642962172627449, 0.5952327251434326, -0.19701743125915527, 0.049988843500614166, -0.30786627531051636, -0.12366548180580139, -0.33591729402542114, -0.054053664207458496, 0.0022583408281207085, 0.42114269733428955, 0.04680129885673523, 0.002020830987021327, -0.25026190280914307, 0.1807396411895752, 0.12414930760860443, 0.05838552862405777, -0.06155727431178093, -0.0783676728606224, -0.08474528789520264, 0.05164220556616783, 0.4448331296443939, 0.10267267376184464, -0.238057479262352, 0.04866747558116913, -0.3167441487312317, -0.5541096925735474, 0.1671997755765915, -0.20786620676517487, -0.4059983491897583, -0.19747528433799744, 0.18185923993587494, -0.2947675585746765, -0.02155856415629387, -0.44848501682281494, -0.0061876773834228516, 0.3088119626045227, -0.10586999356746674, -0.31793689727783203, 0.2793038785457611, 0.19355754554271698, -0.10651249438524246, 0.08658821880817413, 0.3190275728702545, 0.02615276724100113, -0.26211005449295044, -0.1723455786705017, -0.19802090525627136 ]
https://github.com/huggingface/datasets/issues/6401
@VarunNSrivastava thanks brother, working beautiful now ``` C:\_Work\_datasets>py dataset.py Downloading data files: 100%|████████████████████████████████████████████████████████████████████| 3/3 [00:00<?, ?it/s] Extracting data files: 100%|████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 599.90it/s] Generating train split: 314294 examples [00:00, 1293222.03 examples/s] Generating validation split: 120 examples [00:00, 59053.91 examples/s] Generating test split: 34922 examples [00:00, 1343275.84 examples/s] ```
dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") not working
### Describe the bug ``` (datasets) mruserbox@guru-X99:/media/10TB_HHD/_LLM_DATASETS$ python dataset.py Downloading readme: 100%|███████████████████████████████████| 360/360 [00:00<00:00, 2.16MB/s] Downloading data: 100%|█████████████████████████████████| 65.1M/65.1M [00:19<00:00, 3.38MB/s] Downloading data: 100%|█████████████████████████████████| 6.35k/6.35k [00:00<00:00, 20.7kB/s] Downloading data: 100%|█████████████████████████████████| 7.29M/7.29M [00:01<00:00, 3.99MB/s] Downloading data files: 100%|██████████████████████████████████| 3/3 [00:21<00:00, 7.14s/it] Extracting data files: 100%|█████████████████████████████████| 3/3 [00:00<00:00, 1624.23it/s] Generating train split: 100%|█████████████| 314294/314294 [00:00<00:00, 668186.58 examples/s] Generating validation split: 120 examples [00:00, 100422.28 examples/s] Generating test split: 100%|████████████████| 34922/34922 [00:00<00:00, 754683.41 examples/s] Traceback (most recent call last): File "/media/10TB_HHD/_LLM_DATASETS/dataset.py", line 3, in <module> dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/load.py", line 2153, in load_dataset builder_instance.download_and_prepare( File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/builder.py", line 954, in download_and_prepare self._download_and_prepare( File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/builder.py", line 1067, in _download_and_prepare verify_splits(self.info.splits, split_dict) File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/utils/info_utils.py", line 93, in verify_splits raise UnexpectedSplits(str(set(recorded_splits) - set(expected_splits))) datasets.utils.info_utils.UnexpectedSplits: {'validation'} ``` ### Steps to reproduce the bug Name: `dataset.py` Code: ``` from datasets import load_dataset dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") ``` ### Expected behavior Run without errors ### Environment info ``` name: datasets channels: - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - bzip2=1.0.8=h7b6447c_0 - ca-certificates=2023.08.22=h06a4308_0 - ld_impl_linux-64=2.38=h1181459_1 - libffi=3.4.4=h6a678d5_0 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - libuuid=1.41.5=h5eee18b_0 - ncurses=6.4=h6a678d5_0 - openssl=3.0.12=h7f8727e_0 - python=3.10.13=h955ad1f_0 - readline=8.2=h5eee18b_0 - setuptools=68.0.0=py310h06a4308_0 - sqlite=3.41.2=h5eee18b_0 - tk=8.6.12=h1ccaba5_0 - wheel=0.41.2=py310h06a4308_0 - xz=5.4.2=h5eee18b_0 - zlib=1.2.13=h5eee18b_0 - pip: - aiohttp==3.8.6 - aiosignal==1.3.1 - async-timeout==4.0.3 - attrs==23.1.0 - certifi==2023.7.22 - charset-normalizer==3.3.2 - click==8.1.7 - datasets==2.14.6 - dill==0.3.7 - filelock==3.13.1 - frozenlist==1.4.0 - fsspec==2023.10.0 - huggingface-hub==0.19.0 - idna==3.4 - multidict==6.0.4 - multiprocess==0.70.15 - numpy==1.26.1 - openai==0.27.8 - packaging==23.2 - pandas==2.1.3 - pip==23.3.1 - platformdirs==4.0.0 - pyarrow==14.0.1 - python-dateutil==2.8.2 - pytz==2023.3.post1 - pyyaml==6.0.1 - requests==2.31.0 - six==1.16.0 - tomli==2.0.1 - tqdm==4.66.1 - typer==0.9.0 - typing-extensions==4.8.0 - tzdata==2023.3 - urllib3==2.0.7 - xxhash==3.4.1 - yarl==1.9.2 prefix: /home/mruserbox/miniconda3/envs/datasets ```
48
dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") not working ### Describe the bug ``` (datasets) mruserbox@guru-X99:/media/10TB_HHD/_LLM_DATASETS$ python dataset.py Downloading readme: 100%|███████████████████████████████████| 360/360 [00:00<00:00, 2.16MB/s] Downloading data: 100%|█████████████████████████████████| 65.1M/65.1M [00:19<00:00, 3.38MB/s] Downloading data: 100%|█████████████████████████████████| 6.35k/6.35k [00:00<00:00, 20.7kB/s] Downloading data: 100%|█████████████████████████████████| 7.29M/7.29M [00:01<00:00, 3.99MB/s] Downloading data files: 100%|██████████████████████████████████| 3/3 [00:21<00:00, 7.14s/it] Extracting data files: 100%|█████████████████████████████████| 3/3 [00:00<00:00, 1624.23it/s] Generating train split: 100%|█████████████| 314294/314294 [00:00<00:00, 668186.58 examples/s] Generating validation split: 120 examples [00:00, 100422.28 examples/s] Generating test split: 100%|████████████████| 34922/34922 [00:00<00:00, 754683.41 examples/s] Traceback (most recent call last): File "/media/10TB_HHD/_LLM_DATASETS/dataset.py", line 3, in <module> dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/load.py", line 2153, in load_dataset builder_instance.download_and_prepare( File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/builder.py", line 954, in download_and_prepare self._download_and_prepare( File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/builder.py", line 1067, in _download_and_prepare verify_splits(self.info.splits, split_dict) File "/home/mruserbox/miniconda3/envs/datasets/lib/python3.10/site-packages/datasets/utils/info_utils.py", line 93, in verify_splits raise UnexpectedSplits(str(set(recorded_splits) - set(expected_splits))) datasets.utils.info_utils.UnexpectedSplits: {'validation'} ``` ### Steps to reproduce the bug Name: `dataset.py` Code: ``` from datasets import load_dataset dataset = load_dataset("Hyperspace-Technologies/scp-wiki-text") ``` ### Expected behavior Run without errors ### Environment info ``` name: datasets channels: - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - bzip2=1.0.8=h7b6447c_0 - ca-certificates=2023.08.22=h06a4308_0 - ld_impl_linux-64=2.38=h1181459_1 - libffi=3.4.4=h6a678d5_0 - libgcc-ng=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - libstdcxx-ng=11.2.0=h1234567_1 - libuuid=1.41.5=h5eee18b_0 - ncurses=6.4=h6a678d5_0 - openssl=3.0.12=h7f8727e_0 - python=3.10.13=h955ad1f_0 - readline=8.2=h5eee18b_0 - setuptools=68.0.0=py310h06a4308_0 - sqlite=3.41.2=h5eee18b_0 - tk=8.6.12=h1ccaba5_0 - wheel=0.41.2=py310h06a4308_0 - xz=5.4.2=h5eee18b_0 - zlib=1.2.13=h5eee18b_0 - pip: - aiohttp==3.8.6 - aiosignal==1.3.1 - async-timeout==4.0.3 - attrs==23.1.0 - certifi==2023.7.22 - charset-normalizer==3.3.2 - click==8.1.7 - datasets==2.14.6 - dill==0.3.7 - filelock==3.13.1 - frozenlist==1.4.0 - fsspec==2023.10.0 - huggingface-hub==0.19.0 - idna==3.4 - multidict==6.0.4 - multiprocess==0.70.15 - numpy==1.26.1 - openai==0.27.8 - packaging==23.2 - pandas==2.1.3 - pip==23.3.1 - platformdirs==4.0.0 - pyarrow==14.0.1 - python-dateutil==2.8.2 - pytz==2023.3.post1 - pyyaml==6.0.1 - requests==2.31.0 - six==1.16.0 - tomli==2.0.1 - tqdm==4.66.1 - typer==0.9.0 - typing-extensions==4.8.0 - tzdata==2023.3 - urllib3==2.0.7 - xxhash==3.4.1 - yarl==1.9.2 prefix: /home/mruserbox/miniconda3/envs/datasets ``` @VarunNSrivastava thanks brother, working beautiful now ``` C:\_Work\_datasets>py dataset.py Downloading data files: 100%|████████████████████████████████████████████████████████████████████| 3/3 [00:00<?, ?it/s] Extracting data files: 100%|████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 599.90it/s] Generating train split: 314294 examples [00:00, 1293222.03 examples/s] Generating validation split: 120 examples [00:00, 59053.91 examples/s] Generating test split: 34922 examples [00:00, 1343275.84 examples/s] ```
[ -0.4304260015487671, -0.008432343602180481, -0.09224650263786316, 0.2506204843521118, 0.28447407484054565, 0.03460144251585007, 0.37043696641921997, 0.33112281560897827, -0.011478707194328308, 0.15837866067886353, 0.052000924944877625, 0.12657028436660767, -0.14188843965530396, 0.345798134803772, 0.07558038830757141, -0.13036516308784485, 0.014056038111448288, 0.17566224932670593, 0.0679481029510498, -0.017901353538036346, -0.19313788414001465, -0.06070883572101593, -0.3589591979980469, -0.1290331780910492, -0.3995784521102905, 0.009388858452439308, 0.0908045694231987, 0.18095648288726807, -0.17682771384716034, -0.46573060750961304, 0.41974949836730957, 0.0962134599685669, 0.22703194618225098, 0.49694061279296875, -0.00011065353464800864, 0.1873265653848648, 0.425473153591156, 0.055091023445129395, -0.3727896511554718, -0.17155735194683075, -0.2904924154281616, -0.3346790671348572, -0.034619737416505814, -0.2848356068134308, -0.10100185871124268, -0.02641444280743599, -0.09188365936279297, -0.014803119003772736, 0.33059704303741455, 0.5596951842308044, 0.24201160669326782, 0.23466764390468597, 0.07197939604520798, -0.11114884912967682, 0.36721792817115784, -0.0748835951089859, -0.06610886752605438, 0.30188220739364624, -0.09919330477714539, 0.07369618862867355, -0.030242279171943665, 0.28435060381889343, -0.01822102814912796, 0.10834553837776184, 0.4017752408981323, 0.11840757727622986, -0.3323627710342407, -0.1301724910736084, 0.029541071504354477, 0.3739520013332367, 0.6675487160682678, -0.17986992001533508, -0.015996364876627922, 0.0056103914976119995, -0.1092870682477951, -0.14651162922382355, 0.37976670265197754, 0.2910315692424774, -0.11298195272684097, 0.10920676589012146, -0.3617902994155884, 0.06104466691613197, -0.2743590772151947, 0.27189338207244873, -0.19756373763084412, 0.5019981265068054, -0.05928334966301918, -0.015688683837652206, 0.1977030634880066, 0.06316903233528137, 0.3460748493671417, -0.239395409822464, 0.02540791593492031, 0.05308049917221069, -0.31318411231040955, -0.06535506248474121, -0.09992459416389465, 0.023595096543431282, 0.22864893078804016, 0.12882892787456512, 0.06496401131153107, 0.07579521834850311, 0.2062598466873169, 0.06399142742156982, 0.01750253140926361, 0.22159376740455627, -0.15110275149345398, 0.2359064668416977, 0.35479840636253357, 0.41987693309783936, -0.17768505215644836, -0.08169521391391754, -0.049233417958021164, -0.14695940911769867, 0.08005204796791077, -0.22379504144191742, 0.23701903223991394, -0.04670306295156479, -0.2802261710166931, 0.3014677166938782, -0.3658096194267273, -0.08495748043060303, -0.029076114296913147, 0.5566491484642029, -0.049475543200969696, 0.22300568222999573, 0.22452625632286072, 0.2372422218322754, -0.1501493752002716, -0.15587162971496582, -0.2586236000061035, 0.13615399599075317, -0.3256351947784424, -0.03043975494801998, 0.3806806802749634, 0.2801552712917328, 0.28578612208366394, 0.006130419671535492, 0.05312194675207138, -0.321914941072464, 0.06141597777605057, -0.14322178065776825, -0.0167185477912426, 0.19969558715820312, 0.04253003001213074, 0.0636487826704979, -0.03204592317342758, 0.09386646747589111, 0.05438464879989624, 0.1610717475414276, -0.22722673416137695, -0.1563202142715454, -0.047125108540058136, 0.34636667370796204, 0.041565537452697754, -0.2142402082681656, -0.2569640576839447, 0.0881170704960823, 0.3096735179424286, -0.11606346070766449, -0.03276043012738228, -0.18349531292915344, -0.24357746541500092, -0.17655731737613678, 0.3825889229774475, 0.38444679975509644, -0.27782750129699707, -0.06704455614089966, 0.09649649262428284, -0.11053591221570969, 0.34121280908584595, -0.07156497985124588, -0.26784253120422363, 0.4575318992137909, -0.22586849331855774, 0.21618548035621643, 0.1915006935596466, -0.36072373390197754, -0.5163541436195374, 0.11233345419168472, -0.00936698168516159, -0.05843247473239899, 0.17142236232757568, -0.01658306084573269, 0.09725435078144073, 0.22284728288650513, -0.04988906532526016, 0.3086674213409424, 0.01691671647131443, 0.20969456434249878, -0.4382668733596802, -0.20554640889167786, 0.24069872498512268, 0.22068452835083008, 0.3376159369945526, -0.0013666972517967224, 0.24766162037849426, 0.43698257207870483, 0.4260879158973694, -0.07040804624557495, 0.11833728104829788, 0.21976913511753082, 0.08563625812530518, -0.11889216303825378, -0.17411823570728302, -0.3024146556854248, -0.38454470038414, 0.17318324744701385, -0.004854604601860046, 0.05805695801973343, 0.03035811521112919, -0.03746047616004944, -0.472032368183136, -0.08484233915805817, -0.4350564777851105, -0.22703266143798828, 0.17750486731529236, 0.038918282836675644, 0.293218195438385, -0.04936306178569794, -0.02373102307319641, 0.18491798639297485, -0.17072772979736328, 0.16506265103816986, -0.07453218102455139, 0.5730956196784973, -0.25164085626602173, -0.15997833013534546, -0.039613232016563416, 0.2513197958469391, 0.18132148683071136, -0.14317893981933594, -0.22105714678764343, 0.4068354368209839, -0.037622105330228806, -0.1676120162010193, -0.16814593970775604, -0.14490795135498047, 0.2542446255683899, -0.4764189124107361, 0.13433845341205597, 0.152616947889328, 0.1992867887020111, -0.002499327063560486, -0.3215765953063965, 0.15450826287269592, 0.1505826711654663, 0.16415709257125854, 0.09096910059452057, -0.03140818327665329, 0.14548805356025696, -0.36015552282333374, 0.18459343910217285, -0.09885525703430176, 0.2687673568725586, -0.07091660797595978, 0.32942962646484375, -0.04645179957151413, -0.03945980221033096, -0.11663534492254257, 0.3955598771572113, 0.07017695903778076, 0.06027057766914368, 0.09208661317825317, -0.23491054773330688, -0.24839772284030914, 0.005146374925971031, 0.31317517161369324, 0.2963561415672302, 0.217300683259964, 0.027018386870622635, 0.1573236584663391, 0.0029818005859851837, -0.21647420525550842, 0.16581031680107117, 0.04432832449674606, 0.23701761662960052, 0.35153719782829285, 0.1922065168619156, -0.040778521448373795, -0.4330924451351166, -0.04374644532799721, 0.1326165497303009, 0.21115536987781525, -0.29668980836868286, -0.00396525114774704, -0.29716888070106506, 0.037788741290569305, -0.11315406858921051, 0.21289502084255219, 0.022423580288887024, -0.3525296151638031, -0.05536723881959915, 0.07856369018554688, 0.007029570639133453, 0.24684211611747742, -0.4388487637042999, -0.009701922535896301, 0.07439098507165909, -0.1186918094754219, -0.2664340138435364, -0.029164999723434448, -0.32394760847091675, 0.12790250778198242, 0.12811434268951416, 0.16948585212230682, 0.28651517629623413, -0.010623905807733536, -0.18826450407505035, -0.10122909396886826, -0.15834486484527588, 0.19977174699306488, 0.10861852765083313, 0.010249586775898933, 0.03425326570868492, 0.22896982729434967, 0.14076052606105804, -0.19619733095169067, 0.39824581146240234, -0.2839892506599426, -0.1650056689977646, 0.17649897933006287, 0.10879355669021606, -0.13578063249588013, -0.1458916962146759, -0.4335576891899109, -0.4209810495376587, -0.47282981872558594, -0.25366106629371643, -0.010943129658699036, 0.03544989228248596, 0.3531795144081116, 0.19469667971134186, 0.0853261724114418, -0.055710554122924805, -0.05699075385928154, -0.2655768096446991, -0.18850985169410706, 0.3059762418270111, -0.18807941675186157, -0.40852344036102295, -0.005216002464294434, -0.11215010285377502, -0.09232880920171738, 0.2169841229915619, -0.4986535906791687, -0.07779920846223831, -0.40476924180984497, 0.34166419506073, -0.1205725222826004, 0.2427554428577423, 0.2383083552122116, -0.05542519688606262, -0.11310700327157974, -0.21267512440681458, 0.12808546423912048, 0.14627881348133087, -0.09693911671638489, 0.14049957692623138, 0.05371425300836563, 0.2573612332344055, 0.0924486368894577, 0.6970294713973999, 0.21572990715503693, -0.13261887431144714, 0.5545892119407654, -0.17392539978027344, 0.1649717390537262, -0.07067839801311493, -0.23696589469909668, 0.3256145417690277, -0.13179293274879456, 0.021061427891254425, 0.2744567394256592, -0.1601703017950058, 0.026821685954928398, -0.10253502428531647, 0.09475882351398468, -0.29547804594039917, -0.10617377609014511, 0.014750799164175987, -0.04669784754514694, 0.25295886397361755, 0.1390226185321808, 0.12370069324970245, 0.060846053063869476, -0.1958438754081726, 0.06675782054662704, 0.06470227986574173, -0.169964000582695, -0.03674639016389847, -0.36838650703430176, 0.1355709284543991, -0.47084224224090576, 0.19937963783740997, 0.20029762387275696, 0.19360390305519104, -0.0915733128786087, 0.06234072148799896, 0.1040944755077362, -0.1997172236442566, 0.6721083521842957, -0.20622184872627258, 0.4028860926628113, 0.03940407931804657, 0.35143470764160156, -0.04273324832320213, -0.24910275638103485, -0.25247493386268616, -0.20674565434455872, 0.06008131057024002, 0.13747946918010712, -0.3524986505508423, -0.2153671681880951, 0.5600380301475525, 0.08521738648414612, -0.08814249187707901, -0.04018760845065117, -0.13543444871902466, -0.2766624689102173, -0.2506752014160156, 0.05547592416405678, -0.046508606523275375, 0.5092905759811401, -0.22952774167060852, -0.19951947033405304, 0.029449885711073875, -0.13898104429244995, -0.04558977484703064, 0.11028210073709488, 0.36459869146347046, -0.006555166095495224, 0.10588456690311432, -0.05688832700252533, 0.031034884974360466, 0.47342661023139954, 0.6394997239112854, -0.145961195230484, -0.2935270071029663, -0.04993685334920883, -0.10958521068096161, 0.25402170419692993, 0.220293328166008, -0.16207656264305115, -0.11621697247028351, 0.14482653141021729, 0.2778766453266144, -0.20211629569530487, 0.14157164096832275, 0.25762850046157837, -0.08034604042768478, -0.18906475603580475, -0.4292069375514984, 0.6346045732498169, -0.022452693432569504, 0.13755211234092712, -0.25162273645401, 0.2021307498216629, -0.43684542179107666, 0.12714846432209015, -0.08203421533107758, 0.8030054569244385, 0.13461610674858093, 0.22138988971710205, 0.36997509002685547, 0.15973886847496033, 0.15697814524173737, -0.5928213596343994, 0.11121615767478943, -0.2420577108860016, -0.1060253232717514, -0.09730860590934753, -0.22226764261722565, 0.06821742653846741, 0.27954986691474915, -0.33304476737976074, 0.05829605087637901, -0.20147743821144104, 0.27808552980422974, 0.1101536750793457, 0.3422141373157501, -0.14201119542121887, -0.004875168204307556, -0.06489138305187225, 0.2365962564945221, -0.07479311525821686, 0.14851823449134827, -0.18679237365722656, -0.047688230872154236, -0.17245058715343475, -0.27062222361564636, -0.3144446015357971, 0.4104909300804138, -0.478839248418808, 0.22201016545295715, 0.013482479378581047, -0.3253641426563263, 0.03191734105348587, 0.1351080685853958, 0.05147586390376091, 0.20974256098270416, -0.11298628896474838, 0.3389541804790497, -0.1487758904695511, 0.04984369874000549, -0.09140470623970032, 0.0969250500202179, 0.17821693420410156, -0.1160358339548111, -0.19586816430091858, 0.035847991704940796, -0.12475050985813141, -0.31329140067100525, 0.13452094793319702, 0.09098286926746368, -0.03962056711316109, -0.48567622900009155, -0.07538879662752151, -0.05429953709244728, 0.009145312011241913, -0.41230475902557373, 0.16766318678855896, -0.022827882319688797, -0.2506539225578308, 0.09150929003953934, 0.15838587284088135, -0.22185978293418884, -0.11135226488113403, 0.33266887068748474, 0.049628905951976776, 0.24378666281700134, 0.5614925622940063, 0.11457967758178711, -0.16873601078987122, -0.2856435775756836, 0.23202702403068542, 0.21839703619480133, -0.3025096654891968, 0.23700623214244843, 0.03651268780231476, -0.008538365364074707, -0.07402601838111877, 0.47538095712661743, -0.014696042984724045, -0.03759504482150078, 0.03790438175201416, -0.488416850566864, 0.0268808975815773, 0.0403810478746891, 0.039082981646060944, 0.11506994813680649, -0.04818274453282356, 0.3321884274482727, 0.020850740373134613, 0.0614759624004364, -0.374154269695282, 0.08681341260671616, -0.24088138341903687, 0.0165862999856472, 0.11877931654453278, -0.20691123604774475, 0.1633378565311432, -0.20746465027332306, 0.1568458080291748, -0.000589330680668354, -0.09865988045930862, -0.3218470811843872, -0.3388354778289795, 0.10951858758926392, 0.21093463897705078, -0.04838487505912781, 0.01470205932855606, -0.10146266222000122, -0.13916605710983276, -0.08437834680080414, 0.16127237677574158, -0.017415732145309448, -0.06660054624080658, 0.3222784101963043, 0.06574457138776779, 0.1595868319272995, -0.23604851961135864, -0.0029606055468320847, -0.20383360981941223, 0.41149505972862244, -0.043199338018894196, 0.03083331137895584, 0.27952250838279724, 0.102145254611969, -0.35837695002555847, 0.11243589967489243, 0.2028011977672577, -0.11863788962364197, 0.26859724521636963, -0.5279077291488647, -0.04846353456377983, 0.23851481080055237, 0.3223676383495331, 0.4981517791748047, -0.22012002766132355, -0.05087222903966904, 0.0852990671992302, 0.3054766058921814, -0.4090595841407776, -0.09591974318027496, 0.08037903159856796, -0.1820557415485382, 0.16879549622535706, 0.044393546879291534, 0.2050648331642151, -0.0642973929643631, -0.18453843891620636, 0.12744441628456116, 0.32041701674461365, -0.11414210498332977, 0.1822027713060379, 0.3320300579071045, -0.021952681243419647, 0.17682263255119324, 0.21278588473796844, 0.012006029486656189, 0.08041413873434067, 0.5559011101722717, 0.1163405328989029, 0.5096237659454346, -0.000817484688013792, 0.21820582449436188, -0.2008732557296753, -0.35521697998046875, 0.0642460286617279, 0.0016939863562583923, -0.30867013335227966, 0.09232378005981445, -0.2025308459997177, 0.06010297313332558, -0.3195469379425049, -0.09218959510326385, -0.37666893005371094, 0.026596318930387497, -0.05704822763800621, -0.02308833785355091, -0.1358334869146347, -0.2216782122850418, -0.32922714948654175, 0.16398024559020996, 0.1340884268283844, 0.0012103840708732605, 0.18411779403686523, 0.08229122310876846, -0.26067280769348145, -0.36719509959220886, 0.13744120299816132, 0.15145981311798096, 0.054555896669626236, -0.4126284122467041, 0.21819756925106049, 0.07226584106683731, -0.19832229614257812, -0.018187955021858215, 0.3107129633426666, 0.3494475781917572, 0.30976927280426025, -0.1787986159324646, -0.22798413038253784, -0.05201864242553711, -0.11984274536371231, -0.1885332465171814, 0.2793012261390686, 0.4061090052127838, 0.1433488428592682, 0.19159188866615295, 0.18774442374706268, -0.31748467683792114, 0.013770203106105328, 0.15767790377140045, 0.01688937470316887, -0.29055947065353394, 0.2062949389219284, -0.07068373262882233, -0.2102525532245636, -0.15658313035964966, -0.09215762466192245, -0.26177793741226196, 0.21868929266929626, 0.18550315499305725, 0.07494817674160004, 0.2572934031486511, -0.17717266082763672, 0.09062308073043823, -0.026036739349365234, 0.561921238899231, 0.3039361834526062, -0.0515311136841774, -0.43138712644577026, -0.04698057472705841, -0.5314905047416687, 0.019759438931941986, -0.29617246985435486, -0.25308334827423096, -0.055590592324733734, 0.14391997456550598, -0.03608312830328941, 0.13191215693950653, 0.11837908625602722, -0.0341610386967659, 0.2695859372615814, 0.11208900064229965, -0.2473786175251007, 0.015421157702803612, 0.09341053664684296, 0.07430637627840042, -0.10550115257501602, -0.6078811287879944, 0.19187340140342712, -0.25154268741607666, 0.028183050453662872, -0.052684053778648376, -0.04525173455476761, 0.26280567049980164, -0.4704658091068268, 0.5863538980484009, -0.01642962172627449, 0.5952327251434326, -0.19701743125915527, 0.049988843500614166, -0.30786627531051636, -0.12366548180580139, -0.33591729402542114, -0.054053664207458496, 0.0022583408281207085, 0.42114269733428955, 0.04680129885673523, 0.002020830987021327, -0.25026190280914307, 0.1807396411895752, 0.12414930760860443, 0.05838552862405777, -0.06155727431178093, -0.0783676728606224, -0.08474528789520264, 0.05164220556616783, 0.4448331296443939, 0.10267267376184464, -0.238057479262352, 0.04866747558116913, -0.3167441487312317, -0.5541096925735474, 0.1671997755765915, -0.20786620676517487, -0.4059983491897583, -0.19747528433799744, 0.18185923993587494, -0.2947675585746765, -0.02155856415629387, -0.44848501682281494, -0.0061876773834228516, 0.3088119626045227, -0.10586999356746674, -0.31793689727783203, 0.2793038785457611, 0.19355754554271698, -0.10651249438524246, 0.08658821880817413, 0.3190275728702545, 0.02615276724100113, -0.26211005449295044, -0.1723455786705017, -0.19802090525627136 ]
https://github.com/huggingface/datasets/issues/6400
great idea IMO this could be a `trust_remote_code=True` flag like in transformers. We could also default to loading the Parquet conversion rather than executing code (for dataset repos that have both)
Safely load datasets by disabling execution of dataset loading script
### Feature request Is there a way to disable execution of dataset loading script using `load_dataset`? This is a security vulnerability that could lead to arbitrary code execution. Any suggested workarounds are welcome as well. ### Motivation This is a security vulnerability that could lead to arbitrary code execution. ### Your contribution n/a
31
Safely load datasets by disabling execution of dataset loading script ### Feature request Is there a way to disable execution of dataset loading script using `load_dataset`? This is a security vulnerability that could lead to arbitrary code execution. Any suggested workarounds are welcome as well. ### Motivation This is a security vulnerability that could lead to arbitrary code execution. ### Your contribution n/a great idea IMO this could be a `trust_remote_code=True` flag like in transformers. We could also default to loading the Parquet conversion rather than executing code (for dataset repos that have both)
[ -0.49187153577804565, 0.24664939939975739, -0.06180678680539131, 0.07278358936309814, 0.18239806592464447, -0.06257647275924683, 0.47560447454452515, -0.0017527136951684952, 0.3500739634037018, 0.19620494544506073, -0.030168278142809868, 0.48009923100471497, -0.09626144915819168, 0.5082423090934753, 0.17908765375614166, 0.237282395362854, 0.1527881920337677, -0.07979272305965424, -0.1053970605134964, 0.047808967530727386, -0.23183727264404297, -0.18346436321735382, -0.061909280717372894, 0.05092409998178482, 0.18290644884109497, -0.06088660657405853, 0.2993922233581543, 0.15432381629943848, -0.12513262033462524, -0.40165016055107117, 0.2924961447715759, 0.34588634967803955, 0.22166019678115845, 0.3622075617313385, -0.00011389749852241948, 0.1046610102057457, 0.27051547169685364, -0.040426045656204224, -0.3146436810493469, -0.11531394720077515, -0.2160554826259613, -0.2883228361606598, 0.4110688269138336, -0.27962982654571533, -0.061895422637462616, 0.04663323238492012, -0.14438104629516602, -0.7425683736801147, 0.5168527364730835, 0.039908815175294876, 0.12219953536987305, 0.36733269691467285, -0.3476298451423645, 0.3811039328575134, 0.05425487458705902, 0.22162847220897675, -0.15238937735557556, 0.1294013112783432, 0.45416060090065, -0.07228504121303558, -0.24847683310508728, 0.009177472442388535, -0.22470565140247345, -0.4765123724937439, 0.277894526720047, -0.15117812156677246, 0.10880761593580246, -0.5731934309005737, 0.07432792335748672, 0.05590703338384628, 0.6475131511688232, -0.3346981406211853, -0.24168995022773743, -0.126002237200737, -0.04680928587913513, -0.14272373914718628, 0.22124043107032776, 0.3751091957092285, -0.10258910059928894, 0.23221634328365326, -0.5511051416397095, -0.2946808934211731, -0.14262254536151886, -0.17750664055347443, 0.04286196082830429, 0.012095924466848373, 0.02618870511651039, 0.1777116060256958, -0.06322991102933884, -0.18098661303520203, 0.22609944641590118, -0.06716984510421753, -0.11947858333587646, 0.1021517664194107, -0.204960897564888, -0.22782452404499054, -0.24712435901165009, 0.14004603028297424, 0.4417479634284973, 0.5563259124755859, -0.06025232747197151, 0.18066094815731049, 0.057973094284534454, -0.011743813753128052, 0.46675190329551697, -0.12546585500240326, 0.03925611078739166, 0.16695022583007812, 0.24008060991764069, 0.32497352361679077, 0.1467607468366623, 0.2689237594604492, 0.044125985354185104, -0.11081533133983612, 0.2162233144044876, 0.1628952920436859, 0.3480573296546936, -0.3728819489479065, -0.16615304350852966, 0.10313783586025238, 0.13084068894386292, -0.0712001770734787, -0.15563692152500153, 0.38403746485710144, 0.49136802554130554, -0.03202628344297409, 0.10695429146289825, 0.17100276052951813, -0.1833418309688568, -0.6133285760879517, -0.06783744692802429, -0.06954808533191681, -0.1253565400838852, 0.04242410510778427, 0.17285022139549255, 0.09880940616130829, -0.2222948968410492, 0.26926547288894653, -0.01758095994591713, -0.12985076010227203, 0.07990031689405441, -0.06213170289993286, -0.056865986436605453, 0.24840417504310608, -0.1292480081319809, -0.3817722797393799, 0.03581568971276283, -0.014176920056343079, -0.15545250475406647, 0.5639348030090332, -0.17105969786643982, -0.09780923277139664, 0.11248274147510529, 0.09975773841142654, -0.381024032831192, -0.019219432026147842, -0.8360629677772522, 0.24277344346046448, -0.035898417234420776, 0.022597260773181915, 0.2310226857662201, -0.01655595190823078, -0.2081042230129242, -0.28453347086906433, 0.14037418365478516, 0.9467047452926636, -0.29406625032424927, -0.012743689119815826, 0.2947399318218231, -0.5522660613059998, 0.1302153617143631, 0.07233132421970367, -0.4676564037799835, 0.09944228827953339, -0.17070245742797852, -0.25337153673171997, 0.35263383388519287, -0.09895794093608856, -0.15769317746162415, 0.5773282051086426, -0.36440637707710266, 0.3211384415626526, -0.008543580770492554, 0.02923634648323059, 0.26229703426361084, -0.36813318729400635, -0.14055538177490234, 0.4512825906276703, 0.18153628706932068, 0.2792305648326874, -0.05572083219885826, -0.5350635051727295, 0.37339311838150024, 0.07584105432033539, -0.059090275317430496, 0.2430904507637024, 0.33087050914764404, -0.09881055355072021, 0.2371300309896469, -0.1431984007358551, -0.09417130053043365, 0.12694399058818817, -0.05712380260229111, 0.0669838935136795, -0.06047382578253746, 0.01162721961736679, -0.8628801107406616, 0.22662600874900818, 0.045241579413414, -0.07845970243215561, -0.26975303888320923, -0.18744677305221558, 0.17861847579479218, 0.28759515285491943, -0.21455445885658264, 0.06850592792034149, 0.031050369143486023, -0.15760689973831177, -0.2393144965171814, -0.03499486297369003, -0.36972543597221375, 0.4308406114578247, -0.12576812505722046, 0.2814355790615082, -0.2012905776500702, 0.3437817096710205, 0.25200408697128296, 0.13125646114349365, 0.0668189749121666, -0.08641862869262695, 0.20322422683238983, -0.2508912682533264, -0.09108951687812805, 0.5307345986366272, 0.33901500701904297, 0.39996153116226196, 0.06022438406944275, 0.21950630843639374, 0.06608681380748749, -0.17336279153823853, 0.22045327723026276, -0.028806090354919434, 0.06337262690067291, 0.23382286727428436, -0.14923638105392456, 0.3816569447517395, -0.3954049050807953, 0.1363520324230194, -0.048343200236558914, -0.2146134078502655, 0.17510588467121124, -0.15103518962860107, -0.2509647011756897, -0.11408025771379471, 0.09229002892971039, 0.2590850591659546, 0.013085506856441498, 0.21085095405578613, -0.22815728187561035, -0.2292480170726776, -0.08757679164409637, -0.29909005761146545, -0.017158623784780502, -0.01598302647471428, 0.28592416644096375, -0.03453060984611511, -0.041645266115665436, 0.287597119808197, 0.26535794138908386, 0.2146492302417755, -0.0735245943069458, 0.15131567418575287, 0.05916738510131836, -0.04840315133333206, 0.20601508021354675, 0.14549520611763, 0.21780183911323547, -0.0022133318707346916, 0.1504567712545395, 0.024104207754135132, -0.254216730594635, -0.055672358721494675, 0.19123965501785278, -0.17637032270431519, -0.4964207112789154, 0.3399406373500824, -0.28444427251815796, -0.033848442137241364, -0.14927493035793304, 0.42902761697769165, -0.23230929672718048, 0.04420768469572067, -0.09391191601753235, -0.02237570844590664, -0.1932687759399414, 0.05288749933242798, -0.49334630370140076, 0.4095817804336548, -0.21494553983211517, -0.4290795624256134, -0.10769962519407272, -0.025133566930890083, -0.04663769528269768, -0.03974725678563118, 0.30407238006591797, -0.029000254347920418, 0.46906277537345886, 0.05255051702260971, -0.1705082207918167, -0.4035627245903015, -0.11689084768295288, 0.14882183074951172, 0.0013169674202799797, 0.029655056074261665, -0.11857949942350388, 0.0632627010345459, 0.1133413091301918, -0.06347078830003738, -0.21117080748081207, -0.02187676727771759, 0.019990943372249603, -0.04414285346865654, 0.20116743445396423, 0.03973386436700821, -0.27345505356788635, -0.20406700670719147, -0.2333301603794098, -0.17828860878944397, 0.1224031150341034, 0.03511812537908554, 0.01315813697874546, -0.18860949575901031, -0.15733876824378967, -0.19887080788612366, 0.04200518876314163, 0.05181960016489029, -0.1553492248058319, -0.4100865423679352, 0.19585928320884705, -0.11516114324331284, -0.2324611246585846, 0.1562785506248474, 0.19761916995048523, -0.11937656998634338, 0.517648458480835, -0.5221997499465942, 0.11222708225250244, 0.021936943754553795, -0.09193973988294601, -0.28786033391952515, -0.15550822019577026, 0.15593774616718292, 0.05998486652970314, 0.10705067217350006, 0.037051014602184296, -0.12498447299003601, 0.1309981495141983, -0.36113283038139343, -0.01670914888381958, 0.3289968967437744, 0.6692327857017517, -0.1024148240685463, 0.3826378881931305, -0.23945100605487823, -0.14944593608379364, 0.2311246246099472, -0.12011522054672241, 0.3783200979232788, 0.03710925206542015, 0.006317995488643646, -0.1414976567029953, -0.022699609398841858, -0.2905882000923157, 0.03069830872118473, -0.3874530792236328, -0.15324263274669647, -0.25989121198654175, -0.29914191365242004, 0.09534254670143127, -0.33701562881469727, 0.05531046539545059, -0.2880622148513794, 0.22880403697490692, 0.09903205931186676, 0.2878498435020447, 0.01601278781890869, -0.04119396209716797, 0.17106696963310242, 0.22118821740150452, 0.4823034107685089, 0.036995116621255875, -0.16526296734809875, 0.2880559265613556, -0.24240083992481232, 0.24544590711593628, -0.24067112803459167, 0.24162781238555908, -0.03822190314531326, -0.09379807859659195, 0.1936814785003662, -0.08317200839519501, 0.6118956208229065, -0.11508367210626602, 0.4943896532058716, -0.016961660236120224, -0.2822904586791992, -0.13315953314304352, -0.2146339863538742, -0.13713040947914124, 0.037603773176670074, -0.12796181440353394, 0.40343767404556274, -0.29661545157432556, -0.12660957872867584, 0.04270768165588379, 0.16629786789417267, -0.1878323256969452, -0.22962135076522827, -0.29966670274734497, 0.1736968457698822, -0.5374734401702881, 0.1696094125509262, 0.09639305621385574, -0.18487396836280823, -0.5567563772201538, 0.0015273317694664001, -0.2068500816822052, 0.24051697552204132, 0.03084183856844902, 0.07798942923545837, 0.16363798081874847, -0.010474864393472672, 0.01569678634405136, 0.08368876576423645, 0.21147404611110687, 0.2723759710788727, 0.6023918986320496, 0.09826713800430298, -0.6649890542030334, -0.04732254892587662, 0.03258272260427475, 0.3059276342391968, 0.39161211252212524, 0.01223263144493103, -0.25770169496536255, 0.04861189424991608, -0.007386207580566406, -0.29592275619506836, -0.13185083866119385, -0.0028109177947044373, -0.2942955493927002, -0.415740430355072, -0.3382965326309204, 0.41895630955696106, -0.04953939467668533, -0.17681828141212463, -0.1596655696630478, 0.2903515100479126, -0.42576900124549866, 0.43930861353874207, 0.4571048319339752, 0.8355444669723511, -0.3198535740375519, -0.012625457718968391, 0.09155509620904922, -0.12594673037528992, 0.47043517231941223, -0.6522903442382812, -0.17128168046474457, -0.27533525228500366, -0.1815495491027832, -0.1746729016304016, -0.32029035687446594, 0.111604705452919, 0.23457805812358856, 0.006507642567157745, 0.32095906138420105, -0.2709618806838989, 0.1238432377576828, 0.023688849061727524, 0.3295438289642334, 0.23667757213115692, -0.3040276765823364, -0.10071726888418198, 0.06701222062110901, -0.20570939779281616, -0.06701777875423431, -0.11056575179100037, -0.12013013660907745, 0.3179931044578552, -0.1072329431772232, -0.12151353061199188, 0.44756561517715454, -0.16043540835380554, 0.18272656202316284, -0.22938016057014465, -0.07287057489156723, 0.5885844230651855, 0.22260233759880066, 0.23164744675159454, 0.2649827301502228, -0.10579592734575272, 0.07649306952953339, 0.1527613401412964, 0.11534607410430908, -0.25675326585769653, 0.1251201033592224, -0.012166915461421013, 0.04754449427127838, -0.1344756782054901, -0.033040426671504974, 0.006136465817689896, -0.23434343934059143, 0.17375335097312927, 0.0042256806045770645, 0.358759343624115, -0.45836901664733887, 0.014416307210922241, -0.03457482159137726, 0.4522947669029236, 0.13313992321491241, 0.04003316909074783, 0.06042318418622017, 0.04986478388309479, -0.11312557756900787, 0.037293531000614166, -0.4496771991252899, -0.07212675362825394, 0.2984311580657959, 0.10976741462945938, -0.2682678699493408, 0.3994145095348358, 0.1313466727733612, -0.16853180527687073, -0.3294350504875183, 0.013915732502937317, 0.3999852240085602, -0.35578739643096924, 0.03871205449104309, 0.01682281121611595, 0.11634960770606995, -0.08532895147800446, 0.01161099411547184, -0.20683567225933075, -0.13655665516853333, 0.0363733172416687, -0.23065942525863647, -0.17461267113685608, 0.2252354472875595, -0.22019146382808685, 0.05860908702015877, 0.34600043296813965, -0.08362877368927002, -0.1487206071615219, -0.17939627170562744, -0.2550901472568512, 0.00926465168595314, -0.0639551505446434, -0.06770853698253632, 0.44930997490882874, 0.38126587867736816, -0.16496358811855316, 0.06786106526851654, 0.009897127747535706, 0.009587651118636131, -0.04163186624646187, -0.13589636981487274, 0.02799084037542343, 0.1459171622991562, -0.19472265243530273, 0.011719495058059692, -0.3131633400917053, -0.40270131826400757, -0.014531991444528103, -0.08352994918823242, 0.3607841730117798, 0.1584913581609726, 0.06868955492973328, -0.135133758187294, 0.26649075746536255, 0.1962597519159317, -0.33061882853507996, 0.013816531747579575, -0.020838577300310135, 0.11395856738090515, -0.10821156203746796, 0.2312682867050171, -0.07059204578399658, -0.11301351338624954, -0.22383242845535278, 0.2818892002105713, 0.5976319909095764, 0.5097261667251587, 0.06735217571258545, -0.09716124087572098, -0.05690182372927666, 0.08301565051078796, -0.1308383047580719, 0.436183363199234, -0.5245370864868164, -0.38799893856048584, 0.09619180858135223, 0.09204237908124924, -0.050824124366045, -0.1496981829404831, 0.2542535960674286, -0.07061515748500824, -0.19418343901634216, 0.3881824016571045, 0.20978276431560516, 0.1434371918439865, -0.09105229377746582, 0.12010809779167175, 0.5951061248779297, -0.05375944450497627, 0.2742277681827545, 0.3691398501396179, -0.041638974100351334, -0.04773581027984619, -0.030317731201648712, 0.3832107484340668, 0.18828624486923218, 0.20319189131259918, -0.04279159754514694, 0.3219485580921173, 0.34593290090560913, 0.28626275062561035, 0.08137474954128265, -0.4299355447292328, 0.06503679603338242, 0.26062726974487305, -0.08206497132778168, -0.035359736531972885, 0.3624783158302307, -0.2431076467037201, 0.4443477988243103, -0.11080998182296753, -0.3868531286716461, 0.30504217743873596, -0.10596243292093277, 0.021916888654232025, -0.00609181821346283, -0.0705103874206543, -0.06744877994060516, 0.13530144095420837, -0.15751300752162933, -0.16721194982528687, -0.07412318885326385, 0.17215324938297272, 0.1872349977493286, 0.06882449984550476, 0.176160991191864, 0.12117062509059906, 0.011587023735046387, -0.1332387924194336, -0.005879727192223072, 0.1408461332321167, 0.015292730182409286, 0.4360724091529846, -0.09216777980327606, 0.1901378482580185, 0.13803064823150635, 0.14665715396404266, 0.0362250953912735, 0.08317876607179642, 0.07092836499214172, -0.08607389777898788, 0.24449914693832397, -0.25229957699775696, 0.29341354966163635, 0.3581673502922058, 0.04934507608413696, 0.06582634150981903, -0.3124757409095764, 0.4236842393875122, 0.15400466322898865, -0.17252768576145172, 0.22159408032894135, 0.3043193221092224, 0.06018917262554169, -0.18763145804405212, 0.01253211498260498, -0.10001735389232635, -0.30147358775138855, 0.20974844694137573, 0.22295014560222626, 0.011407241225242615, 0.11501912772655487, 0.050166014581918716, 0.012123331427574158, 0.4016043543815613, 0.15275947749614716, -0.11236049234867096, -0.27873221039772034, -0.020149454474449158, -0.6762389540672302, 0.11853611469268799, 0.15814203023910522, -0.35275840759277344, 0.22835111618041992, -0.02424481511116028, 0.27006474137306213, 0.39729174971580505, -0.17544104158878326, 0.008333295583724976, 0.05863587185740471, 0.14881108701229095, -0.04864157363772392, -0.09304801374673843, -0.044260334223508835, 0.23365531861782074, -0.28177347779273987, -0.14900952577590942, 0.2783867418766022, -0.05992475524544716, -0.07684169709682465, 0.20692989230155945, -0.053109850734472275, -0.1032831072807312, -0.18023717403411865, 0.45070892572402954, 0.04084906727075577, 0.38893064856529236, -0.008009500801563263, 0.05385446548461914, -0.21749678254127502, -0.04672307148575783, -0.19318924844264984, 0.3416811227798462, -0.04048110544681549, -0.24670515954494476, -0.19368916749954224, 0.22646817564964294, -0.19000723958015442, -0.2917223572731018, -0.19443485140800476, 0.25108131766319275, -0.31029194593429565, -0.10997442156076431, 0.19053441286087036, 0.13244538009166718, -0.08813953399658203, -0.04490916430950165, 0.11631041765213013, 0.3562941551208496, -0.0006615370512008667, 0.05848168581724167, 0.5049851536750793, -0.37874770164489746, -0.2625204920768738, -0.24975654482841492, 0.36746880412101746, 0.002265116199851036, -0.24366962909698486, -0.306984007358551, 0.38999661803245544, 0.05935301631689072, -0.3724747896194458, -0.20995858311653137, 0.3871709704399109, -0.2999088764190674, 0.1416293978691101, -0.1793612539768219, -0.00011290609836578369, -0.03908754140138626, 0.10701696574687958, -0.26058658957481384, -0.1428244411945343 ]
https://github.com/huggingface/datasets/issues/6400
We added the `trust_remote_code` argument to `load_dataset()` in `datasets` 2.16: - in the future users will have to pass trust_remote_code=True to use datasets with a script - for now we just show a warning when a dataset script is used - we fallback on the Hugging Face Parquet exports when possible (to keep compatibility with old datasets with scripts) So feel free to use `trust_remote_code=False` in the meantime to disable loading from dataset loading scripts :)
Safely load datasets by disabling execution of dataset loading script
### Feature request Is there a way to disable execution of dataset loading script using `load_dataset`? This is a security vulnerability that could lead to arbitrary code execution. Any suggested workarounds are welcome as well. ### Motivation This is a security vulnerability that could lead to arbitrary code execution. ### Your contribution n/a
76
Safely load datasets by disabling execution of dataset loading script ### Feature request Is there a way to disable execution of dataset loading script using `load_dataset`? This is a security vulnerability that could lead to arbitrary code execution. Any suggested workarounds are welcome as well. ### Motivation This is a security vulnerability that could lead to arbitrary code execution. ### Your contribution n/a We added the `trust_remote_code` argument to `load_dataset()` in `datasets` 2.16: - in the future users will have to pass trust_remote_code=True to use datasets with a script - for now we just show a warning when a dataset script is used - we fallback on the Hugging Face Parquet exports when possible (to keep compatibility with old datasets with scripts) So feel free to use `trust_remote_code=False` in the meantime to disable loading from dataset loading scripts :)
[ -0.5202223062515259, 0.20792506635189056, -0.08936712890863419, 0.15276484191417694, 0.1941721886396408, -0.030967362225055695, 0.40098804235458374, 0.023934371769428253, 0.5325300097465515, 0.2042616307735443, -0.026901861652731895, 0.5292146801948547, -0.20548397302627563, 0.3552504777908325, 0.278689444065094, 0.31736618280410767, 0.10019397735595703, -0.1879139244556427, -0.20041945576667786, 0.10976512730121613, -0.26916933059692383, -0.16540727019309998, -0.135076105594635, 0.12534330785274506, 0.19672222435474396, -0.0789562240242958, 0.2981858551502228, 0.2209528386592865, -0.05720420926809311, -0.5459352135658264, 0.27650442719459534, 0.31932249665260315, 0.20067085325717926, 0.2159017026424408, -0.00010746714542619884, -0.005503758788108826, 0.29307109117507935, -0.007505644112825394, -0.2284075915813446, -0.12052980065345764, -0.26296815276145935, -0.3169952630996704, 0.3407694101333618, -0.25245311856269836, -0.03697475045919418, -0.045820266008377075, -0.08324943482875824, -0.9344260692596436, 0.3562166392803192, 0.06134933978319168, 0.1849903166294098, 0.3458760380744934, -0.19133278727531433, 0.29514867067337036, 0.07389180362224579, 0.133233904838562, -0.07973212003707886, 0.0570332370698452, 0.20225369930267334, -0.17478914558887482, -0.25769010186195374, 0.06779573112726212, -0.24059264361858368, -0.4096108376979828, 0.3413298726081848, -0.11839640885591507, -0.09536926448345184, -0.5952450037002563, 0.07350125163793564, 0.1472233235836029, 0.6803090572357178, -0.3817785382270813, -0.2842656075954437, -0.15513300895690918, -0.022349689155817032, -0.04803789407014847, 0.2388647347688675, 0.2771441340446472, 0.0670594573020935, 0.17919780313968658, -0.3396398425102234, -0.28098228573799133, -0.13432849943637848, -0.1987006962299347, 0.15151041746139526, -0.16380226612091064, -0.012503614649176598, 0.22947213053703308, 0.028749888762831688, -0.26980456709861755, 0.18921025097370148, -0.0935162827372551, -0.1741219460964203, 0.21573558449745178, -0.2716754376888275, -0.09622696787118912, -0.069903165102005, 0.2227417677640915, 0.5029817819595337, 0.4299018979072571, -0.05216822028160095, 0.12659963965415955, -0.011978436261415482, 0.0018569929525256157, 0.42156606912612915, -0.12108996510505676, 0.1715211570262909, 0.04890821874141693, 0.24507853388786316, 0.34114617109298706, 0.23265251517295837, 0.19239792227745056, 0.07139334082603455, -0.26101675629615784, 0.1723775714635849, 0.13566313683986664, 0.3526461124420166, -0.30513960123062134, -0.27686938643455505, 0.12478369474411011, 0.26969271898269653, -0.11239563673734665, -0.10466866195201874, 0.4054117798805237, 0.3377705216407776, -0.16659408807754517, 0.09626346826553345, 0.05006840452551842, -0.18255361914634705, -0.5757497549057007, -0.12164925038814545, 0.024147730320692062, -0.07800278812646866, 0.107268325984478, 0.1429305225610733, -0.06399618089199066, -0.1635322868824005, 0.3106357455253601, -0.16036802530288696, -0.04872303456068039, -0.00006730109453201294, -0.12906381487846375, 0.05823986232280731, 0.19192500412464142, -0.08167192339897156, -0.33714836835861206, 0.009836253710091114, 0.01476985216140747, -0.13130950927734375, 0.4931454062461853, -0.2028902918100357, -0.11526017636060715, 0.05214039236307144, 0.17712771892547607, -0.4027026891708374, 0.015057068318128586, -0.7132959365844727, 0.17935600876808167, -0.07918144762516022, 0.03216792643070221, 0.24902445077896118, -0.0260270144790411, -0.2749142050743103, -0.3174363374710083, 0.27983561158180237, 0.9034202694892883, -0.3668210506439209, 0.12080653011798859, 0.12185636162757874, -0.5791352987289429, -0.025464236736297607, 0.07082714140415192, -0.40022706985473633, 0.17133669555187225, -0.19386225938796997, -0.2322278618812561, 0.17664696276187897, -0.126960888504982, -0.045709576457738876, 0.4156356751918793, -0.30096790194511414, 0.36620545387268066, -0.11650766432285309, 0.00857660174369812, 0.23559780418872833, -0.2935501039028168, -0.11660993844270706, 0.3756875991821289, 0.20182254910469055, 0.18548470735549927, -0.013987302780151367, -0.4675314426422119, 0.4734286069869995, 0.07777383923530579, -0.13783395290374756, 0.10648822784423828, 0.4119146168231964, -0.19178801774978638, 0.26590555906295776, -0.1625446081161499, -0.07740938663482666, 0.10681179165840149, 0.08928943425416946, 0.10049363970756531, -0.09265027940273285, 0.0007552877068519592, -0.9057365655899048, 0.24384760856628418, 0.14449886977672577, -0.165985107421875, -0.19217586517333984, -0.22048650681972504, 0.3383624255657196, 0.2892155647277832, -0.1839882731437683, 0.06412214040756226, 0.06414468586444855, -0.16579830646514893, -0.20090362429618835, 0.04692423343658447, -0.4283237159252167, 0.4593932628631592, -0.23477526009082794, 0.20484672486782074, -0.3353221118450165, 0.10280764847993851, 0.23698753118515015, 0.12596432864665985, 0.13246233761310577, -0.06051864102482796, 0.14849328994750977, -0.21428850293159485, -0.007153147831559181, 0.5940859913825989, 0.35588234663009644, 0.37942060828208923, -0.0001250188797712326, 0.10224531590938568, -0.00283038429915905, -0.27335163950920105, 0.1452440321445465, -0.04628582298755646, 0.08273253589868546, 0.18005651235580444, -0.07368522882461548, 0.4602303206920624, -0.38438233733177185, 0.14896315336227417, -0.06508421897888184, -0.26902270317077637, 0.06435034424066544, -0.12320912629365921, -0.23840725421905518, -0.09804459661245346, 0.07119175791740417, 0.10380098223686218, 0.12806472182273865, 0.11509440094232559, -0.2805546522140503, -0.13191355764865875, -0.03246578201651573, -0.11900182068347931, 0.03953245282173157, 0.020999938249588013, 0.4023773670196533, -0.06098137050867081, 0.042323000729084015, 0.18629413843154907, 0.2861766219139099, 0.23095698654651642, -0.07132028043270111, 0.14493390917778015, 0.04882077872753143, -0.036664143204689026, 0.35289448499679565, 0.055227942764759064, 0.10768857598304749, 0.0402945876121521, 0.03359144553542137, 0.037754930555820465, -0.2531784772872925, -0.017208673059940338, 0.04132787883281708, -0.14449802041053772, -0.6177035570144653, 0.22886040806770325, -0.33354073762893677, -0.026633858680725098, -0.03388096019625664, 0.4219414293766022, -0.2371424287557602, 0.1083092913031578, -0.18757040798664093, -0.023799508810043335, -0.261368066072464, 0.06061054766178131, -0.5463238954544067, 0.4001767039299011, -0.24954204261302948, -0.19835269451141357, -0.1223754957318306, -0.022098947316408157, -0.003660490270704031, 0.019900958985090256, 0.3032914400100708, -0.07697515189647675, 0.4542948305606842, 0.11959406733512878, -0.1097797304391861, -0.47400546073913574, -0.11037449538707733, 0.002209629863500595, -0.04071211442351341, 0.11674623936414719, 0.04417458176612854, 0.026338545605540276, 0.13088597357273102, -0.15565930306911469, -0.21934178471565247, -0.11975428462028503, 0.05899253487586975, -0.1851438581943512, 0.043344754725694656, 0.025344807654619217, -0.3216181993484497, -0.32354164123535156, -0.21613994240760803, -0.20408974587917328, 0.15819543600082397, -0.1154656857252121, 0.03428950533270836, -0.04248972237110138, -0.14403969049453735, -0.06143520399928093, -0.062123123556375504, 0.019032061100006104, -0.17527323961257935, -0.5415332913398743, 0.19423413276672363, -0.21320877969264984, -0.3309890031814575, 0.19507931172847748, 0.20545119047164917, -0.062343429774045944, 0.33182716369628906, -0.47763797640800476, 0.23708558082580566, 0.014857513830065727, -0.016778677701950073, -0.3290412425994873, -0.0831008031964302, -0.015758655965328217, 0.09166666865348816, 0.06990277767181396, -0.016929559409618378, -0.16669365763664246, 0.143861323595047, -0.4410419166088104, 0.044975169003009796, 0.26964521408081055, 0.61699378490448, -0.04704183712601662, 0.17543219029903412, -0.11644043773412704, -0.13097554445266724, 0.3023993670940399, -0.11529286205768585, 0.5058565735816956, 0.0009880512952804565, -0.09773801267147064, -0.06118713319301605, 0.0986677035689354, -0.19778108596801758, 0.058614131063222885, -0.4140133261680603, -0.03799397498369217, -0.1870274543762207, -0.19178470969200134, 0.10575142502784729, -0.23101893067359924, 0.05631454288959503, -0.19122442603111267, 0.21396923065185547, 0.09486031532287598, 0.17370042204856873, -0.0036452189087867737, -0.16341392695903778, 0.09349408745765686, 0.16812926530838013, 0.6583607196807861, 0.01830720156431198, -0.26550382375717163, 0.24671116471290588, -0.24637189507484436, 0.2597167193889618, -0.22638928890228271, 0.24904511868953705, -0.08577889204025269, -0.06580345332622528, 0.09550786018371582, -0.02142993174493313, 0.5324965119361877, -0.1637226641178131, 0.4470674395561218, -0.0047454312443733215, -0.16214126348495483, -0.312436580657959, -0.1538633406162262, -0.025408126413822174, 0.0723201110959053, -0.17285235226154327, 0.27556324005126953, -0.20539069175720215, -0.16133667528629303, 0.06502071022987366, 0.16799888014793396, -0.1476285457611084, -0.3112415671348572, -0.24526347219944, 0.06053417921066284, -0.37891072034835815, 0.16533003747463226, 0.00931481271982193, -0.03344950079917908, -0.5616258382797241, -0.03967157006263733, -0.12221402674913406, 0.23538589477539062, 0.039440423250198364, 0.06353895366191864, 0.2468850463628769, 0.035254500806331635, 0.176139235496521, 0.21461080014705658, 0.11571459472179413, 0.36299335956573486, 0.5311004519462585, -0.03070678375661373, -0.5163487195968628, -0.1495024561882019, 0.03302677348256111, 0.322659969329834, 0.2746356725692749, -0.07940294593572617, -0.10299518704414368, 0.0019517801702022552, -0.0382583849132061, -0.29851824045181274, -0.20694425702095032, 0.037188820540905, -0.2635575532913208, -0.34535151720046997, -0.3541443347930908, 0.33994144201278687, -0.0673493817448616, -0.18550299108028412, 0.0945395827293396, 0.2209145724773407, -0.5094093084335327, 0.2675539255142212, 0.4743749499320984, 0.7028599381446838, -0.165435329079628, -0.12304213643074036, 0.0941910445690155, 0.019429825246334076, 0.4049808979034424, -0.40071383118629456, -0.2730499804019928, -0.37992191314697266, -0.21498310565948486, -0.07543151080608368, -0.2564390301704407, 0.23856255412101746, 0.2274882197380066, 0.05324484407901764, 0.3306325376033783, -0.28048640489578247, 0.1343075931072235, -0.08263204246759415, 0.49409255385398865, 0.19121573865413666, -0.27815282344818115, -0.023437626659870148, 0.11565324664115906, -0.18581251800060272, -0.15196901559829712, -0.13438627123832703, -0.08489222824573517, 0.4929562509059906, -0.1480902135372162, -0.12326785922050476, 0.41792336106300354, -0.26368892192840576, 0.18513868749141693, -0.22145068645477295, -0.006498247385025024, 0.5920450687408447, 0.37707623839378357, 0.20200411975383759, 0.20612823963165283, -0.046198729425668716, 0.045843303203582764, 0.06437353789806366, 0.161150723695755, -0.294582724571228, 0.17154927551746368, -0.02521081641316414, 0.0389653742313385, -0.22519153356552124, -0.04772082716226578, -0.005956243723630905, -0.21748271584510803, 0.17727190256118774, 0.08775164186954498, 0.22363637387752533, -0.30469831824302673, -0.10936642438173294, -0.038444142788648605, 0.4659261703491211, 0.1367998868227005, 0.09079007059335709, 0.16315051913261414, 0.11222179979085922, 0.04748375713825226, 0.038237277418375015, -0.44278526306152344, -0.06741465628147125, 0.32775023579597473, -0.10793437063694, -0.06572334468364716, 0.27831828594207764, 0.19224758446216583, -0.22350075840950012, -0.3560600280761719, 0.11818739771842957, 0.42000579833984375, -0.1727691888809204, -0.0569922998547554, 0.11676909029483795, 0.31131044030189514, -0.11544902622699738, -0.04467765614390373, -0.20692075788974762, -0.15886759757995605, 0.09005271643400192, -0.2253028154373169, -0.13024649024009705, 0.2812580168247223, -0.17984476685523987, 0.029838189482688904, 0.31410640478134155, -0.23307488858699799, -0.09646421670913696, -0.10604611784219742, -0.3068969249725342, 0.09132194519042969, 0.13525694608688354, -0.09156724065542221, 0.4411533772945404, 0.4191039204597473, -0.024689681828022003, -0.03860251605510712, 0.05052531510591507, -0.04642634093761444, -0.06395207345485687, -0.18741700053215027, -0.05800240486860275, 0.10331860184669495, -0.2090480625629425, 0.0024590790271759033, -0.27090883255004883, -0.5653679370880127, -0.03083152510225773, -0.08058483153581619, 0.39571425318717957, 0.2205377221107483, 0.05216304957866669, 0.005693398416042328, 0.08833687007427216, 0.1878190040588379, -0.2564246356487274, 0.10482833534479141, -0.0502484105527401, 0.07062745839357376, -0.04389610141515732, 0.2067583203315735, -0.16310951113700867, -0.20800471305847168, -0.12129853665828705, 0.24161335825920105, 0.43662863969802856, 0.4442846477031708, -0.053812071681022644, -0.009077075868844986, -0.14851856231689453, 0.05567978695034981, -0.04293181002140045, 0.4161313474178314, -0.4986477792263031, -0.32304468750953674, 0.038257479667663574, 0.12362058460712433, -0.06748145073652267, -0.16776379942893982, 0.06660161167383194, 0.08263550698757172, -0.1827923059463501, 0.23396392166614532, 0.1944127380847931, 0.019500330090522766, -0.08707351982593536, 0.09630896151065826, 0.6289375424385071, -0.12676700949668884, 0.26362836360931396, 0.24089378118515015, -0.18868336081504822, -0.04702305048704147, 0.005155965685844421, 0.31436067819595337, 0.1869480311870575, 0.30311378836631775, -0.09326183795928955, 0.37947967648506165, 0.3992677927017212, 0.3120271563529968, 0.08776401728391647, -0.5922938585281372, 0.13505613803863525, 0.29047757387161255, -0.15807366371154785, -0.12477760016918182, 0.30153605341911316, -0.0776410773396492, 0.3575642704963684, -0.10949176549911499, -0.20459699630737305, 0.22935055196285248, -0.09338472783565521, -0.010856389999389648, -0.016665682196617126, -0.09915439784526825, 0.09815336018800735, 0.12757587432861328, -0.12699556350708008, -0.2109324038028717, 0.08096058666706085, 0.12908567488193512, 0.13353084027767181, -0.007351672276854515, 0.1511339247226715, 0.17711934447288513, 0.019572559744119644, -0.08522520959377289, 0.03510907292366028, 0.18187227845191956, 0.021898899227380753, 0.4124434292316437, 0.057077981531620026, 0.20615074038505554, 0.1117430329322815, 0.20815131068229675, 0.11939647048711777, -0.01992596685886383, 0.08634671568870544, -0.07602189481258392, 0.2678622603416443, -0.31943854689598083, 0.11864523589611053, 0.34950944781303406, 0.11602596938610077, 0.05251040309667587, -0.24857653677463531, 0.45942938327789307, 0.22538340091705322, -0.11773736029863358, 0.1584785431623459, 0.2857111990451813, 0.11547867953777313, -0.12543885409832, 0.06806206703186035, 0.038137808442115784, -0.24451583623886108, 0.44947806000709534, 0.25748908519744873, 0.011844098567962646, -0.03198857605457306, 0.09131474792957306, 0.04848816990852356, 0.431864857673645, 0.12921197712421417, -0.10093269497156143, -0.20282703638076782, -0.04046759009361267, -0.7960142493247986, 0.12878075242042542, 0.10614077746868134, -0.12742385268211365, 0.20170827209949493, -0.0065353065729141235, 0.09961250424385071, 0.2655634582042694, -0.03535415232181549, 0.018034324049949646, 0.06727322936058044, 0.03029504045844078, -0.10479816794395447, -0.030494067817926407, -0.103206567466259, 0.2421906292438507, -0.268084317445755, -0.13093920052051544, 0.36698058247566223, -0.1698213666677475, -0.06344344466924667, 0.05212048441171646, 0.15355907380580902, -0.076972596347332, -0.12823832035064697, 0.6123619079589844, -0.007924935780465603, 0.41431117057800293, -0.08830370008945465, 0.09118159115314484, -0.31562286615371704, -0.031289659440517426, -0.13704843819141388, 0.48631685972213745, 0.0764852836728096, -0.20474934577941895, -0.166709303855896, -0.08535541594028473, -0.1691824197769165, -0.051516156643629074, -0.22211767733097076, 0.30416834354400635, -0.3718404471874237, -0.03054608218371868, 0.25850561261177063, 0.07883987575769424, -0.2023409605026245, -0.05407380312681198, 0.0391404926776886, 0.31925997138023376, -0.01569630205631256, -0.020944617688655853, 0.5182080268859863, -0.3755474090576172, -0.13393481075763702, -0.16633227467536926, 0.4346025586128235, 0.05875825881958008, -0.3996069133281708, -0.387940913438797, 0.3452203571796417, 0.1764996498823166, -0.3487634062767029, -0.1880526840686798, 0.33905187249183655, -0.3739897608757019, 0.2613365352153778, -0.12894366681575775, 0.03776423633098602, -0.02569401264190674, 0.012540765106678009, -0.0972275510430336, -0.21473565697669983 ]
https://github.com/huggingface/datasets/issues/6396
https://github.com/huggingface/datasets-server/pull/2089#pullrequestreview-1724449532 > Yes, I understand now: they have disabled their `PyExtensionType` and we use it in `datasets` for arrays...
Issue with pyarrow 14.0.1
See https://github.com/huggingface/datasets-server/pull/2089 for reference ``` from datasets import (Array2D, Dataset, Features) feature_type = Array2D(shape=(2, 2), dtype="float32") content = [[0.0, 0.0], [0.0, 0.0]] features = Features({"col": feature_type}) dataset = Dataset.from_dict({"col": [content]}, features=features) ``` generates ``` /home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py:648: FutureWarning: pyarrow.PyExtensionType is deprecated and will refuse deserialization by default. Instead, please derive from pyarrow.ExtensionType and implement your own serialization mechanism. pa.PyExtensionType.__init__(self, self.storage_dtype) /home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py:1661: RuntimeWarning: pickle-based deserialization of pyarrow.PyExtensionType subclasses is disabled by default; if you only ingest trusted data files, you may re-enable this using `pyarrow.PyExtensionType.set_auto_load(True)`. In the future, Python-defined extension subclasses should derive from pyarrow.ExtensionType (not pyarrow.PyExtensionType) and implement their own serialization mechanism. obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} /home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py:1661: FutureWarning: pyarrow.PyExtensionType is deprecated and will refuse deserialization by default. Instead, please derive from pyarrow.ExtensionType and implement your own serialization mechanism. obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 924, in from_dict return cls(pa_table, info=info, split=split) File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 693, in __init__ inferred_features = Features.from_arrow_schema(arrow_table.schema) File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1661, in from_arrow_schema obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1661, in <dictcomp> obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1381, in generate_from_arrow_type return Value(dtype=_arrow_to_datasets_dtype(pa_type)) File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 111, in _arrow_to_datasets_dtype raise ValueError(f"Arrow type {arrow_type} does not have a datasets dtype equivalent.") ValueError: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent. ```
19
Issue with pyarrow 14.0.1 See https://github.com/huggingface/datasets-server/pull/2089 for reference ``` from datasets import (Array2D, Dataset, Features) feature_type = Array2D(shape=(2, 2), dtype="float32") content = [[0.0, 0.0], [0.0, 0.0]] features = Features({"col": feature_type}) dataset = Dataset.from_dict({"col": [content]}, features=features) ``` generates ``` /home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py:648: FutureWarning: pyarrow.PyExtensionType is deprecated and will refuse deserialization by default. Instead, please derive from pyarrow.ExtensionType and implement your own serialization mechanism. pa.PyExtensionType.__init__(self, self.storage_dtype) /home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py:1661: RuntimeWarning: pickle-based deserialization of pyarrow.PyExtensionType subclasses is disabled by default; if you only ingest trusted data files, you may re-enable this using `pyarrow.PyExtensionType.set_auto_load(True)`. In the future, Python-defined extension subclasses should derive from pyarrow.ExtensionType (not pyarrow.PyExtensionType) and implement their own serialization mechanism. obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} /home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py:1661: FutureWarning: pyarrow.PyExtensionType is deprecated and will refuse deserialization by default. Instead, please derive from pyarrow.ExtensionType and implement your own serialization mechanism. obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 924, in from_dict return cls(pa_table, info=info, split=split) File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 693, in __init__ inferred_features = Features.from_arrow_schema(arrow_table.schema) File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1661, in from_arrow_schema obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1661, in <dictcomp> obj = {field.name: generate_from_arrow_type(field.type) for field in pa_schema} File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1381, in generate_from_arrow_type return Value(dtype=_arrow_to_datasets_dtype(pa_type)) File "/home/slesage/hf/datasets-server/libs/libcommon/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 111, in _arrow_to_datasets_dtype raise ValueError(f"Arrow type {arrow_type} does not have a datasets dtype equivalent.") ValueError: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent. ``` https://github.com/huggingface/datasets-server/pull/2089#pullrequestreview-1724449532 > Yes, I understand now: they have disabled their `PyExtensionType` and we use it in `datasets` for arrays...
[ -0.10018604248762131, 0.13276909291744232, -0.0065413713455200195, 0.12114937603473663, 0.33292287588119507, -0.0022718533873558044, 0.5476638078689575, 0.42727774381637573, -0.40590208768844604, -0.01682676374912262, -0.04357265681028366, 0.5135801434516907, -0.038570161908864975, 0.18583136796951294, -0.014979938976466656, -0.1012323647737503, 0.1420401930809021, 0.24987941980361938, -0.13324779272079468, 0.002532772719860077, -0.25476378202438354, 0.1715697944164276, -0.19844037294387817, 0.2603144347667694, -0.2027653306722641, 0.22164078056812286, -0.03176496922969818, 0.019775202497839928, -0.36370354890823364, -0.6872820258140564, 0.38845425844192505, -0.046785589307546616, 0.24187418818473816, -0.006554439663887024, -0.00010224691504845396, -0.0007210522890090942, 0.30931177735328674, 0.12332480400800705, -0.1937236785888672, -0.07293610274791718, 0.3329659700393677, -0.25898900628089905, 0.2628496289253235, -0.21228623390197754, -0.04073005169630051, -0.6440297961235046, -0.050312601029872894, 0.24469202756881714, 0.08172955363988876, 0.15321706235408783, 0.3183605670928955, 0.2241806983947754, 0.35633599758148193, -0.017900828272104263, 0.511435329914093, 0.20774514973163605, -0.20835749804973602, 0.2505728602409363, 0.1441395878791809, -0.09282740950584412, -0.23996330797672272, -0.05456727743148804, -0.04186108335852623, 0.0516197644174099, 0.17346224188804626, 0.1702004075050354, 0.1446222960948944, -0.18406105041503906, 0.11555829644203186, 0.10660357028245926, 0.277085542678833, -0.4675661027431488, -0.2825547158718109, -0.07063031196594238, 0.021364260464906693, -0.3469952940940857, 0.05819381773471832, 0.2746261954307556, -0.04459253326058388, 0.2843543589115143, 0.08433744311332703, 0.07435879111289978, -0.3670923411846161, 0.06486669182777405, -0.14269809424877167, 0.1571839451789856, -0.09399453550577164, 0.11185935139656067, -0.12620553374290466, -0.21635128557682037, 0.16817766427993774, -0.07513275742530823, -0.04647224396467209, 0.02168288454413414, -0.14976225793361664, -0.005753032863140106, 0.08542770147323608, -0.14521095156669617, 0.36695149540901184, 0.15239326655864716, -0.19613754749298096, 0.13692310452461243, 0.16818635165691376, 0.1681787669658661, 0.06301292777061462, -0.013271212577819824, 0.1479046493768692, -0.038389652967453, 0.292280912399292, 0.13681110739707947, 0.16853541135787964, 0.047207534313201904, -0.13887229561805725, 0.009687833487987518, 0.27903109788894653, -0.08357559144496918, 0.4121082127094269, -0.009751692414283752, -0.28174757957458496, -0.037661537528038025, -0.44565609097480774, 0.052530452609062195, -0.153237983584404, 0.2681267559528351, 0.07332980632781982, 0.2590944468975067, 0.009117335081100464, 0.17001742124557495, -0.1239938959479332, -0.3881932497024536, -0.21756026148796082, -0.11374260485172272, -0.12858743965625763, -0.05974503606557846, 0.1731516718864441, 0.15938711166381836, 0.07588368654251099, 0.15590816736221313, -0.221303328871727, 0.26010382175445557, -0.06207264959812164, -0.0003604404628276825, 0.03367860987782478, 0.17858392000198364, -0.1635664701461792, 0.10458126664161682, 0.09144231677055359, -0.05944023281335831, -0.11221687495708466, 0.10968802869319916, -0.10714814811944962, -0.158572256565094, -0.37980636954307556, 0.3040445148944855, 0.03276795148849487, -0.03485986962914467, -0.28815406560897827, 0.019228169694542885, 0.11120842397212982, -0.146925151348114, -0.13328586518764496, -0.21462948620319366, -0.041417934000492096, -0.5015435814857483, 0.24592375755310059, 0.14827826619148254, -0.4688233733177185, 0.1301501989364624, -0.041538067162036896, -0.20615172386169434, 0.18909406661987305, 0.14659802615642548, -0.338314026594162, -0.010896846652030945, -0.2559632658958435, 0.5682309865951538, -0.016959354281425476, -0.058845944702625275, -0.16745464503765106, 0.05587157607078552, -0.09758801758289337, 0.0695413276553154, 0.0493280291557312, -0.1776268482208252, 0.20187753438949585, -0.016308633610606194, 0.0287044458091259, 0.16070491075515747, 0.08058563619852066, 0.05726061016321182, -0.18823456764221191, -0.27991610765457153, 0.2877088189125061, -0.0021743327379226685, -0.08789727091789246, -0.028525561094284058, 0.13762448728084564, -0.3489091098308563, 0.3593839704990387, -0.2809410095214844, 0.24101243913173676, -0.025956109166145325, 0.6250410079956055, -0.07790195196866989, 0.04632025212049484, -0.13860028982162476, -0.6376516222953796, 0.17380157113075256, -0.3025747537612915, 0.1074538379907608, -0.4707784056663513, -0.2563588619232178, -0.05380157381296158, 0.19838717579841614, -0.12281067669391632, -0.0653001219034195, 0.2720189094543457, -0.0242069773375988, -0.013396378606557846, 0.04209449142217636, -0.05829714983701706, -0.15153934061527252, -0.10140417516231537, 0.16166792809963226, -0.20290440320968628, 0.41211801767349243, -0.14967414736747742, -0.44498103857040405, -0.10984353721141815, 0.11729024350643158, 0.19282588362693787, -0.11436755955219269, 0.08560819178819656, 0.37778449058532715, 0.08244454860687256, 0.15956442058086395, -0.1974870264530182, 0.06399834156036377, 0.086475670337677, -0.4559623599052429, -0.10594970732927322, 0.10118357092142105, 0.0011408962309360504, -0.0677051693201065, 0.11807811260223389, 0.4040833115577698, 0.24931350350379944, 0.0448155514895916, 0.1836143285036087, 0.003987014293670654, 0.14396370947360992, 0.059067174792289734, 0.033327892422676086, -0.14383354783058167, -0.28013595938682556, 0.21055911481380463, 0.11753591895103455, 0.2305448055267334, -0.2056436985731125, 0.3378463089466095, 0.4622548222541809, -0.06852134317159653, 0.1672966629266739, 0.0991375595331192, -0.3705889880657196, -0.1083807647228241, 0.22959978878498077, -0.19049106538295746, 0.24067169427871704, 0.298346608877182, -0.020736034959554672, 0.08255390077829361, -0.043830037117004395, -0.22298787534236908, 0.3355395495891571, 0.0032409057021141052, 0.19844871759414673, 0.21311210095882416, 0.47365790605545044, -0.08961710333824158, -0.439360111951828, 0.09725485742092133, -0.024189699441194534, 0.1410832405090332, -0.2357671558856964, -0.03500436991453171, -0.4325895309448242, 0.1258394420146942, -0.1569252908229828, -0.31099754571914673, -0.08836033940315247, -0.16601744294166565, 0.012408707290887833, 0.34924745559692383, -0.11334970593452454, 0.19664378464221954, -0.13657525181770325, -0.13444335758686066, 0.10979387909173965, -0.1762014776468277, -0.2863115668296814, -0.1470792293548584, -0.36708715558052063, 0.15209154784679413, 0.029589205980300903, -0.08224717527627945, 0.08620145171880722, 0.06287655234336853, 0.008375715464353561, -0.445832759141922, -0.48602116107940674, 0.10645060241222382, -0.2978709638118744, 0.0903143361210823, 0.27838701009750366, 0.16968482732772827, -0.13727112114429474, -0.1195320338010788, 0.5100483298301697, -0.2875481843948364, -0.41032132506370544, 0.42331719398498535, -0.17335167527198792, 0.05580886825919151, -0.1378192901611328, -0.3874593675136566, -0.20124199986457825, -0.248092383146286, 0.31456458568573, 0.016230173408985138, 0.09122344106435776, 0.29910725355148315, 0.05805697664618492, 0.047346439212560654, -0.07700565457344055, -0.03140794113278389, -0.08385391533374786, 0.0631040558218956, 0.3219718337059021, -0.22866235673427582, -0.3900349736213684, 0.004151850938796997, -0.17158159613609314, -0.11342285573482513, 0.08933603018522263, -0.11093162000179291, -0.17342136800289154, -0.1884462535381317, 0.6951502561569214, 0.07163169980049133, -0.11387015134096146, 0.3373633027076721, 0.3119027614593506, -0.19130657613277435, -0.15890666842460632, 0.02555765211582184, 0.17881149053573608, 0.00460520014166832, -0.09777680039405823, 0.03421568498015404, -0.008018388412892818, 0.07332845777273178, 0.4761612117290497, -0.08745807409286499, -0.29982972145080566, 0.49723637104034424, -0.26159799098968506, 0.12749013304710388, -0.10811108350753784, -0.21417772769927979, 0.013435285538434982, -0.1973121017217636, 0.16920889914035797, 0.23928101360797882, -0.12688755989074707, -0.16794179379940033, 0.1104569137096405, 0.0089913010597229, -0.1777227520942688, -0.253729909658432, -0.0909803956747055, 0.24696452915668488, 0.18286308646202087, -0.043270181864500046, 0.05386866629123688, -0.019296232610940933, -0.09915898740291595, 0.2137332409620285, -0.2825152277946472, -0.031769730150699615, 0.020949803292751312, -0.134064182639122, -0.21085225045681, -0.2985910177230835, 0.17923149466514587, 0.2114250659942627, 0.07434561103582382, 0.1392124593257904, -0.2581048011779785, 0.11975747346878052, -0.058123741298913956, 0.5388950109481812, 0.1018737182021141, 0.061736635863780975, 0.17307843267917633, 0.1640792340040207, -0.364521324634552, -0.2548259198665619, -0.11831529438495636, -0.23219719529151917, -0.052550576627254486, 0.3380841612815857, -0.6598986983299255, -0.21454152464866638, 0.2546458840370178, 0.23629821836948395, -0.02802896499633789, 0.01967017352581024, -0.2344319373369217, -0.3486764430999756, -0.038414739072322845, -0.2105499804019928, -0.015291482210159302, 0.5068024396896362, -0.23252934217453003, -0.2845616340637207, -0.1372699737548828, -0.13592249155044556, -0.1546134054660797, 0.2735337018966675, 0.27191323041915894, -0.37233567237854004, 0.11864405870437622, 0.006298050284385681, 0.23260919749736786, 0.7634117007255554, 0.3490545153617859, 0.23924462497234344, -0.4080246090888977, -0.10563603043556213, 0.08192019164562225, 0.21933820843696594, 0.06291593611240387, -0.26146891713142395, 0.11254055798053741, -0.18912680447101593, -0.07676328718662262, -0.2140273004770279, -0.11838484555482864, 0.5170639753341675, -0.3128354251384735, 0.03244496509432793, 0.09584080427885056, 0.42409777641296387, -0.030377846211194992, 0.10261821746826172, 0.0014741714112460613, 0.3985674977302551, -0.312575101852417, 0.2646927535533905, 0.2118319272994995, 0.7822632193565369, -0.01778673753142357, 0.19339619576931, 0.6809625029563904, -0.1298508644104004, 0.11390127241611481, -0.005902275443077087, 0.1467081606388092, -0.6576913595199585, -0.06070036441087723, -0.026034876704216003, 0.009951755404472351, 0.22630970180034637, 0.19492222368717194, -0.08298581093549728, -0.036375463008880615, -0.20605415105819702, 0.326129287481308, 0.06088533252477646, 0.16328813135623932, 0.0013271421194076538, -0.15697726607322693, -0.18775023519992828, 0.19055160880088806, -0.12904086709022522, -0.1718204766511917, -0.05302433297038078, -0.25756096839904785, -0.021024897694587708, -0.2561425566673279, -0.1232069656252861, 0.2532206177711487, -0.2901766002178192, 0.1842537820339203, 0.2915562093257904, -0.20285584032535553, -0.16148051619529724, 0.05954616516828537, -0.10694513469934464, -0.2685791850090027, -0.16634492576122284, 0.06610335409641266, 0.1495666652917862, -0.03609408065676689, 0.008619461208581924, -0.04488584026694298, 0.21550647914409637, -0.028581243008375168, -0.15987731516361237, 0.059296172112226486, -0.05588085949420929, 0.10529781877994537, -0.08902878314256668, -0.09406326711177826, 0.08458088338375092, -0.4302573502063751, 0.11365928500890732, -0.24610517919063568, 0.06772995740175247, -0.26018163561820984, 0.21459925174713135, -0.0008011311292648315, -0.0809430256485939, 0.12404011934995651, 0.03198828548192978, -0.060789257287979126, -0.12960152328014374, 0.2745000720024109, 0.012269847095012665, 0.33253613114356995, 0.4311170279979706, 0.19912686944007874, -0.20031647384166718, -0.24765217304229736, 0.15130481123924255, 0.3709360957145691, -0.4208957552909851, 0.06832287460565567, 0.2048831284046173, 0.13577526807785034, -0.04284456744790077, 0.4449334740638733, -0.07382865995168686, 0.019424978643655777, -0.08853812515735626, -0.13871975243091583, -0.13754570484161377, 0.36616113781929016, 0.035326823592185974, 0.07564637809991837, 0.24299630522727966, 0.3308192491531372, -0.05400076135993004, -0.15742066502571106, -0.4195345640182495, 0.04367445409297943, 0.03848930448293686, 0.05583915859460831, -0.26003795862197876, -0.20067569613456726, 0.19914624094963074, 0.0374239981174469, 0.3099753260612488, 0.10608654469251633, -0.03514433652162552, -0.2687542140483856, -0.1196163147687912, 0.05648050457239151, 0.05557289347052574, -0.08476080745458603, 0.00909537822008133, 0.039590731263160706, -0.29755353927612305, -0.13058236241340637, 0.2319289743900299, 0.06041780114173889, -0.056617315858602524, 0.21724407374858856, 0.18791082501411438, 0.1550629884004593, -0.28721731901168823, -0.06306710839271545, -0.11356894671916962, 0.19417743384838104, 0.0484454520046711, 0.09500819444656372, -0.21972976624965668, -0.05294742435216904, -0.022243261337280273, 0.17423537373542786, 0.05739367753267288, -0.08058194816112518, 0.46313709020614624, -0.42983579635620117, -0.29132574796676636, -0.28999823331832886, 0.5319153070449829, 0.25732988119125366, -0.03962107002735138, -0.15874773263931274, 0.19330082833766937, 0.3192138969898224, -0.40645304322242737, 0.00032739341259002686, 0.230337455868721, -0.15160375833511353, 0.04942914843559265, 0.10948528349399567, 0.08580471575260162, 0.08335316181182861, -0.14146237075328827, 0.05703914910554886, 0.24883945286273956, 0.17432333528995514, -0.117571622133255, 0.5136815309524536, -0.06140841543674469, 0.101679228246212, 0.44227129220962524, 0.1966496855020523, 0.3323625326156616, 0.2319987565279007, -0.18364250659942627, 0.26618078351020813, -0.07938379049301147, -0.09510583430528641, 0.1631026417016983, -0.3098630905151367, -0.056022100150585175, 0.2006935179233551, 0.2218676507472992, -0.2726205289363861, 0.050708621740341187, 0.6607792973518372, 0.09736026078462601, -0.2338448464870453, -0.13845181465148926, 0.31676897406578064, -0.18701772391796112, -0.0444796122610569, -0.12011769413948059, -0.047512345016002655, -0.14432848989963531, -0.14940616488456726, -0.1367788165807724, -0.16063714027404785, 0.441753625869751, 0.046282507479190826, -0.08844880759716034, -0.5731295943260193, 0.23150686919689178, 0.04414016008377075, 0.3278332054615021, -0.06139877066016197, 0.2520948350429535, 0.27526164054870605, -0.27823585271835327, -0.21205149590969086, 0.1367592066526413, 0.31384479999542236, 0.33066847920417786, -0.16245637834072113, -0.2118215709924698, -0.29630354046821594, -0.17962414026260376, -0.015729129314422607, 0.05988971143960953, 0.07663780450820923, 0.22336655855178833, 0.15398064255714417, 0.22361116111278534, -0.1787714660167694, -0.15017758309841156, 0.3345942795276642, 0.0837181806564331, 0.0616132915019989, 0.25901973247528076, -0.10629724711179733, -0.3388213515281677, -0.0023846817202866077, -0.17791256308555603, -0.10937976837158203, 0.10667410492897034, 0.3843795359134674, 0.2676602303981781, 0.05455564707517624, -0.20691052079200745, 0.15335601568222046, 0.08136604726314545, 0.253470778465271, 0.14145642518997192, 0.10496184974908829, -0.13643205165863037, 0.013491034507751465, -0.3704012334346771, 0.35068339109420776, -0.1276385486125946, -0.025513045489788055, 0.18478882312774658, 0.2998412847518921, 0.1018482893705368, 0.09140706062316895, -0.009909383952617645, -0.08373092114925385, 0.04879451543092728, 0.33478838205337524, -0.20532581210136414, 0.08069188892841339, 0.11865025758743286, -0.16535191237926483, -0.17291946709156036, -0.3211521804332733, 0.34677553176879883, -0.26141056418418884, 0.15921279788017273, -0.16020415723323822, 0.03480931371450424, 0.138339102268219, -0.24691420793533325, 0.48435789346694946, 0.09284304827451706, 0.16776224970817566, -0.03926058113574982, 0.0074721574783325195, -0.10545110702514648, -0.18473781645298004, -0.18041396141052246, 0.28250232338905334, -0.06699521094560623, 0.2611110806465149, 0.1733752191066742, -0.07898429036140442, -0.2593030035495758, 0.24456749856472015, 0.02384534478187561, -0.14853957295417786, -0.16251447796821594, 0.4314494729042053, -0.11554785817861557, -0.12369260936975479, -0.27429962158203125, -0.06916356086730957, -0.010786795988678932, 0.04795794188976288, -0.36892715096473694, -0.711148202419281, 0.41265806555747986, -0.5450826287269592, -0.2709537148475647, 0.08806121349334717, 0.2129911184310913, 0.14190030097961426, -0.2189563512802124, -0.3959415853023529, 0.13431696593761444, 0.36096298694610596, 0.03474336117506027, -0.2526814341545105, 0.03425564616918564, 0.042117223143577576, -0.01286352425813675, -0.12775683403015137, 0.32817745208740234, -0.01948961243033409, 0.038081131875514984, -0.0359569787979126, -0.13260097801685333 ]
https://github.com/huggingface/datasets/issues/6395
We've replaced our filelock implementation with the `filelock` package, so their repo is the right place to request this feature. In the meantime, the following should work: ```python import filelock filelock.FileLock = filelock.SoftFileLock import datasets ... ```
Add ability to set lock type
### Feature request Allow setting file lock type, maybe from an environment variable Currently, it only depends on whether fnctl is available: https://github.com/huggingface/datasets/blob/12ebe695b4748c5a26e08b44ed51955f74f5801d/src/datasets/utils/filelock.py#L463-L470C16 ### Motivation In my environment, flock isn't supported on a network attached drive ### Your contribution I'll be happy to submit a pr.
37
Add ability to set lock type ### Feature request Allow setting file lock type, maybe from an environment variable Currently, it only depends on whether fnctl is available: https://github.com/huggingface/datasets/blob/12ebe695b4748c5a26e08b44ed51955f74f5801d/src/datasets/utils/filelock.py#L463-L470C16 ### Motivation In my environment, flock isn't supported on a network attached drive ### Your contribution I'll be happy to submit a pr. We've replaced our filelock implementation with the `filelock` package, so their repo is the right place to request this feature. In the meantime, the following should work: ```python import filelock filelock.FileLock = filelock.SoftFileLock import datasets ... ```
[ -0.3815123736858368, -0.05841831862926483, -0.07984399050474167, -0.3621041476726532, -0.15861397981643677, -0.08662982285022736, 0.6261725425720215, 0.16512562334537506, 0.16967499256134033, 0.08532869815826416, -0.34569329023361206, 0.21483486890792847, -0.06048876792192459, 0.06277468800544739, -0.2599378824234009, 0.30101943016052246, 0.10321980714797974, 0.1451055258512497, -0.3018505573272705, 0.015724703669548035, -0.13232527673244476, 0.3425179421901703, 0.17432068288326263, -0.08144879341125488, -0.08672919869422913, 0.016290394589304924, 0.08199560642242432, 0.11785559356212616, -0.21148933470249176, -0.033344537019729614, 0.08027122169733047, 0.7382546067237854, 0.31936225295066833, 0.4733959138393402, -0.00010792925604619086, -0.13630609214305878, -0.029584355652332306, -0.0357615202665329, -0.14167790114879608, 0.05833980441093445, -0.03443831577897072, -0.3538021445274353, 0.19134856760501862, -0.3127480149269104, 0.13007894158363342, -0.18772709369659424, 0.11536038666963577, -0.24946463108062744, 0.3825650215148926, 0.16198286414146423, 0.1880372017621994, 0.15292496979236603, 0.14154037833213806, -0.010432250797748566, 0.03501087427139282, -0.16292354464530945, -0.47496259212493896, 0.48758721351623535, 0.4599849581718445, -0.005331546068191528, -0.039409007877111435, 0.09543944895267487, 0.05462604761123657, -0.0048238374292850494, 0.5035683512687683, 0.14995309710502625, -0.05035009980201721, -0.3018321692943573, -0.38567593693733215, 0.24834555387496948, 0.05003345012664795, -0.13545462489128113, -0.4742216169834137, -0.28924763202667236, 0.3722068965435028, -0.0036894455552101135, 0.2754545509815216, 0.10524341464042664, -0.2610584795475006, 0.3327062726020813, 0.13305574655532837, -0.04473009705543518, -0.2326710969209671, 0.05877700075507164, 0.0327143520116806, 0.17957070469856262, 0.07469207048416138, -0.035572536289691925, 0.42301973700523376, -0.1849784106016159, 0.09744847565889359, 0.0569767951965332, -0.18843066692352295, 0.14867709577083588, 0.028589721769094467, -0.35194987058639526, 0.0606706403195858, 0.13792011141777039, 0.3134368658065796, 0.10356339812278748, -0.24498504400253296, -0.05136255547404289, -0.09471321851015091, 0.26928696036338806, 0.07050952315330505, -0.18952278792858124, 0.0589032843708992, -0.18978102505207062, 0.5232930779457092, 0.20574072003364563, -0.1314782053232193, 0.089161217212677, 0.21735528111457825, -0.3414763808250427, 0.2990347743034363, 0.22410768270492554, 0.3925240635871887, -0.02785222977399826, 0.3891449272632599, 0.04990716651082039, 0.013452477753162384, -0.23140794038772583, -0.1129959300160408, 0.2763155400753021, 0.2787889838218689, -0.225064218044281, 0.16506925225257874, 0.10974831879138947, -0.05078195035457611, 0.13249702751636505, 0.059901442378759384, -0.19510792195796967, 0.1590951681137085, 0.036958105862140656, 0.3213237226009369, -0.1849670559167862, -0.25618642568588257, 0.353793203830719, 0.15480411052703857, 0.11081729829311371, 0.11249083280563354, -0.10410135984420776, -0.05187694728374481, 0.049798816442489624, -0.07861997932195663, -0.21119165420532227, 0.02009422890841961, -0.27453988790512085, -0.2857627272605896, 0.11669490486383438, -0.24957787990570068, 0.1477619707584381, -0.25583311915397644, 0.14922204613685608, -0.07637423276901245, -0.15504038333892822, 0.1251291185617447, 0.074223592877388, -0.4817061424255371, -0.0981191024184227, 0.16764502227306366, 0.006393715739250183, 0.10605350136756897, 0.03672892600297928, -0.21143901348114014, 0.21702848374843597, -0.12073690444231033, 0.035342395305633545, 0.23316505551338196, -0.6072008013725281, -0.0729321613907814, 0.0741245374083519, 0.10060331225395203, -0.0625649094581604, -0.33293983340263367, 0.10914544761180878, 0.33072322607040405, -0.33026212453842163, -0.41825976967811584, 0.20401835441589355, -0.31460806727409363, -0.13685114681720734, 0.1841305047273636, 0.466006338596344, 0.12890876829624176, -0.26936325430870056, 0.22098946571350098, 0.4671998918056488, 0.1712886542081833, -0.019515108317136765, -0.037699855864048004, -0.2604994475841522, -0.22388528287410736, 0.14825871586799622, -0.15340213477611542, 0.1904597282409668, 0.3268918991088867, -0.10419579595327377, 0.21608442068099976, -0.21284854412078857, -0.12475945055484772, 0.14236822724342346, 0.6931871771812439, 0.12518474459648132, -0.0765937864780426, -0.23972907662391663, -0.567879855632782, 0.028021298348903656, -0.2569688558578491, 0.05698700621724129, -0.15528197586536407, -0.27581194043159485, 0.09761165827512741, -0.061632413417100906, 0.013488225638866425, 0.24992790818214417, 0.2086142599582672, -0.09140509366989136, -0.25346410274505615, 0.08527359366416931, 0.0027375146746635437, 0.18902777135372162, -0.14373478293418884, 0.09832355380058289, 0.45825356245040894, 0.04242511838674545, -0.12309173494577408, -0.32160839438438416, 0.01829236000776291, -0.03831244260072708, 0.11752811074256897, -0.16518069803714752, -0.15818916261196136, 0.32913434505462646, 0.2656686007976532, 0.3104957342147827, -0.02744600549340248, 0.3246793746948242, -0.02447037771344185, 0.590676486492157, -0.2305406630039215, 0.11932168900966644, -0.05351445823907852, 0.14187408983707428, -0.4323303997516632, 0.614063024520874, -0.18055790662765503, -0.16255155205726624, -0.05889977887272835, -0.09393289685249329, 0.23768971860408783, -0.05222475156188011, 0.02030332386493683, -0.09375886619091034, 0.03430033475160599, 0.1683194637298584, -0.13721823692321777, 0.11056549847126007, 0.0013683140277862549, -0.06668300926685333, 0.2727431058883667, -0.008225888013839722, 0.2725276052951813, 0.054384633898735046, 0.0993579849600792, 0.29209935665130615, 0.08071534335613251, 0.8812390565872192, 0.5674370527267456, 0.3294810354709625, 0.02170659974217415, 0.0722588300704956, 0.11333378404378891, -0.30345022678375244, 0.2753334641456604, -0.15064091980457306, -0.0246750321239233, 0.22140052914619446, 0.24895356595516205, -0.1565334051847458, -0.3417598009109497, -0.5464816093444824, -0.059701185673475266, -0.10049570351839066, -0.03766390681266785, -0.12113939225673676, -0.08140569925308228, 0.12392326444387436, -0.035748112946748734, 0.41451504826545715, -0.18940193951129913, -0.3382589817047119, 0.3941659927368164, 0.591383695602417, -0.09068933129310608, -0.06330330669879913, -0.3468021750450134, 0.24327677488327026, 0.08298387378454208, -0.14436376094818115, -0.15154674649238586, 0.026063337922096252, -0.013760361820459366, 0.14478734135627747, 0.15291869640350342, -0.2559814453125, 0.32977908849716187, 0.24627238512039185, -0.13079847395420074, -0.5591796636581421, -0.14417888224124908, -0.0916626900434494, -0.2872106432914734, 0.496460497379303, 0.011800568550825119, 0.28390997648239136, -0.2233661413192749, 0.018680714070796967, 0.19093289971351624, -0.14950361847877502, -0.20115137100219727, -0.3059014678001404, -0.130355566740036, 0.1766846776008606, -0.4819553792476654, -0.06029311195015907, -0.35587170720100403, -0.4348796606063843, 0.558015763759613, 0.16932503879070282, 0.030043259263038635, 0.18447375297546387, -0.06309724599123001, 0.1015675887465477, -0.061792995780706406, 0.1145104244351387, -0.0008590780198574066, -0.14050282537937164, 0.4533957242965698, -0.16188059747219086, -0.4071435034275055, -0.05106945335865021, 0.15124453604221344, -0.47951799631118774, -0.12561389803886414, -0.07629528641700745, -0.6524802446365356, -0.2213086634874344, 0.3828815817832947, -0.3060194253921509, 0.17244911193847656, 0.09816448390483856, -0.06848800182342529, -0.13956230878829956, -0.144632488489151, 0.3351846933364868, 0.21239028871059418, 0.08274920284748077, -0.3247671127319336, 0.11770816147327423, 0.09747964143753052, -0.00651143491268158, 0.4829881489276886, -0.022333607077598572, 0.08856106549501419, 0.4767957329750061, -0.28987130522727966, 0.24961189925670624, -0.2056010663509369, -0.07964277267456055, 0.18692125380039215, 0.3817232549190521, 0.07563813030719757, 0.0905611515045166, -0.0897497683763504, -0.04716656357049942, -0.031233560293912888, -0.3243299126625061, -0.052555620670318604, -0.46059978008270264, 0.10256559401750565, 0.557398796081543, -0.05671272799372673, -0.20517665147781372, -0.08733458817005157, 0.23822297155857086, -0.11408649384975433, 0.07229597121477127, 0.5550169944763184, 0.08653058111667633, -0.05030784010887146, -0.2240007072687149, 0.06819546967744827, -0.333545058965683, 0.19343993067741394, 0.01569001004099846, 0.12706078588962555, -0.0952645018696785, 0.02430690824985504, 0.08142992109060287, -0.12768757343292236, 0.3867022693157196, 0.18939585983753204, 0.1314222663640976, -0.07324951887130737, 0.19919386506080627, -0.1255662441253662, -0.12347191572189331, -0.42608317732810974, -0.2706436216831207, 0.286258339881897, 0.06814127415418625, 0.002400726079940796, -0.06979751586914062, -0.4441400170326233, -0.24288760125637054, 0.02731993794441223, -0.511081337928772, 0.11524999141693115, 0.19486716389656067, -0.6834508776664734, 0.18107549846172333, 0.24735431373119354, -0.0020718425512313843, -0.014354180544614792, -0.20018061995506287, -0.12049484997987747, -0.09180386364459991, 0.24717822670936584, 0.18251574039459229, 0.08767083287239075, 0.10859865695238113, -0.06981829553842545, -0.24764423072338104, 0.025450583547353745, 0.11465634405612946, -0.00981808453798294, 0.06508758664131165, -0.003219716250896454, -0.05334741622209549, -0.10352194309234619, 0.08538851141929626, 0.15981663763523102, -0.16188596189022064, 0.06712863594293594, 0.0853130891919136, 0.21270352602005005, -0.08848094940185547, -0.1653931438922882, 0.060971520841121674, 0.08918341994285583, 0.08742044866085052, -0.04840831458568573, 0.2226104438304901, 0.2028762847185135, -0.20741307735443115, 0.37542077898979187, 0.4448290467262268, -0.18837183713912964, 0.23097246885299683, 0.09394099563360214, 0.684787392616272, -0.027182362973690033, 0.35154828429222107, 0.13169486820697784, -0.20206913352012634, 0.3672056496143341, -0.27411922812461853, -0.12500517070293427, -0.10598688572645187, -0.39935845136642456, -0.10983501374721527, -0.0649382621049881, 0.1732579618692398, -0.23434756696224213, -0.40473002195358276, -0.1401156783103943, -0.06979915499687195, -0.33091655373573303, -0.37250372767448425, 0.22659006714820862, -0.9082639813423157, -0.3737257719039917, -0.16793106496334076, 0.1655067652463913, 0.09880660474300385, 0.17387190461158752, -0.07003889977931976, -0.23958800733089447, -0.17939835786819458, 0.02809833735227585, -0.260033518075943, -0.14514973759651184, -0.17621153593063354, 0.15501464903354645, -0.18050557374954224, 0.22763419151306152, -0.08614237606525421, 0.17900975048542023, 0.1344630867242813, 0.2997026741504669, -0.13703636825084686, 0.16920821368694305, -0.09106068313121796, 0.17102749645709991, -0.00843142345547676, -0.18288546800613403, 0.28005683422088623, -0.11825384199619293, -0.0939750000834465, -0.40103453397750854, 0.32029467821121216, -0.12180469185113907, 0.18265900015830994, 0.0400250069797039, -0.10638341307640076, -0.18031325936317444, -0.4310665726661682, -0.2125501185655594, -0.29874110221862793, -0.045647017657756805, 0.16159062087535858, 0.028588496148586273, -0.06089751422405243, -0.03755870461463928, -0.1442541927099228, -0.06299042701721191, -0.06425955146551132, 0.5349797010421753, -0.16635434329509735, -0.3177967667579651, 0.5335429310798645, 0.18221385776996613, -0.09029316902160645, -0.29437392950057983, 0.32961800694465637, -0.04439615085721016, -0.14045685529708862, 0.16343778371810913, 0.1748993843793869, -0.25016194581985474, 0.0586555041372776, 0.4664801359176636, 0.12188160419464111, 0.08455125242471695, 0.03824003040790558, -0.391789972782135, -0.40955159068107605, -0.10275578498840332, -0.29785987734794617, 0.16651472449302673, 0.3293302655220032, -0.004729805514216423, 0.16091737151145935, -0.24366970360279083, -0.3571856617927551, 0.017683565616607666, 0.08242848515510559, -0.31121453642845154, 0.2795129716396332, 0.1873912662267685, 0.19931930303573608, 0.027436692267656326, 0.12461964786052704, 0.25326621532440186, -0.11996999382972717, -0.28297603130340576, -0.3798867464065552, 0.0733833983540535, -0.06275246292352676, 0.15738394856452942, 0.06203996762633324, -0.4692023992538452, -0.16691544651985168, 0.07733123004436493, -0.013411112129688263, 0.07734864205121994, -0.0047455765306949615, 0.08980536460876465, 0.2929106056690216, -0.015200644731521606, -0.13199922442436218, -0.2312435805797577, -0.026991859078407288, -0.23673900961875916, -0.1714726686477661, 0.0511523075401783, -0.4382320046424866, 0.151926189661026, -0.4140579104423523, 0.14819517731666565, 0.4488581418991089, 0.4604547619819641, 0.0866532176733017, 0.3564911484718323, -0.21901461482048035, 0.333835244178772, 0.4551764130592346, -0.1589517593383789, -0.15037639439105988, -0.08294278383255005, 0.1593189537525177, 0.24099072813987732, -0.1659204512834549, -0.06507549434900284, 0.2927209734916687, -0.0925774872303009, 0.29409998655319214, 0.1566556692123413, -0.19202740490436554, -0.09953533858060837, -0.37348219752311707, 0.04252352938055992, -0.04507971554994583, -0.2634076476097107, 0.2586386203765869, 0.21714317798614502, 0.1526470184326172, 0.059505950659513474, 0.4513944089412689, -0.07058678567409515, 0.20414182543754578, 0.3736380934715271, -0.2972702383995056, -0.1027744859457016, 0.16001300513744354, 0.14128488302230835, 0.4603027105331421, -0.07829608023166656, 0.1053532063961029, -0.00015673786401748657, 0.19224466383457184, 0.14026343822479248, 0.22269855439662933, 0.14812509715557098, -0.216415673494339, -0.06627830862998962, -0.007344923913478851, 0.32923945784568787, -0.119284987449646, -0.16283826529979706, 0.20703798532485962, 0.09330907464027405, 0.03236192464828491, -0.051864493638277054, 0.06978610157966614, -0.03171335905790329, -0.10292969644069672, 0.48498421907424927, 0.5815593004226685, -0.09721081703901291, -0.15472154319286346, 0.18125736713409424, 0.4669577181339264, -0.11126125603914261, -0.19166988134384155, 0.09389673173427582, -0.04339752346277237, 0.1973845362663269, 0.2186785340309143, 0.12504175305366516, 0.16374686360359192, 0.4558653235435486, 0.33901140093803406, -0.2617492973804474, 0.024998657405376434, -0.22835449874401093, 0.09846316277980804, 0.2179243266582489, 0.08674193918704987, 0.24531713128089905, 0.2232658714056015, -0.24708962440490723, -0.05307420715689659, -0.09035256505012512, -0.2963070273399353, -0.17456069588661194, 0.44466063380241394, 0.29393503069877625, -0.0024183541536331177, -0.12937186658382416, 0.05671732500195503, -0.09552724659442902, -0.098297119140625, -0.09745115786790848, 0.05907679721713066, 0.1938711702823639, -0.16367754340171814, 0.10452119261026382, 0.18985235691070557, -0.16598741710186005, 0.11625788360834122, 0.0610908642411232, 0.03037485107779503, 0.11067137122154236, -0.4009433388710022, -0.0003652721643447876, 0.021570784971117973, -0.2113875448703766, -0.10572705417871475, -0.03426399827003479, -0.017555054277181625, 0.04717550426721573, 0.39306914806365967, 0.06460012495517731, 0.175524041056633, 0.27467045187950134, -0.45504626631736755, 0.04839562997221947, -0.009231280535459518, -0.10380445420742035, -0.08209371566772461, -0.08626523613929749, 0.06923536956310272, -0.33794164657592773, 0.08426637947559357, 0.1561294049024582, -0.16120746731758118, -0.08294613659381866, -0.10875536501407623, 0.35886847972869873, 0.0589011088013649, 0.22151382267475128, -0.25216418504714966, -0.09924283623695374, -0.08833393454551697, -0.06279118359088898, -0.17990437150001526, -0.36326390504837036, -0.06093225255608559, 0.21782611310482025, -0.3449283242225647, -0.1452779620885849, -0.15940845012664795, 0.33744290471076965, -0.4774954319000244, -0.13221432268619537, -0.25814539194107056, 0.3011164665222168, -0.07767118513584137, 0.04058551415801048, -0.0018555447459220886, 0.3031145930290222, 0.045920949429273605, 0.20432785153388977, -0.27858683466911316, -0.34480658173561096, 0.3852792978286743, -0.2804414629936218, -0.1698177456855774, 0.02336886152625084, 0.25310802459716797, 0.02708045020699501, 0.1886809766292572, -0.24998241662979126, 0.11561423540115356, -0.017092395573854446, -0.01663840003311634, -0.05045147240161896, 0.1607556939125061, 0.2056196928024292, -0.08114233613014221, -0.17949260771274567, 0.029244422912597656, 0.2690551280975342, 0.08963784575462341, -0.1518372893333435, -0.1479390263557434 ]
https://github.com/huggingface/datasets/issues/6393
Adding some more information, it seems to occur more frequently with large (millions of samples) datasets.
Filter occasionally hangs
### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2
16
Filter occasionally hangs ### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 Adding some more information, it seems to occur more frequently with large (millions of samples) datasets.
[ -0.36410510540008545, -0.007196187973022461, -0.07324452698230743, 0.1654694676399231, 0.34145641326904297, -0.19884663820266724, 0.07616069167852402, 0.03563345596194267, 0.13033874332904816, 0.10187101364135742, 0.2923228144645691, 0.4539174735546112, -0.27917808294296265, -0.01014070212841034, -0.34032729268074036, 0.11434394121170044, -0.052950117737054825, -0.06529998779296875, 0.13933968544006348, 0.13726985454559326, -0.3257717490196228, 0.28493279218673706, -0.13513118028640747, 0.10804776847362518, -0.16357338428497314, -0.24336835741996765, 0.4318077266216278, -0.07779324054718018, 0.20258574187755585, -0.38359716534614563, 0.12424758076667786, 0.05304217338562012, -0.15890857577323914, 0.7532826662063599, -0.0001211611888720654, -0.0532902255654335, 0.32145074009895325, 0.1295507401227951, -0.4190695285797119, -0.2153102457523346, -0.16255775094032288, 0.1642991453409195, 0.12728989124298096, 0.24891149997711182, 0.1118473932147026, 0.3625834584236145, -0.2831648886203766, -0.480716347694397, 0.10614395141601562, 0.32107117772102356, 0.13840992748737335, 0.17893342673778534, -0.22460925579071045, -0.039869677275419235, 0.20809242129325867, 0.32773375511169434, -0.1768476366996765, 0.07521703839302063, 0.42123907804489136, -0.2094578742980957, 0.048758335411548615, 0.5053614377975464, -0.04948563128709793, -0.2802044749259949, 0.053697455674409866, -0.28146353363990784, 0.5100593566894531, -0.5448810458183289, 0.33306074142456055, 0.09074652194976807, 0.22063599526882172, -0.10916801542043686, -0.22089676558971405, -0.2391795665025711, -0.0016950815916061401, -0.440449982881546, 0.22963246703147888, -0.2017623484134674, -0.40198957920074463, 0.08633595705032349, -0.06539207696914673, -0.28595009446144104, -0.09682123363018036, 0.017526887357234955, -0.3992723524570465, 0.019129883497953415, -0.10512962937355042, 0.2729330360889435, -0.01950201578438282, -0.1899692416191101, 0.30100715160369873, -0.1085556149482727, 0.07329478859901428, 0.016912437975406647, -0.27818337082862854, 0.13408617675304413, 0.29105618596076965, -0.07126039266586304, -0.17073994874954224, 0.10085384547710419, -0.09091851115226746, 0.1274571716785431, 0.08762931823730469, 0.2399764508008957, 0.2415314018726349, -0.27238160371780396, 0.16643410921096802, 0.2526892423629761, 0.6369774341583252, 0.034205954521894455, -0.18262669444084167, -0.04867860674858093, 0.23935991525650024, -0.09435927867889404, 0.18206164240837097, -0.15630939602851868, 0.04051654040813446, -0.1475653350353241, -0.44121256470680237, 0.48902082443237305, -0.21162304282188416, 0.2928716838359833, 0.48648136854171753, 0.2691456079483032, 0.14228400588035583, 0.20852836966514587, 0.2272733747959137, -0.0967385470867157, -0.007294755429029465, 0.14192530512809753, -0.040615975856781006, -0.3620724081993103, 0.08446792513132095, -0.05728093534708023, 0.018010355532169342, -0.36504825949668884, -0.02240798808634281, -0.06702278554439545, 0.2677299678325653, -0.20078587532043457, 0.14165519177913666, -0.1706329584121704, 0.3426250219345093, 0.8163965940475464, -0.1173505187034607, 0.37555381655693054, -0.04108968749642372, -0.3731173574924469, -0.031201064586639404, 0.19702482223510742, 0.09698277711868286, -0.19480836391448975, 0.062241628766059875, 0.13586029410362244, 0.032540567219257355, 0.27304521203041077, 0.1790548861026764, -0.008309180848300457, 0.3393886089324951, -0.21297289431095123, 0.3449000120162964, -0.423578143119812, -0.2726706266403198, -0.16421084105968475, 0.18299809098243713, 0.3519686460494995, -0.5150478482246399, 0.061137646436691284, -0.5620114803314209, 0.010870702564716339, 0.20018652081489563, 0.2708027958869934, 0.024576589465141296, 0.0999443456530571, -0.1922571361064911, 0.09494176506996155, 0.49337953329086304, 0.07530663907527924, -0.33487799763679504, 0.2260645180940628, -0.08184336870908737, 0.32850363850593567, -0.3193434476852417, -0.0416860431432724, 0.13785262405872345, -0.13630712032318115, 0.26608774065971375, 0.023334600031375885, -0.2961488664150238, -0.13610006868839264, -0.25995710492134094, 0.3659086525440216, 0.10233514755964279, -0.016655948013067245, 0.11390050500631332, -0.33611929416656494, 0.0368618443608284, -0.29492512345314026, 0.04339461773633957, 0.2591569423675537, 0.0375642254948616, 0.24396120011806488, 0.8158905506134033, -0.09774021804332733, -0.027589552104473114, -0.37433236837387085, -0.018803376704454422, 0.25967127084732056, -0.05207465589046478, -0.35965287685394287, -0.2999729514122009, -0.21119220554828644, -0.14671140909194946, 0.5431209802627563, 0.0025596637278795242, -0.0692375898361206, -0.003253411501646042, -0.13208545744419098, 0.021453291177749634, 0.09292683005332947, -0.056440435349941254, 0.21214549243450165, -0.1792423129081726, 0.02997005358338356, 0.07763104885816574, 0.3368722200393677, 0.18308429419994354, -0.2377355396747589, -0.3631995916366577, 0.06668251007795334, -0.004464372992515564, 0.011106930673122406, -0.18918302655220032, 0.3763163685798645, 0.2357289344072342, -0.18622338771820068, -0.05718940123915672, -0.09229306876659393, 0.10689608007669449, 0.15861716866493225, -0.13413076102733612, 0.10612143576145172, 0.1796351969242096, -0.14898721873760223, -0.011876191943883896, 0.2131168395280838, -0.060346826910972595, 0.44798359274864197, -0.027250215411186218, 0.20449882745742798, 0.45020586252212524, 0.3306584358215332, -0.2056407928466797, -0.1500825583934784, 0.3352040648460388, -0.1370483934879303, 0.13497547805309296, 0.054489701986312866, -0.39941853284835815, 0.35397738218307495, 0.3233078718185425, 0.012775026261806488, -0.01028883084654808, 0.3929113745689392, -0.03213426470756531, 0.048461586236953735, 0.11029290407896042, 0.15240709483623505, 0.43266016244888306, 0.03189803287386894, 0.07544365525245667, -0.2013208121061325, -0.32868751883506775, -0.20612852275371552, 0.17250649631023407, 0.2627987265586853, 0.06990976631641388, 0.37150120735168457, 0.25423696637153625, 0.10155832767486572, -0.13767752051353455, -0.2126266062259674, 0.013140395283699036, 0.21424749493598938, -0.17715191841125488, 0.3253435492515564, -0.18432314693927765, -0.2449764609336853, 0.10673081129789352, -0.03279109299182892, -0.40773406624794006, -0.4629095792770386, 0.0686359703540802, 0.2652328610420227, -0.20610789954662323, 0.18741866946220398, -0.03221346065402031, 0.48967796564102173, 0.24426814913749695, -0.15401634573936462, -0.47809910774230957, -0.2776769697666168, -0.26248228549957275, -0.07755747437477112, 0.2773733139038086, 0.05572104454040527, 0.43741273880004883, 0.3115857243537903, -0.05981322377920151, -0.19273611903190613, -0.4873616695404053, 0.14180020987987518, 0.001514548435807228, 0.5693772435188293, 0.2858811616897583, 0.17879493534564972, -0.13922056555747986, 0.06394626200199127, 0.15740163624286652, -0.15277040004730225, -0.011231187731027603, 0.19567610323429108, 0.05445597320795059, 0.03481167182326317, -0.428490549325943, 0.22604119777679443, -0.24915310740470886, -0.4024307131767273, 0.13684512674808502, -0.38260436058044434, -0.09173315018415451, 0.15230852365493774, 0.07238921523094177, 0.009435880929231644, -0.3031880259513855, -0.12658831477165222, -0.2471514791250229, 0.0608113557100296, 0.1236678883433342, -0.07339970767498016, -0.10882673412561417, 0.10632795095443726, -0.019243273884058, 0.012978959828615189, 0.18003350496292114, -0.6803295612335205, 0.027245495468378067, -0.17250795662403107, 0.13780426979064941, 0.04592156410217285, -0.19147878885269165, 0.19097952544689178, 0.037270817905664444, 0.03698912262916565, -0.10604935139417648, -0.289173424243927, -0.025389384478330612, 0.00045365002006292343, 0.23459865152835846, -0.04419397935271263, 0.8586365580558777, 0.07526402920484543, 0.473666250705719, 0.27478593587875366, -0.08382284641265869, -0.15030992031097412, 0.16235853731632233, 0.5090160369873047, -0.07402963936328888, -0.2354857325553894, -0.09494759142398834, -0.12117166817188263, -0.47029101848602295, -0.0912361815571785, 0.10579598695039749, -0.22869008779525757, 0.04077726602554321, 0.16834115982055664, 0.09284991025924683, -0.4574478268623352, 0.12243674695491791, -0.22882290184497833, 0.34165942668914795, 0.09249648451805115, 0.04113948345184326, -0.15042494237422943, 0.051832664757966995, -0.03245310112833977, 0.338919460773468, 0.378545343875885, -0.1890006959438324, -0.147365540266037, -0.24755635857582092, -0.3634394407272339, 0.2601545453071594, 0.207027405500412, 0.502167820930481, -0.37110090255737305, -0.07876699417829514, 0.08166928589344025, -0.14354689419269562, 0.6286779046058655, -0.37641146779060364, -0.23406729102134705, 0.2372487485408783, -0.12258514761924744, -0.6083983182907104, 0.0375274121761322, -0.09028439223766327, 0.3699452579021454, 0.2888987958431244, 0.38999801874160767, -0.060985468327999115, -0.1779572069644928, -0.06036677211523056, 0.14423604309558868, -0.21916911005973816, -0.07129013538360596, -0.19160693883895874, -0.35896626114845276, -0.07449744641780853, 0.3857819437980652, 0.22988274693489075, -0.05806224048137665, -0.12593984603881836, -0.3178021311759949, 0.05698893964290619, -0.4432854950428009, -0.015387963503599167, 0.21737909317016602, 0.07139402627944946, -0.14398683607578278, 0.40397655963897705, -0.042341385036706924, -0.2645232677459717, 0.07207033038139343, 0.2963445484638214, -0.3798545300960541, -0.24758541584014893, 0.2692815363407135, -0.005523912608623505, 0.3569565415382385, 0.5414952635765076, -0.2857317328453064, 0.34040892124176025, -0.23391781747341156, 0.21426749229431152, 0.0658475011587143, 0.05415959283709526, 0.07753163576126099, 0.29978007078170776, -0.2614664137363434, 0.08049824833869934, 0.1472926139831543, 0.25704535841941833, -0.19603820145130157, 0.789771556854248, -0.21537013351917267, -0.14775460958480835, 0.26049765944480896, -0.020643044263124466, 0.7402247190475464, 0.11748997867107391, -0.09536003321409225, 0.0245724618434906, -0.17320817708969116, -0.0539265014231205, -0.027102991938591003, 0.09507250785827637, -0.017740681767463684, -0.46565869450569153, -0.017201945185661316, -0.25557732582092285, 0.2953055799007416, -0.08015750348567963, -0.005379103124141693, 0.06556635349988937, -0.3127481937408447, 0.23397453129291534, 0.2195723056793213, -0.10531401634216309, -0.035970378667116165, -0.08461391925811768, -0.3430705964565277, 0.06673252582550049, 0.2411988526582718, -0.07697151601314545, -0.17450042068958282, 0.06817309558391571, 0.31769680976867676, -0.12262369692325592, -0.43666401505470276, -0.12795501947402954, -0.39517849683761597, -0.02840086631476879, 0.3278040587902069, -0.20265096426010132, 0.1320056915283203, -0.3070179522037506, -0.17737722396850586, 0.2891656756401062, 0.08813194185495377, 0.35107678174972534, 0.31460073590278625, 0.39154383540153503, 0.23008552193641663, -0.02115178480744362, 0.21317178010940552, 0.08144520223140717, 0.04785184562206268, 0.3019087612628937, -0.34373870491981506, -0.20159515738487244, 0.1421099156141281, 0.2047957330942154, -0.010776400566101074, -0.021041492000222206, 0.174776092171669, -0.12207930535078049, -0.1785658895969391, -0.29985570907592773, 0.08240197598934174, 0.23630042374134064, 0.004276469349861145, 0.4505695700645447, -0.17627757787704468, -0.23959268629550934, -0.1366189420223236, 0.11699940264225006, -0.39412981271743774, 0.16935624182224274, 0.08279258012771606, 0.12661007046699524, -0.4059774577617645, -0.29105955362319946, 0.11354519426822662, -0.22106531262397766, -0.34620046615600586, 0.45508503913879395, -0.21460124850273132, -0.1162017285823822, 0.37059763073921204, -0.19912368059158325, 0.0058396621607244015, -0.42946064472198486, -0.5180810689926147, -0.5285104513168335, -0.1057707741856575, -0.1225309669971466, 0.2804409861564636, 0.12790384888648987, -0.27205461263656616, 0.040865495800971985, -0.2450437694787979, -0.05726355314254761, -0.2034284472465515, -0.20239579677581787, -0.12560857832431793, 0.1898370087146759, -0.10435450077056885, 0.09319663047790527, 0.1623430997133255, -0.26623237133026123, 0.0006222724914550781, 0.33319205045700073, -0.10791733860969543, -0.13174089789390564, -0.043188393115997314, 0.20641112327575684, -0.05778853967785835, -0.15582893788814545, 0.07193668186664581, -0.18904653191566467, 0.020826727151870728, -0.10733214765787125, 0.14102080464363098, -0.15679121017456055, -0.13375845551490784, -0.39770203828811646, 0.05850288271903992, 0.24043422937393188, 0.299874484539032, 0.43793609738349915, -0.10935571789741516, 0.1725849211215973, 0.14212289452552795, 0.2045881748199463, 0.000966973602771759, -0.08461083471775055, -0.1092039942741394, -0.09298811852931976, -0.2612982988357544, -0.09873608499765396, 0.5622305274009705, -0.19267192482948303, -0.08414744585752487, 0.30492109060287476, 0.2855338454246521, 0.6209412813186646, -0.23775336146354675, -0.01797415316104889, 0.2120189666748047, 0.11066561192274094, -0.2812366485595703, 0.021245338022708893, -0.15429401397705078, 0.4173749089241028, 0.11713263392448425, 0.2055077999830246, -0.04053656756877899, -0.09562672674655914, 0.468093603849411, 0.47680604457855225, 0.45490261912345886, -0.07756181061267853, -0.061429351568222046, 0.33843767642974854, 0.09927822649478912, 0.06781497597694397, 0.29090845584869385, -0.04011823982000351, 0.10221906751394272, 0.44912105798721313, 0.0860428512096405, 0.11584340780973434, 0.15415726602077484, 0.1602237969636917, 0.11456042528152466, -0.29510170221328735, -0.09621857106685638, -0.031154446303844452, -0.4398851692676544, 0.11871448904275894, 0.19527319073677063, -0.27995023131370544, -0.28790125250816345, -0.22400638461112976, 0.03891924023628235, 0.3118307888507843, -0.2615015208721161, -0.02882443182170391, -0.08534909784793854, -0.13748207688331604, 0.054985567927360535, -0.14159463346004486, 0.18999449908733368, 0.04270908981561661, 0.34753966331481934, 0.17249026894569397, 0.1267651915550232, -0.2897913157939911, -0.4155068099498749, -0.1682109534740448, 0.2021012306213379, -0.21022963523864746, 0.1277056187391281, 0.26101160049438477, -0.09952418506145477, 0.006638933904469013, -0.28641217947006226, 0.4137367606163025, 0.3210078775882721, -0.4638625681400299, 0.11091426014900208, -0.23943091928958893, -0.032684069126844406, -0.15459099411964417, 0.3724828362464905, -0.09959503263235092, 0.023335695266723633, 0.1374358832836151, 0.09000901132822037, -0.10225018858909607, 0.10477758944034576, 0.23125535249710083, 0.59051513671875, -0.34886032342910767, 0.3921448588371277, 0.06626783311367035, 0.2609548270702362, -0.1692637950181961, -0.07236151397228241, -0.16786888241767883, -0.15737906098365784, 0.7602775692939758, -0.20706090331077576, 0.1216704398393631, -0.03058766759932041, 0.060802578926086426, -0.14276450872421265, 0.31561097502708435, 0.26489317417144775, -0.0626453310251236, -0.15209442377090454, -0.07807257026433945, -0.47864627838134766, -0.11055752635002136, -0.15738078951835632, -0.0412781648337841, 0.128343403339386, 0.043401025235652924, -0.08496437966823578, 0.13601154088974, 0.24013078212738037, -0.04507969319820404, 0.14129745960235596, 0.15295851230621338, -0.32259905338287354, -0.15020973980426788, -0.2596713602542877, -0.21392597258090973, -0.026764005422592163, -0.28660666942596436, 0.10739780962467194, -0.17633993923664093, 0.06326104700565338, -0.0757383406162262, -0.5492556095123291, 0.21008402109146118, 0.44010138511657715, 0.23097124695777893, 0.2580215632915497, 0.08154847472906113, 0.05821605026721954, -0.06584588438272476, -0.010860167443752289, -0.2202904224395752, 0.05964156612753868, 0.03239971771836281, -0.055719710886478424, 0.1383805274963379, -0.17264223098754883, -0.34116414189338684, -0.19158609211444855, -0.05598706007003784, 0.05989880859851837, 0.15275976061820984, -0.15397566556930542, 0.11721283942461014, -0.1827821582555771, 0.17942416667938232, -0.03966940566897392, 0.19676895439624786, 0.14300841093063354, 0.2128765881061554, -0.17488400638103485, -0.2909025251865387, 0.7315102815628052, -0.47188282012939453, -0.3282804787158966, -0.13904720544815063, 0.1773129254579544, -0.050823334604501724, -0.3606858253479004, -0.22097499668598175, -0.46226808428764343, 0.33886921405792236, -0.16179387271404266, -0.16813543438911438, -0.19187194108963013, -0.018518242985010147, 0.06544521450996399, -0.22005611658096313, 0.33761483430862427, 0.026286959648132324, -0.006134383380413055, 0.2342451512813568, -0.16426169872283936 ]
https://github.com/huggingface/datasets/issues/6393
More information. My code is structured as (1) load (2) map (3) filter (4) filter. It was always the second filter that failed. Combining the two filters into one seems to reliably work.
Filter occasionally hangs
### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2
33
Filter occasionally hangs ### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 More information. My code is structured as (1) load (2) map (3) filter (4) filter. It was always the second filter that failed. Combining the two filters into one seems to reliably work.
[ -0.30096906423568726, 0.02597421407699585, -0.05257953330874443, 0.20952379703521729, 0.3754666745662689, -0.19390510022640228, 0.14301031827926636, 0.054887741804122925, 0.15424728393554688, 0.05187126249074936, 0.2389901578426361, 0.46147793531417847, -0.21464863419532776, -0.03009072318673134, -0.30872005224227905, 0.1114143431186676, -0.05137152597308159, -0.027852483093738556, 0.09920519590377808, 0.16036245226860046, -0.3155032992362976, 0.31906235218048096, -0.07375752925872803, 0.06822347640991211, -0.16136373579502106, -0.19845013320446014, 0.3506864905357361, -0.05546840652823448, 0.23214593529701233, -0.38722938299179077, 0.1747329831123352, 0.09189824759960175, -0.1589815318584442, 0.7728317975997925, -0.00012215858441777527, -0.04899290204048157, 0.2929973900318146, 0.1235048696398735, -0.3755952715873718, -0.24063757061958313, -0.1394447237253189, 0.17444026470184326, 0.14568489789962769, 0.2743401825428009, 0.11740006506443024, 0.3826848268508911, -0.2808193266391754, -0.48091763257980347, 0.1362610012292862, 0.262790709733963, 0.11406268179416656, 0.15805108845233917, -0.2203568071126938, -0.03928745537996292, 0.16412398219108582, 0.28386151790618896, -0.16569431126117706, 0.1384364366531372, 0.4342837929725647, -0.2319408804178238, 0.019963441416621208, 0.5094876289367676, -0.051825448870658875, -0.25189608335494995, 0.08333374559879303, -0.24030384421348572, 0.5391094088554382, -0.5808924436569214, 0.3318960964679718, 0.09203226864337921, 0.20920701324939728, -0.09599485248327255, -0.2271856963634491, -0.26979392766952515, -0.0325140543282032, -0.4062414765357971, 0.2822688817977905, -0.26778945326805115, -0.38243919610977173, 0.07415119558572769, -0.07174347341060638, -0.24850736558437347, -0.04172705113887787, 0.05506323277950287, -0.38524821400642395, -0.041950054466724396, -0.08287319540977478, 0.31952887773513794, 0.02051348052918911, -0.1809902787208557, 0.3374343812465668, -0.15232276916503906, 0.10279670357704163, 0.0338832251727581, -0.320439875125885, 0.14981460571289062, 0.32329919934272766, -0.10623116791248322, -0.19607868790626526, 0.04796188697218895, -0.06836247444152832, 0.10694834589958191, 0.06813060492277145, 0.20779913663864136, 0.2746477723121643, -0.2669321298599243, 0.1534620225429535, 0.26842108368873596, 0.5857101082801819, 0.03632689267396927, -0.19754558801651, -0.042980533093214035, 0.2444027066230774, -0.10406529903411865, 0.1812964677810669, -0.1634543240070343, 0.049592144787311554, -0.13962090015411377, -0.42950454354286194, 0.47244662046432495, -0.19204217195510864, 0.2642306685447693, 0.47834035754203796, 0.3007262647151947, 0.15600067377090454, 0.23237928748130798, 0.23530134558677673, -0.08080479502677917, 0.010758168995380402, 0.15972431004047394, -0.018384790048003197, -0.3211318552494049, 0.0603594034910202, -0.02920679748058319, 0.05059123784303665, -0.3909303843975067, -0.01912793144583702, -0.0656190812587738, 0.27152830362319946, -0.22173044085502625, 0.10742254555225372, -0.21652516722679138, 0.30713003873825073, 0.815830647945404, -0.11954125761985779, 0.4207233190536499, -0.05083458870649338, -0.3252052068710327, -0.043946415185928345, 0.16144347190856934, 0.07767023891210556, -0.14577627182006836, 0.13695605099201202, 0.10111106187105179, 0.0397348552942276, 0.3087897300720215, 0.16119825839996338, 0.025595836341381073, 0.3499036729335785, -0.24409344792366028, 0.273067831993103, -0.4093293845653534, -0.290283203125, -0.1925901174545288, 0.18834316730499268, 0.4012465476989746, -0.4953746795654297, 0.07031391561031342, -0.543492317199707, 0.042939718812704086, 0.17384999990463257, 0.2965725362300873, 0.004671752452850342, 0.12523029744625092, -0.1996784210205078, 0.11749480664730072, 0.47834721207618713, 0.05080518126487732, -0.3538774251937866, 0.2792867124080658, -0.08162029087543488, 0.33871784806251526, -0.30860528349876404, -0.04364258795976639, 0.14126744866371155, -0.15425962209701538, 0.2886386513710022, 0.024724610149860382, -0.3426617681980133, -0.1345277726650238, -0.24623608589172363, 0.3697108328342438, 0.10707489401102066, -0.006040439009666443, 0.13190066814422607, -0.3226601183414459, 0.027495186775922775, -0.30991750955581665, 0.034818634390830994, 0.2497461438179016, 0.06779227405786514, 0.2384631335735321, 0.7277429699897766, -0.09671452641487122, -0.048241306096315384, -0.3249400854110718, -0.09997306764125824, 0.295716255903244, -0.07601582258939743, -0.37275952100753784, -0.2984500229358673, -0.17120975255966187, -0.14105930924415588, 0.4908132553100586, 0.0005852356553077698, -0.07880686223506927, -0.02149965614080429, -0.08057937026023865, -0.02308471128344536, 0.028156429529190063, -0.09993425011634827, 0.29623517394065857, -0.16036270558834076, 0.011846102774143219, 0.0840354785323143, 0.3640569746494293, 0.15298543870449066, -0.26884645223617554, -0.3229367733001709, 0.05970017984509468, 0.05169433355331421, 0.0011670850217342377, -0.1807565987110138, 0.3799944221973419, 0.19311292469501495, -0.13444319367408752, -0.05958973243832588, -0.14553724229335785, 0.0964306965470314, 0.18517528474330902, -0.1577790081501007, 0.08031558245420456, 0.1754448413848877, -0.21804383397102356, -0.006302308291196823, 0.1758466362953186, -0.08128504455089569, 0.4555932879447937, -0.04008080065250397, 0.1904747486114502, 0.3864647448062897, 0.2877865433692932, -0.20930032432079315, -0.13172124326229095, 0.34566983580589294, -0.09043370932340622, 0.156290203332901, 0.10064392536878586, -0.38213875889778137, 0.373517781496048, 0.3502994775772095, 0.00040955841541290283, -0.0442977175116539, 0.36772826313972473, 0.012563427910208702, 0.03166026622056961, 0.10878192633390427, 0.1528548300266266, 0.47633489966392517, 0.0015957914292812347, 0.06268306076526642, -0.2015974223613739, -0.3546091318130493, -0.1536024957895279, 0.13384398818016052, 0.2470507174730301, 0.11562451720237732, 0.3744719624519348, 0.2573322057723999, 0.11552727222442627, -0.1330862045288086, -0.20987188816070557, 0.054511360824108124, 0.18324162065982819, -0.20850862562656403, 0.32841259241104126, -0.14753907918930054, -0.18156029284000397, 0.11190054565668106, -0.08143965899944305, -0.3972737193107605, -0.4468931555747986, 0.04132175073027611, 0.28606563806533813, -0.21107493340969086, 0.1762298345565796, -0.029198981821537018, 0.4397181570529938, 0.20218351483345032, -0.20271703600883484, -0.4697800278663635, -0.2544238567352295, -0.22395576536655426, -0.10121496021747589, 0.3328094482421875, 0.039894890040159225, 0.377826064825058, 0.3114931285381317, -0.12378782033920288, -0.1535051465034485, -0.4504591226577759, 0.1345139741897583, -0.055636584758758545, 0.5857586860656738, 0.2732170522212982, 0.21510139107704163, -0.2111538052558899, 0.03649416193366051, 0.20336246490478516, -0.1546955108642578, 0.0056205615401268005, 0.18293499946594238, 0.050687409937381744, 0.03965506702661514, -0.4210343360900879, 0.1723051369190216, -0.214345782995224, -0.42517268657684326, 0.1459520161151886, -0.4265761971473694, -0.0692531019449234, 0.10761648416519165, 0.11360848695039749, -0.031220844015479088, -0.3292095363140106, -0.10440395027399063, -0.24491074681282043, 0.04342402517795563, 0.1603083610534668, -0.06284201145172119, -0.13911394774913788, 0.09258013963699341, 0.011162780225276947, 0.0712573379278183, 0.18946826457977295, -0.6648300290107727, 0.04576753452420235, -0.1344851851463318, 0.14358094334602356, 0.05238628387451172, -0.20131340622901917, 0.22288554906845093, 0.07150319218635559, 0.04726792126893997, -0.13999947905540466, -0.29461073875427246, -0.009020816534757614, 0.04762385040521622, 0.20578932762145996, -0.020114364102482796, 0.8640385270118713, 0.049269333481788635, 0.49697980284690857, 0.2915005683898926, -0.09894101321697235, -0.0890880674123764, 0.2081741839647293, 0.49567827582359314, -0.07795512676239014, -0.26852160692214966, -0.11163496226072311, -0.13077308237552643, -0.39034804701805115, -0.0630289614200592, 0.11525110900402069, -0.23390033841133118, 0.006894268095493317, 0.16221466660499573, 0.019263096153736115, -0.4720161557197571, 0.1614166498184204, -0.21171489357948303, 0.3202182650566101, 0.08506959676742554, 0.04469373822212219, -0.17332524061203003, 0.07559751719236374, -0.02682531625032425, 0.3083011507987976, 0.3965960741043091, -0.17545603215694427, -0.1288203001022339, -0.1855579912662506, -0.4121468961238861, 0.23828881978988647, 0.16878491640090942, 0.46255117654800415, -0.384213924407959, -0.047283098101615906, 0.08073903620243073, -0.18059910833835602, 0.6909502744674683, -0.35861772298812866, -0.2230122834444046, 0.2559250593185425, -0.1909227967262268, -0.6666407585144043, 0.05174802988767624, -0.019785091280937195, 0.3662782311439514, 0.31363460421562195, 0.43605175614356995, -0.14041383564472198, -0.188848078250885, -0.06975772976875305, 0.13732437789440155, -0.19300003349781036, -0.10857756435871124, -0.1716097891330719, -0.3717193603515625, -0.07433148473501205, 0.33237239718437195, 0.24337175488471985, -0.03896145522594452, -0.1261746883392334, -0.3240574598312378, 0.08765389025211334, -0.44827568531036377, 0.029681973159313202, 0.21189641952514648, 0.06563781946897507, -0.10597309470176697, 0.4411097764968872, -0.0029572974890470505, -0.2661440670490265, 0.07852374017238617, 0.32379311323165894, -0.37424951791763306, -0.23328599333763123, 0.30141085386276245, -0.01690429449081421, 0.35564419627189636, 0.5865717530250549, -0.26659852266311646, 0.2803729176521301, -0.23391324281692505, 0.1725420206785202, 0.10084380954504013, 0.057121407240629196, 0.08292381465435028, 0.25257864594459534, -0.24072784185409546, 0.046538010239601135, 0.1759720742702484, 0.220591738820076, -0.2228424847126007, 0.8381847739219666, -0.2753066122531891, -0.18630242347717285, 0.2531193792819977, -0.01932463049888611, 0.7733660340309143, 0.06057285889983177, -0.12404569983482361, 0.016981929540634155, -0.17954574525356293, -0.06577043980360031, -0.04494518041610718, 0.09593498706817627, -0.015139296650886536, -0.46882450580596924, -0.041056692600250244, -0.23370356857776642, 0.27656298875808716, -0.0354534350335598, -0.025219954550266266, 0.09553183615207672, -0.26802247762680054, 0.2731406092643738, 0.22492261230945587, -0.07994268834590912, -0.02609351836144924, -0.13991302251815796, -0.40385541319847107, 0.04197392985224724, 0.25403884053230286, -0.09436701238155365, -0.1798439770936966, 0.05103370174765587, 0.2661448121070862, -0.12222392857074738, -0.38377106189727783, -0.09912208467721939, -0.41374534368515015, -0.03979909420013428, 0.28289398550987244, -0.17515920102596283, 0.1238035038113594, -0.24088969826698303, -0.18986032903194427, 0.20450812578201294, 0.07693179696798325, 0.3286108076572418, 0.3275262713432312, 0.3998643457889557, 0.1870238482952118, -0.09789769351482391, 0.21101202070713043, 0.08710117638111115, 0.05668695271015167, 0.2900536060333252, -0.3572077751159668, -0.22817736864089966, 0.14022421836853027, 0.23858805000782013, -0.055674415081739426, -0.0395771786570549, 0.16154123842716217, -0.06816604733467102, -0.12894825637340546, -0.3140127658843994, 0.05919550359249115, 0.2298865020275116, 0.032225459814071655, 0.4478716552257538, -0.18982118368148804, -0.23657402396202087, -0.13138245046138763, 0.1211249977350235, -0.37297487258911133, 0.18142494559288025, 0.07943117618560791, 0.14364683628082275, -0.3835245370864868, -0.26700425148010254, 0.036513492465019226, -0.19159463047981262, -0.3584216237068176, 0.4719482660293579, -0.2400391697883606, -0.12899643182754517, 0.339489221572876, -0.1964605748653412, 0.023783648386597633, -0.4100828766822815, -0.4884149134159088, -0.5394426584243774, -0.14582303166389465, -0.12795886397361755, 0.29069945216178894, 0.12166573107242584, -0.265770822763443, 0.0967179611325264, -0.2077975869178772, 0.024405455216765404, -0.18898439407348633, -0.183990478515625, -0.11747217178344727, 0.21183636784553528, -0.08070533722639084, 0.08724682033061981, 0.18482142686843872, -0.26453882455825806, -0.027408666908740997, 0.32341545820236206, -0.1295994520187378, -0.10061760246753693, -0.026500292122364044, 0.2257010042667389, -0.0557708740234375, -0.12686854600906372, 0.06605072319507599, -0.22968140244483948, 0.01800297573208809, -0.17149516940116882, 0.1496245265007019, -0.14519552886486053, -0.18026240170001984, -0.4565587639808655, 0.11964169144630432, 0.2326795756816864, 0.267425000667572, 0.4559766352176666, -0.14037977159023285, 0.14500375092029572, 0.13070623576641083, 0.19839893281459808, 0.01538102701306343, -0.09338798373937607, -0.06207304075360298, -0.09003841876983643, -0.25362616777420044, -0.1467154324054718, 0.5602635145187378, -0.17727506160736084, -0.10759683698415756, 0.3001291751861572, 0.3096590042114258, 0.6324417591094971, -0.23631682991981506, 0.0286930650472641, 0.13085918128490448, 0.0734182745218277, -0.2772248387336731, 0.06526269763708115, -0.12094432860612869, 0.39993804693222046, 0.12648873031139374, 0.21357491612434387, -0.027676329016685486, -0.1288737952709198, 0.43757039308547974, 0.4940262734889984, 0.48487043380737305, -0.06717126071453094, -0.08133083581924438, 0.3251010477542877, 0.10846324265003204, 0.10265149176120758, 0.35890448093414307, -0.06328152120113373, 0.08199645578861237, 0.4270881414413452, 0.04545547813177109, 0.10339133441448212, 0.10347971320152283, 0.18840286135673523, 0.10274647176265717, -0.328926146030426, -0.05863184481859207, 0.04777608811855316, -0.4250045716762543, 0.09301544725894928, 0.21899759769439697, -0.26500168442726135, -0.27290835976600647, -0.2841710150241852, 0.026987679302692413, 0.39253315329551697, -0.25735926628112793, -0.0443250946700573, -0.10342026501893997, -0.1458308845758438, 0.06812487542629242, -0.11628846079111099, 0.1842973232269287, 0.006772083230316639, 0.4697079360485077, 0.19035732746124268, 0.0883808508515358, -0.301172137260437, -0.4367504119873047, -0.14673921465873718, 0.195431187748909, -0.22518034279346466, 0.1831478476524353, 0.25313690304756165, -0.11671246588230133, 0.01726142317056656, -0.2690633535385132, 0.4113216698169708, 0.3193005919456482, -0.46408089995384216, 0.12222292274236679, -0.2062627673149109, -0.024633388966321945, -0.1642867922782898, 0.36156412959098816, -0.10662712901830673, 0.0499153696000576, 0.16838136315345764, 0.07666515558958054, -0.105959452688694, 0.0707184374332428, 0.22362187504768372, 0.6148039102554321, -0.37629827857017517, 0.3964694142341614, 0.08237111568450928, 0.2588425576686859, -0.1255982220172882, -0.06941556930541992, -0.1826285570859909, -0.1621251106262207, 0.7547820806503296, -0.23229673504829407, 0.12244418263435364, -0.03305216133594513, 0.05191965401172638, -0.13025368750095367, 0.2914265990257263, 0.27430233359336853, -0.05877560004591942, -0.23851238191127777, -0.10148598253726959, -0.5146156549453735, -0.15838681161403656, -0.1586916446685791, -0.0011813342571258545, 0.14377371966838837, 0.05465543270111084, -0.04658330976963043, 0.141521155834198, 0.2831299304962158, -0.053585611283779144, 0.16072562336921692, 0.16210336983203888, -0.3307681679725647, -0.15436750650405884, -0.2914048433303833, -0.18379266560077667, -0.02823455259203911, -0.2966017723083496, 0.12556758522987366, -0.179327130317688, 0.052680522203445435, -0.06832738220691681, -0.5547981262207031, 0.23205289244651794, 0.4138571619987488, 0.27815645933151245, 0.24477671086788177, 0.11221490800380707, 0.07084183394908905, -0.07425365597009659, -0.04126869887113571, -0.21369583904743195, 0.07393220067024231, 0.012047700583934784, -0.040367819368839264, 0.17518119513988495, -0.24421817064285278, -0.3360763490200043, -0.22657424211502075, -0.0717935860157013, 0.05392497032880783, 0.21050792932510376, -0.1523701399564743, 0.13049188256263733, -0.16811348497867584, 0.19783861935138702, -0.049986761063337326, 0.24419306218624115, 0.10571097582578659, 0.23966923356056213, -0.23796674609184265, -0.28934934735298157, 0.7331472635269165, -0.5382385849952698, -0.33887404203414917, -0.15934927761554718, 0.13479828834533691, -0.08268605172634125, -0.32126978039741516, -0.27183228731155396, -0.4515194296836853, 0.3253094255924225, -0.10763856768608093, -0.23458942770957947, -0.21262623369693756, -0.061802275478839874, 0.06622208654880524, -0.23623111844062805, 0.31903570890426636, 0.04580588638782501, -0.044828273355960846, 0.18302291631698608, -0.1636168509721756 ]
https://github.com/huggingface/datasets/issues/6393
@lhoestq it'd be great if someone had a chance to look at this. I suspect it is impacting many users given the other issue that I linked.
Filter occasionally hangs
### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2
27
Filter occasionally hangs ### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 @lhoestq it'd be great if someone had a chance to look at this. I suspect it is impacting many users given the other issue that I linked.
[ -0.34762266278266907, 0.039869725704193115, -0.07918084412813187, 0.15619584918022156, 0.34971845149993896, -0.21276167035102844, 0.09959720075130463, 0.061069048941135406, 0.08661271631717682, 0.08014142513275146, 0.26038306951522827, 0.47290682792663574, -0.2593033015727997, 0.034196555614471436, -0.3031097650527954, 0.12562379240989685, -0.053414877504110336, -0.09160961210727692, 0.09250569343566895, 0.1387653946876526, -0.30213791131973267, 0.27341747283935547, -0.10337778925895691, 0.06522050499916077, -0.19676388800144196, -0.22014762461185455, 0.41489654779434204, -0.07009056210517883, 0.19433045387268066, -0.4089694619178772, 0.1250193566083908, 0.08165092766284943, -0.19538499414920807, 0.742972195148468, -0.00011833806638605893, -0.05977969989180565, 0.30795595049858093, 0.16053834557533264, -0.41901901364326477, -0.23780547082424164, -0.12260556221008301, 0.13702687621116638, 0.16980522871017456, 0.26086127758026123, 0.0745483934879303, 0.35351473093032837, -0.2817402184009552, -0.4440605044364929, 0.12138382345438004, 0.2890968918800354, 0.16958913207054138, 0.18994247913360596, -0.23407471179962158, -0.06673246622085571, 0.16827115416526794, 0.29634296894073486, -0.19830764830112457, 0.0898570865392685, 0.4344266653060913, -0.21456383168697357, 0.03130091726779938, 0.5156630873680115, -0.008020691573619843, -0.23335160315036774, 0.071232870221138, -0.25824031233787537, 0.4659820795059204, -0.5628064870834351, 0.3328648507595062, 0.10065527260303497, 0.26672452688217163, -0.08620233833789825, -0.24373859167099, -0.24541519582271576, 0.013104215264320374, -0.43744754791259766, 0.24364325404167175, -0.198743999004364, -0.41808682680130005, 0.07309798896312714, -0.10514269769191742, -0.24265602231025696, -0.06228145956993103, -0.026593420654535294, -0.38837704062461853, 0.01358105055987835, -0.11428826302289963, 0.2518026828765869, -0.000519090797752142, -0.1785261631011963, 0.32751739025115967, -0.11755324900150299, 0.06386728584766388, 0.019172757863998413, -0.3249472677707672, 0.11735475808382034, 0.2724475860595703, -0.05196382477879524, -0.18309281766414642, 0.10464462637901306, -0.06994599103927612, 0.15024057030677795, 0.06934293359518051, 0.19940614700317383, 0.26076722145080566, -0.25797489285469055, 0.12914235889911652, 0.228562593460083, 0.6417199969291687, 0.02707751840353012, -0.17824628949165344, -0.058688778430223465, 0.24664975702762604, -0.1361064463853836, 0.1694885790348053, -0.19790932536125183, 0.04048449546098709, -0.1850440949201584, -0.43174391984939575, 0.44724351167678833, -0.1840699017047882, 0.2644502818584442, 0.465693861246109, 0.26656803488731384, 0.13162702322006226, 0.23665842413902283, 0.18541471660137177, -0.09530593454837799, 0.0013256967067718506, 0.14748233556747437, -0.038859691470861435, -0.35809841752052307, 0.07415983825922012, -0.03035145066678524, 0.05305420607328415, -0.37505653500556946, 0.00003340095281600952, -0.04747713357210159, 0.28555867075920105, -0.1910507082939148, 0.11287448555231094, -0.16357538104057312, 0.3023252487182617, 0.7919279932975769, -0.11855429410934448, 0.402737557888031, -0.05459299311041832, -0.3630562126636505, -0.027872629463672638, 0.1726117730140686, 0.0949101448059082, -0.17027443647384644, 0.09818100184202194, 0.15939782559871674, 0.017068900167942047, 0.22962409257888794, 0.1873917132616043, -0.00950840674340725, 0.28463947772979736, -0.17110174894332886, 0.30758899450302124, -0.4024818241596222, -0.26647621393203735, -0.1809878647327423, 0.18378692865371704, 0.34438443183898926, -0.5287226438522339, 0.07699775695800781, -0.5359548330307007, 0.040649645030498505, 0.1845584511756897, 0.289273202419281, 0.013366181403398514, 0.10761375725269318, -0.1653004288673401, 0.07285365462303162, 0.47414329648017883, 0.058401189744472504, -0.33684027194976807, 0.22395451366901398, -0.07668980211019516, 0.3373243808746338, -0.2988271713256836, -0.046497248113155365, 0.16672825813293457, -0.1287013739347458, 0.27757251262664795, 0.0367913544178009, -0.29176244139671326, -0.11557130515575409, -0.2826578617095947, 0.34181421995162964, 0.10788645595312119, 0.006592996418476105, 0.09424625337123871, -0.3428276777267456, 0.03336469084024429, -0.3285466730594635, 0.05197696387767792, 0.22713424265384674, 0.04997929185628891, 0.2843700051307678, 0.7644592523574829, -0.07418972998857498, -0.025687364861369133, -0.3482162356376648, -0.03601490333676338, 0.2829737961292267, -0.02194477990269661, -0.3330732583999634, -0.28318580985069275, -0.20775413513183594, -0.1586320400238037, 0.5021387338638306, -0.02648177742958069, -0.094988152384758, 0.023185014724731445, -0.13007964193820953, 0.02354748547077179, 0.0945710614323616, -0.08169697225093842, 0.22256255149841309, -0.15060046315193176, 0.025743801146745682, 0.05742480233311653, 0.3350575566291809, 0.14309033751487732, -0.24523593485355377, -0.2997996509075165, 0.07127059996128082, -0.0050674919039011, 0.02199510484933853, -0.20913977921009064, 0.386111855506897, 0.23004412651062012, -0.15657462179660797, -0.008969426155090332, -0.04049167037010193, 0.12029112130403519, 0.16519761085510254, -0.15318357944488525, 0.08822483569383621, 0.1798197329044342, -0.16082867980003357, -0.044558584690093994, 0.1982254981994629, -0.06482893973588943, 0.4354393482208252, -0.02032778412103653, 0.22506681084632874, 0.4559047222137451, 0.3077523112297058, -0.20113018155097961, -0.1520150750875473, 0.31600964069366455, -0.12097494304180145, 0.12348723411560059, 0.06234588474035263, -0.37835192680358887, 0.39810284972190857, 0.35887882113456726, 0.012039639055728912, -0.030883509665727615, 0.3761524558067322, -0.05806828290224075, 0.007969662547111511, 0.11887694150209427, 0.1785344034433365, 0.4431987404823303, 0.03800349682569504, 0.08364519476890564, -0.21066725254058838, -0.32939612865448, -0.21329261362552643, 0.18813253939151764, 0.2858172059059143, 0.06832684576511383, 0.3256528377532959, 0.2599632143974304, 0.09108665585517883, -0.15750662982463837, -0.19377729296684265, 0.022745512425899506, 0.21031442284584045, -0.1955784559249878, 0.29941093921661377, -0.23789973556995392, -0.21012136340141296, 0.13088762760162354, -0.06009948253631592, -0.43326741456985474, -0.47823119163513184, 0.07818223536014557, 0.2848493456840515, -0.19806866347789764, 0.16552698612213135, -0.03837230056524277, 0.4929399788379669, 0.22599095106124878, -0.12417210638523102, -0.489111989736557, -0.3145759105682373, -0.24231703579425812, -0.04337327182292938, 0.30488935112953186, 0.0607912577688694, 0.45146656036376953, 0.3085575997829437, -0.04736985266208649, -0.20824959874153137, -0.5084399580955505, 0.141439750790596, -0.016284748911857605, 0.5757306218147278, 0.27006322145462036, 0.18606586754322052, -0.1551036536693573, 0.07506528496742249, 0.18281397223472595, -0.19096893072128296, -0.00315716490149498, 0.1684390902519226, 0.06459532678127289, 0.006487015634775162, -0.43632906675338745, 0.1802375465631485, -0.22500993311405182, -0.4335063099861145, 0.1566586047410965, -0.33833128213882446, -0.10206414759159088, 0.15904709696769714, 0.0922955572605133, 0.0070542022585868835, -0.313534677028656, -0.11129457503557205, -0.2713833451271057, 0.0638996809720993, 0.13540872931480408, -0.11872244626283646, -0.15950191020965576, 0.11258380115032196, -0.011746548116207123, 0.05546622723340988, 0.14409677684307098, -0.6582191586494446, 0.014168526977300644, -0.2144862562417984, 0.15505877137184143, 0.07480533421039581, -0.167827770113945, 0.19888833165168762, 0.050332676619291306, 0.007907703518867493, -0.11718213558197021, -0.2757749557495117, -0.021709859371185303, 0.008698664605617523, 0.22216790914535522, -0.05095259100198746, 0.8232249021530151, 0.08498245477676392, 0.47489044070243835, 0.24824738502502441, -0.07518000900745392, -0.10125018656253815, 0.1492597460746765, 0.524800181388855, -0.1035945937037468, -0.23198682069778442, -0.10344263911247253, -0.14763714373111725, -0.4092419147491455, -0.06689897179603577, 0.13689778745174408, -0.21886925399303436, 0.0452730655670166, 0.1764121651649475, 0.07885804772377014, -0.4599109888076782, 0.10661599040031433, -0.20318564772605896, 0.32883912324905396, 0.11561491340398788, 0.07871119678020477, -0.1288605034351349, 0.021410230547189713, -0.020394060760736465, 0.31427812576293945, 0.33161261677742004, -0.23517881333827972, -0.19175417721271515, -0.22654679417610168, -0.3989598751068115, 0.2631586194038391, 0.1938042938709259, 0.4808461666107178, -0.3606410622596741, -0.07855647057294846, 0.09561742842197418, -0.15275365114212036, 0.6221670508384705, -0.391969233751297, -0.25867342948913574, 0.23760196566581726, -0.15305103361606598, -0.6373888254165649, 0.042704761028289795, -0.10481016337871552, 0.3696485161781311, 0.28603824973106384, 0.405572772026062, -0.07629474997520447, -0.21417966485023499, -0.04953007400035858, 0.13392332196235657, -0.22386838495731354, -0.057896073907613754, -0.16096451878547668, -0.34403419494628906, -0.08113999664783478, 0.3335385024547577, 0.22940200567245483, -0.05490148067474365, -0.19050332903862, -0.3218235969543457, 0.08974950760602951, -0.4314078390598297, -0.008582502603530884, 0.2438720464706421, 0.08656171709299088, -0.10535220801830292, 0.45196089148521423, -0.007306862622499466, -0.2543174624443054, 0.08631599694490433, 0.29943203926086426, -0.3670489490032196, -0.18817850947380066, 0.2803956866264343, -0.015864256769418716, 0.3672085106372833, 0.5487056970596313, -0.2718013525009155, 0.3298632502555847, -0.2602023482322693, 0.20366688072681427, 0.0690840631723404, 0.03625677525997162, 0.08874805271625519, 0.30140170454978943, -0.23552736639976501, 0.03205517679452896, 0.1464821994304657, 0.24650530517101288, -0.20668914914131165, 0.792281985282898, -0.22282378375530243, -0.1457388550043106, 0.2741357684135437, -0.03873405605554581, 0.7352373600006104, 0.11725197732448578, -0.04834805056452751, 0.012395013123750687, -0.19673380255699158, -0.06944577395915985, -0.027154676616191864, 0.09793359041213989, -0.05977977067232132, -0.4549480974674225, -0.009066332131624222, -0.21935753524303436, 0.29583555459976196, -0.05150335654616356, -0.020598940551280975, 0.07008123397827148, -0.2786204516887665, 0.22081923484802246, 0.19228100776672363, -0.08076288551092148, -0.07502377033233643, -0.11915856599807739, -0.3570958375930786, 0.10356782376766205, 0.26570993661880493, -0.0706113949418068, -0.16265207529067993, 0.04273754358291626, 0.2738263010978699, -0.11782317608594894, -0.41611042618751526, -0.1235184445977211, -0.3582161068916321, -0.01986665278673172, 0.3442065715789795, -0.18430669605731964, 0.1534147411584854, -0.29850515723228455, -0.19134297966957092, 0.2758253812789917, 0.05091062933206558, 0.39352941513061523, 0.3068365156650543, 0.40416043996810913, 0.2559480369091034, -0.007431626319885254, 0.210866779088974, 0.06182670593261719, 0.03248314559459686, 0.26829853653907776, -0.3303700387477875, -0.19773724675178528, 0.12674495577812195, 0.19458946585655212, -0.0412861593067646, -0.06927820295095444, 0.18523986637592316, -0.08443161100149155, -0.18075042963027954, -0.3283035159111023, 0.10815632343292236, 0.21136479079723358, 0.014207515865564346, 0.48927590250968933, -0.15336742997169495, -0.22367167472839355, -0.142656147480011, 0.14929652214050293, -0.40697407722473145, 0.20329917967319489, 0.09289620816707611, 0.1347227543592453, -0.4081798195838928, -0.30578547716140747, 0.09834813326597214, -0.20408637821674347, -0.33490148186683655, 0.4568106532096863, -0.19040003418922424, -0.11349519342184067, 0.391382098197937, -0.16536490619182587, -0.02389657497406006, -0.43707841634750366, -0.5273158550262451, -0.5043119788169861, -0.08384247124195099, -0.1241655945777893, 0.25234454870224, 0.15618544816970825, -0.286591500043869, 0.026417255401611328, -0.22979897260665894, -0.049845028668642044, -0.2424241006374359, -0.20935003459453583, -0.1340237855911255, 0.1832839995622635, -0.08415195345878601, 0.04251813888549805, 0.20924334228038788, -0.25886690616607666, 0.030083537101745605, 0.3372502028942108, -0.10902953147888184, -0.1623886525630951, -0.025640208274126053, 0.18465876579284668, -0.06489229947328568, -0.17846201360225677, 0.036355309188365936, -0.18684396147727966, 0.0041993968188762665, -0.12227354943752289, 0.14108872413635254, -0.11472829431295395, -0.13011598587036133, -0.4131488502025604, 0.0562792606651783, 0.219748854637146, 0.32064107060432434, 0.44109854102134705, -0.1432364135980606, 0.1781224012374878, 0.1583939641714096, 0.1688568890094757, -0.022065544500947, -0.08408942818641663, -0.10719360411167145, -0.08322938531637192, -0.24522747099399567, -0.11375614255666733, 0.5569900870323181, -0.18018782138824463, -0.10435710102319717, 0.3258795142173767, 0.32500821352005005, 0.6249844431877136, -0.22426731884479523, -0.021689753979444504, 0.23422612249851227, 0.13931332528591156, -0.27473360300064087, 0.01873255893588066, -0.16832581162452698, 0.40567928552627563, 0.12620458006858826, 0.199588805437088, 0.021956145763397217, -0.10522106289863586, 0.4803733825683594, 0.4718055725097656, 0.449034720659256, -0.08207070827484131, -0.06424504518508911, 0.29923322796821594, 0.10490842163562775, 0.058472372591495514, 0.3391140401363373, -0.08494560420513153, 0.08140355348587036, 0.43672120571136475, 0.06510057300329208, 0.08990360051393509, 0.14293073117733002, 0.15639686584472656, 0.14478325843811035, -0.28642910718917847, -0.07149536907672882, -0.0490836426615715, -0.40799105167388916, 0.12099450826644897, 0.20438283681869507, -0.27613455057144165, -0.26448172330856323, -0.23643310368061066, 0.00561455637216568, 0.3399961590766907, -0.24789905548095703, -0.019963465631008148, -0.09825976192951202, -0.14253517985343933, 0.05764397978782654, -0.10416284203529358, 0.16194789111614227, 0.024794258177280426, 0.36095312237739563, 0.16974666714668274, 0.09981454908847809, -0.29933226108551025, -0.36940670013427734, -0.20358921587467194, 0.22960026562213898, -0.17446930706501007, 0.1362975388765335, 0.21810638904571533, -0.07150857895612717, 0.006070215255022049, -0.2290862500667572, 0.43269506096839905, 0.31691014766693115, -0.464248389005661, 0.08082926273345947, -0.21860067546367645, -0.04232938587665558, -0.1356588751077652, 0.38542065024375916, -0.12373161315917969, 0.011433271691203117, 0.1651395708322525, 0.11088447272777557, -0.13261304795742035, 0.08231561630964279, 0.20878437161445618, 0.576943039894104, -0.3785835802555084, 0.3939449191093445, 0.09939975291490555, 0.22343291342258453, -0.16121162474155426, -0.08957558870315552, -0.19789844751358032, -0.18288762867450714, 0.7618508338928223, -0.22955068945884705, 0.11496253311634064, -0.10541261732578278, 0.08121158927679062, -0.10148155689239502, 0.35213834047317505, 0.2618847191333771, -0.08270522952079773, -0.1340761035680771, -0.08686436712741852, -0.4979637861251831, -0.1441718488931656, -0.17086580395698547, -0.028138160705566406, 0.11426949501037598, 0.08504986017942429, -0.07538273930549622, 0.14903756976127625, 0.26919955015182495, -0.07026609778404236, 0.1042046844959259, 0.15422560274600983, -0.3514806628227234, -0.10457920283079147, -0.2619319260120392, -0.21827004849910736, -0.047609489411115646, -0.31691884994506836, 0.13189953565597534, -0.19645610451698303, 0.08946619182825089, -0.08087123930454254, -0.5090781450271606, 0.21142765879631042, 0.4211352467536926, 0.24576100707054138, 0.2559519112110138, 0.07991655170917511, 0.08054281771183014, -0.06756512075662613, -0.07666219770908356, -0.25104472041130066, 0.07014742493629456, 0.023267410695552826, -0.07778052240610123, 0.12716472148895264, -0.1337226778268814, -0.36311760544776917, -0.19703319668769836, -0.0397169291973114, 0.06940785050392151, 0.1745479255914688, -0.08277025073766708, 0.11129898577928543, -0.14008310437202454, 0.1798686683177948, -0.04608243703842163, 0.2317182868719101, 0.12662512063980103, 0.18435904383659363, -0.21284759044647217, -0.324655681848526, 0.6803197860717773, -0.4893970191478729, -0.35175833106040955, -0.14198704063892365, 0.16632458567619324, -0.03172960504889488, -0.36911773681640625, -0.22493357956409454, -0.44844818115234375, 0.3187989890575409, -0.14302700757980347, -0.1455385386943817, -0.1671723574399948, -0.02899579331278801, 0.070010244846344, -0.2290671318769455, 0.30777642130851746, 0.021346647292375565, -0.008585944771766663, 0.1914994716644287, -0.1227814257144928 ]
https://github.com/huggingface/datasets/issues/6393
Hi ! Sorry for the late response. Was it happening after the first or the second filter ? It looks like an issue with the garbage collector (which makes it random). Maybe datasets created with `filter` are not always handled properly ? cc @mariosasko
Filter occasionally hangs
### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2
44
Filter occasionally hangs ### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 Hi ! Sorry for the late response. Was it happening after the first or the second filter ? It looks like an issue with the garbage collector (which makes it random). Maybe datasets created with `filter` are not always handled properly ? cc @mariosasko
[ -0.29349881410598755, -0.0039390623569488525, -0.07677945494651794, 0.1827934831380844, 0.382412850856781, -0.21573856472969055, 0.056217312812805176, 0.0004232563078403473, 0.11997350305318832, 0.09813044220209122, 0.30350425839424133, 0.47646021842956543, -0.26908016204833984, -0.015265986323356628, -0.3607511520385742, 0.09072135388851166, -0.06899818778038025, -0.06376324594020844, 0.12306524813175201, 0.11459225416183472, -0.3112463653087616, 0.2758966386318207, -0.10712847858667374, 0.07480281591415405, -0.18976546823978424, -0.22555461525917053, 0.3965842127799988, -0.09409189224243164, 0.1728515923023224, -0.4014948308467865, 0.15296755731105804, 0.07309307903051376, -0.15152043104171753, 0.8047162890434265, -0.00011928572348551825, -0.06833429634571075, 0.32069942355155945, 0.1355447620153427, -0.3955715596675873, -0.23554711043834686, -0.137983039021492, 0.17448440194129944, 0.11170303076505661, 0.2362494319677353, 0.11362752318382263, 0.42467182874679565, -0.3107353746891022, -0.500739574432373, 0.13286465406417847, 0.26583629846572876, 0.15017125010490417, 0.1451290100812912, -0.2303861677646637, -0.06576235592365265, 0.1557760238647461, 0.34405219554901123, -0.1935659497976303, 0.08506672084331512, 0.41996270418167114, -0.17681315541267395, 0.05701170861721039, 0.4970604479312897, 0.0082307830452919, -0.2132449746131897, 0.07970781624317169, -0.23128795623779297, 0.48780113458633423, -0.5906654000282288, 0.3753697872161865, 0.13165992498397827, 0.24846258759498596, -0.09290377795696259, -0.20694118738174438, -0.208096444606781, -0.01941756159067154, -0.4568488597869873, 0.2126099169254303, -0.1661359965801239, -0.39895516633987427, 0.0879313051700592, -0.05454651638865471, -0.22003556787967682, -0.05323224142193794, -0.005856240168213844, -0.38066065311431885, -0.015073612332344055, -0.11292389035224915, 0.26422637701034546, -0.007352519780397415, -0.18552817404270172, 0.3254709243774414, -0.15888062119483948, 0.04833606258034706, 0.04214325174689293, -0.24977648258209229, 0.14100494980812073, 0.28191113471984863, -0.06144493445754051, -0.17981427907943726, 0.10580240190029144, -0.11489904671907425, 0.11860748380422592, 0.044196344912052155, 0.1869746893644333, 0.24725903570652008, -0.32907387614250183, 0.15057894587516785, 0.2711840867996216, 0.6230238676071167, 0.016093481332063675, -0.19404932856559753, -0.06865867972373962, 0.2337779998779297, -0.059102267026901245, 0.23909765481948853, -0.16628706455230713, 0.010099463164806366, -0.17054776847362518, -0.3827485740184784, 0.4434434175491333, -0.1882171928882599, 0.24556103348731995, 0.4519786834716797, 0.2792707085609436, 0.16199757158756256, 0.22140774130821228, 0.21807925403118134, -0.11951915174722672, 0.04512723535299301, 0.13187497854232788, -0.03944738209247589, -0.40144795179367065, 0.07110245525836945, -0.035157907754182816, 0.010218456387519836, -0.4002998173236847, -0.012817319482564926, -0.057655494660139084, 0.262563019990921, -0.2266409993171692, 0.19232559204101562, -0.24899408221244812, 0.3230304718017578, 0.7720014452934265, -0.09140843152999878, 0.39383116364479065, -0.0788581594824791, -0.32952582836151123, -0.03388991206884384, 0.17477308213710785, 0.11608986556529999, -0.16746100783348083, 0.11148635298013687, 0.1549222320318222, 0.0830887109041214, 0.25916552543640137, 0.17907653748989105, -0.04905542731285095, 0.31682372093200684, -0.15427836775779724, 0.33104240894317627, -0.42754361033439636, -0.2973487675189972, -0.17388929426670074, 0.1673176884651184, 0.3603474497795105, -0.5011370182037354, 0.09320773929357529, -0.598246693611145, 0.056480828672647476, 0.23083509504795074, 0.3121408522129059, 0.008510906249284744, 0.12874986231327057, -0.21575510501861572, 0.03548175096511841, 0.49407872557640076, 0.09378513693809509, -0.3119840621948242, 0.2296619415283203, -0.08752160519361496, 0.3540552854537964, -0.3349076807498932, -0.014301866292953491, 0.08701066672801971, -0.12422680109739304, 0.25504061579704285, 0.04133452847599983, -0.29054880142211914, -0.08989301323890686, -0.24183575809001923, 0.390984445810318, 0.11885809898376465, -0.033439911901950836, 0.09347282350063324, -0.32038164138793945, 0.00544428825378418, -0.30033984780311584, 0.03231154382228851, 0.21256422996520996, 0.02605482190847397, 0.2347663789987564, 0.8369138240814209, -0.06312426924705505, -0.005615741014480591, -0.34382104873657227, 0.011395726352930069, 0.28317663073539734, -0.02614346146583557, -0.35892415046691895, -0.25466012954711914, -0.20586417615413666, -0.13114820420742035, 0.51790851354599, -0.018544215708971024, -0.05505849048495293, 0.00426197424530983, -0.09703198820352554, 0.06049923598766327, 0.0795484185218811, -0.04506535828113556, 0.2584548592567444, -0.19021180272102356, 0.028026878833770752, 0.10084196925163269, 0.3532104194164276, 0.15981201827526093, -0.25189173221588135, -0.3440174460411072, 0.045454736799001694, -0.00022198911756277084, 0.01086229458451271, -0.19508498907089233, 0.3254465162754059, 0.27059507369995117, -0.19132046401500702, -0.03283395245671272, -0.09618605673313141, 0.07419489324092865, 0.1747691035270691, -0.1280052810907364, 0.11911827325820923, 0.20159649848937988, -0.20183277130126953, 0.0032824696972966194, 0.22898279130458832, -0.04419701546430588, 0.4361715316772461, -0.022879555821418762, 0.1678919941186905, 0.4554361402988434, 0.33858221769332886, -0.1819048821926117, -0.1290273666381836, 0.35430675745010376, -0.1331837773323059, 0.17049869894981384, 0.11234620958566666, -0.4327854514122009, 0.3437058925628662, 0.3118148744106293, 0.0007005706429481506, -0.022310461848974228, 0.41351190209388733, 0.01055239886045456, 0.03702515363693237, 0.07445982098579407, 0.11049599945545197, 0.43960750102996826, 0.017548970878124237, 0.05781593918800354, -0.1922004222869873, -0.3163999319076538, -0.19894534349441528, 0.15351015329360962, 0.23645678162574768, 0.08347661793231964, 0.36149346828460693, 0.260781854391098, 0.10077663511037827, -0.14901162683963776, -0.1900981068611145, 0.034001804888248444, 0.20628465712070465, -0.12527121603488922, 0.3302210867404938, -0.16103717684745789, -0.25457537174224854, 0.06907890737056732, -0.032732486724853516, -0.4051879942417145, -0.42985478043556213, 0.007634030655026436, 0.24589399993419647, -0.16135653853416443, 0.1446026861667633, -0.033058855682611465, 0.5263201594352722, 0.26781028509140015, -0.08713480830192566, -0.5070950984954834, -0.2634914517402649, -0.2613186836242676, -0.08707581460475922, 0.30406221747398376, 0.05077628418803215, 0.4159857928752899, 0.2886490821838379, -0.07791447639465332, -0.19907286763191223, -0.4651939570903778, 0.14880535006523132, 0.0009823031723499298, 0.590456485748291, 0.27801987528800964, 0.17957444489002228, -0.10919731110334396, 0.060542814433574677, 0.16764406859874725, -0.15313315391540527, -0.00926445797085762, 0.18366441130638123, 0.020376700907945633, 0.03169219195842743, -0.4025789499282837, 0.21195194125175476, -0.2545279860496521, -0.3908008635044098, 0.13727813959121704, -0.351696640253067, -0.10308417677879333, 0.15395133197307587, 0.086737260222435, -0.020423488691449165, -0.3217298090457916, -0.1151537299156189, -0.25048139691352844, 0.015508420765399933, 0.15690812468528748, -0.08300173282623291, -0.14233249425888062, 0.10565254092216492, -0.06714898347854614, 0.027586519718170166, 0.12549947202205658, -0.6572794318199158, 0.046397916972637177, -0.2262846827507019, 0.15196606516838074, 0.04626469314098358, -0.1916210949420929, 0.11732912808656693, 0.003460865467786789, 0.038777075707912445, -0.10574358701705933, -0.2828521430492401, 0.012190219014883041, 0.021095696836709976, 0.22211670875549316, -0.00954493973404169, 0.8577920198440552, 0.03243887424468994, 0.4948832392692566, 0.2899153530597687, -0.12610575556755066, -0.12697656452655792, 0.18504978716373444, 0.489149808883667, -0.09558632969856262, -0.24584555625915527, -0.08033373206853867, -0.0898703932762146, -0.43620216846466064, -0.1014699935913086, 0.1052704006433487, -0.23580747842788696, 0.06950674951076508, 0.1943190097808838, 0.11125864088535309, -0.4390801787376404, 0.10861051082611084, -0.15494216978549957, 0.3362947106361389, 0.08898542821407318, 0.047491759061813354, -0.183285653591156, 0.05865499749779701, -0.016814179718494415, 0.31311917304992676, 0.3884432315826416, -0.18885451555252075, -0.185410737991333, -0.22482827305793762, -0.3610366880893707, 0.21217240393161774, 0.20892080664634705, 0.4620697498321533, -0.3130503296852112, -0.026334654539823532, 0.11710885912179947, -0.14598968625068665, 0.6808008551597595, -0.39160215854644775, -0.25338804721832275, 0.25092998147010803, -0.1985781490802765, -0.5877394676208496, 0.06116296350955963, -0.09901738166809082, 0.33792808651924133, 0.31265789270401, 0.3559969663619995, -0.07762539386749268, -0.1864980161190033, -0.06197985261678696, 0.15506611764431, -0.24631938338279724, -0.10718642920255661, -0.1955513060092926, -0.3361634314060211, -0.03568360581994057, 0.34639644622802734, 0.2230376899242401, -0.004435516893863678, -0.17667147517204285, -0.33340704441070557, 0.05503567308187485, -0.4272997975349426, -0.030549265444278717, 0.20886088907718658, 0.09144815802574158, -0.11565567553043365, 0.4587043225765228, -0.028929322957992554, -0.26498666405677795, 0.07375342398881912, 0.2679038941860199, -0.39066311717033386, -0.24087493121623993, 0.257515549659729, -0.04773963615298271, 0.31304052472114563, 0.537121057510376, -0.25311312079429626, 0.37039491534233093, -0.2631251811981201, 0.22088083624839783, 0.06879159808158875, 0.06404604017734528, 0.09656155854463577, 0.28397589921951294, -0.23623183369636536, 0.043770432472229004, 0.14262926578521729, 0.24430224299430847, -0.2043912261724472, 0.8109012842178345, -0.2242695689201355, -0.13699138164520264, 0.2615176737308502, -0.027340516448020935, 0.7325701713562012, 0.09028664976358414, -0.11830715835094452, -0.006483856588602066, -0.21700426936149597, -0.09066063910722733, -0.03398178517818451, 0.08484914898872375, -0.027438148856163025, -0.460567831993103, -0.006951369345188141, -0.25790858268737793, 0.31728965044021606, -0.0814627856016159, -0.029621697962284088, 0.07626380026340485, -0.3641296625137329, 0.19852209091186523, 0.19170548021793365, -0.04445993900299072, -0.04741726070642471, -0.08795897662639618, -0.30321741104125977, 0.08085203915834427, 0.2641209661960602, -0.06820923089981079, -0.15925511717796326, 0.05152806267142296, 0.3017849028110504, -0.08258280903100967, -0.41473743319511414, -0.13549582660198212, -0.37127333879470825, -0.05915841460227966, 0.3721814453601837, -0.1750037670135498, 0.1293114423751831, -0.31308963894844055, -0.11866006255149841, 0.29734328389167786, 0.09817159920930862, 0.3657136857509613, 0.32284602522850037, 0.3915244936943054, 0.187935933470726, -0.0356244295835495, 0.17524109780788422, 0.08387507498264313, 0.02577383816242218, 0.331088662147522, -0.34941166639328003, -0.19820602238178253, 0.10505729913711548, 0.15208101272583008, -0.03696408495306969, -0.023207003250718117, 0.15658503770828247, -0.06223838031291962, -0.1917494386434555, -0.27316582202911377, 0.09736291319131851, 0.2613697648048401, 0.0027075596153736115, 0.4462430775165558, -0.1620277613401413, -0.25266677141189575, -0.14016219973564148, 0.09807288646697998, -0.3785729706287384, 0.20185723900794983, 0.09293905645608902, 0.12150179594755173, -0.41300255060195923, -0.294459730386734, 0.10073897242546082, -0.23520877957344055, -0.3182986378669739, 0.4616250991821289, -0.19485816359519958, -0.09083881229162216, 0.3813871443271637, -0.18237370252609253, -0.0026918528601527214, -0.4178136885166168, -0.527954638004303, -0.48550039529800415, -0.07082401216030121, -0.1565094143152237, 0.274237722158432, 0.12141164392232895, -0.29256319999694824, 0.051982294768095016, -0.19198906421661377, 0.008318362757563591, -0.21836590766906738, -0.18619142472743988, -0.13157479465007782, 0.17083540558815002, -0.12165858596563339, 0.028120914474129677, 0.09825123846530914, -0.2276742309331894, 0.015654362738132477, 0.3563264310359955, -0.1422366201877594, -0.14230893552303314, -0.053674906492233276, 0.18868388235569, -0.0726369172334671, -0.14859610795974731, 0.046943023800849915, -0.2100069522857666, 0.017659898847341537, -0.10916116833686829, 0.11041941493749619, -0.1732666790485382, -0.12798821926116943, -0.4222397804260254, 0.10142010450363159, 0.19601598381996155, 0.24382512271404266, 0.44876572489738464, -0.10616151243448257, 0.13724200427532196, 0.15721848607063293, 0.19837021827697754, 0.03766139969229698, -0.08487853407859802, -0.054334770888090134, -0.13353948295116425, -0.2643933594226837, -0.13274741172790527, 0.575725793838501, -0.18845555186271667, -0.046203456819057465, 0.3163781464099884, 0.26544681191444397, 0.643389105796814, -0.24031196534633636, 0.014749400317668915, 0.19048736989498138, 0.12179658561944962, -0.2700115442276001, 0.0037276484072208405, -0.19865955412387848, 0.42791756987571716, 0.11836758255958557, 0.20347268879413605, -0.04340342432260513, -0.0935288667678833, 0.44536006450653076, 0.48517704010009766, 0.4853179156780243, -0.054304346442222595, -0.08713311702013016, 0.2764204740524292, 0.12043881416320801, 0.054339852184057236, 0.28276288509368896, -0.02644180878996849, 0.05901816114783287, 0.418406218290329, 0.10056264698505402, 0.13489557802677155, 0.11094895005226135, 0.17524543404579163, 0.13258811831474304, -0.29962480068206787, -0.09182127565145493, 0.01724516600370407, -0.4369974434375763, 0.07420039921998978, 0.18934987485408783, -0.3299180865287781, -0.29152897000312805, -0.261247456073761, 0.017122380435466766, 0.31473487615585327, -0.24455991387367249, -0.040992025285959244, -0.1201418936252594, -0.10778050124645233, 0.042306363582611084, -0.1193244531750679, 0.20324072241783142, 0.03307012468576431, 0.3190126121044159, 0.18980664014816284, 0.10081954300403595, -0.32245030999183655, -0.40126097202301025, -0.18956364691257477, 0.19331245124340057, -0.21189948916435242, 0.146920308470726, 0.22948035597801208, -0.11470039188861847, 0.008213069289922714, -0.25836285948753357, 0.3680025041103363, 0.3566637337207794, -0.4545784294605255, 0.13889403641223907, -0.1755937933921814, -0.038967158645391464, -0.14116305112838745, 0.3635479211807251, -0.1266593039035797, 0.02952025830745697, 0.12318015098571777, 0.10170229524374008, -0.13130132853984833, 0.026801539584994316, 0.24275651574134827, 0.643183171749115, -0.4012394845485687, 0.4020201563835144, 0.07959147542715073, 0.307060182094574, -0.13100555539131165, -0.06231410801410675, -0.20062410831451416, -0.10615255683660507, 0.7518615126609802, -0.22778552770614624, 0.09252233803272247, -0.03311198577284813, 0.06795134395360947, -0.18514707684516907, 0.2916963994503021, 0.24260258674621582, -0.060837872326374054, -0.1758641004562378, -0.13458454608917236, -0.44423580169677734, -0.13152152299880981, -0.1710147112607956, -0.043854277580976486, 0.08431793749332428, 0.06386448442935944, -0.0957370474934578, 0.1569894254207611, 0.23378615081310272, -0.044659387320280075, 0.11343373358249664, 0.20558258891105652, -0.3596407175064087, -0.15814512968063354, -0.25280436873435974, -0.21894483268260956, -0.05131359398365021, -0.2919449806213379, 0.12979090213775635, -0.16441334784030914, 0.08681192249059677, -0.047528237104415894, -0.5578328967094421, 0.2251347303390503, 0.4717526137828827, 0.19439777731895447, 0.22396042943000793, 0.05485774204134941, 0.07496553659439087, -0.03872024640440941, 0.019771264865994453, -0.22537532448768616, 0.10401797294616699, -0.033563897013664246, -0.05190272629261017, 0.13787782192230225, -0.1743902564048767, -0.3154028058052063, -0.2274252474308014, -0.03590111434459686, 0.04919704049825668, 0.20603802800178528, -0.13834233582019806, 0.09713196009397507, -0.1939709484577179, 0.15226182341575623, -0.038281381130218506, 0.19698773324489594, 0.14592695236206055, 0.2134585678577423, -0.17381809651851654, -0.24545139074325562, 0.7392348051071167, -0.5112695097923279, -0.31612589955329895, -0.16469337046146393, 0.15118637681007385, -0.05211033672094345, -0.3860984444618225, -0.19176410138607025, -0.43039602041244507, 0.3414672017097473, -0.17628826200962067, -0.1530052125453949, -0.20809149742126465, -0.0241362527012825, 0.10000934451818466, -0.24324889481067657, 0.32368770241737366, 0.014838038012385368, -0.008034564554691315, 0.19833214581012726, -0.14045798778533936 ]
https://github.com/huggingface/datasets/issues/6393
It was after the second filter (and combining the two filters into one seemingly resolved it). I obviously haven't tried all settings to know that these details are causal, but it did work for me.
Filter occasionally hangs
### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2
35
Filter occasionally hangs ### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 It was after the second filter (and combining the two filters into one seemingly resolved it). I obviously haven't tried all settings to know that these details are causal, but it did work for me.
[ -0.3603329062461853, 0.0368996262550354, -0.0837249830365181, 0.11418618261814117, 0.3722602427005768, -0.2295568734407425, 0.08928656578063965, 0.06284244358539581, 0.0738249123096466, 0.08880357444286346, 0.2227749228477478, 0.4795060157775879, -0.24935586750507355, 0.043282948434352875, -0.3277444541454315, 0.12441529333591461, -0.09186926484107971, -0.04754073917865753, 0.09932585805654526, 0.14448824524879456, -0.30184513330459595, 0.2934887409210205, -0.0902261808514595, 0.06435170769691467, -0.191928431391716, -0.21734799444675446, 0.41740256547927856, -0.08766381442546844, 0.19803032279014587, -0.4073522388935089, 0.12781761586666107, 0.10569741576910019, -0.1631341427564621, 0.708045244216919, -0.00011644042388070375, -0.059271857142448425, 0.2770441174507141, 0.15263450145721436, -0.4081389904022217, -0.2401692122220993, -0.07499940693378448, 0.13172608613967896, 0.19402411580085754, 0.2825787663459778, 0.04963718354701996, 0.3484915792942047, -0.31753700971603394, -0.42484569549560547, 0.1491009145975113, 0.29993027448654175, 0.17875200510025024, 0.16969767212867737, -0.22707682847976685, -0.07133617997169495, 0.14495019614696503, 0.2838023900985718, -0.20673368871212006, 0.08793257921934128, 0.42306825518608093, -0.1897730529308319, 0.03780638054013252, 0.5131997466087341, -0.002017490565776825, -0.21299266815185547, 0.04528949782252312, -0.2477901577949524, 0.4855777323246002, -0.5830394625663757, 0.35280904173851013, 0.11249416321516037, 0.2599826753139496, -0.07034822553396225, -0.23168320953845978, -0.24727588891983032, 0.00809812918305397, -0.43874409794807434, 0.2355775535106659, -0.22952595353126526, -0.3785114884376526, 0.07385475188493729, -0.05519232898950577, -0.23329904675483704, -0.05104555934667587, -0.029566548764705658, -0.3954851031303406, 0.0268997959792614, -0.11573809385299683, 0.2790111303329468, -0.013757649809122086, -0.19753184914588928, 0.32899144291877747, -0.08373677730560303, 0.06123531982302666, 0.025667909532785416, -0.3106258511543274, 0.15397268533706665, 0.303203821182251, -0.0689726173877716, -0.2214067578315735, 0.1094805896282196, -0.09031380712985992, 0.14983798563480377, 0.07198897004127502, 0.1675247848033905, 0.24309176206588745, -0.2583337724208832, 0.1310926377773285, 0.23477299511432648, 0.6136699318885803, 0.05955358222126961, -0.1793832778930664, -0.060292262583971024, 0.2754635512828827, -0.15642507374286652, 0.17538245022296906, -0.1947445422410965, 0.04513036459684372, -0.1791599690914154, -0.4204692244529724, 0.43395018577575684, -0.15325477719306946, 0.27696555852890015, 0.4574439823627472, 0.2920111119747162, 0.1591826230287552, 0.25423163175582886, 0.20642788708209991, -0.12295569479465485, -0.014150507748126984, 0.17573833465576172, -0.04950372129678726, -0.3504965901374817, 0.08909615874290466, -0.05517120286822319, 0.0570620596408844, -0.3554673194885254, -0.0010258927941322327, -0.04261087626218796, 0.31269514560699463, -0.14982403814792633, 0.12415453791618347, -0.15781790018081665, 0.29880401492118835, 0.8121379017829895, -0.08192672580480576, 0.4158494472503662, -0.0818111002445221, -0.3431642949581146, -0.046635501086711884, 0.13980558514595032, 0.09792885929346085, -0.14778150618076324, 0.09411130845546722, 0.17453621327877045, 0.030908599495887756, 0.2386874109506607, 0.20057514309883118, -0.002143798628821969, 0.3019108176231384, -0.16954267024993896, 0.31949296593666077, -0.4170930087566376, -0.2657013237476349, -0.16854098439216614, 0.19362369179725647, 0.3084983229637146, -0.5227853655815125, 0.10296786576509476, -0.5167675018310547, 0.04769178479909897, 0.15324772894382477, 0.2787562906742096, 0.004203282296657562, 0.07165566831827164, -0.14523354172706604, 0.09017759561538696, 0.4376778304576874, 0.07026374340057373, -0.3440871238708496, 0.24890975654125214, -0.07508943974971771, 0.3431345820426941, -0.30789119005203247, -0.07563160359859467, 0.13455088436603546, -0.12755563855171204, 0.2791810929775238, 0.0511242039501667, -0.29446786642074585, -0.12135757505893707, -0.2725701332092285, 0.3769085109233856, 0.08584396541118622, 0.012244433164596558, 0.08797971904277802, -0.36139607429504395, 0.009697508066892624, -0.31373220682144165, 0.059748999774456024, 0.2258954793214798, 0.06392847746610641, 0.2630423307418823, 0.7921162843704224, -0.09318811446428299, -0.02785741165280342, -0.3424038589000702, -0.04967480152845383, 0.29159998893737793, -0.04428541660308838, -0.2982637286186218, -0.318357914686203, -0.21635906398296356, -0.14039655029773712, 0.49881991744041443, -0.023569904267787933, -0.1250864714384079, 0.03174211457371712, -0.13161635398864746, 0.033895812928676605, 0.08707152307033539, -0.08395826071500778, 0.24024298787117004, -0.13269004225730896, 0.00595475360751152, 0.05519993603229523, 0.295490026473999, 0.14128905534744263, -0.23821747303009033, -0.2923966646194458, 0.06776389479637146, 0.0019272901117801666, 0.016815032809972763, -0.19308380782604218, 0.3740575611591339, 0.19893842935562134, -0.16329437494277954, -0.01747341826558113, -0.09400299191474915, 0.09548766911029816, 0.17116759717464447, -0.1532682627439499, 0.0804031640291214, 0.1633603721857071, -0.1630701720714569, -0.039507631212472916, 0.2450225055217743, -0.09225544333457947, 0.43382585048675537, -0.024875164031982422, 0.20118916034698486, 0.4787192940711975, 0.2903886139392853, -0.2079058587551117, -0.13303886353969574, 0.335000216960907, -0.08424392342567444, 0.1451202630996704, 0.08276040852069855, -0.39351266622543335, 0.4312574863433838, 0.33452093601226807, 0.01571767032146454, -0.05172033980488777, 0.3648562431335449, -0.021348897367715836, -0.0021735578775405884, 0.08208172023296356, 0.16795167326927185, 0.4082598388195038, 0.0509498156607151, 0.08207552134990692, -0.1902914047241211, -0.3755802512168884, -0.20735900104045868, 0.18223772943019867, 0.2296670526266098, 0.0785737931728363, 0.3301286995410919, 0.2622770071029663, 0.10011415183544159, -0.150723397731781, -0.17669755220413208, 0.026500672101974487, 0.2474651336669922, -0.16773194074630737, 0.30199021100997925, -0.19497373700141907, -0.16622710227966309, 0.13597393035888672, -0.09380418062210083, -0.4021853506565094, -0.4780517518520355, 0.0726218968629837, 0.27780237793922424, -0.20071306824684143, 0.19437962770462036, -0.032137431204319, 0.4581979811191559, 0.2571165859699249, -0.12975986301898956, -0.48481833934783936, -0.29586708545684814, -0.23896333575248718, -0.03982070833444595, 0.30566322803497314, 0.08219803869724274, 0.405669242143631, 0.3091341257095337, -0.09930378198623657, -0.19881683588027954, -0.49402064085006714, 0.10943661630153656, -0.03652944788336754, 0.6046316027641296, 0.2785520851612091, 0.22885249555110931, -0.1511596143245697, 0.05046867951750755, 0.20359809696674347, -0.18439850211143494, 0.012541063129901886, 0.1809854805469513, 0.001892194151878357, 0.002552732825279236, -0.437164843082428, 0.15329895913600922, -0.21636927127838135, -0.4195016026496887, 0.1616968810558319, -0.33696696162223816, -0.11554938554763794, 0.15440745651721954, 0.12288045883178711, -0.009519550949335098, -0.316166490316391, -0.11871732771396637, -0.2690947353839874, 0.061838723719120026, 0.16518181562423706, -0.09517113119363785, -0.1778520792722702, 0.09169983863830566, -0.01243952289223671, 0.06098754703998566, 0.13489559292793274, -0.6288578510284424, 0.0009497590363025665, -0.21080386638641357, 0.16478867828845978, 0.07223175466060638, -0.18611715734004974, 0.1772075593471527, 0.055098120123147964, -0.020860403776168823, -0.10773343592882156, -0.2597488760948181, -0.0010916255414485931, 0.023603953421115875, 0.19864284992218018, -0.07238445430994034, 0.8169844150543213, 0.06851112842559814, 0.4537188708782196, 0.23577427864074707, -0.08627423644065857, -0.12404493987560272, 0.1727125644683838, 0.504493236541748, -0.09426281601190567, -0.2412198781967163, -0.06562595069408417, -0.13332290947437286, -0.3796790838241577, -0.0687728002667427, 0.110537588596344, -0.2207215428352356, 0.04591846466064453, 0.17796719074249268, 0.08330613374710083, -0.45389556884765625, 0.14170874655246735, -0.1929328739643097, 0.3081880509853363, 0.12372288852930069, 0.029226869344711304, -0.17056331038475037, 0.0584988109767437, -0.03758087009191513, 0.2944805920124054, 0.3149067163467407, -0.18855124711990356, -0.18127115070819855, -0.18729168176651, -0.3963059186935425, 0.25890716910362244, 0.19123587012290955, 0.4483507573604584, -0.3225818872451782, -0.0725967064499855, 0.09682410955429077, -0.20257577300071716, 0.6149659156799316, -0.35740721225738525, -0.2613230347633362, 0.26082324981689453, -0.18510407209396362, -0.6531547904014587, 0.05223578214645386, -0.08428804576396942, 0.32511138916015625, 0.29454103112220764, 0.4243015944957733, -0.11078871041536331, -0.22942835092544556, -0.07328139990568161, 0.11802609264850616, -0.240977942943573, -0.053705524653196335, -0.16960503160953522, -0.3888523578643799, -0.08822216093540192, 0.3267834186553955, 0.2251085340976715, -0.03376750648021698, -0.18690887093544006, -0.3129931092262268, 0.060694336891174316, -0.4465048313140869, -0.016314290463924408, 0.2636232078075409, 0.07578951120376587, -0.08955740928649902, 0.45398348569869995, -0.02137702703475952, -0.2324870228767395, 0.06755317002534866, 0.28830182552337646, -0.3635309636592865, -0.20127077400684357, 0.26542311906814575, -0.001084357500076294, 0.3285057544708252, 0.5215349793434143, -0.28412681818008423, 0.34884896874427795, -0.2573065757751465, 0.22932904958724976, 0.08867307752370834, 0.0770181268453598, 0.0818345919251442, 0.28715288639068604, -0.2303839921951294, 0.04144572466611862, 0.17131978273391724, 0.20341315865516663, -0.20626524090766907, 0.7652552723884583, -0.21997743844985962, -0.13115516304969788, 0.2560153007507324, -0.020086675882339478, 0.6791149377822876, 0.11871840804815292, -0.08236885070800781, 0.05029378831386566, -0.1793430894613266, -0.05418911203742027, -0.02550671249628067, 0.06509128212928772, -0.03105691820383072, -0.4405590295791626, -0.011579394340515137, -0.1930931806564331, 0.2926027178764343, -0.0644821971654892, -0.018545642495155334, 0.06544283032417297, -0.27873533964157104, 0.21342360973358154, 0.20277787744998932, -0.05866912007331848, -0.04656136780977249, -0.1364712119102478, -0.3523138165473938, 0.10506241768598557, 0.24782243371009827, -0.12214644253253937, -0.147323340177536, 0.03320101276040077, 0.28871285915374756, -0.10464904457330704, -0.37690603733062744, -0.10933759808540344, -0.38983285427093506, -0.034868232905864716, 0.33540046215057373, -0.186173677444458, 0.12967032194137573, -0.3048158884048462, -0.17512784898281097, 0.23852364718914032, 0.07170924544334412, 0.4128531515598297, 0.303166925907135, 0.3622269928455353, 0.20954002439975739, -0.04845181480050087, 0.22380970418453217, 0.056157685816287994, 0.02123117446899414, 0.27443596720695496, -0.3136383891105652, -0.1708284318447113, 0.16726885735988617, 0.19211944937705994, -0.057388655841350555, -0.06113062798976898, 0.16958829760551453, -0.06524395942687988, -0.15317343175411224, -0.3330932855606079, 0.12121132016181946, 0.21577949821949005, -0.005207806825637817, 0.45563578605651855, -0.14985312521457672, -0.23191654682159424, -0.15550996363162994, 0.12413191050291061, -0.36580440402030945, 0.21206648647785187, 0.1040547713637352, 0.1441158652305603, -0.40830981731414795, -0.3077067732810974, 0.0698462426662445, -0.18440045416355133, -0.35012567043304443, 0.46227842569351196, -0.15918132662773132, -0.11609768867492676, 0.39238086342811584, -0.17800316214561462, -0.011845264583826065, -0.43860572576522827, -0.5160680413246155, -0.48139697313308716, -0.12373140454292297, -0.1566820740699768, 0.24743446707725525, 0.13702227175235748, -0.28365182876586914, 0.08062447607517242, -0.21723023056983948, 0.017633555456995964, -0.25852346420288086, -0.1993345022201538, -0.1176038384437561, 0.1961991786956787, -0.10085378587245941, 0.011276418343186378, 0.20432770252227783, -0.23529881238937378, 0.05243430286645889, 0.3390098214149475, -0.12985222041606903, -0.18227747082710266, -0.06365993618965149, 0.1708725094795227, -0.07349430024623871, -0.17084643244743347, 0.06165129318833351, -0.17676973342895508, -0.012665243819355965, -0.10335543751716614, 0.1330052614212036, -0.1565597951412201, -0.14311304688453674, -0.4068984091281891, 0.06340093910694122, 0.19632865488529205, 0.3086407780647278, 0.4262928366661072, -0.14446517825126648, 0.12859749794006348, 0.17384585738182068, 0.1864352524280548, -0.03478466346859932, -0.07225301861763, -0.08083231002092361, -0.1114988625049591, -0.26170289516448975, -0.12798774242401123, 0.5238774418830872, -0.16204379498958588, -0.11716512590646744, 0.2917676568031311, 0.3358028531074524, 0.6309359073638916, -0.20116162300109863, -0.03761010617017746, 0.19918327033519745, 0.1414937674999237, -0.3196490705013275, 0.05185164883732796, -0.198387011885643, 0.4067050814628601, 0.15052512288093567, 0.18353378772735596, 0.010643921792507172, -0.1003534123301506, 0.47380170226097107, 0.48393452167510986, 0.44544899463653564, -0.10208461433649063, -0.09288713335990906, 0.29441970586776733, 0.1200496032834053, 0.04696274921298027, 0.3632805347442627, -0.03469762206077576, 0.08677434921264648, 0.455598920583725, 0.035458117723464966, 0.10764813423156738, 0.10402102768421173, 0.18380258977413177, 0.09462069720029831, -0.28890034556388855, -0.08485132455825806, -0.007270433008670807, -0.4353492259979248, 0.07790431380271912, 0.20703309774398804, -0.27418094873428345, -0.2628093957901001, -0.2532394826412201, 0.015539810061454773, 0.3926619291305542, -0.26877719163894653, -0.07329613715410233, -0.09590168297290802, -0.13940700888633728, 0.0630803108215332, -0.1069885641336441, 0.19124850630760193, 0.020876828581094742, 0.39084309339523315, 0.17575904726982117, 0.10037069022655487, -0.32150012254714966, -0.40156781673431396, -0.21457764506340027, 0.21369236707687378, -0.16684475541114807, 0.14352759718894958, 0.2646827697753906, -0.11664344370365143, -0.006720622535794973, -0.25893473625183105, 0.41473597288131714, 0.2980165481567383, -0.4933646023273468, 0.12501613795757294, -0.20672012865543365, -0.031230535358190536, -0.15932315587997437, 0.35013046860694885, -0.1134987324476242, 0.04358038306236267, 0.1741344928741455, 0.12862767279148102, -0.16156715154647827, 0.06387771666049957, 0.18336519598960876, 0.5887724757194519, -0.3433384895324707, 0.3694770336151123, 0.11324544250965118, 0.27504098415374756, -0.1584014594554901, -0.057637982070446014, -0.18866606056690216, -0.1747836470603943, 0.7438586354255676, -0.22592705488204956, 0.11773546040058136, -0.0954100489616394, 0.09118278324604034, -0.13083723187446594, 0.34266000986099243, 0.23151086270809174, -0.07026886194944382, -0.1500793844461441, -0.08228478580713272, -0.5135173797607422, -0.15190264582633972, -0.15878979861736298, -0.04923832789063454, 0.09751447290182114, 0.09023911505937576, -0.06362012028694153, 0.12764275074005127, 0.26626670360565186, -0.024501828476786613, 0.14844176173210144, 0.14440305531024933, -0.35006728768348694, -0.0767650455236435, -0.2752001881599426, -0.20136024057865143, -0.04129210114479065, -0.29745396971702576, 0.09281285852193832, -0.16788995265960693, 0.11684923619031906, -0.07094050943851471, -0.5134207606315613, 0.23172080516815186, 0.44345006346702576, 0.22117072343826294, 0.254738986492157, 0.051135893911123276, 0.04630874842405319, -0.04367688298225403, -0.045559484511613846, -0.20095695555210114, 0.06091681867837906, -0.01113663986325264, -0.045676395297050476, 0.14549335837364197, -0.14362382888793945, -0.3296481966972351, -0.20704197883605957, -0.0655704066157341, 0.06753325462341309, 0.16936933994293213, -0.11372432112693787, 0.133820578455925, -0.12382307648658752, 0.17025861144065857, -0.058203719556331635, 0.2587646245956421, 0.14006967842578888, 0.1910914182662964, -0.22009983658790588, -0.3353148102760315, 0.7154436111450195, -0.4835556447505951, -0.3499845266342163, -0.11364324390888214, 0.1212155893445015, -0.04568273201584816, -0.33963942527770996, -0.2373097538948059, -0.41569650173187256, 0.29280710220336914, -0.15088894963264465, -0.19895532727241516, -0.1745711714029312, -0.04009513556957245, 0.0637667179107666, -0.24808041751384735, 0.3165963292121887, 0.05705150589346886, -0.012185707688331604, 0.1562698483467102, -0.12558944523334503 ]
https://github.com/huggingface/datasets/issues/6393
Thanks, that's good to know. The stacktrace suggests an issue when `del self._indices` is called, which happens when a filtered dataset falls out of scope. The indices are a PyArrow table memory mapped from disk, so I'm not quite sure how calling `del` on it can cause this issue. We do `del self._indices` to make sure the file on disk is not used anymore by the current process and avoid e.g. permission errors. Hopefully we can find a way to reproduce this error, otherwise it will be quite hard to understand what happened
Filter occasionally hangs
### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2
93
Filter occasionally hangs ### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 Thanks, that's good to know. The stacktrace suggests an issue when `del self._indices` is called, which happens when a filtered dataset falls out of scope. The indices are a PyArrow table memory mapped from disk, so I'm not quite sure how calling `del` on it can cause this issue. We do `del self._indices` to make sure the file on disk is not used anymore by the current process and avoid e.g. permission errors. Hopefully we can find a way to reproduce this error, otherwise it will be quite hard to understand what happened
[ -0.2699989974498749, 0.07587841153144836, -0.05574621260166168, 0.23851166665554047, 0.3574141263961792, -0.13207729160785675, 0.14118105173110962, 0.05039813369512558, -0.031715277582407, 0.16522642970085144, 0.18220847845077515, 0.4575658440589905, -0.27161359786987305, -0.09806235134601593, -0.30251115560531616, 0.1492501199245453, -0.04996621608734131, -0.06755150109529495, 0.1284184753894806, 0.18478505313396454, -0.325409859418869, 0.2547665536403656, -0.19111770391464233, 0.14001914858818054, -0.164064422249794, -0.23388603329658508, 0.33269986510276794, -0.0073183998465538025, 0.22129139304161072, -0.4098721146583557, 0.12824419140815735, 0.06797565519809723, -0.14118704199790955, 0.7162840962409973, -0.0001225197484018281, -0.012193076312541962, 0.2944592237472534, 0.12922440469264984, -0.45557281374931335, -0.20887072384357452, -0.15026739239692688, 0.20854055881500244, 0.16752992570400238, 0.20401664078235626, 0.16110733151435852, 0.31613343954086304, -0.2924618721008301, -0.3274829685688019, 0.07786813378334045, 0.353202760219574, 0.11346884816884995, 0.16312944889068604, -0.24235278367996216, 0.005791865289211273, 0.4014495611190796, 0.30376532673835754, -0.14309841394424438, 0.1485239863395691, 0.3794095516204834, -0.26131343841552734, 0.04311729595065117, 0.4125385284423828, -0.10346260666847229, -0.21785683929920197, 0.10653667896986008, -0.20800578594207764, 0.561866819858551, -0.47849494218826294, 0.34242331981658936, 0.0627022311091423, 0.30233243107795715, -0.2539677917957306, -0.18402042984962463, -0.2710137963294983, 0.023453209549188614, -0.49410727620124817, 0.28227725625038147, -0.13689933717250824, -0.3864256739616394, 0.1458989381790161, -0.05325638875365257, -0.13124293088912964, -0.16123850643634796, 0.00468531996011734, -0.34408485889434814, -0.02514471858739853, -0.056839920580387115, 0.27041617035865784, 0.042555782943964005, -0.16268590092658997, 0.4114530682563782, -0.09546646475791931, 0.05305568128824234, 0.05797963589429855, -0.2973587214946747, 0.17372308671474457, 0.2442624568939209, -0.06555011123418808, -0.1000911295413971, 0.1101732850074768, 0.010727956891059875, 0.1289854496717453, 0.16129948198795319, 0.26541078090667725, 0.2928650975227356, -0.17551584541797638, 0.02351365238428116, 0.24980208277702332, 0.6221860647201538, 0.07270415872335434, -0.18421337008476257, -0.014518816955387592, 0.205836221575737, -0.10607810318470001, 0.30864232778549194, -0.18759535253047943, 0.021744951605796814, -0.2015990912914276, -0.5230340957641602, 0.4104759097099304, -0.30636605620384216, 0.2387019842863083, 0.42917951941490173, 0.29878664016723633, 0.17277322709560394, 0.11348646879196167, 0.14794838428497314, -0.03250785917043686, -0.0860636979341507, 0.232799232006073, -0.05090950429439545, -0.31629958748817444, 0.0404990017414093, -0.12159037590026855, 0.06629861891269684, -0.39430731534957886, 0.03949936479330063, -0.05995934456586838, 0.28070059418678284, -0.17377859354019165, 0.07970473915338516, -0.17777715623378754, 0.31507936120033264, 0.8609367609024048, -0.16779017448425293, 0.3136836290359497, -0.09961273521184921, -0.489580899477005, -0.0539240688085556, 0.28540635108947754, 0.09673478454351425, -0.2600148916244507, 0.1049913838505745, 0.09817353636026382, -0.010288607329130173, 0.23456723988056183, 0.16083072125911713, -0.01655304618179798, 0.30106568336486816, -0.24392148852348328, 0.27947747707366943, -0.4689510464668274, -0.18838360905647278, -0.23054839670658112, 0.18886886537075043, 0.3067682981491089, -0.5655329823493958, 0.03620775043964386, -0.5458143353462219, -0.050512075424194336, 0.24290019273757935, 0.3068128228187561, -0.008431583642959595, 0.18326345086097717, -0.2246183156967163, 0.13396091759204865, 0.36010950803756714, 0.0940515398979187, -0.4603886008262634, 0.1859460473060608, -0.05976425111293793, 0.360191285610199, -0.27731743454933167, 0.03952949494123459, 0.15062761306762695, -0.1294572949409485, 0.3047958314418793, 0.047903984785079956, -0.33289921283721924, -0.162815123796463, -0.28609228134155273, 0.3674543499946594, 0.13662758469581604, 0.030441969633102417, 0.12603697180747986, -0.3362078368663788, 0.11213144659996033, -0.3243527114391327, 0.11230027675628662, 0.232172429561615, 0.053817249834537506, 0.2311166375875473, 0.7842053174972534, -0.05433296039700508, 0.009805027395486832, -0.3943854570388794, -0.07408259809017181, 0.2761668264865875, -0.025828376412391663, -0.2891327440738678, -0.38804885745048523, -0.21074116230010986, -0.18180136382579803, 0.5284468531608582, -0.02647966891527176, -0.09371762722730637, -0.03633667156100273, -0.14844673871994019, 0.011622503399848938, 0.09935235977172852, -0.13110564649105072, 0.1351398229598999, -0.23742705583572388, 0.049227211624383926, 0.05432016775012016, 0.30224689841270447, 0.1171875074505806, -0.3094305098056793, -0.3538013994693756, 0.06444662809371948, 0.03107387386262417, 0.025836113840341568, -0.18859463930130005, 0.40597930550575256, 0.2898404896259308, -0.21854063868522644, -0.11339140683412552, 0.037661805748939514, 0.09877698123455048, 0.12893491983413696, -0.09433019161224365, 0.047552574425935745, 0.13829194009304047, -0.14462530612945557, -0.0018404759466648102, 0.2267676591873169, -0.18458260595798492, 0.40649187564849854, -0.049278926104307175, 0.0708029717206955, 0.44065630435943604, 0.30853885412216187, -0.15965871512889862, -0.1471383273601532, 0.2939607501029968, -0.07934396713972092, 0.11017514765262604, 0.10870610922574997, -0.39555624127388, 0.3257589340209961, 0.300381064414978, -0.1092611774802208, -0.03547586128115654, 0.3801822364330292, -0.04419122636318207, 0.019778095185756683, 0.16495300829410553, 0.11726238578557968, 0.4706151783466339, 0.054995786398649216, 0.026321787387132645, -0.17068710923194885, -0.34279942512512207, -0.17919841408729553, 0.19031092524528503, 0.29507410526275635, 0.09281378984451294, 0.35846203565597534, 0.27504947781562805, 0.11056149005889893, -0.1815861463546753, -0.1944916546344757, 0.026667505502700806, 0.2928549647331238, -0.2000536024570465, 0.33684223890304565, -0.2201254665851593, -0.27545365691185, 0.1661597341299057, -0.09076769649982452, -0.42758744955062866, -0.44834694266319275, 0.1567215621471405, 0.31695833802223206, -0.27714717388153076, 0.2010115683078766, 0.005080863833427429, 0.4821016490459442, 0.17123332619667053, -0.17849992215633392, -0.4283861517906189, -0.3118828237056732, -0.2725174129009247, -0.08070843666791916, 0.3722875714302063, 0.11277903616428375, 0.36289262771606445, 0.3491201400756836, -0.07886729389429092, -0.17904074490070343, -0.491706907749176, 0.12879206240177155, -0.09138655662536621, 0.6678770780563354, 0.2479008436203003, 0.15479528903961182, -0.15492373704910278, 0.06936246901750565, 0.20917904376983643, -0.14301392436027527, -0.009614050388336182, 0.2936824560165405, 0.0889848917722702, 0.07614199817180634, -0.42614519596099854, 0.223483607172966, -0.239647775888443, -0.3874691426753998, 0.14467227458953857, -0.3971373438835144, -0.00394008494913578, 0.1934511363506317, 0.12344478070735931, -0.0017218440771102905, -0.24564769864082336, -0.12308012694120407, -0.1852448731660843, 0.05170060694217682, 0.10548636317253113, -0.031965818256139755, -0.1353505253791809, 0.10565291345119476, -0.050271935760974884, 0.05189916118979454, 0.20942747592926025, -0.7146076560020447, 0.09490131586790085, -0.13790416717529297, 0.17831644415855408, 0.08189176023006439, -0.16471409797668457, 0.225951686501503, 0.07653933763504028, 0.055912237614393234, -0.10701561719179153, -0.29877185821533203, -0.08803339302539825, 0.022960688918828964, 0.18153607845306396, -0.0000985022634267807, 0.8461554050445557, 0.06482857465744019, 0.569924533367157, 0.1294904500246048, -0.04186706244945526, -0.08347433805465698, 0.12544740736484528, 0.520351231098175, -0.03480711579322815, -0.1988382339477539, -0.12889257073402405, -0.07058382034301758, -0.5617803931236267, -0.0009386688470840454, 0.0661337748169899, -0.33380892872810364, 0.05176502466201782, 0.03699494153261185, -0.0007491335272789001, -0.46047118306159973, 0.20471151173114777, -0.11825286597013474, 0.2913580536842346, 0.14151227474212646, 0.01834169030189514, -0.13802969455718994, -0.014754880219697952, -0.004128947854042053, 0.30417218804359436, 0.3613625168800354, -0.20118176937103271, -0.07686658203601837, -0.3555399477481842, -0.36317864060401917, 0.2289266735315323, 0.21800273656845093, 0.463026225566864, -0.3290180265903473, -0.1368725597858429, 0.12884776294231415, -0.15370184183120728, 0.6674059629440308, -0.35274970531463623, -0.22060954570770264, 0.3062613010406494, -0.10095205157995224, -0.5995702147483826, 0.007061563432216644, -0.13657236099243164, 0.3235035240650177, 0.15810734033584595, 0.3840717673301697, -0.11980780214071274, -0.19991999864578247, 0.010589934885501862, 0.1715511977672577, -0.23800548911094666, -0.05272400751709938, -0.27359068393707275, -0.42679524421691895, -0.14202870428562164, 0.4162393808364868, 0.2023337483406067, -0.012858379632234573, -0.1661791205406189, -0.2331981658935547, 0.07373718172311783, -0.44030311703681946, -0.01353558897972107, 0.2500883936882019, 0.08195969462394714, -0.1575334519147873, 0.3943141996860504, -0.08962343633174896, -0.260079950094223, 0.27167364954948425, 0.32349711656570435, -0.3505130708217621, -0.07142233848571777, 0.291876882314682, 0.056180089712142944, 0.45873066782951355, 0.5492876172065735, -0.2424178272485733, 0.3518441915512085, -0.21703094244003296, 0.19404372572898865, 0.03472414240241051, -0.07108624279499054, 0.07565455138683319, 0.22926786541938782, -0.25052839517593384, 0.0789685919880867, 0.15168629586696625, 0.21684867143630981, -0.21654555201530457, 0.6964666247367859, -0.08277666568756104, -0.1289067566394806, 0.32242119312286377, 0.006566349416971207, 0.8744535446166992, 0.052556559443473816, -0.03931088373064995, 0.0623142346739769, -0.14200040698051453, -0.15303194522857666, -0.08732642233371735, 0.22331610321998596, -0.04593880474567413, -0.5082119107246399, -0.01392444223165512, -0.24992524087429047, 0.2530609965324402, -0.04702802374958992, 0.04322889447212219, 0.016354933381080627, -0.30540311336517334, 0.290932297706604, 0.22909942269325256, -0.10489962249994278, -0.05522362142801285, -0.030393429100513458, -0.3694128394126892, 0.036842525005340576, 0.24500854313373566, -0.15590593218803406, -0.2114628255367279, 0.09150916337966919, 0.245475634932518, -0.06021446734666824, -0.3489534556865692, -0.14751148223876953, -0.3799615502357483, -0.02670634537935257, 0.16803351044654846, -0.21618160605430603, 0.04736671596765518, -0.30337634682655334, -0.2666817009449005, 0.2068863809108734, 0.11777283251285553, 0.37234458327293396, 0.2973098158836365, 0.3533982038497925, 0.1774931252002716, -0.007653243839740753, 0.2845213711261749, 0.06812651455402374, -0.05037514120340347, 0.31699588894844055, -0.3202986419200897, -0.28177452087402344, 0.08941194415092468, 0.23132824897766113, -0.05711359530687332, -0.0620386004447937, 0.23852470517158508, -0.1714940369129181, -0.16426588594913483, -0.2925110459327698, 0.05837814882397652, 0.2096739411354065, -0.0015186071395874023, 0.4848957061767578, -0.25469833612442017, -0.263798326253891, -0.1804666519165039, 0.12393207848072052, -0.32750964164733887, 0.2917186915874481, 0.11429453641176224, 0.11289190500974655, -0.3664027154445648, -0.24318823218345642, 0.049303993582725525, -0.1725510060787201, -0.2923292815685272, 0.4670402407646179, -0.2369823455810547, -0.09203868359327316, 0.36061352491378784, -0.15568764507770538, 0.06502406299114227, -0.43810325860977173, -0.5907343626022339, -0.5323404669761658, -0.13523390889167786, -0.003530338406562805, 0.37275224924087524, 0.17770691215991974, -0.24463127553462982, 0.029786285012960434, -0.2671070396900177, -0.03868241235613823, -0.19884440302848816, -0.20338614284992218, -0.15995872020721436, 0.2371918261051178, -0.15382938086986542, 0.09415611624717712, 0.21353790163993835, -0.2706402838230133, -0.0068855807185173035, 0.3474825322628021, -0.09035056829452515, -0.12328855693340302, 0.010669022798538208, 0.2200070023536682, -0.03179800882935524, -0.1198774203658104, -0.014396898448467255, -0.22759294509887695, 0.026985034346580505, -0.1291799396276474, 0.25214049220085144, -0.11654375493526459, -0.12371823191642761, -0.3751722574234009, 0.22859153151512146, 0.18816155195236206, 0.2955951392650604, 0.422124445438385, -0.09894244372844696, 0.2003210484981537, 0.16838741302490234, 0.12428752332925797, -0.09398574382066727, -0.0882965475320816, -0.09436631202697754, -0.08711320161819458, -0.21124017238616943, -0.16106170415878296, 0.5296262502670288, -0.2023804634809494, -0.16977781057357788, 0.21591541171073914, 0.3424261510372162, 0.5523607134819031, -0.1939907670021057, -0.029774092137813568, 0.2850559651851654, 0.08237840235233307, -0.28256872296333313, 0.006778985261917114, -0.21380069851875305, 0.23375646770000458, 0.0957898199558258, 0.25814494490623474, 0.007325656712055206, -0.03219567984342575, 0.3963996469974518, 0.40099775791168213, 0.5386282801628113, -0.013243196532130241, -0.23940908908843994, 0.3139835298061371, 0.1150420680642128, 0.06281168758869171, 0.3498108983039856, -0.0774114727973938, 0.17813152074813843, 0.4494622051715851, 0.02051401697099209, 0.09775616228580475, 0.1572483628988266, 0.20634517073631287, 0.11076851189136505, -0.35433822870254517, -0.09753799438476562, 0.045190032571554184, -0.37604594230651855, 0.07507266104221344, 0.18242856860160828, -0.22632797062397003, -0.1382208615541458, -0.18939968943595886, 0.09403934329748154, 0.34927403926849365, -0.2675170600414276, 0.028967343270778656, -0.1170002892613411, -0.21093006432056427, 0.06012360751628876, -0.1498628854751587, 0.1450006663799286, -0.029303479939699173, 0.3629295825958252, 0.14541827142238617, 0.04346446692943573, -0.27102282643318176, -0.3070112466812134, -0.11144141852855682, 0.21719318628311157, -0.2109145224094391, 0.12724047899246216, 0.2498214989900589, -0.18933245539665222, 0.010182056576013565, -0.24861979484558105, 0.484967976808548, 0.3036016821861267, -0.4582785964012146, 0.022235650569200516, -0.18972158432006836, -0.058543480932712555, -0.1446913182735443, 0.38369399309158325, -0.10874692350625992, 0.09133933484554291, 0.07183195650577545, 0.06602659821510315, -0.12015840411186218, -0.00127637037076056, 0.31801873445510864, 0.6109539270401001, -0.3922153413295746, 0.2694677412509918, 0.06968921422958374, 0.15883690118789673, -0.08373528718948364, -0.09779351949691772, -0.22355324029922485, -0.07217613607645035, 0.6877094507217407, -0.19028520584106445, 0.12675195932388306, 0.01130090281367302, 0.05005998909473419, -0.16073060035705566, 0.33308088779449463, 0.3528055250644684, -0.046936579048633575, -0.20815062522888184, -0.07112999260425568, -0.587501585483551, -0.040995918214321136, -0.2506569027900696, -0.08534485846757889, 0.28371959924697876, 0.10649052262306213, -0.07572756707668304, 0.10345712304115295, 0.2955995202064514, 0.0126924067735672, 0.12386348843574524, 0.21629014611244202, -0.3704855442047119, -0.1419629454612732, -0.3220670819282532, -0.29342108964920044, -0.03531267121434212, -0.3510855734348297, 0.11328423023223877, -0.22444722056388855, 0.03399021923542023, -0.08824290335178375, -0.42740312218666077, 0.2324347048997879, 0.5142410397529602, 0.3117028772830963, 0.16870853304862976, 0.037119463086128235, 0.1296871304512024, -0.05521379038691521, -0.0600426122546196, -0.19768975675106049, -0.014598656445741653, -0.0049958378076553345, -0.04602797329425812, 0.14583434164524078, -0.16652870178222656, -0.3904626965522766, -0.1946260780096054, 0.024841617792844772, 0.029184862971305847, 0.18592607975006104, -0.06901748478412628, 0.11609184741973877, -0.1898428201675415, 0.22691184282302856, -0.07107950001955032, 0.22221045196056366, 0.1771213263273239, 0.22284966707229614, -0.2936779260635376, -0.2951045036315918, 0.7114505767822266, -0.6022260785102844, -0.29741084575653076, -0.1082618236541748, 0.16575774550437927, -0.024246882647275925, -0.3897131383419037, -0.20725814998149872, -0.35988521575927734, 0.3516967296600342, -0.11239367723464966, -0.2202996462583542, -0.17961359024047852, -0.05199234187602997, 0.07975871860980988, -0.18508756160736084, 0.25478672981262207, 0.06624540686607361, -0.010010942816734314, 0.12386913597583771, -0.1401863694190979 ]
https://github.com/huggingface/datasets/issues/6393
Yeah, I have a reliable repro, but it is not even close to minimal and uses a dataset I can't share. Perhaps you could try getting close to my setting. (1) make a large (~20GB) jsonl with prompt/response pairs (2) load it on a linux machine (`dataset = load_dataset(...)`) (3) map a tokenizer to it, with multiprocessing (`tokenized_dataset = dataset.map(...)`) (4) filter it once based on something, with multiprocessing (`filtered_1 = tokenized_dataset.filter(...)`) (5) filter it again based on something, with multiprocessing (`filtered_2 = filtered_1.filter(...)`) I included the variable names just in case it is relevant that I was creating new datasets each time, not overwriting the same variable.
Filter occasionally hangs
### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2
108
Filter occasionally hangs ### Describe the bug A call to `.filter` occasionally hangs (after the filter is complete, according to tqdm) There is a trace produced ``` Exception ignored in: <function Dataset.__del__ at 0x7efb48130c10> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/datasets/arrow_dataset.py", line 1366, in __del__ if hasattr(self, "_indices"): File "/usr/lib/python3/dist-packages/composer/core/engine.py", line 123, in sigterm_handler sys.exit(128 + signal) SystemExit: 143 ``` but I'm not sure if the trace is actually from `datasets`, or from surrounding code that is trying to clean up after datasets gets stuck. Unfortunately I can't reproduce this issue anywhere close to reliably. It happens infrequently when using `num_procs > 1`. Anecdotally I started seeing it when using larger datasets (~10M samples). ### Steps to reproduce the bug N/A see description ### Expected behavior map/filter calls always complete sucessfully ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-137-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 Yeah, I have a reliable repro, but it is not even close to minimal and uses a dataset I can't share. Perhaps you could try getting close to my setting. (1) make a large (~20GB) jsonl with prompt/response pairs (2) load it on a linux machine (`dataset = load_dataset(...)`) (3) map a tokenizer to it, with multiprocessing (`tokenized_dataset = dataset.map(...)`) (4) filter it once based on something, with multiprocessing (`filtered_1 = tokenized_dataset.filter(...)`) (5) filter it again based on something, with multiprocessing (`filtered_2 = filtered_1.filter(...)`) I included the variable names just in case it is relevant that I was creating new datasets each time, not overwriting the same variable.
[ -0.39694449305534363, 0.12597009539604187, -0.05943926051259041, 0.1702365279197693, 0.27565693855285645, -0.29603731632232666, 0.04032320901751518, 0.13020668923854828, 0.09984563291072845, 0.04136590287089348, 0.27463430166244507, 0.5538307428359985, -0.28259706497192383, -0.0014426559209823608, -0.32637161016464233, 0.1302163153886795, -0.07507668435573578, -0.08382225036621094, 0.18723604083061218, 0.18413668870925903, -0.2748905420303345, 0.29724040627479553, -0.10775382816791534, 0.039952896535396576, -0.13180552423000336, -0.24951410293579102, 0.45231062173843384, -0.04106959328055382, 0.13074016571044922, -0.4111657738685608, 0.06465063989162445, 0.1893942803144455, -0.18746143579483032, 0.7220233678817749, -0.00011881563114002347, -0.07575772702693939, 0.35266435146331787, 0.10400492697954178, -0.3857038617134094, -0.31843578815460205, -0.08975236117839813, 0.02803664654493332, 0.16885356605052948, 0.16473811864852905, 0.08734337985515594, 0.23818884789943695, -0.35454094409942627, -0.47367024421691895, 0.3177542984485626, 0.23788471519947052, 0.132045179605484, 0.17364253103733063, -0.16090217232704163, 0.11848746240139008, 0.058322641998529434, 0.3639508783817291, -0.08377445489168167, -0.015103166922926903, 0.46977949142456055, -0.12489946186542511, 0.024306245148181915, 0.5026237964630127, -0.09068429470062256, -0.3198801279067993, 0.02005670592188835, -0.3130878210067749, 0.2972243130207062, -0.5096781253814697, 0.34153375029563904, 0.08522938191890717, 0.2538551390171051, -0.10811648517847061, -0.2361735999584198, -0.2647005021572113, -0.042713407427072525, -0.39066725969314575, 0.2625923156738281, -0.20229804515838623, -0.37361982464790344, 0.009362267330288887, -0.1883835643529892, -0.33812063932418823, -0.06542965769767761, 0.02961885929107666, -0.40937235951423645, 0.1622081995010376, -0.05369032919406891, 0.2890245020389557, -0.08827146887779236, -0.339679479598999, 0.2439538985490799, -0.16501133143901825, 0.01712145283818245, 0.0609610415995121, -0.3052486777305603, 0.010168977081775665, 0.2900024652481079, -0.318198025226593, -0.07096177339553833, 0.15366367995738983, -0.12364374101161957, 0.15854956209659576, 0.041469935327768326, 0.18461334705352783, 0.33720433712005615, -0.20597954094409943, 0.17277052998542786, 0.242458313703537, 0.642621636390686, -0.06701238453388214, -0.20076397061347961, 0.03994559124112129, 0.15855227410793304, -0.02987024374306202, 0.07360607385635376, -0.12727490067481995, -0.033675938844680786, -0.16701284050941467, -0.30695247650146484, 0.44382554292678833, -0.4107748866081238, 0.2526314854621887, 0.47699907422065735, 0.2522599697113037, 0.08908066153526306, 0.25452369451522827, 0.18040063977241516, -0.12905292212963104, -0.018883295357227325, 0.04103313013911247, 0.023002643138170242, -0.32982340455055237, 0.13760998845100403, -0.10461984574794769, 0.055871739983558655, -0.19467222690582275, 0.0023275651037693024, -0.10567738115787506, 0.21719300746917725, -0.18725568056106567, 0.2302515059709549, -0.09797725081443787, 0.2319539338350296, 0.762842059135437, -0.08409889787435532, 0.3619707524776459, -0.07286854088306427, -0.3862423896789551, -0.16723494231700897, 0.16468584537506104, 0.07906251400709152, -0.1563381552696228, 0.16868257522583008, 0.12482097744941711, -0.05722866579890251, 0.21888844668865204, -0.029033619910478592, 0.08790472149848938, 0.20746451616287231, -0.12897196412086487, 0.22616058588027954, -0.36450934410095215, -0.19874005019664764, -0.12920145690441132, 0.15321888029575348, 0.25884193181991577, -0.5506563782691956, 0.003818415105342865, -0.4950996935367584, 0.06899383664131165, 0.20324787497520447, 0.2782786190509796, 0.006369795650243759, 0.17004579305648804, -0.09669038653373718, 0.21596093475818634, 0.46009010076522827, -0.047418639063835144, -0.3861583471298218, 0.34343594312667847, -0.10285546630620956, 0.31514090299606323, -0.29647722840309143, -0.06351727247238159, 0.25036856532096863, -0.08615677058696747, 0.3225878179073334, 0.18537113070487976, -0.23271845281124115, 0.010655820369720459, -0.24468739330768585, 0.23530730605125427, 0.003006329759955406, 0.05655018985271454, 0.03554336354136467, -0.4329131543636322, 0.018373705446720123, -0.1919877976179123, 0.0385640412569046, 0.18837451934814453, 0.11319029331207275, 0.2774730324745178, 0.8046406507492065, -0.12615618109703064, -0.05106019228696823, -0.24125508964061737, -0.08673768490552902, 0.2271801382303238, 0.05179668962955475, -0.3133341073989868, -0.36821648478507996, -0.1773802489042282, -0.12385886162519455, 0.5292468070983887, 0.03143665939569473, -0.05018216744065285, 0.029697779566049576, -0.041551344096660614, 0.05660173296928406, 0.07901106774806976, -0.04739762097597122, 0.22589482367038727, 0.02534835785627365, 0.034491509199142456, -0.002283986657857895, 0.24359610676765442, 0.2165641337633133, -0.2370859980583191, -0.20655956864356995, 0.059033699333667755, 0.033323049545288086, -0.06444712728261948, -0.2184663563966751, 0.3123110234737396, 0.3095400035381317, -0.15721258521080017, -0.03690824657678604, -0.006274804472923279, 0.11522440612316132, 0.2860008478164673, -0.18542557954788208, 0.17432376742362976, 0.1526419222354889, -0.10414596647024155, -0.04316117614507675, 0.2966274321079254, -0.023384559899568558, 0.4897063374519348, -0.008123956620693207, 0.17041237652301788, 0.5087051391601562, 0.2727644443511963, -0.23727956414222717, -0.13617880642414093, 0.3289845585823059, -0.02464315854012966, 0.10890544950962067, 0.04633502662181854, -0.41050559282302856, 0.3732442855834961, 0.3545161485671997, -0.017089232802391052, -0.04272240027785301, 0.36706605553627014, 0.018959786742925644, 0.023183397948741913, 0.10560071468353271, 0.1923331618309021, 0.33019933104515076, 0.0620427131652832, -0.012724209576845169, -0.2272196114063263, -0.22913862764835358, -0.1925898641347885, 0.16603046655654907, 0.20105084776878357, 0.013729136437177658, 0.3386262357234955, 0.3845500349998474, 0.0404013991355896, -0.19448426365852356, -0.34079691767692566, 0.09031470119953156, 0.2513419985771179, -0.09019741415977478, 0.2826385498046875, -0.2642448842525482, -0.09609900414943695, 0.22049863636493683, -0.04540329799056053, -0.3494517505168915, -0.4504781663417816, 0.12722817063331604, 0.3339839577674866, -0.2902737259864807, 0.19758036732673645, -0.038296543061733246, 0.553059458732605, 0.2598201036453247, -0.2600964605808258, -0.511033296585083, -0.33963704109191895, -0.34365367889404297, -0.07482875883579254, 0.39573296904563904, 0.03307545185089111, 0.47609254717826843, 0.3777952194213867, -0.0643460601568222, -0.16474780440330505, -0.5581002235412598, 0.16564348340034485, 0.03573838621377945, 0.6135494112968445, 0.23119835555553436, 0.12263403832912445, -0.16486075520515442, 0.04880315065383911, 0.17614606022834778, -0.1093737930059433, -0.13242873549461365, 0.18032211065292358, 0.07324515283107758, 0.027938485145568848, -0.36111533641815186, 0.1461409032344818, -0.174974262714386, -0.4524044990539551, 0.16616135835647583, -0.3925588130950928, -0.034553904086351395, 0.0205225832760334, 0.11306311190128326, -0.026152320206165314, -0.29781654477119446, -0.09392263740301132, -0.19350135326385498, 0.004319466650485992, 0.15532086789608002, -0.08533969521522522, -0.186845064163208, 0.060060083866119385, -0.04247114062309265, 0.15264707803726196, 0.15430808067321777, -0.7245499491691589, -0.008563850075006485, -0.16213032603263855, 0.19835621118545532, -0.0070350985042750835, -0.2560718357563019, 0.19283762574195862, 0.11798633635044098, 0.024812545627355576, -0.08495267480611801, -0.2726677656173706, -0.06527724117040634, -0.0267433300614357, 0.250615656375885, 0.0002726241946220398, 0.9606239795684814, 0.11461303383111954, 0.48665377497673035, 0.22720658779144287, -0.09409647434949875, -0.1579119712114334, 0.23062847554683685, 0.34646856784820557, -0.10386669635772705, -0.17602181434631348, -0.08565467596054077, -0.04854516685009003, -0.39790573716163635, -0.042513616383075714, 0.18848006427288055, -0.2606312334537506, 0.05031101405620575, 0.14580050110816956, -0.021346315741539, -0.4964333176612854, 0.1564314365386963, -0.1790248602628708, 0.30223655700683594, 0.10418625175952911, 0.048854902386665344, -0.1755022406578064, 0.05719039589166641, -0.03939376026391983, 0.26127365231513977, 0.33507582545280457, -0.2007351517677307, -0.3911237120628357, -0.2479344606399536, -0.44437506794929504, 0.2618735432624817, 0.11647731810808182, 0.5864197015762329, -0.29051655530929565, -0.0066530779004096985, 0.07987042516469955, -0.2718789577484131, 0.7027778029441833, -0.3515014350414276, -0.21745100617408752, 0.2824973464012146, -0.25434890389442444, -0.5876203775405884, 0.15596145391464233, -0.08196524530649185, 0.31402522325515747, 0.4189227819442749, 0.5455506443977356, -0.23963984847068787, -0.21138978004455566, -0.1931055784225464, 0.11854816973209381, -0.21259790658950806, -0.14185602962970734, -0.12087977677583694, -0.4556618332862854, -0.23524019122123718, 0.3400444984436035, 0.19891241192817688, 0.0743156373500824, -0.053556349128484726, -0.3231024742126465, 0.04609084874391556, -0.5019518136978149, -0.059617284685373306, 0.25295290350914, 0.02201589196920395, -0.11270172894001007, 0.49740317463874817, -0.06749393045902252, -0.21820566058158875, 0.15285877883434296, 0.18633195757865906, -0.17960745096206665, -0.19256240129470825, 0.22547560930252075, 0.08189228922128677, 0.3352833092212677, 0.5033341646194458, -0.24921414256095886, 0.38619545102119446, -0.2615197002887726, 0.2818286120891571, 0.09883245825767517, 0.16002565622329712, 0.01769397407770157, 0.2907277047634125, -0.2440177947282791, -0.015414893627166748, 0.10037128627300262, 0.276830792427063, -0.17416608333587646, 0.670275866985321, -0.3196030259132385, -0.18792206048965454, 0.29835304617881775, 0.028680559247732162, 0.7482528686523438, 0.1110212430357933, -0.12121361494064331, 0.05833416432142258, -0.24668791890144348, 0.1372801512479782, -0.36039865016937256, 0.10589506477117538, -0.019225262105464935, -0.17637677490711212, 0.031118474900722504, -0.21516954898834229, 0.2196427285671234, 0.033547744154930115, 0.01893247663974762, 0.026778530329465866, -0.16526898741722107, 0.13655127584934235, 0.14758366346359253, 0.16142535209655762, -0.054607465863227844, -0.1882609724998474, -0.44852137565612793, 0.09724508225917816, 0.13540929555892944, -0.13962559401988983, -0.10783541202545166, 0.0024287737905979156, 0.31022050976753235, -0.20939037203788757, -0.395097553730011, -0.16387474536895752, -0.32388103008270264, 0.01637318730354309, 0.4138198792934418, -0.12967060506343842, 0.13216632604599, -0.37762781977653503, -0.22346845269203186, 0.42935848236083984, 0.11651582270860672, 0.38458552956581116, 0.17374607920646667, 0.43430376052856445, 0.2232179194688797, -0.08461517095565796, 0.16758385300636292, 0.005754150450229645, 0.07570044696331024, 0.26816433668136597, -0.3260583281517029, -0.26756393909454346, 0.09715835750102997, 0.2078452706336975, -0.04546104371547699, 0.031438153237104416, 0.18096250295639038, -0.013652577996253967, -0.19160854816436768, -0.310635507106781, 0.07488670945167542, 0.2202151119709015, -0.038190171122550964, 0.4437558650970459, -0.1414063572883606, -0.218370258808136, -0.17367079854011536, 0.1387256681919098, -0.3370949625968933, 0.1102147102355957, 0.1370423585176468, 0.18685200810432434, -0.32663053274154663, -0.32148420810699463, 0.20003342628479004, -0.13151367008686066, -0.2087753266096115, 0.4593968093395233, -0.24889199435710907, -0.22949659824371338, 0.31110331416130066, -0.14365993440151215, -0.06250636279582977, -0.3708140254020691, -0.3728914260864258, -0.5445604920387268, -0.1264459192752838, -0.02616722136735916, 0.25040921568870544, 0.06254070997238159, -0.18734589219093323, 0.1277780830860138, -0.4292507469654083, 0.08270701766014099, -0.22262367606163025, -0.20320717990398407, -0.23045453429222107, 0.20745013654232025, -0.14487630128860474, 0.05992730334401131, 0.12984496355056763, -0.16436117887496948, 0.010102469474077225, 0.2754017114639282, -0.15210530161857605, -0.13591545820236206, -0.12045593559741974, 0.1897779405117035, 0.03682039678096771, -0.15506622195243835, 0.04644237458705902, -0.2113986313343048, -0.0038343053311109543, -0.11152428388595581, 0.09373416006565094, -0.22080816328525543, -0.1682194322347641, -0.4998714327812195, 0.012302208691835403, 0.17370960116386414, 0.2842746376991272, 0.4288547933101654, -0.013197127729654312, 0.21966704726219177, 0.187493234872818, 0.3071303963661194, 0.08221015334129333, -0.07700187712907791, -0.17207114398479462, -0.07266451418399811, -0.16113321483135223, -0.04732638597488403, 0.5523417592048645, -0.15055759251117706, -0.11011426895856857, 0.2907560467720032, 0.2542504668235779, 0.6250393390655518, -0.2228848934173584, -0.07786691933870316, 0.26750028133392334, 0.1167156770825386, -0.2087681144475937, -0.011776473373174667, -0.15008872747421265, 0.3364606201648712, 0.19655196368694305, 0.12055684626102448, -0.0908505842089653, -0.053942978382110596, 0.41380977630615234, 0.44313859939575195, 0.6018891930580139, 0.01768026128411293, -0.12033626437187195, 0.22969919443130493, -0.03655221313238144, 0.076692596077919, 0.31355682015419006, -0.03680730611085892, 0.14552612602710724, 0.40589457750320435, 0.13823463022708893, 0.14971110224723816, 0.2672942280769348, 0.2981872856616974, 0.04884939640760422, -0.27078789472579956, -0.07446163147687912, 0.08296296745538712, -0.2688260078430176, 0.15776795148849487, 0.14401593804359436, -0.36283963918685913, -0.1434704065322876, -0.20293587446212769, 0.05647260695695877, 0.41886603832244873, -0.19962796568870544, -0.1274118274450302, -0.23194487392902374, -0.15529751777648926, 0.004764929413795471, -0.009684957563877106, 0.12225168943405151, 0.027490127831697464, 0.16631415486335754, 0.18569634854793549, 0.09713764488697052, -0.468755841255188, -0.3689126968383789, -0.18701249361038208, 0.12090538442134857, -0.24241459369659424, 0.24463121592998505, 0.276295930147171, -0.09605804085731506, -0.028919093310832977, -0.30046895146369934, 0.3999522030353546, 0.3902803063392639, -0.4316527843475342, 0.037148743867874146, -0.2942584753036499, 0.006849303841590881, -0.2332385927438736, 0.44702526926994324, -0.10360969603061676, -0.11436766386032104, 0.15124326944351196, 0.06941766291856766, -0.13208290934562683, 0.05981467291712761, 0.2649204134941101, 0.4365428388118744, -0.253261536359787, 0.3273386061191559, 0.0723244696855545, 0.2846912741661072, -0.12648503482341766, -0.09725135564804077, -0.21080243587493896, -0.18406571447849274, 0.6381244659423828, -0.16347400844097137, 0.14109563827514648, -0.15725398063659668, 0.07760461419820786, -0.19006410241127014, 0.3435342013835907, 0.286355584859848, -0.11204060912132263, -0.13245701789855957, -0.1129876971244812, -0.4433467388153076, -0.1440124809741974, -0.2785089910030365, -0.05257432907819748, 0.04951051250100136, 0.1233946681022644, 0.016038138419389725, 0.21413937211036682, 0.031452883034944534, 0.053349532186985016, 0.0029396414756774902, 0.17301732301712036, -0.36523884534835815, -0.10101009905338287, -0.1097247526049614, -0.0723176971077919, -0.011980768293142319, -0.32262879610061646, 0.17107681930065155, -0.14007295668125153, 0.0619836151599884, -0.09796769917011261, -0.4745483994483948, 0.22128470242023468, 0.4117945432662964, 0.20765988528728485, 0.3730589747428894, 0.14230220019817352, 0.025210313498973846, -0.12210071831941605, -0.026718225330114365, -0.18881607055664062, -0.005663666874170303, -0.024229444563388824, 0.013669265434145927, 0.25046730041503906, -0.1658184826374054, -0.23073020577430725, -0.22778719663619995, -0.08002400398254395, -0.07802457362413406, -0.03900197148323059, -0.08839364349842072, 0.12032413482666016, -0.17373383045196533, 0.19564618170261383, -0.16038130223751068, 0.2803179621696472, 0.10281762480735779, 0.23453372716903687, -0.2629269063472748, -0.21952345967292786, 0.6461015939712524, -0.5209581255912781, -0.3869444727897644, -0.10633206367492676, 0.11981570720672607, -0.03795648738741875, -0.3087080121040344, -0.08073331415653229, -0.3442075252532959, 0.3341524004936218, -0.15741416811943054, -0.19652336835861206, -0.11685138195753098, 0.1075143963098526, -0.03873247280716896, -0.23108628392219543, 0.24608322978019714, 0.11569613963365555, -0.02861129865050316, 0.1942899078130722, -0.08838832378387451 ]
https://github.com/huggingface/datasets/issues/6392
Hi! We made some improvements to `push_to_hub` to make it more robust a couple of weeks ago but haven't published a release in the meantime, so it would help if you could install `datasets` from `main` (`pip install https://github.com/huggingface/datasets`) and let us know if this improved version of `push_to_hub` resolves the issue (in case the `ConnectionError` happens, re-running `push_to_hub` should be faster now). Also, note that the previous implementation retries the upload, but sometimes this is not enough, so re-running the op is the only option.
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
86
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 Hi! We made some improvements to `push_to_hub` to make it more robust a couple of weeks ago but haven't published a release in the meantime, so it would help if you could install `datasets` from `main` (`pip install https://github.com/huggingface/datasets`) and let us know if this improved version of `push_to_hub` resolves the issue (in case the `ConnectionError` happens, re-running `push_to_hub` should be faster now). Also, note that the previous implementation retries the upload, but sometimes this is not enough, so re-running the op is the only option.
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
The update helped push more data. However it still crashed a little later: ``` Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 270, in hf_raise_for_status response.raise_for_status() File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://hf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com/repos/6c/33/6c33b3be1463a656e43c7a4f2d43c4a1cdae6e9d81fff87f69167ef25ccb1b88/5f53cb57cf2a52ca0d4c2166a69a6714c64fcdbb7cb8936dfa5b11ac60058e5f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA2JU7TKAQFN2FTF47%2F20231110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231110T011254Z&X-Amz-Expires=86400&X-Amz-Signature=74e3e33c09ac4e7c6ac887aaee8d489f068869abbe1ee6d58a910fb18d0601d4&X-Amz-SignedHeaders=host&partNumber=13&uploadId=kQwunNkunfmT9D8GulQu_ufw1BTZtRA6wEUI4hnYOjytfdf.GKxDETgMr4wm8_0WNF2yGaNco_0h3JAGm4l9KV1N0nqr5XXyUCbs1ROmHP475fn9FIhc1umWQLEDc97V&x-id=UploadPart The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 391, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 376, in _upload_parts_iteratively hf_raise_for_status(part_upload_res) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 330, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://hf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com/repos/6c/33/6c33b3be1463a656e43c7a4f2d43c4a1cdae6e9d81fff87f69167ef25ccb1b88/5f53cb57cf2a52ca0d4c2166a69a6714c64fcdbb7cb8936dfa5b11ac60058e5f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA2JU7TKAQFN2FTF47%2F20231110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231110T011254Z&X-Amz-Expires=86400&X-Amz-Signature=74e3e33c09ac4e7c6ac887aaee8d489f068869abbe1ee6d58a910fb18d0601d4&X-Amz-SignedHeaders=host&partNumber=13&uploadId=kQwunNkunfmT9D8GulQu_ufw1BTZtRA6wEUI4hnYOjytfdf.GKxDETgMr4wm8_0WNF2yGaNco_0h3JAGm4l9KV1N0nqr5XXyUCbs1ROmHP475fn9FIhc1umWQLEDc97V&x-id=UploadPart The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 121, in <module> main() File "convert_to_hf.py", line 109, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1699, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5215, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3665, in preupload_lfs_files _upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 401, in _upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_20/train-00206-of-00261.parquet' to the Hub. ```
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
223
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 The update helped push more data. However it still crashed a little later: ``` Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 270, in hf_raise_for_status response.raise_for_status() File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://hf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com/repos/6c/33/6c33b3be1463a656e43c7a4f2d43c4a1cdae6e9d81fff87f69167ef25ccb1b88/5f53cb57cf2a52ca0d4c2166a69a6714c64fcdbb7cb8936dfa5b11ac60058e5f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA2JU7TKAQFN2FTF47%2F20231110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231110T011254Z&X-Amz-Expires=86400&X-Amz-Signature=74e3e33c09ac4e7c6ac887aaee8d489f068869abbe1ee6d58a910fb18d0601d4&X-Amz-SignedHeaders=host&partNumber=13&uploadId=kQwunNkunfmT9D8GulQu_ufw1BTZtRA6wEUI4hnYOjytfdf.GKxDETgMr4wm8_0WNF2yGaNco_0h3JAGm4l9KV1N0nqr5XXyUCbs1ROmHP475fn9FIhc1umWQLEDc97V&x-id=UploadPart The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 391, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 376, in _upload_parts_iteratively hf_raise_for_status(part_upload_res) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 330, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://hf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com/repos/6c/33/6c33b3be1463a656e43c7a4f2d43c4a1cdae6e9d81fff87f69167ef25ccb1b88/5f53cb57cf2a52ca0d4c2166a69a6714c64fcdbb7cb8936dfa5b11ac60058e5f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA2JU7TKAQFN2FTF47%2F20231110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231110T011254Z&X-Amz-Expires=86400&X-Amz-Signature=74e3e33c09ac4e7c6ac887aaee8d489f068869abbe1ee6d58a910fb18d0601d4&X-Amz-SignedHeaders=host&partNumber=13&uploadId=kQwunNkunfmT9D8GulQu_ufw1BTZtRA6wEUI4hnYOjytfdf.GKxDETgMr4wm8_0WNF2yGaNco_0h3JAGm4l9KV1N0nqr5XXyUCbs1ROmHP475fn9FIhc1umWQLEDc97V&x-id=UploadPart The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 121, in <module> main() File "convert_to_hf.py", line 109, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1699, in push_to_hub split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5215, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3665, in preupload_lfs_files _upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 401, in _upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_20/train-00206-of-00261.parquet' to the Hub. ```
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
I think the previous implementation was actually better: it pushes to the hub every shard. So if it fails, as long as the shards have the same checksum, it will skip the ones that have been pushed. The implementation in `main` pushes commits at the end, so when it fails, there are no commits and therefore restarts from the beginning every time. Below is the another error log from another run with `main`. I've reverting back to the current release as it does the job for me. ``` Uploading the dataset shards: 86%|████████▌ | 224/261 [21:46<03:35, 5.83s/it]s] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 270, in hf_raise_for_status response.raise_for_status() File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://hf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com/repos/6c/33/6c33b3be1463a656e43c7a4f2d43c4a1cdae6e9d81fff87f69167ef25ccb1b88/97e68d7a5d4a747ffaa249fc09798e961d621fe4170599e6100197f7733f321d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA2JU7TKAQFN2FTF47%2F20231110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231110T145155Z&X-Amz-Expires=86400&X-Amz-Signature=5341e4b34dc325737f92dc9005c4a31e4d3f9a3d3d853b267e01915260acf629&X-Amz-SignedHeaders=host&partNumber=27&uploadId=NRD0izEWv7MPtC2bYrm5VJ4XgIbHctKNguR7zS1UhGOOrXwBJvigrOywBvQBnS9sxiy0J0ma9sNog8S13nIdTdE9p60MIITTstUFeKvLHSxpU.a527QED1JVYzJ.9xA0&x-id=UploadPart The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 391, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 376, in _upload_parts_iteratively hf_raise_for_status(part_upload_res) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 330, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://hf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com/repos/6c/33/6c33b3be1463a656e43c7a4f2d43c4a1cdae6e9d81fff87f69167ef25ccb1b88/97e68d7a5d4a747ffaa249fc09798e961d621fe4170599e6100197f7733f321d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA2JU7TKAQFN2FTF47%2F20231110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231110T145155Z&X-Amz-Expires=86400&X-Amz-Signature=5341e4b34dc325737f92dc9005c4a31e4d3f9a3d3d853b267e01915260acf629&X-Amz-SignedHeaders=host&partNumber=27&uploadId=NRD0izEWv7MPtC2bYrm5VJ4XgIbHctKNguR7zS1UhGOOrXwBJvigrOywBvQBnS9sxiy0J0ma9sNog8S13nIdTdE9p60MIITTstUFeKvLHSxpU.a527QED1JVYzJ.9xA0&x-id=UploadPart The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 121, in <module> main() File "convert_to_hf.py", line 109, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1699, in push_to_hub p, glob_pattern_to_regex(PUSH_TO_HUB_WITHOUT_METADATA_CONFIGS_SPLIT_PATTERN_SHARDED) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5215, in _push_parquet_shards_to_hub token = token if token is not None else HfFolder.get_token() File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3665, in preupload_lfs_files _upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 401, in _upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_20/train-00224-of-00261.parquet' to the Hub. ```
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
312
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 I think the previous implementation was actually better: it pushes to the hub every shard. So if it fails, as long as the shards have the same checksum, it will skip the ones that have been pushed. The implementation in `main` pushes commits at the end, so when it fails, there are no commits and therefore restarts from the beginning every time. Below is the another error log from another run with `main`. I've reverting back to the current release as it does the job for me. ``` Uploading the dataset shards: 86%|████████▌ | 224/261 [21:46<03:35, 5.83s/it]s] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 270, in hf_raise_for_status response.raise_for_status() File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://hf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com/repos/6c/33/6c33b3be1463a656e43c7a4f2d43c4a1cdae6e9d81fff87f69167ef25ccb1b88/97e68d7a5d4a747ffaa249fc09798e961d621fe4170599e6100197f7733f321d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA2JU7TKAQFN2FTF47%2F20231110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231110T145155Z&X-Amz-Expires=86400&X-Amz-Signature=5341e4b34dc325737f92dc9005c4a31e4d3f9a3d3d853b267e01915260acf629&X-Amz-SignedHeaders=host&partNumber=27&uploadId=NRD0izEWv7MPtC2bYrm5VJ4XgIbHctKNguR7zS1UhGOOrXwBJvigrOywBvQBnS9sxiy0J0ma9sNog8S13nIdTdE9p60MIITTstUFeKvLHSxpU.a527QED1JVYzJ.9xA0&x-id=UploadPart The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 391, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 376, in _upload_parts_iteratively hf_raise_for_status(part_upload_res) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 330, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://hf-hub-lfs-us-east-1.s3.us-east-1.amazonaws.com/repos/6c/33/6c33b3be1463a656e43c7a4f2d43c4a1cdae6e9d81fff87f69167ef25ccb1b88/97e68d7a5d4a747ffaa249fc09798e961d621fe4170599e6100197f7733f321d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA2JU7TKAQFN2FTF47%2F20231110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231110T145155Z&X-Amz-Expires=86400&X-Amz-Signature=5341e4b34dc325737f92dc9005c4a31e4d3f9a3d3d853b267e01915260acf629&X-Amz-SignedHeaders=host&partNumber=27&uploadId=NRD0izEWv7MPtC2bYrm5VJ4XgIbHctKNguR7zS1UhGOOrXwBJvigrOywBvQBnS9sxiy0J0ma9sNog8S13nIdTdE9p60MIITTstUFeKvLHSxpU.a527QED1JVYzJ.9xA0&x-id=UploadPart The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 121, in <module> main() File "convert_to_hf.py", line 109, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1699, in push_to_hub p, glob_pattern_to_regex(PUSH_TO_HUB_WITHOUT_METADATA_CONFIGS_SPLIT_PATTERN_SHARDED) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5215, in _push_parquet_shards_to_hub token = token if token is not None else HfFolder.get_token() File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3665, in preupload_lfs_files _upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 401, in _upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_20/train-00224-of-00261.parquet' to the Hub. ```
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
There's a new error from the hub now: ``` Pushing dataset shards to the dataset hub: 49%|████▉ | 128/261 [11:38<12:05, 5.45s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 270, in hf_raise_for_status response.raise_for_status() File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/tarteel-ai/tawseem/commit/main The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 121, in <module> main() File "convert_to_hf.py", line 109, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 293, in _retry raise err File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1045, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3850, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1045, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3237, in create_commit hf_raise_for_status(commit_resp, endpoint_name="commit") File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 330, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/tarteel-ai/tawseem/commit/main (Request ID: Root=1-654e48e6-598511b14413bb293fa67084;783522b4-66f9-4f8a-8a74-2accf7cabd17) You have exceeded our hourly quotas for action: commit. We invite you to retry later. ``` At least this is more explicit from the server side.
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
225
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 There's a new error from the hub now: ``` Pushing dataset shards to the dataset hub: 49%|████▉ | 128/261 [11:38<12:05, 5.45s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 270, in hf_raise_for_status response.raise_for_status() File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/tarteel-ai/tawseem/commit/main The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 121, in <module> main() File "convert_to_hf.py", line 109, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 293, in _retry raise err File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1045, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3850, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1045, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3237, in create_commit hf_raise_for_status(commit_resp, endpoint_name="commit") File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 330, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/tarteel-ai/tawseem/commit/main (Request ID: Root=1-654e48e6-598511b14413bb293fa67084;783522b4-66f9-4f8a-8a74-2accf7cabd17) You have exceeded our hourly quotas for action: commit. We invite you to retry later. ``` At least this is more explicit from the server side.
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
> think the previous implementation was actually better: it pushes to the hub every shard. So if it fails, as long as the shards have the same checksum, it will skip the ones that have been pushed. > >The implementation in main pushes commits at the end, so when it fails, there are no commits and therefore restarts from the beginning every time. > >Below is the another error log from another run with main. I've reverting back to the current release as it does the job for me. The `preupload` step is instant for the already uploaded shards, so only the Parquet conversion is repeated without uploading the actual Parquet data (only to check the SHAs). The previous implementation manually checks the Parquet shard's fingerprint to resume uploading, so the current implementation is cleaner. > You have exceeded our hourly quotas for action: commit. We invite you to retry later. This is the problem with the previous implementation. If the number of shards is large, it creates too many commits for the Hub in a short period.
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
178
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 > think the previous implementation was actually better: it pushes to the hub every shard. So if it fails, as long as the shards have the same checksum, it will skip the ones that have been pushed. > >The implementation in main pushes commits at the end, so when it fails, there are no commits and therefore restarts from the beginning every time. > >Below is the another error log from another run with main. I've reverting back to the current release as it does the job for me. The `preupload` step is instant for the already uploaded shards, so only the Parquet conversion is repeated without uploading the actual Parquet data (only to check the SHAs). The previous implementation manually checks the Parquet shard's fingerprint to resume uploading, so the current implementation is cleaner. > You have exceeded our hourly quotas for action: commit. We invite you to retry later. This is the problem with the previous implementation. If the number of shards is large, it creates too many commits for the Hub in a short period.
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
But I agree that the `500 Server Error` returned by the Hub is annoying. Earlier today, I also got it on a small 5GB dataset (with 500 MB shards). @Wauplin @julien-c Is there something we can do about this?
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
39
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 But I agree that the `500 Server Error` returned by the Hub is annoying. Earlier today, I also got it on a small 5GB dataset (with 500 MB shards). @Wauplin @julien-c Is there something we can do about this?
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
@mariosasko can't do much if AWS raises a HTTP 500 unfortunately (we are simply pushing data to a S3 bucket). What we can do is to add a retry mechanism in the multi-part upload logic here: https://github.com/huggingface/huggingface_hub/blob/c972cba1fecb456a7b3325cdd1fdbcc425f21f94/src/huggingface_hub/lfs.py#L370 :confused:
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
38
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 @mariosasko can't do much if AWS raises a HTTP 500 unfortunately (we are simply pushing data to a S3 bucket). What we can do is to add a retry mechanism in the multi-part upload logic here: https://github.com/huggingface/huggingface_hub/blob/c972cba1fecb456a7b3325cdd1fdbcc425f21f94/src/huggingface_hub/lfs.py#L370 :confused:
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
> That code already retries the request using http_backoff, no? Currently only on HTTP 503 by default. We should add 500 as well (and hope it is a transient error from AWS)
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
32
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 > That code already retries the request using http_backoff, no? Currently only on HTTP 503 by default. We should add 500 as well (and hope it is a transient error from AWS)
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
Opened a PR to retry in case S3 raises HTTP 500. Will also retry on any `ConnectionError` (connection reset by peer, connection lost,...). Hopefully this should make the upload process more robust to transient errors.
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
35
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 Opened a PR to retry in case S3 raises HTTP 500. Will also retry on any `ConnectionError` (connection reset by peer, connection lost,...). Hopefully this should make the upload process more robust to transient errors.
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
I still get the same error, using `push_to_hub`. Using `git lfs` and pushing the files solved it for me.
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
19
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 I still get the same error, using `push_to_hub`. Using `git lfs` and pushing the files solved it for me.
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6392
@BEpresent the fix has not been released yet. You can expect a release of `huggingface_hub` (with this fix) today or tomorrow :)
`push_to_hub` is not robust to hub closing connection
### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
22
`push_to_hub` is not robust to hub closing connection ### Describe the bug Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error: ``` Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it] Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 316, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 285, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload _upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "convert_to_hf.py", line 116, in <module> main() File "convert_to_hf.py", line 108, in main audio_dataset.push_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub _retry( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry return func(*func_args, **func_kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file commit_info = self.create_commit( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner return fn(self, *args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit upload_lfs_files( File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files _wrapped_lfs_upload(filtered_actions[0]) File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub. ``` The function should retry if the operations fails, or at least offer a way to recover after such a failure. Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed. Previously, it would crash with an error 400 #4677 . ### Steps to reproduce the bug Any large dataset pushed the hub: ```py audio_dataset.push_to_hub( repo_id="org/dataset", ) ``` ### Expected behavior `push_to_hub` should have an option for max retries or resume. ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 @BEpresent the fix has not been released yet. You can expect a release of `huggingface_hub` (with this fix) today or tomorrow :)
[ -0.5284816026687622, -0.3638116121292114, -0.06487172842025757, 0.1819303184747696, 0.3242587447166443, -0.20704427361488342, 0.17081235349178314, 0.3081148862838745, -0.03854190558195114, -0.022969290614128113, -0.19621890783309937, 0.18021035194396973, 0.1735050529241562, 0.04469921439886093, 0.06687469780445099, 0.03647710382938385, 0.1415911614894867, 0.05757880210876465, -0.007490962743759155, -0.15355037152767181, -0.2217925786972046, 0.037004850804805756, -0.13432224094867706, 0.1302778720855713, -0.16990870237350464, -0.25265252590179443, 0.2624891400337219, 0.33431506156921387, -0.055671341717243195, -0.4449250102043152, 0.22087791562080383, 0.20424440503120422, -0.17986392974853516, 0.26940494775772095, -0.00011312132846796885, 0.09079468250274658, 0.25773197412490845, 0.06974145025014877, -0.22909532487392426, 0.002839520573616028, -0.5200388431549072, -0.36414486169815063, -0.09080789983272552, -0.16243962943553925, 0.14515185356140137, 0.2087095081806183, -0.33889061212539673, 0.19361643493175507, 0.4470996558666229, 0.012405578047037125, 0.20519223809242249, 0.41037869453430176, 0.5811349749565125, -0.19259147346019745, 0.21170416474342346, -0.1271495819091797, -0.2800540328025818, 0.1825995296239853, 0.33075425028800964, 0.06019272655248642, -0.2460557371377945, -0.02849624492228031, 0.004077211022377014, -0.19606176018714905, -0.11106455326080322, -0.2025463730096817, -0.14387205243110657, -0.11469070613384247, -0.04216788709163666, 0.16164949536323547, -0.06024234741926193, -0.2635592222213745, -0.17657077312469482, -0.0916086882352829, -0.4114376902580261, -0.037608496844768524, 0.14648157358169556, -0.005322657525539398, -0.10699179768562317, 0.019071431830525398, -0.2178674191236496, -0.35013553500175476, -0.4473643898963928, 0.07534116506576538, 0.052425578236579895, 0.360725462436676, 0.15071895718574524, 0.21767336130142212, -0.05759522691369057, -0.1365492343902588, 0.40549731254577637, -0.001316845417022705, -0.12222492694854736, -0.3156278133392334, -0.2701467275619507, -0.31794363260269165, -0.08876940608024597, 0.2767902612686157, 0.26309430599212646, -0.010884505696594715, -0.24020864069461823, 0.23557397723197937, -0.14977645874023438, 0.04746003448963165, 0.320413738489151, -0.03722285479307175, 0.13277578353881836, 0.21898967027664185, 0.3336622416973114, 0.40625321865081787, 0.04586026072502136, 0.16240181028842926, 0.31295377016067505, -0.24722754955291748, 0.28344762325286865, 0.2352542281150818, 0.41178402304649353, -0.05655113235116005, -0.25112587213516235, 0.202695831656456, -0.1424463540315628, 0.2813604474067688, 0.1669747531414032, 0.2531502842903137, -0.10851816087961197, 0.2782684862613678, -0.1748831570148468, -0.08216137439012527, -0.23290610313415527, 0.12418702244758606, -0.2358648180961609, 0.07622724771499634, 0.0844554528594017, -0.14305329322814941, 0.04444544017314911, -0.31380364298820496, 0.11527159065008163, 0.06759404391050339, -0.14542271196842194, -0.06632925570011139, -0.1761399656534195, -0.19454145431518555, 0.1692880094051361, 0.19967439770698547, 0.061757028102874756, 0.11178581416606903, -0.09917736053466797, -0.11202950030565262, 0.010529786348342896, -0.07001030445098877, -0.24714146554470062, -0.23404115438461304, -0.09467008709907532, 0.27554553747177124, -0.2959645986557007, -0.04244024679064751, -0.06385190039873123, -0.33374184370040894, -0.09965526312589645, 0.03819070756435394, 0.22300198674201965, 0.0928758978843689, -0.288315087556839, -0.19083969295024872, 0.1732921451330185, 0.45441314578056335, -0.06635832041501999, 0.2521010637283325, 0.575664222240448, -0.10052050650119781, -0.18640175461769104, 0.21700447797775269, -0.06705576926469803, 0.0881585031747818, -0.14609041810035706, 0.09459958970546722, 0.06768632680177689, -0.5594075322151184, -0.6116236448287964, 0.07956375181674957, -0.09101530909538269, -0.07233782112598419, -0.2778010070323944, 0.04108177125453949, 0.33538299798965454, -0.20139282941818237, 0.16270282864570618, 0.14689931273460388, -0.12249963730573654, 0.09595482051372528, -0.42961591482162476, -0.2177644670009613, -0.062301505357027054, 0.06456513702869415, 0.25127774477005005, -0.23763033747673035, 0.3139607906341553, 0.3702256679534912, 0.30682703852653503, 0.33271875977516174, 0.2415744960308075, -0.029794681817293167, 0.7612495422363281, -0.49083736538887024, 0.1230083480477333, -0.17201204597949982, -0.3167552649974823, 0.3562568426132202, 0.09405443072319031, 0.02095092460513115, -0.23313021659851074, -0.03730914741754532, -0.4437752068042755, 0.21274660527706146, -0.29106906056404114, 0.2547067403793335, 0.19149544835090637, -0.378263384103775, -0.2394132763147354, 0.12919259071350098, 0.03755272179841995, 0.25974878668785095, -0.28753048181533813, 0.11948682367801666, -0.11245349794626236, 0.3726971745491028, -0.014083046466112137, -0.05159157142043114, -0.11481975018978119, 0.17815521359443665, 0.4325455129146576, -0.2639266550540924, -0.17749068140983582, 0.3514220416545868, 0.2647266685962677, 0.5595266819000244, 0.027977922931313515, -0.04818141460418701, 0.41322606801986694, 0.13488750159740448, 0.05590526759624481, 0.1453554630279541, 0.1766178458929062, -0.10312297195196152, 0.028874041512608528, 0.18914270401000977, 0.010528157465159893, 0.0941784679889679, 0.1467883288860321, 0.23189781606197357, 0.05168473720550537, -0.0032777786254882812, 0.15436473488807678, -0.018236882984638214, -0.026811521500349045, 0.13306862115859985, -0.030921325087547302, -0.2557803690433502, 0.07532081007957458, 0.22665280103683472, 0.4046327769756317, -0.042308252304792404, 0.18770238757133484, 0.09728540480136871, 0.0057036373764276505, -0.16288645565509796, 0.5374515056610107, 0.34231001138687134, 0.18167465925216675, -0.12198753654956818, -0.06255656480789185, 0.24956141412258148, -0.03527325391769409, -0.262759268283844, 0.22255122661590576, 0.17581461369991302, 0.1602676659822464, 0.23986029624938965, 0.13593754172325134, -0.058906830847263336, -0.16813650727272034, -0.09647276997566223, -0.01511957123875618, 0.20905408263206482, -0.24365876615047455, -0.19879619777202606, -0.11176478862762451, 0.24134504795074463, 0.07122442871332169, -0.30600759387016296, -0.1585908979177475, -0.4963493049144745, 0.039308372884988785, 0.3852554261684418, -0.04042325168848038, 0.2316269874572754, 0.15346954762935638, -0.07658953964710236, 0.23951587080955505, -0.018382737413048744, -0.12387421727180481, -0.10206593573093414, -0.03221822530031204, 0.061258502304553986, 0.15286394953727722, -0.012859009206295013, 0.32062336802482605, 0.0837411880493164, -0.15014654397964478, -0.3766782879829407, -0.04614686965942383, 0.10696320980787277, -0.001554235816001892, 0.0845610499382019, 0.31499403715133667, 0.15179097652435303, 0.07912807166576385, -0.08228379487991333, 0.2515715956687927, -0.20877423882484436, -0.2027919590473175, 0.04315023869276047, -0.24940121173858643, -0.052508722990751266, 0.15338486433029175, -0.2042161226272583, -0.3127768933773041, -0.46883007884025574, 0.19864439964294434, -0.017671391367912292, 0.1663464605808258, 0.2796529531478882, 0.018320415169000626, -0.09549183398485184, 0.11568041145801544, -0.48594385385513306, -0.04564888775348663, -0.22048772871494293, 0.08353283256292343, -0.03911818191409111, -0.1586460918188095, 0.1432466208934784, 0.09026244282722473, 0.3897438049316406, 0.15323074162006378, -0.28429919481277466, -0.3886451721191406, 0.057749778032302856, 0.41254115104675293, -0.22374044358730316, -0.06655250489711761, 0.29634690284729004, 0.0948004275560379, -0.02348625659942627, 0.10128308832645416, 0.07529163360595703, 0.189372256398201, 0.336974173784256, -0.059863220900297165, -0.17415937781333923, 0.4545770585536957, 0.18910354375839233, 0.46854835748672485, 0.09559827297925949, -0.036400727927684784, 0.373690664768219, 0.145942822098732, 0.037742674350738525, -0.12048429250717163, -0.23412427306175232, 0.08729143440723419, 0.03683406114578247, -0.04916407912969589, -0.11511627584695816, -0.008906669914722443, 0.06814280152320862, -0.1765146553516388, -0.8343185782432556, -0.016262374818325043, -0.40259432792663574, -0.060729384422302246, -0.1268901377916336, -0.03597366809844971, -0.2600739300251007, 0.15560030937194824, -0.03518468514084816, -0.2506624162197113, 0.18908344209194183, 0.11861677467823029, 0.14937737584114075, -0.18214771151542664, -0.1086852103471756, 0.010648664087057114, -0.47526875138282776, 0.15006639063358307, -0.09874328970909119, 0.6153150796890259, 0.10602045059204102, 0.15799203515052795, -0.10538068413734436, -0.08348159492015839, 0.5064749717712402, -0.39414140582084656, 0.4183146357536316, -0.024487867951393127, -0.017408497631549835, -0.37970975041389465, -0.08534505218267441, 0.023724764585494995, 0.4133557081222534, 0.05952581763267517, 0.5642826557159424, -0.018063493072986603, -0.16323798894882202, 0.13608066737651825, -0.13477489352226257, -0.15753987431526184, -0.09861224889755249, 0.1278342455625534, -0.2673526704311371, -0.20641717314720154, 0.19261664152145386, 0.1603022813796997, -0.04623081162571907, -0.19220387935638428, -0.5829971432685852, 0.138987198472023, -0.25781410932540894, -0.12537696957588196, 0.08267226815223694, -0.10589252412319183, -0.3119415044784546, 0.3866187334060669, -0.1687178909778595, 0.1890689730644226, 0.2111334651708603, 0.04828596115112305, 0.015876546502113342, -0.14785125851631165, -0.13283061981201172, 0.11689816415309906, -0.010581731796264648, 0.44198286533355713, -0.17486846446990967, 0.504889726638794, -0.292680561542511, 0.29794979095458984, -0.19335544109344482, -0.26991158723831177, 0.11753817647695541, 0.0081138014793396, -0.2920049726963043, 0.22872024774551392, 0.26409173011779785, -0.503731906414032, -0.18230406939983368, 0.0957401767373085, 0.10928219556808472, -0.33483263850212097, 0.36496731638908386, 0.13960957527160645, 0.8090485334396362, 0.19690170884132385, -0.008485237136483192, 0.17121466994285583, -0.2280656397342682, 0.27341228723526, -0.4012173116207123, -0.06029321625828743, -0.27821919322013855, 0.08096212148666382, -0.12749820947647095, 0.14412270486354828, -0.04250617325305939, -0.2151322066783905, -0.26546016335487366, 0.39719247817993164, -0.24349850416183472, 0.41456419229507446, -0.17483147978782654, 0.199738010764122, -0.4170939028263092, -0.14634066820144653, -0.2262151539325714, 0.1997631937265396, -0.07041953504085541, -0.06633034348487854, -0.15916268527507782, -0.21744681894779205, 0.04978911578655243, -0.060300007462501526, -0.2065187245607376, 0.1477660834789276, -0.12236759066581726, 0.28659588098526, -0.07671248912811279, -0.230234295129776, 0.12250778079032898, -0.17383065819740295, 0.5043649673461914, 0.2313660979270935, -0.22027604281902313, 0.3687974512577057, -0.27709248661994934, 0.040963854640722275, 0.1669890284538269, 0.03695172816514969, 0.15650148689746857, -0.060628101229667664, -0.4886521100997925, 0.016318712383508682, -0.00042909756302833557, -0.3416363000869751, -0.0006964951753616333, -0.00010609813034534454, 0.22191883623600006, -0.3160945177078247, -0.013858314603567123, -0.21945837140083313, -0.41643911600112915, -0.3151712119579315, 0.1106071025133133, 0.027898123487830162, -0.10051311552524567, 0.4492383599281311, -0.07020437717437744, 0.047014206647872925, 0.04768428951501846, 0.5157437920570374, -0.030020173639059067, 0.030099496245384216, -0.01706087961792946, -0.06086629256606102, -0.22152844071388245, -0.3096497058868408, 0.1815686821937561, -0.005324341356754303, -0.2280420958995819, -0.033950936049222946, -0.23435956239700317, 0.07724012434482574, -0.03234630078077316, 0.19815586507320404, 0.1843782216310501, 0.2930282950401306, -0.10042660683393478, -0.39953309297561646, -0.1761176884174347, 0.014145856723189354, 0.28099000453948975, 0.17069923877716064, -0.17915470898151398, 0.09123073518276215, -0.0139995776116848, 0.1656021922826767, -0.3266298770904541, 0.28643977642059326, -0.2945001423358917, 0.006938939914107323, -0.7389643788337708, -0.4197008013725281, 0.022332753986120224, -0.35489681363105774, 0.0971837118268013, 0.1959054172039032, -0.3189674913883209, -0.16169989109039307, -0.06185007095336914, 0.13398918509483337, 0.11479534208774567, -0.19372594356536865, -0.2745647430419922, -0.18928968906402588, 0.002079784870147705, -0.015331512317061424, 0.3019900918006897, 0.280100017786026, -0.08755001425743103, -0.1632814109325409, 0.5567856431007385, 0.15236300230026245, -0.20119774341583252, 0.22735527157783508, 0.04309846833348274, 0.3020718991756439, -0.11723297834396362, 0.09708765149116516, -0.03426584228873253, -0.16776303946971893, -0.023001983761787415, 0.3191635012626648, 0.2789444327354431, -0.007005492690950632, 0.6108006834983826, 0.037985436618328094, -0.44613707065582275, -0.031299032270908356, 0.35779982805252075, 0.28838831186294556, -0.21655915677547455, -0.1422501802444458, 0.025276683270931244, 0.290902316570282, -0.006828531622886658, -0.3022914528846741, 0.39863350987434387, 0.05758378282189369, 0.1619446724653244, 0.06980759650468826, 0.4158877432346344, -0.4342201054096222, 0.10517426580190659, 0.20882482826709747, 0.7384707927703857, -0.35277318954467773, -0.04287519305944443, 0.0499364510178566, -0.06676021218299866, -0.022935651242733, 0.014791300520300865, -0.19167056679725647, 0.4223853349685669, 0.37998953461647034, -0.0663595199584961, 0.5152062177658081, 0.1968974769115448, 0.16811463236808777, 0.4001193642616272, -0.018240053206682205, -0.163293719291687, -0.08139564096927643, -0.3458494246006012, -0.13393312692642212, 0.016055405139923096, 0.4175390601158142, -0.2661275565624237, -0.09887221455574036, -0.26635122299194336, -0.03960297629237175, -0.20911771059036255, 0.1116112768650055, -0.23773282766342163, -0.2435426414012909, -0.2476348578929901, -0.06988684087991714, -0.0757700502872467, -0.22719238698482513, 0.1174454465508461, 0.099985271692276, 0.028893986716866493, 0.40997302532196045, -0.10292714834213257, 0.1622995287179947, 0.35798484086990356, -0.22485719621181488, 0.23950457572937012, 0.3694716691970825, -0.005227463319897652, -0.5162069797515869, 0.25257453322410583, 0.3281419575214386, 0.1936669796705246, -0.2342851459980011, 0.4357728958129883, 0.7115523219108582, -0.0263473279774189, 0.07589729130268097, -0.07572929561138153, -0.0807298794388771, 0.20500797033309937, 0.21212738752365112, 0.1945374310016632, -0.09019715338945389, 0.09739181399345398, 0.13536274433135986, 0.010041974484920502, 0.14702549576759338, 0.1455027163028717, 0.05521547421813011, -0.4638775587081909, -0.18221405148506165, -0.05680801719427109, -0.03730946034193039, -0.011216416954994202, 0.28883838653564453, -0.2553592026233673, 0.41741499304771423, -0.09481149166822433, 0.09247036278247833, -0.2598994970321655, 0.36019545793533325, -0.011398380622267723, -0.11804185062646866, -0.4006651043891907, -0.2909895181655884, 0.07606208324432373, 0.26399433612823486, -0.1334109902381897, 0.08313854783773422, 0.08365799486637115, -0.08392789959907532, -0.08996745198965073, 0.043058376759290695, -0.24198304116725922, 0.17198830842971802, -0.2481638491153717, 0.1728663295507431, -0.4055706262588501, 0.07584847509860992, 0.416991651058197, -0.20052599906921387, 0.00781954824924469, -0.3253284692764282, 0.4434131681919098, 0.13981011509895325, 0.03636867552995682, -0.07615669816732407, 0.180453360080719, 0.31853559613227844, -0.2971201539039612, 0.2554425299167633, 0.04451058804988861, 0.11713022738695145, -0.20331275463104248, 0.06904216855764389, -0.12911313772201538, -0.45495471358299255, -0.02208499237895012, -0.3199599087238312, 0.042198941111564636, 0.1399463415145874, 0.3356528878211975, -0.2544044256210327, 0.017055805772542953, 0.2946910858154297, -0.2312200516462326, 0.37531378865242004, -0.048730745911598206, 0.10418203473091125, 0.021081887185573578, 0.16469275951385498, -0.09379351139068604, -0.022845342755317688, 0.014334031380712986, 0.14707739651203156, -0.39225274324417114, -0.46796828508377075, 0.4530026316642761, 0.19951356947422028, -0.06198880821466446, -0.21098065376281738, 0.42321696877479553, -0.21139401197433472, 0.15125881135463715, -0.3278168737888336, -0.2162361741065979, 0.373712956905365, -0.08245866745710373, -0.25429677963256836, 0.31769493222236633, 0.14912880957126617, -0.03891521319746971, 0.010235168039798737, 0.12204514443874359, 0.05197380110621452, -0.1723736822605133, 0.1982101947069168, -0.22779424488544464 ]
https://github.com/huggingface/datasets/issues/6389
I managed a workaround eventually but I don't know what it was (I made a lot of changes to seq2seq). I'll try to include generating code in the future. (If I close, I don't know if you see it. Feel free to close; I'll re-open if I encounter it again (if I can)).
Index 339 out of range for dataset of size 339 <-- save_to_file()
### Describe the bug When saving out some Audio() data. The data is audio recordings with associated 'sentences'. (They use the audio 'bytes' approach because they're clips within audio files). Code is below the traceback (I can't upload the voice audio/text (it's not even me)). ``` Traceback (most recent call last): File "/mnt/ddrive/prj/voice/voice-training-dataset-create/./dataset.py", line 156, in <module> create_dataset(args) File "/mnt/ddrive/prj/voice/voice-training-dataset-create/./dataset.py", line 138, in create_dataset hf_dataset.save_to_disk(args.outds, max_shard_size='50MB') File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 1531, in save_to_disk for kwargs in kwargs_per_job: File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 1508, in <genexpr> "shard": self.shard(num_shards=num_shards, index=shard_idx, contiguous=True), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 4609, in shard return self.select( ^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 556, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/fingerprint.py", line 511, in wrapper out = func(dataset, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 3797, in select return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 556, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/fingerprint.py", line 511, in wrapper out = func(dataset, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 3857, in _select_contiguous _check_valid_indices_value(start, len(self)) File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 648, in _check_valid_indices_value raise IndexError(f"Index {index} out of range for dataset of size {size}.") IndexError: Index 339 out of range for dataset of size 339. ``` ### Steps to reproduce the bug (I had to set the default max batch size down due to a different bug... or maybe it's related: https://github.com/huggingface/datasets/issues/5717) ```python3 #!/usr/bin/env python3 import argparse import os from pathlib import Path import soundfile as sf import datasets datasets.config.DEFAULT_MAX_BATCH_SIZE=35 from datasets import Features, Array2D, Value, Dataset, Sequence, Audio import numpy as np import librosa import sys import soundfile as sf import io import logging logging.basicConfig(level=logging.DEBUG, filename='debug.log', filemode='w', format='%(name)s - %(levelname)s - %(message)s') # Define the arguments for the command-line interface def parse_args(): parser = argparse.ArgumentParser(description="Create a Huggingface dataset from labeled audio files.") parser.add_argument("--indir_labeled", action="append", help="Directory containing labeled audio files.", required=True) parser.add_argument("--outds", help="Path to save the dataset file.", required=True) parser.add_argument("--max_clips", type=int, help="Max count of audio samples to add to the dataset.", default=None) parser.add_argument("-r", "--sr", type=int, help="Sample rate for the audio files.", default=16000) parser.add_argument("--no-resample", action="store_true", help="Disable resampling of the audio files.") parser.add_argument("--max_clip_secs", type=float, help="Max length of audio clips in seconds.", default=3.0) parser.add_argument("-v", "--verbose", action='count', default=1, help="Increase verbosity") return parser.parse_args() # Convert the NumPy arrays to audio bytes in WAV format def numpy_to_bytes(audio_array, sampling_rate=16000): with io.BytesIO() as bytes_io: sf.write(bytes_io, audio_array, samplerate=sampling_rate, format='wav', subtype='FLOAT') # float32 return bytes_io.getvalue() # Function to find audio and label files in a directory def find_audio_label_pairs(indir_labeled): audio_label_pairs = [] for root, _, files in os.walk(indir_labeled): for file in files: if file.endswith(('.mp3', '.wav', '.aac', '.flac')): audio_path = Path(root) / file if args.verbose>1: print(f'File: {audio_path}') label_path = audio_path.with_suffix('.labels.txt') if label_path.exists(): if args.verbose>0: print(f' Pair: {audio_path}') audio_label_pairs.append((audio_path, label_path)) return audio_label_pairs def process_audio_label_pair(audio_path, label_path, sampling_rate, no_resample, max_clip_secs): # Read the label file with open(label_path, 'r') as label_file: labels = label_file.readlines() # Load the full audio file full_audio, current_sr = sf.read(audio_path) if not no_resample and current_sr != sampling_rate: # You can use librosa.resample here if librosa is available full_audio = librosa.resample(full_audio, orig_sr=current_sr, target_sr=sampling_rate) audio_segments = [] sentences = [] # Process each label for label in labels: start_secs, end_secs, label_text = label.strip().split('\t') start_sample = int(float(start_secs) * sampling_rate) end_sample = int(float(end_secs) * sampling_rate) # Extract segment and truncate or pad to max_clip_secs audio_segment = full_audio[start_sample:end_sample] max_samples = int(max_clip_secs * sampling_rate) if len(audio_segment) > max_samples: # Truncate audio_segment = audio_segment[:max_samples] elif len(audio_segment) < max_samples: # Pad padding = np.zeros(max_samples - len(audio_segment), dtype=audio_segment.dtype) audio_segment = np.concatenate((audio_segment, padding)) audio_segment = numpy_to_bytes(audio_segment) audio_data = { 'path': str(audio_path), 'bytes': audio_segment, } audio_segments.append(audio_data) sentences.append(label_text) return audio_segments, sentences # Main function to create the dataset def create_dataset(args): audio_label_pairs = [] for indir in args.indir_labeled: audio_label_pairs.extend(find_audio_label_pairs(indir)) # Initialize our dataset data dataset_data = { 'path': [], # This will be a list of strings 'audio': [], # This will be a list of dictionaries 'sentence': [], # This will be a list of strings } # Process each audio-label pair and add the data to the dataset for audio_path, label_path in audio_label_pairs[:args.max_clips]: audio_segments, sentences = process_audio_label_pair(audio_path, label_path, args.sr, args.no_resample, args.max_clip_secs) if audio_segments and sentences: for audio_data, sentence in zip(audio_segments, sentences): if args.verbose>1: print(f'Appending {audio_data["path"]}') dataset_data['path'].append(audio_data['path']) dataset_data['audio'].append({ 'path': audio_data['path'], 'bytes': audio_data['bytes'], }) dataset_data['sentence'].append(sentence) features = Features({ 'path': Value('string'), # Path is redundant in common voice set also 'audio': Audio(sampling_rate=16000), 'sentence': Value('string'), }) hf_dataset = Dataset.from_dict(dataset_data, features=features) for key in dataset_data: for i, item in enumerate(dataset_data[key]): if item is None or (isinstance(item, bytes) and len(item) == 0): logging.error(f"Invalid {key} at index {i}: {item}") import ipdb; ipdb.set_trace(context=16); pass hf_dataset.save_to_disk(args.outds, max_shard_size='50MB') # try: # hf_dataset.save_to_disk(args.outds) # except TypeError as e: # # If there's a TypeError, log the exception and the dataset data that might have caused it # logging.exception("An error occurred while saving the dataset.") # import ipdb; ipdb.set_trace(context=16); pass # for key in dataset_data: # logging.debug(f"{key} length: {len(dataset_data[key])}") # if key == 'audio': # # Log the first 100 bytes of the audio data to avoid huge log files # for i, audio in enumerate(dataset_data[key]): # logging.debug(f"Audio {i}: {audio['bytes'][:100]}") # raise # Run the script if __name__ == "__main__": args = parse_args() create_dataset(args) ``` ### Expected behavior It shouldn't fail. ### Environment info - `datasets` version: 2.14.7.dev0 - Platform: Linux-6.1.0-13-amd64-x86_64-with-glibc2.36 - Python version: 3.11.2 - `huggingface_hub` version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 - `fsspec` version: 2023.9.2
53
Index 339 out of range for dataset of size 339 <-- save_to_file() ### Describe the bug When saving out some Audio() data. The data is audio recordings with associated 'sentences'. (They use the audio 'bytes' approach because they're clips within audio files). Code is below the traceback (I can't upload the voice audio/text (it's not even me)). ``` Traceback (most recent call last): File "/mnt/ddrive/prj/voice/voice-training-dataset-create/./dataset.py", line 156, in <module> create_dataset(args) File "/mnt/ddrive/prj/voice/voice-training-dataset-create/./dataset.py", line 138, in create_dataset hf_dataset.save_to_disk(args.outds, max_shard_size='50MB') File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 1531, in save_to_disk for kwargs in kwargs_per_job: File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 1508, in <genexpr> "shard": self.shard(num_shards=num_shards, index=shard_idx, contiguous=True), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 4609, in shard return self.select( ^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 556, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/fingerprint.py", line 511, in wrapper out = func(dataset, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 3797, in select return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 556, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/fingerprint.py", line 511, in wrapper out = func(dataset, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 3857, in _select_contiguous _check_valid_indices_value(start, len(self)) File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 648, in _check_valid_indices_value raise IndexError(f"Index {index} out of range for dataset of size {size}.") IndexError: Index 339 out of range for dataset of size 339. ``` ### Steps to reproduce the bug (I had to set the default max batch size down due to a different bug... or maybe it's related: https://github.com/huggingface/datasets/issues/5717) ```python3 #!/usr/bin/env python3 import argparse import os from pathlib import Path import soundfile as sf import datasets datasets.config.DEFAULT_MAX_BATCH_SIZE=35 from datasets import Features, Array2D, Value, Dataset, Sequence, Audio import numpy as np import librosa import sys import soundfile as sf import io import logging logging.basicConfig(level=logging.DEBUG, filename='debug.log', filemode='w', format='%(name)s - %(levelname)s - %(message)s') # Define the arguments for the command-line interface def parse_args(): parser = argparse.ArgumentParser(description="Create a Huggingface dataset from labeled audio files.") parser.add_argument("--indir_labeled", action="append", help="Directory containing labeled audio files.", required=True) parser.add_argument("--outds", help="Path to save the dataset file.", required=True) parser.add_argument("--max_clips", type=int, help="Max count of audio samples to add to the dataset.", default=None) parser.add_argument("-r", "--sr", type=int, help="Sample rate for the audio files.", default=16000) parser.add_argument("--no-resample", action="store_true", help="Disable resampling of the audio files.") parser.add_argument("--max_clip_secs", type=float, help="Max length of audio clips in seconds.", default=3.0) parser.add_argument("-v", "--verbose", action='count', default=1, help="Increase verbosity") return parser.parse_args() # Convert the NumPy arrays to audio bytes in WAV format def numpy_to_bytes(audio_array, sampling_rate=16000): with io.BytesIO() as bytes_io: sf.write(bytes_io, audio_array, samplerate=sampling_rate, format='wav', subtype='FLOAT') # float32 return bytes_io.getvalue() # Function to find audio and label files in a directory def find_audio_label_pairs(indir_labeled): audio_label_pairs = [] for root, _, files in os.walk(indir_labeled): for file in files: if file.endswith(('.mp3', '.wav', '.aac', '.flac')): audio_path = Path(root) / file if args.verbose>1: print(f'File: {audio_path}') label_path = audio_path.with_suffix('.labels.txt') if label_path.exists(): if args.verbose>0: print(f' Pair: {audio_path}') audio_label_pairs.append((audio_path, label_path)) return audio_label_pairs def process_audio_label_pair(audio_path, label_path, sampling_rate, no_resample, max_clip_secs): # Read the label file with open(label_path, 'r') as label_file: labels = label_file.readlines() # Load the full audio file full_audio, current_sr = sf.read(audio_path) if not no_resample and current_sr != sampling_rate: # You can use librosa.resample here if librosa is available full_audio = librosa.resample(full_audio, orig_sr=current_sr, target_sr=sampling_rate) audio_segments = [] sentences = [] # Process each label for label in labels: start_secs, end_secs, label_text = label.strip().split('\t') start_sample = int(float(start_secs) * sampling_rate) end_sample = int(float(end_secs) * sampling_rate) # Extract segment and truncate or pad to max_clip_secs audio_segment = full_audio[start_sample:end_sample] max_samples = int(max_clip_secs * sampling_rate) if len(audio_segment) > max_samples: # Truncate audio_segment = audio_segment[:max_samples] elif len(audio_segment) < max_samples: # Pad padding = np.zeros(max_samples - len(audio_segment), dtype=audio_segment.dtype) audio_segment = np.concatenate((audio_segment, padding)) audio_segment = numpy_to_bytes(audio_segment) audio_data = { 'path': str(audio_path), 'bytes': audio_segment, } audio_segments.append(audio_data) sentences.append(label_text) return audio_segments, sentences # Main function to create the dataset def create_dataset(args): audio_label_pairs = [] for indir in args.indir_labeled: audio_label_pairs.extend(find_audio_label_pairs(indir)) # Initialize our dataset data dataset_data = { 'path': [], # This will be a list of strings 'audio': [], # This will be a list of dictionaries 'sentence': [], # This will be a list of strings } # Process each audio-label pair and add the data to the dataset for audio_path, label_path in audio_label_pairs[:args.max_clips]: audio_segments, sentences = process_audio_label_pair(audio_path, label_path, args.sr, args.no_resample, args.max_clip_secs) if audio_segments and sentences: for audio_data, sentence in zip(audio_segments, sentences): if args.verbose>1: print(f'Appending {audio_data["path"]}') dataset_data['path'].append(audio_data['path']) dataset_data['audio'].append({ 'path': audio_data['path'], 'bytes': audio_data['bytes'], }) dataset_data['sentence'].append(sentence) features = Features({ 'path': Value('string'), # Path is redundant in common voice set also 'audio': Audio(sampling_rate=16000), 'sentence': Value('string'), }) hf_dataset = Dataset.from_dict(dataset_data, features=features) for key in dataset_data: for i, item in enumerate(dataset_data[key]): if item is None or (isinstance(item, bytes) and len(item) == 0): logging.error(f"Invalid {key} at index {i}: {item}") import ipdb; ipdb.set_trace(context=16); pass hf_dataset.save_to_disk(args.outds, max_shard_size='50MB') # try: # hf_dataset.save_to_disk(args.outds) # except TypeError as e: # # If there's a TypeError, log the exception and the dataset data that might have caused it # logging.exception("An error occurred while saving the dataset.") # import ipdb; ipdb.set_trace(context=16); pass # for key in dataset_data: # logging.debug(f"{key} length: {len(dataset_data[key])}") # if key == 'audio': # # Log the first 100 bytes of the audio data to avoid huge log files # for i, audio in enumerate(dataset_data[key]): # logging.debug(f"Audio {i}: {audio['bytes'][:100]}") # raise # Run the script if __name__ == "__main__": args = parse_args() create_dataset(args) ``` ### Expected behavior It shouldn't fail. ### Environment info - `datasets` version: 2.14.7.dev0 - Platform: Linux-6.1.0-13-amd64-x86_64-with-glibc2.36 - Python version: 3.11.2 - `huggingface_hub` version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.2 - `fsspec` version: 2023.9.2 I managed a workaround eventually but I don't know what it was (I made a lot of changes to seq2seq). I'll try to include generating code in the future. (If I close, I don't know if you see it. Feel free to close; I'll re-open if I encounter it again (if I can)).
[ -0.20405060052871704, -0.13199637830257416, 0.041832633316516876, 0.332999050617218, 0.16036248207092285, 0.04094874858856201, 0.1847858875989914, 0.642251193523407, -0.3258969485759735, 0.2800061106681824, -0.2070016860961914, -0.11669199913740158, -0.06349034607410431, -0.20047295093536377, 0.006428468972444534, -0.15588955581188202, 0.0069246068596839905, 0.067039854824543, 0.1635308414697647, -0.236625075340271, -0.2263832539319992, -0.02610185369849205, -0.2231658399105072, 0.22054827213287354, -0.2936548888683319, -0.2751215398311615, 0.11088798940181732, 0.417263388633728, -0.07213100790977478, -0.2066696584224701, -0.12710678577423096, -0.39090242981910706, 0.07933362573385239, 0.3386905789375305, -0.00011663304758258164, -0.13634158670902252, 0.30589261651039124, -0.2082582712173462, -0.28207823634147644, 0.20896786451339722, -0.37832948565483093, 0.08353584259748459, -0.6660597920417786, -0.15335002541542053, 0.18706825375556946, -0.006375681608915329, 0.13899634778499603, -0.1614166796207428, 0.27384576201438904, 0.6548349857330322, 0.13706254959106445, 0.10227511823177338, 0.21235038340091705, 0.0725114569067955, 0.5000728368759155, 0.11712871491909027, 0.03894779086112976, 0.04309529438614845, 0.09522530436515808, 0.1396046280860901, -0.0748598724603653, 0.29546335339546204, -0.0592028945684433, -0.2697710394859314, -0.02634682133793831, -0.015902457758784294, -0.19508014619350433, -0.41482365131378174, 0.08531923592090607, 0.377184122800827, 0.2351187765598297, -0.35091036558151245, -0.4173727035522461, -0.17590183019638062, -0.18876361846923828, -0.575406551361084, 0.10019642114639282, 0.15417128801345825, -0.27149510383605957, 0.1346290409564972, -0.21434488892555237, 0.14290469884872437, -0.06891503930091858, 0.13472974300384521, 0.20939204096794128, 0.07363350689411163, 0.13336971402168274, 0.1349250078201294, 0.40341219305992126, -0.3961753249168396, -0.27490484714508057, 0.03017718344926834, -0.3976527452468872, 0.225165456533432, -0.6537342667579651, -0.06801047176122665, 0.08863060921430588, -0.09831024706363678, 0.2921707034111023, -0.11829293519258499, -0.02512618526816368, -0.03067205473780632, 0.2956047058105469, 0.19234870374202728, 0.2628193795681, 0.15195560455322266, 0.20782747864723206, -0.062488168478012085, 0.2897675633430481, 0.03831975907087326, -0.019269049167633057, -0.11842519044876099, 0.2042573094367981, -0.3766159117221832, 0.40207815170288086, 0.023357827216386795, 0.004135161638259888, -0.25644829869270325, -0.28653985261917114, 0.4011021554470062, -0.1127275601029396, 0.1496082842350006, -0.02809254638850689, 0.27078989148139954, 0.31339919567108154, -0.23059377074241638, -0.16634519398212433, 0.3973672688007355, -0.22111845016479492, -0.22883978486061096, -0.17946141958236694, 0.196104496717453, 0.25844240188598633, 0.08529042452573776, -0.14466840028762817, 0.0746244341135025, -0.06680567562580109, 0.0027532055974006653, 0.5418865084648132, -0.23747754096984863, -0.0800037533044815, -0.3755366802215576, 0.24985532462596893, 0.3710983991622925, -0.0959026962518692, 0.20974063873291016, -0.06264396011829376, -0.17273584008216858, 0.0162411630153656, 0.19609615206718445, -0.20205450057983398, -0.4124724268913269, 0.014535011723637581, 0.18734271824359894, 0.029801316559314728, 0.32892900705337524, -0.40292224287986755, 0.043227359652519226, 0.31784677505493164, -0.5098091959953308, 0.14073479175567627, -0.31135323643684387, -0.17666208744049072, -0.07220441102981567, 0.08238059282302856, 0.24311846494674683, -0.34129637479782104, 0.37343791127204895, -0.2916029691696167, 0.2758563160896301, 0.07308149337768555, 0.3006543517112732, 0.02151620388031006, 0.2949333190917969, -0.2571803033351898, 0.762426495552063, 0.5578819513320923, -0.3635043501853943, -0.6805627346038818, 0.0315072126686573, 0.010615170001983643, -0.30455589294433594, 0.07849086821079254, -0.003654833883047104, 0.3654230237007141, -0.12776342034339905, 0.09557048976421356, 0.1992482990026474, 0.017713768407702446, -0.033485352993011475, -0.3659667670726776, 0.10493018478155136, -0.22251108288764954, -0.02677427977323532, -0.0809297189116478, -0.1768936961889267, 0.36863118410110474, -0.1794562041759491, 0.25709810853004456, -0.14858371019363403, 0.16187459230422974, 0.514231264591217, 0.14437684416770935, -0.26247867941856384, -0.027804313227534294, -0.2584523558616638, 0.10075615346431732, 0.17544060945510864, -0.19187022745609283, -0.07915663719177246, -0.17644037306308746, -0.11468076705932617, -0.10251059383153915, -0.05474726855754852, -0.22908665239810944, 0.024713315069675446, 0.0305306576192379, -0.005188614130020142, -0.19806355237960815, 0.09007936716079712, -0.03959643095731735, -0.18715117871761322, -0.059833280742168427, -0.06629323214292526, -0.33513879776000977, 0.11150533705949783, -0.19554725289344788, -0.3531118929386139, 0.17951330542564392, 0.19781215488910675, 0.19347292184829712, 0.03843624144792557, -0.22490200400352478, 0.49010878801345825, 0.08676372468471527, 0.2197968065738678, -0.36878344416618347, 0.03744247555732727, 0.047741226851940155, -0.33232852816581726, 0.16988250613212585, 0.01956767588853836, 0.2982203960418701, -0.09227731078863144, 0.09476613253355026, 0.08189762383699417, 0.32047006487846375, 0.05524309352040291, 0.09370104968547821, -0.20603422820568085, 0.17634016275405884, 0.09904466569423676, 0.2812890410423279, -0.08495192229747772, -0.0026424136012792587, -0.029167259112000465, 0.07336483895778656, -0.07959987968206406, -0.2700284719467163, 0.12026366591453552, 0.5283361077308655, -0.08441917598247528, 0.358693391084671, 0.313184916973114, -0.028957948088645935, -0.24843193590641022, 0.06048481911420822, 0.11208344250917435, 0.2916910648345947, 0.15764234960079193, -0.021280597895383835, -0.21401217579841614, 0.07769280672073364, -0.13185358047485352, 0.042964864522218704, 0.1268259584903717, -0.14100298285484314, 0.5804527401924133, 0.19174975156784058, 0.006592694669961929, -0.3670656681060791, -0.12070600688457489, -0.058544229716062546, 0.2258235514163971, -0.4499965012073517, 0.15275201201438904, -0.060702405869960785, -0.14322735369205475, -0.08942433446645737, -0.02444976381957531, -0.3881508708000183, -0.28863751888275146, 0.12159684300422668, 0.14162763953208923, -0.34356120228767395, 0.04655127972364426, 0.11622707545757294, -0.0655771791934967, 0.2780283987522125, -0.11131366342306137, 0.22705543041229248, 0.1555616855621338, -0.18613222241401672, -0.011540785431861877, 0.10993258655071259, 0.24289028346538544, 0.06461201608181, 0.2520700693130493, 0.09736157208681107, -0.33816373348236084, -0.14505431056022644, -0.017171500250697136, -0.09655699133872986, 0.6061303615570068, -0.07971109449863434, 0.09999574720859528, -0.2674176096916199, -0.28341442346572876, 0.10169585049152374, 0.2244390845298767, -0.2828595042228699, 0.2891156077384949, 0.03911030665040016, 0.17625699937343597, 0.10880662500858307, -0.08676176518201828, -0.18330328166484833, -0.4982452988624573, 0.2213660180568695, -0.1274757981300354, 0.2508111596107483, 0.1599852740764618, 0.020568639039993286, 0.02502674236893654, -0.16319584846496582, 0.09262723475694656, -0.11975792795419693, -0.02620672434568405, 0.45276740193367004, -0.04598613083362579, -0.43153107166290283, -0.291101336479187, -0.04011500999331474, 0.08364817500114441, 0.15952780842781067, -0.42314612865448, 0.16328242421150208, -0.07444089651107788, -0.034904420375823975, -0.08571884781122208, -0.13871484994888306, 0.3541654348373413, -0.13111741840839386, -0.04187798500061035, -0.10337844491004944, -0.1360364854335785, 0.049033623188734055, 0.4111962616443634, 0.23716038465499878, -0.01676984317600727, 0.41476356983184814, -0.02158939838409424, 0.37135016918182373, 0.21790097653865814, 0.24051545560359955, 0.4237339198589325, -0.035997189581394196, 0.045309990644454956, -0.2900320291519165, -0.22395658493041992, 0.41931989789009094, 0.13249897956848145, -0.47683587670326233, 0.21121519804000854, 0.05910392850637436, -0.032483018934726715, -0.028322480618953705, -0.26737311482429504, -0.03804444521665573, -0.2762718200683594, 0.34283649921417236, 0.22262023389339447, 0.09029180556535721, 0.08283001184463501, 0.22225461900234222, 0.02929297834634781, -0.23166123032569885, 0.06457655131816864, -0.1726841926574707, 0.1327660232782364, 0.05902677774429321, -0.29635077714920044, -0.33696234226226807, -0.18239127099514008, 0.3174695670604706, 0.6285710334777832, 0.5351266264915466, -0.18144945800304413, -0.2057664692401886, -0.04025347903370857, -0.015657637268304825, 0.21002554893493652, -0.15906690061092377, 0.28294944763183594, 0.22512716054916382, 0.37559807300567627, -0.2081059366464615, 0.06871694326400757, 0.08035022020339966, -0.11359405517578125, 0.12841148674488068, 0.14429712295532227, -0.21434956789016724, 0.1782832145690918, 0.05349964648485184, 0.478108674287796, -0.28621017932891846, 0.136247918009758, -0.09939557313919067, -0.14803007245063782, -0.2777208685874939, 0.03584517538547516, 0.1236836314201355, 0.10027418285608292, -0.07812593132257462, 0.017954908311367035, 0.21341103315353394, -0.1396598219871521, 0.1683918833732605, -0.1631491631269455, 0.5817113518714905, -0.3850013017654419, 0.0899118110537529, -0.025600619614124298, -0.19319535791873932, 0.41501641273498535, 0.31592708826065063, 0.12825071811676025, 0.37437912821769714, -0.09211425483226776, -0.18296802043914795, 0.34035342931747437, 0.3426646888256073, 0.0064604803919792175, 0.10671716928482056, -0.010005002841353416, 0.3328793942928314, -0.34280937910079956, -0.24385608732700348, 0.49882617592811584, -0.10892970860004425, -0.15646809339523315, 0.030645757913589478, 0.47102952003479004, -0.24726445972919464, -0.12111806869506836, 0.3065868616104126, 0.33217668533325195, -0.04717060178518295, 0.39803624153137207, 0.12450122833251953, 1.169701099395752, 0.24901673197746277, 0.2757554054260254, 0.06419789791107178, 0.07727643847465515, -0.03235618770122528, -0.07417801022529602, 0.2760845720767975, -0.306777685880661, -0.28759336471557617, -0.06138107180595398, -0.023894578218460083, -0.2015717625617981, 0.04167434573173523, -0.1491706520318985, 0.19804991781711578, -0.19150310754776, 0.005627546459436417, -0.024585269391536713, -0.037431370466947556, -0.22027736902236938, -0.03461272269487381, -0.15916183590888977, 0.010227199643850327, 0.07395978271961212, -0.2771667540073395, 0.020979277789592743, -0.33992964029312134, -0.22611752152442932, -0.30720219016075134, -0.22342155873775482, 0.03393629938364029, -0.043883830308914185, 0.30087167024612427, -0.30033236742019653, -0.28615593910217285, 0.018669649958610535, 0.36502712965011597, -0.14903445541858673, 0.1851876676082611, -0.156581848859787, 0.017733382061123848, 0.186202272772789, 0.32830291986465454, 0.0440683513879776, 0.009623460471630096, 0.45425909757614136, -0.1424591839313507, -0.2915801405906677, 0.07174782454967499, -0.05013253912329674, -0.28194883465766907, -0.28641802072525024, 0.1642211526632309, -0.07821119576692581, -0.3414131700992584, -0.21183907985687256, -0.18997278809547424, -0.25093284249305725, -0.326271653175354, 0.09911800920963287, 0.1309645175933838, -0.16494624316692352, 0.24890927970409393, 0.04597976803779602, -0.16293197870254517, -0.06351332366466522, 0.47280988097190857, -0.23349213600158691, 0.29741328954696655, 0.5383046269416809, 0.07237495481967926, -0.25122684240341187, -0.24723145365715027, 0.17349447309970856, 0.04958933964371681, -0.3828001022338867, 0.1418040692806244, -0.4265953302383423, 0.12433940172195435, -0.28821325302124023, -0.08772215247154236, 0.11668911576271057, -0.3653389513492584, -0.3565632700920105, -0.41869688034057617, -0.3333965837955475, 0.3158947825431824, -0.09358005225658417, 0.026181230321526527, -0.3591187000274658, -0.213581845164299, 0.033806003630161285, 0.09871355444192886, -0.25920113921165466, 0.042529359459877014, -0.2273912876844406, 0.33150574564933777, 0.2721675932407379, 0.0060958159156143665, 0.1664365828037262, -0.2470266968011856, 0.08887876570224762, 0.30769243836402893, -0.22925080358982086, -0.14640399813652039, -0.05933477729558945, 0.18053729832172394, -0.03269035369157791, -0.25122740864753723, 0.012205377221107483, -0.20011717081069946, -0.06638509035110474, -0.09862184524536133, -0.040779974311590195, 0.030778445303440094, -0.07281094044446945, -0.027525465935468674, 0.28965088725090027, -0.14817938208580017, 0.21931633353233337, 0.044097498059272766, 0.11136960238218307, 0.22932368516921997, -0.14221957325935364, 0.23575462400913239, -0.06248478591442108, -0.2259446084499359, -0.13229548931121826, 0.15380451083183289, -0.11300714313983917, -0.1301390826702118, 0.28011536598205566, -0.3912161588668823, -0.21982158720493317, 0.14311063289642334, 0.5778791308403015, 0.3747064471244812, -0.3256987929344177, 0.01797395944595337, -0.13522811233997345, 0.1785997450351715, -0.04138120636343956, -0.34246885776519775, -0.08934678882360458, -0.32138097286224365, -0.13627228140830994, 0.09824919700622559, 0.17847344279289246, -0.3816470503807068, -0.34032779932022095, 0.05567043274641037, -0.06791889667510986, -0.1696719378232956, -0.3330177962779999, 0.46518561244010925, -0.14047974348068237, -0.13559101521968842, 0.3273148834705353, 0.08680149912834167, 0.5174267292022705, 0.42156514525413513, -0.2406691312789917, 0.28574275970458984, 0.30452439188957214, -0.21018663048744202, 0.07381822913885117, -0.5240408182144165, -0.022593045607209206, 0.2145356833934784, 0.013404462486505508, 0.1482277512550354, 0.12945258617401123, 0.46778106689453125, 0.14428985118865967, -0.06976361572742462, 0.10233335942029953, -0.027463171631097794, -0.24588674306869507, 0.11570073664188385, 0.1860804557800293, -0.06552547961473465, -0.27543866634368896, -0.11551102995872498, -0.00046924001071602106, 0.04718589037656784, 0.16405165195465088, 0.13072654604911804, 0.006820373237133026, 0.24738821387290955, 0.06626652181148529, 0.040866635739803314, 0.01991126500070095, -0.5099822878837585, 0.24223914742469788, 0.5840397477149963, -0.15074124932289124, 0.3790932595729828, 0.25465357303619385, 0.6969225406646729, 0.12951549887657166, -0.11792623996734619, 0.3345315754413605, 0.010211203247308731, -0.1904047727584839, -0.03673402965068817, 0.16399598121643066, -0.08720026910305023, 0.42204761505126953, 0.45850664377212524, 0.09663011878728867, -0.10358791053295135, 0.00010548671707510948, 0.23322485387325287, 0.4061356484889984, -0.22154095768928528, 0.22515785694122314, -0.19932031631469727, -0.5760595202445984, -0.17920182645320892, -0.29241764545440674, -0.10456420481204987, 0.06381309032440186, 0.4803326725959778, -0.1838459074497223, 0.33082202076911926, -0.0645403191447258, 0.07735221832990646, -0.18437424302101135, 0.38678795099258423, 0.2854394316673279, -0.11929947137832642, -0.1346035897731781, 0.025271013379096985, -0.4924166202545166, 0.15562236309051514, -0.12676693499088287, 0.1488797664642334, 0.24864843487739563, 0.1747273951768875, 0.035726651549339294, 0.08127212524414062, 0.45535749197006226, -0.20112743973731995, -0.2595127820968628, 0.3205237090587616, -0.30636030435562134, -0.27442046999931335, 0.022302284836769104, 0.10820712149143219, -0.12566852569580078, -0.5648705959320068, 0.45223066210746765, -0.2653542459011078, 0.11207741498947144, -0.030822424218058586, -0.02009911835193634, -0.11740532517433167, -0.013319696299731731, 0.31189173460006714, 0.14758510887622833, 0.4499944746494293, -0.32453516125679016, -0.13384734094142914, 0.13536688685417175, 0.17429469525814056, -0.06880069524049759, -0.1374618411064148, 0.08692502975463867, 0.9999932050704956, 0.08813801407814026, -0.12497591972351074, -0.12784409523010254, 0.3236654996871948, -0.13600453734397888, -0.22396104037761688, -0.2594797909259796, 0.12140564620494843, -0.2571735978126526, -0.01368989422917366, 0.3215785622596741, 0.030044618993997574, 0.01662316732108593, 0.12067104130983353, -0.12579067051410675, -0.7247495651245117, 0.5904073715209961, -0.11052162945270538, -0.12686169147491455, -0.17914842069149017, 0.4607389569282532, 0.4931899309158325, 0.023366210982203484, -0.5553364157676697, -0.08796233683824539, 0.30886149406433105, 0.19019059836864471, -0.3378944396972656, 0.19393789768218994, -0.2296185940504074, -0.18664705753326416, 0.19330158829689026, 0.2266915738582611, 0.22073858976364136, -0.10550364851951599, 0.12362422049045563, -0.2914094626903534 ]
https://github.com/huggingface/datasets/issues/6387
Feel free to use `dataset.save_to_disk(...)`, then scp the directory containing the saved dataset and reload it on your other machine using `dataset = load_from_disk(...)`
How to load existing downloaded dataset ?
Hi @mariosasko @lhoestq @katielink Thanks for your contribution and hard work. ### Feature request First, I download a dataset as normal by: ``` from datasets import load_dataset dataset = load_dataset('username/data_name', cache_dir='data') ``` The dataset format in `data` directory will be: ``` -data |-data_name |-test-00000-of-00001-bf4c733542e35fcb.parquet |-train-00000-of-00001-2a1df75c6bce91ab.parquet ``` Then I use SCP to clone this dataset into another machine, and then try: ``` from datasets import load_dataset dataset = load_dataset('data/data_name') # load from local path ``` This leads to re-generating training and validation split for each time, and the disk quota will be duplicated occupation. How can I just load the dataset without generating and saving these splits again? ### Motivation I do not want to download the same dataset in two machines, scp is much faster and better than HuggingFace API. I hope we can directly load the downloaded datasets (.parquest) ### Your contribution Please refer to the feature
24
How to load existing downloaded dataset ? Hi @mariosasko @lhoestq @katielink Thanks for your contribution and hard work. ### Feature request First, I download a dataset as normal by: ``` from datasets import load_dataset dataset = load_dataset('username/data_name', cache_dir='data') ``` The dataset format in `data` directory will be: ``` -data |-data_name |-test-00000-of-00001-bf4c733542e35fcb.parquet |-train-00000-of-00001-2a1df75c6bce91ab.parquet ``` Then I use SCP to clone this dataset into another machine, and then try: ``` from datasets import load_dataset dataset = load_dataset('data/data_name') # load from local path ``` This leads to re-generating training and validation split for each time, and the disk quota will be duplicated occupation. How can I just load the dataset without generating and saving these splits again? ### Motivation I do not want to download the same dataset in two machines, scp is much faster and better than HuggingFace API. I hope we can directly load the downloaded datasets (.parquest) ### Your contribution Please refer to the feature Feel free to use `dataset.save_to_disk(...)`, then scp the directory containing the saved dataset and reload it on your other machine using `dataset = load_from_disk(...)`
[ -0.38434135913848877, -0.18714748322963715, 0.02825199067592621, 0.2958897352218628, 0.0300179123878479, -0.0012773796916007996, 0.03767338767647743, 0.05174326151609421, 0.2660689651966095, 0.220025897026062, -0.3922737240791321, 0.22650328278541565, -0.003428516909480095, 0.7020697593688965, 0.28091734647750854, -0.06035861000418663, -0.040588218718767166, 0.1633385568857193, -0.15755470097064972, -0.17678722739219666, -0.05182623490691185, -0.06613988429307938, 0.0875769853591919, -0.16497460007667542, 0.0086834616959095, 0.002521635964512825, -0.32028549909591675, 0.3649967908859253, -0.34868955612182617, -0.3085111677646637, 0.5049334168434143, 0.094196617603302, 0.5106841325759888, 0.2721419334411621, -0.00011702028859872371, 0.04938272386789322, -0.07411061227321625, -0.1893463432788849, -0.24002981185913086, -0.19359341263771057, -0.006164334714412689, -0.15037232637405396, 0.17754019796848297, -0.3708948791027069, -0.19024953246116638, 0.07116411626338959, 0.004388865083456039, -0.05917452648282051, 0.6803774237632751, 0.06468962132930756, 0.0913536548614502, 0.017627976834774017, -0.247170090675354, -0.1641230434179306, -0.23254014551639557, 0.06166744977235794, 0.23586538434028625, 0.23795124888420105, 0.2446918785572052, 0.24593575298786163, 0.21918654441833496, 0.06383207440376282, 0.08892146497964859, 0.00725741870701313, 0.29664796590805054, -0.13182561099529266, 0.008900629356503487, -0.1979503035545349, -0.09124237298965454, 0.3724968731403351, 0.7606678009033203, -0.14443591237068176, -0.2929360270500183, -0.22912274301052094, 0.11533933877944946, -0.25544503331184387, -0.051513075828552246, 0.4150848388671875, 0.06409674882888794, 0.3069160580635071, -0.4062163829803467, -0.46718788146972656, -0.27259892225265503, -0.0009487513452768326, -0.027347005903720856, -0.01769697666168213, -0.04771881550550461, 0.07641372829675674, 0.2807110846042633, 0.07822147011756897, 0.09434624761343002, -0.08625169098377228, 0.02054770477116108, 0.2537848949432373, -0.40241122245788574, -0.20734131336212158, -0.23946726322174072, -0.07377785444259644, 0.21757760643959045, 0.48625418543815613, 0.10457231104373932, 0.08552512526512146, -0.08347910642623901, 0.10038754343986511, 0.4558505713939667, 0.11413685977458954, -0.07223871350288391, 0.05744483694434166, -0.22947843372821808, 0.2498335838317871, -0.14551061391830444, -0.1142253428697586, -0.3497464656829834, 0.1136816143989563, 0.0020856857299804688, -0.15521858632564545, 0.12810951471328735, -0.29906171560287476, -0.11824265122413635, -0.14381729066371918, -0.036323122680187225, -0.19422684609889984, -0.1332448422908783, 0.484468549489975, -0.31138741970062256, 0.17475228011608124, -0.06791601330041885, 0.13745908439159393, -0.30401939153671265, -0.5332602858543396, -0.15392562747001648, 0.015504084527492523, -0.07790657877922058, 0.16493913531303406, 0.22936034202575684, -0.2844727039337158, 0.31140750646591187, 0.07324863970279694, 0.04683652147650719, -0.13554055988788605, 0.08455793559551239, 0.10679740458726883, 0.027601562440395355, 0.18293175101280212, 0.2564622759819031, -0.16463595628738403, -0.1413774937391281, -0.0347633957862854, -0.16157718002796173, 0.2628387212753296, -0.36158254742622375, -0.3282632529735565, -0.08948838710784912, 0.14170397818088531, -0.42973852157592773, -0.19831860065460205, -0.7640823125839233, 0.14360485970973969, -0.27058932185173035, -0.1337892711162567, -0.37129953503608704, 0.01592889241874218, -0.2770644426345825, -0.22687169909477234, 0.45649775862693787, 0.45901817083358765, -0.3339478373527527, -0.3184454143047333, -0.01343144103884697, -0.4776236414909363, -0.012566294521093369, 0.3361290991306305, -0.337276428937912, 0.3049035370349884, -0.16394846141338348, 0.04526442289352417, 0.41467076539993286, -0.025559626519680023, -0.25451135635375977, -0.03428956866264343, -0.005639761686325073, 0.08992641419172287, 0.02410248853266239, -0.04535422846674919, 0.4222411811351776, 0.18547673523426056, -0.25022298097610474, 0.570013701915741, -0.05343884229660034, -0.14840933680534363, -0.15150851011276245, -0.31934258341789246, 0.15495555102825165, 0.17214757204055786, 0.04443579167127609, 0.14157360792160034, 0.36046746373176575, 0.13096991181373596, 0.3572487235069275, -0.2184719443321228, -0.09847675263881683, 0.174829363822937, 0.1387459933757782, 0.2819454073905945, -0.05276811122894287, -0.156698077917099, -0.6412506699562073, 0.2830715775489807, -0.0878923088312149, -0.2792738378047943, 0.28894686698913574, -0.1382501721382141, -0.33247315883636475, -0.07546713948249817, -0.1192302256822586, -0.09135265648365021, -0.0650983452796936, 0.06027914211153984, 0.3729248642921448, -0.27312493324279785, -0.3261895477771759, 0.36764946579933167, -0.1665802299976349, 0.2485920786857605, -0.36891523003578186, 0.3589147925376892, 0.038778290152549744, -0.0005584098398685455, 0.1470395177602768, 0.059068143367767334, 0.25372910499572754, -0.25772833824157715, 0.14619262516498566, 0.3426578938961029, 0.07721353322267532, 0.31756991147994995, 0.02277662418782711, -0.10106420516967773, 0.2138088494539261, -0.20813648402690887, 0.04335422068834305, -0.22954148054122925, 0.10982339084148407, -0.043662190437316895, -0.4570678174495697, 0.22113896906375885, 0.020734986290335655, -0.006657321006059647, 0.27623334527015686, -0.16933347284793854, 0.15733283758163452, -0.2931067943572998, 0.0414239838719368, 0.03885611891746521, 0.19594885408878326, 0.1741843819618225, 0.05273561179637909, 0.15776170790195465, -0.1763359010219574, -0.08875909447669983, 0.2228897511959076, -0.33431923389434814, -0.30591997504234314, -0.0847361832857132, -0.06651586294174194, -0.10804778337478638, 0.1442413181066513, 0.3839196562767029, 0.15856540203094482, 0.23072998225688934, 0.18220922350883484, 0.3038627505302429, 0.1628686636686325, 0.20292527973651886, -0.05828803777694702, -0.11729813367128372, 0.1504763960838318, 0.18941132724285126, 0.012230325490236282, -0.05960701406002045, -0.3114931583404541, 0.314807265996933, 0.32469961047172546, 0.1625848412513733, -0.22398671507835388, -0.07885253429412842, -0.13541772961616516, -0.011848673224449158, -0.4839317500591278, 0.4589216113090515, -0.22462619841098785, 0.23422560095787048, -0.2502239942550659, 0.3565519154071808, 0.2709433436393738, -0.039405882358551025, -0.07446123659610748, 0.1746746301651001, -0.4395824372768402, -0.2680526077747345, 0.05209696292877197, 0.03752385079860687, -0.13398143649101257, 0.05790416896343231, 0.08701234310865402, 0.24044065177440643, 0.4441526532173157, -0.0678834468126297, 0.10434173047542572, -0.28216350078582764, -0.08031509816646576, 0.028964422643184662, 0.204419806599617, -0.04932278394699097, -0.09108196198940277, 0.28417396545410156, 0.011339694261550903, -0.1432076394557953, -0.02471940405666828, -0.27156874537467957, -0.2840731143951416, -0.1846761703491211, -0.03698623552918434, 0.14838078618049622, -0.06312480568885803, -0.533999502658844, -0.5011178851127625, 0.00351860374212265, 0.28985485434532166, 0.207354336977005, 0.047909557819366455, -0.08398707956075668, -0.1129680722951889, -0.10525843501091003, -0.1503138691186905, 0.03523097187280655, -0.2905859649181366, -0.5948622226715088, 0.06873051077127457, -0.0073435865342617035, -0.23126374185085297, 0.08548401296138763, -0.18967798352241516, 0.09612955152988434, 0.18280576169490814, -0.4443008005619049, -0.021705027669668198, -0.004681045189499855, 0.04003279656171799, -0.2535128593444824, 0.232632577419281, 0.49404677748680115, -0.21033409237861633, 0.07107162475585938, 0.04828017204999924, -0.2371027171611786, -0.03542422130703926, 0.33902794122695923, 0.14486297965049744, -0.03708663210272789, 0.20045603811740875, 0.05650051683187485, 0.857042670249939, 0.009429700672626495, 0.029854504391551018, 0.31136342883110046, -0.1460982710123062, 0.30727168917655945, 0.03289790451526642, -0.11470670998096466, 0.08119648694992065, -0.1976587474346161, -0.12865573167800903, 0.2506297826766968, 0.0738920122385025, -0.01941632106900215, -0.23559029400348663, -0.21181505918502808, -0.23700886964797974, -0.05466073751449585, -0.02702077105641365, 0.13871631026268005, 0.3218086361885071, 0.183696448802948, 0.02230028808116913, -0.12692706286907196, -0.04457869753241539, 0.07355301082134247, 0.18836167454719543, 0.2190011888742447, 0.1046561673283577, -0.5459836721420288, 0.24673131108283997, -0.2134714275598526, 0.1328006386756897, 0.011756807565689087, -0.1569651961326599, 0.20630240440368652, 0.027270756661891937, 0.27522584795951843, -0.17982080578804016, 0.5496952533721924, -0.07532262802124023, 0.26339417695999146, -0.03703358396887779, -0.10027559101581573, -0.22494953870773315, -0.02160956710577011, 0.02497931569814682, -0.35036641359329224, 0.21314673125743866, 0.3499176502227783, -0.24752846360206604, -0.24475467205047607, 0.22888293862342834, 0.4544287919998169, -0.5354944467544556, -0.08962753415107727, -0.2429960072040558, -0.3220234513282776, -0.28757575154304504, -0.05477160960435867, -0.27939799427986145, 0.1861155927181244, 0.16310067474842072, 0.34702086448669434, -0.3686390817165375, 0.18871547281742096, 0.04033935070037842, 0.10442665219306946, 0.3757370710372925, 0.24872539937496185, 0.18452230095863342, 0.2720218300819397, 0.07449311017990112, 0.26090794801712036, 0.9900763034820557, -0.4076673686504364, -0.3857858180999756, -0.25661903619766235, 0.19165931642055511, 0.37618300318717957, -0.011601299047470093, 0.13567684590816498, -0.25893890857696533, 0.18232294917106628, -0.08174960315227509, -0.4973447620868683, 0.19248107075691223, -0.054829321801662445, -0.05777256190776825, -0.22617502510547638, -0.7757081985473633, 0.3912886381149292, 0.08025245368480682, 0.03785909712314606, -0.2055301070213318, 0.05743374675512314, 0.06731130927801132, 0.1979610025882721, -0.13787870109081268, 0.7684035897254944, -0.43336063623428345, 0.20484155416488647, 0.21755845844745636, -0.286166787147522, 0.38450315594673157, -0.4203310012817383, -0.07251650094985962, -0.3031800389289856, -0.22522328794002533, -0.10508760064840317, -0.16776534914970398, 0.08306869864463806, 0.37407615780830383, 0.07765425741672516, 0.352019727230072, 0.2236047238111496, -0.001259793876670301, 0.20559269189834595, 0.6307203769683838, 0.08241526037454605, -0.1590558886528015, -0.13749444484710693, 0.09212658554315567, -0.2112320065498352, 0.19590744376182556, -0.041881926357746124, -0.09021803736686707, 0.3048206567764282, -0.06757910549640656, -0.00677134096622467, 0.372969388961792, -0.2735210955142975, 0.08070309460163116, -0.16634801030158997, -0.21588656306266785, 0.06662864983081818, 0.29681864380836487, 0.01954779401421547, 0.015632659196853638, -0.00556660071015358, 0.2030428647994995, 0.021230574697256088, -0.034025680273771286, -0.166806161403656, 0.055352553725242615, 0.2536012530326843, -0.051649849861860275, -0.24519583582878113, 0.15923099219799042, -0.01483897864818573, -0.3916397988796234, 0.006140902638435364, 0.1258145123720169, 0.3378661870956421, -0.42049118876457214, -0.17177796363830566, 0.26117584109306335, 0.3154850900173187, -0.032698336988687515, 0.017075324431061745, 0.1222752034664154, -0.3607620894908905, 0.17306557297706604, 0.09876032173633575, -0.23858827352523804, -0.03440330922603607, 0.5056536197662354, 0.1381596028804779, -0.1782410740852356, 0.4469948709011078, -0.08196648955345154, 0.10877549648284912, -0.12864667177200317, 0.066953644156456, 0.2207890748977661, -0.32205185294151306, -0.0908658355474472, -0.050689853727817535, 0.3638465404510498, 0.0686371847987175, 0.15379595756530762, 0.2036333531141281, -0.18695713579654694, 0.07986296713352203, -0.16746315360069275, -0.14423580467700958, -0.035427600145339966, 0.11398585885763168, 0.30883127450942993, 0.6257323026657104, -0.0014034844934940338, -0.19766026735305786, 0.09376296401023865, -0.25059425830841064, 0.3239584267139435, 0.0693274661898613, 0.1969117671251297, 0.3416614234447479, -0.1502496898174286, -0.0053223371505737305, -0.3833376467227936, 0.04977937042713165, -0.13154453039169312, -0.14813272655010223, -0.15081332623958588, -0.3216497600078583, 0.18715259432792664, -0.0718303769826889, 0.285088449716568, -0.31753048300743103, -0.20191878080368042, 0.1307394653558731, 0.006561610847711563, 0.2401415854692459, 0.03882598131895065, 0.1261376440525055, 0.0638749822974205, 0.45413196086883545, -0.03078235685825348, -0.6237214803695679, 0.0654153823852539, 0.00014866143465042114, 0.251187801361084, -0.09378175437450409, 0.11943665146827698, -0.0826776921749115, 0.0027177035808563232, -0.2507905662059784, -0.043825581669807434, 0.5906500220298767, -0.028429977595806122, 0.07993975281715393, -0.2145681381225586, 0.0359298437833786, -0.01750689372420311, 0.5224761962890625, 0.3538353741168976, -0.07303431630134583, 0.08658858388662338, 0.43654686212539673, 0.1351741999387741, -0.20333482325077057, 0.09019751101732254, 0.348583847284317, -0.004495633766055107, -0.13696928322315216, 0.285818874835968, 0.07204508781433105, 0.1040818840265274, -0.03776264935731888, -0.010465089231729507, 0.41246098279953003, 0.13729460537433624, 0.44827815890312195, 0.3261639475822449, -0.07724741846323013, -0.17939262092113495, 0.09992747753858566, 0.37477806210517883, 0.0959954708814621, 0.07049578428268433, -0.20926962792873383, 0.293335884809494, 0.009895453229546547, 0.19032976031303406, 0.006470326334238052, -0.577085554599762, -0.15130840241909027, 0.03190070763230324, 0.1275130808353424, 0.20241110026836395, -0.16707496345043182, 0.2787955701351166, 0.06580236554145813, -0.5398283004760742, -0.2522091269493103, 0.4503842890262604, -0.11424940824508667, -0.06596459448337555, -0.009107425808906555, -0.18980330228805542, 0.032724738121032715, 0.5078441500663757, 0.11736157536506653, -0.3020918667316437, 0.09858272224664688, 0.1695500910282135, -0.13772380352020264, -0.12455776333808899, -0.34658101201057434, 0.12670151889324188, -0.05630496144294739, -0.2494865357875824, 0.24009907245635986, 0.029040303081274033, -0.22366023063659668, 0.10851795971393585, 0.26913559436798096, 0.15029512345790863, -0.12358391284942627, -0.03401634842157364, 0.26222875714302063, 0.23857586085796356, 0.18512025475502014, 0.040395110845565796, -0.08429461717605591, 0.09757126867771149, 0.24425794184207916, 0.2717263102531433, 0.07074902206659317, -0.04316408559679985, -0.060704994946718216, 0.04817024618387222, -0.04699445515871048, -0.5685201287269592, 0.22114920616149902, 0.35338571667671204, 0.08020670711994171, -0.21209466457366943, 0.21824397146701813, -0.33348166942596436, -0.2125728875398636, 0.1079205572605133, -0.1338990032672882, 0.13740146160125732, -0.022410118952393532, 0.025862321257591248, 0.05271361395716667, 0.5221226215362549, 0.34648045897483826, -0.13480155169963837, -0.3216173052787781, -0.05279739946126938, -0.7384613156318665, -0.12779837846755981, -0.30229640007019043, -0.17473071813583374, 0.06487759947776794, 0.18842735886573792, 0.060043249279260635, 0.26357415318489075, -0.11099375784397125, 0.1297931671142578, 0.09434088319540024, 0.2273307591676712, -0.04313069209456444, -0.05079510062932968, 0.19421260058879852, 0.06348833441734314, -0.052826039493083954, -0.3679661154747009, 0.04961857572197914, -0.23725812137126923, -0.1673959195613861, 0.24571791291236877, -0.06223106384277344, 0.11501021683216095, -0.26360246539115906, 0.30059993267059326, -0.1906381994485855, 0.43624016642570496, 0.0036951228976249695, -0.037447381764650345, -0.028891321271657944, -0.026742897927761078, -0.1894673854112625, 0.2663622796535492, 0.04096546396613121, 0.17214220762252808, -0.24152100086212158, 0.17871221899986267, -0.26817458868026733, -0.07615119218826294, 0.15953689813613892, -0.1374278962612152, -0.11821955442428589, -0.19858118891716003, 0.016247540712356567, 0.1624062955379486, 0.3305717408657074, 0.3962709307670593, -0.14022506773471832, 0.09051813930273056, -0.08362796157598495, -0.037205539643764496, 0.5427265167236328, -0.317398339509964, 0.09370032697916031, -0.2566503882408142, 0.14643418788909912, 0.030567124485969543, -0.03580570966005325, -0.48297154903411865, 0.3352270722389221, 0.3883305490016937, -0.29413270950317383, 0.056308940052986145, 0.41236793994903564, 0.04144921153783798, -0.2694845199584961, -0.022397875785827637, 0.3489038348197937, 0.12327003479003906, -0.47823596000671387, -0.060982342809438705, -0.3068525791168213 ]
https://github.com/huggingface/datasets/issues/6386
Ah I think the `line-profiler` log is off-by-one and it is in fact the `extract_batch` method that's taking forever. Will investigate further.
Formatting overhead
### Describe the bug Hi! I very recently noticed that my training time is dominated by batch formatting. Using Lightning's profilers, I located the bottleneck within `datasets.formatting.formatting` and then narrowed it down with `line-profiler`. It turns out that almost all of the overhead is due to creating new instances of `self.python_arrow_extractor`. I admit I'm confused why that could be the case - as far as I can tell there's no complex `__init__` logic to execute. ![image](https://github.com/huggingface/datasets/assets/320321/5e022e0b-0d21-43d0-8e6f-9e641142e96b) ### Steps to reproduce the bug 1. Set up a dataset `ds` with potentially several (4+) columns (not sure if this is necessary, but it did at one point of the investigation make overhead worse) 2. Process it using a custom transform, `ds = ds.with_transform(transform_func)` 3. Decorate this function https://github.com/huggingface/datasets/blob/main/src/datasets/formatting/formatting.py#L512 with `@profile` from https://pypi.org/project/line-profiler/ 4. Profile with `$ kernprof -l script_to_profile.py` ### Expected behavior Batch formatting should have acceptable overhead. ### Environment info ``` datasets=2.14.6 pyarrow=14.0.0 ```
22
Formatting overhead ### Describe the bug Hi! I very recently noticed that my training time is dominated by batch formatting. Using Lightning's profilers, I located the bottleneck within `datasets.formatting.formatting` and then narrowed it down with `line-profiler`. It turns out that almost all of the overhead is due to creating new instances of `self.python_arrow_extractor`. I admit I'm confused why that could be the case - as far as I can tell there's no complex `__init__` logic to execute. ![image](https://github.com/huggingface/datasets/assets/320321/5e022e0b-0d21-43d0-8e6f-9e641142e96b) ### Steps to reproduce the bug 1. Set up a dataset `ds` with potentially several (4+) columns (not sure if this is necessary, but it did at one point of the investigation make overhead worse) 2. Process it using a custom transform, `ds = ds.with_transform(transform_func)` 3. Decorate this function https://github.com/huggingface/datasets/blob/main/src/datasets/formatting/formatting.py#L512 with `@profile` from https://pypi.org/project/line-profiler/ 4. Profile with `$ kernprof -l script_to_profile.py` ### Expected behavior Batch formatting should have acceptable overhead. ### Environment info ``` datasets=2.14.6 pyarrow=14.0.0 ``` Ah I think the `line-profiler` log is off-by-one and it is in fact the `extract_batch` method that's taking forever. Will investigate further.
[ -0.17785169184207916, -0.23078474402427673, 0.02506566047668457, 0.2501610517501831, 0.35222551226615906, -0.01755823940038681, 0.33603334426879883, 0.12893426418304443, -0.38654667139053345, -0.017012380063533783, 0.265005886554718, 0.41242772340774536, -0.4074646830558777, 0.14873144030570984, 0.10780075192451477, -0.20845745503902435, -0.12319315969944, -0.05734475702047348, -0.10073070228099823, 0.08667369186878204, 0.1428963541984558, 0.16669733822345734, -0.19191911816596985, 0.07677118480205536, -0.7236786484718323, -0.15159966051578522, -0.09823809564113617, -0.13277596235275269, -0.008662810549139977, -0.41480496525764465, 0.37263667583465576, -0.03929867595434189, -0.09086431562900543, 0.6167424321174622, -0.00011891657050000504, -0.17551365494728088, 0.07424873113632202, 0.1959836483001709, -0.3848133385181427, 0.23930351436138153, -0.013973362743854523, -0.3690851330757141, 0.3758646845817566, -0.07660333067178726, 0.22302855551242828, -0.11573594808578491, -0.18553946912288666, -0.2956730127334595, 0.2847844958305359, 0.08377312123775482, 0.16699160635471344, 0.4014197587966919, -0.45485246181488037, 0.01506589725613594, 0.14084549248218536, 0.5154638886451721, -0.1438073068857193, 0.05409140884876251, -0.0811774879693985, -0.09066340327262878, -0.20871089398860931, 0.4161345958709717, 0.017160460352897644, 0.010325100272893906, 0.39408794045448303, -0.048414330929517746, -0.05181603878736496, 0.0085395947098732, -0.21895669400691986, 0.33262014389038086, 0.22939372062683105, -0.18617603182792664, -0.35818028450012207, -0.7113810181617737, 0.13811762630939484, -0.43488848209381104, 0.10926200449466705, 0.09503047168254852, -0.34856003522872925, 0.13453960418701172, -0.13381624221801758, 0.15927690267562866, -0.07441572844982147, -0.4157823622226715, 0.09790785610675812, 0.01738247461616993, 0.006464816629886627, -0.15035480260849, 0.3239630460739136, 0.04397843778133392, 0.04173019528388977, 0.10945215821266174, 0.01278490386903286, 0.08685419708490372, -0.3183690011501312, 0.0033309757709503174, 0.08596569299697876, -0.2452668845653534, -0.2080029845237732, 0.5668582320213318, 0.289911150932312, 0.05026189237833023, 0.3468603193759918, -0.1493566930294037, 0.0025575775653123856, 0.41241082549095154, 0.24261407554149628, 0.07507334649562836, 0.12541621923446655, -0.03702780604362488, -0.0030485019087791443, 0.0842704251408577, -0.07859991490840912, -0.09317019581794739, 0.23777362704277039, -0.03075927495956421, -0.019767403602600098, 0.009739279747009277, -0.15049831569194794, 0.1297362595796585, -0.3035273253917694, -0.17935287952423096, 0.12893643975257874, -0.02431710809469223, 0.13393498957157135, 0.24853719770908356, 0.06446874141693115, -0.15975028276443481, -0.39203760027885437, 0.16421402990818024, -0.21472957730293274, 0.031618956476449966, -0.40997421741485596, 0.1075979620218277, -0.06785890460014343, -0.007518082857131958, 0.033690713346004486, -0.02509109303355217, 0.13880978524684906, -0.2349979728460312, -0.09232378005981445, 0.03589910641312599, 0.22862491011619568, 0.14780543744564056, -0.43237364292144775, 0.20611101388931274, 0.02996649593114853, 0.24870836734771729, -0.06469187140464783, -0.12974965572357178, -0.08622118830680847, -0.49833357334136963, -0.0731075331568718, 0.15740828216075897, -0.14477457106113434, -0.037580862641334534, -0.15945108234882355, -0.1085711419582367, 0.2052445411682129, 0.08442249894142151, 0.05895739421248436, -0.4455838203430176, 0.12903732061386108, -0.07552970945835114, 0.10647334903478622, 0.4066489636898041, -0.19723933935165405, -0.159782275557518, 0.051832765340805054, -0.06495510041713715, 0.4664474129676819, 0.2516051232814789, -0.20815692842006683, 0.4717126786708832, -0.2123546004295349, 0.04297320544719696, 0.41371428966522217, -0.08163043856620789, -0.1745566427707672, 0.22072270512580872, -0.3704466223716736, 0.3302712142467499, 0.42047247290611267, -0.007060486823320389, 0.08859498798847198, -0.10442078113555908, -0.005495496094226837, 0.2982688248157501, 0.10514574497938156, 0.03005792945623398, -0.3271889090538025, -0.1911488175392151, -0.34769314527511597, -0.05239652842283249, -0.15022385120391846, -0.27407756447792053, -0.44894570112228394, -0.10485697537660599, 0.43420225381851196, -0.3085821866989136, -0.20693820714950562, -0.02574864774942398, 0.024957582354545593, 0.19544340670108795, 0.03373386710882187, 0.15309235453605652, -0.22434201836585999, 0.1547812819480896, -0.2533232867717743, 0.05837545171380043, -0.24957424402236938, -0.3582881689071655, 0.23652102053165436, 0.2331893891096115, -0.37484902143478394, -0.32487359642982483, -0.03125128149986267, 0.07973644137382507, 0.23198236525058746, -0.27623558044433594, -0.12616461515426636, -0.0169178806245327, -0.1404889076948166, 0.1958298534154892, -0.27836763858795166, -0.3970033824443817, 0.2657095491886139, 0.06471224874258041, -0.23492126166820526, 0.34767866134643555, -0.11248219758272171, -0.17329122126102448, -0.09771201759576797, 0.14636081457138062, 0.3477315306663513, 0.10731260478496552, -0.11415576189756393, 0.046462126076221466, -0.11947731673717499, 0.006010651588439941, -0.0015775710344314575, 0.05296725034713745, -0.09373940527439117, -0.022836893796920776, -0.3210631012916565, 0.6204134225845337, -0.09067046642303467, 0.5093899965286255, -0.12662175297737122, -0.11165356636047363, -0.021694276481866837, 0.09799069166183472, 0.05759327858686447, -0.17562830448150635, 0.41696494817733765, -0.08045677840709686, 0.3942515254020691, 0.14905227720737457, -0.26876750588417053, 0.24945729970932007, -0.06020503118634224, 0.0949394553899765, -0.2223173975944519, 0.255323588848114, -0.08479592204093933, -0.03067200630903244, -0.013542155735194683, 0.09476363658905029, 0.12586098909378052, 0.23677214980125427, 0.09461256861686707, 0.024333765730261803, 0.20357805490493774, -0.3399059474468231, 0.4762025475502014, 0.3951914310455322, 0.08972261846065521, 0.07044785469770432, 0.20541192591190338, 0.32228779792785645, -0.1703568696975708, -0.23009711503982544, -0.4009018540382385, 0.12646739184856415, -0.38527625799179077, 0.4305737614631653, -0.3966156244277954, -0.12634290754795074, -0.4398183524608612, -0.12763899564743042, 0.11876527965068817, -0.40896111726760864, -0.0384405255317688, -0.10449352860450745, -0.19067257642745972, 0.035325273871421814, 0.10309725999832153, 0.2883771061897278, -0.010027408599853516, -0.21608810126781464, -0.09099308401346207, 0.017471004277467728, -0.23026008903980255, -0.037355486303567886, 0.36653628945350647, -0.2596527338027954, 0.5325897336006165, 0.14381909370422363, 0.33446162939071655, 0.013447336852550507, -0.2638981342315674, 0.20129381120204926, 0.05479828640818596, -0.08099252730607986, 0.25893837213516235, -0.18227611482143402, -0.06244863197207451, -0.11258070170879364, 0.01302080973982811, -0.1807207614183426, -0.06171067804098129, 0.11589285731315613, -0.15677934885025024, 0.19117334485054016, -0.10098651796579361, 0.09480620920658112, -0.2972257435321808, -0.08112017810344696, 0.3484048843383789, 0.007749132812023163, 0.16575473546981812, 0.37578871846199036, -0.19248169660568237, 0.09031639993190765, -0.3648550510406494, 0.02585865557193756, 0.13612626492977142, -0.20607715845108032, 0.13100071251392365, -0.05522467568516731, 0.011611487716436386, -0.4211233854293823, -0.13536730408668518, -0.08658881485462189, 0.25432533025741577, -0.5141821503639221, -0.002207573503255844, -0.36976683139801025, 0.2447580099105835, -0.084030881524086, 0.14535318315029144, 0.363779753446579, 0.24840737879276276, -0.1295839548110962, 0.17167335748672485, 0.20733985304832458, 0.121440589427948, -0.3498936593532562, 0.03734585642814636, -0.3695553243160248, 0.30658450722694397, 0.0446506142616272, 0.6345685124397278, 0.35769087076187134, 0.008274102583527565, -0.21834519505500793, -0.2412751317024231, -0.0011688582599163055, -0.26152467727661133, -0.1375768780708313, -0.1537574976682663, -0.0862606018781662, -0.21257126331329346, 0.3054029643535614, 0.08688582479953766, -0.04824750870466232, 0.1359146535396576, 0.1620422899723053, 0.023839987814426422, -0.3066764771938324, 0.392088919878006, -0.25233277678489685, 0.14088618755340576, -0.09029591828584671, 0.4972182512283325, -0.10476314276456833, 0.05000685527920723, 0.14772307872772217, -0.26959311962127686, 0.21694344282150269, -0.2378162145614624, -0.04306311905384064, -0.40995174646377563, -0.5646729469299316, 0.18687433004379272, 0.08887103199958801, -0.02685852348804474, 0.1861826777458191, -0.4408583641052246, 0.4130532443523407, 0.03704415634274483, 0.34706875681877136, 0.09632206708192825, -0.2868262827396393, 0.19059841334819794, -0.22687840461730957, -0.4825993776321411, -0.1881117820739746, -0.1809600591659546, 0.31065574288368225, 0.14961060881614685, 0.1890438348054886, -0.09422837197780609, -0.3050209581851959, 0.6602033376693726, 0.28526294231414795, -0.22340285778045654, -0.02821916528046131, -0.0689508467912674, -0.24264223873615265, 0.11988949775695801, 0.33805036544799805, -0.29209256172180176, 0.198192298412323, 0.11240261793136597, 0.24405398964881897, -0.07565702497959137, 0.2241414487361908, 0.3125557005405426, 0.14002294838428497, 0.28640517592430115, -0.055443041026592255, 0.13203907012939453, 0.18767154216766357, -0.00021737627685070038, 0.30990225076675415, 0.4352165162563324, -0.13554877042770386, -0.0631466656923294, 0.06542694568634033, -0.23840951919555664, 0.5836595296859741, 0.666716456413269, -0.028163794428110123, 0.04988166689872742, -0.5881354808807373, 0.4346352517604828, -0.21950092911720276, -0.07279425859451294, 0.2796299159526825, 0.041566308587789536, -0.2580026090145111, -0.4233018457889557, 0.47295132279396057, 0.14256048202514648, -0.013988636434078217, 0.33013397455215454, -0.07007083296775818, -0.0811910331249237, 0.516311764717102, 0.23166930675506592, 1.006676435470581, 0.33581188321113586, 0.3689592778682709, 0.5466175675392151, -0.11254525929689407, 0.4459855556488037, 0.17056749761104584, 0.14689436554908752, -0.4780707359313965, 0.111978679895401, 0.10912973433732986, -0.2778509557247162, 0.14472566545009613, 0.015548715367913246, 0.21275174617767334, -0.05523998662829399, -0.5883165597915649, -0.22585391998291016, -0.02013595588505268, 0.16128793358802795, 0.1396999955177307, -0.4127282202243805, -0.19537094235420227, 0.07968007028102875, 0.151118203997612, 0.10723116993904114, -0.03885532170534134, -0.024809546768665314, -0.1998400092124939, -0.16225510835647583, -0.04012797772884369, 0.032960809767246246, -0.07394371926784515, 0.24403853714466095, -0.10709509253501892, -0.8171041011810303, -0.06267966330051422, -0.05263172835111618, -0.18701818585395813, 0.040447767823934555, 0.18424515426158905, 0.18561582267284393, 0.1764880269765854, 0.3870140612125397, 0.14955708384513855, -0.29694798588752747, 0.4086366295814514, 0.05374186486005783, 0.2877422869205475, -0.2797635495662689, -0.10094153881072998, -0.19494129717350006, 0.08053046464920044, 0.09429576992988586, 0.27653059363365173, -0.20296381413936615, -0.02104177698493004, 0.10923188924789429, 0.06066438555717468, -0.22717243432998657, 0.052155978977680206, 0.06260338425636292, -0.15600863099098206, 0.5917107462882996, -0.02954426407814026, -0.29957130551338196, -0.04564192146062851, 0.057966142892837524, 0.1921650618314743, 0.07885788381099701, 0.6500227451324463, 0.23571208119392395, -0.36387899518013, -0.25361213088035583, 0.46112677454948425, 0.1488754004240036, -0.7514378428459167, 0.3037412464618683, 0.09338617324829102, 0.08415438234806061, 0.24045388400554657, 0.13515245914459229, 0.02808781899511814, -0.09313899278640747, -0.31445828080177307, 0.046203337609767914, -0.28144872188568115, -0.14885923266410828, 0.14907310903072357, 0.21012148261070251, -0.10555742681026459, 0.370958536863327, -0.20932820439338684, 0.1824764609336853, -0.26321566104888916, -0.20778894424438477, 0.2789947986602783, -0.06154719367623329, -0.10577283799648285, 0.010161733254790306, 0.4096982777118683, 0.005752976983785629, 0.016776230186223984, 0.1818258911371231, -0.10815580189228058, -0.17111817002296448, -0.26612526178359985, 0.12556923925876617, -0.3418166935443878, 0.0005529671907424927, 0.2548903226852417, 0.5027273297309875, -0.1765112280845642, -0.33354026079177856, 0.17865508794784546, 0.10177835077047348, 0.0188432727009058, -0.19209900498390198, 0.06994541734457016, -0.12484800070524216, -0.0954550951719284, 0.04504195600748062, 0.004891717806458473, 0.15559259057044983, 0.1724422127008438, 0.07752959430217743, -0.1709165871143341, -0.18627521395683289, 0.20137135684490204, 0.23841914534568787, 0.09570251405239105, -0.10617049038410187, -0.06940430402755737, -0.36301514506340027, -0.2576674818992615, 0.07291810214519501, 0.09824451804161072, 0.4015965461730957, 0.08236485719680786, -0.146530419588089, -0.1660352349281311, 0.1375505030155182, -0.046183906495571136, -0.0717928484082222, 0.05445687100291252, 0.04198998957872391, -0.23587608337402344, 0.30564096570014954, 0.04265901446342468, 0.017198428511619568, -0.2730540633201599, 0.059537626802921295, 0.04428911581635475, -0.09636513888835907, 0.13255348801612854, 0.3364143371582031, 0.07948324084281921, -0.12982143461704254, 0.7087674736976624, 0.016462251543998718, 0.4774738848209381, -0.12287348508834839, -0.03645568713545799, 0.3769833743572235, 0.23397043347358704, 0.004632100462913513, -0.32151085138320923, -0.66010582447052, -0.2081412971019745, 0.056886810809373856, 0.08129601180553436, 0.1338942050933838, 0.08663442730903625, 0.6583179831504822, -0.2860470414161682, -0.3058633506298065, -0.1281462013721466, 0.25594213604927063, -0.3176603317260742, -0.07192276418209076, -0.14505000412464142, 0.04760719835758209, 0.1112760603427887, 0.15320847928524017, -0.12621086835861206, 0.017117630690336227, 0.21190670132637024, 0.049053795635700226, 0.054912060499191284, -0.014059886336326599, -0.21463042497634888, -0.2589767575263977, 0.5886331796646118, -0.3175586462020874, -0.018747985363006592, 0.09834793210029602, 0.18942981958389282, -0.22953754663467407, 0.34515050053596497, 0.46784353256225586, 0.15102186799049377, 0.11637730896472931, -0.2940590977668762, -0.4040921926498413, 0.12502533197402954, -0.020547259598970413, 0.2452486753463745, -0.07243102788925171, 0.007063915953040123, 0.21764039993286133, 0.01118544489145279, -0.17246171832084656, 0.056190375238657, 0.29315078258514404, 0.1307229995727539, -0.23089388012886047, 0.2347215712070465, 0.03144681826233864, -0.4151032865047455, -0.08468488603830338, 0.14292989671230316, -0.2369205802679062, -0.055331069976091385, 0.6073338985443115, 0.06725965440273285, -0.20491757988929749, 0.007664855569601059, 0.05700996145606041, 0.039592646062374115, 0.6827645897865295, 0.2916710078716278, 0.01986793428659439, 0.04464512690901756, 0.08467207849025726, -0.3745743930339813, -0.07478742301464081, -0.16544285416603088, 0.09132052958011627, 0.1449168473482132, 0.24406574666500092, -0.03941635414958, 0.12977343797683716, 0.2777843177318573, -0.0549522303044796, 0.00715511292219162, 0.08507338166236877, -0.4134776294231415, 0.3121216595172882, -0.037706900388002396, -0.20646367967128754, -0.020719565451145172, -0.241122767329216, 0.09308202564716339, -0.38850390911102295, 0.03509055823087692, 0.1709589958190918, -0.18512822687625885, 0.13323867321014404, -0.02370659075677395, 0.5298484563827515, 0.0337911918759346, -0.0026982352137565613, 0.22063525021076202, -0.2471979707479477, -0.2294437736272812, -0.0014852099120616913, -0.09777511656284332, 0.34998753666877747, 0.1164235919713974, 0.6043636202812195, -0.004801243543624878, 0.01387123391032219, -0.08315659314393997, 0.20012715458869934, 0.1405007541179657, -0.3439449071884155, -0.1435171365737915, 0.17906732857227325, -0.2635113298892975, 0.2629833221435547, 0.09976966679096222, 0.45384323596954346, 0.10964789986610413, -0.0019848421216011047, -0.39047014713287354, -0.3562453091144562, 0.6104680299758911, -0.37926971912384033, -0.04716016724705696, -0.06701131165027618, 0.3217220604419708, 0.19558776915073395, -0.1106393039226532, -0.42615506052970886, -0.16774871945381165, 0.020542744547128677, -0.10643480718135834, -0.05691283941268921, 0.4455527067184448, -0.24292698502540588, -0.054843876510858536, -0.15563951432704926, 0.47392651438713074, -0.21490421891212463, -0.0698373094201088, -0.06058863550424576, -0.07167860865592957 ]
https://github.com/huggingface/datasets/issues/6385
The `answers.text` field in the JSON dataset needs to be a list of strings, not a string. So, here is the fixed code: ```python from huggingface_hub import notebook_login from datasets import load_dataset notebook_login("mymailadresse", "mypassword") squad = load_dataset("squad", split="train[:5000]") squad = squad.train_test_split(test_size=0.2) dataset1 = squad["train"] import json mybase = [ { "id": "1", "context": "She lives in Nantes", "question": "Where does she live?", "answers": { "text": ["Nantes"], "answer_start": [13], } } ] # Save the data to a JSON file json_file_path = r"data" with open(json_file_path, "w", encoding= "utf-8") as json_file: json.dump(mybase, json_file, indent=4) # Load the JSON file as a dataset custom_dataset = load_dataset("json", data_files=json_file_path, features=dataset1.features) # Access the train split train_dataset = custom_dataset["train"] from datasets import concatenate_datasets # Concatenate the datasets concatenated_dataset = concatenate_datasets([train_dataset, dataset1]) ```
Get an error when i try to concatenate the squad dataset with my own dataset
### Describe the bug Hello, I'm new here and I need to concatenate the squad dataset with my own dataset i created. I find the following error when i try to do it: Traceback (most recent call last): Cell In[9], line 1 concatenated_dataset = concatenate_datasets([train_dataset, dataset1]) File ~\anaconda3\Lib\site-packages\datasets\combine.py:213 in concatenate_datasets return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis) File ~\anaconda3\Lib\site-packages\datasets\arrow_dataset.py:6002 in _concatenate_map_style_datasets _check_if_features_can_be_aligned([dset.features for dset in dsets]) File ~\anaconda3\Lib\site-packages\datasets\features\features.py:2122 in _check_if_features_can_be_aligned raise ValueError( ValueError: The features can't be aligned because the key answers of features {'id': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'context': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None), 'answers': Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None)} has unexpected type - Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None) (expected either {'answer_start': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'text': Value(dtype='string', id=None)} or Value("null"). ### Steps to reproduce the bug ```python from huggingface_hub import notebook_login from datasets import load_dataset notebook_login("mymailadresse", "mypassword") squad = load_dataset("squad", split="train[:5000]") squad = squad.train_test_split(test_size=0.2) dataset1 = squad["train"] import json mybase = [ { "id": "1", "context": "She lives in Nantes", "question": "Where does she live?", "answers": { "text": "Nantes", "answer_start": [13], } } ] # Save the data to a JSON file json_file_path = r"C:\Users\mypath\thefile.json" with open(json_file_path, "w", encoding= "utf-8") as json_file: json.dump(mybase, json_file, indent=4) # Load the JSON file as a dataset custom_dataset = load_dataset("json", data_files=json_file_path) # Access the train split train_dataset = custom_dataset["train"] from datasets import concatenate_datasets # Concatenate the datasets concatenated_dataset = concatenate_datasets([train_dataset, dataset1]) ``` ### Expected behavior I would expect the two datasets to be concatenated without error. The len(dataset1) is equal to 4000 and the len(train_dataset) is equal to 1 so I would exepect concatenated_dataset to be created and having lenght 4001. ### Environment info Python 3.11.4 and using windows Thank you for your help
126
Get an error when i try to concatenate the squad dataset with my own dataset ### Describe the bug Hello, I'm new here and I need to concatenate the squad dataset with my own dataset i created. I find the following error when i try to do it: Traceback (most recent call last): Cell In[9], line 1 concatenated_dataset = concatenate_datasets([train_dataset, dataset1]) File ~\anaconda3\Lib\site-packages\datasets\combine.py:213 in concatenate_datasets return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis) File ~\anaconda3\Lib\site-packages\datasets\arrow_dataset.py:6002 in _concatenate_map_style_datasets _check_if_features_can_be_aligned([dset.features for dset in dsets]) File ~\anaconda3\Lib\site-packages\datasets\features\features.py:2122 in _check_if_features_can_be_aligned raise ValueError( ValueError: The features can't be aligned because the key answers of features {'id': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'context': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None), 'answers': Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None)} has unexpected type - Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None) (expected either {'answer_start': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'text': Value(dtype='string', id=None)} or Value("null"). ### Steps to reproduce the bug ```python from huggingface_hub import notebook_login from datasets import load_dataset notebook_login("mymailadresse", "mypassword") squad = load_dataset("squad", split="train[:5000]") squad = squad.train_test_split(test_size=0.2) dataset1 = squad["train"] import json mybase = [ { "id": "1", "context": "She lives in Nantes", "question": "Where does she live?", "answers": { "text": "Nantes", "answer_start": [13], } } ] # Save the data to a JSON file json_file_path = r"C:\Users\mypath\thefile.json" with open(json_file_path, "w", encoding= "utf-8") as json_file: json.dump(mybase, json_file, indent=4) # Load the JSON file as a dataset custom_dataset = load_dataset("json", data_files=json_file_path) # Access the train split train_dataset = custom_dataset["train"] from datasets import concatenate_datasets # Concatenate the datasets concatenated_dataset = concatenate_datasets([train_dataset, dataset1]) ``` ### Expected behavior I would expect the two datasets to be concatenated without error. The len(dataset1) is equal to 4000 and the len(train_dataset) is equal to 1 so I would exepect concatenated_dataset to be created and having lenght 4001. ### Environment info Python 3.11.4 and using windows Thank you for your help The `answers.text` field in the JSON dataset needs to be a list of strings, not a string. So, here is the fixed code: ```python from huggingface_hub import notebook_login from datasets import load_dataset notebook_login("mymailadresse", "mypassword") squad = load_dataset("squad", split="train[:5000]") squad = squad.train_test_split(test_size=0.2) dataset1 = squad["train"] import json mybase = [ { "id": "1", "context": "She lives in Nantes", "question": "Where does she live?", "answers": { "text": ["Nantes"], "answer_start": [13], } } ] # Save the data to a JSON file json_file_path = r"data" with open(json_file_path, "w", encoding= "utf-8") as json_file: json.dump(mybase, json_file, indent=4) # Load the JSON file as a dataset custom_dataset = load_dataset("json", data_files=json_file_path, features=dataset1.features) # Access the train split train_dataset = custom_dataset["train"] from datasets import concatenate_datasets # Concatenate the datasets concatenated_dataset = concatenate_datasets([train_dataset, dataset1]) ```
[ -0.22193357348442078, -0.18991602957248688, 0.010590378195047379, 0.12742571532726288, 0.24476563930511475, 0.16857588291168213, 0.3418557345867157, 0.2883613705635071, -0.3683692514896393, -0.008571326732635498, -0.11954230815172195, 0.4824563264846802, 0.25596916675567627, 0.11856669932603836, -0.31501179933547974, 0.1845046728849411, 0.10287778079509735, -0.011830069124698639, -0.010556623339653015, 0.1744707226753235, -0.4107816815376282, 0.2234237939119339, -0.33995765447616577, 0.09923447668552399, -0.38546812534332275, 0.14286890625953674, -0.15970489382743835, 0.20055535435676575, -0.18723995983600616, -0.3317274749279022, 0.4534112513065338, -0.011815909296274185, 0.19770851731300354, 0.4169388711452484, -0.00010937771730823442, -0.07267694175243378, 0.35995861887931824, -0.18491046130657196, -0.15451475977897644, -0.018360242247581482, -0.3183688521385193, -0.1883741319179535, 0.027451708912849426, -0.15611666440963745, 0.0017223209142684937, -0.13582560420036316, -0.18139910697937012, -0.5604358315467834, 0.3818715512752533, 0.3335544764995575, 0.19521868228912354, 0.037365324795246124, 0.29332709312438965, -0.4835744798183441, -0.03658456727862358, 0.03100069798529148, -0.0012226030230522156, 0.028215155005455017, 0.18223194777965546, -0.10761237144470215, 0.4291990399360657, 0.1767614483833313, 0.03726021945476532, -0.0767374336719513, 0.20769786834716797, 0.3392937183380127, 0.09274673461914062, -0.4780799448490143, -0.03815662860870361, 0.16695934534072876, 0.5602617859840393, -0.2123039960861206, -0.2899998128414154, -0.16157299280166626, 0.25184792280197144, -0.05077999830245972, 0.13441455364227295, 0.032034069299697876, 0.08556675165891647, 0.11400806903839111, 0.11465071141719818, 0.34105587005615234, -0.219163715839386, 0.12508417665958405, 0.16084158420562744, 0.07244332134723663, 0.023761343210935593, 0.10307660698890686, 0.05669254809617996, -0.2634860873222351, 0.22613024711608887, -0.201242595911026, -0.1608266532421112, 0.2686479389667511, -0.5788865089416504, -0.22484201192855835, -0.2904123067855835, -0.4752849340438843, 0.35420799255371094, -0.09127813577651978, 0.05309201776981354, -0.10806101560592651, 0.2381308525800705, 0.10572661459445953, 0.3672281503677368, 0.15291590988636017, 0.16802242398262024, 0.0531616173684597, -0.18056854605674744, -0.014740925282239914, -0.014322228729724884, 0.009362270124256611, -0.06090738624334335, -0.3513181209564209, 0.05064325034618378, 0.28389039635658264, 0.41759756207466125, -0.04664000868797302, -0.09067823737859726, -0.015409460291266441, -0.01307930052280426, 0.15036435425281525, -0.10813315212726593, -0.008983783423900604, -0.08946555852890015, 0.09366612136363983, 0.04039503633975983, 0.29614347219467163, 0.22754831612110138, -0.00493013858795166, -0.09619173407554626, -0.22181853652000427, 0.1367063969373703, -0.1196279525756836, -0.06905882805585861, -0.1294836401939392, -0.10584971308708191, 0.19669556617736816, 0.20575274527072906, 0.013922318816184998, -0.20916950702667236, -0.1392078548669815, -0.11887243390083313, -0.08880017697811127, 0.20861728489398956, -0.11755740642547607, 0.18964436650276184, -0.2526509761810303, -0.14206191897392273, 0.015943318605422974, -0.5065678954124451, -0.37940138578414917, -0.7047993540763855, 0.24879074096679688, 0.0034537166357040405, -0.014411797747015953, 0.07316551357507706, 0.093788743019104, 0.2784755229949951, -0.04449060559272766, -0.15289075672626495, 0.03543313592672348, 0.01018841564655304, -0.21569059789180756, 0.04542630910873413, 0.17057713866233826, -0.3968890309333801, 0.05459889769554138, -0.023814069107174873, 0.09652632474899292, 0.07458480447530746, 0.13577516376972198, -0.02671976573765278, 0.17597360908985138, -0.21473434567451477, 0.16409017145633698, 0.6666754484176636, -0.6294938325881958, -0.3275212347507477, -0.010300904512405396, -0.19498875737190247, -0.16739723086357117, 0.026889288797974586, 0.12116235494613647, 0.38344964385032654, -0.011552594602108002, 0.45580652356147766, 0.5310064554214478, -0.07614745199680328, -0.1488533914089203, -0.089243583381176, -0.1744602620601654, 0.10519108176231384, 0.0530875027179718, -0.3964819610118866, 0.15540701150894165, 0.1668819785118103, -0.15926918387413025, 0.03183508664369583, -0.1928468495607376, -0.11718869209289551, 0.15010839700698853, 0.1904660016298294, 0.0929892361164093, -0.07413450628519058, 0.05205889046192169, -0.6289851665496826, 0.010409362614154816, -0.28249430656433105, 0.07374154031276703, -0.011893462389707565, -0.21798646450042725, -0.11429084837436676, -0.19728177785873413, -0.38015303015708923, -0.01810431480407715, 0.127643883228302, -0.00823463499546051, -0.059882670640945435, -0.14450618624687195, -0.13530762493610382, 0.44053196907043457, 0.057047776877880096, 0.026351816952228546, -0.30510517954826355, 0.20922750234603882, -0.2840265929698944, 0.02883359044790268, 0.05133264511823654, 0.44787469506263733, 0.21865956485271454, 0.1660802662372589, -0.08743984997272491, 0.42592400312423706, -0.15782876312732697, -0.16645319759845734, -0.008664756081998348, -0.5605782866477966, 0.07780252397060394, -0.18847820162773132, -0.23476971685886383, -0.06305013597011566, -0.028616953641176224, -0.08029909431934357, -0.23348703980445862, 0.33929920196533203, -0.015805717557668686, 0.28632134199142456, -0.208062082529068, 0.19432944059371948, 0.2589764893054962, -0.052679453045129776, -0.06536562740802765, -0.13021351397037506, 0.04677903652191162, 0.13466250896453857, -0.07188504934310913, 0.12062118947505951, -0.21977311372756958, 0.23323290050029755, 0.45439666509628296, 0.07562467455863953, 0.09847010672092438, 0.04548043757677078, -0.03624189272522926, 0.08264312148094177, -0.13753420114517212, 0.1215156614780426, 0.5641022324562073, 0.2407756745815277, -0.3424387276172638, 0.13414233922958374, -0.05323491990566254, 0.08930855989456177, 0.015953514724969864, 0.015857670456171036, 0.34624558687210083, 0.3048244118690491, 0.3779279589653015, 0.2687484920024872, 0.2191321700811386, -0.17061276733875275, -0.176687091588974, -0.035390812903642654, -0.235312819480896, 0.08257254958152771, -0.30359163880348206, -0.23385673761367798, -0.17921365797519684, -0.1614578664302826, -0.22270897030830383, -0.3231884241104126, -0.04592243954539299, -0.04921071231365204, 0.13496485352516174, 0.31299734115600586, 0.11491255462169647, 0.2721843421459198, 0.3499491214752197, -0.2529870867729187, 0.13476982712745667, -0.05419864133000374, -0.051618508994579315, 0.08009015768766403, 0.07195396721363068, -0.12365812063217163, 0.09695254266262054, -0.012664727866649628, 0.18722084164619446, -0.178668811917305, -0.18415622413158417, 0.1250574290752411, -0.20863762497901917, 0.1411479115486145, 0.04203565791249275, 0.07096998393535614, 0.05489042401313782, -0.5292640924453735, 0.31045055389404297, 0.4107170104980469, -0.337464839220047, 0.28577715158462524, 0.04892309382557869, -0.2048107236623764, -0.14076432585716248, -0.39922037720680237, -0.4372105002403259, -0.2878444492816925, 0.08521593362092972, 0.11222100257873535, 0.054026804864406586, 0.36161544919013977, 0.24360230565071106, -0.02006804756820202, 0.011419311165809631, -0.13076427578926086, -0.3360360860824585, -0.1243271455168724, 0.5620512366294861, -0.1980999857187271, -0.32278165221214294, -0.05956757441163063, -0.14083459973335266, 0.11949948966503143, -0.26608648896217346, 0.03146854788064957, -0.0827944204211235, 0.059916868805885315, 0.22620734572410583, -0.3889409601688385, -0.02357768639922142, 0.504395604133606, 0.04192758724093437, -0.08081032335758209, -0.1063748151063919, -0.12402035295963287, 0.18132224678993225, 0.24119842052459717, 0.44208645820617676, -0.1639856994152069, 0.3163014054298401, -0.27995216846466064, 0.4974335730075836, 0.546613335609436, -0.27570220828056335, 0.1342591792345047, -0.08588899672031403, 0.37306129932403564, -0.21880990266799927, -0.4139654338359833, 0.02900085598230362, -0.0484694242477417, 0.3190794885158539, 0.04378115013241768, -0.20985132455825806, -0.14267900586128235, -0.12255127727985382, 0.4206179678440094, -0.19674134254455566, -0.06310606747865677, -0.021943215280771255, -0.014004292897880077, 0.024629224091768265, -0.03795779123902321, -0.06447318196296692, -0.16113324463367462, -0.0775841474533081, -0.1611991822719574, 0.1984090954065323, -0.14567992091178894, 0.007811848074197769, -0.7980466485023499, -0.15696366131305695, -0.21439576148986816, 0.39403876662254333, 0.15173956751823425, 0.3447854518890381, 0.05834321677684784, -0.08209395408630371, -0.28693944215774536, 0.039596907794475555, 0.6167901754379272, -0.26589730381965637, -0.5252020359039307, 0.2644025981426239, 0.49190038442611694, -0.4043377935886383, -0.35091179609298706, -0.001826465129852295, 0.46794283390045166, 0.0744580328464508, 0.49882420897483826, -0.0204024538397789, 0.09877920895814896, 0.21122215688228607, -0.014128569513559341, -0.020874932408332825, -0.10651985555887222, -0.27905410528182983, -0.1121940016746521, -0.4138171076774597, -0.22084440290927887, 0.12129440903663635, 0.36715126037597656, 0.02180379629135132, -0.20341315865516663, -0.08638447523117065, -0.13669654726982117, 0.08582700788974762, 0.09770527482032776, 0.5103519558906555, 0.32518506050109863, 0.23492586612701416, 0.12435895949602127, 0.16275715827941895, 0.037992917001247406, 0.4048539400100708, 0.3162749409675598, -0.5058689117431641, 0.07059608399868011, -0.28910180926322937, 0.5316076874732971, 0.11612234264612198, -0.09999096393585205, 0.1334587037563324, -0.35307443141937256, 0.07715386152267456, -0.003656551241874695, 0.01101163774728775, 0.4325234889984131, 0.1092163696885109, -0.4769364893436432, -0.20030681788921356, 0.20560334622859955, 0.034595899283885956, 0.045552998781204224, 0.1585921347141266, -0.06264477968215942, -0.14762955904006958, 0.2392718642950058, 0.16030649840831757, 0.9302933812141418, 0.22953902184963226, 0.08415043354034424, 0.12432533502578735, 0.08775755763053894, 0.6618690490722656, 0.04651179909706116, 0.29500889778137207, -0.3398868441581726, -0.1910855621099472, -0.029914624989032745, -0.26020288467407227, 0.15439844131469727, -0.08084475994110107, -0.6401798725128174, 0.17238138616085052, -0.39796870946884155, 0.33559560775756836, -0.028303513303399086, 0.109397754073143, 0.14929020404815674, -0.3742596209049225, -0.18043816089630127, 0.1646542251110077, -0.03612828999757767, 0.057237062603235245, -0.0797271728515625, -0.2020474374294281, -0.3549474775791168, -0.15308570861816406, -0.2594946622848511, 0.33599361777305603, -0.20871756970882416, 0.2181852161884308, 0.13393418490886688, -0.21220210194587708, 0.15371209383010864, 0.4801768660545349, 0.419479638338089, -0.07732449471950531, -0.022278204560279846, -0.12843751907348633, 0.1688631922006607, -0.04120034724473953, -0.009396389126777649, -0.26189175248146057, 0.06963428854942322, -0.10829593241214752, -0.2697410583496094, 0.21872176229953766, 0.36564797163009644, -0.3669928014278412, -0.199520543217659, 0.11329537630081177, 0.05456279218196869, -0.4228448271751404, -0.341124564409256, 0.05044990032911301, 0.06734129786491394, -0.09714535623788834, 0.11463813483715057, -0.06935004889965057, -0.17184193432331085, 0.22291195392608643, 0.07731837034225464, -0.3242223262786865, 0.07209517061710358, 0.3859483003616333, 0.07032786309719086, 0.20336972177028656, 0.4243897497653961, -0.0028237253427505493, 0.05715370178222656, -0.06216876953840256, 0.18856272101402283, -0.14935998618602753, -0.23341253399848938, -0.2891450524330139, -0.2876947820186615, -0.3025321960449219, -0.10029198229312897, 0.19229796528816223, 0.24702703952789307, 0.19078363478183746, 0.0950714498758316, -0.4210885763168335, -0.4480151832103729, 0.12662696838378906, -0.16323190927505493, 0.06937786936759949, -0.11565404385328293, 0.3179260492324829, -0.004527583718299866, 0.05045997351408005, -0.3175250291824341, 0.00540565699338913, -0.296017587184906, 0.19380395114421844, -0.07504687458276749, -0.27524009346961975, 0.06122716888785362, -0.3233327269554138, 0.1296568512916565, 0.25820013880729675, -0.03373076766729355, -0.2982954978942871, -0.043729908764362335, 0.1598874032497406, 0.20457182824611664, -0.032063692808151245, -0.18433013558387756, -0.12674176692962646, -0.174615740776062, -0.0786256268620491, -0.3940443694591522, -0.10355415940284729, 0.16018414497375488, -0.07765720039606094, -0.08955511450767517, -0.10018977522850037, 0.11271700263023376, 0.11756928265094757, 0.16711243987083435, 0.03688792511820793, -0.19277536869049072, 0.08305682241916656, -0.31306442618370056, -0.08806321024894714, -0.30859318375587463, 0.22859477996826172, 0.24248170852661133, 0.27657151222229004, 0.010459555312991142, -0.3620546758174896, -0.022406339645385742, 0.11352546513080597, -0.011935673654079437, 0.3593043088912964, -0.32145076990127563, 0.10916554927825928, -0.04704490303993225, 0.14360062777996063, -0.4043728709220886, -0.2741529941558838, 0.30123868584632874, -0.07313033193349838, -0.09294767677783966, 0.16376572847366333, -0.03857986629009247, 0.19132551550865173, 0.014607047662138939, 0.13239336013793945, 0.2861703634262085, 0.3119519352912903, 0.34871360659599304, 0.20469310879707336, 0.02172601968050003, 0.1927749514579773, 0.27502062916755676, 0.15971946716308594, 0.14988099038600922, 0.16353227198123932, -0.0990823283791542, -0.06522881984710693, 0.2004033774137497, -0.4026733636856079, 0.38680487871170044, -0.042709510773420334, 0.11792682111263275, 0.09830288589000702, 0.17618806660175323, 0.1366589218378067, 0.21478316187858582, 0.48518112301826477, -0.310861736536026, -0.5661213994026184, -0.06848552823066711, -0.12860476970672607, -0.10048790276050568, 0.21711865067481995, -0.011294923722743988, 0.024675294756889343, -0.04986842721700668, -0.2880402207374573, 0.07363036274909973, -0.26343029737472534, 0.35232648253440857, -0.1786719262599945, -0.1412843018770218, -0.01687060296535492, 0.33302026987075806, 0.35734933614730835, 0.16256603598594666, -0.0934581309556961, 0.1409389078617096, 0.027971170842647552, 0.15436026453971863, 0.3305389881134033, 0.39172542095184326, 0.48031723499298096, 0.46452951431274414, -0.2839397192001343, 0.06372226774692535, 0.04111367464065552, -0.27159011363983154, 0.2534503936767578, -0.1751115620136261, 0.09835883229970932, -0.6567549109458923, 0.2228880077600479, 0.2077493518590927, -0.028361573815345764, 0.17524869740009308, 0.12895803153514862, 0.1130489856004715, -0.2011920064687729, 0.14564579725265503, -0.1913909614086151, -0.09250180423259735, 0.02425301820039749, 0.30105486512184143, -0.28417980670928955, -0.12884356081485748, 0.366335391998291, 0.2521853744983673, 0.13730643689632416, 0.01290956512093544, 0.09735479950904846, 0.0050158072263002396, 0.3847753703594208, 0.30445900559425354, -0.021695725619792938, -0.11033318936824799, 0.049089476466178894, -0.5394862294197083, 0.11164426058530807, -0.004706592299044132, 0.02229452133178711, 0.15615534782409668, 0.3442809283733368, 0.1946631669998169, 0.38933470845222473, 0.5007598400115967, -0.05888541415333748, -0.18096192181110382, -0.09104987978935242, -0.6078178882598877, -0.31178775429725647, 0.1440945267677307, 0.07190484553575516, 0.0538443997502327, -0.26604729890823364, 0.35345643758773804, 0.1304766684770584, 0.04665544629096985, 0.09932354092597961, -0.18575413525104523, -0.039854101836681366, -0.2409241795539856, 0.09262650460004807, 0.09601141512393951, 0.37287262082099915, -0.04806998372077942, -0.08862318843603134, 0.04586894065141678, -0.3123451769351959, -0.13613025844097137, 0.42013442516326904, 0.11745399236679077, 0.1445983201265335, -0.2725026309490204, 0.16984736919403076, -0.1370924413204193, 0.049698248505592346, 0.24184086918830872, -0.11226530373096466, -0.5351964235305786, 0.25981685519218445, 0.018368296325206757, 0.18421775102615356, -0.06110977381467819, 0.3021794855594635, -0.11446894705295563, 0.5663939118385315, 0.022350668907165527, -0.3506658375263214, 0.5497060418128967, -0.07116613537073135, -0.35060250759124756, 0.05983873829245567, -0.03906723111867905, 0.4889862835407257, 0.1594495177268982, -0.2622774839401245, -0.16186374425888062, 0.3332008123397827, -0.2331397533416748, -0.13858528435230255, 0.06965982913970947, -0.29203692078590393, -0.010300509631633759, -0.07635187357664108, 0.2533973455429077, -0.008130151778459549, -0.16617754101753235, 0.0770062729716301, -0.27997833490371704 ]
https://github.com/huggingface/datasets/issues/6382
Hey @SauravMaheshkar ! Just responded to your email. _For transparency, copying part of my response here:_ I agree, it would be really great to have this and other BenchMD datasets easily accessible on the hub. I think the main limiting factor is that the ChexPert dataset is currently hosted on the Stanford AIMI Shared Datasets website, with a license that does not permit redistribution IIRC. Thus, I believe we would need to create a [dataset loading script](https://huggingface.co/docs/datasets/image_dataset#loading-script) that would check authentication with the Stanford AIMI site before downloading and extracting the data. I've started a HF dataset repo [here](https://huggingface.co/datasets/katielink/CheXpert), in case you want to collaborate on writing up this loading script! I'm also happy to take a stab when I have some more time next week.
Add CheXpert dataset for vision
### Feature request ### Name **CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison** ### Paper https://arxiv.org/abs/1901.07031 ### Data https://stanfordaimi.azurewebsites.net/datasets/8cbd9ed4-2eb9-4565-affc-111cf4f7ebe2 ### Motivation CheXpert is one of the fundamental models in medical image classification and can serve as a viable pre-training dataset for radiology classification or low-scale ablation / exploratory studies. This could also serve as a good pre-training dataset for Kaggle competitions. ### Your contribution Would love to make a PR and pre-process / get this into 🤗
126
Add CheXpert dataset for vision ### Feature request ### Name **CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison** ### Paper https://arxiv.org/abs/1901.07031 ### Data https://stanfordaimi.azurewebsites.net/datasets/8cbd9ed4-2eb9-4565-affc-111cf4f7ebe2 ### Motivation CheXpert is one of the fundamental models in medical image classification and can serve as a viable pre-training dataset for radiology classification or low-scale ablation / exploratory studies. This could also serve as a good pre-training dataset for Kaggle competitions. ### Your contribution Would love to make a PR and pre-process / get this into 🤗 Hey @SauravMaheshkar ! Just responded to your email. _For transparency, copying part of my response here:_ I agree, it would be really great to have this and other BenchMD datasets easily accessible on the hub. I think the main limiting factor is that the ChexPert dataset is currently hosted on the Stanford AIMI Shared Datasets website, with a license that does not permit redistribution IIRC. Thus, I believe we would need to create a [dataset loading script](https://huggingface.co/docs/datasets/image_dataset#loading-script) that would check authentication with the Stanford AIMI site before downloading and extracting the data. I've started a HF dataset repo [here](https://huggingface.co/datasets/katielink/CheXpert), in case you want to collaborate on writing up this loading script! I'm also happy to take a stab when I have some more time next week.
[ -0.29031553864479065, -0.3038102984428406, -0.09949086606502533, -0.07802556455135345, -0.11682909727096558, 0.011799231171607971, 0.2542484998703003, 0.46563032269477844, 0.16077250242233276, 0.38705974817276, -0.0760834664106369, 0.09143735468387604, -0.2539331912994385, 0.44283682107925415, 0.19529476761817932, -0.21124497056007385, -0.17873141169548035, 0.07030615955591202, 0.2721337378025055, -0.1856706142425537, 0.11618557572364807, -0.4249350130558014, 0.06371806561946869, -0.2816554605960846, -0.0741458609700203, -0.13569706678390503, 0.15565061569213867, 0.0030272267758846283, -0.2573581039905548, -0.40649649500846863, -0.06452975422143936, 0.2588846683502197, 0.10655836760997772, 0.1080394834280014, -0.00011428436118876562, -0.06541594862937927, -0.15954133868217468, -0.015772458165884018, -0.15050162374973297, -0.042265355587005615, -0.0924919992685318, -0.04426264017820358, -0.16139066219329834, -0.1562378853559494, -0.6080235242843628, -0.03259459137916565, 0.03794514387845993, -0.29069310426712036, 0.10977928340435028, 0.36791419982910156, 0.14458557963371277, 0.45225223898887634, -0.23465847969055176, -0.11413725465536118, 0.309800922870636, -0.019168656319379807, -0.3419283330440521, -0.06662719696760178, 0.3656388521194458, 0.5113807320594788, -0.23903320729732513, 0.5480043888092041, 0.14556580781936646, -0.0010965857654809952, 0.4655334949493408, -0.25239646434783936, 0.11088089644908905, -0.4332695007324219, -0.12127845734357834, 0.5324339270591736, 0.1551237553358078, -0.216119185090065, -0.20484550297260284, -0.21515989303588867, -0.040692105889320374, -0.23970696330070496, -0.2269742488861084, 0.1891203671693802, 0.002600274980068207, 0.026176614686846733, -0.23373429477214813, -0.2600632309913635, -0.3821101784706116, -0.05443070828914642, 0.1395128071308136, 0.09704148769378662, 0.10516359657049179, 0.06256651878356934, 0.31925567984580994, 0.09246104210615158, 0.3162887990474701, -0.12615154683589935, -0.23039895296096802, -0.19071556627750397, -0.6122133135795593, -0.26585936546325684, 0.04298677295446396, 0.5675180554389954, 0.09501305222511292, 0.3346436321735382, 0.32838714122772217, 0.19907453656196594, -0.08116095513105392, 0.07092152535915375, 0.05430315434932709, 0.26559245586395264, -0.19213438034057617, 0.38613858819007874, -0.0681997537612915, 0.09132184833288193, 0.11731357127428055, 0.2334757298231125, -0.043230630457401276, 0.07807917892932892, -0.002341456711292267, -0.0355241484940052, -0.4138561487197876, -0.23931193351745605, -0.26440364122390747, 0.08459950983524323, 0.4436799883842468, 0.13242068886756897, 0.01725267618894577, 0.2671627402305603, -0.01029878854751587, 0.09918950498104095, 0.24761122465133667, 0.08631005883216858, -0.031943220645189285, -0.6375212669372559, -0.04658513143658638, 0.25132665038108826, -0.10399168729782104, 0.060084909200668335, 0.22669702768325806, -0.04654791206121445, -0.11587473005056381, -0.4575951397418976, 0.6045342683792114, 0.1448289155960083, 0.01732552796602249, 0.031875547021627426, 0.6043180227279663, 0.1289430856704712, 0.038013771176338196, -0.473641961812973, -0.04815679043531418, -0.05271461606025696, -0.1314050853252411, 0.003997373394668102, 0.07507053017616272, 0.001781068742275238, -0.2670425474643707, 0.08143222332000732, -0.4806600511074066, -0.011799364350736141, -0.13613805174827576, 0.3508419990539551, -0.2844160497188568, -0.17356041073799133, 0.24845445156097412, -0.09930704534053802, -0.3966141939163208, -0.13748101890087128, 0.11834664642810822, 0.12901869416236877, -0.31567710638046265, 0.02951768785715103, -0.19976435601711273, 0.3212728798389435, -0.5924978852272034, -0.09503714740276337, 0.07102848589420319, 0.17837399244308472, -0.06816983968019485, -0.2957746982574463, 0.30835357308387756, -0.8103615641593933, -0.4573262333869934, -0.07570306956768036, -0.22793792188167572, -0.02167518436908722, 0.05200973525643349, 0.4222949147224426, 0.5290073752403259, -0.19628001749515533, -0.18647852540016174, 0.1123531311750412, -0.32575488090515137, -0.11674085259437561, -0.07802889496088028, -0.3143545091152191, -0.48255032300949097, 0.5463883280754089, 0.23260411620140076, -0.24604454636573792, 0.2289874255657196, -0.3633840084075928, 0.09016415476799011, -0.08278439939022064, 0.2753749191761017, -0.12953497469425201, -0.028628170490264893, -0.20107603073120117, 0.004721030592918396, -0.29977574944496155, -0.19298416376113892, 0.17228402197360992, 0.031381964683532715, 0.3500387668609619, 0.10745865851640701, -0.06074216961860657, 0.05417463928461075, -0.21902915835380554, -0.22085785865783691, 0.06911516189575195, 0.05312364548444748, -0.1690286099910736, 0.18381309509277344, 0.2325100600719452, -0.07435144484043121, -0.1320827454328537, 0.0400797501206398, -0.08395343273878098, -0.09993581473827362, 0.1920849084854126, 0.12389517575502396, 0.12843185663223267, -0.1268223226070404, 0.3080085515975952, -0.27328813076019287, 0.03076983615756035, -0.1136656403541565, 0.20880863070487976, -0.2964531481266022, 0.15623563528060913, 0.17964336276054382, 0.6245517730712891, 0.18537446856498718, -0.7778623104095459, 0.26561203598976135, -0.033201150596141815, -0.18868061900138855, 0.03377183526754379, -0.13603131473064423, 0.41032567620277405, 0.1746356338262558, -0.025379188358783722, -0.16167569160461426, 0.1628667712211609, -0.13213738799095154, -0.09313003718852997, -0.24031507968902588, -0.08670453727245331, 0.17246270179748535, -0.17932724952697754, -0.012037649750709534, -0.3301316797733307, -0.22225433588027954, 0.31608498096466064, -0.02039513550698757, -0.03152769058942795, 0.09751151502132416, 0.04794538393616676, -0.2476758360862732, 0.18810388445854187, 0.4170357286930084, 0.2579013705253601, 0.12346367537975311, 0.26373547315597534, -0.28670769929885864, 0.09288962185382843, 0.04930836334824562, 0.1211433932185173, 0.027259185910224915, 0.09352784603834152, 0.12481874972581863, 0.15804940462112427, 0.05970745533704758, 0.08648663759231567, -0.1926124095916748, -0.1730487048625946, -0.08825067430734634, -0.10146133601665497, -0.1433122158050537, -0.048845112323760986, 0.26828527450561523, -0.34077340364456177, 0.1749689131975174, 0.37482374906539917, 0.2752039134502411, -0.04631767421960831, 0.3200419545173645, 0.1952643096446991, -0.011261165142059326, -0.06835854053497314, -0.7066954374313354, 0.811387300491333, 0.011660769581794739, -0.23771056532859802, 0.01404251903295517, -0.180569589138031, 0.09390793740749359, 0.14720681309700012, 0.07151836156845093, -0.06362498551607132, 0.5840561389923096, -0.08762292563915253, 0.5188260078430176, -0.31757256388664246, -0.448553204536438, 0.1406339704990387, -0.2350139021873474, 0.24896878004074097, 0.0036521144211292267, 0.06521706283092499, -0.253694087266922, 0.15627968311309814, 0.06756038963794708, -0.34373292326927185, -0.029966548085212708, -0.10688738524913788, -0.057344257831573486, -0.20714813470840454, -0.0014781802892684937, -0.11536674201488495, -0.22192788124084473, -0.29541149735450745, -0.006517808884382248, 0.038900479674339294, 0.1116555854678154, 0.11245875060558319, 0.10832563787698746, -0.30825722217559814, -0.09785814583301544, -0.12768882513046265, -0.0941438227891922, -0.5513021945953369, 0.14030969142913818, -0.32460540533065796, -0.4353492558002472, -0.05346936360001564, -0.17959249019622803, 0.27270662784576416, -0.12681056559085846, -0.4981842637062073, 0.18962201476097107, 0.0475885272026062, 0.15710003674030304, 0.07240453362464905, -0.3319022059440613, 0.21020400524139404, 0.0558793880045414, 0.05713125318288803, -0.3083137273788452, -0.1831577569246292, 0.20171551406383514, 0.12169124186038971, 0.19154103100299835, 0.17599189281463623, -0.0923229455947876, 0.36512231826782227, 0.23565888404846191, 0.035858966410160065, -0.29794082045555115, 0.21506839990615845, 0.07202816754579544, 0.29197996854782104, 0.0411352664232254, -0.28992924094200134, 0.2745286822319031, -0.012560330331325531, 0.00202004611492157, 0.19303615391254425, 0.10109245777130127, 0.15771055221557617, -0.3429628014564514, 0.14518003165721893, -0.04603021591901779, -0.26347488164901733, -0.05383622273802757, -0.4540385603904724, -0.02886471152305603, -0.0670158714056015, -0.12294108420610428, -0.29990720748901367, -0.3060337007045746, 0.12274309992790222, 0.2767147421836853, 0.19452524185180664, -0.13281670212745667, -0.4597018361091614, 0.06610266864299774, -0.1710444688796997, 0.20405705273151398, 0.1928604543209076, -0.16056929528713226, -0.25540027022361755, 0.021326132118701935, 0.029188087210059166, 0.21854272484779358, -0.007720287889242172, -0.6880422234535217, 0.24655328691005707, -0.11844095587730408, 0.0061727240681648254, -0.3239293098449707, 0.023236490786075592, -0.0019426345825195312, -0.38857501745224, -0.21646656095981598, 0.14236265420913696, -0.10444312542676926, 0.07536771893501282, 0.3443846106529236, -0.1201077550649643, -0.3204392194747925, -0.13647545874118805, 0.16231225430965424, -0.0337495394051075, -0.035109370946884155, -0.07926328480243683, 0.09787500649690628, 0.03212865814566612, -0.09501545131206512, 0.10833802819252014, 0.15716540813446045, 0.18577513098716736, 0.24856512248516083, -0.03483216464519501, 0.0960245430469513, -0.05607994273304939, 0.1730111539363861, 0.5254865884780884, 0.106172576546669, 0.04318387061357498, 0.5108461976051331, -0.06186218932271004, -0.07476980984210968, 0.06527058780193329, 0.10462216287851334, -0.06146976351737976, 0.4478296935558319, 0.23585405945777893, -0.015729904174804688, 0.04630463197827339, 0.30701008439064026, -0.4210807681083679, 0.3123423457145691, 0.06489796191453934, -0.010241109877824783, -0.45594340562820435, -0.1098930761218071, 0.30840161442756653, 0.03709279000759125, -0.08398354053497314, 0.2640917897224426, 0.3746625781059265, -0.19956481456756592, 0.15955111384391785, 0.312717080116272, 1.1415278911590576, -0.2410971224308014, 0.3263837397098541, -0.029701361432671547, 0.12524105608463287, 0.1915847361087799, -0.08633571118116379, 0.16175585985183716, -0.3858991265296936, -0.626751184463501, -0.11817876994609833, -0.13407501578330994, -0.11118409037590027, -0.25135770440101624, -0.0826234295964241, -0.14596524834632874, 0.22031857073307037, 0.4071511924266815, 0.09386236220598221, 0.3734748363494873, 0.01842823065817356, -0.12637749314308167, 0.3498768210411072, 0.13951855897903442, -0.05277395620942116, 0.09923204779624939, 0.05756130814552307, -0.24634869396686554, -0.34022971987724304, 0.07224134355783463, -0.20504838228225708, 0.06756218522787094, -0.08397337794303894, -0.07907667756080627, -0.537519633769989, -0.05787806957960129, 0.3211049735546112, 0.12826356291770935, 0.1753772795200348, 0.0542580671608448, -0.4408588707447052, 0.3677331805229187, 0.14990444481372833, -0.08794008195400238, 0.22765888273715973, -0.08604864776134491, 0.19119225442409515, -0.14741545915603638, -0.41079357266426086, 0.410021036863327, 0.20487257838249207, -0.3767501711845398, -0.5283151865005493, -0.08828695118427277, 0.2295304387807846, -0.057121485471725464, 0.13621671497821808, -0.10726280510425568, -0.20217987895011902, -0.05437441170215607, 0.1039418950676918, 0.005402436479926109, 0.06281696259975433, 0.44417867064476013, 0.3973108232021332, -0.22920717298984528, 0.0960652232170105, 0.2647835314273834, 0.06429640203714371, 0.0035232529044151306, -0.01420547254383564, 0.06760179996490479, -0.03653319552540779, -0.24079591035842896, 0.0007419735193252563, 0.380216121673584, -0.46830448508262634, -0.04086146131157875, -0.2362033575773239, -0.18544912338256836, 0.06289014965295792, 0.6079217195510864, 0.48292937874794006, -0.1251761019229889, -0.040638066828250885, 0.07441139221191406, -0.12610775232315063, 0.2594325542449951, -0.3574313223361969, 0.5657004117965698, -0.09675565361976624, 0.02244262769818306, -0.18890847265720367, 0.2173393815755844, -0.34147536754608154, 0.04793024808168411, 0.1732357144355774, -0.048097848892211914, -0.023829787969589233, 0.13848654925823212, 0.26283955574035645, -0.06254668533802032, -0.04391709715127945, 0.018213998526334763, -0.4094696044921875, -0.10751017183065414, 0.08626507222652435, 0.1434110552072525, 0.1110370010137558, -0.2253870666027069, -0.19470442831516266, -0.3178921341896057, -0.1068202555179596, 0.029408004134893417, 0.1158386617898941, -0.04462898522615433, -0.09140011668205261, -0.19122998416423798, -0.2179165482521057, -0.11322169750928879, 0.37012365460395813, 0.41639798879623413, 0.24379821121692657, 0.22019316256046295, 0.06763191521167755, 0.05675739049911499, 0.10242224484682083, -0.15542961657047272, 0.06210499256849289, 0.4424245059490204, 0.34057408571243286, 0.05338932201266289, 0.389204740524292, 0.027591586112976074, 0.21165332198143005, 0.08491641283035278, 0.4091953635215759, -0.2667163908481598, -0.3804081976413727, 0.020636700093746185, -0.15512457489967346, 0.17383858561515808, -0.26853856444358826, -0.053019605576992035, 0.06025009602308273, 0.1675034761428833, 0.27679482102394104, 0.3022472560405731, 0.5067183971405029, 0.10209797322750092, -0.033881016075611115, 0.10600817203521729, 0.28390341997146606, 0.05355812609195709, 0.28196924924850464, 0.45463067293167114, 0.058670178055763245, -0.11906430125236511, 0.22451213002204895, 0.15597590804100037, 0.041095931082963943, 0.17269793152809143, -0.07997506856918335, 0.6242808103561401, 0.16744405031204224, -0.16567252576351166, 0.39839470386505127, 0.008992783725261688, 0.4159206449985504, -0.1764965057373047, -0.047648925334215164, 0.041964560747146606, -0.007069658488035202, 0.09176858514547348, 0.08570200204849243, -0.39180445671081543, -0.303083598613739, 0.07952500134706497, 0.12479948997497559, 0.2855748236179352, -0.16997498273849487, -0.32447075843811035, 0.04867097735404968, -0.15438520908355713, 0.17016533017158508, -0.2161453366279602, 0.33575135469436646, 0.11153364926576614, -0.09183260798454285, 0.26800620555877686, -0.24140280485153198, 0.31506991386413574, 0.2868000864982605, 0.024474769830703735, 0.12961283326148987, 0.3944685459136963, -0.010165046900510788, 0.43390923738479614, 0.09698423743247986, 0.08877687901258469, -0.04518047720193863, -0.1215980052947998, 0.2296379953622818, -0.007669221609830856, -0.10506144911050797, 0.11587407439947128, 0.06656336039304733, 0.07026445865631104, -0.43233534693717957, 0.4354766011238098, 0.15187005698680878, -0.08770328760147095, 0.17090417444705963, -0.12842804193496704, 0.24467293918132782, -0.16420379281044006, -0.010112818330526352, 0.18151763081550598, 0.12763237953186035, -0.2594655156135559, -0.08614552021026611, -0.2908254563808441, -0.019028794020414352, 0.1557040810585022, -0.3201931416988373, -0.019177477806806564, -0.2734359800815582, 0.06504461914300919, -0.07867032289505005, 0.29655230045318604, 0.39281290769577026, -0.07147414982318878, -0.2386501282453537, -0.21134990453720093, -0.09275820851325989, 0.24409863352775574, -0.10643871128559113, -0.3042297661304474, 0.09182310104370117, 0.09361998736858368, 0.06407950073480606, -0.0056335460394620895, 0.4630744755268097, -0.2474401295185089, 0.3451453149318695, 0.302524209022522, -0.30331507325172424, 0.13137492537498474, 0.20885410904884338, 0.35129961371421814, 0.028611503541469574, -0.20256656408309937, 0.07446372509002686, 0.37527528405189514, 0.06759084016084671, -0.10563117265701294, 0.09613648056983948, 0.04047507792711258, -0.5531306862831116, 0.5159743428230286, -0.33025264739990234, 0.5411310195922852, 0.016601823270320892, -0.26393574476242065, -0.029245685786008835, 0.19673553109169006, -0.37008222937583923, -0.12314100563526154, 0.3950329124927521, 0.5098406076431274, -0.11219298839569092, -0.09010268747806549, 0.029002677649259567, -0.005713623017072678, -0.04710342735052109, -0.06757838279008865, -0.30708998441696167, 0.1387222409248352, -0.23135259747505188, 0.2765352129936218, 0.0823361724615097, -0.009662659838795662, -0.04530928656458855, 0.23320966958999634, -0.004687473177909851, -0.41973385214805603, 0.7181750535964966, 0.03999634087085724, 0.09880001842975616, 0.011108212172985077, 0.11892867088317871, 0.0641394555568695, -0.10462065786123276, -0.4936332106590271, 0.01229141652584076, 0.044691018760204315, 0.15041275322437286, 0.25067591667175293, 0.36869311332702637, -0.24746613204479218, 0.1016179546713829, -0.05195745825767517, 0.15803927183151245, -0.12527179718017578, -0.019711311906576157, -0.23169350624084473, -0.16610100865364075 ]
https://github.com/huggingface/datasets/issues/6382
Hi @katielink , I would also love to be on board and contribute to this loading script/project if it is still being developed. I'm interested because I personally would like to gain access to the CheXpert dataset and am facing some weird issues, so I'd like to sort it out for me, and potentially others. Please keep me updated and guide me on this as well!!!
Add CheXpert dataset for vision
### Feature request ### Name **CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison** ### Paper https://arxiv.org/abs/1901.07031 ### Data https://stanfordaimi.azurewebsites.net/datasets/8cbd9ed4-2eb9-4565-affc-111cf4f7ebe2 ### Motivation CheXpert is one of the fundamental models in medical image classification and can serve as a viable pre-training dataset for radiology classification or low-scale ablation / exploratory studies. This could also serve as a good pre-training dataset for Kaggle competitions. ### Your contribution Would love to make a PR and pre-process / get this into 🤗
66
Add CheXpert dataset for vision ### Feature request ### Name **CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison** ### Paper https://arxiv.org/abs/1901.07031 ### Data https://stanfordaimi.azurewebsites.net/datasets/8cbd9ed4-2eb9-4565-affc-111cf4f7ebe2 ### Motivation CheXpert is one of the fundamental models in medical image classification and can serve as a viable pre-training dataset for radiology classification or low-scale ablation / exploratory studies. This could also serve as a good pre-training dataset for Kaggle competitions. ### Your contribution Would love to make a PR and pre-process / get this into 🤗 Hi @katielink , I would also love to be on board and contribute to this loading script/project if it is still being developed. I'm interested because I personally would like to gain access to the CheXpert dataset and am facing some weird issues, so I'd like to sort it out for me, and potentially others. Please keep me updated and guide me on this as well!!!
[ -0.18617260456085205, -0.33047229051589966, -0.07788653671741486, -0.0753679946064949, -0.021564843133091927, -0.10620618611574173, 0.06507625430822372, 0.41927891969680786, 0.10648054629564285, 0.29680293798446655, 0.09117306023836136, 0.04682594910264015, -0.33251747488975525, 0.5285459756851196, 0.20657186210155487, -0.3213544487953186, -0.1954112946987152, 0.14699217677116394, 0.3085649907588959, -0.1597476601600647, -0.00860641896724701, -0.4108436703681946, 0.03764684498310089, -0.3267654776573181, 0.035998884588479996, -0.07957961410284042, 0.20994682610034943, 0.022425655275583267, -0.32196730375289917, -0.4122706651687622, -0.18140995502471924, 0.1904982328414917, -0.025209330022335052, 0.34231698513031006, -0.00011190339137101546, -0.1825750172138214, -0.14441999793052673, -0.06585095077753067, -0.1988115906715393, -0.00283842533826828, -0.09296564012765884, -0.16132420301437378, -0.10241301357746124, -0.17605330049991608, -0.6087299585342407, -0.19450345635414124, 0.05621418356895447, -0.16336393356323242, 0.14673404395580292, 0.33867594599723816, 0.20264539122581482, 0.2976294755935669, -0.09532184898853302, -0.07345057278871536, 0.38561323285102844, 0.14584481716156006, -0.354240745306015, -0.21003161370754242, 0.36658158898353577, 0.4333595037460327, -0.1778731644153595, 0.667390763759613, 0.1661236584186554, -0.25562727451324463, 0.42123493552207947, -0.24154329299926758, -0.028555959463119507, -0.48987776041030884, -0.08143699169158936, 0.4644309878349304, 0.17558911442756653, -0.1528116762638092, -0.13485541939735413, -0.11367438733577728, -0.07583993673324585, -0.5222005844116211, -0.1541699320077896, 0.12431418895721436, -0.01102808490395546, -0.025311585515737534, -0.27012771368026733, -0.17844122648239136, -0.36389806866645813, -0.0053715575486421585, 0.1365663707256317, -0.04765523597598076, -0.06609499454498291, 0.05691410228610039, 0.4063420295715332, -0.00912229809910059, 0.06622335314750671, -0.046121224761009216, -0.30584678053855896, -0.04440271109342575, -0.7203391790390015, -0.24649515748023987, 0.15908852219581604, 0.7903429269790649, 0.031213417649269104, 0.32242363691329956, 0.2758333683013916, 0.14063778519630432, -0.1694718301296234, 0.0034705791622400284, -0.017849797382950783, 0.31376272439956665, -0.12627722322940826, 0.38643914461135864, -0.17912551760673523, 0.05569807067513466, 0.18164566159248352, 0.16400393843650818, -0.03206240385770798, -0.04979650303721428, 0.1627667099237442, -0.049861982464790344, -0.2754244804382324, -0.34299564361572266, -0.11221390962600708, 0.2349187284708023, 0.4728406071662903, 0.11024242639541626, 0.010575633496046066, 0.34076988697052, -0.03050382435321808, 0.1281999945640564, 0.4074929356575012, 0.02498709410429001, 0.010640762746334076, -0.6097959876060486, -0.02407398447394371, 0.2252856194972992, -0.17049100995063782, -0.03301909193396568, 0.1761830896139145, 0.1061897799372673, -0.1483580619096756, -0.37075743079185486, 0.5374581217765808, 0.09313467890024185, 0.007648639380931854, 0.024986393749713898, 0.4933195114135742, 0.2735552489757538, -0.1242421492934227, -0.3547118306159973, -0.061788979917764664, 0.0036974847316741943, -0.01607310026884079, 0.19607272744178772, 0.05428555980324745, 0.033974289894104004, -0.3463364541530609, 0.14187560975551605, -0.3436543345451355, -0.004629120230674744, 0.011583838611841202, 0.38463956117630005, -0.0020515471696853638, -0.20054949820041656, 0.26766419410705566, -0.28196731209754944, -0.38466423749923706, -0.21239706873893738, 0.1444605588912964, 0.09056928008794785, -0.5154489278793335, 0.1031147688627243, -0.25294336676597595, 0.18254947662353516, -0.42184484004974365, -0.15156112611293793, 0.1467476338148117, 0.08766394108533859, -0.018915627151727676, -0.47531306743621826, 0.38201168179512024, -0.5690070390701294, -0.3444274663925171, 0.016630500555038452, -0.2673625648021698, 0.04907146096229553, 0.031989216804504395, 0.36508625745773315, 0.3100457191467285, -0.2438347041606903, -0.21458923816680908, 0.015636436641216278, -0.4045201539993286, -0.1788228303194046, -0.15591084957122803, -0.15805462002754211, -0.3029053211212158, 0.47426462173461914, 0.12593120336532593, -0.18469682335853577, 0.05859512463212013, -0.5528448820114136, 0.06145069748163223, -0.05640203878283501, 0.23226013779640198, -0.014809450134634972, 0.030765211209654808, -0.1649649739265442, 0.15297776460647583, -0.27339276671409607, -0.25929316878318787, 0.08074144273996353, 0.0537986159324646, 0.17011289298534393, 0.13166660070419312, -0.012717634439468384, -0.05255861580371857, -0.22507120668888092, -0.2478937804698944, 0.12912721931934357, 0.07965809106826782, -0.09266217052936554, -0.010464385151863098, 0.13201116025447845, -0.05601952597498894, -0.2367037683725357, 0.052209556102752686, -0.09883711487054825, -0.051545821130275726, -0.01462528109550476, 0.01806088536977768, 0.05502897873520851, -0.23229874670505524, 0.2569422721862793, -0.18754085898399353, 0.051485516130924225, -0.1103009283542633, 0.21948829293251038, -0.20588426291942596, -0.0012057237327098846, 0.08072303235530853, 0.523978590965271, 0.15048100054264069, -0.6647645235061646, 0.0931098535656929, 0.023692414164543152, -0.09817464649677277, -0.07526393234729767, -0.06017807498574257, 0.2565961480140686, 0.17583177983760834, -0.07498632371425629, -0.1687726080417633, 0.15170946717262268, -0.10483160614967346, -0.14014871418476105, -0.16685494780540466, -0.005451492965221405, 0.3149997293949127, -0.18110817670822144, -0.06540913134813309, -0.23634405434131622, -0.38785770535469055, 0.3169362246990204, -0.05390046536922455, -0.11236948519945145, 0.0322929285466671, 0.12040809541940689, -0.1211680918931961, 0.2846468389034271, 0.17211836576461792, 0.19728684425354004, 0.04811635613441467, 0.2420228272676468, -0.42136478424072266, 0.07698428630828857, 0.03908609226346016, 0.12099909782409668, 0.02479078620672226, 0.07811739295721054, 0.04490332305431366, 0.19290979206562042, 0.03751961886882782, 0.0973905622959137, -0.09195373207330704, -0.19841676950454712, -0.11627937108278275, -0.03162386640906334, -0.20287786424160004, 0.012214921414852142, 0.25129038095474243, -0.29336977005004883, 0.1858198642730713, 0.2878183126449585, 0.30212944746017456, -0.01619146764278412, 0.23111864924430847, 0.016137665137648582, -0.08832459896802902, -0.017780356109142303, -0.6973243355751038, 0.694330096244812, 0.15047714114189148, -0.2831515967845917, 0.09119145572185516, -0.2411450296640396, 0.010371757671236992, 0.1656189262866974, -0.004925034940242767, -0.1849903166294098, 0.6712526082992554, -0.025556467473506927, 0.3350376486778259, -0.14586681127548218, -0.5266413688659668, 0.09473104774951935, -0.3611218333244324, 0.2735695540904999, 0.034995757043361664, 0.16114166378974915, -0.27724751830101013, 0.07049190998077393, 0.10272185504436493, -0.19507968425750732, -0.05879981070756912, -0.06391634047031403, 0.015033349394798279, -0.22889843583106995, -0.22455430030822754, -0.0770331397652626, -0.09882780909538269, -0.2637418806552887, 0.10873498767614365, 0.14293135702610016, 0.19097578525543213, 0.2214796245098114, 0.09825706481933594, -0.3097083866596222, -0.1725967973470688, -0.01750733144581318, -0.11245463788509369, -0.4847089648246765, 0.10809285193681717, -0.19752079248428345, -0.4685359597206116, -0.02365778386592865, -0.10095008462667465, 0.0837700366973877, -0.028469562530517578, -0.41939228773117065, 0.2311580777168274, -0.04046119749546051, 0.026277080178260803, 0.17089596390724182, -0.3565867841243744, 0.26504600048065186, 0.18163886666297913, 0.010959535837173462, -0.3793882131576538, -0.22263048589229584, 0.21381382644176483, 0.014934947714209557, 0.2833477854728699, 0.14774253964424133, -0.023224079981446266, 0.18936938047409058, 0.23715047538280487, -0.11240273714065552, -0.3186883330345154, 0.09201739728450775, 0.015848791226744652, 0.369903028011322, -0.03458355739712715, -0.5097014904022217, 0.30282464623451233, -0.01520228385925293, 0.05553096532821655, 0.16183823347091675, 0.07900123298168182, 0.10448615998029709, -0.3536165952682495, 0.2594977021217346, -0.01934148371219635, -0.16084954142570496, 0.030629770830273628, -0.2930794358253479, 0.010304389521479607, -0.19190716743469238, -0.14683237671852112, -0.245565727353096, -0.2567542791366577, -0.021346483379602432, 0.35344064235687256, 0.21942812204360962, -0.23286022245883942, -0.4965226352214813, 0.055540114641189575, -0.11892955005168915, 0.27546972036361694, 0.18683607876300812, -0.12440256029367447, -0.2886030972003937, -0.02426418662071228, -0.048468947410583496, 0.26171162724494934, -0.01085205003619194, -0.5115588307380676, 0.1366845816373825, 0.03118298202753067, -0.00676853209733963, -0.23315894603729248, 0.056598588824272156, 0.010286226868629456, -0.36652180552482605, -0.16982054710388184, -0.12240617722272873, -0.03212948888540268, 0.09556648135185242, 0.4761257767677307, 0.09349057078361511, -0.3102478086948395, -0.19428034126758575, 0.020811118185520172, -0.03870231285691261, 0.008801735937595367, -0.08751623332500458, 0.02408277988433838, -0.010085530579090118, -0.11959315836429596, 0.14141696691513062, 0.3282262682914734, 0.1792682707309723, 0.314898818731308, -0.17918626964092255, 0.09779808670282364, -0.09624046832323074, 0.18105441331863403, 0.3962421417236328, 0.15312258899211884, 0.04229159653186798, 0.4133181869983673, -0.15852612257003784, -0.08660417795181274, 0.051768116652965546, 0.16816720366477966, 0.09356691688299179, 0.35821229219436646, 0.16824522614479065, 0.0174874160438776, 0.03958258405327797, 0.41269969940185547, -0.35689491033554077, 0.32270005345344543, 0.2132534682750702, -0.10619300603866577, -0.5786790251731873, -0.19824427366256714, 0.24250759184360504, -0.04203934967517853, -0.11685459315776825, 0.34210968017578125, 0.27158525586128235, -0.17379671335220337, 0.10247814655303955, 0.15296654403209686, 1.2503607273101807, -0.1752510517835617, 0.30155062675476074, 0.06394069641828537, 0.20074978470802307, 0.1478598415851593, -0.010549485683441162, 0.12611137330532074, -0.34895843267440796, -0.7062411904335022, -0.057474344968795776, -0.1268455982208252, 0.016655175015330315, -0.20968060195446014, -0.1814393401145935, -0.11634370684623718, -0.04887323081493378, 0.36030375957489014, 0.17497235536575317, 0.16268117725849152, 0.25418412685394287, -0.10451170057058334, 0.38829633593559265, 0.14656749367713928, -0.10337835550308228, 0.06619776785373688, 0.029971815645694733, -0.27697479724884033, -0.25250244140625, 0.016581669449806213, -0.2123994082212448, 0.10277888923883438, -0.0820513367652893, -0.22951337695121765, -0.5333613157272339, -0.08374549448490143, 0.3346453309059143, 0.16631577908992767, 0.05940202623605728, 0.24959884583950043, -0.35367417335510254, 0.4349983036518097, 0.2736399173736572, -0.028473470360040665, 0.1913653314113617, -0.12804457545280457, 0.13415934145450592, -0.09257124364376068, -0.36463427543640137, 0.3982405960559845, 0.08054310083389282, -0.21564093232154846, -0.5608843564987183, 0.022426381707191467, 0.2588059604167938, -0.16765058040618896, -0.027522461488842964, -0.10851603746414185, -0.09103159606456757, -0.012925252318382263, 0.15702396631240845, 0.06847967207431793, 0.059658825397491455, 0.4172567129135132, 0.3579135239124298, -0.2558023929595947, 0.07270724326372147, 0.18513549864292145, 0.10790294408798218, -0.06965433061122894, 0.15826179087162018, 0.05623815953731537, -0.08319506794214249, -0.2817624509334564, -0.049823224544525146, 0.41788250207901, -0.42659562826156616, -0.08463866263628006, -0.07562006264925003, -0.11576489359140396, 0.07736067473888397, 0.5848758220672607, 0.40363872051239014, -0.0999503806233406, 0.07821670174598694, 0.053464509546756744, -0.16836687922477722, 0.14043238759040833, -0.4355228841304779, 0.5175532698631287, -0.14793208241462708, 0.12732455134391785, -0.06648425757884979, 0.3072209060192108, -0.3886471688747406, -0.04139165207743645, 0.23068371415138245, 0.1009865254163742, 0.3348686099052429, 0.1210080087184906, 0.21069014072418213, -0.03981087729334831, 0.05420559644699097, -0.011530127376317978, -0.3729444444179535, -0.15381045639514923, 0.13492578268051147, 0.1223234012722969, 0.09716100990772247, -0.29680439829826355, -0.13756662607192993, -0.30670106410980225, -0.09570371359586716, 0.07671314477920532, 0.044816941022872925, -0.1589590311050415, -0.06825865060091019, -0.1555897444486618, -0.417381227016449, -0.07436637580394745, 0.4391400218009949, 0.38289371132850647, 0.12290366739034653, 0.22194787859916687, 0.14153075218200684, -0.0964418351650238, 0.11674462258815765, -0.21414729952812195, 0.030980389565229416, 0.425188809633255, 0.2070343792438507, 0.1161300390958786, 0.4415135979652405, 0.0036209197714924812, 0.22414587438106537, -0.019485212862491608, 0.4343317747116089, -0.22069799900054932, -0.404167115688324, 0.03984522074460983, 0.027095574885606766, 0.2296789288520813, -0.276563823223114, 0.1179371178150177, 0.28285545110702515, 0.20405349135398865, 0.208083838224411, 0.25559890270233154, 0.31394365429878235, 0.05831615626811981, 0.08446808159351349, 0.11001532524824142, 0.1236196905374527, -0.004024941474199295, 0.2815400958061218, 0.49323511123657227, 0.014862723648548126, -0.15209293365478516, 0.26467037200927734, 0.1752706915140152, 0.045468591153621674, 0.20388878881931305, -0.04928072169423103, 0.4682682752609253, 0.21333768963813782, -0.09890323877334595, 0.3010707199573517, -0.2678285837173462, 0.5396193861961365, -0.06025652587413788, -0.1472131460905075, 0.07871696352958679, 0.04281880706548691, 0.08573470264673233, 0.08907348662614822, -0.3782336115837097, -0.27208438515663147, 0.2646513283252716, 0.13221336901187897, 0.2905050814151764, -0.14245358109474182, -0.3103243112564087, 0.02501673996448517, -0.25881528854370117, 0.22690725326538086, -0.09180540591478348, 0.3470980226993561, 0.11093903332948685, -0.07504662871360779, 0.17316991090774536, -0.2731681168079376, 0.261508047580719, 0.31477779150009155, 0.028625570237636566, 0.2568420469760895, 0.46980956196784973, -0.005117841064929962, 0.49947550892829895, 0.005313476547598839, 0.05077958106994629, 0.1458004117012024, -0.08396937698125839, 0.21853913366794586, -0.0773661732673645, -0.128801167011261, 0.11324385553598404, 0.19314542412757874, 0.06458745896816254, -0.2863714098930359, 0.4556148648262024, 0.15749835968017578, -0.127169668674469, 0.21003852784633636, -0.03424208611249924, 0.30919355154037476, -0.20675374567508698, -0.11510344594717026, 0.2565842866897583, 0.027143508195877075, -0.3525027632713318, -0.11631672084331512, -0.32322385907173157, -0.0330127589404583, 0.11234019696712494, -0.12325549870729446, 0.02237006276845932, -0.22910967469215393, 0.08351514488458633, 0.0760130062699318, 0.3293469548225403, 0.4328972101211548, -0.07771673798561096, -0.2239050418138504, -0.20545881986618042, -0.07419835031032562, 0.13840782642364502, -0.09859134256839752, -0.33052319288253784, 0.06961041688919067, -0.0032511092722415924, 0.10537344217300415, -0.015286797657608986, 0.5430076718330383, -0.45050954818725586, 0.5054433345794678, 0.19767214357852936, -0.2762727737426758, 0.12862560153007507, 0.2970776855945587, 0.39000028371810913, -0.011374834924936295, -0.23733049631118774, 0.02715499885380268, 0.2920735478401184, 0.17387855052947998, -0.18189242482185364, -0.0030248984694480896, -0.058876510709524155, -0.37798547744750977, 0.48108190298080444, -0.28940561413764954, 0.6553611755371094, -0.0011279508471488953, -0.25356000661849976, 0.04400643706321716, 0.1952231377363205, -0.2686956822872162, -0.040159206837415695, 0.5144098401069641, 0.5290550589561462, -0.11252067238092422, -0.15881435573101044, -0.0618632435798645, 0.1238388866186142, -0.15975546836853027, -0.07194764912128448, -0.25487440824508667, 0.15846270322799683, -0.13088414072990417, 0.20627687871456146, 0.061463698744773865, -0.033420391380786896, -0.047305721789598465, 0.3641372323036194, -0.09594090282917023, -0.47931110858917236, 0.7221223711967468, 0.06750413775444031, 0.042718566954135895, -0.002533465623855591, 0.10453147441148758, -0.023262999951839447, 0.0012416616082191467, -0.43941205739974976, 0.01451312005519867, 0.0829085037112236, 0.18081849813461304, 0.16176024079322815, 0.33361613750457764, -0.42685073614120483, 0.05922067165374756, 0.03900939226150513, 0.4514762759208679, -0.11880648136138916, 0.04408673942089081, -0.1901470571756363, -0.11567607522010803 ]
https://github.com/huggingface/datasets/issues/6376
I did not store it at the time but I'll try to re-do a mwe next week to get it again
Caching problem when deleting a dataset
### Describe the bug Pushing a dataset with n + m features to a repo which was deleted, but contained n features, will fail. ### Steps to reproduce the bug 1. Create a dataset with n features per row 2. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` 3. Go on the hub, delete the repo at `YOUR_PATH` 4. Update your local dataset to have n + m features per row 5. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` will fail because of a mismatch in features number ### Expected behavior Step 5 should work or display a message to indicate the cache has not been cleared ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.31 - Python version: 3.10.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 11.0.0 - Pandas version: 2.0.0
21
Caching problem when deleting a dataset ### Describe the bug Pushing a dataset with n + m features to a repo which was deleted, but contained n features, will fail. ### Steps to reproduce the bug 1. Create a dataset with n features per row 2. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` 3. Go on the hub, delete the repo at `YOUR_PATH` 4. Update your local dataset to have n + m features per row 5. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` will fail because of a mismatch in features number ### Expected behavior Step 5 should work or display a message to indicate the cache has not been cleared ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.31 - Python version: 3.10.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 11.0.0 - Pandas version: 2.0.0 I did not store it at the time but I'll try to re-do a mwe next week to get it again
[ -0.17563989758491516, -0.15957209467887878, -0.042584508657455444, 0.3126749098300934, 0.01576206274330616, -0.0614800751209259, 0.2875654399394989, 0.2968783676624298, 0.19769355654716492, -0.022289790213108063, 0.17500968277454376, 0.17467544972896576, 0.00816064327955246, 0.18102627992630005, -0.06692971289157867, -0.026111014187335968, 0.2873859107494354, -0.08514054119586945, 0.22816182672977448, -0.06398284435272217, -0.21705688536167145, 0.03657185286283493, -0.11420039087533951, -0.14701434969902039, -0.29081571102142334, 0.028036845847964287, -0.10452406108379364, 0.20801964402198792, 0.23451702296733856, -0.325832337141037, 0.34770864248275757, 0.010058924555778503, 0.07182294130325317, 0.5099270939826965, -0.00010960627696476877, -0.11089378595352173, 0.30041390657424927, 0.0983855277299881, -0.4451184868812561, 0.08066965639591217, -0.38685572147369385, -0.2588854730129242, -0.12232322990894318, -0.19083891808986664, 0.179787740111351, 0.2592218220233917, -0.19120937585830688, -0.1145673543214798, 0.20043371617794037, 0.306659460067749, 0.2682652175426483, 0.17217859625816345, 0.2195815145969391, -0.10660700500011444, 0.4844341576099396, 0.1652449071407318, -0.2721606194972992, 0.02041718363761902, 0.3269716501235962, -0.026163404807448387, -0.08132950961589813, 0.2718909978866577, -0.14020435512065887, 0.027346443384885788, 0.16654439270496368, -0.049953460693359375, 0.0552033931016922, -0.004170957952737808, 0.18411996960639954, 0.034254588186740875, 0.3976154625415802, -0.3389517366886139, -0.25439295172691345, -0.2498524785041809, -0.2674943208694458, -0.6040799021720886, 0.33792001008987427, 0.04141920059919357, 0.010917391628026962, 0.13630056381225586, -0.2906572222709656, -0.30058911442756653, -0.03345689922571182, -0.09899668395519257, 0.07975022494792938, -0.03660458326339722, 0.0208086259663105, 0.024120425805449486, -0.19402840733528137, -0.16208353638648987, 0.18880489468574524, -0.11161160469055176, -0.028933247551321983, 0.16899694502353668, -0.4236380457878113, -0.07263639569282532, 0.2311309576034546, -0.02828533574938774, 0.4321133494377136, 0.23986601829528809, -0.15006810426712036, -0.07210968434810638, -0.1576281487941742, 0.050196439027786255, 0.2914009988307953, 0.6563515663146973, -0.07516679167747498, 0.18168951570987701, 0.1155233234167099, 0.08061021566390991, -0.2514553666114807, -0.07050598412752151, 0.10712993144989014, 0.014967627823352814, 0.6002336740493774, 0.24085107445716858, 0.44805335998535156, -0.36685511469841003, -0.39140141010284424, 0.39999863505363464, -0.21375562250614166, -0.09240502119064331, -0.0475333034992218, 0.11881900578737259, -0.0794040709733963, 0.14347341656684875, -0.3439909815788269, 0.120077945291996, -0.394420862197876, 0.0027280934154987335, -0.3670310974121094, -0.028548967093229294, -0.1991787999868393, -0.1460818648338318, 0.19163985550403595, -0.18897056579589844, 0.22925041615962982, 0.03490252047777176, 0.21559123694896698, -0.3506530523300171, -0.1446681022644043, -0.2007090151309967, -0.09251093119382858, 0.15125153958797455, -0.23038895428180695, 0.06734523922204971, 0.11493322998285294, -0.008937232196331024, -0.06501786410808563, 0.11354783177375793, -0.31968265771865845, -0.43607157468795776, -0.08363671600818634, 0.2566264271736145, -0.1663709133863449, -0.048462409526109695, -0.36104869842529297, -0.03411136940121651, 0.10676431655883789, 0.11723657697439194, -0.00730307400226593, 0.1812966763973236, -0.036091431975364685, -0.2754746675491333, 0.031812600791454315, 0.45064496994018555, -0.057433295994997025, -0.05261310935020447, 0.204765185713768, 0.3337065577507019, 0.20203101634979248, 0.29565560817718506, -0.28512927889823914, -0.03552313894033432, -0.32827451825141907, 0.026503145694732666, -0.0061429888010025024, -0.37778210639953613, -0.6695235371589661, 0.0852842926979065, -0.04954393208026886, 0.08444388210773468, -0.2862735688686371, 0.08778160810470581, 0.12782451510429382, -0.2699197232723236, 0.05937645956873894, 0.3026881814002991, -0.18933410942554474, -0.024798724800348282, -0.4091886281967163, -0.4434267282485962, 0.16558124125003815, -0.028368253260850906, 0.38930222392082214, 0.13988514244556427, 0.31553584337234497, 0.12070806324481964, 0.06286075711250305, 0.12635184824466705, 0.20127880573272705, 0.3416445553302765, 0.597939670085907, -0.055235955864191055, 0.0543067492544651, -0.3379392623901367, -0.7195814251899719, 0.42500340938568115, -0.015751242637634277, -0.08796482533216476, 0.004488047212362289, -0.13298140466213226, -0.4447873830795288, -0.03078271821141243, -0.270252525806427, -0.20489807426929474, 0.13375264406204224, -0.20211143791675568, 0.05593561381101608, -0.007328882813453674, -0.2612224221229553, 0.5608723759651184, 0.0384383499622345, 0.09638676047325134, -0.283231258392334, 0.3517111539840698, -0.237872913479805, -0.3813544511795044, -0.08647732436656952, 0.14528438448905945, 0.4541347622871399, -0.13425037264823914, -0.2984265983104706, 0.40031060576438904, -0.024007730185985565, 0.1118648499250412, 0.20737475156784058, 0.05569876730442047, 0.3982176184654236, 0.004250749945640564, 0.1501041203737259, 0.1725354641675949, -0.03627556934952736, -0.02435879409313202, -0.299126535654068, 0.2580142617225647, -0.08037325739860535, -0.09606173634529114, -0.1625811755657196, -0.19558866322040558, 0.2256094515323639, -0.08455399423837662, 0.32893919944763184, -0.1373852640390396, 0.26984691619873047, 0.09381144493818283, -0.18802037835121155, -0.004159886389970779, -0.052790626883506775, 0.17135363817214966, 0.3499406576156616, 0.1268606036901474, 0.12872323393821716, -0.00885273888707161, -0.24596448242664337, -0.3578910231590271, 0.30187535285949707, 0.09918999671936035, 0.3250693678855896, -0.10520274192094803, -0.1574001908302307, -0.022975938394665718, -0.12775731086730957, 0.030004117637872696, -0.042876943945884705, -0.15038730204105377, 0.09759283065795898, 0.14969491958618164, 0.3783770501613617, 0.07281329482793808, -0.17977140843868256, -0.17448675632476807, 0.40639859437942505, 0.49385857582092285, -0.08938921242952347, 0.00659826397895813, -0.25607720017433167, -0.17158731818199158, 0.06929968297481537, -0.2699139714241028, -0.3929201662540436, -0.3710166811943054, 0.0844561755657196, 0.30801835656166077, -0.11445443332195282, 0.20803311467170715, -0.17190232872962952, 0.009015828371047974, 0.09086161106824875, 0.03888944536447525, -0.010740384459495544, -0.06467768549919128, -0.11663593351840973, 0.03578236699104309, 0.043913789093494415, -0.05506990849971771, 0.28385865688323975, -0.05459243431687355, -0.1427907645702362, -0.37941306829452515, 0.01495949923992157, 0.08866163343191147, 0.07354231178760529, 0.12981507182121277, -0.10328947007656097, 0.019959760829806328, 0.05084903538227081, 0.0023502521216869354, 0.40408986806869507, -0.37392470240592957, -0.20381319522857666, 0.062410011887550354, 0.2307678461074829, 0.11195818334817886, -0.0034511834383010864, -0.06655953824520111, 0.1376994401216507, -0.4063551723957062, 0.0019289273768663406, 0.2157018631696701, 0.1516374945640564, 0.2376280426979065, 0.03232303261756897, -0.10515353083610535, 0.2873798906803131, -0.2722267806529999, -0.4325392246246338, -0.35239750146865845, -0.0721159428358078, 0.07807771116495132, -0.08848489820957184, 0.1356695592403412, 0.22028324007987976, -0.09642782062292099, 0.3482690751552582, -0.4038355350494385, -0.3047168552875519, -0.23013274371623993, 0.5569340586662292, -0.013704671524465084, -0.12478841096162796, 0.38223010301589966, -0.2066163718700409, -0.10977783799171448, 0.013232558965682983, -0.26780539751052856, -0.028248276561498642, 0.5272273421287537, 0.2151503562927246, -0.21831348538398743, 0.2368139624595642, 0.006621703505516052, 0.5746920108795166, 0.10427069664001465, 0.006707086227834225, 0.41585999727249146, 0.2261119782924652, 0.23068426549434662, -0.2705564796924591, -0.27057474851608276, 0.16505713760852814, -0.20671114325523376, -0.23857738077640533, 0.09762212634086609, 0.059525541961193085, -0.3004147410392761, 0.0037617161870002747, -0.46659427881240845, 0.06174246966838837, -0.23436102271080017, -0.06349329650402069, -0.2583424746990204, 0.14725252985954285, 0.03814540058374405, 0.01949261873960495, -0.3618553876876831, -0.1168627142906189, 0.1907072812318802, 0.0070228539407253265, 0.20244064927101135, 0.09679995477199554, -0.455363929271698, 0.11873506754636765, -0.5029221177101135, 0.14027070999145508, 0.017691869288682938, 0.3430553078651428, 0.03275202214717865, -0.03483899310231209, -0.12652680277824402, -0.047687653452157974, 0.3790477216243744, -0.17743892967700958, 0.18485885858535767, 0.08147437125444412, -0.05880116671323776, 0.08490296453237534, -0.28926047682762146, 0.037235185503959656, 0.436837375164032, 0.08465652167797089, 0.665852427482605, -0.17118331789970398, -0.13110753893852234, 0.13045953214168549, 0.15283195674419403, -0.06968455016613007, -0.2713373899459839, -0.07039503753185272, -0.007105983793735504, -0.4155576825141907, 0.08418208360671997, 0.32779693603515625, 0.007805224508047104, -0.04856351763010025, -0.03202845901250839, -0.1703396588563919, -0.0029635950922966003, -0.035932570695877075, -0.21259815990924835, 0.29609620571136475, -0.10923317819833755, 0.23002251982688904, -0.11128871142864227, 0.3060791790485382, 0.2900981903076172, 0.3950166702270508, 0.06401227414608002, -0.1964792162179947, -0.1976051926612854, -0.04691404104232788, -0.05117958039045334, 0.19944439828395844, 0.0668105036020279, 0.2092023491859436, -0.1205153614282608, 0.07684564590454102, -0.20403537154197693, -0.21285098791122437, -0.004346353933215141, 0.06067642942070961, -0.18602421879768372, -0.00451510027050972, 0.3268522322177887, -0.04165162518620491, 0.043643608689308167, 0.22394444048404694, 0.01852242462337017, -0.19419562816619873, 0.29296329617500305, -0.015365872532129288, 0.9304006695747375, -0.03295015171170235, 0.042448122054338455, -0.17409488558769226, 0.11750226467847824, 0.5067217350006104, -0.17039139568805695, 0.269148588180542, -0.20559300482273102, -0.3376929461956024, 0.03820290416479111, -0.019945211708545685, -0.09470184892416, -0.2055290937423706, -0.2076667994260788, 0.4890318810939789, -0.35553550720214844, 0.7112216353416443, -0.12004905939102173, -0.10751305520534515, -0.03910399228334427, 0.11125050485134125, -0.058780185878276825, 0.22542250156402588, -0.1150878518819809, 0.2668969929218292, -0.26790136098861694, 0.05895618349313736, -0.0643051266670227, 0.18723101913928986, -0.3155434727668762, 0.05498971790075302, 0.09254033863544464, 0.27883076667785645, 0.02953679859638214, -0.4255254864692688, -0.22847296297550201, -0.14956034719944, 0.4388546347618103, 0.012469297274947166, -0.15246519446372986, -0.007444116752594709, 0.18652521073818207, 0.046049173921346664, 0.01785331964492798, -0.07288210093975067, 0.18702156841754913, -0.119503915309906, -0.3124552369117737, 0.052778713405132294, -0.10500611364841461, -0.43621882796287537, -0.23787915706634521, 0.06745781004428864, 0.0519087053835392, -0.2830818295478821, -0.07723464071750641, 0.03350067883729935, -0.10310180485248566, -0.32429367303848267, 0.1639353185892105, 0.35930365324020386, -0.11404535174369812, 0.07611823081970215, -0.05753336846828461, -0.1363600790500641, -0.19145667552947998, 0.06311354786157608, 0.2366270124912262, -0.2130580097436905, 0.24509209394454956, 0.09668923914432526, -0.1605227291584015, -0.12106655538082123, -0.36073628067970276, 0.040692079812288284, -0.6202523708343506, 0.16422104835510254, -0.5601282715797424, -0.13007301092147827, 0.09108805656433105, 0.15787528455257416, 0.0478455126285553, 0.10213902592658997, 0.04893063008785248, -0.27836140990257263, -0.37258145213127136, -0.12142519652843475, -0.06956230849027634, 0.18345406651496887, -0.16643032431602478, -0.19781042635440826, -0.02648191526532173, 0.18105144798755646, -0.3480473756790161, 0.11048784106969833, -0.40330761671066284, 0.24558372795581818, -0.25327977538108826, -0.19388270378112793, -0.07265377044677734, -0.20240561664104462, 0.06536869704723358, 0.0812152847647667, -0.0015402287244796753, -0.2022385448217392, -0.056785691529512405, 0.09328613430261612, 0.04045857861638069, -0.1477750837802887, -0.29657816886901855, -0.24093258380889893, 0.19979998469352722, -0.18770460784435272, 0.36817559599876404, 0.4787921905517578, 0.13187700510025024, 0.11920364946126938, 0.6195168495178223, -0.02054818719625473, -0.028420712798833847, 0.30600666999816895, 0.19665773212909698, 0.13871026039123535, -0.16452182829380035, 0.1178009957075119, -0.006289567798376083, -0.03722137212753296, -0.18937945365905762, 0.034698735922575, -0.1387351006269455, 0.3719511032104492, 0.23806226253509521, -0.4186009168624878, -0.09286282956600189, 0.2931177020072937, 0.19649377465248108, 0.044981949031353, -0.017367206513881683, -0.20849595963954926, 0.37974104285240173, 0.3624345362186432, -0.26781129837036133, -0.3474515974521637, 0.6602834463119507, 0.0958656370639801, 0.014201954007148743, 0.0801868811249733, 0.30921807885169983, -0.027835898101329803, 0.08178508281707764, 0.3088729977607727, 0.5972247123718262, -0.16245634853839874, -0.020553292706608772, 0.16060198843479156, 0.15412156283855438, 0.04068423807621002, 0.21551084518432617, 0.13159450888633728, 0.13020643591880798, 0.46188363432884216, 0.228643998503685, 0.07205755263566971, 0.6366701722145081, 0.1897537112236023, 0.06371380388736725, -0.17573469877243042, -0.16647650301456451, 0.23017460107803345, -0.19794775545597076, 0.15779751539230347, 0.011707404628396034, 0.1059989258646965, -0.05792184919118881, -0.03828291967511177, -0.145552396774292, 0.08584193885326385, -0.45418238639831543, 0.094678595662117, 0.11393577605485916, -0.116572804749012, 0.08741526305675507, 0.03549656271934509, -0.3009365499019623, 0.02050764672458172, 0.30576851963996887, -0.028445232659578323, -0.13864950835704803, -0.0850365161895752, 0.28611844778060913, 0.27613282203674316, 0.29826977849006653, -0.16933408379554749, 0.12315740436315536, 0.08801336586475372, -0.32894542813301086, -0.12693655490875244, 0.19921334087848663, 0.24361461400985718, 0.05563320964574814, -0.18970677256584167, 0.19013899564743042, 0.3602037727832794, 0.10506127774715424, -0.05825316160917282, 0.06257840245962143, -0.05954396352171898, 0.0018640914931893349, -0.14976705610752106, 0.08409923315048218, -0.15780127048492432, 0.22132077813148499, -0.072707399725914, 0.009869575500488281, -0.2955017685890198, 0.23262372612953186, -0.2263750284910202, -0.3460475206375122, -0.14911521971225739, 0.256445974111557, 0.008220262825489044, 0.04373360797762871, 0.460936576128006, -0.013876385986804962, 0.3187425434589386, 0.1313827782869339, 0.14513134956359863, -0.4483819901943207, 0.24346113204956055, 0.6664613485336304, -0.13628286123275757, -0.24560609459877014, -0.030520707368850708, -0.34918463230133057, 0.6014732122421265, -0.38856279850006104, 0.057895317673683167, 0.39767757058143616, 0.28978097438812256, -0.2374546080827713, -0.06566585600376129, 0.06714486330747604, 0.19655191898345947, 0.058193404227495193, 0.17226222157478333, -0.5798109769821167, -0.12870141863822937, -0.02699318155646324, -0.19410665333271027, 0.19273114204406738, -0.3601106107234955, 0.3216829299926758, 0.18371261656284332, 0.15082141757011414, -0.14855115115642548, -0.09524672478437424, 0.23330414295196533, 0.07993331551551819, 0.1836370825767517, 0.03922576457262039, -0.14645352959632874, 0.32867127656936646, -0.25520843267440796, -0.28483396768569946, -0.04080824553966522, -0.07744622230529785, -0.31600263714790344, -0.07573634386062622, 0.15444935858249664, -0.15816476941108704, 0.2123551368713379, -0.1715673953294754, 0.47496673464775085, 0.15066900849342346, -0.13529588282108307, -0.10411617159843445, -0.09472876787185669, -0.12217915803194046, -0.1340537816286087, 0.1945362091064453, 0.33444032073020935, -0.050909485667943954, 0.20980507135391235, -0.2822069525718689, -0.19431805610656738, 0.35331058502197266, -0.10386848449707031, -0.3994903564453125, -0.26030659675598145, 0.19085420668125153, 0.3588007688522339, -0.3035007119178772, -0.28535348176956177, 0.09210927784442902, 0.25035524368286133, 0.12147967517375946, -0.33662039041519165, 0.058399222791194916, -0.19068793952465057, 0.10306054353713989, 0.24271750450134277, 0.239501953125, 0.12051047384738922, 0.03020661324262619, 0.2763710021972656, 0.08966459333896637 ]
https://github.com/huggingface/datasets/issues/6376
I haven't managed to reproduce this issue using a [notebook](https://colab.research.google.com/drive/1m6eduYun7pFTkigrCJAFgw0BghlbvXIL?usp=sharing) that follows the steps to reproduce the bug. So, I'm closing it. But feel free to re-open it if you have a better reproducer.
Caching problem when deleting a dataset
### Describe the bug Pushing a dataset with n + m features to a repo which was deleted, but contained n features, will fail. ### Steps to reproduce the bug 1. Create a dataset with n features per row 2. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` 3. Go on the hub, delete the repo at `YOUR_PATH` 4. Update your local dataset to have n + m features per row 5. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` will fail because of a mismatch in features number ### Expected behavior Step 5 should work or display a message to indicate the cache has not been cleared ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.31 - Python version: 3.10.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 11.0.0 - Pandas version: 2.0.0
34
Caching problem when deleting a dataset ### Describe the bug Pushing a dataset with n + m features to a repo which was deleted, but contained n features, will fail. ### Steps to reproduce the bug 1. Create a dataset with n features per row 2. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` 3. Go on the hub, delete the repo at `YOUR_PATH` 4. Update your local dataset to have n + m features per row 5. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` will fail because of a mismatch in features number ### Expected behavior Step 5 should work or display a message to indicate the cache has not been cleared ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.31 - Python version: 3.10.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 11.0.0 - Pandas version: 2.0.0 I haven't managed to reproduce this issue using a [notebook](https://colab.research.google.com/drive/1m6eduYun7pFTkigrCJAFgw0BghlbvXIL?usp=sharing) that follows the steps to reproduce the bug. So, I'm closing it. But feel free to re-open it if you have a better reproducer.
[ -0.09146799147129059, -0.13599282503128052, -0.007731638848781586, 0.3452052175998688, -0.07417566329240799, -0.020083405077457428, 0.3198857009410858, 0.2709159255027771, 0.19415250420570374, -0.043790534138679504, 0.20972475409507751, 0.16039246320724487, -0.02975871041417122, 0.13909795880317688, -0.10164612531661987, -0.0017165686003863811, 0.3310403823852539, -0.09687232971191406, 0.25208085775375366, -0.06031856685876846, -0.2585832476615906, 0.06188095360994339, -0.16355545818805695, -0.1610845923423767, -0.2623394727706909, 0.06837467849254608, -0.06606461852788925, 0.2350551187992096, 0.27444425225257874, -0.3257119059562683, 0.34665727615356445, -0.006621542852371931, 0.00798805058002472, 0.5829520225524902, -0.0001123216497944668, -0.15662571787834167, 0.3057812452316284, 0.1005081981420517, -0.45298513770103455, 0.09280596673488617, -0.35029202699661255, -0.2505686283111572, -0.1139795184135437, -0.17071115970611572, 0.22563320398330688, 0.2808960974216461, -0.18829119205474854, -0.11770551651716232, 0.2391694337129593, 0.2736729085445404, 0.24010120332241058, 0.125278502702713, 0.19752484560012817, -0.09705501794815063, 0.43533557653427124, 0.145174041390419, -0.2553600072860718, 0.02374878153204918, 0.3342912197113037, -0.008763846009969711, -0.08589613437652588, 0.3008917570114136, -0.15603888034820557, 0.003494294360280037, 0.22999624907970428, -0.1135011538863182, -0.0021776799112558365, -0.015063824132084846, 0.21183981001377106, 0.029667504131793976, 0.40569785237312317, -0.38940274715423584, -0.21945583820343018, -0.2647164463996887, -0.2176116704940796, -0.5482577085494995, 0.35471463203430176, 0.037724196910858154, -0.012385331094264984, 0.17039144039154053, -0.2894953489303589, -0.3099997639656067, -0.049455851316452026, -0.11366476118564606, 0.10622349381446838, -0.11921441555023193, 0.003938015550374985, 0.06561703234910965, -0.20771972835063934, -0.14945101737976074, 0.22773343324661255, -0.159275084733963, -0.002733284840360284, 0.1624976545572281, -0.48256751894950867, -0.055208347737789154, 0.1916598528623581, -0.05090957134962082, 0.45787978172302246, 0.1774473786354065, -0.07675278186798096, -0.11086244136095047, -0.1593300849199295, 0.08367082476615906, 0.34447091817855835, 0.6761155724525452, -0.10324636101722717, 0.16262948513031006, 0.09969928860664368, 0.09865216910839081, -0.23684939742088318, -0.019450897350907326, 0.10523510724306107, -0.04632583633065224, 0.6299508810043335, 0.1955990046262741, 0.3879453241825104, -0.3887096047401428, -0.4388747215270996, 0.4756850302219391, -0.26821500062942505, -0.05990806221961975, -0.05923442915081978, 0.06313498318195343, -0.11206914484500885, 0.14743486046791077, -0.2899874746799469, 0.1338527798652649, -0.43342968821525574, -0.05174857750535011, -0.3322656750679016, -0.025708746165037155, -0.25947609543800354, -0.12829315662384033, 0.17067018151283264, -0.15634721517562866, 0.1449892371892929, 0.13041293621063232, 0.1876007616519928, -0.35543447732925415, -0.1475367695093155, -0.15687914192676544, -0.06256025284528732, 0.1544221192598343, -0.2236166149377823, 0.07494506239891052, 0.11722751706838608, -0.0036052465438842773, -0.06450578570365906, 0.12543481588363647, -0.2707636058330536, -0.3894786238670349, -0.1293293684720993, 0.20735418796539307, -0.25983110070228577, -0.028509804978966713, -0.3495602309703827, -0.04308271035552025, 0.10797901451587677, 0.05694553256034851, -0.015128269791603088, 0.17252013087272644, -0.05005902051925659, -0.2980913519859314, -0.021261829882860184, 0.49776914715766907, -0.04189927130937576, -0.012237131595611572, 0.23844677209854126, 0.4105457365512848, 0.23515266180038452, 0.2639445662498474, -0.24424195289611816, -0.11161346733570099, -0.3302082419395447, 0.053916916251182556, -0.09005904197692871, -0.3037060797214508, -0.6939462423324585, 0.1217815950512886, -0.05228038877248764, 0.16500040888786316, -0.30767783522605896, 0.09519881755113602, 0.08311121165752411, -0.32268649339675903, 0.07251575589179993, 0.2767495810985565, -0.17489102482795715, -0.07237613201141357, -0.44911330938339233, -0.45424410700798035, 0.14108361303806305, -0.022904884070158005, 0.3363889157772064, 0.1516689658164978, 0.3079184591770172, 0.10210578143596649, 0.04484889656305313, 0.14865657687187195, 0.17549926042556763, 0.3544158637523651, 0.5998215079307556, -0.052350424230098724, 0.0481058806180954, -0.2811468839645386, -0.6829699277877808, 0.4471299946308136, 0.028546221554279327, -0.1419053077697754, -0.020748797804117203, -0.12051909416913986, -0.4270970821380615, -0.011546973139047623, -0.2746760845184326, -0.22957688570022583, 0.07500723004341125, -0.22682714462280273, 0.017384298145771027, 0.042240969836711884, -0.2503195106983185, 0.6059038043022156, -0.007236778736114502, 0.036346886307001114, -0.34395498037338257, 0.31656914949417114, -0.2102993130683899, -0.3175241947174072, -0.106031134724617, 0.13707345724105835, 0.3923359811306, -0.08244530856609344, -0.30883535742759705, 0.39028099179267883, -0.02706313505768776, 0.08351598680019379, 0.1893720030784607, 0.10353782773017883, 0.3804422914981842, 0.002404913306236267, 0.12080727517604828, 0.21815930306911469, -0.05791887640953064, 0.014742068946361542, -0.3167133629322052, 0.2336805909872055, -0.07583414018154144, -0.10798508673906326, -0.19262920320034027, -0.16140776872634888, 0.2482094168663025, -0.08507367223501205, 0.29843947291374207, -0.11085228621959686, 0.30795612931251526, 0.08950818330049515, -0.15238907933235168, 0.042521871626377106, -0.07452823221683502, 0.17925070226192474, 0.3273039162158966, 0.10841213911771774, 0.1320246309041977, 0.054148316383361816, -0.24981604516506195, -0.37805140018463135, 0.2894625663757324, 0.14581593871116638, 0.33854061365127563, -0.14212819933891296, -0.18310588598251343, 0.016800815239548683, -0.13705849647521973, 0.03825993090867996, -0.05226095765829086, -0.11768094450235367, 0.09414289146661758, 0.18834252655506134, 0.3645532429218292, 0.08289134502410889, -0.13111677765846252, -0.16305944323539734, 0.43344956636428833, 0.43969905376434326, -0.10544047504663467, 0.06072685867547989, -0.21672865748405457, -0.1652000993490219, 0.04203590378165245, -0.22743429243564606, -0.37327873706817627, -0.3479030430316925, 0.09419948607683182, 0.32961490750312805, -0.12443007528781891, 0.18018800020217896, -0.19606344401836395, 0.06736060231924057, 0.05358760803937912, -0.01240984071046114, 0.059492528438568115, -0.022989235818386078, -0.13531984388828278, -0.020737623795866966, 0.08750550448894501, -0.07064667344093323, 0.25642701983451843, -0.11054733395576477, -0.16371840238571167, -0.40006402134895325, -0.012907005846500397, 0.11122702807188034, 0.09650314599275589, 0.1664973497390747, -0.0917247012257576, -0.0013991743326187134, 0.02063939720392227, 0.004349958151578903, 0.3816702961921692, -0.3885136544704437, -0.19908995926380157, 0.12734809517860413, 0.2555185556411743, 0.10308071970939636, 0.007162883877754211, -0.06195295602083206, 0.20786502957344055, -0.42030397057533264, -0.0013205502182245255, 0.10711152106523514, 0.11626091599464417, 0.31594523787498474, 0.03903082013130188, -0.12733162939548492, 0.27933838963508606, -0.2898586392402649, -0.43347418308258057, -0.3344992399215698, -0.09675461053848267, 0.07986882328987122, -0.08006614446640015, 0.1210775151848793, 0.2137013077735901, -0.12467439472675323, 0.3956197500228882, -0.44760602712631226, -0.25969183444976807, -0.18978619575500488, 0.5117456316947937, -0.0695468932390213, -0.1519283652305603, 0.3345481753349304, -0.2213735580444336, -0.07363827526569366, -0.010609172284603119, -0.2867250442504883, -0.006510194391012192, 0.507883608341217, 0.21877893805503845, -0.16076123714447021, 0.24338728189468384, 0.031081728637218475, 0.5920208692550659, 0.18732476234436035, -0.0022612151224166155, 0.3914751410484314, 0.25019019842147827, 0.23597843945026398, -0.24260590970516205, -0.25410276651382446, 0.14538845419883728, -0.2448919713497162, -0.27485543489456177, 0.1678103357553482, 0.04158324375748634, -0.33602434396743774, -0.005775481462478638, -0.5066664218902588, 0.049509502947330475, -0.23946832120418549, -0.033275045454502106, -0.22573025524616241, 0.20598645508289337, 0.06020680069923401, -0.012389585375785828, -0.3586520254611969, -0.15203705430030823, 0.17464841902256012, 0.009874943643808365, 0.242446631193161, 0.1356218010187149, -0.3785759210586548, 0.1231866180896759, -0.4891572892665863, 0.15860778093338013, 0.04915628582239151, 0.4056727886199951, 0.007094636559486389, -0.05668037384748459, -0.11497505009174347, -0.019919808954000473, 0.3739088773727417, -0.15997059643268585, 0.2291141003370285, 0.0941658765077591, -0.06288669258356094, 0.05223296582698822, -0.3161455988883972, 0.07708033919334412, 0.44339409470558167, 0.09641169011592865, 0.6581610441207886, -0.14115048944950104, -0.0852128267288208, 0.09723421931266785, 0.20576338469982147, -0.030233964323997498, -0.3161616325378418, -0.07787351310253143, 0.029108010232448578, -0.3727585971355438, 0.07393170893192291, 0.4100783169269562, 0.012369755655527115, -0.043416768312454224, 0.014906920492649078, -0.12569572031497955, -0.0034757405519485474, -0.035462405532598495, -0.18227070569992065, 0.29369238018989563, -0.10488604009151459, 0.26149502396583557, -0.11375412344932556, 0.25623926520347595, 0.30597665905952454, 0.4187876582145691, 0.08416438102722168, -0.21289117634296417, -0.11367268860340118, -0.0380246639251709, -0.07845601439476013, 0.22692009806632996, 0.016259033232927322, 0.14591148495674133, -0.1102561354637146, 0.020987913012504578, -0.18065309524536133, -0.2697327435016632, -0.01332487165927887, 0.11012056469917297, -0.2052498161792755, -0.00978504866361618, 0.35384851694107056, -0.03514615818858147, 0.03259173035621643, 0.28054380416870117, 0.009535165503621101, -0.15664860606193542, 0.306334912776947, -0.0294472835958004, 0.9685136675834656, -0.003127606585621834, 0.0929257795214653, -0.2329956591129303, 0.083055779337883, 0.49157872796058655, -0.15972504019737244, 0.29509907960891724, -0.224057137966156, -0.35645127296447754, 0.06004233658313751, -0.0459594763815403, -0.10148552060127258, -0.18578188121318817, -0.19741956889629364, 0.46176913380622864, -0.4127396047115326, 0.7055448293685913, -0.05641978234052658, -0.12641572952270508, -0.05689205974340439, 0.14145897328853607, -0.0687078982591629, 0.1876804083585739, -0.08391260355710983, 0.25659430027008057, -0.27322113513946533, 0.05322299152612686, -0.10319685190916061, 0.24039971828460693, -0.36028897762298584, 0.08725722879171371, 0.07287342846393585, 0.2519339323043823, 0.028596553951501846, -0.4153457283973694, -0.1203279048204422, -0.1590224951505661, 0.432877779006958, -0.02035820297896862, -0.15972614288330078, -0.011267658323049545, 0.21704445779323578, 0.04250980168581009, 0.08004540205001831, -0.07713006436824799, 0.22598658502101898, -0.11807955801486969, -0.22802084684371948, 0.017934652045369148, -0.08375541120767593, -0.4162956178188324, -0.2763221859931946, 0.08288939297199249, 0.023053200915455818, -0.30061575770378113, -0.11748281121253967, 0.0064782314002513885, -0.0642905980348587, -0.3261709213256836, 0.1350494921207428, 0.3250190019607544, -0.10091134905815125, 0.06200563535094261, -0.15828463435173035, -0.1840883195400238, -0.17062801122665405, 0.03665148466825485, 0.2216711938381195, -0.18305209279060364, 0.22943846881389618, 0.1340654194355011, -0.1338910460472107, -0.08142383396625519, -0.3842444121837616, 0.056281257420778275, -0.6646988391876221, 0.18152260780334473, -0.6276940107345581, -0.1317310780286789, 0.08183328807353973, 0.20563730597496033, 0.09466686844825745, 0.08450649678707123, 0.08049078285694122, -0.2850666344165802, -0.27304762601852417, -0.16222472488880157, -0.08552183210849762, 0.166305810213089, -0.17584490776062012, -0.17311877012252808, -0.00505959615111351, 0.13130269944667816, -0.3139530420303345, 0.08933909982442856, -0.3808586299419403, 0.17406964302062988, -0.22575435042381287, -0.17406310141086578, -0.10731524974107742, -0.23693497478961945, 0.022525813430547714, 0.09027691185474396, -0.019009318202733994, -0.16160647571086884, -0.07499484717845917, 0.1116732507944107, 0.016193654388189316, -0.12444990873336792, -0.2458217740058899, -0.273542195558548, 0.17660045623779297, -0.15439142286777496, 0.34648019075393677, 0.5136076211929321, 0.15604044497013092, 0.06110849976539612, 0.5404980778694153, -0.006013020873069763, -0.06547162681818008, 0.3340941071510315, 0.19120508432388306, 0.16303494572639465, -0.17701031267642975, 0.12075458467006683, 0.026039063930511475, -0.021501094102859497, -0.23448128998279572, 0.046126578003168106, -0.20330654084682465, 0.3450928330421448, 0.21333301067352295, -0.468513160943985, -0.012359529733657837, 0.30637407302856445, 0.19433771073818207, 0.08085647225379944, -0.050621937960386276, -0.2507816255092621, 0.3994058668613434, 0.3236173689365387, -0.27790385484695435, -0.34739166498184204, 0.6426149606704712, 0.07532918453216553, -0.03260763734579086, 0.06577671319246292, 0.38006147742271423, -0.055737704038619995, 0.0715048760175705, 0.3349496126174927, 0.5909969210624695, -0.16025564074516296, -0.006107080727815628, 0.19052603840827942, 0.17758893966674805, 0.07212145626544952, 0.21752507984638214, 0.16020339727401733, 0.1399679183959961, 0.444610595703125, 0.22201189398765564, 0.008169949054718018, 0.6735283136367798, 0.19604957103729248, 0.023146027699112892, -0.17798098921775818, -0.1727084070444107, 0.27121633291244507, -0.19375427067279816, 0.21787506341934204, -0.00599893182516098, 0.15982754528522491, -0.09637842327356339, -0.013704640790820122, -0.1345159411430359, 0.08447939157485962, -0.44612571597099304, 0.1489557921886444, 0.1706596314907074, -0.11007419228553772, 0.05295689404010773, 0.02845926582813263, -0.33116671442985535, 0.03283221647143364, 0.3794752061367035, 0.00041504763066768646, -0.15209980309009552, -0.10324159264564514, 0.24211306869983673, 0.2910902202129364, 0.3016250431537628, -0.1965739130973816, 0.09656831622123718, 0.07090605050325394, -0.33718472719192505, -0.104622483253479, 0.20187583565711975, 0.28504636883735657, 0.020949263125658035, -0.18373145163059235, 0.16104498505592346, 0.33779746294021606, 0.18053856492042542, -0.03721792250871658, 0.08182868361473083, -0.02951827645301819, -0.03082326240837574, -0.16346454620361328, 0.02080489695072174, -0.12404648214578629, 0.19858324527740479, -0.0663217231631279, 0.03675302118062973, -0.33967655897140503, 0.18712523579597473, -0.29776546359062195, -0.29637742042541504, -0.14562204480171204, 0.28923308849334717, -0.029116526246070862, 0.049295149743556976, 0.45649993419647217, -0.014359850436449051, 0.30350303649902344, 0.17274358868598938, 0.13842424750328064, -0.4895947575569153, 0.23224277794361115, 0.6303325295448303, -0.157408207654953, -0.2550349235534668, -0.056992121040821075, -0.39751818776130676, 0.6513324975967407, -0.39530283212661743, 0.05572604387998581, 0.4673308730125427, 0.26446837186813354, -0.25514763593673706, -0.09370438754558563, 0.004699304699897766, 0.21769165992736816, -0.008189111948013306, 0.2164940983057022, -0.5698689818382263, -0.1628449559211731, -0.03442578390240669, -0.219206765294075, 0.1728801429271698, -0.3401225507259369, 0.34333375096321106, 0.1879246085882187, 0.13281969726085663, -0.1100577563047409, -0.1353563666343689, 0.26760736107826233, 0.09269465506076813, 0.19122043251991272, 0.06536437571048737, -0.15143994987010956, 0.33169737458229065, -0.3051830530166626, -0.25446754693984985, -0.03181137889623642, -0.10928639769554138, -0.2930646538734436, -0.05893803387880325, 0.11459474265575409, -0.19179564714431763, 0.24971333146095276, -0.13223671913146973, 0.45043718814849854, 0.17068344354629517, -0.13084381818771362, -0.15283739566802979, -0.09040246903896332, -0.10519160330295563, -0.04378556087613106, 0.20724183320999146, 0.39093726873397827, -0.10553759336471558, 0.24748024344444275, -0.30180811882019043, -0.22563573718070984, 0.38241201639175415, -0.18747840821743011, -0.4419843554496765, -0.21384881436824799, 0.21550355851650238, 0.3572586476802826, -0.3098291754722595, -0.2876303195953369, 0.06129582226276398, 0.20804068446159363, 0.1564415693283081, -0.3364335298538208, 0.0754135251045227, -0.25399914383888245, 0.11169889569282532, 0.294239342212677, 0.28434422612190247, 0.14260932803153992, -0.0031460225582122803, 0.3445822596549988, 0.1113504022359848 ]
https://github.com/huggingface/datasets/issues/6371
Indeed, setting `try_from_gcs` to `False` makes sense for `from_generator`. We plan to deprecate and remove `try_from_hf_gcs` soon, as we can use Hub for file hosting now, but this is a good temporary fix.
`Dataset.from_generator` should not try to download from HF GCS
### Describe the bug When using [`Dataset.from_generator`](https://github.com/huggingface/datasets/blob/c9c1166e1cf81d38534020f9c167b326585339e5/src/datasets/arrow_dataset.py#L1072) with `streaming=False`, the internal logic will call [`download_and_prepare`](https://github.com/huggingface/datasets/blob/main/src/datasets/io/generator.py#L47) which will attempt to download from HF GCS which is redundant, because user has already provided the generator from which the data should be drawn. If someone attempts to call `Dataset.from_generator` from an environment that doesn't have external internet access (for example internal production machine) and doesn't set `HF_DATASETS_OFFLINE=1`, this will result in process being stuck at building connection. ### Steps to reproduce the bug ```python import datasets def gen(): for _ in range(100): yield {"text": "dummy text"} dataset = datasets.Dataset.from_generator(gen) ``` A minimum example executed on any environment that doesn't have access to HF GCS can result in the error ### Expected behavior `try_from_hf_gcs` should be set to False here https://github.com/huggingface/datasets/blob/c9c1166e1cf81d38534020f9c167b326585339e5/src/datasets/io/generator.py#L51 ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-3.10.0-1160.90.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.12 - Huggingface_hub version: 0.17.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.3
33
`Dataset.from_generator` should not try to download from HF GCS ### Describe the bug When using [`Dataset.from_generator`](https://github.com/huggingface/datasets/blob/c9c1166e1cf81d38534020f9c167b326585339e5/src/datasets/arrow_dataset.py#L1072) with `streaming=False`, the internal logic will call [`download_and_prepare`](https://github.com/huggingface/datasets/blob/main/src/datasets/io/generator.py#L47) which will attempt to download from HF GCS which is redundant, because user has already provided the generator from which the data should be drawn. If someone attempts to call `Dataset.from_generator` from an environment that doesn't have external internet access (for example internal production machine) and doesn't set `HF_DATASETS_OFFLINE=1`, this will result in process being stuck at building connection. ### Steps to reproduce the bug ```python import datasets def gen(): for _ in range(100): yield {"text": "dummy text"} dataset = datasets.Dataset.from_generator(gen) ``` A minimum example executed on any environment that doesn't have access to HF GCS can result in the error ### Expected behavior `try_from_hf_gcs` should be set to False here https://github.com/huggingface/datasets/blob/c9c1166e1cf81d38534020f9c167b326585339e5/src/datasets/io/generator.py#L51 ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-3.10.0-1160.90.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.12 - Huggingface_hub version: 0.17.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.3 Indeed, setting `try_from_gcs` to `False` makes sense for `from_generator`. We plan to deprecate and remove `try_from_hf_gcs` soon, as we can use Hub for file hosting now, but this is a good temporary fix.
[ -0.24892577528953552, -0.3623090982437134, 0.012908365577459335, 0.22331032156944275, 0.23133710026741028, -0.19252106547355652, 0.11532336473464966, 0.07888228446245193, 0.08868780732154846, 0.28646352887153625, 0.08888961374759674, 0.050307776778936386, 0.14478136599063873, -0.04126991331577301, 0.029160358011722565, -0.11622801423072815, 0.016507335007190704, 0.13109278678894043, -0.38144153356552124, -0.0979665219783783, -0.16942468285560608, 0.21051862835884094, -0.015294559299945831, 0.17515403032302856, -0.1805078685283661, -0.14485667645931244, 0.2294115126132965, 0.2884560823440552, -0.15441164374351501, -0.20642872154712677, 0.09873684495687485, 0.2202964574098587, -0.1010529100894928, 0.37709614634513855, -0.000109796819742769, -0.01786740869283676, 0.27015334367752075, 0.012225866317749023, -0.39139324426651, -0.33023354411125183, -0.010035127401351929, 0.016407638788223267, 0.027190789580345154, -0.07714840769767761, -0.13257409632205963, -0.07473664730787277, -0.03492744639515877, -0.3585920035839081, 0.4681853652000427, 0.14771747589111328, 0.2560073435306549, 0.6069953441619873, 0.008812598884105682, -0.2980214059352875, 0.14196766912937164, 0.021542269736528397, -0.14350035786628723, 0.3053863048553467, -0.017523497343063354, 0.09608152508735657, 0.07254429161548615, 0.4796016812324524, -0.30628588795661926, -0.06877017766237259, 0.5111351609230042, -0.06145743280649185, -0.3065181374549866, -0.3042965233325958, 0.16116686165332794, 0.3373104929924011, 0.24005839228630066, -0.2907840311527252, -0.2501803934574127, -0.27337414026260376, 0.00950576364994049, -0.21811160445213318, 0.3587188124656677, 0.21180205047130585, -0.5105888247489929, 0.2355516254901886, -0.14950287342071533, -0.32554537057876587, -0.19259679317474365, -0.12350606918334961, 0.22328436374664307, -0.06907276809215546, -0.15005841851234436, 0.10820113122463226, 0.14533844590187073, 0.34818902611732483, -0.026912126690149307, -0.47892898321151733, -0.19448749721050262, 0.08657437562942505, -0.2438557744026184, 0.06415368616580963, 0.2801611125469208, 0.12465805560350418, 0.1845133900642395, 0.04190512001514435, -0.12382445484399796, 0.01486784964799881, 0.03497883304953575, 0.11483471095561981, 0.0054068490862846375, 0.07490309327840805, -0.050983041524887085, -0.08490545302629471, 0.3186090886592865, 0.5004299283027649, -0.03504478186368942, -0.19483916461467743, 0.1568658947944641, -0.2809911072254181, -0.05693754926323891, -0.004230352118611336, 0.19127050042152405, -0.026320919394493103, -0.34083306789398193, 0.23478232324123383, 0.06339958310127258, 0.17048075795173645, 0.18211400508880615, 0.4702931344509125, -0.06772082298994064, 0.14527887105941772, 0.1026625707745552, 0.1490938663482666, -0.2272382378578186, -0.38466301560401917, -0.29644399881362915, -0.24555553495883942, -0.12101754546165466, 0.2572631537914276, -0.07764681428670883, -0.2915925085544586, 0.2558045983314514, 0.24878019094467163, 0.16547611355781555, -0.08938542008399963, -0.011830057948827744, -0.12421732395887375, 0.13387317955493927, 0.33640360832214355, -0.07371968030929565, 0.11264444142580032, 0.4128514230251312, -0.06223875656723976, -0.036704130470752716, -0.1351783275604248, -0.052458878606557846, -0.4469708204269409, -0.09708676487207413, 0.22548307478427887, 0.047451481223106384, 0.1864534616470337, -0.1047675684094429, 0.012268651276826859, -0.026358839124441147, 0.07707377523183823, 0.2775322496891022, 0.09492415189743042, -0.1814095824956894, -0.18649885058403015, 0.20623531937599182, 0.692298173904419, -0.12394623458385468, -0.071785569190979, -0.00744204968214035, -0.07714816182851791, 0.28047317266464233, 0.18564976751804352, -0.36048322916030884, 0.09806510806083679, -0.29589009284973145, -0.29865533113479614, 0.28842803835868835, -0.15301132202148438, -0.3482237458229065, 0.6089650988578796, -0.3264845609664917, 0.1938779354095459, 0.314703106880188, 0.0017553195357322693, -0.01502159982919693, -0.018642963841557503, 0.09386145323514938, 0.18079905211925507, 0.07219134271144867, 0.13812528550624847, -0.32529860734939575, -0.3360135555267334, -0.25416797399520874, -0.0893992930650711, 0.04016264155507088, 0.2934319078922272, 0.0008974708616733551, -0.31924572587013245, 0.4243820607662201, -0.20410795509815216, 0.018508899956941605, 0.20272445678710938, 0.31228888034820557, 0.09153832495212555, -0.16500717401504517, 0.1228725016117096, -0.5268762707710266, 0.20461846888065338, -0.26240217685699463, 0.0739188939332962, -0.3965625464916229, -0.367600679397583, -0.208423912525177, 0.10136830806732178, -0.20111243426799774, -0.09907394647598267, 0.05444955453276634, 0.1074562519788742, 0.12193569540977478, -0.028853029012680054, -0.16402018070220947, 0.560065507888794, -0.2732561230659485, 0.2516840696334839, -0.2942121624946594, 0.3246471881866455, -0.045852698385715485, 0.01518283411860466, -0.047659095376729965, -0.13027532398700714, 0.1220402866601944, 0.009067676961421967, -0.1771266758441925, 0.46290042996406555, -0.27344390749931335, 0.4595171809196472, -0.3019584119319916, -0.06985250115394592, 0.1543692648410797, -0.21756459772586823, 0.047617122530937195, -0.08889275789260864, 0.20069459080696106, 0.18539586663246155, 0.1452784538269043, 0.3005385994911194, -0.05552825331687927, 0.15005216002464294, 0.09785184264183044, -0.059097230434417725, 0.10457706451416016, -0.004990018904209137, 0.0970805436372757, -0.14563030004501343, 0.1926903873682022, 0.1947759985923767, 0.3367045521736145, 0.0006264280527830124, -0.45067983865737915, 0.35615649819374084, 0.4138261377811432, 0.12065757811069489, -0.20707063376903534, 0.026162613183259964, -0.04684048891067505, -0.09920673072338104, 0.22516921162605286, 0.17565152049064636, 0.24202373623847961, 0.25926673412323, 0.022952187806367874, 0.22067669034004211, -0.10656091570854187, -0.39856693148612976, 0.29263901710510254, -0.09151691198348999, 0.1301996409893036, 0.11524564027786255, -0.0753641203045845, -0.08157186210155487, -0.47015121579170227, -0.052038032561540604, -0.07205983251333237, 0.11427201330661774, -0.30434679985046387, 0.26956045627593994, -0.11112777888774872, -0.1635865420103073, -0.16076596081256866, -0.011293496936559677, -0.27674001455307007, -0.1818748116493225, 0.02916857600212097, 0.5054517388343811, -0.27325665950775146, -0.059015125036239624, -0.05167463421821594, -0.016789689660072327, -0.10262587666511536, -0.20613186061382294, -0.3640144467353821, -0.04049520939588547, -0.1460777074098587, 0.04290662705898285, 0.2311759740114212, -0.01026986911892891, 0.38835635781288147, -0.04055575281381607, -0.2642623484134674, -0.24108105897903442, -0.032191671431064606, 0.2241525650024414, -0.10531102120876312, 0.2786419689655304, 0.1761242151260376, 0.13407441973686218, -0.14467062056064606, -0.030463706701993942, 0.20328475534915924, -0.43379268050193787, 0.033986568450927734, -0.041504137217998505, -0.09644082188606262, 0.04730851575732231, -0.25585806369781494, -0.13421662151813507, -0.15706610679626465, -0.4284711182117462, 0.12153159081935883, -0.1056223139166832, 0.25706374645233154, 0.5086649060249329, 0.2130196988582611, 0.05459131300449371, -0.03449878841638565, 0.1791802942752838, -0.303027868270874, -0.6626796722412109, 0.07140611112117767, -0.21619254350662231, -0.3896285891532898, -0.09018702805042267, -0.15383662283420563, 0.18582499027252197, 0.15611207485198975, -0.5285133719444275, -0.14334730803966522, -0.2534886300563812, 0.2717568874359131, 0.02054191753268242, 0.1415266990661621, 0.25001415610313416, -0.117884561419487, -0.2129734754562378, -0.09484970569610596, 0.3777678608894348, 0.22947892546653748, -0.18453815579414368, -0.03809371590614319, 0.054260510951280594, 0.32365792989730835, -0.1444852352142334, 0.644697368144989, 0.34843194484710693, 0.04487188532948494, 0.5808860063552856, 0.05745311826467514, 0.617246687412262, -0.3757832944393158, -0.26387178897857666, -0.12734851241111755, 0.028571635484695435, -0.28394484519958496, 0.20179292559623718, -0.01851404830813408, 0.35190799832344055, -0.22409948706626892, -0.002644777297973633, -0.15161259472370148, -0.4651896357536316, -0.10357528924942017, 0.04421095550060272, 0.16876517236232758, 0.18956726789474487, 0.20933739840984344, -0.13123047351837158, 0.015119239687919617, 0.059282295405864716, 0.22470521926879883, 0.3709058165550232, -0.0938594788312912, -0.17067378759384155, 0.02719515934586525, -0.6728709936141968, 0.23821839690208435, 0.06621003150939941, 0.046656493097543716, -0.15187875926494598, 0.007959768176078796, 0.12003156542778015, -0.1632220447063446, 0.35815155506134033, -0.08863283693790436, 0.02583307772874832, 0.053231678903102875, 0.12540727853775024, -0.31970691680908203, 0.0800715833902359, 0.05880529433488846, -0.17553448677062988, 0.0021169763058423996, 0.28932255506515503, -0.4955022931098938, -0.35090985894203186, 0.12069971859455109, 0.10491189360618591, -0.027216769754886627, -0.13430896401405334, -0.5269128084182739, -0.2831765413284302, -0.30810976028442383, -0.003056388348340988, 0.004308931529521942, 0.23296387493610382, -0.2214111089706421, -0.00518614798784256, 0.2049092799425125, 0.20054474472999573, 0.13153335452079773, 0.06724554300308228, 0.0961470901966095, -0.08824176341295242, 0.022795364260673523, 0.15828163921833038, 0.02888760156929493, 0.1290310025215149, 0.797313392162323, 0.06649042665958405, -0.07724835723638535, -0.16034170985221863, 0.22985301911830902, 0.0920242965221405, 0.5895717144012451, -0.13209828734397888, 0.3571760058403015, 0.09673146903514862, 0.5124638080596924, -0.13802428543567657, 0.03094276785850525, 0.1522049754858017, -0.06064978241920471, -0.08167049288749695, -0.3996606469154358, 0.40144863724708557, -0.055486299097537994, -0.1714053750038147, 0.5806732773780823, 0.4871332347393036, -0.18922381103038788, 0.15301689505577087, -0.11663246154785156, 1.0799758434295654, 0.14634257555007935, 0.18233153223991394, 0.4381677508354187, -0.22040820121765137, 0.5817221403121948, -0.24008962512016296, 0.12644822895526886, -0.36356744170188904, -0.2936081886291504, -0.009700659662485123, -0.12292782962322235, 0.44794127345085144, 0.03000769391655922, -0.09737149626016617, 0.2909627854824066, -0.11850357055664062, 0.45569470524787903, -0.0979999527335167, 0.19534094631671906, -0.5699269771575928, -0.28863829374313354, -0.4374951422214508, 0.17330697178840637, 0.13460353016853333, 0.29076576232910156, -0.23975394666194916, -0.21792398393154144, 0.04385995864868164, -0.30764928460121155, -0.10917989164590836, 0.3782203793525696, -0.3229270279407501, -0.14126485586166382, 0.10809279978275299, -0.10603220760822296, 0.13000628352165222, 0.0032785709481686354, 0.3671647012233734, 0.09496992081403732, -0.1576915830373764, 0.10904797911643982, -0.1409265697002411, 0.14221274852752686, -0.030238643288612366, 0.015319634228944778, 0.21800801157951355, -0.05550084263086319, -0.3645554780960083, 0.33106401562690735, -0.08858189731836319, -0.11019469797611237, 0.1521996110677719, -0.3637216091156006, -0.05795706436038017, -0.11843107640743256, 0.11854727566242218, 0.14937083423137665, 0.08378585427999496, -0.26154738664627075, 0.13634422421455383, -0.22421056032180786, -0.23118886351585388, -0.1208282858133316, -0.09785027801990509, -0.2211732566356659, -0.32417935132980347, 0.3665381669998169, -0.12848462164402008, 0.1366322636604309, 0.3274646997451782, 0.09150514006614685, -0.24279162287712097, -0.34432658553123474, -0.13944703340530396, 0.12215439975261688, -0.613214910030365, 0.17311619222164154, 0.17284445464611053, -0.06499384343624115, -0.07975420355796814, 0.33364492654800415, 0.06501523405313492, -0.10609543323516846, 0.0713856965303421, -0.15550702810287476, -0.40864890813827515, 0.03885631635785103, -0.03133073076605797, 0.1257617175579071, 0.1060718223452568, 0.0782666802406311, -0.06629280745983124, 0.1710348278284073, -0.3768042027950287, -0.12567169964313507, -0.09172920882701874, -0.0012167496606707573, 0.04985247924923897, -0.1471489518880844, 0.38997939229011536, -0.07457487285137177, 0.1787627935409546, 0.17024703323841095, -0.39678651094436646, -0.24173639714717865, -0.13458988070487976, 0.16496503353118896, 0.026165559887886047, -0.4754824936389923, 0.10237859189510345, -0.18222779035568237, -0.21259011328220367, -0.0990680679678917, 0.6382777094841003, 0.20659314095973969, -0.017141323536634445, -0.13164162635803223, 0.07210399210453033, 0.31840765476226807, -0.3951106369495392, -0.018958907574415207, -0.08519247174263, 0.5627646446228027, -0.10888105630874634, -0.03255847841501236, -0.1918022334575653, -0.24354693293571472, -0.30351555347442627, 0.31700941920280457, 0.26717424392700195, 0.09736029803752899, 0.4866620898246765, -0.2758706212043762, -0.21310143172740936, -0.1136268824338913, 0.4838314652442932, -0.006486581638455391, 0.09851571917533875, -0.19273802638053894, 0.17277668416500092, 0.2558791935443878, -0.23284749686717987, -0.07494409382343292, -0.12587086856365204, -0.06930958479642868, 0.22097429633140564, 0.1614091992378235, 0.35707563161849976, -0.12801578640937805, 0.05440739542245865, 0.06733914464712143, 0.20331834256649017, 0.2069353312253952, 0.15552015602588654, 0.3058325946331024, 0.2267836630344391, 0.15151239931583405, 0.34545478224754333, 0.11358724534511566, 0.28307756781578064, 0.04899219423532486, -0.24813351035118103, 0.0824144184589386, -0.24065741896629333, 0.2590782046318054, 0.02826089598238468, -0.46210524439811707, 0.09467072784900665, 0.09815876185894012, -0.22837772965431213, 0.07839135825634003, -0.14375248551368713, 0.35856392979621887, -0.16400763392448425, -0.179202139377594, -0.25501418113708496, 0.5736644268035889, -0.011167455464601517, -0.05074715614318848, -0.07474660128355026, -0.162898987531662, -0.21923710405826569, 0.24270737171173096, 0.12144099175930023, -0.0972861647605896, 0.2632668912410736, 0.11046461015939713, 0.037905752658843994, -0.0954778864979744, 0.13948623836040497, 0.1612113118171692, 0.28260213136672974, -0.1971331536769867, 0.18053969740867615, 0.3343973755836487, 0.0226352009922266, 0.07475385069847107, 0.29383793473243713, 0.3012387156486511, 0.06990876793861389, 0.07584479451179504, -0.024774860590696335, -0.009458193555474281, -0.0335376113653183, -0.07441465556621552, 0.10196618735790253, -0.145429328083992, -0.0019900379702448845, 0.29058173298835754, 0.1289634257555008, -0.2579227387905121, -0.18656331300735474, -0.06674592196941376, 0.2698758542537689, -0.16891609132289886, 0.5694378614425659, -0.10430154204368591, -0.02045595645904541, -0.13315293192863464, -0.057256732136011124, -0.4089590311050415, 0.2718750536441803, 0.3421615958213806, -0.27785229682922363, 0.15766817331314087, -0.2916301190853119, 0.10913045704364777, -0.07825486361980438, 0.43130409717559814, 0.21376243233680725, 0.2310769110918045, -0.33002692461013794, -0.29345792531967163, -0.4992446303367615, 0.06305186450481415, -0.04399026185274124, 0.04017922282218933, 0.07540243864059448, 0.10095605254173279, 0.05234479904174805, 0.08624888956546783, -0.008559174835681915, 0.2405754178762436, -0.051763150840997696, 0.17024317383766174, 0.10420967638492584, 0.09818241745233536, -0.2890282869338989, -0.240042045712471, -0.1558956801891327, -0.5906981825828552, 0.2970256507396698, -0.34974542260169983, 0.0848996639251709, 0.021296802908182144, 0.25068968534469604, 0.08036310970783234, -0.29304802417755127, 0.4291582703590393, 0.20775368809700012, 0.05024082213640213, -0.17479519546031952, -0.3411479592323303, -0.008540421724319458, -0.08252926170825958, -0.29059621691703796, -0.05494607985019684, -0.08660943806171417, 0.4341607093811035, 0.10530473291873932, -0.23143498599529266, -0.5046061277389526, 0.3587709069252014, 0.3108794689178467, 0.05945777893066406, -0.2346118837594986, 0.16652022302150726, -0.4181678295135498, 0.1313478797674179, 0.11635783314704895, 0.16662487387657166, 0.12425176799297333, 0.24419043958187103, -0.3469420373439789, -0.3899793326854706, 0.6866308450698853, -0.2445698082447052, -0.19239531457424164, -0.04043039306998253, 0.5403171181678772, 0.4229312837123871, -0.40699902176856995, -0.3578895628452301, 0.2641499638557434, 0.18510131537914276, -0.005475861020386219, 0.0596257746219635, 0.2799821197986603, -0.12420319020748138, 0.05054992437362671, -0.05945639684796333, 0.27739086747169495, 0.013650750741362572, -0.2691887319087982, 0.1641005575656891, -0.20363491773605347 ]
https://github.com/huggingface/datasets/issues/6370
I figured it out. I found that `Trainer` does not work with TensorDataset even though the document says it uses it. Instead, I ended up creating a dictionary and converting it to a dataset using `dataset.Dataset.from_dict()`. I will leave this post open for a while. If someone knows a better approach, please leave a comment.
TensorDataset format does not work with Trainer from transformers
### Describe the bug The model was built to do fine tunning on BERT model for relation extraction. trainer.train() returns an error message ```TypeError: vars() argument must have __dict__ attribute``` when it has `train_dataset` generated from `torch.utils.data.TensorDataset` However, in the document, the required data format is `torch.utils.data.TensorDataset`. ![image](https://github.com/huggingface/datasets/assets/49014051/36fa34ac-3127-4c64-9580-9ab736136d83) Transformers trainer is supposed to accept the train_dataset in the format of torch.utils.data.TensorDataset, but it returns error message *"TypeError: vars() argument must have __dict__ attribute"* ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-30-5df728c929a2> in <cell line: 1>() ----> 1 trainer.train() 2 trainer.evaluate(test_dataset) 9 frames /usr/local/lib/python3.10/dist-packages/transformers/data/data_collator.py in <listcomp>(.0) 107 108 if not isinstance(features[0], Mapping): --> 109 features = [vars(f) for f in features] 110 first = features[0] 111 batch = {} TypeError: vars() argument must have __dict__ attribute ``` ### Steps to reproduce the bug Create train_dataset using `torch.utils.data.TensorDataset`, for instance, ```train_dataset = torch.utils.data.TensorDataset(train_input_ids, train_attention_masks, train_labels)``` Feed this `train_dataset` to your trainer and run trainer.train ``` trainer = Trainer(model, training_args, train_dataset=train_dataset, eval_dataset=dev_dataset, compute_metrics=compute_metrics, ) ``` ### Expected behavior Trainer should start training ### Environment info It is running on Google Colab - `datasets` version: 2.14.6 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.17.3 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
55
TensorDataset format does not work with Trainer from transformers ### Describe the bug The model was built to do fine tunning on BERT model for relation extraction. trainer.train() returns an error message ```TypeError: vars() argument must have __dict__ attribute``` when it has `train_dataset` generated from `torch.utils.data.TensorDataset` However, in the document, the required data format is `torch.utils.data.TensorDataset`. ![image](https://github.com/huggingface/datasets/assets/49014051/36fa34ac-3127-4c64-9580-9ab736136d83) Transformers trainer is supposed to accept the train_dataset in the format of torch.utils.data.TensorDataset, but it returns error message *"TypeError: vars() argument must have __dict__ attribute"* ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-30-5df728c929a2> in <cell line: 1>() ----> 1 trainer.train() 2 trainer.evaluate(test_dataset) 9 frames /usr/local/lib/python3.10/dist-packages/transformers/data/data_collator.py in <listcomp>(.0) 107 108 if not isinstance(features[0], Mapping): --> 109 features = [vars(f) for f in features] 110 first = features[0] 111 batch = {} TypeError: vars() argument must have __dict__ attribute ``` ### Steps to reproduce the bug Create train_dataset using `torch.utils.data.TensorDataset`, for instance, ```train_dataset = torch.utils.data.TensorDataset(train_input_ids, train_attention_masks, train_labels)``` Feed this `train_dataset` to your trainer and run trainer.train ``` trainer = Trainer(model, training_args, train_dataset=train_dataset, eval_dataset=dev_dataset, compute_metrics=compute_metrics, ) ``` ### Expected behavior Trainer should start training ### Environment info It is running on Google Colab - `datasets` version: 2.14.6 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.17.3 - PyArrow version: 9.0.0 - Pandas version: 1.5.3 I figured it out. I found that `Trainer` does not work with TensorDataset even though the document says it uses it. Instead, I ended up creating a dictionary and converting it to a dataset using `dataset.Dataset.from_dict()`. I will leave this post open for a while. If someone knows a better approach, please leave a comment.
[ -0.03787489980459213, -0.3518880009651184, 0.05201185494661331, 0.4861849844455719, 0.4192970097064972, -0.05809000879526138, 0.6545382142066956, 0.43648281693458557, -0.1592072993516922, -0.005945086479187012, -0.25915586948394775, 0.32222020626068115, -0.13267740607261658, -0.2513682246208191, -0.20361292362213135, -0.4603041112422943, -0.027269944548606873, 0.2983797788619995, -0.17369399964809418, -0.00430452823638916, 0.17776790261268616, 0.2228448987007141, -0.0594332218170166, -0.013504154980182648, -0.562785267829895, 0.039704762399196625, 0.08863552659749985, -0.12246932089328766, 0.01563488319516182, -0.06318704783916473, 0.5986499786376953, -0.09856997430324554, 0.4436226785182953, 0.6600080728530884, -0.00012158869503764436, 0.2243557572364807, 0.13810023665428162, -0.11296793073415756, -0.06387326121330261, -0.10991713404655457, -0.08671565353870392, -0.01259775459766388, 0.3420388102531433, -0.3319576680660248, -0.35599470138549805, 0.08210556209087372, -0.16528767347335815, -0.11661862581968307, 0.613518476486206, 0.6352989077568054, 0.12283143401145935, 0.479275107383728, 0.14653997123241425, -0.08347094058990479, 0.020959438756108284, 0.5227452516555786, -0.1228601336479187, 0.15958374738693237, -0.15279614925384521, 0.022461093962192535, 0.14259374141693115, 0.027535319328308105, -0.03191838786005974, 0.07168545573949814, 0.18322038650512695, 0.24965859949588776, -0.04308714717626572, -0.1485687494277954, 0.033481985330581665, 0.38304194808006287, 0.5417981147766113, -0.16483601927757263, -0.29708221554756165, 0.2328345775604248, -0.20133039355278015, 0.1891903579235077, 0.20702078938484192, -0.21750062704086304, -0.07902941852807999, 0.3170367479324341, 0.046308331191539764, 0.05375106632709503, -0.5300684571266174, 0.25790461897850037, -0.4150545001029968, 0.08962234854698181, -0.0437609925866127, -0.010735660791397095, -0.04735077545046806, -0.05344598367810249, 0.2322327196598053, -0.059067416936159134, 0.12591329216957092, 0.03729122504591942, -0.07203230261802673, -0.44817620515823364, -0.14259004592895508, -0.6522209048271179, -0.02023714780807495, -0.2943965494632721, -0.1380200833082199, -0.08368538320064545, -0.12652495503425598, 0.02490958943963051, 0.2738182544708252, 0.19266432523727417, 0.04564039781689644, 0.45908358693122864, 0.03481733798980713, -0.07174267619848251, -0.1264064610004425, -0.08590169250965118, -0.20323415100574493, -0.10888509452342987, 0.043236762285232544, -0.05160577967762947, 0.1824841946363449, -0.10043080896139145, -0.21992909908294678, 0.04891689494252205, -0.27247315645217896, 0.08476503193378448, 0.0485573448240757, 0.23578250408172607, -0.27929627895355225, 0.4690496027469635, 0.18467292189598083, 0.049111682921648026, 0.005337372422218323, -0.04875842481851578, -0.08543005585670471, 0.08285833150148392, -0.2273225039243698, -0.38460540771484375, 0.18906553089618683, 0.03689561411738396, 0.22206485271453857, -0.014060165733098984, 0.12456046044826508, 0.09543265402317047, -0.07910443097352982, -0.40348780155181885, 0.5019280314445496, 0.1971687376499176, -0.08215568959712982, 0.16377589106559753, 0.17619992792606354, -0.0015030503273010254, -0.08316540718078613, 0.1757148653268814, -0.4500829577445984, -0.2083309292793274, -0.363292932510376, 0.09251461178064346, -0.09944199025630951, -0.046120885759592056, -0.21725958585739136, 0.06249519810080528, 0.39904552698135376, -0.2587805986404419, -0.21567970514297485, -0.43744900822639465, 0.0972859263420105, -0.0488237626850605, 0.4217371940612793, 0.17389515042304993, -0.29749980568885803, 0.0588589608669281, 0.08262577652931213, 0.017537657171487808, 0.28926268219947815, 0.40836042165756226, -0.23638854920864105, 0.26401200890541077, -0.0008477568626403809, -0.01775284856557846, 0.360771119594574, -0.4188159704208374, -0.3843914866447449, 0.2941000461578369, 0.10121947526931763, 0.28905460238456726, 0.09365658462047577, -0.07019807398319244, 0.31630659103393555, 0.028082583099603653, 0.04038156569004059, 0.4498960077762604, -0.10381685197353363, 0.0308116152882576, -0.2344369888305664, -0.08343654870986938, 0.3137347996234894, 0.05382518470287323, 0.13407571613788605, 0.28536638617515564, -0.14893706142902374, 0.7845433354377747, 0.1888434886932373, 0.06216442957520485, -0.03065241314470768, 0.04452524334192276, 0.1870182752609253, 0.04469946771860123, 0.08304908871650696, -0.07090595364570618, -0.3036062717437744, -0.016921885311603546, 0.016319170594215393, 0.13198323547840118, 0.0019594840705394745, -0.12682612240314484, -0.08826294541358948, -0.06563039124011993, -0.2912072241306305, -0.32012805342674255, 0.05997604504227638, 0.04051683470606804, -0.1255401372909546, -0.1727314442396164, -0.1707330048084259, -0.06482110172510147, 0.05498161166906357, 0.09340902417898178, -0.0020279698073863983, 0.2185003012418747, -0.21461889147758484, -0.1511489748954773, -0.2818814516067505, 0.2156207263469696, -0.06821344792842865, -0.18582391738891602, -0.12056732922792435, 0.15764644742012024, 0.20595209300518036, -0.06422275304794312, -0.2420240342617035, 0.027611136436462402, 0.2936692237854004, -0.47849082946777344, -0.2221241444349289, 0.40703925490379333, 0.16610197722911835, -0.06261274218559265, -0.15708276629447937, 0.2626796364784241, 0.3056449890136719, 0.086015485227108, -0.1260662078857422, 0.28550925850868225, 0.24327409267425537, 0.08518582582473755, 0.040810488164424896, -0.1392354816198349, -0.24834990501403809, 0.18076878786087036, 0.015360333025455475, -0.030591120943427086, -0.24272194504737854, -0.21139726042747498, 0.2773720622062683, 0.17947125434875488, 0.026977386325597763, 0.15661723911762238, -0.1928844153881073, -0.05722871422767639, -0.15366870164871216, -0.4852006435394287, 0.3427826762199402, -0.002588745206594467, -0.03021240234375, -0.19812870025634766, 0.00754808634519577, -0.1956353783607483, 0.2596350908279419, 0.14201167225837708, -0.13342884182929993, 0.062091074883937836, 0.0782538503408432, 0.2050291746854782, 0.044632747769355774, -0.24896343052387238, -0.005460355430841446, 0.24090032279491425, -0.3303108215332031, 0.3991948962211609, -0.23050794005393982, 0.12855471670627594, -0.5074337124824524, -0.36992019414901733, -0.040948279201984406, 0.04712802171707153, -0.019297804683446884, 0.18833941221237183, 0.07647570967674255, 0.3283499479293823, 0.49052873253822327, 0.03754770755767822, 0.3371836245059967, -0.2740341126918793, -0.17134159803390503, -0.19373922049999237, -0.31671276688575745, 0.060544539242982864, 0.06643538177013397, -0.30776074528694153, -0.017272425815463066, -0.2587934732437134, -0.033310092985630035, -0.261576771736145, -0.36471492052078247, 0.09527984261512756, -0.03877094388008118, 0.22816738486289978, 0.348408579826355, 0.15291520953178406, -0.025652453303337097, -0.1825980544090271, 0.12483830749988556, -0.010255269706249237, 0.015360064804553986, 0.1679573506116867, -0.14972138404846191, 0.08454322814941406, -0.1343652606010437, -0.4810853600502014, -0.020665619522333145, -0.06278184801340103, -0.1587054580450058, -0.048309050500392914, 0.03825291991233826, 0.2776559889316559, 0.33453887701034546, 0.23045897483825684, -0.012849939987063408, 0.2643001079559326, -0.03018927201628685, -0.16793403029441833, 0.3866286873817444, -0.21066370606422424, -0.46427834033966064, -0.2453286051750183, -0.16758444905281067, 0.22758236527442932, 0.26100224256515503, -0.09346356987953186, -0.20742622017860413, -0.015303188934922218, 0.043360546231269836, -0.04622318223118782, 0.179012730717659, 0.3033774793148041, 0.011659272015094757, 0.10725850611925125, -0.03483680635690689, 0.14335890114307404, 0.2833932340145111, -0.0025534098967909813, 0.2211274653673172, 0.009381145238876343, 0.12519797682762146, 0.09959937632083893, 0.873191237449646, 0.10172310471534729, -0.6480159163475037, 0.04811985045671463, -0.3322475254535675, 0.13957013189792633, -0.08415527641773224, -0.3818659782409668, -0.0243266299366951, 0.054143425077199936, 0.11948297917842865, 0.21217739582061768, -0.2765320837497711, -0.006718425080180168, -0.21747450530529022, 0.0942995697259903, -0.013598538935184479, -0.346116840839386, 0.3215678036212921, -0.5181785821914673, 0.3677852749824524, -0.07197756320238113, 0.3681243062019348, 0.004782885313034058, -0.12775567173957825, 0.014247506856918335, 0.30733922123908997, -0.08778586238622665, 0.05621451884508133, 0.22226902842521667, -0.48168957233428955, -0.27431681752204895, 0.16536186635494232, 0.17172744870185852, 0.5209486484527588, 0.02963130921125412, -0.02151522785425186, 0.07058447599411011, 0.36731410026550293, 0.6872273683547974, 0.1268402487039566, -0.22081588208675385, -0.04370758309960365, -0.3197450637817383, -0.18436507880687714, -0.06833206117153168, -0.33738231658935547, -0.05378677323460579, -0.08568552136421204, 0.3698982000350952, -0.2858908176422119, -0.4242016673088074, 0.09092076122760773, 0.019098985940217972, -0.15490737557411194, 0.09180250018835068, -0.11749499291181564, 0.005991041660308838, -0.060428258031606674, 0.0036033540964126587, 0.3337489664554596, 0.2999109923839569, 0.10331153124570847, 0.01823236048221588, -0.4734346270561218, -0.030488964170217514, 0.2358568161725998, 0.2921662926673889, 0.21736378967761993, -0.14081251621246338, 0.13464483618736267, 0.03177543729543686, 0.3933211863040924, 0.3439792990684509, -0.024796389043331146, -0.06207192689180374, -0.5286920666694641, 0.05804568901658058, -0.10379131883382797, 0.182697594165802, 0.13708218932151794, -0.020412763580679893, -0.2051335573196411, -0.0973324254155159, -0.1712697446346283, 0.0839465856552124, 0.37504881620407104, 0.40634599328041077, -0.21976611018180847, -0.41866517066955566, -0.3418600857257843, 0.17925584316253662, 0.11299586296081543, 0.2143828272819519, -0.056932233273983, 0.03484310954809189, -0.33671554923057556, 0.23841404914855957, 0.3113788962364197, 0.7732337713241577, 0.16004343330860138, 0.37327608466148376, 0.4100531041622162, 0.031599923968315125, 0.4551633894443512, -0.24357300996780396, 0.10647058486938477, -0.30155113339424133, -0.08319878578186035, -0.17877227067947388, -0.06073930487036705, 0.09333880245685577, 0.1444777250289917, -0.33197784423828125, 0.22209808230400085, -0.26251351833343506, 0.5043290257453918, 0.3125205636024475, 0.10229231417179108, 0.5489413142204285, -0.2405087649822235, -0.05091474950313568, 0.012398600578308105, -0.15021651983261108, 0.3189893662929535, -0.015051018446683884, -0.44081538915634155, -0.08227548003196716, -0.303566575050354, -0.10421553254127502, 0.05204173922538757, -0.3217768967151642, 0.27756011486053467, 0.31325316429138184, -0.46706515550613403, 0.32113271951675415, 0.3987423777580261, 0.3391059637069702, 0.13532476127147675, -0.3357662558555603, 0.1328023374080658, -0.11816420406103134, 0.14612898230552673, -0.07389911264181137, -0.09688431024551392, 0.5543758869171143, -0.048066623508930206, 0.12225574254989624, 0.3165631890296936, -0.050701484084129333, -0.008296340703964233, 0.015833154320716858, -0.042064353823661804, 0.29283446073532104, -0.5365350246429443, -0.18711119890213013, -0.19983473420143127, -0.29549354314804077, -0.08881682902574539, 0.07583245635032654, 0.059584397822618484, -0.17575591802597046, 0.2041683942079544, -0.10527101159095764, -0.05650615692138672, -0.029514741152524948, 0.4834569990634918, 0.21674548089504242, -0.19212083518505096, 0.4645055830478668, 0.03184331953525543, -0.1222415566444397, -0.244378000497818, 0.016398221254348755, 0.2116062194108963, -0.7052996158599854, 0.18648077547550201, -0.07512558251619339, -0.24165169894695282, -0.186531201004982, 0.3506818115711212, 0.09634201228618622, 0.08547712862491608, -0.10805605351924896, -0.09375788271427155, -0.3451751172542572, -0.0313442200422287, -0.19645728170871735, 0.15896010398864746, 0.15845945477485657, 0.6223709583282471, -0.030093207955360413, -0.11380139738321304, -0.21684399247169495, 0.08798190206289291, 0.1626095026731491, 0.31158459186553955, -0.26388826966285706, -0.14822614192962646, 0.27616655826568604, -0.16708920896053314, 0.021549049764871597, 0.11424760520458221, 0.10298239439725876, -0.1263684630393982, -0.34756502509117126, 0.1565016806125641, 0.13478794693946838, -0.06534206867218018, -0.06687459349632263, 0.16770796477794647, -0.3207866847515106, -0.161067396402359, 0.10441483557224274, -0.009586118161678314, -0.04879884794354439, 0.5547992587089539, -0.015746086835861206, 0.22254857420921326, -0.413747638463974, -0.23830381035804749, 0.03127897530794144, 0.0960477888584137, -0.04747644066810608, 0.0930599793791771, -0.17502957582473755, -0.24345257878303528, -0.4716794788837433, 0.2516968846321106, 0.06866990774869919, -0.023943353444337845, 0.30197980999946594, -0.11356742680072784, 0.007558904588222504, 0.18933188915252686, 0.16976383328437805, 0.118013396859169, -0.0644674077630043, -0.09177734702825546, 0.18206903338432312, 0.08114264905452728, -0.18199874460697174, 0.014268197119235992, 0.05911623314023018, -0.10724804550409317, -0.1862768530845642, 0.18280845880508423, -0.171794131398201, 0.3460685610771179, 0.19989818334579468, 0.11786477267742157, -0.09940177202224731, -0.18876971304416656, 0.234346404671669, 0.6368317008018494, -0.08552124351263046, 0.3567544221878052, 0.1488320380449295, 0.0611877515912056, 0.1687893569469452, 0.4367952048778534, -0.22607421875, 0.3516668677330017, -0.19740325212478638, -0.2503172755241394, 0.4370851516723633, 0.028357453644275665, -0.5230381488800049, -0.4215501546859741, 0.03974178060889244, 0.12825605273246765, -0.07414284348487854, 0.563642680644989, -0.4428386688232422, -0.22172077000141144, -0.2230963110923767, -0.17829261720180511, -0.30713778734207153, 0.13448894023895264, 0.021015509963035583, 0.04554364085197449, -0.140321284532547, -0.2922036051750183, -0.3072238862514496, 0.1759064644575119, 0.28229495882987976, 0.25650808215141296, -0.20549219846725464, -0.12471260130405426, 0.11568086594343185, 0.16309943795204163, 0.027956871315836906, -0.07785750180482864, 0.0872739776968956, -0.14199157059192657, -0.22460487484931946, -0.05756165087223053, 0.3314725458621979, 0.18763956427574158, 0.23952987790107727, -0.09462198615074158, -0.291177362203598, -0.11664308607578278, -0.3157767057418823, 0.10133885592222214, 0.21671099960803986, 0.12814699113368988, -0.038679733872413635, 0.11885273456573486, 0.06212903559207916, -0.08095649629831314, 0.10317745804786682, -0.02022826485335827, 0.2560816705226898, -0.23324868083000183, 0.6767632365226746, 0.0036997944116592407, -0.18765640258789062, -0.029109548777341843, -0.10695326328277588, -0.23348411917686462, 0.026867181062698364, 0.1182936578989029, 0.40242674946784973, 0.02501259371638298, -0.12710246443748474, 0.005316704511642456, 0.08738948404788971, 0.4586597681045532, 0.2942652702331543, -0.03551036864519119, -0.38282445073127747, 0.25660446286201477, -0.13175137341022491, 0.3037298917770386, 0.2938821613788605, -0.06686757504940033, -0.030761364847421646, 0.05055123567581177, 0.056676071137189865, 0.23520086705684662, -0.09971485286951065, -0.545771062374115, 0.14324691891670227, 0.06453914940357208, -0.15130704641342163, -0.22577255964279175, -0.39617645740509033, 0.0472681000828743, 0.15901193022727966, -0.3487338423728943, 0.13435107469558716, 0.06687994301319122, 0.0347539484500885, -0.3956032991409302, -0.21797120571136475, 0.1636199951171875, 0.3428831100463867, 0.13210801780223846, 0.07902779430150986, 0.3885047435760498, 0.09731438755989075, 0.10899833589792252, -0.04391838237643242, -0.029090531170368195, -0.13905930519104004, 0.11932958662509918, 0.24284891784191132, 0.43188267946243286, -0.19984573125839233, -0.05088762193918228, -0.44263792037963867, 0.21258965134620667, 0.13635492324829102, -0.1889851987361908, -0.41377976536750793, 0.19398978352546692, -0.2940528392791748, -0.09492310881614685, 0.18074297904968262, 0.6175066232681274, -0.18549932539463043, 0.06623336672782898, -0.549549400806427, -0.37439170479774475, 0.27802303433418274, -0.43140384554862976, -0.37081971764564514, -0.1583137959241867, 0.06797969341278076, 0.16378153860569, 0.16144874691963196, -0.5803871154785156, -0.0046147555112838745, 0.21751317381858826, -0.12236199527978897, -0.37102311849594116, 0.0904456228017807, 0.44023045897483826, 0.26013508439064026, -0.13622444868087769, 0.4345264434814453, 0.04904124513268471, -0.09926598519086838, -0.12028845399618149, -0.2782081365585327 ]
https://github.com/huggingface/datasets/issues/6370
Only issues directly related to the HF datasets library should be reported here. ~So, I'm transferring this issue to the `transformers` repo.~ I'm not a `transformers` maintainer, so GitHub doesn't let me transfer it there :(. This means you need to do it manually.
TensorDataset format does not work with Trainer from transformers
### Describe the bug The model was built to do fine tunning on BERT model for relation extraction. trainer.train() returns an error message ```TypeError: vars() argument must have __dict__ attribute``` when it has `train_dataset` generated from `torch.utils.data.TensorDataset` However, in the document, the required data format is `torch.utils.data.TensorDataset`. ![image](https://github.com/huggingface/datasets/assets/49014051/36fa34ac-3127-4c64-9580-9ab736136d83) Transformers trainer is supposed to accept the train_dataset in the format of torch.utils.data.TensorDataset, but it returns error message *"TypeError: vars() argument must have __dict__ attribute"* ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-30-5df728c929a2> in <cell line: 1>() ----> 1 trainer.train() 2 trainer.evaluate(test_dataset) 9 frames /usr/local/lib/python3.10/dist-packages/transformers/data/data_collator.py in <listcomp>(.0) 107 108 if not isinstance(features[0], Mapping): --> 109 features = [vars(f) for f in features] 110 first = features[0] 111 batch = {} TypeError: vars() argument must have __dict__ attribute ``` ### Steps to reproduce the bug Create train_dataset using `torch.utils.data.TensorDataset`, for instance, ```train_dataset = torch.utils.data.TensorDataset(train_input_ids, train_attention_masks, train_labels)``` Feed this `train_dataset` to your trainer and run trainer.train ``` trainer = Trainer(model, training_args, train_dataset=train_dataset, eval_dataset=dev_dataset, compute_metrics=compute_metrics, ) ``` ### Expected behavior Trainer should start training ### Environment info It is running on Google Colab - `datasets` version: 2.14.6 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.17.3 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
44
TensorDataset format does not work with Trainer from transformers ### Describe the bug The model was built to do fine tunning on BERT model for relation extraction. trainer.train() returns an error message ```TypeError: vars() argument must have __dict__ attribute``` when it has `train_dataset` generated from `torch.utils.data.TensorDataset` However, in the document, the required data format is `torch.utils.data.TensorDataset`. ![image](https://github.com/huggingface/datasets/assets/49014051/36fa34ac-3127-4c64-9580-9ab736136d83) Transformers trainer is supposed to accept the train_dataset in the format of torch.utils.data.TensorDataset, but it returns error message *"TypeError: vars() argument must have __dict__ attribute"* ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-30-5df728c929a2> in <cell line: 1>() ----> 1 trainer.train() 2 trainer.evaluate(test_dataset) 9 frames /usr/local/lib/python3.10/dist-packages/transformers/data/data_collator.py in <listcomp>(.0) 107 108 if not isinstance(features[0], Mapping): --> 109 features = [vars(f) for f in features] 110 first = features[0] 111 batch = {} TypeError: vars() argument must have __dict__ attribute ``` ### Steps to reproduce the bug Create train_dataset using `torch.utils.data.TensorDataset`, for instance, ```train_dataset = torch.utils.data.TensorDataset(train_input_ids, train_attention_masks, train_labels)``` Feed this `train_dataset` to your trainer and run trainer.train ``` trainer = Trainer(model, training_args, train_dataset=train_dataset, eval_dataset=dev_dataset, compute_metrics=compute_metrics, ) ``` ### Expected behavior Trainer should start training ### Environment info It is running on Google Colab - `datasets` version: 2.14.6 - Platform: Linux-5.15.120+-x86_64-with-glibc2.35 - Python version: 3.10.12 - Huggingface_hub version: 0.17.3 - PyArrow version: 9.0.0 - Pandas version: 1.5.3 Only issues directly related to the HF datasets library should be reported here. ~So, I'm transferring this issue to the `transformers` repo.~ I'm not a `transformers` maintainer, so GitHub doesn't let me transfer it there :(. This means you need to do it manually.
[ -0.03787489980459213, -0.3518880009651184, 0.05201185494661331, 0.4861849844455719, 0.4192970097064972, -0.05809000879526138, 0.6545382142066956, 0.43648281693458557, -0.1592072993516922, -0.005945086479187012, -0.25915586948394775, 0.32222020626068115, -0.13267740607261658, -0.2513682246208191, -0.20361292362213135, -0.4603041112422943, -0.027269944548606873, 0.2983797788619995, -0.17369399964809418, -0.00430452823638916, 0.17776790261268616, 0.2228448987007141, -0.0594332218170166, -0.013504154980182648, -0.562785267829895, 0.039704762399196625, 0.08863552659749985, -0.12246932089328766, 0.01563488319516182, -0.06318704783916473, 0.5986499786376953, -0.09856997430324554, 0.4436226785182953, 0.6600080728530884, -0.00012158869503764436, 0.2243557572364807, 0.13810023665428162, -0.11296793073415756, -0.06387326121330261, -0.10991713404655457, -0.08671565353870392, -0.01259775459766388, 0.3420388102531433, -0.3319576680660248, -0.35599470138549805, 0.08210556209087372, -0.16528767347335815, -0.11661862581968307, 0.613518476486206, 0.6352989077568054, 0.12283143401145935, 0.479275107383728, 0.14653997123241425, -0.08347094058990479, 0.020959438756108284, 0.5227452516555786, -0.1228601336479187, 0.15958374738693237, -0.15279614925384521, 0.022461093962192535, 0.14259374141693115, 0.027535319328308105, -0.03191838786005974, 0.07168545573949814, 0.18322038650512695, 0.24965859949588776, -0.04308714717626572, -0.1485687494277954, 0.033481985330581665, 0.38304194808006287, 0.5417981147766113, -0.16483601927757263, -0.29708221554756165, 0.2328345775604248, -0.20133039355278015, 0.1891903579235077, 0.20702078938484192, -0.21750062704086304, -0.07902941852807999, 0.3170367479324341, 0.046308331191539764, 0.05375106632709503, -0.5300684571266174, 0.25790461897850037, -0.4150545001029968, 0.08962234854698181, -0.0437609925866127, -0.010735660791397095, -0.04735077545046806, -0.05344598367810249, 0.2322327196598053, -0.059067416936159134, 0.12591329216957092, 0.03729122504591942, -0.07203230261802673, -0.44817620515823364, -0.14259004592895508, -0.6522209048271179, -0.02023714780807495, -0.2943965494632721, -0.1380200833082199, -0.08368538320064545, -0.12652495503425598, 0.02490958943963051, 0.2738182544708252, 0.19266432523727417, 0.04564039781689644, 0.45908358693122864, 0.03481733798980713, -0.07174267619848251, -0.1264064610004425, -0.08590169250965118, -0.20323415100574493, -0.10888509452342987, 0.043236762285232544, -0.05160577967762947, 0.1824841946363449, -0.10043080896139145, -0.21992909908294678, 0.04891689494252205, -0.27247315645217896, 0.08476503193378448, 0.0485573448240757, 0.23578250408172607, -0.27929627895355225, 0.4690496027469635, 0.18467292189598083, 0.049111682921648026, 0.005337372422218323, -0.04875842481851578, -0.08543005585670471, 0.08285833150148392, -0.2273225039243698, -0.38460540771484375, 0.18906553089618683, 0.03689561411738396, 0.22206485271453857, -0.014060165733098984, 0.12456046044826508, 0.09543265402317047, -0.07910443097352982, -0.40348780155181885, 0.5019280314445496, 0.1971687376499176, -0.08215568959712982, 0.16377589106559753, 0.17619992792606354, -0.0015030503273010254, -0.08316540718078613, 0.1757148653268814, -0.4500829577445984, -0.2083309292793274, -0.363292932510376, 0.09251461178064346, -0.09944199025630951, -0.046120885759592056, -0.21725958585739136, 0.06249519810080528, 0.39904552698135376, -0.2587805986404419, -0.21567970514297485, -0.43744900822639465, 0.0972859263420105, -0.0488237626850605, 0.4217371940612793, 0.17389515042304993, -0.29749980568885803, 0.0588589608669281, 0.08262577652931213, 0.017537657171487808, 0.28926268219947815, 0.40836042165756226, -0.23638854920864105, 0.26401200890541077, -0.0008477568626403809, -0.01775284856557846, 0.360771119594574, -0.4188159704208374, -0.3843914866447449, 0.2941000461578369, 0.10121947526931763, 0.28905460238456726, 0.09365658462047577, -0.07019807398319244, 0.31630659103393555, 0.028082583099603653, 0.04038156569004059, 0.4498960077762604, -0.10381685197353363, 0.0308116152882576, -0.2344369888305664, -0.08343654870986938, 0.3137347996234894, 0.05382518470287323, 0.13407571613788605, 0.28536638617515564, -0.14893706142902374, 0.7845433354377747, 0.1888434886932373, 0.06216442957520485, -0.03065241314470768, 0.04452524334192276, 0.1870182752609253, 0.04469946771860123, 0.08304908871650696, -0.07090595364570618, -0.3036062717437744, -0.016921885311603546, 0.016319170594215393, 0.13198323547840118, 0.0019594840705394745, -0.12682612240314484, -0.08826294541358948, -0.06563039124011993, -0.2912072241306305, -0.32012805342674255, 0.05997604504227638, 0.04051683470606804, -0.1255401372909546, -0.1727314442396164, -0.1707330048084259, -0.06482110172510147, 0.05498161166906357, 0.09340902417898178, -0.0020279698073863983, 0.2185003012418747, -0.21461889147758484, -0.1511489748954773, -0.2818814516067505, 0.2156207263469696, -0.06821344792842865, -0.18582391738891602, -0.12056732922792435, 0.15764644742012024, 0.20595209300518036, -0.06422275304794312, -0.2420240342617035, 0.027611136436462402, 0.2936692237854004, -0.47849082946777344, -0.2221241444349289, 0.40703925490379333, 0.16610197722911835, -0.06261274218559265, -0.15708276629447937, 0.2626796364784241, 0.3056449890136719, 0.086015485227108, -0.1260662078857422, 0.28550925850868225, 0.24327409267425537, 0.08518582582473755, 0.040810488164424896, -0.1392354816198349, -0.24834990501403809, 0.18076878786087036, 0.015360333025455475, -0.030591120943427086, -0.24272194504737854, -0.21139726042747498, 0.2773720622062683, 0.17947125434875488, 0.026977386325597763, 0.15661723911762238, -0.1928844153881073, -0.05722871422767639, -0.15366870164871216, -0.4852006435394287, 0.3427826762199402, -0.002588745206594467, -0.03021240234375, -0.19812870025634766, 0.00754808634519577, -0.1956353783607483, 0.2596350908279419, 0.14201167225837708, -0.13342884182929993, 0.062091074883937836, 0.0782538503408432, 0.2050291746854782, 0.044632747769355774, -0.24896343052387238, -0.005460355430841446, 0.24090032279491425, -0.3303108215332031, 0.3991948962211609, -0.23050794005393982, 0.12855471670627594, -0.5074337124824524, -0.36992019414901733, -0.040948279201984406, 0.04712802171707153, -0.019297804683446884, 0.18833941221237183, 0.07647570967674255, 0.3283499479293823, 0.49052873253822327, 0.03754770755767822, 0.3371836245059967, -0.2740341126918793, -0.17134159803390503, -0.19373922049999237, -0.31671276688575745, 0.060544539242982864, 0.06643538177013397, -0.30776074528694153, -0.017272425815463066, -0.2587934732437134, -0.033310092985630035, -0.261576771736145, -0.36471492052078247, 0.09527984261512756, -0.03877094388008118, 0.22816738486289978, 0.348408579826355, 0.15291520953178406, -0.025652453303337097, -0.1825980544090271, 0.12483830749988556, -0.010255269706249237, 0.015360064804553986, 0.1679573506116867, -0.14972138404846191, 0.08454322814941406, -0.1343652606010437, -0.4810853600502014, -0.020665619522333145, -0.06278184801340103, -0.1587054580450058, -0.048309050500392914, 0.03825291991233826, 0.2776559889316559, 0.33453887701034546, 0.23045897483825684, -0.012849939987063408, 0.2643001079559326, -0.03018927201628685, -0.16793403029441833, 0.3866286873817444, -0.21066370606422424, -0.46427834033966064, -0.2453286051750183, -0.16758444905281067, 0.22758236527442932, 0.26100224256515503, -0.09346356987953186, -0.20742622017860413, -0.015303188934922218, 0.043360546231269836, -0.04622318223118782, 0.179012730717659, 0.3033774793148041, 0.011659272015094757, 0.10725850611925125, -0.03483680635690689, 0.14335890114307404, 0.2833932340145111, -0.0025534098967909813, 0.2211274653673172, 0.009381145238876343, 0.12519797682762146, 0.09959937632083893, 0.873191237449646, 0.10172310471534729, -0.6480159163475037, 0.04811985045671463, -0.3322475254535675, 0.13957013189792633, -0.08415527641773224, -0.3818659782409668, -0.0243266299366951, 0.054143425077199936, 0.11948297917842865, 0.21217739582061768, -0.2765320837497711, -0.006718425080180168, -0.21747450530529022, 0.0942995697259903, -0.013598538935184479, -0.346116840839386, 0.3215678036212921, -0.5181785821914673, 0.3677852749824524, -0.07197756320238113, 0.3681243062019348, 0.004782885313034058, -0.12775567173957825, 0.014247506856918335, 0.30733922123908997, -0.08778586238622665, 0.05621451884508133, 0.22226902842521667, -0.48168957233428955, -0.27431681752204895, 0.16536186635494232, 0.17172744870185852, 0.5209486484527588, 0.02963130921125412, -0.02151522785425186, 0.07058447599411011, 0.36731410026550293, 0.6872273683547974, 0.1268402487039566, -0.22081588208675385, -0.04370758309960365, -0.3197450637817383, -0.18436507880687714, -0.06833206117153168, -0.33738231658935547, -0.05378677323460579, -0.08568552136421204, 0.3698982000350952, -0.2858908176422119, -0.4242016673088074, 0.09092076122760773, 0.019098985940217972, -0.15490737557411194, 0.09180250018835068, -0.11749499291181564, 0.005991041660308838, -0.060428258031606674, 0.0036033540964126587, 0.3337489664554596, 0.2999109923839569, 0.10331153124570847, 0.01823236048221588, -0.4734346270561218, -0.030488964170217514, 0.2358568161725998, 0.2921662926673889, 0.21736378967761993, -0.14081251621246338, 0.13464483618736267, 0.03177543729543686, 0.3933211863040924, 0.3439792990684509, -0.024796389043331146, -0.06207192689180374, -0.5286920666694641, 0.05804568901658058, -0.10379131883382797, 0.182697594165802, 0.13708218932151794, -0.020412763580679893, -0.2051335573196411, -0.0973324254155159, -0.1712697446346283, 0.0839465856552124, 0.37504881620407104, 0.40634599328041077, -0.21976611018180847, -0.41866517066955566, -0.3418600857257843, 0.17925584316253662, 0.11299586296081543, 0.2143828272819519, -0.056932233273983, 0.03484310954809189, -0.33671554923057556, 0.23841404914855957, 0.3113788962364197, 0.7732337713241577, 0.16004343330860138, 0.37327608466148376, 0.4100531041622162, 0.031599923968315125, 0.4551633894443512, -0.24357300996780396, 0.10647058486938477, -0.30155113339424133, -0.08319878578186035, -0.17877227067947388, -0.06073930487036705, 0.09333880245685577, 0.1444777250289917, -0.33197784423828125, 0.22209808230400085, -0.26251351833343506, 0.5043290257453918, 0.3125205636024475, 0.10229231417179108, 0.5489413142204285, -0.2405087649822235, -0.05091474950313568, 0.012398600578308105, -0.15021651983261108, 0.3189893662929535, -0.015051018446683884, -0.44081538915634155, -0.08227548003196716, -0.303566575050354, -0.10421553254127502, 0.05204173922538757, -0.3217768967151642, 0.27756011486053467, 0.31325316429138184, -0.46706515550613403, 0.32113271951675415, 0.3987423777580261, 0.3391059637069702, 0.13532476127147675, -0.3357662558555603, 0.1328023374080658, -0.11816420406103134, 0.14612898230552673, -0.07389911264181137, -0.09688431024551392, 0.5543758869171143, -0.048066623508930206, 0.12225574254989624, 0.3165631890296936, -0.050701484084129333, -0.008296340703964233, 0.015833154320716858, -0.042064353823661804, 0.29283446073532104, -0.5365350246429443, -0.18711119890213013, -0.19983473420143127, -0.29549354314804077, -0.08881682902574539, 0.07583245635032654, 0.059584397822618484, -0.17575591802597046, 0.2041683942079544, -0.10527101159095764, -0.05650615692138672, -0.029514741152524948, 0.4834569990634918, 0.21674548089504242, -0.19212083518505096, 0.4645055830478668, 0.03184331953525543, -0.1222415566444397, -0.244378000497818, 0.016398221254348755, 0.2116062194108963, -0.7052996158599854, 0.18648077547550201, -0.07512558251619339, -0.24165169894695282, -0.186531201004982, 0.3506818115711212, 0.09634201228618622, 0.08547712862491608, -0.10805605351924896, -0.09375788271427155, -0.3451751172542572, -0.0313442200422287, -0.19645728170871735, 0.15896010398864746, 0.15845945477485657, 0.6223709583282471, -0.030093207955360413, -0.11380139738321304, -0.21684399247169495, 0.08798190206289291, 0.1626095026731491, 0.31158459186553955, -0.26388826966285706, -0.14822614192962646, 0.27616655826568604, -0.16708920896053314, 0.021549049764871597, 0.11424760520458221, 0.10298239439725876, -0.1263684630393982, -0.34756502509117126, 0.1565016806125641, 0.13478794693946838, -0.06534206867218018, -0.06687459349632263, 0.16770796477794647, -0.3207866847515106, -0.161067396402359, 0.10441483557224274, -0.009586118161678314, -0.04879884794354439, 0.5547992587089539, -0.015746086835861206, 0.22254857420921326, -0.413747638463974, -0.23830381035804749, 0.03127897530794144, 0.0960477888584137, -0.04747644066810608, 0.0930599793791771, -0.17502957582473755, -0.24345257878303528, -0.4716794788837433, 0.2516968846321106, 0.06866990774869919, -0.023943353444337845, 0.30197980999946594, -0.11356742680072784, 0.007558904588222504, 0.18933188915252686, 0.16976383328437805, 0.118013396859169, -0.0644674077630043, -0.09177734702825546, 0.18206903338432312, 0.08114264905452728, -0.18199874460697174, 0.014268197119235992, 0.05911623314023018, -0.10724804550409317, -0.1862768530845642, 0.18280845880508423, -0.171794131398201, 0.3460685610771179, 0.19989818334579468, 0.11786477267742157, -0.09940177202224731, -0.18876971304416656, 0.234346404671669, 0.6368317008018494, -0.08552124351263046, 0.3567544221878052, 0.1488320380449295, 0.0611877515912056, 0.1687893569469452, 0.4367952048778534, -0.22607421875, 0.3516668677330017, -0.19740325212478638, -0.2503172755241394, 0.4370851516723633, 0.028357453644275665, -0.5230381488800049, -0.4215501546859741, 0.03974178060889244, 0.12825605273246765, -0.07414284348487854, 0.563642680644989, -0.4428386688232422, -0.22172077000141144, -0.2230963110923767, -0.17829261720180511, -0.30713778734207153, 0.13448894023895264, 0.021015509963035583, 0.04554364085197449, -0.140321284532547, -0.2922036051750183, -0.3072238862514496, 0.1759064644575119, 0.28229495882987976, 0.25650808215141296, -0.20549219846725464, -0.12471260130405426, 0.11568086594343185, 0.16309943795204163, 0.027956871315836906, -0.07785750180482864, 0.0872739776968956, -0.14199157059192657, -0.22460487484931946, -0.05756165087223053, 0.3314725458621979, 0.18763956427574158, 0.23952987790107727, -0.09462198615074158, -0.291177362203598, -0.11664308607578278, -0.3157767057418823, 0.10133885592222214, 0.21671099960803986, 0.12814699113368988, -0.038679733872413635, 0.11885273456573486, 0.06212903559207916, -0.08095649629831314, 0.10317745804786682, -0.02022826485335827, 0.2560816705226898, -0.23324868083000183, 0.6767632365226746, 0.0036997944116592407, -0.18765640258789062, -0.029109548777341843, -0.10695326328277588, -0.23348411917686462, 0.026867181062698364, 0.1182936578989029, 0.40242674946784973, 0.02501259371638298, -0.12710246443748474, 0.005316704511642456, 0.08738948404788971, 0.4586597681045532, 0.2942652702331543, -0.03551036864519119, -0.38282445073127747, 0.25660446286201477, -0.13175137341022491, 0.3037298917770386, 0.2938821613788605, -0.06686757504940033, -0.030761364847421646, 0.05055123567581177, 0.056676071137189865, 0.23520086705684662, -0.09971485286951065, -0.545771062374115, 0.14324691891670227, 0.06453914940357208, -0.15130704641342163, -0.22577255964279175, -0.39617645740509033, 0.0472681000828743, 0.15901193022727966, -0.3487338423728943, 0.13435107469558716, 0.06687994301319122, 0.0347539484500885, -0.3956032991409302, -0.21797120571136475, 0.1636199951171875, 0.3428831100463867, 0.13210801780223846, 0.07902779430150986, 0.3885047435760498, 0.09731438755989075, 0.10899833589792252, -0.04391838237643242, -0.029090531170368195, -0.13905930519104004, 0.11932958662509918, 0.24284891784191132, 0.43188267946243286, -0.19984573125839233, -0.05088762193918228, -0.44263792037963867, 0.21258965134620667, 0.13635492324829102, -0.1889851987361908, -0.41377976536750793, 0.19398978352546692, -0.2940528392791748, -0.09492310881614685, 0.18074297904968262, 0.6175066232681274, -0.18549932539463043, 0.06623336672782898, -0.549549400806427, -0.37439170479774475, 0.27802303433418274, -0.43140384554862976, -0.37081971764564514, -0.1583137959241867, 0.06797969341278076, 0.16378153860569, 0.16144874691963196, -0.5803871154785156, -0.0046147555112838745, 0.21751317381858826, -0.12236199527978897, -0.37102311849594116, 0.0904456228017807, 0.44023045897483826, 0.26013508439064026, -0.13622444868087769, 0.4345264434814453, 0.04904124513268471, -0.09926598519086838, -0.12028845399618149, -0.2782081365585327 ]
https://github.com/huggingface/datasets/issues/6369
The inconsistency may be caused by the usage of "update_fingerprint" and setting "trust_remote_code" to "True." When the tokenizer employs "trust_remote_code," the behavior of the map function varies with each code execution. Even if the remote code of the tokenizer remains the same, the result of "asher.hexdigest()" is found to be inconsistent each time. This may result in different processes executing multiple maps ![1698841094290](https://github.com/huggingface/datasets/assets/14285786/21fc3c65-e9fd-4a79-b12e-a1d4b9c6cf32) ![1698841117416](https://github.com/huggingface/datasets/assets/14285786/c3e5a530-54d2-4ae6-b902-ce9f85de373b)
Multi process map did not load cache file correctly
### Describe the bug When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process. ![1698820541284](https://github.com/huggingface/datasets/assets/14285786/0b2fe054-54d8-4e00-96e6-6ca5b69e662b) ![1698820501568](https://github.com/huggingface/datasets/assets/14285786/dd62bf6f-a58f-41bf-9848-ea4fb3b62b9b) Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484) ### Steps to reproduce the bug ``` block_size = data_args.block_size IGNORE_INDEX = -100 Ignore_Input = False def tokenize_function(examples): sources = [] targets = [] for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']): source = instruction + inputs target = f"{output}{tokenizer.eos_token}" sources.append(source) targets.append(target) tokenized_sources = tokenizer(sources, return_attention_mask=False) tokenized_targets = tokenizer(targets, return_attention_mask=False, add_special_tokens=False ) all_input_ids = [] all_labels = [] for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']): if len(s) > block_size and Ignore_Input == False: # print(s) continue input_ids = torch.LongTensor(s + t)[:block_size] if Ignore_Input: labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size] else: labels = input_ids assert len(input_ids) == len(labels) all_input_ids.append(input_ids) all_labels.append(labels) results = { 'input_ids': all_input_ids, 'labels': all_labels, } return results with training_args.main_process_first(desc="dataset map tokenization ", local=False): # print('local_rank',training_args.local_rank) if not data_args.streaming: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=data_args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not data_args.overwrite_cache, desc="Running tokenizer on dataset ", ) else: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, remove_columns=column_names, desc="Running tokenizer on dataset " ) ``` ### Expected behavior This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting ### Environment info transformers == 4.34.1 datasets == 2.14.5
64
Multi process map did not load cache file correctly ### Describe the bug When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process. ![1698820541284](https://github.com/huggingface/datasets/assets/14285786/0b2fe054-54d8-4e00-96e6-6ca5b69e662b) ![1698820501568](https://github.com/huggingface/datasets/assets/14285786/dd62bf6f-a58f-41bf-9848-ea4fb3b62b9b) Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484) ### Steps to reproduce the bug ``` block_size = data_args.block_size IGNORE_INDEX = -100 Ignore_Input = False def tokenize_function(examples): sources = [] targets = [] for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']): source = instruction + inputs target = f"{output}{tokenizer.eos_token}" sources.append(source) targets.append(target) tokenized_sources = tokenizer(sources, return_attention_mask=False) tokenized_targets = tokenizer(targets, return_attention_mask=False, add_special_tokens=False ) all_input_ids = [] all_labels = [] for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']): if len(s) > block_size and Ignore_Input == False: # print(s) continue input_ids = torch.LongTensor(s + t)[:block_size] if Ignore_Input: labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size] else: labels = input_ids assert len(input_ids) == len(labels) all_input_ids.append(input_ids) all_labels.append(labels) results = { 'input_ids': all_input_ids, 'labels': all_labels, } return results with training_args.main_process_first(desc="dataset map tokenization ", local=False): # print('local_rank',training_args.local_rank) if not data_args.streaming: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=data_args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not data_args.overwrite_cache, desc="Running tokenizer on dataset ", ) else: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, remove_columns=column_names, desc="Running tokenizer on dataset " ) ``` ### Expected behavior This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting ### Environment info transformers == 4.34.1 datasets == 2.14.5 The inconsistency may be caused by the usage of "update_fingerprint" and setting "trust_remote_code" to "True." When the tokenizer employs "trust_remote_code," the behavior of the map function varies with each code execution. Even if the remote code of the tokenizer remains the same, the result of "asher.hexdigest()" is found to be inconsistent each time. This may result in different processes executing multiple maps ![1698841094290](https://github.com/huggingface/datasets/assets/14285786/21fc3c65-e9fd-4a79-b12e-a1d4b9c6cf32) ![1698841117416](https://github.com/huggingface/datasets/assets/14285786/c3e5a530-54d2-4ae6-b902-ce9f85de373b)
[ -0.3758842647075653, -0.5878843069076538, 0.032787516713142395, 0.44652554392814636, 0.30833250284194946, -0.06708855926990509, 0.3846704661846161, -0.0230244230479002, 0.11546281725168228, -0.130690798163414, 0.03220471739768982, 0.1839643120765686, 0.011365003883838654, -0.16018880903720856, 0.22068113088607788, -0.04639360308647156, 0.23309653997421265, -0.09889067709445953, 0.25963956117630005, -0.043918464332818985, -0.07259543985128403, 0.16843989491462708, -0.023828059434890747, 0.1142701506614685, -0.7611029744148254, -0.24884234368801117, -0.2706131041049957, 0.04479319602251053, 0.09483681619167328, -0.38677331805229187, -0.007349289953708649, 0.2703377902507782, 0.030349746346473694, 0.4049658477306366, -0.00012022876762785017, -0.06745299696922302, -0.07974615693092346, -0.06846130639314651, 0.11956527829170227, 0.05133308097720146, 0.2856757640838623, -0.03671669960021973, 0.032381437718868256, -0.3001784086227417, -0.059303440153598785, -0.12905529141426086, 0.019631771370768547, -0.10994642227888107, 0.6139715313911438, -0.018123891204595566, 0.15787357091903687, 0.23834945261478424, -0.11117133498191833, -0.01171480119228363, -0.00791437178850174, 0.0234975628554821, 0.02816671133041382, 0.30590522289276123, 0.13348078727722168, -0.23994503915309906, -0.34937310218811035, 0.4579474925994873, -0.3030812740325928, 0.13927704095840454, 0.016668790951371193, -0.051629021763801575, 0.3218017816543579, -0.24838319420814514, 0.20118960738182068, -0.17308339476585388, 0.06411679089069366, -0.34846487641334534, -0.10883322358131409, -0.2487117499113083, -0.10952697694301605, -0.41067272424697876, 0.06099053472280502, 0.09674863517284393, 0.10890792310237885, 0.02695632167160511, -0.2739849388599396, -0.06649923324584961, 0.1412847340106964, -0.14327532052993774, 0.03828224539756775, 0.47475767135620117, 0.05626363307237625, 0.22025234997272491, -0.057733677327632904, 0.24356554448604584, -0.19938525557518005, 0.14177027344703674, -0.13003993034362793, 0.1745365858078003, -0.43984460830688477, 0.11566847562789917, 0.14330606162548065, -0.20905514061450958, 0.024338848888874054, 0.10905120521783829, -0.12433245778083801, 0.23093107342720032, 0.22433850169181824, 0.10604599863290787, 0.06012273207306862, 0.3098629415035248, -0.08669739961624146, 0.37444427609443665, 0.10358645021915436, -0.19655928015708923, -0.6160250902175903, -0.08625693619251251, -0.2017902284860611, 0.07781682908535004, 0.2205851972103119, 0.17024868726730347, -0.10253169387578964, 0.012299984693527222, 0.04428233206272125, -0.028451189398765564, -0.17283746600151062, -0.07353339344263077, 0.09680088609457016, 0.573980450630188, -0.07143531739711761, 0.25668713450431824, -0.11808609217405319, -0.006592513993382454, -0.38013339042663574, 0.013272374868392944, -0.32165348529815674, -0.1732420027256012, -0.2774769365787506, 0.2031145989894867, 0.018485791981220245, 0.07082493603229523, 0.41167911887168884, 0.16054697334766388, 0.011805436573922634, -0.4575543999671936, 0.3853899836540222, -0.11114837229251862, 0.24312759935855865, 0.17612838745117188, -0.08562880754470825, 0.1351296305656433, 0.24664348363876343, 0.12818673253059387, -0.08739731460809708, 0.0006479695439338684, -0.5313720703125, -0.3649709224700928, 0.14562135934829712, 0.11860834062099457, 0.14023981988430023, 0.2883141338825226, -0.0790192186832428, 0.09309225529432297, 0.7046105861663818, -0.09935208410024643, 0.04161440581083298, -0.22417303919792175, -0.4516300559043884, -0.22748485207557678, 0.22911736369132996, 0.6116631627082825, 0.2846032381057739, -0.3317965865135193, 0.5714664459228516, -0.0076134093105793, 0.42778894305229187, 0.384381502866745, -0.222025066614151, 0.3704081177711487, -0.44830039143562317, 0.07830972969532013, -0.03411789983510971, -0.3772508203983307, -0.2667810320854187, 0.20360106229782104, -0.33372852206230164, 0.09925330430269241, 0.2808815538883209, -0.07778451591730118, 0.3536165654659271, 0.0728277713060379, 0.3196015954017639, 0.10974348336458206, -0.07788223773241043, 0.4438732862472534, -0.2902148962020874, 0.10684891045093536, 0.21163417398929596, 0.025167420506477356, 0.22238853573799133, -0.03585471212863922, -0.02597822993993759, 0.29670512676239014, 0.38045552372932434, -0.04892721772193909, -0.04421465843915939, 0.14151547849178314, -0.01125856302678585, -0.03928866982460022, 0.291925847530365, -0.09925615787506104, -0.2991335391998291, 0.16674304008483887, -0.35111933946609497, -0.25444334745407104, -0.10386119782924652, -0.24411995708942413, 0.15940234065055847, -0.055865563452243805, -0.4145631492137909, -0.46748611330986023, 0.07654831558465958, 0.2283444106578827, 0.08983010053634644, -0.05329865217208862, -0.09459907561540604, 0.4571547210216522, 0.012432008981704712, 0.0350940115749836, -0.044560424983501434, 0.07420770823955536, -0.15007013082504272, -0.0967462956905365, -0.16216230392456055, 0.23686246573925018, 0.3932054936885834, -0.30021917819976807, -0.1795911192893982, 0.28424984216690063, 0.35804519057273865, 0.13826978206634521, -0.16454388201236725, 0.11552398651838303, 0.3385787010192871, 0.12245380133390427, -0.017214231193065643, 0.016066327691078186, -0.06826367229223251, -0.2252872884273529, 0.20385020971298218, 0.3527762293815613, 0.48492035269737244, -0.12337170541286469, -0.03427737206220627, -0.15239515900611877, 0.28297191858291626, -0.0525849312543869, 0.13655206561088562, -0.12477029860019684, 0.21742115914821625, 0.18211036920547485, 0.4227886199951172, 0.06633462011814117, -0.12069456279277802, 0.11235330998897552, 0.32525989413261414, 0.22571176290512085, 0.08119162917137146, -0.19530344009399414, -0.24389171600341797, -0.1959036886692047, 0.013419786468148232, -0.01829209178686142, 0.31153133511543274, 0.09237460792064667, 0.07642790675163269, 0.015604710206389427, -0.026351572945713997, -0.08221059292554855, 0.03661360591650009, -0.2015116810798645, 0.15320999920368195, 0.39694443345069885, 0.08528834581375122, 0.10185487568378448, -0.3077104985713959, 0.0061561912298202515, 0.4336366355419159, 0.18921108543872833, -0.21351787447929382, 0.19208751618862152, -0.28107354044914246, -0.16501381993293762, -0.20298296213150024, 0.20734576880931854, -0.23630091547966003, 0.005958050489425659, -0.036854010075330734, 0.2263290137052536, 0.08204227685928345, 0.3846435844898224, 0.10573523491621017, 0.11133550107479095, 0.0078017860651016235, 0.022570481523871422, -0.07259082794189453, -0.22445893287658691, -0.14357610046863556, -0.09809239208698273, 0.33434832096099854, -0.25028952956199646, 0.4477258026599884, -0.020479507744312286, -0.2534567713737488, -0.3399384021759033, -0.22434581816196442, 0.1853145956993103, 0.2586011588573456, -0.16358087956905365, -0.09631913900375366, -0.21542906761169434, -0.26505786180496216, -0.12395831942558289, 0.3023335337638855, -0.5098352432250977, -0.3046594262123108, 0.007032841444015503, -0.2578853964805603, -0.2725445628166199, -0.17106738686561584, -0.13303546607494354, -0.13823778927326202, -0.0871642455458641, 0.19291283190250397, -0.2887360453605652, 0.21674250066280365, -0.047006815671920776, -0.3090488016605377, -0.02892671711742878, -0.2851341962814331, 0.01798226311802864, -0.21558687090873718, -0.23655672371387482, -0.10500697046518326, -0.2685272991657257, -0.23564700782299042, -0.12221527844667435, 0.0008557513356208801, 0.20128539204597473, 0.4119443893432617, -0.4336656332015991, -0.31044769287109375, 0.15589067339897156, -0.1283716857433319, -0.2194029837846756, -0.03732037544250488, 0.37480419874191284, -0.01169656403362751, 0.022275634109973907, 0.09588092565536499, -0.08267055451869965, 0.19811058044433594, -0.06445715576410294, 0.19077424705028534, -0.14168280363082886, 0.3429133892059326, 0.08204810321331024, 0.8412365317344666, 0.20124472677707672, -0.10022033751010895, 0.22882597148418427, -0.13759228587150574, -0.025830022990703583, -0.12443670630455017, -0.40511631965637207, 0.07617723196744919, -0.3777614235877991, -0.12231549620628357, 0.25022244453430176, -0.04885935038328171, -0.2918366491794586, 0.05336672067642212, -0.010636880993843079, -0.14385800063610077, -0.10184323787689209, 0.11740719527006149, -0.2439659833908081, 0.38280409574508667, 0.030043751001358032, -0.008126713335514069, -0.33985668420791626, 0.04695703461766243, 0.19935433566570282, 0.14448915421962738, 0.1248084008693695, -0.05243482440710068, -0.30122241377830505, 0.09647396206855774, -0.33762237429618835, 0.1285201460123062, 0.24279260635375977, 0.24294455349445343, -0.1127178966999054, 0.19846490025520325, 0.17921173572540283, -0.17247724533081055, 0.7401275634765625, 0.2102784514427185, 0.309577077627182, 0.18628931045532227, -0.4642438292503357, -0.06042441353201866, -0.18363966047763824, -0.002783365547657013, 0.3928453326225281, 0.5032205581665039, 0.6812999248504639, -0.20913684368133545, -0.2562396228313446, -0.36485224962234497, -0.037955090403556824, -0.2327730804681778, -0.09688487648963928, -0.33611154556274414, 0.03080420196056366, -0.4779032766819, 0.4840617775917053, 0.06188732385635376, 0.12470273673534393, -0.008903808891773224, -0.182722806930542, -0.10692598670721054, 0.023591764271259308, -0.20271877944469452, 0.0462450310587883, 0.4827888011932373, 0.010333549231290817, 0.16078665852546692, 0.07761538028717041, 0.30135318636894226, 0.029810277745127678, 0.23789435625076294, -0.15425118803977966, -0.1729060411453247, 0.32635828852653503, 0.11323630809783936, 0.0953313559293747, 0.36496439576148987, -0.0038156285881996155, 0.2932937741279602, -0.07065100967884064, 0.24692195653915405, -0.09713828563690186, 0.2614273130893707, 0.09047084301710129, 0.1561492681503296, -0.28974735736846924, -0.32194983959198, -0.0017898380756378174, 0.15546633303165436, -0.18543684482574463, 0.486970990896225, -0.5467329621315002, -0.24589498341083527, 0.37482526898384094, 0.028168518096208572, 0.7292393445968628, -0.27318254113197327, 0.22707536816596985, -0.023911578580737114, 0.012093767523765564, 0.06532247364521027, -0.46059298515319824, 0.21390163898468018, -0.626311719417572, -0.16144438087940216, 0.11095423251390457, -0.1772141456604004, -0.12393463402986526, 0.20826835930347443, -0.006675258278846741, 0.09716444462537766, 0.21416063606739044, 0.43509453535079956, -0.016917072236537933, 0.3878853917121887, 0.33632537722587585, -0.3557003140449524, -0.11997050046920776, 0.011548694223165512, -0.20563846826553345, 0.1543945074081421, -0.26111915707588196, 0.03369998559355736, 0.3256959319114685, -0.23969143629074097, -0.1725383996963501, 0.14180485904216766, -0.7761969566345215, 0.4627421796321869, -0.06683698296546936, -0.06029801815748215, -0.22626689076423645, 0.2843294143676758, 0.18346817791461945, 0.045462705194950104, -0.08250699937343597, 0.08563926815986633, 0.06304532289505005, 0.03802233934402466, -0.20108662545681, -0.3253646492958069, 0.2559545934200287, -0.11559358239173889, -0.13186906278133392, -0.2528042793273926, -0.0701267346739769, -0.3225018084049225, 0.01918807625770569, 0.28207677602767944, 0.24348776042461395, 0.24635246396064758, 0.11438232660293579, -0.019210413098335266, 0.08671130985021591, -0.22967855632305145, 0.05143941938877106, 0.2087801694869995, -0.23998582363128662, 0.0573229044675827, -0.15889333188533783, -0.2739490866661072, 0.005907702259719372, 0.3690639138221741, -0.04796876013278961, -0.17943695187568665, 0.3894449770450592, 0.02357526123523712, -0.14557212591171265, -0.22797265648841858, -0.21925389766693115, 0.01807408407330513, -0.27380049228668213, 0.05168477073311806, -0.16854235529899597, -0.08602632582187653, 0.02959449589252472, -0.08195021748542786, 0.1339997947216034, 0.057653628289699554, 0.04701431095600128, -0.32999247312545776, -0.5211123824119568, -0.1352912038564682, -0.3345440626144409, -0.025219101458787918, 0.45407581329345703, 0.2397466003894806, 0.05641338974237442, 0.606138288974762, -0.2513331174850464, 0.11439139395952225, -0.10839308798313141, 0.08362500369548798, -0.10703407973051071, -0.16602829098701477, -0.02615208551287651, 0.06860823929309845, 0.009449940174818039, 0.396000474691391, -0.11843456327915192, -0.1826644241809845, -0.22366391122341156, 0.16793307662010193, 0.1026049330830574, 0.014142829924821854, 0.007179267704486847, -0.01431216299533844, 0.055098384618759155, -0.26173001527786255, 0.3186776041984558, 0.32030704617500305, 0.0846547782421112, -0.11269449442625046, 0.5118354558944702, 0.18230560421943665, -0.14583782851696014, 0.02138439193367958, -0.14462760090827942, -0.2824770212173462, 0.17017924785614014, 0.09503056108951569, -0.21231329441070557, 0.005075022578239441, -0.03857408091425896, -0.02756035327911377, 0.36896997690200806, -0.011591036804020405, 0.2497115135192871, -0.1424725353717804, -0.3002992272377014, 0.271872341632843, 0.0816454291343689, -0.012097315862774849, -0.1579810082912445, -0.07591959089040756, 0.2782089114189148, 0.13029831647872925, -0.21431219577789307, -0.13035225868225098, 0.4660514295101166, -0.10634748637676239, -0.1348564624786377, 0.3298298120498657, 0.6135555505752563, -0.0711674839258194, 0.09845180064439774, 0.18683725595474243, 0.46625104546546936, -0.45760226249694824, 0.1631394475698471, -0.43481120467185974, 0.07324179261922836, 0.2634950876235962, 0.40871474146842957, 0.15014195442199707, 0.0821397453546524, 0.05485564097762108, 0.242447167634964, 0.35609403252601624, 0.024041075259447098, 0.19336354732513428, 0.12317848950624466, -0.36877888441085815, -0.14895038306713104, 0.0502154678106308, -0.34822091460227966, 0.07378604263067245, -0.3511718213558197, 0.38534051179885864, -0.112869031727314, -0.5411105155944824, -0.2807518541812897, 0.49619072675704956, -0.44213172793388367, -0.14366033673286438, 0.06101231276988983, 0.02799832820892334, 0.0669628381729126, 0.128665030002594, 0.06855304539203644, 0.1792219877243042, 0.27044618129730225, 0.03389722853899002, -0.18404854834079742, 0.1032245010137558, -0.39150360226631165, 0.23166245222091675, 0.3441036641597748, -0.42772382497787476, 0.27922287583351135, 0.029076486825942993, -0.1717250794172287, -0.26463350653648376, 0.11710534244775772, 0.44711270928382874, 0.316058874130249, -0.01911911368370056, -0.049521058797836304, 0.22745689749717712, 0.25817060470581055, -0.2503555417060852, 0.36808064579963684, 0.09269140660762787, -0.22827941179275513, 0.017481505870819092, -0.0073929280042648315, -0.16916252672672272, -0.20156604051589966, 0.30392181873321533, 0.10028454661369324, 0.22948074340820312, 0.32963937520980835, -0.11683957278728485, -0.15457285940647125, 0.03822458162903786, 0.3113919496536255, -0.4480445384979248, 0.05044351890683174, 0.39636653661727905, -0.0605006068944931, 0.24457664787769318, -0.08968547731637955, 0.07809971272945404, 0.12276926636695862, 0.40487849712371826, 0.2677331864833832, 0.01410570926964283, -0.6027411222457886, -0.21236804127693176, -0.612362802028656, 0.47627124190330505, 0.060212504118680954, 0.19499215483665466, -0.09128683805465698, 0.07729023694992065, -0.0980839803814888, -0.20548035204410553, -0.17230837047100067, -0.15723532438278198, 0.3336084485054016, 0.21228834986686707, -0.5281358361244202, 0.22222952544689178, -0.3533902168273926, 0.04240749776363373, 0.2777879536151886, -0.3059481084346771, 0.2836005389690399, 0.12680289149284363, 0.015467636287212372, -0.05762743949890137, -0.09035247564315796, 0.052242279052734375, 0.007566303946077824, 0.27324995398521423, 0.1720665693283081, 0.4610636532306671, -0.006821013987064362, 0.124474436044693, -0.03423001244664192, 0.050253573805093765, -0.22705496847629547, -0.0691164880990982, 0.035689983516931534, 0.2862488031387329, -0.1740046888589859, -0.32533687353134155, -0.39855751395225525, 0.23422904312610626, 0.13533639907836914, -0.3962312638759613, -0.20664599537849426, 0.11177435517311096, 0.06067384034395218, 0.04118116572499275, 0.25915223360061646, 0.6599978804588318, 0.12293224781751633, 0.3050040602684021, -0.22494184970855713, -0.21156185865402222, 0.30302566289901733, -0.5903725028038025, -0.2062786966562271, -0.2685428261756897, 0.46421384811401367, -0.04997676983475685, 0.05002593249082565, -0.38105347752571106, -0.04841607064008713, 0.22489292919635773, -0.04513020068407059, -0.369234174489975, 0.16024470329284668, -0.033648550510406494, -0.09397464990615845, -0.13484463095664978, 0.25249844789505005, 0.03010600060224533, -0.33803755044937134, 0.027279697358608246, -0.18454942107200623 ]
https://github.com/huggingface/datasets/issues/6369
The issue may be related to problems previously discussed in GitHub issues [#3847](https://github.com/huggingface/datasets/issues/3847) and [#6318](https://github.com/huggingface/datasets/pull/6318). This arises from the fact that tokenizer.tokens_trie._tokens is an unordered set, leading to varying hash results: `value = hash_bytes(dumps(tokenizer.tokens_trie._tokens))` Consequently, this results in different outcomes each time for: `new_fingerprint = update_fingerprint(datasets._fingerprint, transform, kwargs_for_fingerprint)` To address this issue, it's essential to make `Trie._tokens` a deterministic set while ensuring a consistent order after the final update of `_tokens`.
Multi process map did not load cache file correctly
### Describe the bug When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process. ![1698820541284](https://github.com/huggingface/datasets/assets/14285786/0b2fe054-54d8-4e00-96e6-6ca5b69e662b) ![1698820501568](https://github.com/huggingface/datasets/assets/14285786/dd62bf6f-a58f-41bf-9848-ea4fb3b62b9b) Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484) ### Steps to reproduce the bug ``` block_size = data_args.block_size IGNORE_INDEX = -100 Ignore_Input = False def tokenize_function(examples): sources = [] targets = [] for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']): source = instruction + inputs target = f"{output}{tokenizer.eos_token}" sources.append(source) targets.append(target) tokenized_sources = tokenizer(sources, return_attention_mask=False) tokenized_targets = tokenizer(targets, return_attention_mask=False, add_special_tokens=False ) all_input_ids = [] all_labels = [] for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']): if len(s) > block_size and Ignore_Input == False: # print(s) continue input_ids = torch.LongTensor(s + t)[:block_size] if Ignore_Input: labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size] else: labels = input_ids assert len(input_ids) == len(labels) all_input_ids.append(input_ids) all_labels.append(labels) results = { 'input_ids': all_input_ids, 'labels': all_labels, } return results with training_args.main_process_first(desc="dataset map tokenization ", local=False): # print('local_rank',training_args.local_rank) if not data_args.streaming: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=data_args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not data_args.overwrite_cache, desc="Running tokenizer on dataset ", ) else: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, remove_columns=column_names, desc="Running tokenizer on dataset " ) ``` ### Expected behavior This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting ### Environment info transformers == 4.34.1 datasets == 2.14.5
71
Multi process map did not load cache file correctly ### Describe the bug When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process. ![1698820541284](https://github.com/huggingface/datasets/assets/14285786/0b2fe054-54d8-4e00-96e6-6ca5b69e662b) ![1698820501568](https://github.com/huggingface/datasets/assets/14285786/dd62bf6f-a58f-41bf-9848-ea4fb3b62b9b) Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484) ### Steps to reproduce the bug ``` block_size = data_args.block_size IGNORE_INDEX = -100 Ignore_Input = False def tokenize_function(examples): sources = [] targets = [] for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']): source = instruction + inputs target = f"{output}{tokenizer.eos_token}" sources.append(source) targets.append(target) tokenized_sources = tokenizer(sources, return_attention_mask=False) tokenized_targets = tokenizer(targets, return_attention_mask=False, add_special_tokens=False ) all_input_ids = [] all_labels = [] for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']): if len(s) > block_size and Ignore_Input == False: # print(s) continue input_ids = torch.LongTensor(s + t)[:block_size] if Ignore_Input: labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size] else: labels = input_ids assert len(input_ids) == len(labels) all_input_ids.append(input_ids) all_labels.append(labels) results = { 'input_ids': all_input_ids, 'labels': all_labels, } return results with training_args.main_process_first(desc="dataset map tokenization ", local=False): # print('local_rank',training_args.local_rank) if not data_args.streaming: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=data_args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not data_args.overwrite_cache, desc="Running tokenizer on dataset ", ) else: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, remove_columns=column_names, desc="Running tokenizer on dataset " ) ``` ### Expected behavior This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting ### Environment info transformers == 4.34.1 datasets == 2.14.5 The issue may be related to problems previously discussed in GitHub issues [#3847](https://github.com/huggingface/datasets/issues/3847) and [#6318](https://github.com/huggingface/datasets/pull/6318). This arises from the fact that tokenizer.tokens_trie._tokens is an unordered set, leading to varying hash results: `value = hash_bytes(dumps(tokenizer.tokens_trie._tokens))` Consequently, this results in different outcomes each time for: `new_fingerprint = update_fingerprint(datasets._fingerprint, transform, kwargs_for_fingerprint)` To address this issue, it's essential to make `Trie._tokens` a deterministic set while ensuring a consistent order after the final update of `_tokens`.
[ -0.3758842647075653, -0.5878843069076538, 0.032787516713142395, 0.44652554392814636, 0.30833250284194946, -0.06708855926990509, 0.3846704661846161, -0.0230244230479002, 0.11546281725168228, -0.130690798163414, 0.03220471739768982, 0.1839643120765686, 0.011365003883838654, -0.16018880903720856, 0.22068113088607788, -0.04639360308647156, 0.23309653997421265, -0.09889067709445953, 0.25963956117630005, -0.043918464332818985, -0.07259543985128403, 0.16843989491462708, -0.023828059434890747, 0.1142701506614685, -0.7611029744148254, -0.24884234368801117, -0.2706131041049957, 0.04479319602251053, 0.09483681619167328, -0.38677331805229187, -0.007349289953708649, 0.2703377902507782, 0.030349746346473694, 0.4049658477306366, -0.00012022876762785017, -0.06745299696922302, -0.07974615693092346, -0.06846130639314651, 0.11956527829170227, 0.05133308097720146, 0.2856757640838623, -0.03671669960021973, 0.032381437718868256, -0.3001784086227417, -0.059303440153598785, -0.12905529141426086, 0.019631771370768547, -0.10994642227888107, 0.6139715313911438, -0.018123891204595566, 0.15787357091903687, 0.23834945261478424, -0.11117133498191833, -0.01171480119228363, -0.00791437178850174, 0.0234975628554821, 0.02816671133041382, 0.30590522289276123, 0.13348078727722168, -0.23994503915309906, -0.34937310218811035, 0.4579474925994873, -0.3030812740325928, 0.13927704095840454, 0.016668790951371193, -0.051629021763801575, 0.3218017816543579, -0.24838319420814514, 0.20118960738182068, -0.17308339476585388, 0.06411679089069366, -0.34846487641334534, -0.10883322358131409, -0.2487117499113083, -0.10952697694301605, -0.41067272424697876, 0.06099053472280502, 0.09674863517284393, 0.10890792310237885, 0.02695632167160511, -0.2739849388599396, -0.06649923324584961, 0.1412847340106964, -0.14327532052993774, 0.03828224539756775, 0.47475767135620117, 0.05626363307237625, 0.22025234997272491, -0.057733677327632904, 0.24356554448604584, -0.19938525557518005, 0.14177027344703674, -0.13003993034362793, 0.1745365858078003, -0.43984460830688477, 0.11566847562789917, 0.14330606162548065, -0.20905514061450958, 0.024338848888874054, 0.10905120521783829, -0.12433245778083801, 0.23093107342720032, 0.22433850169181824, 0.10604599863290787, 0.06012273207306862, 0.3098629415035248, -0.08669739961624146, 0.37444427609443665, 0.10358645021915436, -0.19655928015708923, -0.6160250902175903, -0.08625693619251251, -0.2017902284860611, 0.07781682908535004, 0.2205851972103119, 0.17024868726730347, -0.10253169387578964, 0.012299984693527222, 0.04428233206272125, -0.028451189398765564, -0.17283746600151062, -0.07353339344263077, 0.09680088609457016, 0.573980450630188, -0.07143531739711761, 0.25668713450431824, -0.11808609217405319, -0.006592513993382454, -0.38013339042663574, 0.013272374868392944, -0.32165348529815674, -0.1732420027256012, -0.2774769365787506, 0.2031145989894867, 0.018485791981220245, 0.07082493603229523, 0.41167911887168884, 0.16054697334766388, 0.011805436573922634, -0.4575543999671936, 0.3853899836540222, -0.11114837229251862, 0.24312759935855865, 0.17612838745117188, -0.08562880754470825, 0.1351296305656433, 0.24664348363876343, 0.12818673253059387, -0.08739731460809708, 0.0006479695439338684, -0.5313720703125, -0.3649709224700928, 0.14562135934829712, 0.11860834062099457, 0.14023981988430023, 0.2883141338825226, -0.0790192186832428, 0.09309225529432297, 0.7046105861663818, -0.09935208410024643, 0.04161440581083298, -0.22417303919792175, -0.4516300559043884, -0.22748485207557678, 0.22911736369132996, 0.6116631627082825, 0.2846032381057739, -0.3317965865135193, 0.5714664459228516, -0.0076134093105793, 0.42778894305229187, 0.384381502866745, -0.222025066614151, 0.3704081177711487, -0.44830039143562317, 0.07830972969532013, -0.03411789983510971, -0.3772508203983307, -0.2667810320854187, 0.20360106229782104, -0.33372852206230164, 0.09925330430269241, 0.2808815538883209, -0.07778451591730118, 0.3536165654659271, 0.0728277713060379, 0.3196015954017639, 0.10974348336458206, -0.07788223773241043, 0.4438732862472534, -0.2902148962020874, 0.10684891045093536, 0.21163417398929596, 0.025167420506477356, 0.22238853573799133, -0.03585471212863922, -0.02597822993993759, 0.29670512676239014, 0.38045552372932434, -0.04892721772193909, -0.04421465843915939, 0.14151547849178314, -0.01125856302678585, -0.03928866982460022, 0.291925847530365, -0.09925615787506104, -0.2991335391998291, 0.16674304008483887, -0.35111933946609497, -0.25444334745407104, -0.10386119782924652, -0.24411995708942413, 0.15940234065055847, -0.055865563452243805, -0.4145631492137909, -0.46748611330986023, 0.07654831558465958, 0.2283444106578827, 0.08983010053634644, -0.05329865217208862, -0.09459907561540604, 0.4571547210216522, 0.012432008981704712, 0.0350940115749836, -0.044560424983501434, 0.07420770823955536, -0.15007013082504272, -0.0967462956905365, -0.16216230392456055, 0.23686246573925018, 0.3932054936885834, -0.30021917819976807, -0.1795911192893982, 0.28424984216690063, 0.35804519057273865, 0.13826978206634521, -0.16454388201236725, 0.11552398651838303, 0.3385787010192871, 0.12245380133390427, -0.017214231193065643, 0.016066327691078186, -0.06826367229223251, -0.2252872884273529, 0.20385020971298218, 0.3527762293815613, 0.48492035269737244, -0.12337170541286469, -0.03427737206220627, -0.15239515900611877, 0.28297191858291626, -0.0525849312543869, 0.13655206561088562, -0.12477029860019684, 0.21742115914821625, 0.18211036920547485, 0.4227886199951172, 0.06633462011814117, -0.12069456279277802, 0.11235330998897552, 0.32525989413261414, 0.22571176290512085, 0.08119162917137146, -0.19530344009399414, -0.24389171600341797, -0.1959036886692047, 0.013419786468148232, -0.01829209178686142, 0.31153133511543274, 0.09237460792064667, 0.07642790675163269, 0.015604710206389427, -0.026351572945713997, -0.08221059292554855, 0.03661360591650009, -0.2015116810798645, 0.15320999920368195, 0.39694443345069885, 0.08528834581375122, 0.10185487568378448, -0.3077104985713959, 0.0061561912298202515, 0.4336366355419159, 0.18921108543872833, -0.21351787447929382, 0.19208751618862152, -0.28107354044914246, -0.16501381993293762, -0.20298296213150024, 0.20734576880931854, -0.23630091547966003, 0.005958050489425659, -0.036854010075330734, 0.2263290137052536, 0.08204227685928345, 0.3846435844898224, 0.10573523491621017, 0.11133550107479095, 0.0078017860651016235, 0.022570481523871422, -0.07259082794189453, -0.22445893287658691, -0.14357610046863556, -0.09809239208698273, 0.33434832096099854, -0.25028952956199646, 0.4477258026599884, -0.020479507744312286, -0.2534567713737488, -0.3399384021759033, -0.22434581816196442, 0.1853145956993103, 0.2586011588573456, -0.16358087956905365, -0.09631913900375366, -0.21542906761169434, -0.26505786180496216, -0.12395831942558289, 0.3023335337638855, -0.5098352432250977, -0.3046594262123108, 0.007032841444015503, -0.2578853964805603, -0.2725445628166199, -0.17106738686561584, -0.13303546607494354, -0.13823778927326202, -0.0871642455458641, 0.19291283190250397, -0.2887360453605652, 0.21674250066280365, -0.047006815671920776, -0.3090488016605377, -0.02892671711742878, -0.2851341962814331, 0.01798226311802864, -0.21558687090873718, -0.23655672371387482, -0.10500697046518326, -0.2685272991657257, -0.23564700782299042, -0.12221527844667435, 0.0008557513356208801, 0.20128539204597473, 0.4119443893432617, -0.4336656332015991, -0.31044769287109375, 0.15589067339897156, -0.1283716857433319, -0.2194029837846756, -0.03732037544250488, 0.37480419874191284, -0.01169656403362751, 0.022275634109973907, 0.09588092565536499, -0.08267055451869965, 0.19811058044433594, -0.06445715576410294, 0.19077424705028534, -0.14168280363082886, 0.3429133892059326, 0.08204810321331024, 0.8412365317344666, 0.20124472677707672, -0.10022033751010895, 0.22882597148418427, -0.13759228587150574, -0.025830022990703583, -0.12443670630455017, -0.40511631965637207, 0.07617723196744919, -0.3777614235877991, -0.12231549620628357, 0.25022244453430176, -0.04885935038328171, -0.2918366491794586, 0.05336672067642212, -0.010636880993843079, -0.14385800063610077, -0.10184323787689209, 0.11740719527006149, -0.2439659833908081, 0.38280409574508667, 0.030043751001358032, -0.008126713335514069, -0.33985668420791626, 0.04695703461766243, 0.19935433566570282, 0.14448915421962738, 0.1248084008693695, -0.05243482440710068, -0.30122241377830505, 0.09647396206855774, -0.33762237429618835, 0.1285201460123062, 0.24279260635375977, 0.24294455349445343, -0.1127178966999054, 0.19846490025520325, 0.17921173572540283, -0.17247724533081055, 0.7401275634765625, 0.2102784514427185, 0.309577077627182, 0.18628931045532227, -0.4642438292503357, -0.06042441353201866, -0.18363966047763824, -0.002783365547657013, 0.3928453326225281, 0.5032205581665039, 0.6812999248504639, -0.20913684368133545, -0.2562396228313446, -0.36485224962234497, -0.037955090403556824, -0.2327730804681778, -0.09688487648963928, -0.33611154556274414, 0.03080420196056366, -0.4779032766819, 0.4840617775917053, 0.06188732385635376, 0.12470273673534393, -0.008903808891773224, -0.182722806930542, -0.10692598670721054, 0.023591764271259308, -0.20271877944469452, 0.0462450310587883, 0.4827888011932373, 0.010333549231290817, 0.16078665852546692, 0.07761538028717041, 0.30135318636894226, 0.029810277745127678, 0.23789435625076294, -0.15425118803977966, -0.1729060411453247, 0.32635828852653503, 0.11323630809783936, 0.0953313559293747, 0.36496439576148987, -0.0038156285881996155, 0.2932937741279602, -0.07065100967884064, 0.24692195653915405, -0.09713828563690186, 0.2614273130893707, 0.09047084301710129, 0.1561492681503296, -0.28974735736846924, -0.32194983959198, -0.0017898380756378174, 0.15546633303165436, -0.18543684482574463, 0.486970990896225, -0.5467329621315002, -0.24589498341083527, 0.37482526898384094, 0.028168518096208572, 0.7292393445968628, -0.27318254113197327, 0.22707536816596985, -0.023911578580737114, 0.012093767523765564, 0.06532247364521027, -0.46059298515319824, 0.21390163898468018, -0.626311719417572, -0.16144438087940216, 0.11095423251390457, -0.1772141456604004, -0.12393463402986526, 0.20826835930347443, -0.006675258278846741, 0.09716444462537766, 0.21416063606739044, 0.43509453535079956, -0.016917072236537933, 0.3878853917121887, 0.33632537722587585, -0.3557003140449524, -0.11997050046920776, 0.011548694223165512, -0.20563846826553345, 0.1543945074081421, -0.26111915707588196, 0.03369998559355736, 0.3256959319114685, -0.23969143629074097, -0.1725383996963501, 0.14180485904216766, -0.7761969566345215, 0.4627421796321869, -0.06683698296546936, -0.06029801815748215, -0.22626689076423645, 0.2843294143676758, 0.18346817791461945, 0.045462705194950104, -0.08250699937343597, 0.08563926815986633, 0.06304532289505005, 0.03802233934402466, -0.20108662545681, -0.3253646492958069, 0.2559545934200287, -0.11559358239173889, -0.13186906278133392, -0.2528042793273926, -0.0701267346739769, -0.3225018084049225, 0.01918807625770569, 0.28207677602767944, 0.24348776042461395, 0.24635246396064758, 0.11438232660293579, -0.019210413098335266, 0.08671130985021591, -0.22967855632305145, 0.05143941938877106, 0.2087801694869995, -0.23998582363128662, 0.0573229044675827, -0.15889333188533783, -0.2739490866661072, 0.005907702259719372, 0.3690639138221741, -0.04796876013278961, -0.17943695187568665, 0.3894449770450592, 0.02357526123523712, -0.14557212591171265, -0.22797265648841858, -0.21925389766693115, 0.01807408407330513, -0.27380049228668213, 0.05168477073311806, -0.16854235529899597, -0.08602632582187653, 0.02959449589252472, -0.08195021748542786, 0.1339997947216034, 0.057653628289699554, 0.04701431095600128, -0.32999247312545776, -0.5211123824119568, -0.1352912038564682, -0.3345440626144409, -0.025219101458787918, 0.45407581329345703, 0.2397466003894806, 0.05641338974237442, 0.606138288974762, -0.2513331174850464, 0.11439139395952225, -0.10839308798313141, 0.08362500369548798, -0.10703407973051071, -0.16602829098701477, -0.02615208551287651, 0.06860823929309845, 0.009449940174818039, 0.396000474691391, -0.11843456327915192, -0.1826644241809845, -0.22366391122341156, 0.16793307662010193, 0.1026049330830574, 0.014142829924821854, 0.007179267704486847, -0.01431216299533844, 0.055098384618759155, -0.26173001527786255, 0.3186776041984558, 0.32030704617500305, 0.0846547782421112, -0.11269449442625046, 0.5118354558944702, 0.18230560421943665, -0.14583782851696014, 0.02138439193367958, -0.14462760090827942, -0.2824770212173462, 0.17017924785614014, 0.09503056108951569, -0.21231329441070557, 0.005075022578239441, -0.03857408091425896, -0.02756035327911377, 0.36896997690200806, -0.011591036804020405, 0.2497115135192871, -0.1424725353717804, -0.3002992272377014, 0.271872341632843, 0.0816454291343689, -0.012097315862774849, -0.1579810082912445, -0.07591959089040756, 0.2782089114189148, 0.13029831647872925, -0.21431219577789307, -0.13035225868225098, 0.4660514295101166, -0.10634748637676239, -0.1348564624786377, 0.3298298120498657, 0.6135555505752563, -0.0711674839258194, 0.09845180064439774, 0.18683725595474243, 0.46625104546546936, -0.45760226249694824, 0.1631394475698471, -0.43481120467185974, 0.07324179261922836, 0.2634950876235962, 0.40871474146842957, 0.15014195442199707, 0.0821397453546524, 0.05485564097762108, 0.242447167634964, 0.35609403252601624, 0.024041075259447098, 0.19336354732513428, 0.12317848950624466, -0.36877888441085815, -0.14895038306713104, 0.0502154678106308, -0.34822091460227966, 0.07378604263067245, -0.3511718213558197, 0.38534051179885864, -0.112869031727314, -0.5411105155944824, -0.2807518541812897, 0.49619072675704956, -0.44213172793388367, -0.14366033673286438, 0.06101231276988983, 0.02799832820892334, 0.0669628381729126, 0.128665030002594, 0.06855304539203644, 0.1792219877243042, 0.27044618129730225, 0.03389722853899002, -0.18404854834079742, 0.1032245010137558, -0.39150360226631165, 0.23166245222091675, 0.3441036641597748, -0.42772382497787476, 0.27922287583351135, 0.029076486825942993, -0.1717250794172287, -0.26463350653648376, 0.11710534244775772, 0.44711270928382874, 0.316058874130249, -0.01911911368370056, -0.049521058797836304, 0.22745689749717712, 0.25817060470581055, -0.2503555417060852, 0.36808064579963684, 0.09269140660762787, -0.22827941179275513, 0.017481505870819092, -0.0073929280042648315, -0.16916252672672272, -0.20156604051589966, 0.30392181873321533, 0.10028454661369324, 0.22948074340820312, 0.32963937520980835, -0.11683957278728485, -0.15457285940647125, 0.03822458162903786, 0.3113919496536255, -0.4480445384979248, 0.05044351890683174, 0.39636653661727905, -0.0605006068944931, 0.24457664787769318, -0.08968547731637955, 0.07809971272945404, 0.12276926636695862, 0.40487849712371826, 0.2677331864833832, 0.01410570926964283, -0.6027411222457886, -0.21236804127693176, -0.612362802028656, 0.47627124190330505, 0.060212504118680954, 0.19499215483665466, -0.09128683805465698, 0.07729023694992065, -0.0980839803814888, -0.20548035204410553, -0.17230837047100067, -0.15723532438278198, 0.3336084485054016, 0.21228834986686707, -0.5281358361244202, 0.22222952544689178, -0.3533902168273926, 0.04240749776363373, 0.2777879536151886, -0.3059481084346771, 0.2836005389690399, 0.12680289149284363, 0.015467636287212372, -0.05762743949890137, -0.09035247564315796, 0.052242279052734375, 0.007566303946077824, 0.27324995398521423, 0.1720665693283081, 0.4610636532306671, -0.006821013987064362, 0.124474436044693, -0.03423001244664192, 0.050253573805093765, -0.22705496847629547, -0.0691164880990982, 0.035689983516931534, 0.2862488031387329, -0.1740046888589859, -0.32533687353134155, -0.39855751395225525, 0.23422904312610626, 0.13533639907836914, -0.3962312638759613, -0.20664599537849426, 0.11177435517311096, 0.06067384034395218, 0.04118116572499275, 0.25915223360061646, 0.6599978804588318, 0.12293224781751633, 0.3050040602684021, -0.22494184970855713, -0.21156185865402222, 0.30302566289901733, -0.5903725028038025, -0.2062786966562271, -0.2685428261756897, 0.46421384811401367, -0.04997676983475685, 0.05002593249082565, -0.38105347752571106, -0.04841607064008713, 0.22489292919635773, -0.04513020068407059, -0.369234174489975, 0.16024470329284668, -0.033648550510406494, -0.09397464990615845, -0.13484463095664978, 0.25249844789505005, 0.03010600060224533, -0.33803755044937134, 0.027279697358608246, -0.18454942107200623 ]
https://github.com/huggingface/datasets/issues/6369
We now sort `set` and `dict` items to make their hashes deterministic (install from `main` with `pip install git+https://github.com/huggingface/datasets` to test this). Consequently, this should also make the `tokenizer.tokens_trie`'s hash deterministic. Feel free to re-open the issue if this is not the case.
Multi process map did not load cache file correctly
### Describe the bug When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process. ![1698820541284](https://github.com/huggingface/datasets/assets/14285786/0b2fe054-54d8-4e00-96e6-6ca5b69e662b) ![1698820501568](https://github.com/huggingface/datasets/assets/14285786/dd62bf6f-a58f-41bf-9848-ea4fb3b62b9b) Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484) ### Steps to reproduce the bug ``` block_size = data_args.block_size IGNORE_INDEX = -100 Ignore_Input = False def tokenize_function(examples): sources = [] targets = [] for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']): source = instruction + inputs target = f"{output}{tokenizer.eos_token}" sources.append(source) targets.append(target) tokenized_sources = tokenizer(sources, return_attention_mask=False) tokenized_targets = tokenizer(targets, return_attention_mask=False, add_special_tokens=False ) all_input_ids = [] all_labels = [] for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']): if len(s) > block_size and Ignore_Input == False: # print(s) continue input_ids = torch.LongTensor(s + t)[:block_size] if Ignore_Input: labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size] else: labels = input_ids assert len(input_ids) == len(labels) all_input_ids.append(input_ids) all_labels.append(labels) results = { 'input_ids': all_input_ids, 'labels': all_labels, } return results with training_args.main_process_first(desc="dataset map tokenization ", local=False): # print('local_rank',training_args.local_rank) if not data_args.streaming: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=data_args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not data_args.overwrite_cache, desc="Running tokenizer on dataset ", ) else: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, remove_columns=column_names, desc="Running tokenizer on dataset " ) ``` ### Expected behavior This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting ### Environment info transformers == 4.34.1 datasets == 2.14.5
43
Multi process map did not load cache file correctly ### Describe the bug When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process. ![1698820541284](https://github.com/huggingface/datasets/assets/14285786/0b2fe054-54d8-4e00-96e6-6ca5b69e662b) ![1698820501568](https://github.com/huggingface/datasets/assets/14285786/dd62bf6f-a58f-41bf-9848-ea4fb3b62b9b) Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484) ### Steps to reproduce the bug ``` block_size = data_args.block_size IGNORE_INDEX = -100 Ignore_Input = False def tokenize_function(examples): sources = [] targets = [] for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']): source = instruction + inputs target = f"{output}{tokenizer.eos_token}" sources.append(source) targets.append(target) tokenized_sources = tokenizer(sources, return_attention_mask=False) tokenized_targets = tokenizer(targets, return_attention_mask=False, add_special_tokens=False ) all_input_ids = [] all_labels = [] for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']): if len(s) > block_size and Ignore_Input == False: # print(s) continue input_ids = torch.LongTensor(s + t)[:block_size] if Ignore_Input: labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size] else: labels = input_ids assert len(input_ids) == len(labels) all_input_ids.append(input_ids) all_labels.append(labels) results = { 'input_ids': all_input_ids, 'labels': all_labels, } return results with training_args.main_process_first(desc="dataset map tokenization ", local=False): # print('local_rank',training_args.local_rank) if not data_args.streaming: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=data_args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not data_args.overwrite_cache, desc="Running tokenizer on dataset ", ) else: tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, remove_columns=column_names, desc="Running tokenizer on dataset " ) ``` ### Expected behavior This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting ### Environment info transformers == 4.34.1 datasets == 2.14.5 We now sort `set` and `dict` items to make their hashes deterministic (install from `main` with `pip install git+https://github.com/huggingface/datasets` to test this). Consequently, this should also make the `tokenizer.tokens_trie`'s hash deterministic. Feel free to re-open the issue if this is not the case.
[ -0.3758842647075653, -0.5878843069076538, 0.032787516713142395, 0.44652554392814636, 0.30833250284194946, -0.06708855926990509, 0.3846704661846161, -0.0230244230479002, 0.11546281725168228, -0.130690798163414, 0.03220471739768982, 0.1839643120765686, 0.011365003883838654, -0.16018880903720856, 0.22068113088607788, -0.04639360308647156, 0.23309653997421265, -0.09889067709445953, 0.25963956117630005, -0.043918464332818985, -0.07259543985128403, 0.16843989491462708, -0.023828059434890747, 0.1142701506614685, -0.7611029744148254, -0.24884234368801117, -0.2706131041049957, 0.04479319602251053, 0.09483681619167328, -0.38677331805229187, -0.007349289953708649, 0.2703377902507782, 0.030349746346473694, 0.4049658477306366, -0.00012022876762785017, -0.06745299696922302, -0.07974615693092346, -0.06846130639314651, 0.11956527829170227, 0.05133308097720146, 0.2856757640838623, -0.03671669960021973, 0.032381437718868256, -0.3001784086227417, -0.059303440153598785, -0.12905529141426086, 0.019631771370768547, -0.10994642227888107, 0.6139715313911438, -0.018123891204595566, 0.15787357091903687, 0.23834945261478424, -0.11117133498191833, -0.01171480119228363, -0.00791437178850174, 0.0234975628554821, 0.02816671133041382, 0.30590522289276123, 0.13348078727722168, -0.23994503915309906, -0.34937310218811035, 0.4579474925994873, -0.3030812740325928, 0.13927704095840454, 0.016668790951371193, -0.051629021763801575, 0.3218017816543579, -0.24838319420814514, 0.20118960738182068, -0.17308339476585388, 0.06411679089069366, -0.34846487641334534, -0.10883322358131409, -0.2487117499113083, -0.10952697694301605, -0.41067272424697876, 0.06099053472280502, 0.09674863517284393, 0.10890792310237885, 0.02695632167160511, -0.2739849388599396, -0.06649923324584961, 0.1412847340106964, -0.14327532052993774, 0.03828224539756775, 0.47475767135620117, 0.05626363307237625, 0.22025234997272491, -0.057733677327632904, 0.24356554448604584, -0.19938525557518005, 0.14177027344703674, -0.13003993034362793, 0.1745365858078003, -0.43984460830688477, 0.11566847562789917, 0.14330606162548065, -0.20905514061450958, 0.024338848888874054, 0.10905120521783829, -0.12433245778083801, 0.23093107342720032, 0.22433850169181824, 0.10604599863290787, 0.06012273207306862, 0.3098629415035248, -0.08669739961624146, 0.37444427609443665, 0.10358645021915436, -0.19655928015708923, -0.6160250902175903, -0.08625693619251251, -0.2017902284860611, 0.07781682908535004, 0.2205851972103119, 0.17024868726730347, -0.10253169387578964, 0.012299984693527222, 0.04428233206272125, -0.028451189398765564, -0.17283746600151062, -0.07353339344263077, 0.09680088609457016, 0.573980450630188, -0.07143531739711761, 0.25668713450431824, -0.11808609217405319, -0.006592513993382454, -0.38013339042663574, 0.013272374868392944, -0.32165348529815674, -0.1732420027256012, -0.2774769365787506, 0.2031145989894867, 0.018485791981220245, 0.07082493603229523, 0.41167911887168884, 0.16054697334766388, 0.011805436573922634, -0.4575543999671936, 0.3853899836540222, -0.11114837229251862, 0.24312759935855865, 0.17612838745117188, -0.08562880754470825, 0.1351296305656433, 0.24664348363876343, 0.12818673253059387, -0.08739731460809708, 0.0006479695439338684, -0.5313720703125, -0.3649709224700928, 0.14562135934829712, 0.11860834062099457, 0.14023981988430023, 0.2883141338825226, -0.0790192186832428, 0.09309225529432297, 0.7046105861663818, -0.09935208410024643, 0.04161440581083298, -0.22417303919792175, -0.4516300559043884, -0.22748485207557678, 0.22911736369132996, 0.6116631627082825, 0.2846032381057739, -0.3317965865135193, 0.5714664459228516, -0.0076134093105793, 0.42778894305229187, 0.384381502866745, -0.222025066614151, 0.3704081177711487, -0.44830039143562317, 0.07830972969532013, -0.03411789983510971, -0.3772508203983307, -0.2667810320854187, 0.20360106229782104, -0.33372852206230164, 0.09925330430269241, 0.2808815538883209, -0.07778451591730118, 0.3536165654659271, 0.0728277713060379, 0.3196015954017639, 0.10974348336458206, -0.07788223773241043, 0.4438732862472534, -0.2902148962020874, 0.10684891045093536, 0.21163417398929596, 0.025167420506477356, 0.22238853573799133, -0.03585471212863922, -0.02597822993993759, 0.29670512676239014, 0.38045552372932434, -0.04892721772193909, -0.04421465843915939, 0.14151547849178314, -0.01125856302678585, -0.03928866982460022, 0.291925847530365, -0.09925615787506104, -0.2991335391998291, 0.16674304008483887, -0.35111933946609497, -0.25444334745407104, -0.10386119782924652, -0.24411995708942413, 0.15940234065055847, -0.055865563452243805, -0.4145631492137909, -0.46748611330986023, 0.07654831558465958, 0.2283444106578827, 0.08983010053634644, -0.05329865217208862, -0.09459907561540604, 0.4571547210216522, 0.012432008981704712, 0.0350940115749836, -0.044560424983501434, 0.07420770823955536, -0.15007013082504272, -0.0967462956905365, -0.16216230392456055, 0.23686246573925018, 0.3932054936885834, -0.30021917819976807, -0.1795911192893982, 0.28424984216690063, 0.35804519057273865, 0.13826978206634521, -0.16454388201236725, 0.11552398651838303, 0.3385787010192871, 0.12245380133390427, -0.017214231193065643, 0.016066327691078186, -0.06826367229223251, -0.2252872884273529, 0.20385020971298218, 0.3527762293815613, 0.48492035269737244, -0.12337170541286469, -0.03427737206220627, -0.15239515900611877, 0.28297191858291626, -0.0525849312543869, 0.13655206561088562, -0.12477029860019684, 0.21742115914821625, 0.18211036920547485, 0.4227886199951172, 0.06633462011814117, -0.12069456279277802, 0.11235330998897552, 0.32525989413261414, 0.22571176290512085, 0.08119162917137146, -0.19530344009399414, -0.24389171600341797, -0.1959036886692047, 0.013419786468148232, -0.01829209178686142, 0.31153133511543274, 0.09237460792064667, 0.07642790675163269, 0.015604710206389427, -0.026351572945713997, -0.08221059292554855, 0.03661360591650009, -0.2015116810798645, 0.15320999920368195, 0.39694443345069885, 0.08528834581375122, 0.10185487568378448, -0.3077104985713959, 0.0061561912298202515, 0.4336366355419159, 0.18921108543872833, -0.21351787447929382, 0.19208751618862152, -0.28107354044914246, -0.16501381993293762, -0.20298296213150024, 0.20734576880931854, -0.23630091547966003, 0.005958050489425659, -0.036854010075330734, 0.2263290137052536, 0.08204227685928345, 0.3846435844898224, 0.10573523491621017, 0.11133550107479095, 0.0078017860651016235, 0.022570481523871422, -0.07259082794189453, -0.22445893287658691, -0.14357610046863556, -0.09809239208698273, 0.33434832096099854, -0.25028952956199646, 0.4477258026599884, -0.020479507744312286, -0.2534567713737488, -0.3399384021759033, -0.22434581816196442, 0.1853145956993103, 0.2586011588573456, -0.16358087956905365, -0.09631913900375366, -0.21542906761169434, -0.26505786180496216, -0.12395831942558289, 0.3023335337638855, -0.5098352432250977, -0.3046594262123108, 0.007032841444015503, -0.2578853964805603, -0.2725445628166199, -0.17106738686561584, -0.13303546607494354, -0.13823778927326202, -0.0871642455458641, 0.19291283190250397, -0.2887360453605652, 0.21674250066280365, -0.047006815671920776, -0.3090488016605377, -0.02892671711742878, -0.2851341962814331, 0.01798226311802864, -0.21558687090873718, -0.23655672371387482, -0.10500697046518326, -0.2685272991657257, -0.23564700782299042, -0.12221527844667435, 0.0008557513356208801, 0.20128539204597473, 0.4119443893432617, -0.4336656332015991, -0.31044769287109375, 0.15589067339897156, -0.1283716857433319, -0.2194029837846756, -0.03732037544250488, 0.37480419874191284, -0.01169656403362751, 0.022275634109973907, 0.09588092565536499, -0.08267055451869965, 0.19811058044433594, -0.06445715576410294, 0.19077424705028534, -0.14168280363082886, 0.3429133892059326, 0.08204810321331024, 0.8412365317344666, 0.20124472677707672, -0.10022033751010895, 0.22882597148418427, -0.13759228587150574, -0.025830022990703583, -0.12443670630455017, -0.40511631965637207, 0.07617723196744919, -0.3777614235877991, -0.12231549620628357, 0.25022244453430176, -0.04885935038328171, -0.2918366491794586, 0.05336672067642212, -0.010636880993843079, -0.14385800063610077, -0.10184323787689209, 0.11740719527006149, -0.2439659833908081, 0.38280409574508667, 0.030043751001358032, -0.008126713335514069, -0.33985668420791626, 0.04695703461766243, 0.19935433566570282, 0.14448915421962738, 0.1248084008693695, -0.05243482440710068, -0.30122241377830505, 0.09647396206855774, -0.33762237429618835, 0.1285201460123062, 0.24279260635375977, 0.24294455349445343, -0.1127178966999054, 0.19846490025520325, 0.17921173572540283, -0.17247724533081055, 0.7401275634765625, 0.2102784514427185, 0.309577077627182, 0.18628931045532227, -0.4642438292503357, -0.06042441353201866, -0.18363966047763824, -0.002783365547657013, 0.3928453326225281, 0.5032205581665039, 0.6812999248504639, -0.20913684368133545, -0.2562396228313446, -0.36485224962234497, -0.037955090403556824, -0.2327730804681778, -0.09688487648963928, -0.33611154556274414, 0.03080420196056366, -0.4779032766819, 0.4840617775917053, 0.06188732385635376, 0.12470273673534393, -0.008903808891773224, -0.182722806930542, -0.10692598670721054, 0.023591764271259308, -0.20271877944469452, 0.0462450310587883, 0.4827888011932373, 0.010333549231290817, 0.16078665852546692, 0.07761538028717041, 0.30135318636894226, 0.029810277745127678, 0.23789435625076294, -0.15425118803977966, -0.1729060411453247, 0.32635828852653503, 0.11323630809783936, 0.0953313559293747, 0.36496439576148987, -0.0038156285881996155, 0.2932937741279602, -0.07065100967884064, 0.24692195653915405, -0.09713828563690186, 0.2614273130893707, 0.09047084301710129, 0.1561492681503296, -0.28974735736846924, -0.32194983959198, -0.0017898380756378174, 0.15546633303165436, -0.18543684482574463, 0.486970990896225, -0.5467329621315002, -0.24589498341083527, 0.37482526898384094, 0.028168518096208572, 0.7292393445968628, -0.27318254113197327, 0.22707536816596985, -0.023911578580737114, 0.012093767523765564, 0.06532247364521027, -0.46059298515319824, 0.21390163898468018, -0.626311719417572, -0.16144438087940216, 0.11095423251390457, -0.1772141456604004, -0.12393463402986526, 0.20826835930347443, -0.006675258278846741, 0.09716444462537766, 0.21416063606739044, 0.43509453535079956, -0.016917072236537933, 0.3878853917121887, 0.33632537722587585, -0.3557003140449524, -0.11997050046920776, 0.011548694223165512, -0.20563846826553345, 0.1543945074081421, -0.26111915707588196, 0.03369998559355736, 0.3256959319114685, -0.23969143629074097, -0.1725383996963501, 0.14180485904216766, -0.7761969566345215, 0.4627421796321869, -0.06683698296546936, -0.06029801815748215, -0.22626689076423645, 0.2843294143676758, 0.18346817791461945, 0.045462705194950104, -0.08250699937343597, 0.08563926815986633, 0.06304532289505005, 0.03802233934402466, -0.20108662545681, -0.3253646492958069, 0.2559545934200287, -0.11559358239173889, -0.13186906278133392, -0.2528042793273926, -0.0701267346739769, -0.3225018084049225, 0.01918807625770569, 0.28207677602767944, 0.24348776042461395, 0.24635246396064758, 0.11438232660293579, -0.019210413098335266, 0.08671130985021591, -0.22967855632305145, 0.05143941938877106, 0.2087801694869995, -0.23998582363128662, 0.0573229044675827, -0.15889333188533783, -0.2739490866661072, 0.005907702259719372, 0.3690639138221741, -0.04796876013278961, -0.17943695187568665, 0.3894449770450592, 0.02357526123523712, -0.14557212591171265, -0.22797265648841858, -0.21925389766693115, 0.01807408407330513, -0.27380049228668213, 0.05168477073311806, -0.16854235529899597, -0.08602632582187653, 0.02959449589252472, -0.08195021748542786, 0.1339997947216034, 0.057653628289699554, 0.04701431095600128, -0.32999247312545776, -0.5211123824119568, -0.1352912038564682, -0.3345440626144409, -0.025219101458787918, 0.45407581329345703, 0.2397466003894806, 0.05641338974237442, 0.606138288974762, -0.2513331174850464, 0.11439139395952225, -0.10839308798313141, 0.08362500369548798, -0.10703407973051071, -0.16602829098701477, -0.02615208551287651, 0.06860823929309845, 0.009449940174818039, 0.396000474691391, -0.11843456327915192, -0.1826644241809845, -0.22366391122341156, 0.16793307662010193, 0.1026049330830574, 0.014142829924821854, 0.007179267704486847, -0.01431216299533844, 0.055098384618759155, -0.26173001527786255, 0.3186776041984558, 0.32030704617500305, 0.0846547782421112, -0.11269449442625046, 0.5118354558944702, 0.18230560421943665, -0.14583782851696014, 0.02138439193367958, -0.14462760090827942, -0.2824770212173462, 0.17017924785614014, 0.09503056108951569, -0.21231329441070557, 0.005075022578239441, -0.03857408091425896, -0.02756035327911377, 0.36896997690200806, -0.011591036804020405, 0.2497115135192871, -0.1424725353717804, -0.3002992272377014, 0.271872341632843, 0.0816454291343689, -0.012097315862774849, -0.1579810082912445, -0.07591959089040756, 0.2782089114189148, 0.13029831647872925, -0.21431219577789307, -0.13035225868225098, 0.4660514295101166, -0.10634748637676239, -0.1348564624786377, 0.3298298120498657, 0.6135555505752563, -0.0711674839258194, 0.09845180064439774, 0.18683725595474243, 0.46625104546546936, -0.45760226249694824, 0.1631394475698471, -0.43481120467185974, 0.07324179261922836, 0.2634950876235962, 0.40871474146842957, 0.15014195442199707, 0.0821397453546524, 0.05485564097762108, 0.242447167634964, 0.35609403252601624, 0.024041075259447098, 0.19336354732513428, 0.12317848950624466, -0.36877888441085815, -0.14895038306713104, 0.0502154678106308, -0.34822091460227966, 0.07378604263067245, -0.3511718213558197, 0.38534051179885864, -0.112869031727314, -0.5411105155944824, -0.2807518541812897, 0.49619072675704956, -0.44213172793388367, -0.14366033673286438, 0.06101231276988983, 0.02799832820892334, 0.0669628381729126, 0.128665030002594, 0.06855304539203644, 0.1792219877243042, 0.27044618129730225, 0.03389722853899002, -0.18404854834079742, 0.1032245010137558, -0.39150360226631165, 0.23166245222091675, 0.3441036641597748, -0.42772382497787476, 0.27922287583351135, 0.029076486825942993, -0.1717250794172287, -0.26463350653648376, 0.11710534244775772, 0.44711270928382874, 0.316058874130249, -0.01911911368370056, -0.049521058797836304, 0.22745689749717712, 0.25817060470581055, -0.2503555417060852, 0.36808064579963684, 0.09269140660762787, -0.22827941179275513, 0.017481505870819092, -0.0073929280042648315, -0.16916252672672272, -0.20156604051589966, 0.30392181873321533, 0.10028454661369324, 0.22948074340820312, 0.32963937520980835, -0.11683957278728485, -0.15457285940647125, 0.03822458162903786, 0.3113919496536255, -0.4480445384979248, 0.05044351890683174, 0.39636653661727905, -0.0605006068944931, 0.24457664787769318, -0.08968547731637955, 0.07809971272945404, 0.12276926636695862, 0.40487849712371826, 0.2677331864833832, 0.01410570926964283, -0.6027411222457886, -0.21236804127693176, -0.612362802028656, 0.47627124190330505, 0.060212504118680954, 0.19499215483665466, -0.09128683805465698, 0.07729023694992065, -0.0980839803814888, -0.20548035204410553, -0.17230837047100067, -0.15723532438278198, 0.3336084485054016, 0.21228834986686707, -0.5281358361244202, 0.22222952544689178, -0.3533902168273926, 0.04240749776363373, 0.2777879536151886, -0.3059481084346771, 0.2836005389690399, 0.12680289149284363, 0.015467636287212372, -0.05762743949890137, -0.09035247564315796, 0.052242279052734375, 0.007566303946077824, 0.27324995398521423, 0.1720665693283081, 0.4610636532306671, -0.006821013987064362, 0.124474436044693, -0.03423001244664192, 0.050253573805093765, -0.22705496847629547, -0.0691164880990982, 0.035689983516931534, 0.2862488031387329, -0.1740046888589859, -0.32533687353134155, -0.39855751395225525, 0.23422904312610626, 0.13533639907836914, -0.3962312638759613, -0.20664599537849426, 0.11177435517311096, 0.06067384034395218, 0.04118116572499275, 0.25915223360061646, 0.6599978804588318, 0.12293224781751633, 0.3050040602684021, -0.22494184970855713, -0.21156185865402222, 0.30302566289901733, -0.5903725028038025, -0.2062786966562271, -0.2685428261756897, 0.46421384811401367, -0.04997676983475685, 0.05002593249082565, -0.38105347752571106, -0.04841607064008713, 0.22489292919635773, -0.04513020068407059, -0.369234174489975, 0.16024470329284668, -0.033648550510406494, -0.09397464990615845, -0.13484463095664978, 0.25249844789505005, 0.03010600060224533, -0.33803755044937134, 0.027279697358608246, -0.18454942107200623 ]
https://github.com/huggingface/datasets/issues/6364
You can use the following code to load this CSV with the list values preserved: ```python from datasets import load_dataset import ast converters = { "contexts" : ast.literal_eval, "ground_truths" : ast.literal_eval, } ds = load_dataset("csv", data_files="golden_dataset.csv", converters=converters) ```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
Hi, I am trying to load a local csv dataset(similar to explodinggradients_fiqa) using load_dataset. When I try to pass features, I am facing the mentioned issue. CSV Data sample(golden_dataset.csv): Question | Context | answer | groundtruth "what is abc?" | "abc is this and that" | "abc is this " | "abc is this and that" ``` import csv # built it based on https://huggingface.co/datasets/explodinggradients/fiqa/viewer/ragas_eval?row=0 mydict = [ {'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]}, {'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]}, {'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]} ] fields = ['question', 'contexts', 'answer', 'ground_truths'] with open('golden_dataset.csv', 'w', newline='\n') as file: writer = csv.DictWriter(file, fieldnames = fields) writer.writeheader() for row in mydict: writer.writerow(row) ``` Retrieved dataset: DatasetDict({ train: Dataset({ features: ['question', 'contexts', 'answer', 'ground_truths'], num_rows: 1 }) }) Code to reproduce issue: ``` from datasets import load_dataset, Features, Sequence, Value encode_features = Features( { "question": Value(dtype='string', id=0), "contexts": Sequence(feature=Value(dtype='string', id=1)), "answer": Value(dtype='string', id=2), "ground_truths": Sequence(feature=Value(dtype='string',id=3)), } ) eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features ) ``` Error trace: ``` --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1925, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1924 _time = time.time() -> 1925 for _, table in generator: 1926 if max_shard_size is not None and writer._num_bytes > max_shard_size: File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:192, in Csv._generate_tables(self, files) 189 # Uncomment for debugging (will print the Arrow table size and elements) 190 # logger.warning(f"pa_table: {pa_table} num rows: {pa_table.num_rows}") 191 # logger.warning('\n'.join(str(pa_table.slice(i, 1).to_pydict()) for i in range(pa_table.num_rows))) --> 192 yield (file_idx, batch_idx), self._cast_table(pa_table) 193 except ValueError as e: File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:167, in Csv._cast_table(self, pa_table) 165 if all(not require_storage_cast(feature) for feature in self.config.features.values()): 166 # cheaper cast --> 167 pa_table = pa.Table.from_arrays([pa_table[field.name] for field in schema], schema=schema) 168 else: 169 # more expensive cast; allows str <-> int/float or str to Audio for example File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:3781, in pyarrow.lib.Table.from_arrays() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:1449, in pyarrow.lib._sanitize_arrays() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/array.pxi:354, in pyarrow.lib.asarray() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:551, in pyarrow.lib.ChunkedArray.cast() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/compute.py:400, in cast(arr, target_type, safe, options, memory_pool) 399 options = CastOptions.safe(target_type) --> 400 return call_function("cast", [arr], options, memory_pool) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:572, in pyarrow._compute.call_function() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:367, in pyarrow._compute.Function.call() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:121, in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from string to list using function cast_list The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) Cell In[57], line 1 ----> 1 eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features ) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/load.py:2153, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 2150 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES 2152 # Download and prepare data -> 2153 builder_instance.download_and_prepare( 2154 download_config=download_config, 2155 download_mode=download_mode, 2156 verification_mode=verification_mode, 2157 try_from_hf_gcs=try_from_hf_gcs, 2158 num_proc=num_proc, 2159 storage_options=storage_options, 2160 ) 2162 # Build dataset for splits 2163 keep_in_memory = ( 2164 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 2165 ) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:954, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 952 if num_proc is not None: 953 prepare_split_kwargs["num_proc"] = num_proc --> 954 self._download_and_prepare( 955 dl_manager=dl_manager, 956 verification_mode=verification_mode, 957 **prepare_split_kwargs, 958 **download_and_prepare_kwargs, 959 ) 960 # Sync info 961 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1049, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 1045 split_dict.add(split_generator.split_info) 1047 try: 1048 # Prepare split will record examples associated to the split -> 1049 self._prepare_split(split_generator, **prepare_split_kwargs) 1050 except OSError as e: 1051 raise OSError( 1052 "Cannot find data file. " 1053 + (self.manual_download_instructions or "") 1054 + "\nOriginal error:\n" 1055 + str(e) 1056 ) from None File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1813, in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1811 job_id = 0 1812 with pbar: -> 1813 for job_id, done, content in self._prepare_split_single( 1814 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1815 ): 1816 if done: 1817 result = content File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1958, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1956 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1957 e = e.__context__ -> 1958 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1960 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` Environment Info: datasets version: 2.14.5 Python version: 3.10.8 PyArrow version: 12.0.1 Pandas version: 2.0.3 I have also tried to load dataset first and then use cast_column, or save_to_disk and load_from_disk.
38
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list Hi, I am trying to load a local csv dataset(similar to explodinggradients_fiqa) using load_dataset. When I try to pass features, I am facing the mentioned issue. CSV Data sample(golden_dataset.csv): Question | Context | answer | groundtruth "what is abc?" | "abc is this and that" | "abc is this " | "abc is this and that" ``` import csv # built it based on https://huggingface.co/datasets/explodinggradients/fiqa/viewer/ragas_eval?row=0 mydict = [ {'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]}, {'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]}, {'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]} ] fields = ['question', 'contexts', 'answer', 'ground_truths'] with open('golden_dataset.csv', 'w', newline='\n') as file: writer = csv.DictWriter(file, fieldnames = fields) writer.writeheader() for row in mydict: writer.writerow(row) ``` Retrieved dataset: DatasetDict({ train: Dataset({ features: ['question', 'contexts', 'answer', 'ground_truths'], num_rows: 1 }) }) Code to reproduce issue: ``` from datasets import load_dataset, Features, Sequence, Value encode_features = Features( { "question": Value(dtype='string', id=0), "contexts": Sequence(feature=Value(dtype='string', id=1)), "answer": Value(dtype='string', id=2), "ground_truths": Sequence(feature=Value(dtype='string',id=3)), } ) eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features ) ``` Error trace: ``` --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1925, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1924 _time = time.time() -> 1925 for _, table in generator: 1926 if max_shard_size is not None and writer._num_bytes > max_shard_size: File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:192, in Csv._generate_tables(self, files) 189 # Uncomment for debugging (will print the Arrow table size and elements) 190 # logger.warning(f"pa_table: {pa_table} num rows: {pa_table.num_rows}") 191 # logger.warning('\n'.join(str(pa_table.slice(i, 1).to_pydict()) for i in range(pa_table.num_rows))) --> 192 yield (file_idx, batch_idx), self._cast_table(pa_table) 193 except ValueError as e: File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:167, in Csv._cast_table(self, pa_table) 165 if all(not require_storage_cast(feature) for feature in self.config.features.values()): 166 # cheaper cast --> 167 pa_table = pa.Table.from_arrays([pa_table[field.name] for field in schema], schema=schema) 168 else: 169 # more expensive cast; allows str <-> int/float or str to Audio for example File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:3781, in pyarrow.lib.Table.from_arrays() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:1449, in pyarrow.lib._sanitize_arrays() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/array.pxi:354, in pyarrow.lib.asarray() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:551, in pyarrow.lib.ChunkedArray.cast() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/compute.py:400, in cast(arr, target_type, safe, options, memory_pool) 399 options = CastOptions.safe(target_type) --> 400 return call_function("cast", [arr], options, memory_pool) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:572, in pyarrow._compute.call_function() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:367, in pyarrow._compute.Function.call() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status() File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:121, in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from string to list using function cast_list The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) Cell In[57], line 1 ----> 1 eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features ) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/load.py:2153, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 2150 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES 2152 # Download and prepare data -> 2153 builder_instance.download_and_prepare( 2154 download_config=download_config, 2155 download_mode=download_mode, 2156 verification_mode=verification_mode, 2157 try_from_hf_gcs=try_from_hf_gcs, 2158 num_proc=num_proc, 2159 storage_options=storage_options, 2160 ) 2162 # Build dataset for splits 2163 keep_in_memory = ( 2164 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 2165 ) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:954, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 952 if num_proc is not None: 953 prepare_split_kwargs["num_proc"] = num_proc --> 954 self._download_and_prepare( 955 dl_manager=dl_manager, 956 verification_mode=verification_mode, 957 **prepare_split_kwargs, 958 **download_and_prepare_kwargs, 959 ) 960 # Sync info 961 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1049, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 1045 split_dict.add(split_generator.split_info) 1047 try: 1048 # Prepare split will record examples associated to the split -> 1049 self._prepare_split(split_generator, **prepare_split_kwargs) 1050 except OSError as e: 1051 raise OSError( 1052 "Cannot find data file. " 1053 + (self.manual_download_instructions or "") 1054 + "\nOriginal error:\n" 1055 + str(e) 1056 ) from None File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1813, in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1811 job_id = 0 1812 with pbar: -> 1813 for job_id, done, content in self._prepare_split_single( 1814 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1815 ): 1816 if done: 1817 result = content File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1958, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1956 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1957 e = e.__context__ -> 1958 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1960 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` Environment Info: datasets version: 2.14.5 Python version: 3.10.8 PyArrow version: 12.0.1 Pandas version: 2.0.3 I have also tried to load dataset first and then use cast_column, or save_to_disk and load_from_disk. You can use the following code to load this CSV with the list values preserved: ```python from datasets import load_dataset import ast converters = { "contexts" : ast.literal_eval, "ground_truths" : ast.literal_eval, } ds = load_dataset("csv", data_files="golden_dataset.csv", converters=converters) ```
[ -0.02789292484521866, -0.23731307685375214, -0.11266941577196121, 0.09196636080741882, 0.672694742679596, -0.07634066045284271, 0.1983177810907364, 0.24670083820819855, 0.28991514444351196, 0.11488257348537445, 0.06941263377666473, 0.47068384289741516, -0.139689639210701, 0.041423432528972626, -0.1597108542919159, -0.120027095079422, 0.12148114293813705, 0.11322767287492752, -0.15736480057239532, -0.16011470556259155, -0.10580363124608994, 0.18633189797401428, -0.3305225968360901, 0.12467645108699799, 0.2179119735956192, 0.1375952959060669, 0.06951689720153809, 0.15178972482681274, 0.02158442884683609, -0.22471678256988525, 0.10401122272014618, -0.27394765615463257, 0.0015653446316719055, -0.010457150638103485, -0.00011768921103794128, 0.1985512524843216, 0.25049930810928345, 0.01825563609600067, -0.22362267971038818, -0.37685659527778625, -0.14454801380634308, -0.242452010512352, 0.36513614654541016, -0.1355101466178894, -0.09358575195074081, -0.02121238224208355, -0.06093741953372955, -0.45713451504707336, 0.3167468309402466, 0.45389682054519653, 0.13048216700553894, 0.27622294425964355, -0.18154172599315643, 0.06921253353357315, 0.4566846787929535, 0.25587522983551025, -0.43706363439559937, 0.05886479467153549, 0.25243252515792847, 0.18570107221603394, -0.33876538276672363, 0.09943393617868423, -0.2765063941478729, 0.05356670543551445, 0.11070366203784943, -0.16762664914131165, -0.12504863739013672, -0.10113660991191864, 0.018076496198773384, 0.18989743292331696, 0.5187673568725586, -0.3050703704357147, -0.41127222776412964, 0.012835599482059479, -0.024575235322117805, -0.12342941761016846, 0.07057436555624008, 0.07104594260454178, -0.19503822922706604, 0.2560913860797882, -0.16747990250587463, 0.09256385266780853, -0.05619681999087334, 0.13018737733364105, 0.09858860820531845, 0.02375386469066143, -0.20408114790916443, 0.1191357970237732, 0.12668879330158234, -0.25863853096961975, -0.11184712499380112, -0.14591124653816223, 0.2967680096626282, 0.09244540333747864, -0.4755655527114868, 0.1367180347442627, 0.040125682950019836, -0.07870760560035706, 0.018362052738666534, 0.41428250074386597, 0.2158135324716568, 0.15954472124576569, 0.13966313004493713, 0.04941559210419655, 0.20441287755966187, 0.22197645902633667, 0.06852365285158157, -0.04436492174863815, -0.10530239343643188, 0.07851937413215637, -0.14523454010486603, 0.0010640500113368034, -0.1521456241607666, -0.3114511966705322, -0.09788960218429565, 0.31223201751708984, 0.4121009111404419, -0.3575097322463989, -0.4674501419067383, 0.25248798727989197, -0.28776901960372925, 0.09174549579620361, 0.22248323261737823, 0.338589608669281, -0.2498277723789215, 0.29613062739372253, 0.1987423300743103, 0.3210389316082001, 0.05635654926300049, -0.03417059779167175, -0.18414705991744995, 0.030848637223243713, -0.2585895359516144, -0.23667870461940765, 0.13492262363433838, -0.39858102798461914, 0.168670654296875, -0.017666485160589218, 0.35204455256462097, -0.05450278893113136, -0.18191635608673096, -0.19472964107990265, 0.24282757937908173, 0.2910793423652649, -0.10534066706895828, 0.01390250027179718, 0.3544130325317383, 0.25573453307151794, 0.05588594079017639, 0.3729282021522522, -0.23300279676914215, -0.3002757132053375, -0.1780872941017151, 0.0582321397960186, -0.2035948783159256, 0.15229710936546326, 0.09303133189678192, -0.15407192707061768, 0.14991222321987152, 0.20809026062488556, 0.08116985112428665, -0.12945549190044403, -0.23304182291030884, -0.38595059514045715, 0.19056598842144012, 0.2743963599205017, -0.6182405948638916, -0.004760898649692535, -0.014037109911441803, -0.1487695574760437, 0.04749993979930878, 0.3841595947742462, -0.27536073327064514, 0.1700030267238617, -0.19349634647369385, 0.46126890182495117, 0.573248565196991, -0.1278233677148819, -0.2931615710258484, 0.5360971093177795, 0.055538468062877655, 0.09293965995311737, 0.07621414959430695, -0.14221195876598358, 0.3458123207092285, 0.016208350658416748, -0.14351488649845123, 0.4373224675655365, -0.014524037018418312, 0.11401038616895676, -0.19822046160697937, -0.22355563938617706, 0.4606880247592926, 0.09164606034755707, -0.07560551911592484, 0.4149668514728546, 0.13710738718509674, -0.11257299780845642, 0.3430796265602112, -0.2926524579524994, 0.25506192445755005, 0.2196037471294403, 0.2745690643787384, 0.10033896565437317, 0.02059132605791092, -0.04824172332882881, -0.42712849378585815, -0.03342998027801514, 0.20141258835792542, 0.012806442566215992, -0.5145580172538757, -0.096554234623909, -0.3189803659915924, 0.4278668165206909, -0.13725176453590393, 0.4671059846878052, 0.011025398969650269, 0.1083802655339241, 0.005610309541225433, -0.15793581306934357, -0.0844135582447052, 0.019879553467035294, -0.35839295387268066, 0.0010893717408180237, -0.42347845435142517, 0.3183642029762268, 0.04278843104839325, -0.3346896171569824, -0.14432747662067413, 0.14937111735343933, 0.20658577978610992, -0.10734736919403076, -0.23303528130054474, 0.22427864372730255, 0.15471400320529938, -0.3089797794818878, -0.4156913161277771, 0.015328183770179749, 0.09694016724824905, -0.44350913166999817, 0.15444396436214447, 0.49889713525772095, 0.3068600594997406, -0.02212832123041153, 0.014480719342827797, 0.6065500378608704, 0.00827423669397831, 0.386633038520813, 0.037855468690395355, 0.23245331645011902, 0.1673082411289215, 0.08571352809667587, -0.12652426958084106, -0.2488260120153427, 0.15574461221694946, -0.08622559159994125, 0.30325138568878174, -0.04918237775564194, -0.319003701210022, -0.030866850167512894, 0.2266705483198166, -0.017853494733572006, 0.009796805679798126, 0.15922632813453674, -0.011384963989257812, 0.08232435584068298, 0.14050345122814178, -0.43682196736335754, 0.2618342638015747, -0.02113291248679161, -0.059472206979990005, 0.029380349442362785, 0.20823940634727478, 0.011194426566362381, 0.09857345372438431, -0.009444918483495712, 0.12639471888542175, 0.26512330770492554, 0.015077173709869385, -0.23039810359477997, -0.21535462141036987, -0.22172482311725616, 0.11010127514600754, 0.14082832634449005, -0.4633813500404358, 0.050147294998168945, -0.42665112018585205, 0.2722446918487549, -0.06855647265911102, -0.44082993268966675, 0.09934365749359131, -0.16599921882152557, -0.2203538715839386, 0.2503197193145752, -0.2572292685508728, 0.3205769658088684, -0.42809778451919556, -0.24391484260559082, 0.2652898132801056, -0.40135008096694946, -0.11348780989646912, 0.11236248165369034, -0.020041463896632195, 0.01695740595459938, 0.29664814472198486, 0.09028460085391998, -0.1991693079471588, 0.3034698963165283, 0.3284248113632202, -0.3032080829143524, -0.08784797787666321, 0.24022695422172546, -0.21909010410308838, 0.10441109538078308, 0.3217679560184479, 0.017449472099542618, -0.14050330221652985, -0.5192824602127075, 0.26245805621147156, -0.09437873959541321, -0.38748571276664734, 0.29029592871665955, -0.032803405076265335, -0.3003602623939514, -0.1927207112312317, -0.4117094874382019, -0.11816388368606567, -0.3373550474643707, 0.1847345381975174, 0.0017490163445472717, -0.03047415241599083, 0.16569310426712036, 0.34998762607574463, 0.21125224232673645, 0.4415520429611206, 0.05602650344371796, -0.02040209248661995, 0.23792748153209686, 0.3065790832042694, -0.10226255655288696, -0.2792108654975891, -0.02607417106628418, -0.17752757668495178, -0.1067294031381607, 0.4506947994232178, -0.38435453176498413, -0.020072877407073975, -0.26161321997642517, 0.3067692518234253, 0.06328292191028595, -0.1999095380306244, 0.3918391168117523, -0.0705389454960823, 0.006493166089057922, -0.20698919892311096, -0.4101981818675995, 0.12237268686294556, 0.10101993381977081, -0.07926087081432343, 0.13498985767364502, 0.5442341566085815, 0.07075672596693039, 0.4649959206581116, -0.09369327872991562, -0.001484596636146307, 0.3875189423561096, -0.0697396770119667, -0.01214841939508915, -0.08852607011795044, -0.2815507650375366, 0.013544846326112747, -0.08961637318134308, -0.2375739961862564, 0.1326904147863388, -0.14069826900959015, -0.14320158958435059, -0.0019529610872268677, 0.08197535574436188, -0.20740866661071777, -0.13298280537128448, 0.2458893060684204, -0.37714242935180664, 0.02182363159954548, -0.12360048294067383, 0.18267464637756348, -0.14044591784477234, 0.028927411884069443, 0.16783595085144043, 0.055430371314287186, 0.1849578469991684, -0.22663846611976624, -0.06903102993965149, -0.15147683024406433, 0.009764782153069973, 0.1811247169971466, 0.3382740020751953, 0.39477163553237915, -0.08590549230575562, -0.386451780796051, 0.14037472009658813, -0.03171829134225845, 0.7456304430961609, -0.15083278715610504, -0.07398423552513123, 0.1350601315498352, 0.06462667137384415, -0.14959090948104858, -0.09870533645153046, -0.11197130382061005, 0.11900913715362549, 0.011804550886154175, 0.14037321507930756, -0.213535875082016, -0.2798958718776703, 0.1714320182800293, 0.17562828958034515, -0.1379627287387848, 0.03455030545592308, -0.19447463750839233, -0.4003295600414276, -0.4286346435546875, 0.10754205286502838, 0.1067245751619339, 0.31182661652565, 0.03517083823680878, 0.2657703757286072, -0.3099600076675415, -0.1119188517332077, 0.08254559338092804, -0.015082206577062607, 0.23369738459587097, -0.1604211926460266, 0.14383456110954285, -0.4180086851119995, 0.20993401110172272, -0.2854929268360138, 0.6654317378997803, 0.17320182919502258, -0.9459055066108704, 0.09670121967792511, -0.16808538138866425, 0.3078938126564026, 0.1503247320652008, -0.18525883555412292, 0.11051956564188004, 0.03201700374484062, -0.15620601177215576, 0.2662452161312103, -0.18625453114509583, 0.11671918630599976, -0.15026766061782837, 0.0761314406991005, -0.24832816421985626, 0.0457661934196949, -0.0347834937274456, -0.002651020884513855, -0.08587796986103058, 0.07956013828516006, -0.11472155898809433, 0.5527675151824951, 0.17983514070510864, 0.9699654579162598, 0.02396289072930813, -0.1561252623796463, 0.5019227862358093, -0.02886967360973358, 0.0040808022022247314, 0.2303256392478943, -0.07525461912155151, -0.4351540207862854, -0.08571489155292511, -0.09654463082551956, -0.06438014656305313, 0.26974040269851685, 0.23877067863941193, -0.2811877727508545, 0.1509925276041031, -0.3945924937725067, 0.411785364151001, 0.006987866014242172, -0.1520410031080246, 0.20548906922340393, -0.3407652974128723, -0.47496530413627625, 0.08679354190826416, -0.05534554272890091, -0.018545063212513924, 0.18890166282653809, -0.3581833243370056, -0.028352074325084686, -0.19816954433918, -0.05100323259830475, 0.5164549946784973, -0.1908339262008667, 0.039986785501241684, 0.3791051506996155, -0.4703684449195862, 0.2239251583814621, 0.43980348110198975, 0.3998716473579407, -0.14298497140407562, -0.0017292294651269913, -0.09427443891763687, 0.13930615782737732, 0.1812196969985962, -0.09698660671710968, -0.16196273267269135, 0.47799408435821533, 0.07228056341409683, -0.2820955812931061, 0.14762961864471436, -0.10892342776060104, -0.41724807024002075, 0.4605788290500641, 0.07212908565998077, 0.12730616331100464, -0.733077347278595, -0.3724484145641327, -0.13192790746688843, 0.12541736662387848, -0.10197082161903381, 0.03335932269692421, -0.049126919358968735, -0.2218230962753296, -0.09678191691637039, 0.12404529750347137, -0.14220814406871796, 0.11123054474592209, 0.3248860836029053, 0.24181608855724335, -0.026327215135097504, 0.45181962847709656, 0.3035562336444855, -0.2704019546508789, -0.19247204065322876, -0.3551880419254303, 0.21841615438461304, -0.6270480155944824, 0.1473800241947174, -0.0647885799407959, -0.19845961034297943, 0.003399822860956192, 0.5333122611045837, -0.14404988288879395, 0.28770530223846436, -0.22813552618026733, -0.4173182249069214, -0.3727036714553833, 0.11848297715187073, 0.1069907546043396, 0.10938678681850433, -0.2477300465106964, 0.12827691435813904, 0.031695641577243805, -0.35450491309165955, -0.23198187351226807, -0.07809226214885712, -0.2600442171096802, 0.17063049972057343, -0.0083379577845335, -0.06741780787706375, 0.1340721845626831, 0.18405067920684814, 0.07911641895771027, 0.22296054661273956, -0.20401199162006378, -0.12464158982038498, -0.041736915707588196, 0.1625330150127411, 0.19535315036773682, -0.1742125153541565, -0.38960957527160645, -0.0502268448472023, 0.009369134902954102, -0.2538594603538513, 0.13255520164966583, 0.1884835809469223, -0.05434863269329071, 0.13003641366958618, -0.13636213541030884, 0.20995907485485077, -0.06939497590065002, 0.10524334758520126, -0.07899107038974762, 0.3028101325035095, 0.05806218460202217, 0.155758336186409, 0.015193674713373184, 0.07308696955442429, -0.13772055506706238, 0.05683634802699089, 0.25968533754348755, 0.185490682721138, 0.21882492303848267, -0.3159268796443939, -0.2992965579032898, -0.07028740644454956, 0.39719170331954956, 0.16563312709331512, -0.15989793837070465, 0.011694133281707764, 0.16277965903282166, 0.15175628662109375, -0.24288585782051086, -0.1559167504310608, 0.37504512071609497, -0.10774639993906021, -0.06423237919807434, 0.19797161221504211, 0.18686538934707642, -0.28223633766174316, 0.5388176441192627, 0.0004603937268257141, 0.28141048550605774, -0.22981727123260498, -0.17920146882534027, 0.5065961480140686, 0.1099860742688179, 0.0936131700873375, 0.11272569000720978, -0.006935121491551399, 0.26766782999038696, 0.2894054651260376, -0.32028916478157043, 0.08015625923871994, 0.21924680471420288, 0.20704858005046844, 0.07649394869804382, -0.5283008813858032, 0.4002666473388672, 0.12547311186790466, -0.24823495745658875, 0.005956579931080341, 0.055573735386133194, 0.25078287720680237, 0.21378058195114136, -0.18437977135181427, -0.21319395303726196, 0.20542040467262268, -0.1458905190229416, -0.21898052096366882, -0.11706950515508652, -0.006675153970718384, -0.21077601611614227, 0.02029748260974884, 0.011649114079773426, -0.047351669520139694, 0.5271093249320984, -0.08609763532876968, 0.13151103258132935, -0.06202993169426918, -0.17990684509277344, 0.1654285341501236, -0.006076157093048096, -0.16830310225486755, 0.14243143796920776, 0.11524242162704468, 0.11243985593318939, 0.06626097857952118, -0.09901225566864014, 0.4534345865249634, 0.3891552686691284, -0.26210924983024597, -0.06964801996946335, 0.10209883749485016, -0.23428162932395935, -0.19835788011550903, 0.4999638795852661, -0.2213355451822281, 0.5917094349861145, 0.260314017534256, 0.09660131484270096, -0.0994538813829422, 0.445137083530426, -0.033246953040361404, 0.27067655324935913, 0.04567110165953636, -0.03487853333353996, 0.06398987770080566, -0.18641823530197144, -0.3186614513397217, -0.24865420162677765, -0.2203906774520874, -0.1989026516675949, 0.3940921723842621, -0.17498843371868134, 0.35618162155151367, 0.16813969612121582, 0.057832200080156326, -0.04014071449637413, 0.1454392373561859, 0.33886173367500305, 0.22885076701641083, -0.2688726782798767, 0.19404028356075287, -0.24610039591789246, 0.22121413052082062, 0.22944554686546326, -0.07163055986166, 0.10943394154310226, 0.5028061866760254, 0.21570172905921936, 0.25716421008110046, -0.5246836543083191, -0.17391452193260193, 0.26034897565841675, 0.3188990354537964, -0.007542923092842102, -0.1579548567533493, 0.24756810069084167, 0.1310029774904251, 0.01323024183511734, -0.4874691367149353, -0.030968837440013885, 0.06667959690093994, 0.05062265694141388, -0.22009971737861633, -0.44193536043167114, -0.2692340612411499, -0.22369606792926788, 0.1519007384777069, 0.04925248771905899, 0.3318808078765869, -0.17620167136192322, -0.06113772094249725, -0.23088723421096802, -0.15730179846286774, -0.119012750685215, 0.11318781226873398, 0.06011240556836128, 0.42602309584617615, 0.006330668926239014, 0.5876150131225586, -0.28343531489372253, 0.1569320112466812, 0.36692070960998535, 0.06271182000637054, -0.22372949123382568, 0.6057047843933105, -0.4659373164176941, 0.18817779421806335, -0.20080971717834473, -0.0022244486026465893, 0.12182672321796417, 0.18456518650054932, -0.15803465247154236, -0.31964927911758423, 0.6224612593650818, -0.4100716710090637, -0.24471168220043182, 0.008484259247779846, 0.03768889605998993, -0.012279070913791656, -0.30900096893310547, -0.8747618198394775, 0.038347676396369934, 0.06056419014930725, -0.11998985707759857, -0.14599165320396423, 0.16546344757080078, 0.16351749002933502, 0.19346942007541656, -0.15386226773262024, 0.21771366894245148, 0.07175064831972122, -0.04668866842985153, 0.0036280155181884766, -0.3572574555873871 ]
https://github.com/huggingface/datasets/issues/6363
I think the code hangs on the `accelerator.main_process_first()` context manager exit. To verify this, you can append a print statement to the end of the `accelerator.main_process_first()` block. If the problem is in `with_transform`, it would help if you could share the error stack trace printed when you interrupt the process (while it hangs)
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
### Describe the bug Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely. ### Steps to reproduce the bug accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model" ### Expected behavior It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset. I added some debug prints ``` print("==========HERE3=============") with accelerator.main_process_first(): print(accelerator.is_main_process) print("===========Here3.1===========") if args.max_train_samples is not None: dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples)) print("===========Here3.2===========") # Set the training transforms train_dataset = dataset["train"].with_transform(preprocess_train) print("==========HERE4=============") Corresponding Output Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 2 Local process index: 2 Device: cuda:2 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. {‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values. {‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values. ==========HERE1============= ==========HERE1============= ==========HERE1============= ==========HERE2============= ==========HERE2============= ==========HERE2============= ==========HERE3============= True ===========Here3.1=========== ===========Here3.2=========== ==========HERE3============= ==========HERE3========= ``` ### Environment info _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pypi_0 pypi accelerate 0.24.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async-timeout 4.0.3 pypi_0 pypi attrs 23.1.0 pypi_0 pypi bitsandbytes 0.41.1 pypi_0 pypi blas 1.0 mkl blessings 1.7 py39h06a4308_1002 brotli-python 1.0.9 py39h6a678d5_7 bzip2 1.0.8 h7b6447c_0 ca-certificates 2023.08.22 h06a4308_0 cachetools 5.3.2 pypi_0 pypi certifi 2023.7.22 py39h06a4308_0 cffi 1.15.1 py39h5eee18b_3 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 unix_pyh707e725_0 conda-forge cryptography 41.0.3 py39hdda0065_0 cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia datasets 2.14.6 pypi_0 pypi diffusers 0.22.0.dev0 pypi_0 pypi dill 0.3.7 pypi_0 pypi docker-pycreds 0.4.0 py_0 conda-forge ffmpeg 4.3 hf484d3e_0 pytorch filelock 3.12.4 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.4.0 pypi_0 pypi fsspec 2023.10.0 pypi_0 pypi ftfy 6.1.1 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.40 pyhd8ed1ab_0 conda-forge gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.1.0 pypi_0 pypi gpustat 0.6.0 pyhd3eb1b0_1 grpcio 1.59.0 pypi_0 pypi huggingface-hub 0.17.3 pypi_0 pypi idna 3.4 py39h06a4308_0 importlib-metadata 6.8.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46305 jinja2 3.1.2 pypi_0 pypi jpeg 9e h5eee18b_1 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.8.0.34 0 nvidia libcurand 10.3.4.52 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1 libffi 3.4.4 h6a678d5_0 libgcc-ng 13.2.0 h807b86a_2 conda-forge libgfortran-ng 13.2.0 h69a702a_2 conda-forge libgfortran5 13.2.0 ha4646dd_2 conda-forge libiconv 1.16 h7f8727e_2 libidn2 2.3.4 h5eee18b_0 libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libpng 1.6.39 h5eee18b_0 libprotobuf 3.20.3 he621ea3_0 libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge libtasn1 4.19.0 h5eee18b_0 libtiff 4.5.1 h6a678d5_0 libunistring 0.9.10 h27cfd23_0 libwebp 1.3.2 h11a3e52_0 libwebp-base 1.3.2 h5eee18b_0 llvm-openmp 14.0.6 h9e868ea_0 lz4-c 1.9.4 h6a678d5_0 markdown 3.5 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mkl 2023.1.0 h213fc3f_46343 mkl-service 2.4.0 py39h5eee18b_1 mkl_fft 1.3.8 py39h5eee18b_0 mkl_random 1.2.4 py39hdb19cb5_0 multidict 6.0.4 pypi_0 pypi multiprocess 0.70.15 pypi_0 pypi ncurses 6.4 h6a678d5_0 nettle 3.7.3 hbbd107a_1 numpy 1.26.0 py39h5f9d8c6_0 numpy-base 1.26.0 py39hb5e798b_0 nvidia-ml 7.352.0 pyhd3eb1b0_0 oauthlib 3.2.2 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 3.0.11 h7f8727e_2 packaging 23.2 pypi_0 pypi pandas 2.1.1 pypi_0 pypi pathtools 0.1.2 py_1 conda-forge pillow 10.0.1 py39ha6cbd5a_0 pip 23.3 py39h06a4308_0 protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi pyarrow 13.0.0 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pyopenssl 23.2.0 py39h06a4308_0 pysocks 1.7.1 py39h06a4308_0 python 3.9.18 h955ad1f_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0 regex 2023.10.3 pypi_0 pypi requests 2.31.0 py39h06a4308_0 requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.0 pypi_0 pypi scipy 1.11.3 py39h5f9d8c6_0 sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge setproctitle 1.1.10 py39h3811e60_1004 conda-forge setuptools 68.0.0 py39h06a4308_0 six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h5eee18b_0 tbb 2021.8.0 hdb19cb5_0 tensorboard 2.15.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tokenizers 0.14.1 pypi_0 pypi torchaudio 0.13.1 py39_cu117 pytorch torchtriton 2.1.0 py39 pytorch torchvision 0.14.1 py39_cu117 pytorch tqdm 4.66.1 pypi_0 pypi transformers 4.34.1 pypi_0 pypi typing_extensions 4.7.1 py39h06a4308_0 tzdata 2023.3 pypi_0 pypi urllib3 1.26.18 py39h06a4308_0 wandb 0.15.12 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pypi_0 pypi werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39h06a4308_0 xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers xxhash 3.4.1 pypi_0 pypi xz 5.4.2 h5eee18b_0 yaml 0.2.5 h7f98852_2 conda-forge yarl 1.9.2 pypi_0 pypi zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.5 hc292b87_0
53
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL ### Describe the bug Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely. ### Steps to reproduce the bug accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model" ### Expected behavior It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset. I added some debug prints ``` print("==========HERE3=============") with accelerator.main_process_first(): print(accelerator.is_main_process) print("===========Here3.1===========") if args.max_train_samples is not None: dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples)) print("===========Here3.2===========") # Set the training transforms train_dataset = dataset["train"].with_transform(preprocess_train) print("==========HERE4=============") Corresponding Output Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 2 Local process index: 2 Device: cuda:2 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. {‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values. {‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values. ==========HERE1============= ==========HERE1============= ==========HERE1============= ==========HERE2============= ==========HERE2============= ==========HERE2============= ==========HERE3============= True ===========Here3.1=========== ===========Here3.2=========== ==========HERE3============= ==========HERE3========= ``` ### Environment info _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pypi_0 pypi accelerate 0.24.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async-timeout 4.0.3 pypi_0 pypi attrs 23.1.0 pypi_0 pypi bitsandbytes 0.41.1 pypi_0 pypi blas 1.0 mkl blessings 1.7 py39h06a4308_1002 brotli-python 1.0.9 py39h6a678d5_7 bzip2 1.0.8 h7b6447c_0 ca-certificates 2023.08.22 h06a4308_0 cachetools 5.3.2 pypi_0 pypi certifi 2023.7.22 py39h06a4308_0 cffi 1.15.1 py39h5eee18b_3 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 unix_pyh707e725_0 conda-forge cryptography 41.0.3 py39hdda0065_0 cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia datasets 2.14.6 pypi_0 pypi diffusers 0.22.0.dev0 pypi_0 pypi dill 0.3.7 pypi_0 pypi docker-pycreds 0.4.0 py_0 conda-forge ffmpeg 4.3 hf484d3e_0 pytorch filelock 3.12.4 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.4.0 pypi_0 pypi fsspec 2023.10.0 pypi_0 pypi ftfy 6.1.1 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.40 pyhd8ed1ab_0 conda-forge gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.1.0 pypi_0 pypi gpustat 0.6.0 pyhd3eb1b0_1 grpcio 1.59.0 pypi_0 pypi huggingface-hub 0.17.3 pypi_0 pypi idna 3.4 py39h06a4308_0 importlib-metadata 6.8.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46305 jinja2 3.1.2 pypi_0 pypi jpeg 9e h5eee18b_1 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.8.0.34 0 nvidia libcurand 10.3.4.52 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1 libffi 3.4.4 h6a678d5_0 libgcc-ng 13.2.0 h807b86a_2 conda-forge libgfortran-ng 13.2.0 h69a702a_2 conda-forge libgfortran5 13.2.0 ha4646dd_2 conda-forge libiconv 1.16 h7f8727e_2 libidn2 2.3.4 h5eee18b_0 libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libpng 1.6.39 h5eee18b_0 libprotobuf 3.20.3 he621ea3_0 libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge libtasn1 4.19.0 h5eee18b_0 libtiff 4.5.1 h6a678d5_0 libunistring 0.9.10 h27cfd23_0 libwebp 1.3.2 h11a3e52_0 libwebp-base 1.3.2 h5eee18b_0 llvm-openmp 14.0.6 h9e868ea_0 lz4-c 1.9.4 h6a678d5_0 markdown 3.5 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mkl 2023.1.0 h213fc3f_46343 mkl-service 2.4.0 py39h5eee18b_1 mkl_fft 1.3.8 py39h5eee18b_0 mkl_random 1.2.4 py39hdb19cb5_0 multidict 6.0.4 pypi_0 pypi multiprocess 0.70.15 pypi_0 pypi ncurses 6.4 h6a678d5_0 nettle 3.7.3 hbbd107a_1 numpy 1.26.0 py39h5f9d8c6_0 numpy-base 1.26.0 py39hb5e798b_0 nvidia-ml 7.352.0 pyhd3eb1b0_0 oauthlib 3.2.2 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 3.0.11 h7f8727e_2 packaging 23.2 pypi_0 pypi pandas 2.1.1 pypi_0 pypi pathtools 0.1.2 py_1 conda-forge pillow 10.0.1 py39ha6cbd5a_0 pip 23.3 py39h06a4308_0 protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi pyarrow 13.0.0 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pyopenssl 23.2.0 py39h06a4308_0 pysocks 1.7.1 py39h06a4308_0 python 3.9.18 h955ad1f_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0 regex 2023.10.3 pypi_0 pypi requests 2.31.0 py39h06a4308_0 requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.0 pypi_0 pypi scipy 1.11.3 py39h5f9d8c6_0 sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge setproctitle 1.1.10 py39h3811e60_1004 conda-forge setuptools 68.0.0 py39h06a4308_0 six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h5eee18b_0 tbb 2021.8.0 hdb19cb5_0 tensorboard 2.15.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tokenizers 0.14.1 pypi_0 pypi torchaudio 0.13.1 py39_cu117 pytorch torchtriton 2.1.0 py39 pytorch torchvision 0.14.1 py39_cu117 pytorch tqdm 4.66.1 pypi_0 pypi transformers 4.34.1 pypi_0 pypi typing_extensions 4.7.1 py39h06a4308_0 tzdata 2023.3 pypi_0 pypi urllib3 1.26.18 py39h06a4308_0 wandb 0.15.12 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pypi_0 pypi werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39h06a4308_0 xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers xxhash 3.4.1 pypi_0 pypi xz 5.4.2 h5eee18b_0 yaml 0.2.5 h7f98852_2 conda-forge yarl 1.9.2 pypi_0 pypi zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.5 hc292b87_0 I think the code hangs on the `accelerator.main_process_first()` context manager exit. To verify this, you can append a print statement to the end of the `accelerator.main_process_first()` block. If the problem is in `with_transform`, it would help if you could share the error stack trace printed when you interrupt the process (while it hangs)
[ -0.29093098640441895, -0.4494297206401825, 0.03063829243183136, 0.10455924272537231, 0.7972444295883179, -0.06378263235092163, 0.38594162464141846, 0.08792893588542938, -0.19314613938331604, 0.4078892171382904, 0.08595020323991776, 0.15589837729930878, 0.01676591858267784, -0.07265159487724304, 0.02791040763258934, -0.12267455458641052, 0.1636425107717514, -0.15872235596179962, -0.010782875120639801, -0.2772062420845032, 0.05453786998987198, 0.02825688011944294, -0.19733773171901703, 0.05589437857270241, -0.415914386510849, -0.17970845103263855, 0.0735665038228035, -0.052424535155296326, -0.07989750802516937, 0.049917325377464294, 0.06106237322092056, 0.2990711033344269, -0.25099629163742065, 0.41525450348854065, -0.00012525715283118188, 0.015866786241531372, 0.17968347668647766, 0.12324430793523788, -0.062261901795864105, -0.27441003918647766, -0.06299880146980286, 0.13892382383346558, -0.24097135663032532, 0.010507136583328247, -0.1529707908630371, 0.09709952771663666, -0.14965295791625977, -0.3297668695449829, 0.4145660102367401, 0.14753317832946777, 0.06290823221206665, -0.09227758646011353, -0.10776235163211823, -0.24873676896095276, -0.0551648885011673, -0.2281971275806427, -0.2207949161529541, 0.0906703919172287, 0.2940048575401306, 0.027575597167015076, -0.4739746153354645, 0.4821750223636627, 0.18431341648101807, -0.22458381950855255, -0.022432224825024605, -0.22474652528762817, 0.305581271648407, -0.3545084595680237, 0.14583119750022888, 0.3009342849254608, 0.12916240096092224, 0.047329630702733994, -0.3434460759162903, -0.3459230661392212, 0.35185813903808594, -0.05253330245614052, 0.23941899836063385, -0.018792400136590004, -0.2868098318576813, 0.012072034180164337, -0.2741742730140686, -0.1855693757534027, -0.0877263993024826, 0.024806272238492966, -0.278726190328598, 0.5902511477470398, 0.04143892973661423, 0.21439200639724731, 0.3844811022281647, 0.08770126849412918, 0.06263422220945358, 0.21698591113090515, 0.3053859770298004, -0.12789812684059143, -0.6810310482978821, 0.25515833497047424, 0.012995811179280281, -0.3107757568359375, 0.09026800096035004, 0.1121412143111229, 0.05166146904230118, -0.1752394735813141, 0.1803348809480667, -0.10411490499973297, 0.35753971338272095, 0.233581081032753, -0.144460529088974, 0.09754469990730286, 0.2890278100967407, 0.08275659382343292, -0.1745910942554474, 0.20930197834968567, -0.18796375393867493, -0.11595229804515839, -0.3650617301464081, -0.03388985991477966, 0.02104467898607254, -0.10529615730047226, -0.20620009303092957, 0.14734461903572083, 0.1114935502409935, 0.17682747542858124, 0.27773281931877136, 0.42067357897758484, 0.07787610590457916, 0.7555187940597534, 0.2579122483730316, -0.15936219692230225, -0.021704282611608505, 0.12056688964366913, -0.13192856311798096, 0.027789991348981857, -0.15243129432201385, 0.004863418638706207, -0.1992267370223999, -0.47606784105300903, -0.017662890255451202, 0.0025355443358421326, 0.27236586809158325, -0.05497652664780617, -0.18235522508621216, -0.2208123356103897, 0.37471646070480347, 0.37832772731781006, -0.21296776831150055, 0.279074490070343, -0.0012135645374655724, 0.0017618462443351746, 0.03826992213726044, 0.07553091645240784, 0.03614668548107147, 0.05429576337337494, -0.10336742550134659, 0.12322831898927689, 0.011887654662132263, 0.1707298457622528, 0.011563945561647415, 0.07063841819763184, 0.19952648878097534, -0.20099028944969177, 0.2038043588399887, -0.41347017884254456, 0.11982451379299164, -0.009271781891584396, 0.381860613822937, 0.26071226596832275, 0.056342288851737976, -0.008020684123039246, -0.17035627365112305, 0.040609389543533325, 0.07158031314611435, 0.0983484759926796, 0.0362163782119751, 0.04308449104428291, -0.26185116171836853, -0.10603012144565582, -0.1299661546945572, -0.3587593734264374, -0.3763452172279358, 0.32573989033699036, -0.6488757133483887, 0.25718018412590027, 0.019184496253728867, 0.26223862171173096, 0.2667231857776642, 0.02353561297059059, -0.06492945551872253, 0.5186488628387451, -0.3449781537055969, 0.13019108772277832, -0.23221132159233093, 0.20998886227607727, 0.17275048792362213, 0.24224740266799927, 0.021468909457325935, 0.12182505428791046, -0.25892093777656555, 0.6672351360321045, 0.2809157371520996, 0.036017581820487976, 0.05635717511177063, 0.16508260369300842, 0.1519118845462799, -0.14992107450962067, 0.09039820730686188, 0.0025761425495147705, -0.24591568112373352, 0.1728610396385193, 0.3576936721801758, 0.12002069503068924, 0.15794768929481506, -0.038025952875614166, -0.12708066403865814, 0.052086442708969116, -0.35760989785194397, -0.3875839114189148, -0.09129570424556732, 0.06910251080989838, 0.03674685209989548, 0.19581347703933716, -0.15071818232536316, 0.4472478926181793, -0.02716771513223648, 0.21931131184101105, -0.6124293804168701, 0.03661983460187912, -0.0009291525930166245, -0.030169138684868813, -0.2348170280456543, 0.013935375958681107, -0.17781299352645874, -0.3156604468822479, -0.41003111004829407, 0.503865122795105, -0.1705000251531601, 0.08790314197540283, -0.07338675856590271, 0.0092906653881073, 0.22858057916164398, -0.04456615447998047, -0.07263581454753876, 0.05791309103369713, -0.07873371243476868, -0.20616695284843445, -0.22220230102539062, 0.34187960624694824, -0.08082819730043411, 0.2786802351474762, -0.043847259134054184, 0.23293015360832214, 0.21554046869277954, 0.08909304440021515, -0.29612988233566284, 0.14724168181419373, 0.41495585441589355, -0.13992491364479065, 0.8125132322311401, -0.2005476951599121, -0.38266521692276, 0.2616848051548004, 0.11219091713428497, 0.05131562799215317, -0.17455480992794037, 0.15135854482650757, 0.06870926916599274, 0.0006399080157279968, 0.08073675632476807, 0.22402110695838928, 0.2420496642589569, -0.04289408400654793, 0.022172164171934128, 0.0635923519730568, -0.28231438994407654, -0.2176913321018219, -0.014196038246154785, -0.28047746419906616, 0.35380300879478455, 0.18512865900993347, 0.023111563175916672, 0.08829210698604584, -0.22599804401397705, -0.1894897222518921, 0.10063602775335312, 0.22963447868824005, -0.0491359643638134, 0.10131427645683289, -0.2498294711112976, -0.3735664486885071, -0.23612093925476074, -0.02193029224872589, -0.33328455686569214, -0.3378172814846039, -0.26234614849090576, 0.16798631846904755, -0.03258620202541351, 0.482687771320343, 0.13254082202911377, 0.07211986184120178, 0.48610252141952515, 0.015022067353129387, -0.4869169592857361, -0.0020725391805171967, -0.0499274879693985, -0.07366709411144257, 0.10482243448495865, -0.18185749650001526, 0.06869827955961227, 0.31064167618751526, -0.09867694973945618, -0.22447457909584045, -0.4791814386844635, -0.08977992832660675, -0.2976202070713043, 0.12055830657482147, 0.23006124794483185, 0.12817634642124176, 0.14892460405826569, 0.19109781086444855, 0.26745450496673584, -0.4876634478569031, -0.07869003713130951, 0.11802081763744354, 0.15102386474609375, -0.21905329823493958, -0.10704880952835083, -0.3263394832611084, -0.0710262656211853, -0.2586098909378052, 0.07136206328868866, -0.5934926271438599, -0.16868868470191956, 0.12304113805294037, 0.28165990114212036, 0.048888519406318665, -0.21608246862888336, -0.24563053250312805, -0.05555731803178787, -0.1069803386926651, 0.23708476126194, 0.008940700441598892, -0.28850436210632324, -0.22880415618419647, -0.07171546667814255, -0.009263822808861732, 0.46748316287994385, -0.4094804525375366, -0.03520379588007927, -0.24617496132850647, -0.10047391057014465, -0.0654420554637909, -0.12347614020109177, 0.24379290640354156, -0.21410876512527466, 0.030196290463209152, -0.0505293533205986, -0.1940537691116333, 0.1511904001235962, 0.1674644947052002, 0.20632822811603546, -0.28265640139579773, 0.23079517483711243, 0.11247845739126205, 0.2068874090909958, 0.0009274706244468689, 0.10379424691200256, -0.14080305397510529, -0.03888152912259102, 0.07296086847782135, 0.08758653700351715, -0.26166635751724243, 0.5775612592697144, 0.011862948536872864, -0.16235153377056122, -0.09711077809333801, 0.01775958761572838, 0.16147416830062866, -0.2231372892856598, 0.266476571559906, 0.10300076007843018, -0.08254062384366989, 0.048685379326343536, -0.23743227124214172, 0.10538992285728455, 0.12059995532035828, 0.28714144229888916, 0.2701711356639862, 0.27155840396881104, -0.02739229053258896, 0.20987501740455627, 0.14358943700790405, -0.16923338174819946, 0.04695184528827667, -0.09968435764312744, -0.2603164613246918, 0.01436295360326767, -0.02391020394861698, 0.6091195344924927, 0.006027087569236755, -0.013803981244564056, 0.10203264653682709, -0.354825496673584, 0.9719873070716858, -0.2214687466621399, -0.0266696996986866, 0.09222066402435303, -0.5891108512878418, -0.036201201379299164, -0.06563328206539154, -0.00904228538274765, -0.38417771458625793, 0.20697689056396484, 0.41394469141960144, -0.10487012565135956, -0.23602080345153809, 0.3500775396823883, -0.09194701910018921, -0.14105316996574402, -0.00830128788948059, -0.0750935971736908, -0.43644607067108154, -0.1383827179670334, 0.4325496554374695, -0.13847126066684723, 0.03221249207854271, -0.41526755690574646, -0.05839179828763008, -0.10723388195037842, -0.025354214012622833, -0.09618060290813446, 0.18223536014556885, 0.0634758323431015, -0.1936734914779663, 0.3128211796283722, 0.1928916573524475, 0.209426611661911, 0.021394474431872368, 0.26464569568634033, -0.17532074451446533, -0.3635667562484741, 0.05325288325548172, -0.15946000814437866, -0.005654145032167435, 0.6761327981948853, -0.31356146931648254, 0.2690911889076233, -0.04029705375432968, 0.41259026527404785, -0.05024155229330063, 0.3166467547416687, 0.22401410341262817, 0.26510730385780334, -0.2192293405532837, -0.4766666889190674, 0.28769296407699585, 0.29836294054985046, 0.04188145697116852, 0.346893310546875, -0.3151338994503021, -0.11680620908737183, -0.15012559294700623, 0.15870380401611328, 0.8173956871032715, -0.17136117815971375, 0.18267306685447693, 0.3383522927761078, 0.2260408252477646, 0.06513699889183044, 0.22490671277046204, 0.23265591263771057, -0.3383629322052002, -0.7098581194877625, -0.1423981487751007, -0.10279428213834763, 0.30479881167411804, -0.11201424151659012, -0.11560896784067154, 0.3596278727054596, -0.0016807317733764648, 0.06868284940719604, 0.01871420070528984, 0.20677044987678528, 0.05152275413274765, -0.39116352796554565, -0.13501958549022675, 0.040934689342975616, -0.2017110139131546, 0.349634051322937, -0.02803814224898815, -0.05542513355612755, -0.2729372978210449, -0.09661668539047241, -0.20163075625896454, 0.3631894588470459, -0.34563738107681274, -0.07656164467334747, -0.15404587984085083, -0.40909355878829956, 0.24086622893810272, 0.3204573094844818, -0.032179735600948334, 0.14836013317108154, 0.024087918922305107, 0.36679601669311523, -0.022546522319316864, -0.0482269749045372, 0.13627326488494873, -0.26035037636756897, 0.47792714834213257, 0.0022418275475502014, 0.2012518346309662, 0.01313890889286995, -0.011381138116121292, 0.16694635152816772, -0.05868689715862274, -0.009294681251049042, 0.09570266306400299, 0.13714087009429932, 0.026442263275384903, 0.17865349352359772, -0.23142239451408386, -0.5112200975418091, 0.01928665116429329, 0.1434318870306015, -0.21843524277210236, 0.14479763805866241, -0.14816835522651672, -0.17964278161525726, 0.011207349598407745, 0.4318925738334656, 0.07744753360748291, -0.13039186596870422, 0.1549435704946518, 0.18979525566101074, 0.005871899425983429, -0.10631835460662842, -0.002437114715576172, 0.10239076614379883, -0.5212146639823914, 0.4950089454650879, -0.27831128239631653, -0.25704285502433777, 0.11024000495672226, -0.22471672296524048, 0.043006353080272675, -0.21633873879909515, -0.144390270113945, -0.18616777658462524, -0.19291967153549194, -0.023063257336616516, -0.09203049540519714, -0.002615331206470728, -0.32394981384277344, 0.1861409693956375, 0.1944994330406189, 0.21860545873641968, -0.18480411171913147, -0.10701050609350204, -0.4526258707046509, 0.07453212141990662, 0.01969597488641739, -0.17327578365802765, 0.0031472593545913696, -0.22970911860466003, 0.05020700767636299, 0.24520541727542877, -0.0027952343225479126, -0.10506175458431244, -0.24379506707191467, 0.16888104379177094, 0.12302737683057785, 0.18950393795967102, 0.19521450996398926, -0.1130276620388031, -0.26053476333618164, -0.11193691194057465, 0.310611367225647, 0.04665328562259674, -0.003140261396765709, -0.2647828161716461, 0.021670985966920853, 0.2501443028450012, 0.16901260614395142, 0.3475968837738037, -0.003481518477201462, -0.3070365786552429, 0.2179805040359497, 0.25139713287353516, -0.004950717091560364, -0.19190584123134613, -0.6131375432014465, -0.06007172539830208, 0.25315964221954346, -0.023186225444078445, 0.4646250903606415, -0.23495268821716309, -0.08317491412162781, 0.13863937556743622, 0.5589496493339539, 0.5356143116950989, -0.4253224730491638, -0.020697902888059616, 0.2814907133579254, 0.08085139095783234, -0.24977394938468933, 0.2214163988828659, -0.22925353050231934, -0.09324148297309875, 0.041203126311302185, 0.35616305470466614, 0.07055042684078217, 0.06011959910392761, -0.41570642590522766, 0.2909097671508789, 0.2516123056411743, -0.07609675079584122, -0.020012713968753815, 0.34123358130455017, 0.1036936417222023, 0.27813440561294556, 0.18926683068275452, 0.1758067011833191, -0.0705123096704483, 0.3598220944404602, 0.30618926882743835, 0.5728679299354553, 0.16298915445804596, 0.3363964855670929, 0.17357563972473145, -0.1703508198261261, -0.08556867390871048, 0.5045971274375916, -0.5123758316040039, 0.24821226298809052, -0.3158063590526581, 0.1709698736667633, -0.48193445801734924, -0.5417709350585938, -0.06486140936613083, 0.42344141006469727, -0.2529941201210022, 0.1432608664035797, 0.3605583608150482, -0.060306012630462646, -0.2993941903114319, 0.0054230764508247375, 0.01490685623139143, -0.09603232145309448, 0.3661772608757019, 0.1430702656507492, 0.10829146206378937, -0.3494257628917694, -0.41752541065216064, -0.02777441218495369, 0.16122561693191528, -0.32945847511291504, 0.3687637448310852, 0.23874229192733765, -0.1433505415916443, -0.1612587869167328, 0.37894749641418457, 0.40788066387176514, 0.5197636485099792, -0.13192470371723175, 0.26190757751464844, 0.18739792704582214, 0.00794026255607605, 0.29976725578308105, 0.2879451811313629, 0.1420636773109436, 0.24858495593070984, 0.3171003758907318, -0.040023062378168106, -0.1348453164100647, -0.06394527852535248, -0.014476025477051735, 0.45347824692726135, -0.05540985241532326, 0.45817938446998596, -0.22142738103866577, 0.028117939829826355, -0.20692892372608185, 0.19624857604503632, -0.3841955363750458, 0.023330867290496826, 0.14712639153003693, -0.26532039046287537, -0.05601784586906433, 0.06436114013195038, -0.0035086162388324738, 0.0264773927628994, 0.4905337393283844, 0.2314278483390808, 0.2814987897872925, -0.352979838848114, -0.4432319104671478, -0.7061963081359863, 0.16672763228416443, 0.023132557049393654, -0.306435227394104, -0.017993785440921783, 0.12486810982227325, 0.12715306878089905, -0.1001901924610138, 0.07469306141138077, -0.35190555453300476, 0.3043103516101837, 0.654619574546814, -0.13863436877727509, -0.01618964597582817, -0.13077615201473236, 0.1170499250292778, -0.06711403280496597, -0.21607890725135803, 0.3050326108932495, 0.35158997774124146, -0.05563167855143547, 0.2046026736497879, 0.3729979991912842, -0.028206568211317062, -0.318655401468277, -0.09511033445596695, 0.012595592066645622, 0.0027333498001098633, 0.035131193697452545, 0.004853479564189911, -0.18408791720867157, 0.10576289147138596, -0.11553087830543518, -0.12297698110342026, 0.32705581188201904, 0.41286545991897583, 0.17702877521514893, -0.08075986802577972, -0.3500661849975586, -0.06284124404191971, 0.3189769685268402, 0.14865346252918243, -0.3886559009552002, 0.2241535633802414, 0.1298566460609436, 0.20014871656894684, 0.32538455724716187, 0.46084025502204895, 0.022029351443052292, -0.06451865285634995, -0.39495256543159485, -0.43277832865715027, 0.5375050902366638, 0.21196846663951874, -0.32295680046081543, -0.12017597258090973, -0.0933184027671814, -0.12758205831050873, 0.045847535133361816, -0.3817824423313141, -0.10365556180477142, -0.09756830334663391, -0.031497761607170105, -0.4701172709465027, 0.14581920206546783, -0.17087671160697937, -0.12030047178268433, -0.06335633993148804, -0.0003438293933868408, 0.2299572080373764, -0.13677114248275757, 0.3738816976547241, -0.011800900101661682 ]
https://github.com/huggingface/datasets/issues/6363
@mariosasko yes the problem seems to be to exit from accelerator.main_process_first(). Is there any known problem?
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
### Describe the bug Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely. ### Steps to reproduce the bug accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model" ### Expected behavior It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset. I added some debug prints ``` print("==========HERE3=============") with accelerator.main_process_first(): print(accelerator.is_main_process) print("===========Here3.1===========") if args.max_train_samples is not None: dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples)) print("===========Here3.2===========") # Set the training transforms train_dataset = dataset["train"].with_transform(preprocess_train) print("==========HERE4=============") Corresponding Output Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 2 Local process index: 2 Device: cuda:2 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. {‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values. {‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values. ==========HERE1============= ==========HERE1============= ==========HERE1============= ==========HERE2============= ==========HERE2============= ==========HERE2============= ==========HERE3============= True ===========Here3.1=========== ===========Here3.2=========== ==========HERE3============= ==========HERE3========= ``` ### Environment info _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pypi_0 pypi accelerate 0.24.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async-timeout 4.0.3 pypi_0 pypi attrs 23.1.0 pypi_0 pypi bitsandbytes 0.41.1 pypi_0 pypi blas 1.0 mkl blessings 1.7 py39h06a4308_1002 brotli-python 1.0.9 py39h6a678d5_7 bzip2 1.0.8 h7b6447c_0 ca-certificates 2023.08.22 h06a4308_0 cachetools 5.3.2 pypi_0 pypi certifi 2023.7.22 py39h06a4308_0 cffi 1.15.1 py39h5eee18b_3 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 unix_pyh707e725_0 conda-forge cryptography 41.0.3 py39hdda0065_0 cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia datasets 2.14.6 pypi_0 pypi diffusers 0.22.0.dev0 pypi_0 pypi dill 0.3.7 pypi_0 pypi docker-pycreds 0.4.0 py_0 conda-forge ffmpeg 4.3 hf484d3e_0 pytorch filelock 3.12.4 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.4.0 pypi_0 pypi fsspec 2023.10.0 pypi_0 pypi ftfy 6.1.1 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.40 pyhd8ed1ab_0 conda-forge gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.1.0 pypi_0 pypi gpustat 0.6.0 pyhd3eb1b0_1 grpcio 1.59.0 pypi_0 pypi huggingface-hub 0.17.3 pypi_0 pypi idna 3.4 py39h06a4308_0 importlib-metadata 6.8.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46305 jinja2 3.1.2 pypi_0 pypi jpeg 9e h5eee18b_1 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.8.0.34 0 nvidia libcurand 10.3.4.52 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1 libffi 3.4.4 h6a678d5_0 libgcc-ng 13.2.0 h807b86a_2 conda-forge libgfortran-ng 13.2.0 h69a702a_2 conda-forge libgfortran5 13.2.0 ha4646dd_2 conda-forge libiconv 1.16 h7f8727e_2 libidn2 2.3.4 h5eee18b_0 libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libpng 1.6.39 h5eee18b_0 libprotobuf 3.20.3 he621ea3_0 libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge libtasn1 4.19.0 h5eee18b_0 libtiff 4.5.1 h6a678d5_0 libunistring 0.9.10 h27cfd23_0 libwebp 1.3.2 h11a3e52_0 libwebp-base 1.3.2 h5eee18b_0 llvm-openmp 14.0.6 h9e868ea_0 lz4-c 1.9.4 h6a678d5_0 markdown 3.5 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mkl 2023.1.0 h213fc3f_46343 mkl-service 2.4.0 py39h5eee18b_1 mkl_fft 1.3.8 py39h5eee18b_0 mkl_random 1.2.4 py39hdb19cb5_0 multidict 6.0.4 pypi_0 pypi multiprocess 0.70.15 pypi_0 pypi ncurses 6.4 h6a678d5_0 nettle 3.7.3 hbbd107a_1 numpy 1.26.0 py39h5f9d8c6_0 numpy-base 1.26.0 py39hb5e798b_0 nvidia-ml 7.352.0 pyhd3eb1b0_0 oauthlib 3.2.2 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 3.0.11 h7f8727e_2 packaging 23.2 pypi_0 pypi pandas 2.1.1 pypi_0 pypi pathtools 0.1.2 py_1 conda-forge pillow 10.0.1 py39ha6cbd5a_0 pip 23.3 py39h06a4308_0 protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi pyarrow 13.0.0 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pyopenssl 23.2.0 py39h06a4308_0 pysocks 1.7.1 py39h06a4308_0 python 3.9.18 h955ad1f_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0 regex 2023.10.3 pypi_0 pypi requests 2.31.0 py39h06a4308_0 requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.0 pypi_0 pypi scipy 1.11.3 py39h5f9d8c6_0 sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge setproctitle 1.1.10 py39h3811e60_1004 conda-forge setuptools 68.0.0 py39h06a4308_0 six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h5eee18b_0 tbb 2021.8.0 hdb19cb5_0 tensorboard 2.15.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tokenizers 0.14.1 pypi_0 pypi torchaudio 0.13.1 py39_cu117 pytorch torchtriton 2.1.0 py39 pytorch torchvision 0.14.1 py39_cu117 pytorch tqdm 4.66.1 pypi_0 pypi transformers 4.34.1 pypi_0 pypi typing_extensions 4.7.1 py39h06a4308_0 tzdata 2023.3 pypi_0 pypi urllib3 1.26.18 py39h06a4308_0 wandb 0.15.12 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pypi_0 pypi werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39h06a4308_0 xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers xxhash 3.4.1 pypi_0 pypi xz 5.4.2 h5eee18b_0 yaml 0.2.5 h7f98852_2 conda-forge yarl 1.9.2 pypi_0 pypi zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.5 hc292b87_0
16
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL ### Describe the bug Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely. ### Steps to reproduce the bug accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model" ### Expected behavior It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset. I added some debug prints ``` print("==========HERE3=============") with accelerator.main_process_first(): print(accelerator.is_main_process) print("===========Here3.1===========") if args.max_train_samples is not None: dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples)) print("===========Here3.2===========") # Set the training transforms train_dataset = dataset["train"].with_transform(preprocess_train) print("==========HERE4=============") Corresponding Output Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 2 Local process index: 2 Device: cuda:2 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. {‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values. {‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values. ==========HERE1============= ==========HERE1============= ==========HERE1============= ==========HERE2============= ==========HERE2============= ==========HERE2============= ==========HERE3============= True ===========Here3.1=========== ===========Here3.2=========== ==========HERE3============= ==========HERE3========= ``` ### Environment info _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pypi_0 pypi accelerate 0.24.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async-timeout 4.0.3 pypi_0 pypi attrs 23.1.0 pypi_0 pypi bitsandbytes 0.41.1 pypi_0 pypi blas 1.0 mkl blessings 1.7 py39h06a4308_1002 brotli-python 1.0.9 py39h6a678d5_7 bzip2 1.0.8 h7b6447c_0 ca-certificates 2023.08.22 h06a4308_0 cachetools 5.3.2 pypi_0 pypi certifi 2023.7.22 py39h06a4308_0 cffi 1.15.1 py39h5eee18b_3 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 unix_pyh707e725_0 conda-forge cryptography 41.0.3 py39hdda0065_0 cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia datasets 2.14.6 pypi_0 pypi diffusers 0.22.0.dev0 pypi_0 pypi dill 0.3.7 pypi_0 pypi docker-pycreds 0.4.0 py_0 conda-forge ffmpeg 4.3 hf484d3e_0 pytorch filelock 3.12.4 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.4.0 pypi_0 pypi fsspec 2023.10.0 pypi_0 pypi ftfy 6.1.1 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.40 pyhd8ed1ab_0 conda-forge gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.1.0 pypi_0 pypi gpustat 0.6.0 pyhd3eb1b0_1 grpcio 1.59.0 pypi_0 pypi huggingface-hub 0.17.3 pypi_0 pypi idna 3.4 py39h06a4308_0 importlib-metadata 6.8.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46305 jinja2 3.1.2 pypi_0 pypi jpeg 9e h5eee18b_1 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.8.0.34 0 nvidia libcurand 10.3.4.52 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1 libffi 3.4.4 h6a678d5_0 libgcc-ng 13.2.0 h807b86a_2 conda-forge libgfortran-ng 13.2.0 h69a702a_2 conda-forge libgfortran5 13.2.0 ha4646dd_2 conda-forge libiconv 1.16 h7f8727e_2 libidn2 2.3.4 h5eee18b_0 libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libpng 1.6.39 h5eee18b_0 libprotobuf 3.20.3 he621ea3_0 libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge libtasn1 4.19.0 h5eee18b_0 libtiff 4.5.1 h6a678d5_0 libunistring 0.9.10 h27cfd23_0 libwebp 1.3.2 h11a3e52_0 libwebp-base 1.3.2 h5eee18b_0 llvm-openmp 14.0.6 h9e868ea_0 lz4-c 1.9.4 h6a678d5_0 markdown 3.5 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mkl 2023.1.0 h213fc3f_46343 mkl-service 2.4.0 py39h5eee18b_1 mkl_fft 1.3.8 py39h5eee18b_0 mkl_random 1.2.4 py39hdb19cb5_0 multidict 6.0.4 pypi_0 pypi multiprocess 0.70.15 pypi_0 pypi ncurses 6.4 h6a678d5_0 nettle 3.7.3 hbbd107a_1 numpy 1.26.0 py39h5f9d8c6_0 numpy-base 1.26.0 py39hb5e798b_0 nvidia-ml 7.352.0 pyhd3eb1b0_0 oauthlib 3.2.2 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 3.0.11 h7f8727e_2 packaging 23.2 pypi_0 pypi pandas 2.1.1 pypi_0 pypi pathtools 0.1.2 py_1 conda-forge pillow 10.0.1 py39ha6cbd5a_0 pip 23.3 py39h06a4308_0 protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi pyarrow 13.0.0 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pyopenssl 23.2.0 py39h06a4308_0 pysocks 1.7.1 py39h06a4308_0 python 3.9.18 h955ad1f_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0 regex 2023.10.3 pypi_0 pypi requests 2.31.0 py39h06a4308_0 requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.0 pypi_0 pypi scipy 1.11.3 py39h5f9d8c6_0 sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge setproctitle 1.1.10 py39h3811e60_1004 conda-forge setuptools 68.0.0 py39h06a4308_0 six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h5eee18b_0 tbb 2021.8.0 hdb19cb5_0 tensorboard 2.15.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tokenizers 0.14.1 pypi_0 pypi torchaudio 0.13.1 py39_cu117 pytorch torchtriton 2.1.0 py39 pytorch torchvision 0.14.1 py39_cu117 pytorch tqdm 4.66.1 pypi_0 pypi transformers 4.34.1 pypi_0 pypi typing_extensions 4.7.1 py39h06a4308_0 tzdata 2023.3 pypi_0 pypi urllib3 1.26.18 py39h06a4308_0 wandb 0.15.12 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pypi_0 pypi werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39h06a4308_0 xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers xxhash 3.4.1 pypi_0 pypi xz 5.4.2 h5eee18b_0 yaml 0.2.5 h7f98852_2 conda-forge yarl 1.9.2 pypi_0 pypi zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.5 hc292b87_0 @mariosasko yes the problem seems to be to exit from accelerator.main_process_first(). Is there any known problem?
[ -0.29093098640441895, -0.4494297206401825, 0.03063829243183136, 0.10455924272537231, 0.7972444295883179, -0.06378263235092163, 0.38594162464141846, 0.08792893588542938, -0.19314613938331604, 0.4078892171382904, 0.08595020323991776, 0.15589837729930878, 0.01676591858267784, -0.07265159487724304, 0.02791040763258934, -0.12267455458641052, 0.1636425107717514, -0.15872235596179962, -0.010782875120639801, -0.2772062420845032, 0.05453786998987198, 0.02825688011944294, -0.19733773171901703, 0.05589437857270241, -0.415914386510849, -0.17970845103263855, 0.0735665038228035, -0.052424535155296326, -0.07989750802516937, 0.049917325377464294, 0.06106237322092056, 0.2990711033344269, -0.25099629163742065, 0.41525450348854065, -0.00012525715283118188, 0.015866786241531372, 0.17968347668647766, 0.12324430793523788, -0.062261901795864105, -0.27441003918647766, -0.06299880146980286, 0.13892382383346558, -0.24097135663032532, 0.010507136583328247, -0.1529707908630371, 0.09709952771663666, -0.14965295791625977, -0.3297668695449829, 0.4145660102367401, 0.14753317832946777, 0.06290823221206665, -0.09227758646011353, -0.10776235163211823, -0.24873676896095276, -0.0551648885011673, -0.2281971275806427, -0.2207949161529541, 0.0906703919172287, 0.2940048575401306, 0.027575597167015076, -0.4739746153354645, 0.4821750223636627, 0.18431341648101807, -0.22458381950855255, -0.022432224825024605, -0.22474652528762817, 0.305581271648407, -0.3545084595680237, 0.14583119750022888, 0.3009342849254608, 0.12916240096092224, 0.047329630702733994, -0.3434460759162903, -0.3459230661392212, 0.35185813903808594, -0.05253330245614052, 0.23941899836063385, -0.018792400136590004, -0.2868098318576813, 0.012072034180164337, -0.2741742730140686, -0.1855693757534027, -0.0877263993024826, 0.024806272238492966, -0.278726190328598, 0.5902511477470398, 0.04143892973661423, 0.21439200639724731, 0.3844811022281647, 0.08770126849412918, 0.06263422220945358, 0.21698591113090515, 0.3053859770298004, -0.12789812684059143, -0.6810310482978821, 0.25515833497047424, 0.012995811179280281, -0.3107757568359375, 0.09026800096035004, 0.1121412143111229, 0.05166146904230118, -0.1752394735813141, 0.1803348809480667, -0.10411490499973297, 0.35753971338272095, 0.233581081032753, -0.144460529088974, 0.09754469990730286, 0.2890278100967407, 0.08275659382343292, -0.1745910942554474, 0.20930197834968567, -0.18796375393867493, -0.11595229804515839, -0.3650617301464081, -0.03388985991477966, 0.02104467898607254, -0.10529615730047226, -0.20620009303092957, 0.14734461903572083, 0.1114935502409935, 0.17682747542858124, 0.27773281931877136, 0.42067357897758484, 0.07787610590457916, 0.7555187940597534, 0.2579122483730316, -0.15936219692230225, -0.021704282611608505, 0.12056688964366913, -0.13192856311798096, 0.027789991348981857, -0.15243129432201385, 0.004863418638706207, -0.1992267370223999, -0.47606784105300903, -0.017662890255451202, 0.0025355443358421326, 0.27236586809158325, -0.05497652664780617, -0.18235522508621216, -0.2208123356103897, 0.37471646070480347, 0.37832772731781006, -0.21296776831150055, 0.279074490070343, -0.0012135645374655724, 0.0017618462443351746, 0.03826992213726044, 0.07553091645240784, 0.03614668548107147, 0.05429576337337494, -0.10336742550134659, 0.12322831898927689, 0.011887654662132263, 0.1707298457622528, 0.011563945561647415, 0.07063841819763184, 0.19952648878097534, -0.20099028944969177, 0.2038043588399887, -0.41347017884254456, 0.11982451379299164, -0.009271781891584396, 0.381860613822937, 0.26071226596832275, 0.056342288851737976, -0.008020684123039246, -0.17035627365112305, 0.040609389543533325, 0.07158031314611435, 0.0983484759926796, 0.0362163782119751, 0.04308449104428291, -0.26185116171836853, -0.10603012144565582, -0.1299661546945572, -0.3587593734264374, -0.3763452172279358, 0.32573989033699036, -0.6488757133483887, 0.25718018412590027, 0.019184496253728867, 0.26223862171173096, 0.2667231857776642, 0.02353561297059059, -0.06492945551872253, 0.5186488628387451, -0.3449781537055969, 0.13019108772277832, -0.23221132159233093, 0.20998886227607727, 0.17275048792362213, 0.24224740266799927, 0.021468909457325935, 0.12182505428791046, -0.25892093777656555, 0.6672351360321045, 0.2809157371520996, 0.036017581820487976, 0.05635717511177063, 0.16508260369300842, 0.1519118845462799, -0.14992107450962067, 0.09039820730686188, 0.0025761425495147705, -0.24591568112373352, 0.1728610396385193, 0.3576936721801758, 0.12002069503068924, 0.15794768929481506, -0.038025952875614166, -0.12708066403865814, 0.052086442708969116, -0.35760989785194397, -0.3875839114189148, -0.09129570424556732, 0.06910251080989838, 0.03674685209989548, 0.19581347703933716, -0.15071818232536316, 0.4472478926181793, -0.02716771513223648, 0.21931131184101105, -0.6124293804168701, 0.03661983460187912, -0.0009291525930166245, -0.030169138684868813, -0.2348170280456543, 0.013935375958681107, -0.17781299352645874, -0.3156604468822479, -0.41003111004829407, 0.503865122795105, -0.1705000251531601, 0.08790314197540283, -0.07338675856590271, 0.0092906653881073, 0.22858057916164398, -0.04456615447998047, -0.07263581454753876, 0.05791309103369713, -0.07873371243476868, -0.20616695284843445, -0.22220230102539062, 0.34187960624694824, -0.08082819730043411, 0.2786802351474762, -0.043847259134054184, 0.23293015360832214, 0.21554046869277954, 0.08909304440021515, -0.29612988233566284, 0.14724168181419373, 0.41495585441589355, -0.13992491364479065, 0.8125132322311401, -0.2005476951599121, -0.38266521692276, 0.2616848051548004, 0.11219091713428497, 0.05131562799215317, -0.17455480992794037, 0.15135854482650757, 0.06870926916599274, 0.0006399080157279968, 0.08073675632476807, 0.22402110695838928, 0.2420496642589569, -0.04289408400654793, 0.022172164171934128, 0.0635923519730568, -0.28231438994407654, -0.2176913321018219, -0.014196038246154785, -0.28047746419906616, 0.35380300879478455, 0.18512865900993347, 0.023111563175916672, 0.08829210698604584, -0.22599804401397705, -0.1894897222518921, 0.10063602775335312, 0.22963447868824005, -0.0491359643638134, 0.10131427645683289, -0.2498294711112976, -0.3735664486885071, -0.23612093925476074, -0.02193029224872589, -0.33328455686569214, -0.3378172814846039, -0.26234614849090576, 0.16798631846904755, -0.03258620202541351, 0.482687771320343, 0.13254082202911377, 0.07211986184120178, 0.48610252141952515, 0.015022067353129387, -0.4869169592857361, -0.0020725391805171967, -0.0499274879693985, -0.07366709411144257, 0.10482243448495865, -0.18185749650001526, 0.06869827955961227, 0.31064167618751526, -0.09867694973945618, -0.22447457909584045, -0.4791814386844635, -0.08977992832660675, -0.2976202070713043, 0.12055830657482147, 0.23006124794483185, 0.12817634642124176, 0.14892460405826569, 0.19109781086444855, 0.26745450496673584, -0.4876634478569031, -0.07869003713130951, 0.11802081763744354, 0.15102386474609375, -0.21905329823493958, -0.10704880952835083, -0.3263394832611084, -0.0710262656211853, -0.2586098909378052, 0.07136206328868866, -0.5934926271438599, -0.16868868470191956, 0.12304113805294037, 0.28165990114212036, 0.048888519406318665, -0.21608246862888336, -0.24563053250312805, -0.05555731803178787, -0.1069803386926651, 0.23708476126194, 0.008940700441598892, -0.28850436210632324, -0.22880415618419647, -0.07171546667814255, -0.009263822808861732, 0.46748316287994385, -0.4094804525375366, -0.03520379588007927, -0.24617496132850647, -0.10047391057014465, -0.0654420554637909, -0.12347614020109177, 0.24379290640354156, -0.21410876512527466, 0.030196290463209152, -0.0505293533205986, -0.1940537691116333, 0.1511904001235962, 0.1674644947052002, 0.20632822811603546, -0.28265640139579773, 0.23079517483711243, 0.11247845739126205, 0.2068874090909958, 0.0009274706244468689, 0.10379424691200256, -0.14080305397510529, -0.03888152912259102, 0.07296086847782135, 0.08758653700351715, -0.26166635751724243, 0.5775612592697144, 0.011862948536872864, -0.16235153377056122, -0.09711077809333801, 0.01775958761572838, 0.16147416830062866, -0.2231372892856598, 0.266476571559906, 0.10300076007843018, -0.08254062384366989, 0.048685379326343536, -0.23743227124214172, 0.10538992285728455, 0.12059995532035828, 0.28714144229888916, 0.2701711356639862, 0.27155840396881104, -0.02739229053258896, 0.20987501740455627, 0.14358943700790405, -0.16923338174819946, 0.04695184528827667, -0.09968435764312744, -0.2603164613246918, 0.01436295360326767, -0.02391020394861698, 0.6091195344924927, 0.006027087569236755, -0.013803981244564056, 0.10203264653682709, -0.354825496673584, 0.9719873070716858, -0.2214687466621399, -0.0266696996986866, 0.09222066402435303, -0.5891108512878418, -0.036201201379299164, -0.06563328206539154, -0.00904228538274765, -0.38417771458625793, 0.20697689056396484, 0.41394469141960144, -0.10487012565135956, -0.23602080345153809, 0.3500775396823883, -0.09194701910018921, -0.14105316996574402, -0.00830128788948059, -0.0750935971736908, -0.43644607067108154, -0.1383827179670334, 0.4325496554374695, -0.13847126066684723, 0.03221249207854271, -0.41526755690574646, -0.05839179828763008, -0.10723388195037842, -0.025354214012622833, -0.09618060290813446, 0.18223536014556885, 0.0634758323431015, -0.1936734914779663, 0.3128211796283722, 0.1928916573524475, 0.209426611661911, 0.021394474431872368, 0.26464569568634033, -0.17532074451446533, -0.3635667562484741, 0.05325288325548172, -0.15946000814437866, -0.005654145032167435, 0.6761327981948853, -0.31356146931648254, 0.2690911889076233, -0.04029705375432968, 0.41259026527404785, -0.05024155229330063, 0.3166467547416687, 0.22401410341262817, 0.26510730385780334, -0.2192293405532837, -0.4766666889190674, 0.28769296407699585, 0.29836294054985046, 0.04188145697116852, 0.346893310546875, -0.3151338994503021, -0.11680620908737183, -0.15012559294700623, 0.15870380401611328, 0.8173956871032715, -0.17136117815971375, 0.18267306685447693, 0.3383522927761078, 0.2260408252477646, 0.06513699889183044, 0.22490671277046204, 0.23265591263771057, -0.3383629322052002, -0.7098581194877625, -0.1423981487751007, -0.10279428213834763, 0.30479881167411804, -0.11201424151659012, -0.11560896784067154, 0.3596278727054596, -0.0016807317733764648, 0.06868284940719604, 0.01871420070528984, 0.20677044987678528, 0.05152275413274765, -0.39116352796554565, -0.13501958549022675, 0.040934689342975616, -0.2017110139131546, 0.349634051322937, -0.02803814224898815, -0.05542513355612755, -0.2729372978210449, -0.09661668539047241, -0.20163075625896454, 0.3631894588470459, -0.34563738107681274, -0.07656164467334747, -0.15404587984085083, -0.40909355878829956, 0.24086622893810272, 0.3204573094844818, -0.032179735600948334, 0.14836013317108154, 0.024087918922305107, 0.36679601669311523, -0.022546522319316864, -0.0482269749045372, 0.13627326488494873, -0.26035037636756897, 0.47792714834213257, 0.0022418275475502014, 0.2012518346309662, 0.01313890889286995, -0.011381138116121292, 0.16694635152816772, -0.05868689715862274, -0.009294681251049042, 0.09570266306400299, 0.13714087009429932, 0.026442263275384903, 0.17865349352359772, -0.23142239451408386, -0.5112200975418091, 0.01928665116429329, 0.1434318870306015, -0.21843524277210236, 0.14479763805866241, -0.14816835522651672, -0.17964278161525726, 0.011207349598407745, 0.4318925738334656, 0.07744753360748291, -0.13039186596870422, 0.1549435704946518, 0.18979525566101074, 0.005871899425983429, -0.10631835460662842, -0.002437114715576172, 0.10239076614379883, -0.5212146639823914, 0.4950089454650879, -0.27831128239631653, -0.25704285502433777, 0.11024000495672226, -0.22471672296524048, 0.043006353080272675, -0.21633873879909515, -0.144390270113945, -0.18616777658462524, -0.19291967153549194, -0.023063257336616516, -0.09203049540519714, -0.002615331206470728, -0.32394981384277344, 0.1861409693956375, 0.1944994330406189, 0.21860545873641968, -0.18480411171913147, -0.10701050609350204, -0.4526258707046509, 0.07453212141990662, 0.01969597488641739, -0.17327578365802765, 0.0031472593545913696, -0.22970911860466003, 0.05020700767636299, 0.24520541727542877, -0.0027952343225479126, -0.10506175458431244, -0.24379506707191467, 0.16888104379177094, 0.12302737683057785, 0.18950393795967102, 0.19521450996398926, -0.1130276620388031, -0.26053476333618164, -0.11193691194057465, 0.310611367225647, 0.04665328562259674, -0.003140261396765709, -0.2647828161716461, 0.021670985966920853, 0.2501443028450012, 0.16901260614395142, 0.3475968837738037, -0.003481518477201462, -0.3070365786552429, 0.2179805040359497, 0.25139713287353516, -0.004950717091560364, -0.19190584123134613, -0.6131375432014465, -0.06007172539830208, 0.25315964221954346, -0.023186225444078445, 0.4646250903606415, -0.23495268821716309, -0.08317491412162781, 0.13863937556743622, 0.5589496493339539, 0.5356143116950989, -0.4253224730491638, -0.020697902888059616, 0.2814907133579254, 0.08085139095783234, -0.24977394938468933, 0.2214163988828659, -0.22925353050231934, -0.09324148297309875, 0.041203126311302185, 0.35616305470466614, 0.07055042684078217, 0.06011959910392761, -0.41570642590522766, 0.2909097671508789, 0.2516123056411743, -0.07609675079584122, -0.020012713968753815, 0.34123358130455017, 0.1036936417222023, 0.27813440561294556, 0.18926683068275452, 0.1758067011833191, -0.0705123096704483, 0.3598220944404602, 0.30618926882743835, 0.5728679299354553, 0.16298915445804596, 0.3363964855670929, 0.17357563972473145, -0.1703508198261261, -0.08556867390871048, 0.5045971274375916, -0.5123758316040039, 0.24821226298809052, -0.3158063590526581, 0.1709698736667633, -0.48193445801734924, -0.5417709350585938, -0.06486140936613083, 0.42344141006469727, -0.2529941201210022, 0.1432608664035797, 0.3605583608150482, -0.060306012630462646, -0.2993941903114319, 0.0054230764508247375, 0.01490685623139143, -0.09603232145309448, 0.3661772608757019, 0.1430702656507492, 0.10829146206378937, -0.3494257628917694, -0.41752541065216064, -0.02777441218495369, 0.16122561693191528, -0.32945847511291504, 0.3687637448310852, 0.23874229192733765, -0.1433505415916443, -0.1612587869167328, 0.37894749641418457, 0.40788066387176514, 0.5197636485099792, -0.13192470371723175, 0.26190757751464844, 0.18739792704582214, 0.00794026255607605, 0.29976725578308105, 0.2879451811313629, 0.1420636773109436, 0.24858495593070984, 0.3171003758907318, -0.040023062378168106, -0.1348453164100647, -0.06394527852535248, -0.014476025477051735, 0.45347824692726135, -0.05540985241532326, 0.45817938446998596, -0.22142738103866577, 0.028117939829826355, -0.20692892372608185, 0.19624857604503632, -0.3841955363750458, 0.023330867290496826, 0.14712639153003693, -0.26532039046287537, -0.05601784586906433, 0.06436114013195038, -0.0035086162388324738, 0.0264773927628994, 0.4905337393283844, 0.2314278483390808, 0.2814987897872925, -0.352979838848114, -0.4432319104671478, -0.7061963081359863, 0.16672763228416443, 0.023132557049393654, -0.306435227394104, -0.017993785440921783, 0.12486810982227325, 0.12715306878089905, -0.1001901924610138, 0.07469306141138077, -0.35190555453300476, 0.3043103516101837, 0.654619574546814, -0.13863436877727509, -0.01618964597582817, -0.13077615201473236, 0.1170499250292778, -0.06711403280496597, -0.21607890725135803, 0.3050326108932495, 0.35158997774124146, -0.05563167855143547, 0.2046026736497879, 0.3729979991912842, -0.028206568211317062, -0.318655401468277, -0.09511033445596695, 0.012595592066645622, 0.0027333498001098633, 0.035131193697452545, 0.004853479564189911, -0.18408791720867157, 0.10576289147138596, -0.11553087830543518, -0.12297698110342026, 0.32705581188201904, 0.41286545991897583, 0.17702877521514893, -0.08075986802577972, -0.3500661849975586, -0.06284124404191971, 0.3189769685268402, 0.14865346252918243, -0.3886559009552002, 0.2241535633802414, 0.1298566460609436, 0.20014871656894684, 0.32538455724716187, 0.46084025502204895, 0.022029351443052292, -0.06451865285634995, -0.39495256543159485, -0.43277832865715027, 0.5375050902366638, 0.21196846663951874, -0.32295680046081543, -0.12017597258090973, -0.0933184027671814, -0.12758205831050873, 0.045847535133361816, -0.3817824423313141, -0.10365556180477142, -0.09756830334663391, -0.031497761607170105, -0.4701172709465027, 0.14581920206546783, -0.17087671160697937, -0.12030047178268433, -0.06335633993148804, -0.0003438293933868408, 0.2299572080373764, -0.13677114248275757, 0.3738816976547241, -0.011800900101661682 ]
https://github.com/huggingface/datasets/issues/6363
NCCL debug info I get below output, if it helps. ``` 11/09/2023 13:36:44 - INFO - __main__ - Distributed environment: MULTI_GPU Backend: nccl Num processes: 2 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 11/09/2023 13:36:44 - INFO - __main__ - Distributed environment: MULTI_GPU Backend: nccl Num processes: 2 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 {'timestep_spacing', 'thresholding', 'variance_type', 'clip_sample_range', 'prediction_type', 'dynamic_thresholding_ratio', 'sample_max_value'} was not found in config. Values will be initialized to default values. {'norm_num_groups', 'force_upcast'} was not found in config. Values will be initialized to default values. {'num_attention_heads', 'projection_class_embeddings_input_dim', 'addition_embed_type_num_heads', 'mid_block_only_cross_attention', 'addition_embed_type', 'num_class_embeds', 'upcast_attention', 'cross_attention_norm', 'addition_time_embed_dim', 'time_embedding_dim', 'class_embeddings_concat', 'encoder_hid_dim', 'encoder_hid_dim_type', 'resnet_out_scale_factor', 'attention_type', 'conv_out_kernel', 'only_cross_attention', 'resnet_time_scale_shift', 'resnet_skip_time_act', 'reverse_transformer_layers_per_block', 'conv_in_kernel', 'time_cond_proj_dim', 'use_linear_projection', 'mid_block_type', 'time_embedding_act_fn', 'dropout', 'timestep_post_act', 'dual_cross_attention', 'class_embed_type', 'transformer_layers_per_block', 'time_embedding_type'} was not found in config. Values will be initialized to default values. {'num_attention_heads', 'projection_class_embeddings_input_dim', 'addition_embed_type_num_heads', 'mid_block_only_cross_attention', 'addition_embed_type', 'num_class_embeds', 'upcast_attention', 'cross_attention_norm', 'addition_time_embed_dim', 'time_embedding_dim', 'class_embeddings_concat', 'encoder_hid_dim', 'encoder_hid_dim_type', 'resnet_out_scale_factor', 'attention_type', 'conv_out_kernel', 'only_cross_attention', 'resnet_time_scale_shift', 'resnet_skip_time_act', 'reverse_transformer_layers_per_block', 'conv_in_kernel', 'time_cond_proj_dim', 'use_linear_projection', 'mid_block_type', 'time_embedding_act_fn', 'dropout', 'timestep_post_act', 'dual_cross_attention', 'class_embed_type', 'transformer_layers_per_block', 'time_embedding_type'} was not found in config. Values will be initialized to default values. deepbull5:1311249:1311249 [0] NCCL INFO Bootstrap : Using enp194s0f0:128.205.43.171<0> deepbull5:1311249:1311249 [0] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation deepbull5:1311249:1311249 [0] NCCL INFO cudaDriverVersion 11070 NCCL version 2.14.3+cuda11.7 deepbull5:1311250:1311250 [1] NCCL INFO cudaDriverVersion 11070 deepbull5:1311249:1311365 [0] NCCL INFO NET/IB : No device found. deepbull5:1311249:1311365 [0] NCCL INFO NET/Socket : Using [0]enp194s0f0:128.205.43.171<0> deepbull5:1311249:1311365 [0] NCCL INFO Using network Socket deepbull5:1311250:1311250 [1] NCCL INFO Bootstrap : Using enp194s0f0:128.205.43.171<0> deepbull5:1311250:1311250 [1] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation deepbull5:1311250:1311366 [1] NCCL INFO NET/IB : No device found. deepbull5:1311250:1311366 [1] NCCL INFO NET/Socket : Using [0]enp194s0f0:128.205.43.171<0> deepbull5:1311250:1311366 [1] NCCL INFO Using network Socket deepbull5:1311250:1311366 [1] NCCL INFO Setting affinity for GPU 1 to ff,ffff0000,00ffffff deepbull5:1311249:1311365 [0] NCCL INFO Setting affinity for GPU 0 to ff,ffff0000,00ffffff deepbull5:1311249:1311365 [0] NCCL INFO Channel 00/04 : 0 1 deepbull5:1311250:1311366 [1] NCCL INFO Trees [0] -1/-1/-1->1->0 [1] 0/-1/-1->1->-1 [2] -1/-1/-1->1->0 [3] 0/-1/-1->1->-1 deepbull5:1311249:1311365 [0] NCCL INFO Channel 01/04 : 0 1 deepbull5:1311249:1311365 [0] NCCL INFO Channel 02/04 : 0 1 deepbull5:1311249:1311365 [0] NCCL INFO Channel 03/04 : 0 1 deepbull5:1311249:1311365 [0] NCCL INFO Trees [0] 1/-1/-1->0->-1 [1] -1/-1/-1->0->1 [2] 1/-1/-1->0->-1 [3] -1/-1/-1->0->1 deepbull5:1311249:1311365 [0] NCCL INFO Channel 00/0 : 0[1000] -> 1[24000] via P2P/IPC deepbull5:1311250:1311366 [1] NCCL INFO Channel 00/0 : 1[24000] -> 0[1000] via P2P/IPC deepbull5:1311249:1311365 [0] NCCL INFO Channel 01/0 : 0[1000] -> 1[24000] via P2P/IPC deepbull5:1311250:1311366 [1] NCCL INFO Channel 01/0 : 1[24000] -> 0[1000] via P2P/IPC deepbull5:1311250:1311366 [1] NCCL INFO Channel 02/0 : 1[24000] -> 0[1000] via P2P/IPC deepbull5:1311249:1311365 [0] NCCL INFO Channel 02/0 : 0[1000] -> 1[24000] via P2P/IPC deepbull5:1311250:1311366 [1] NCCL INFO Channel 03/0 : 1[24000] -> 0[1000] via P2P/IPC deepbull5:1311249:1311365 [0] NCCL INFO Channel 03/0 : 0[1000] -> 1[24000] via P2P/IPC deepbull5:1311249:1311365 [0] NCCL INFO Connected all rings deepbull5:1311249:1311365 [0] NCCL INFO Connected all trees deepbull5:1311249:1311365 [0] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512 deepbull5:1311249:1311365 [0] NCCL INFO 4 coll channels, 4 p2p channels, 2 p2p channels per peer deepbull5:1311250:1311366 [1] NCCL INFO Connected all rings deepbull5:1311250:1311366 [1] NCCL INFO Connected all trees deepbull5:1311250:1311366 [1] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512 deepbull5:1311250:1311366 [1] NCCL INFO 4 coll channels, 4 p2p channels, 2 p2p channels per peer deepbull5:1311249:1311365 [0] NCCL INFO comm 0x88a84ee0 rank 0 nranks 2 cudaDev 0 busId 1000 - Init COMPLETE deepbull5:1311250:1311366 [1] NCCL INFO comm 0x89a42f60 rank 1 nranks 2 cudaDev 1 busId 24000 - Init COMPLETE ```
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
### Describe the bug Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely. ### Steps to reproduce the bug accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model" ### Expected behavior It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset. I added some debug prints ``` print("==========HERE3=============") with accelerator.main_process_first(): print(accelerator.is_main_process) print("===========Here3.1===========") if args.max_train_samples is not None: dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples)) print("===========Here3.2===========") # Set the training transforms train_dataset = dataset["train"].with_transform(preprocess_train) print("==========HERE4=============") Corresponding Output Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 2 Local process index: 2 Device: cuda:2 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. {‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values. {‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values. ==========HERE1============= ==========HERE1============= ==========HERE1============= ==========HERE2============= ==========HERE2============= ==========HERE2============= ==========HERE3============= True ===========Here3.1=========== ===========Here3.2=========== ==========HERE3============= ==========HERE3========= ``` ### Environment info _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pypi_0 pypi accelerate 0.24.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async-timeout 4.0.3 pypi_0 pypi attrs 23.1.0 pypi_0 pypi bitsandbytes 0.41.1 pypi_0 pypi blas 1.0 mkl blessings 1.7 py39h06a4308_1002 brotli-python 1.0.9 py39h6a678d5_7 bzip2 1.0.8 h7b6447c_0 ca-certificates 2023.08.22 h06a4308_0 cachetools 5.3.2 pypi_0 pypi certifi 2023.7.22 py39h06a4308_0 cffi 1.15.1 py39h5eee18b_3 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 unix_pyh707e725_0 conda-forge cryptography 41.0.3 py39hdda0065_0 cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia datasets 2.14.6 pypi_0 pypi diffusers 0.22.0.dev0 pypi_0 pypi dill 0.3.7 pypi_0 pypi docker-pycreds 0.4.0 py_0 conda-forge ffmpeg 4.3 hf484d3e_0 pytorch filelock 3.12.4 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.4.0 pypi_0 pypi fsspec 2023.10.0 pypi_0 pypi ftfy 6.1.1 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.40 pyhd8ed1ab_0 conda-forge gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.1.0 pypi_0 pypi gpustat 0.6.0 pyhd3eb1b0_1 grpcio 1.59.0 pypi_0 pypi huggingface-hub 0.17.3 pypi_0 pypi idna 3.4 py39h06a4308_0 importlib-metadata 6.8.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46305 jinja2 3.1.2 pypi_0 pypi jpeg 9e h5eee18b_1 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.8.0.34 0 nvidia libcurand 10.3.4.52 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1 libffi 3.4.4 h6a678d5_0 libgcc-ng 13.2.0 h807b86a_2 conda-forge libgfortran-ng 13.2.0 h69a702a_2 conda-forge libgfortran5 13.2.0 ha4646dd_2 conda-forge libiconv 1.16 h7f8727e_2 libidn2 2.3.4 h5eee18b_0 libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libpng 1.6.39 h5eee18b_0 libprotobuf 3.20.3 he621ea3_0 libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge libtasn1 4.19.0 h5eee18b_0 libtiff 4.5.1 h6a678d5_0 libunistring 0.9.10 h27cfd23_0 libwebp 1.3.2 h11a3e52_0 libwebp-base 1.3.2 h5eee18b_0 llvm-openmp 14.0.6 h9e868ea_0 lz4-c 1.9.4 h6a678d5_0 markdown 3.5 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mkl 2023.1.0 h213fc3f_46343 mkl-service 2.4.0 py39h5eee18b_1 mkl_fft 1.3.8 py39h5eee18b_0 mkl_random 1.2.4 py39hdb19cb5_0 multidict 6.0.4 pypi_0 pypi multiprocess 0.70.15 pypi_0 pypi ncurses 6.4 h6a678d5_0 nettle 3.7.3 hbbd107a_1 numpy 1.26.0 py39h5f9d8c6_0 numpy-base 1.26.0 py39hb5e798b_0 nvidia-ml 7.352.0 pyhd3eb1b0_0 oauthlib 3.2.2 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 3.0.11 h7f8727e_2 packaging 23.2 pypi_0 pypi pandas 2.1.1 pypi_0 pypi pathtools 0.1.2 py_1 conda-forge pillow 10.0.1 py39ha6cbd5a_0 pip 23.3 py39h06a4308_0 protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi pyarrow 13.0.0 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pyopenssl 23.2.0 py39h06a4308_0 pysocks 1.7.1 py39h06a4308_0 python 3.9.18 h955ad1f_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0 regex 2023.10.3 pypi_0 pypi requests 2.31.0 py39h06a4308_0 requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.0 pypi_0 pypi scipy 1.11.3 py39h5f9d8c6_0 sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge setproctitle 1.1.10 py39h3811e60_1004 conda-forge setuptools 68.0.0 py39h06a4308_0 six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h5eee18b_0 tbb 2021.8.0 hdb19cb5_0 tensorboard 2.15.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tokenizers 0.14.1 pypi_0 pypi torchaudio 0.13.1 py39_cu117 pytorch torchtriton 2.1.0 py39 pytorch torchvision 0.14.1 py39_cu117 pytorch tqdm 4.66.1 pypi_0 pypi transformers 4.34.1 pypi_0 pypi typing_extensions 4.7.1 py39h06a4308_0 tzdata 2023.3 pypi_0 pypi urllib3 1.26.18 py39h06a4308_0 wandb 0.15.12 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pypi_0 pypi werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39h06a4308_0 xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers xxhash 3.4.1 pypi_0 pypi xz 5.4.2 h5eee18b_0 yaml 0.2.5 h7f98852_2 conda-forge yarl 1.9.2 pypi_0 pypi zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.5 hc292b87_0
620
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL ### Describe the bug Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely. ### Steps to reproduce the bug accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model" ### Expected behavior It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset. I added some debug prints ``` print("==========HERE3=============") with accelerator.main_process_first(): print(accelerator.is_main_process) print("===========Here3.1===========") if args.max_train_samples is not None: dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples)) print("===========Here3.2===========") # Set the training transforms train_dataset = dataset["train"].with_transform(preprocess_train) print("==========HERE4=============") Corresponding Output Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 2 Local process index: 2 Device: cuda:2 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. {‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values. {‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values. ==========HERE1============= ==========HERE1============= ==========HERE1============= ==========HERE2============= ==========HERE2============= ==========HERE2============= ==========HERE3============= True ===========Here3.1=========== ===========Here3.2=========== ==========HERE3============= ==========HERE3========= ``` ### Environment info _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pypi_0 pypi accelerate 0.24.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async-timeout 4.0.3 pypi_0 pypi attrs 23.1.0 pypi_0 pypi bitsandbytes 0.41.1 pypi_0 pypi blas 1.0 mkl blessings 1.7 py39h06a4308_1002 brotli-python 1.0.9 py39h6a678d5_7 bzip2 1.0.8 h7b6447c_0 ca-certificates 2023.08.22 h06a4308_0 cachetools 5.3.2 pypi_0 pypi certifi 2023.7.22 py39h06a4308_0 cffi 1.15.1 py39h5eee18b_3 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 unix_pyh707e725_0 conda-forge cryptography 41.0.3 py39hdda0065_0 cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia datasets 2.14.6 pypi_0 pypi diffusers 0.22.0.dev0 pypi_0 pypi dill 0.3.7 pypi_0 pypi docker-pycreds 0.4.0 py_0 conda-forge ffmpeg 4.3 hf484d3e_0 pytorch filelock 3.12.4 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.4.0 pypi_0 pypi fsspec 2023.10.0 pypi_0 pypi ftfy 6.1.1 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.40 pyhd8ed1ab_0 conda-forge gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.1.0 pypi_0 pypi gpustat 0.6.0 pyhd3eb1b0_1 grpcio 1.59.0 pypi_0 pypi huggingface-hub 0.17.3 pypi_0 pypi idna 3.4 py39h06a4308_0 importlib-metadata 6.8.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46305 jinja2 3.1.2 pypi_0 pypi jpeg 9e h5eee18b_1 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.8.0.34 0 nvidia libcurand 10.3.4.52 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1 libffi 3.4.4 h6a678d5_0 libgcc-ng 13.2.0 h807b86a_2 conda-forge libgfortran-ng 13.2.0 h69a702a_2 conda-forge libgfortran5 13.2.0 ha4646dd_2 conda-forge libiconv 1.16 h7f8727e_2 libidn2 2.3.4 h5eee18b_0 libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libpng 1.6.39 h5eee18b_0 libprotobuf 3.20.3 he621ea3_0 libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge libtasn1 4.19.0 h5eee18b_0 libtiff 4.5.1 h6a678d5_0 libunistring 0.9.10 h27cfd23_0 libwebp 1.3.2 h11a3e52_0 libwebp-base 1.3.2 h5eee18b_0 llvm-openmp 14.0.6 h9e868ea_0 lz4-c 1.9.4 h6a678d5_0 markdown 3.5 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mkl 2023.1.0 h213fc3f_46343 mkl-service 2.4.0 py39h5eee18b_1 mkl_fft 1.3.8 py39h5eee18b_0 mkl_random 1.2.4 py39hdb19cb5_0 multidict 6.0.4 pypi_0 pypi multiprocess 0.70.15 pypi_0 pypi ncurses 6.4 h6a678d5_0 nettle 3.7.3 hbbd107a_1 numpy 1.26.0 py39h5f9d8c6_0 numpy-base 1.26.0 py39hb5e798b_0 nvidia-ml 7.352.0 pyhd3eb1b0_0 oauthlib 3.2.2 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 3.0.11 h7f8727e_2 packaging 23.2 pypi_0 pypi pandas 2.1.1 pypi_0 pypi pathtools 0.1.2 py_1 conda-forge pillow 10.0.1 py39ha6cbd5a_0 pip 23.3 py39h06a4308_0 protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi pyarrow 13.0.0 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pyopenssl 23.2.0 py39h06a4308_0 pysocks 1.7.1 py39h06a4308_0 python 3.9.18 h955ad1f_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0 regex 2023.10.3 pypi_0 pypi requests 2.31.0 py39h06a4308_0 requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.0 pypi_0 pypi scipy 1.11.3 py39h5f9d8c6_0 sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge setproctitle 1.1.10 py39h3811e60_1004 conda-forge setuptools 68.0.0 py39h06a4308_0 six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h5eee18b_0 tbb 2021.8.0 hdb19cb5_0 tensorboard 2.15.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tokenizers 0.14.1 pypi_0 pypi torchaudio 0.13.1 py39_cu117 pytorch torchtriton 2.1.0 py39 pytorch torchvision 0.14.1 py39_cu117 pytorch tqdm 4.66.1 pypi_0 pypi transformers 4.34.1 pypi_0 pypi typing_extensions 4.7.1 py39h06a4308_0 tzdata 2023.3 pypi_0 pypi urllib3 1.26.18 py39h06a4308_0 wandb 0.15.12 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pypi_0 pypi werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39h06a4308_0 xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers xxhash 3.4.1 pypi_0 pypi xz 5.4.2 h5eee18b_0 yaml 0.2.5 h7f98852_2 conda-forge yarl 1.9.2 pypi_0 pypi zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.5 hc292b87_0 NCCL debug info I get below output, if it helps. ``` 11/09/2023 13:36:44 - INFO - __main__ - Distributed environment: MULTI_GPU Backend: nccl Num processes: 2 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 11/09/2023 13:36:44 - INFO - __main__ - Distributed environment: MULTI_GPU Backend: nccl Num processes: 2 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 {'timestep_spacing', 'thresholding', 'variance_type', 'clip_sample_range', 'prediction_type', 'dynamic_thresholding_ratio', 'sample_max_value'} was not found in config. Values will be initialized to default values. {'norm_num_groups', 'force_upcast'} was not found in config. Values will be initialized to default values. {'num_attention_heads', 'projection_class_embeddings_input_dim', 'addition_embed_type_num_heads', 'mid_block_only_cross_attention', 'addition_embed_type', 'num_class_embeds', 'upcast_attention', 'cross_attention_norm', 'addition_time_embed_dim', 'time_embedding_dim', 'class_embeddings_concat', 'encoder_hid_dim', 'encoder_hid_dim_type', 'resnet_out_scale_factor', 'attention_type', 'conv_out_kernel', 'only_cross_attention', 'resnet_time_scale_shift', 'resnet_skip_time_act', 'reverse_transformer_layers_per_block', 'conv_in_kernel', 'time_cond_proj_dim', 'use_linear_projection', 'mid_block_type', 'time_embedding_act_fn', 'dropout', 'timestep_post_act', 'dual_cross_attention', 'class_embed_type', 'transformer_layers_per_block', 'time_embedding_type'} was not found in config. Values will be initialized to default values. {'num_attention_heads', 'projection_class_embeddings_input_dim', 'addition_embed_type_num_heads', 'mid_block_only_cross_attention', 'addition_embed_type', 'num_class_embeds', 'upcast_attention', 'cross_attention_norm', 'addition_time_embed_dim', 'time_embedding_dim', 'class_embeddings_concat', 'encoder_hid_dim', 'encoder_hid_dim_type', 'resnet_out_scale_factor', 'attention_type', 'conv_out_kernel', 'only_cross_attention', 'resnet_time_scale_shift', 'resnet_skip_time_act', 'reverse_transformer_layers_per_block', 'conv_in_kernel', 'time_cond_proj_dim', 'use_linear_projection', 'mid_block_type', 'time_embedding_act_fn', 'dropout', 'timestep_post_act', 'dual_cross_attention', 'class_embed_type', 'transformer_layers_per_block', 'time_embedding_type'} was not found in config. Values will be initialized to default values. deepbull5:1311249:1311249 [0] NCCL INFO Bootstrap : Using enp194s0f0:128.205.43.171<0> deepbull5:1311249:1311249 [0] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation deepbull5:1311249:1311249 [0] NCCL INFO cudaDriverVersion 11070 NCCL version 2.14.3+cuda11.7 deepbull5:1311250:1311250 [1] NCCL INFO cudaDriverVersion 11070 deepbull5:1311249:1311365 [0] NCCL INFO NET/IB : No device found. deepbull5:1311249:1311365 [0] NCCL INFO NET/Socket : Using [0]enp194s0f0:128.205.43.171<0> deepbull5:1311249:1311365 [0] NCCL INFO Using network Socket deepbull5:1311250:1311250 [1] NCCL INFO Bootstrap : Using enp194s0f0:128.205.43.171<0> deepbull5:1311250:1311250 [1] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation deepbull5:1311250:1311366 [1] NCCL INFO NET/IB : No device found. deepbull5:1311250:1311366 [1] NCCL INFO NET/Socket : Using [0]enp194s0f0:128.205.43.171<0> deepbull5:1311250:1311366 [1] NCCL INFO Using network Socket deepbull5:1311250:1311366 [1] NCCL INFO Setting affinity for GPU 1 to ff,ffff0000,00ffffff deepbull5:1311249:1311365 [0] NCCL INFO Setting affinity for GPU 0 to ff,ffff0000,00ffffff deepbull5:1311249:1311365 [0] NCCL INFO Channel 00/04 : 0 1 deepbull5:1311250:1311366 [1] NCCL INFO Trees [0] -1/-1/-1->1->0 [1] 0/-1/-1->1->-1 [2] -1/-1/-1->1->0 [3] 0/-1/-1->1->-1 deepbull5:1311249:1311365 [0] NCCL INFO Channel 01/04 : 0 1 deepbull5:1311249:1311365 [0] NCCL INFO Channel 02/04 : 0 1 deepbull5:1311249:1311365 [0] NCCL INFO Channel 03/04 : 0 1 deepbull5:1311249:1311365 [0] NCCL INFO Trees [0] 1/-1/-1->0->-1 [1] -1/-1/-1->0->1 [2] 1/-1/-1->0->-1 [3] -1/-1/-1->0->1 deepbull5:1311249:1311365 [0] NCCL INFO Channel 00/0 : 0[1000] -> 1[24000] via P2P/IPC deepbull5:1311250:1311366 [1] NCCL INFO Channel 00/0 : 1[24000] -> 0[1000] via P2P/IPC deepbull5:1311249:1311365 [0] NCCL INFO Channel 01/0 : 0[1000] -> 1[24000] via P2P/IPC deepbull5:1311250:1311366 [1] NCCL INFO Channel 01/0 : 1[24000] -> 0[1000] via P2P/IPC deepbull5:1311250:1311366 [1] NCCL INFO Channel 02/0 : 1[24000] -> 0[1000] via P2P/IPC deepbull5:1311249:1311365 [0] NCCL INFO Channel 02/0 : 0[1000] -> 1[24000] via P2P/IPC deepbull5:1311250:1311366 [1] NCCL INFO Channel 03/0 : 1[24000] -> 0[1000] via P2P/IPC deepbull5:1311249:1311365 [0] NCCL INFO Channel 03/0 : 0[1000] -> 1[24000] via P2P/IPC deepbull5:1311249:1311365 [0] NCCL INFO Connected all rings deepbull5:1311249:1311365 [0] NCCL INFO Connected all trees deepbull5:1311249:1311365 [0] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512 deepbull5:1311249:1311365 [0] NCCL INFO 4 coll channels, 4 p2p channels, 2 p2p channels per peer deepbull5:1311250:1311366 [1] NCCL INFO Connected all rings deepbull5:1311250:1311366 [1] NCCL INFO Connected all trees deepbull5:1311250:1311366 [1] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512 deepbull5:1311250:1311366 [1] NCCL INFO 4 coll channels, 4 p2p channels, 2 p2p channels per peer deepbull5:1311249:1311365 [0] NCCL INFO comm 0x88a84ee0 rank 0 nranks 2 cudaDev 0 busId 1000 - Init COMPLETE deepbull5:1311250:1311366 [1] NCCL INFO comm 0x89a42f60 rank 1 nranks 2 cudaDev 1 busId 24000 - Init COMPLETE ```
[ -0.29093098640441895, -0.4494297206401825, 0.03063829243183136, 0.10455924272537231, 0.7972444295883179, -0.06378263235092163, 0.38594162464141846, 0.08792893588542938, -0.19314613938331604, 0.4078892171382904, 0.08595020323991776, 0.15589837729930878, 0.01676591858267784, -0.07265159487724304, 0.02791040763258934, -0.12267455458641052, 0.1636425107717514, -0.15872235596179962, -0.010782875120639801, -0.2772062420845032, 0.05453786998987198, 0.02825688011944294, -0.19733773171901703, 0.05589437857270241, -0.415914386510849, -0.17970845103263855, 0.0735665038228035, -0.052424535155296326, -0.07989750802516937, 0.049917325377464294, 0.06106237322092056, 0.2990711033344269, -0.25099629163742065, 0.41525450348854065, -0.00012525715283118188, 0.015866786241531372, 0.17968347668647766, 0.12324430793523788, -0.062261901795864105, -0.27441003918647766, -0.06299880146980286, 0.13892382383346558, -0.24097135663032532, 0.010507136583328247, -0.1529707908630371, 0.09709952771663666, -0.14965295791625977, -0.3297668695449829, 0.4145660102367401, 0.14753317832946777, 0.06290823221206665, -0.09227758646011353, -0.10776235163211823, -0.24873676896095276, -0.0551648885011673, -0.2281971275806427, -0.2207949161529541, 0.0906703919172287, 0.2940048575401306, 0.027575597167015076, -0.4739746153354645, 0.4821750223636627, 0.18431341648101807, -0.22458381950855255, -0.022432224825024605, -0.22474652528762817, 0.305581271648407, -0.3545084595680237, 0.14583119750022888, 0.3009342849254608, 0.12916240096092224, 0.047329630702733994, -0.3434460759162903, -0.3459230661392212, 0.35185813903808594, -0.05253330245614052, 0.23941899836063385, -0.018792400136590004, -0.2868098318576813, 0.012072034180164337, -0.2741742730140686, -0.1855693757534027, -0.0877263993024826, 0.024806272238492966, -0.278726190328598, 0.5902511477470398, 0.04143892973661423, 0.21439200639724731, 0.3844811022281647, 0.08770126849412918, 0.06263422220945358, 0.21698591113090515, 0.3053859770298004, -0.12789812684059143, -0.6810310482978821, 0.25515833497047424, 0.012995811179280281, -0.3107757568359375, 0.09026800096035004, 0.1121412143111229, 0.05166146904230118, -0.1752394735813141, 0.1803348809480667, -0.10411490499973297, 0.35753971338272095, 0.233581081032753, -0.144460529088974, 0.09754469990730286, 0.2890278100967407, 0.08275659382343292, -0.1745910942554474, 0.20930197834968567, -0.18796375393867493, -0.11595229804515839, -0.3650617301464081, -0.03388985991477966, 0.02104467898607254, -0.10529615730047226, -0.20620009303092957, 0.14734461903572083, 0.1114935502409935, 0.17682747542858124, 0.27773281931877136, 0.42067357897758484, 0.07787610590457916, 0.7555187940597534, 0.2579122483730316, -0.15936219692230225, -0.021704282611608505, 0.12056688964366913, -0.13192856311798096, 0.027789991348981857, -0.15243129432201385, 0.004863418638706207, -0.1992267370223999, -0.47606784105300903, -0.017662890255451202, 0.0025355443358421326, 0.27236586809158325, -0.05497652664780617, -0.18235522508621216, -0.2208123356103897, 0.37471646070480347, 0.37832772731781006, -0.21296776831150055, 0.279074490070343, -0.0012135645374655724, 0.0017618462443351746, 0.03826992213726044, 0.07553091645240784, 0.03614668548107147, 0.05429576337337494, -0.10336742550134659, 0.12322831898927689, 0.011887654662132263, 0.1707298457622528, 0.011563945561647415, 0.07063841819763184, 0.19952648878097534, -0.20099028944969177, 0.2038043588399887, -0.41347017884254456, 0.11982451379299164, -0.009271781891584396, 0.381860613822937, 0.26071226596832275, 0.056342288851737976, -0.008020684123039246, -0.17035627365112305, 0.040609389543533325, 0.07158031314611435, 0.0983484759926796, 0.0362163782119751, 0.04308449104428291, -0.26185116171836853, -0.10603012144565582, -0.1299661546945572, -0.3587593734264374, -0.3763452172279358, 0.32573989033699036, -0.6488757133483887, 0.25718018412590027, 0.019184496253728867, 0.26223862171173096, 0.2667231857776642, 0.02353561297059059, -0.06492945551872253, 0.5186488628387451, -0.3449781537055969, 0.13019108772277832, -0.23221132159233093, 0.20998886227607727, 0.17275048792362213, 0.24224740266799927, 0.021468909457325935, 0.12182505428791046, -0.25892093777656555, 0.6672351360321045, 0.2809157371520996, 0.036017581820487976, 0.05635717511177063, 0.16508260369300842, 0.1519118845462799, -0.14992107450962067, 0.09039820730686188, 0.0025761425495147705, -0.24591568112373352, 0.1728610396385193, 0.3576936721801758, 0.12002069503068924, 0.15794768929481506, -0.038025952875614166, -0.12708066403865814, 0.052086442708969116, -0.35760989785194397, -0.3875839114189148, -0.09129570424556732, 0.06910251080989838, 0.03674685209989548, 0.19581347703933716, -0.15071818232536316, 0.4472478926181793, -0.02716771513223648, 0.21931131184101105, -0.6124293804168701, 0.03661983460187912, -0.0009291525930166245, -0.030169138684868813, -0.2348170280456543, 0.013935375958681107, -0.17781299352645874, -0.3156604468822479, -0.41003111004829407, 0.503865122795105, -0.1705000251531601, 0.08790314197540283, -0.07338675856590271, 0.0092906653881073, 0.22858057916164398, -0.04456615447998047, -0.07263581454753876, 0.05791309103369713, -0.07873371243476868, -0.20616695284843445, -0.22220230102539062, 0.34187960624694824, -0.08082819730043411, 0.2786802351474762, -0.043847259134054184, 0.23293015360832214, 0.21554046869277954, 0.08909304440021515, -0.29612988233566284, 0.14724168181419373, 0.41495585441589355, -0.13992491364479065, 0.8125132322311401, -0.2005476951599121, -0.38266521692276, 0.2616848051548004, 0.11219091713428497, 0.05131562799215317, -0.17455480992794037, 0.15135854482650757, 0.06870926916599274, 0.0006399080157279968, 0.08073675632476807, 0.22402110695838928, 0.2420496642589569, -0.04289408400654793, 0.022172164171934128, 0.0635923519730568, -0.28231438994407654, -0.2176913321018219, -0.014196038246154785, -0.28047746419906616, 0.35380300879478455, 0.18512865900993347, 0.023111563175916672, 0.08829210698604584, -0.22599804401397705, -0.1894897222518921, 0.10063602775335312, 0.22963447868824005, -0.0491359643638134, 0.10131427645683289, -0.2498294711112976, -0.3735664486885071, -0.23612093925476074, -0.02193029224872589, -0.33328455686569214, -0.3378172814846039, -0.26234614849090576, 0.16798631846904755, -0.03258620202541351, 0.482687771320343, 0.13254082202911377, 0.07211986184120178, 0.48610252141952515, 0.015022067353129387, -0.4869169592857361, -0.0020725391805171967, -0.0499274879693985, -0.07366709411144257, 0.10482243448495865, -0.18185749650001526, 0.06869827955961227, 0.31064167618751526, -0.09867694973945618, -0.22447457909584045, -0.4791814386844635, -0.08977992832660675, -0.2976202070713043, 0.12055830657482147, 0.23006124794483185, 0.12817634642124176, 0.14892460405826569, 0.19109781086444855, 0.26745450496673584, -0.4876634478569031, -0.07869003713130951, 0.11802081763744354, 0.15102386474609375, -0.21905329823493958, -0.10704880952835083, -0.3263394832611084, -0.0710262656211853, -0.2586098909378052, 0.07136206328868866, -0.5934926271438599, -0.16868868470191956, 0.12304113805294037, 0.28165990114212036, 0.048888519406318665, -0.21608246862888336, -0.24563053250312805, -0.05555731803178787, -0.1069803386926651, 0.23708476126194, 0.008940700441598892, -0.28850436210632324, -0.22880415618419647, -0.07171546667814255, -0.009263822808861732, 0.46748316287994385, -0.4094804525375366, -0.03520379588007927, -0.24617496132850647, -0.10047391057014465, -0.0654420554637909, -0.12347614020109177, 0.24379290640354156, -0.21410876512527466, 0.030196290463209152, -0.0505293533205986, -0.1940537691116333, 0.1511904001235962, 0.1674644947052002, 0.20632822811603546, -0.28265640139579773, 0.23079517483711243, 0.11247845739126205, 0.2068874090909958, 0.0009274706244468689, 0.10379424691200256, -0.14080305397510529, -0.03888152912259102, 0.07296086847782135, 0.08758653700351715, -0.26166635751724243, 0.5775612592697144, 0.011862948536872864, -0.16235153377056122, -0.09711077809333801, 0.01775958761572838, 0.16147416830062866, -0.2231372892856598, 0.266476571559906, 0.10300076007843018, -0.08254062384366989, 0.048685379326343536, -0.23743227124214172, 0.10538992285728455, 0.12059995532035828, 0.28714144229888916, 0.2701711356639862, 0.27155840396881104, -0.02739229053258896, 0.20987501740455627, 0.14358943700790405, -0.16923338174819946, 0.04695184528827667, -0.09968435764312744, -0.2603164613246918, 0.01436295360326767, -0.02391020394861698, 0.6091195344924927, 0.006027087569236755, -0.013803981244564056, 0.10203264653682709, -0.354825496673584, 0.9719873070716858, -0.2214687466621399, -0.0266696996986866, 0.09222066402435303, -0.5891108512878418, -0.036201201379299164, -0.06563328206539154, -0.00904228538274765, -0.38417771458625793, 0.20697689056396484, 0.41394469141960144, -0.10487012565135956, -0.23602080345153809, 0.3500775396823883, -0.09194701910018921, -0.14105316996574402, -0.00830128788948059, -0.0750935971736908, -0.43644607067108154, -0.1383827179670334, 0.4325496554374695, -0.13847126066684723, 0.03221249207854271, -0.41526755690574646, -0.05839179828763008, -0.10723388195037842, -0.025354214012622833, -0.09618060290813446, 0.18223536014556885, 0.0634758323431015, -0.1936734914779663, 0.3128211796283722, 0.1928916573524475, 0.209426611661911, 0.021394474431872368, 0.26464569568634033, -0.17532074451446533, -0.3635667562484741, 0.05325288325548172, -0.15946000814437866, -0.005654145032167435, 0.6761327981948853, -0.31356146931648254, 0.2690911889076233, -0.04029705375432968, 0.41259026527404785, -0.05024155229330063, 0.3166467547416687, 0.22401410341262817, 0.26510730385780334, -0.2192293405532837, -0.4766666889190674, 0.28769296407699585, 0.29836294054985046, 0.04188145697116852, 0.346893310546875, -0.3151338994503021, -0.11680620908737183, -0.15012559294700623, 0.15870380401611328, 0.8173956871032715, -0.17136117815971375, 0.18267306685447693, 0.3383522927761078, 0.2260408252477646, 0.06513699889183044, 0.22490671277046204, 0.23265591263771057, -0.3383629322052002, -0.7098581194877625, -0.1423981487751007, -0.10279428213834763, 0.30479881167411804, -0.11201424151659012, -0.11560896784067154, 0.3596278727054596, -0.0016807317733764648, 0.06868284940719604, 0.01871420070528984, 0.20677044987678528, 0.05152275413274765, -0.39116352796554565, -0.13501958549022675, 0.040934689342975616, -0.2017110139131546, 0.349634051322937, -0.02803814224898815, -0.05542513355612755, -0.2729372978210449, -0.09661668539047241, -0.20163075625896454, 0.3631894588470459, -0.34563738107681274, -0.07656164467334747, -0.15404587984085083, -0.40909355878829956, 0.24086622893810272, 0.3204573094844818, -0.032179735600948334, 0.14836013317108154, 0.024087918922305107, 0.36679601669311523, -0.022546522319316864, -0.0482269749045372, 0.13627326488494873, -0.26035037636756897, 0.47792714834213257, 0.0022418275475502014, 0.2012518346309662, 0.01313890889286995, -0.011381138116121292, 0.16694635152816772, -0.05868689715862274, -0.009294681251049042, 0.09570266306400299, 0.13714087009429932, 0.026442263275384903, 0.17865349352359772, -0.23142239451408386, -0.5112200975418091, 0.01928665116429329, 0.1434318870306015, -0.21843524277210236, 0.14479763805866241, -0.14816835522651672, -0.17964278161525726, 0.011207349598407745, 0.4318925738334656, 0.07744753360748291, -0.13039186596870422, 0.1549435704946518, 0.18979525566101074, 0.005871899425983429, -0.10631835460662842, -0.002437114715576172, 0.10239076614379883, -0.5212146639823914, 0.4950089454650879, -0.27831128239631653, -0.25704285502433777, 0.11024000495672226, -0.22471672296524048, 0.043006353080272675, -0.21633873879909515, -0.144390270113945, -0.18616777658462524, -0.19291967153549194, -0.023063257336616516, -0.09203049540519714, -0.002615331206470728, -0.32394981384277344, 0.1861409693956375, 0.1944994330406189, 0.21860545873641968, -0.18480411171913147, -0.10701050609350204, -0.4526258707046509, 0.07453212141990662, 0.01969597488641739, -0.17327578365802765, 0.0031472593545913696, -0.22970911860466003, 0.05020700767636299, 0.24520541727542877, -0.0027952343225479126, -0.10506175458431244, -0.24379506707191467, 0.16888104379177094, 0.12302737683057785, 0.18950393795967102, 0.19521450996398926, -0.1130276620388031, -0.26053476333618164, -0.11193691194057465, 0.310611367225647, 0.04665328562259674, -0.003140261396765709, -0.2647828161716461, 0.021670985966920853, 0.2501443028450012, 0.16901260614395142, 0.3475968837738037, -0.003481518477201462, -0.3070365786552429, 0.2179805040359497, 0.25139713287353516, -0.004950717091560364, -0.19190584123134613, -0.6131375432014465, -0.06007172539830208, 0.25315964221954346, -0.023186225444078445, 0.4646250903606415, -0.23495268821716309, -0.08317491412162781, 0.13863937556743622, 0.5589496493339539, 0.5356143116950989, -0.4253224730491638, -0.020697902888059616, 0.2814907133579254, 0.08085139095783234, -0.24977394938468933, 0.2214163988828659, -0.22925353050231934, -0.09324148297309875, 0.041203126311302185, 0.35616305470466614, 0.07055042684078217, 0.06011959910392761, -0.41570642590522766, 0.2909097671508789, 0.2516123056411743, -0.07609675079584122, -0.020012713968753815, 0.34123358130455017, 0.1036936417222023, 0.27813440561294556, 0.18926683068275452, 0.1758067011833191, -0.0705123096704483, 0.3598220944404602, 0.30618926882743835, 0.5728679299354553, 0.16298915445804596, 0.3363964855670929, 0.17357563972473145, -0.1703508198261261, -0.08556867390871048, 0.5045971274375916, -0.5123758316040039, 0.24821226298809052, -0.3158063590526581, 0.1709698736667633, -0.48193445801734924, -0.5417709350585938, -0.06486140936613083, 0.42344141006469727, -0.2529941201210022, 0.1432608664035797, 0.3605583608150482, -0.060306012630462646, -0.2993941903114319, 0.0054230764508247375, 0.01490685623139143, -0.09603232145309448, 0.3661772608757019, 0.1430702656507492, 0.10829146206378937, -0.3494257628917694, -0.41752541065216064, -0.02777441218495369, 0.16122561693191528, -0.32945847511291504, 0.3687637448310852, 0.23874229192733765, -0.1433505415916443, -0.1612587869167328, 0.37894749641418457, 0.40788066387176514, 0.5197636485099792, -0.13192470371723175, 0.26190757751464844, 0.18739792704582214, 0.00794026255607605, 0.29976725578308105, 0.2879451811313629, 0.1420636773109436, 0.24858495593070984, 0.3171003758907318, -0.040023062378168106, -0.1348453164100647, -0.06394527852535248, -0.014476025477051735, 0.45347824692726135, -0.05540985241532326, 0.45817938446998596, -0.22142738103866577, 0.028117939829826355, -0.20692892372608185, 0.19624857604503632, -0.3841955363750458, 0.023330867290496826, 0.14712639153003693, -0.26532039046287537, -0.05601784586906433, 0.06436114013195038, -0.0035086162388324738, 0.0264773927628994, 0.4905337393283844, 0.2314278483390808, 0.2814987897872925, -0.352979838848114, -0.4432319104671478, -0.7061963081359863, 0.16672763228416443, 0.023132557049393654, -0.306435227394104, -0.017993785440921783, 0.12486810982227325, 0.12715306878089905, -0.1001901924610138, 0.07469306141138077, -0.35190555453300476, 0.3043103516101837, 0.654619574546814, -0.13863436877727509, -0.01618964597582817, -0.13077615201473236, 0.1170499250292778, -0.06711403280496597, -0.21607890725135803, 0.3050326108932495, 0.35158997774124146, -0.05563167855143547, 0.2046026736497879, 0.3729979991912842, -0.028206568211317062, -0.318655401468277, -0.09511033445596695, 0.012595592066645622, 0.0027333498001098633, 0.035131193697452545, 0.004853479564189911, -0.18408791720867157, 0.10576289147138596, -0.11553087830543518, -0.12297698110342026, 0.32705581188201904, 0.41286545991897583, 0.17702877521514893, -0.08075986802577972, -0.3500661849975586, -0.06284124404191971, 0.3189769685268402, 0.14865346252918243, -0.3886559009552002, 0.2241535633802414, 0.1298566460609436, 0.20014871656894684, 0.32538455724716187, 0.46084025502204895, 0.022029351443052292, -0.06451865285634995, -0.39495256543159485, -0.43277832865715027, 0.5375050902366638, 0.21196846663951874, -0.32295680046081543, -0.12017597258090973, -0.0933184027671814, -0.12758205831050873, 0.045847535133361816, -0.3817824423313141, -0.10365556180477142, -0.09756830334663391, -0.031497761607170105, -0.4701172709465027, 0.14581920206546783, -0.17087671160697937, -0.12030047178268433, -0.06335633993148804, -0.0003438293933868408, 0.2299572080373764, -0.13677114248275757, 0.3738816976547241, -0.011800900101661682 ]
https://github.com/huggingface/datasets/issues/6363
I don't know what the issue was, but after going through the thread here I loved the issue with https://github.com/huggingface/accelerate/issues/314#issuecomment-1565259831
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
### Describe the bug Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely. ### Steps to reproduce the bug accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model" ### Expected behavior It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset. I added some debug prints ``` print("==========HERE3=============") with accelerator.main_process_first(): print(accelerator.is_main_process) print("===========Here3.1===========") if args.max_train_samples is not None: dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples)) print("===========Here3.2===========") # Set the training transforms train_dataset = dataset["train"].with_transform(preprocess_train) print("==========HERE4=============") Corresponding Output Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 2 Local process index: 2 Device: cuda:2 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. {‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values. {‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values. ==========HERE1============= ==========HERE1============= ==========HERE1============= ==========HERE2============= ==========HERE2============= ==========HERE2============= ==========HERE3============= True ===========Here3.1=========== ===========Here3.2=========== ==========HERE3============= ==========HERE3========= ``` ### Environment info _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pypi_0 pypi accelerate 0.24.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async-timeout 4.0.3 pypi_0 pypi attrs 23.1.0 pypi_0 pypi bitsandbytes 0.41.1 pypi_0 pypi blas 1.0 mkl blessings 1.7 py39h06a4308_1002 brotli-python 1.0.9 py39h6a678d5_7 bzip2 1.0.8 h7b6447c_0 ca-certificates 2023.08.22 h06a4308_0 cachetools 5.3.2 pypi_0 pypi certifi 2023.7.22 py39h06a4308_0 cffi 1.15.1 py39h5eee18b_3 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 unix_pyh707e725_0 conda-forge cryptography 41.0.3 py39hdda0065_0 cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia datasets 2.14.6 pypi_0 pypi diffusers 0.22.0.dev0 pypi_0 pypi dill 0.3.7 pypi_0 pypi docker-pycreds 0.4.0 py_0 conda-forge ffmpeg 4.3 hf484d3e_0 pytorch filelock 3.12.4 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.4.0 pypi_0 pypi fsspec 2023.10.0 pypi_0 pypi ftfy 6.1.1 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.40 pyhd8ed1ab_0 conda-forge gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.1.0 pypi_0 pypi gpustat 0.6.0 pyhd3eb1b0_1 grpcio 1.59.0 pypi_0 pypi huggingface-hub 0.17.3 pypi_0 pypi idna 3.4 py39h06a4308_0 importlib-metadata 6.8.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46305 jinja2 3.1.2 pypi_0 pypi jpeg 9e h5eee18b_1 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.8.0.34 0 nvidia libcurand 10.3.4.52 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1 libffi 3.4.4 h6a678d5_0 libgcc-ng 13.2.0 h807b86a_2 conda-forge libgfortran-ng 13.2.0 h69a702a_2 conda-forge libgfortran5 13.2.0 ha4646dd_2 conda-forge libiconv 1.16 h7f8727e_2 libidn2 2.3.4 h5eee18b_0 libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libpng 1.6.39 h5eee18b_0 libprotobuf 3.20.3 he621ea3_0 libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge libtasn1 4.19.0 h5eee18b_0 libtiff 4.5.1 h6a678d5_0 libunistring 0.9.10 h27cfd23_0 libwebp 1.3.2 h11a3e52_0 libwebp-base 1.3.2 h5eee18b_0 llvm-openmp 14.0.6 h9e868ea_0 lz4-c 1.9.4 h6a678d5_0 markdown 3.5 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mkl 2023.1.0 h213fc3f_46343 mkl-service 2.4.0 py39h5eee18b_1 mkl_fft 1.3.8 py39h5eee18b_0 mkl_random 1.2.4 py39hdb19cb5_0 multidict 6.0.4 pypi_0 pypi multiprocess 0.70.15 pypi_0 pypi ncurses 6.4 h6a678d5_0 nettle 3.7.3 hbbd107a_1 numpy 1.26.0 py39h5f9d8c6_0 numpy-base 1.26.0 py39hb5e798b_0 nvidia-ml 7.352.0 pyhd3eb1b0_0 oauthlib 3.2.2 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 3.0.11 h7f8727e_2 packaging 23.2 pypi_0 pypi pandas 2.1.1 pypi_0 pypi pathtools 0.1.2 py_1 conda-forge pillow 10.0.1 py39ha6cbd5a_0 pip 23.3 py39h06a4308_0 protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi pyarrow 13.0.0 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pyopenssl 23.2.0 py39h06a4308_0 pysocks 1.7.1 py39h06a4308_0 python 3.9.18 h955ad1f_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0 regex 2023.10.3 pypi_0 pypi requests 2.31.0 py39h06a4308_0 requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.0 pypi_0 pypi scipy 1.11.3 py39h5f9d8c6_0 sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge setproctitle 1.1.10 py39h3811e60_1004 conda-forge setuptools 68.0.0 py39h06a4308_0 six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h5eee18b_0 tbb 2021.8.0 hdb19cb5_0 tensorboard 2.15.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tokenizers 0.14.1 pypi_0 pypi torchaudio 0.13.1 py39_cu117 pytorch torchtriton 2.1.0 py39 pytorch torchvision 0.14.1 py39_cu117 pytorch tqdm 4.66.1 pypi_0 pypi transformers 4.34.1 pypi_0 pypi typing_extensions 4.7.1 py39h06a4308_0 tzdata 2023.3 pypi_0 pypi urllib3 1.26.18 py39h06a4308_0 wandb 0.15.12 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pypi_0 pypi werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39h06a4308_0 xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers xxhash 3.4.1 pypi_0 pypi xz 5.4.2 h5eee18b_0 yaml 0.2.5 h7f98852_2 conda-forge yarl 1.9.2 pypi_0 pypi zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.5 hc292b87_0
20
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL ### Describe the bug Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely. ### Steps to reproduce the bug accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model" ### Expected behavior It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset. I added some debug prints ``` print("==========HERE3=============") with accelerator.main_process_first(): print(accelerator.is_main_process) print("===========Here3.1===========") if args.max_train_samples is not None: dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples)) print("===========Here3.2===========") # Set the training transforms train_dataset = dataset["train"].with_transform(preprocess_train) print("==========HERE4=============") Corresponding Output Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 1 Local process index: 1 Device: cuda:1 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 2 Local process index: 2 Device: cuda:2 Mixed precision type: fp16 10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl Num processes: 3 Process index: 0 Local process index: 0 Device: cuda:0 Mixed precision type: fp16 You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors. {‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values. {‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values. ==========HERE1============= ==========HERE1============= ==========HERE1============= ==========HERE2============= ==========HERE2============= ==========HERE2============= ==========HERE3============= True ===========Here3.1=========== ===========Here3.2=========== ==========HERE3============= ==========HERE3========= ``` ### Environment info _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge absl-py 2.0.0 pypi_0 pypi accelerate 0.24.0 pypi_0 pypi aiohttp 3.8.6 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async-timeout 4.0.3 pypi_0 pypi attrs 23.1.0 pypi_0 pypi bitsandbytes 0.41.1 pypi_0 pypi blas 1.0 mkl blessings 1.7 py39h06a4308_1002 brotli-python 1.0.9 py39h6a678d5_7 bzip2 1.0.8 h7b6447c_0 ca-certificates 2023.08.22 h06a4308_0 cachetools 5.3.2 pypi_0 pypi certifi 2023.7.22 py39h06a4308_0 cffi 1.15.1 py39h5eee18b_3 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 unix_pyh707e725_0 conda-forge cryptography 41.0.3 py39hdda0065_0 cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia datasets 2.14.6 pypi_0 pypi diffusers 0.22.0.dev0 pypi_0 pypi dill 0.3.7 pypi_0 pypi docker-pycreds 0.4.0 py_0 conda-forge ffmpeg 4.3 hf484d3e_0 pytorch filelock 3.12.4 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.4.0 pypi_0 pypi fsspec 2023.10.0 pypi_0 pypi ftfy 6.1.1 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.40 pyhd8ed1ab_0 conda-forge gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.1.0 pypi_0 pypi gpustat 0.6.0 pyhd3eb1b0_1 grpcio 1.59.0 pypi_0 pypi huggingface-hub 0.17.3 pypi_0 pypi idna 3.4 py39h06a4308_0 importlib-metadata 6.8.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46305 jinja2 3.1.2 pypi_0 pypi jpeg 9e h5eee18b_1 lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.8.0.34 0 nvidia libcurand 10.3.4.52 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1 libffi 3.4.4 h6a678d5_0 libgcc-ng 13.2.0 h807b86a_2 conda-forge libgfortran-ng 13.2.0 h69a702a_2 conda-forge libgfortran5 13.2.0 ha4646dd_2 conda-forge libiconv 1.16 h7f8727e_2 libidn2 2.3.4 h5eee18b_0 libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libpng 1.6.39 h5eee18b_0 libprotobuf 3.20.3 he621ea3_0 libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge libtasn1 4.19.0 h5eee18b_0 libtiff 4.5.1 h6a678d5_0 libunistring 0.9.10 h27cfd23_0 libwebp 1.3.2 h11a3e52_0 libwebp-base 1.3.2 h5eee18b_0 llvm-openmp 14.0.6 h9e868ea_0 lz4-c 1.9.4 h6a678d5_0 markdown 3.5 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi mkl 2023.1.0 h213fc3f_46343 mkl-service 2.4.0 py39h5eee18b_1 mkl_fft 1.3.8 py39h5eee18b_0 mkl_random 1.2.4 py39hdb19cb5_0 multidict 6.0.4 pypi_0 pypi multiprocess 0.70.15 pypi_0 pypi ncurses 6.4 h6a678d5_0 nettle 3.7.3 hbbd107a_1 numpy 1.26.0 py39h5f9d8c6_0 numpy-base 1.26.0 py39hb5e798b_0 nvidia-ml 7.352.0 pyhd3eb1b0_0 oauthlib 3.2.2 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 3.0.11 h7f8727e_2 packaging 23.2 pypi_0 pypi pandas 2.1.1 pypi_0 pypi pathtools 0.1.2 py_1 conda-forge pillow 10.0.1 py39ha6cbd5a_0 pip 23.3 py39h06a4308_0 protobuf 4.23.4 pypi_0 pypi psutil 5.9.6 pypi_0 pypi pyarrow 13.0.0 pypi_0 pypi pyasn1 0.5.0 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pyopenssl 23.2.0 py39h06a4308_0 pysocks 1.7.1 py39h06a4308_0 python 3.9.18 h955ad1f_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.9 2_cp39 conda-forge pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.3.post1 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0 regex 2023.10.3 pypi_0 pypi requests 2.31.0 py39h06a4308_0 requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi safetensors 0.4.0 pypi_0 pypi scipy 1.11.3 py39h5f9d8c6_0 sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge setproctitle 1.1.10 py39h3811e60_1004 conda-forge setuptools 68.0.0 py39h06a4308_0 six 1.16.0 pyh6c4a22f_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge sqlite 3.41.2 h5eee18b_0 tbb 2021.8.0 hdb19cb5_0 tensorboard 2.15.0 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tokenizers 0.14.1 pypi_0 pypi torchaudio 0.13.1 py39_cu117 pytorch torchtriton 2.1.0 py39 pytorch torchvision 0.14.1 py39_cu117 pytorch tqdm 4.66.1 pypi_0 pypi transformers 4.34.1 pypi_0 pypi typing_extensions 4.7.1 py39h06a4308_0 tzdata 2023.3 pypi_0 pypi urllib3 1.26.18 py39h06a4308_0 wandb 0.15.12 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pypi_0 pypi werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39h06a4308_0 xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers xxhash 3.4.1 pypi_0 pypi xz 5.4.2 h5eee18b_0 yaml 0.2.5 h7f98852_2 conda-forge yarl 1.9.2 pypi_0 pypi zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.5 hc292b87_0 I don't know what the issue was, but after going through the thread here I loved the issue with https://github.com/huggingface/accelerate/issues/314#issuecomment-1565259831
[ -0.29093098640441895, -0.4494297206401825, 0.03063829243183136, 0.10455924272537231, 0.7972444295883179, -0.06378263235092163, 0.38594162464141846, 0.08792893588542938, -0.19314613938331604, 0.4078892171382904, 0.08595020323991776, 0.15589837729930878, 0.01676591858267784, -0.07265159487724304, 0.02791040763258934, -0.12267455458641052, 0.1636425107717514, -0.15872235596179962, -0.010782875120639801, -0.2772062420845032, 0.05453786998987198, 0.02825688011944294, -0.19733773171901703, 0.05589437857270241, -0.415914386510849, -0.17970845103263855, 0.0735665038228035, -0.052424535155296326, -0.07989750802516937, 0.049917325377464294, 0.06106237322092056, 0.2990711033344269, -0.25099629163742065, 0.41525450348854065, -0.00012525715283118188, 0.015866786241531372, 0.17968347668647766, 0.12324430793523788, -0.062261901795864105, -0.27441003918647766, -0.06299880146980286, 0.13892382383346558, -0.24097135663032532, 0.010507136583328247, -0.1529707908630371, 0.09709952771663666, -0.14965295791625977, -0.3297668695449829, 0.4145660102367401, 0.14753317832946777, 0.06290823221206665, -0.09227758646011353, -0.10776235163211823, -0.24873676896095276, -0.0551648885011673, -0.2281971275806427, -0.2207949161529541, 0.0906703919172287, 0.2940048575401306, 0.027575597167015076, -0.4739746153354645, 0.4821750223636627, 0.18431341648101807, -0.22458381950855255, -0.022432224825024605, -0.22474652528762817, 0.305581271648407, -0.3545084595680237, 0.14583119750022888, 0.3009342849254608, 0.12916240096092224, 0.047329630702733994, -0.3434460759162903, -0.3459230661392212, 0.35185813903808594, -0.05253330245614052, 0.23941899836063385, -0.018792400136590004, -0.2868098318576813, 0.012072034180164337, -0.2741742730140686, -0.1855693757534027, -0.0877263993024826, 0.024806272238492966, -0.278726190328598, 0.5902511477470398, 0.04143892973661423, 0.21439200639724731, 0.3844811022281647, 0.08770126849412918, 0.06263422220945358, 0.21698591113090515, 0.3053859770298004, -0.12789812684059143, -0.6810310482978821, 0.25515833497047424, 0.012995811179280281, -0.3107757568359375, 0.09026800096035004, 0.1121412143111229, 0.05166146904230118, -0.1752394735813141, 0.1803348809480667, -0.10411490499973297, 0.35753971338272095, 0.233581081032753, -0.144460529088974, 0.09754469990730286, 0.2890278100967407, 0.08275659382343292, -0.1745910942554474, 0.20930197834968567, -0.18796375393867493, -0.11595229804515839, -0.3650617301464081, -0.03388985991477966, 0.02104467898607254, -0.10529615730047226, -0.20620009303092957, 0.14734461903572083, 0.1114935502409935, 0.17682747542858124, 0.27773281931877136, 0.42067357897758484, 0.07787610590457916, 0.7555187940597534, 0.2579122483730316, -0.15936219692230225, -0.021704282611608505, 0.12056688964366913, -0.13192856311798096, 0.027789991348981857, -0.15243129432201385, 0.004863418638706207, -0.1992267370223999, -0.47606784105300903, -0.017662890255451202, 0.0025355443358421326, 0.27236586809158325, -0.05497652664780617, -0.18235522508621216, -0.2208123356103897, 0.37471646070480347, 0.37832772731781006, -0.21296776831150055, 0.279074490070343, -0.0012135645374655724, 0.0017618462443351746, 0.03826992213726044, 0.07553091645240784, 0.03614668548107147, 0.05429576337337494, -0.10336742550134659, 0.12322831898927689, 0.011887654662132263, 0.1707298457622528, 0.011563945561647415, 0.07063841819763184, 0.19952648878097534, -0.20099028944969177, 0.2038043588399887, -0.41347017884254456, 0.11982451379299164, -0.009271781891584396, 0.381860613822937, 0.26071226596832275, 0.056342288851737976, -0.008020684123039246, -0.17035627365112305, 0.040609389543533325, 0.07158031314611435, 0.0983484759926796, 0.0362163782119751, 0.04308449104428291, -0.26185116171836853, -0.10603012144565582, -0.1299661546945572, -0.3587593734264374, -0.3763452172279358, 0.32573989033699036, -0.6488757133483887, 0.25718018412590027, 0.019184496253728867, 0.26223862171173096, 0.2667231857776642, 0.02353561297059059, -0.06492945551872253, 0.5186488628387451, -0.3449781537055969, 0.13019108772277832, -0.23221132159233093, 0.20998886227607727, 0.17275048792362213, 0.24224740266799927, 0.021468909457325935, 0.12182505428791046, -0.25892093777656555, 0.6672351360321045, 0.2809157371520996, 0.036017581820487976, 0.05635717511177063, 0.16508260369300842, 0.1519118845462799, -0.14992107450962067, 0.09039820730686188, 0.0025761425495147705, -0.24591568112373352, 0.1728610396385193, 0.3576936721801758, 0.12002069503068924, 0.15794768929481506, -0.038025952875614166, -0.12708066403865814, 0.052086442708969116, -0.35760989785194397, -0.3875839114189148, -0.09129570424556732, 0.06910251080989838, 0.03674685209989548, 0.19581347703933716, -0.15071818232536316, 0.4472478926181793, -0.02716771513223648, 0.21931131184101105, -0.6124293804168701, 0.03661983460187912, -0.0009291525930166245, -0.030169138684868813, -0.2348170280456543, 0.013935375958681107, -0.17781299352645874, -0.3156604468822479, -0.41003111004829407, 0.503865122795105, -0.1705000251531601, 0.08790314197540283, -0.07338675856590271, 0.0092906653881073, 0.22858057916164398, -0.04456615447998047, -0.07263581454753876, 0.05791309103369713, -0.07873371243476868, -0.20616695284843445, -0.22220230102539062, 0.34187960624694824, -0.08082819730043411, 0.2786802351474762, -0.043847259134054184, 0.23293015360832214, 0.21554046869277954, 0.08909304440021515, -0.29612988233566284, 0.14724168181419373, 0.41495585441589355, -0.13992491364479065, 0.8125132322311401, -0.2005476951599121, -0.38266521692276, 0.2616848051548004, 0.11219091713428497, 0.05131562799215317, -0.17455480992794037, 0.15135854482650757, 0.06870926916599274, 0.0006399080157279968, 0.08073675632476807, 0.22402110695838928, 0.2420496642589569, -0.04289408400654793, 0.022172164171934128, 0.0635923519730568, -0.28231438994407654, -0.2176913321018219, -0.014196038246154785, -0.28047746419906616, 0.35380300879478455, 0.18512865900993347, 0.023111563175916672, 0.08829210698604584, -0.22599804401397705, -0.1894897222518921, 0.10063602775335312, 0.22963447868824005, -0.0491359643638134, 0.10131427645683289, -0.2498294711112976, -0.3735664486885071, -0.23612093925476074, -0.02193029224872589, -0.33328455686569214, -0.3378172814846039, -0.26234614849090576, 0.16798631846904755, -0.03258620202541351, 0.482687771320343, 0.13254082202911377, 0.07211986184120178, 0.48610252141952515, 0.015022067353129387, -0.4869169592857361, -0.0020725391805171967, -0.0499274879693985, -0.07366709411144257, 0.10482243448495865, -0.18185749650001526, 0.06869827955961227, 0.31064167618751526, -0.09867694973945618, -0.22447457909584045, -0.4791814386844635, -0.08977992832660675, -0.2976202070713043, 0.12055830657482147, 0.23006124794483185, 0.12817634642124176, 0.14892460405826569, 0.19109781086444855, 0.26745450496673584, -0.4876634478569031, -0.07869003713130951, 0.11802081763744354, 0.15102386474609375, -0.21905329823493958, -0.10704880952835083, -0.3263394832611084, -0.0710262656211853, -0.2586098909378052, 0.07136206328868866, -0.5934926271438599, -0.16868868470191956, 0.12304113805294037, 0.28165990114212036, 0.048888519406318665, -0.21608246862888336, -0.24563053250312805, -0.05555731803178787, -0.1069803386926651, 0.23708476126194, 0.008940700441598892, -0.28850436210632324, -0.22880415618419647, -0.07171546667814255, -0.009263822808861732, 0.46748316287994385, -0.4094804525375366, -0.03520379588007927, -0.24617496132850647, -0.10047391057014465, -0.0654420554637909, -0.12347614020109177, 0.24379290640354156, -0.21410876512527466, 0.030196290463209152, -0.0505293533205986, -0.1940537691116333, 0.1511904001235962, 0.1674644947052002, 0.20632822811603546, -0.28265640139579773, 0.23079517483711243, 0.11247845739126205, 0.2068874090909958, 0.0009274706244468689, 0.10379424691200256, -0.14080305397510529, -0.03888152912259102, 0.07296086847782135, 0.08758653700351715, -0.26166635751724243, 0.5775612592697144, 0.011862948536872864, -0.16235153377056122, -0.09711077809333801, 0.01775958761572838, 0.16147416830062866, -0.2231372892856598, 0.266476571559906, 0.10300076007843018, -0.08254062384366989, 0.048685379326343536, -0.23743227124214172, 0.10538992285728455, 0.12059995532035828, 0.28714144229888916, 0.2701711356639862, 0.27155840396881104, -0.02739229053258896, 0.20987501740455627, 0.14358943700790405, -0.16923338174819946, 0.04695184528827667, -0.09968435764312744, -0.2603164613246918, 0.01436295360326767, -0.02391020394861698, 0.6091195344924927, 0.006027087569236755, -0.013803981244564056, 0.10203264653682709, -0.354825496673584, 0.9719873070716858, -0.2214687466621399, -0.0266696996986866, 0.09222066402435303, -0.5891108512878418, -0.036201201379299164, -0.06563328206539154, -0.00904228538274765, -0.38417771458625793, 0.20697689056396484, 0.41394469141960144, -0.10487012565135956, -0.23602080345153809, 0.3500775396823883, -0.09194701910018921, -0.14105316996574402, -0.00830128788948059, -0.0750935971736908, -0.43644607067108154, -0.1383827179670334, 0.4325496554374695, -0.13847126066684723, 0.03221249207854271, -0.41526755690574646, -0.05839179828763008, -0.10723388195037842, -0.025354214012622833, -0.09618060290813446, 0.18223536014556885, 0.0634758323431015, -0.1936734914779663, 0.3128211796283722, 0.1928916573524475, 0.209426611661911, 0.021394474431872368, 0.26464569568634033, -0.17532074451446533, -0.3635667562484741, 0.05325288325548172, -0.15946000814437866, -0.005654145032167435, 0.6761327981948853, -0.31356146931648254, 0.2690911889076233, -0.04029705375432968, 0.41259026527404785, -0.05024155229330063, 0.3166467547416687, 0.22401410341262817, 0.26510730385780334, -0.2192293405532837, -0.4766666889190674, 0.28769296407699585, 0.29836294054985046, 0.04188145697116852, 0.346893310546875, -0.3151338994503021, -0.11680620908737183, -0.15012559294700623, 0.15870380401611328, 0.8173956871032715, -0.17136117815971375, 0.18267306685447693, 0.3383522927761078, 0.2260408252477646, 0.06513699889183044, 0.22490671277046204, 0.23265591263771057, -0.3383629322052002, -0.7098581194877625, -0.1423981487751007, -0.10279428213834763, 0.30479881167411804, -0.11201424151659012, -0.11560896784067154, 0.3596278727054596, -0.0016807317733764648, 0.06868284940719604, 0.01871420070528984, 0.20677044987678528, 0.05152275413274765, -0.39116352796554565, -0.13501958549022675, 0.040934689342975616, -0.2017110139131546, 0.349634051322937, -0.02803814224898815, -0.05542513355612755, -0.2729372978210449, -0.09661668539047241, -0.20163075625896454, 0.3631894588470459, -0.34563738107681274, -0.07656164467334747, -0.15404587984085083, -0.40909355878829956, 0.24086622893810272, 0.3204573094844818, -0.032179735600948334, 0.14836013317108154, 0.024087918922305107, 0.36679601669311523, -0.022546522319316864, -0.0482269749045372, 0.13627326488494873, -0.26035037636756897, 0.47792714834213257, 0.0022418275475502014, 0.2012518346309662, 0.01313890889286995, -0.011381138116121292, 0.16694635152816772, -0.05868689715862274, -0.009294681251049042, 0.09570266306400299, 0.13714087009429932, 0.026442263275384903, 0.17865349352359772, -0.23142239451408386, -0.5112200975418091, 0.01928665116429329, 0.1434318870306015, -0.21843524277210236, 0.14479763805866241, -0.14816835522651672, -0.17964278161525726, 0.011207349598407745, 0.4318925738334656, 0.07744753360748291, -0.13039186596870422, 0.1549435704946518, 0.18979525566101074, 0.005871899425983429, -0.10631835460662842, -0.002437114715576172, 0.10239076614379883, -0.5212146639823914, 0.4950089454650879, -0.27831128239631653, -0.25704285502433777, 0.11024000495672226, -0.22471672296524048, 0.043006353080272675, -0.21633873879909515, -0.144390270113945, -0.18616777658462524, -0.19291967153549194, -0.023063257336616516, -0.09203049540519714, -0.002615331206470728, -0.32394981384277344, 0.1861409693956375, 0.1944994330406189, 0.21860545873641968, -0.18480411171913147, -0.10701050609350204, -0.4526258707046509, 0.07453212141990662, 0.01969597488641739, -0.17327578365802765, 0.0031472593545913696, -0.22970911860466003, 0.05020700767636299, 0.24520541727542877, -0.0027952343225479126, -0.10506175458431244, -0.24379506707191467, 0.16888104379177094, 0.12302737683057785, 0.18950393795967102, 0.19521450996398926, -0.1130276620388031, -0.26053476333618164, -0.11193691194057465, 0.310611367225647, 0.04665328562259674, -0.003140261396765709, -0.2647828161716461, 0.021670985966920853, 0.2501443028450012, 0.16901260614395142, 0.3475968837738037, -0.003481518477201462, -0.3070365786552429, 0.2179805040359497, 0.25139713287353516, -0.004950717091560364, -0.19190584123134613, -0.6131375432014465, -0.06007172539830208, 0.25315964221954346, -0.023186225444078445, 0.4646250903606415, -0.23495268821716309, -0.08317491412162781, 0.13863937556743622, 0.5589496493339539, 0.5356143116950989, -0.4253224730491638, -0.020697902888059616, 0.2814907133579254, 0.08085139095783234, -0.24977394938468933, 0.2214163988828659, -0.22925353050231934, -0.09324148297309875, 0.041203126311302185, 0.35616305470466614, 0.07055042684078217, 0.06011959910392761, -0.41570642590522766, 0.2909097671508789, 0.2516123056411743, -0.07609675079584122, -0.020012713968753815, 0.34123358130455017, 0.1036936417222023, 0.27813440561294556, 0.18926683068275452, 0.1758067011833191, -0.0705123096704483, 0.3598220944404602, 0.30618926882743835, 0.5728679299354553, 0.16298915445804596, 0.3363964855670929, 0.17357563972473145, -0.1703508198261261, -0.08556867390871048, 0.5045971274375916, -0.5123758316040039, 0.24821226298809052, -0.3158063590526581, 0.1709698736667633, -0.48193445801734924, -0.5417709350585938, -0.06486140936613083, 0.42344141006469727, -0.2529941201210022, 0.1432608664035797, 0.3605583608150482, -0.060306012630462646, -0.2993941903114319, 0.0054230764508247375, 0.01490685623139143, -0.09603232145309448, 0.3661772608757019, 0.1430702656507492, 0.10829146206378937, -0.3494257628917694, -0.41752541065216064, -0.02777441218495369, 0.16122561693191528, -0.32945847511291504, 0.3687637448310852, 0.23874229192733765, -0.1433505415916443, -0.1612587869167328, 0.37894749641418457, 0.40788066387176514, 0.5197636485099792, -0.13192470371723175, 0.26190757751464844, 0.18739792704582214, 0.00794026255607605, 0.29976725578308105, 0.2879451811313629, 0.1420636773109436, 0.24858495593070984, 0.3171003758907318, -0.040023062378168106, -0.1348453164100647, -0.06394527852535248, -0.014476025477051735, 0.45347824692726135, -0.05540985241532326, 0.45817938446998596, -0.22142738103866577, 0.028117939829826355, -0.20692892372608185, 0.19624857604503632, -0.3841955363750458, 0.023330867290496826, 0.14712639153003693, -0.26532039046287537, -0.05601784586906433, 0.06436114013195038, -0.0035086162388324738, 0.0264773927628994, 0.4905337393283844, 0.2314278483390808, 0.2814987897872925, -0.352979838848114, -0.4432319104671478, -0.7061963081359863, 0.16672763228416443, 0.023132557049393654, -0.306435227394104, -0.017993785440921783, 0.12486810982227325, 0.12715306878089905, -0.1001901924610138, 0.07469306141138077, -0.35190555453300476, 0.3043103516101837, 0.654619574546814, -0.13863436877727509, -0.01618964597582817, -0.13077615201473236, 0.1170499250292778, -0.06711403280496597, -0.21607890725135803, 0.3050326108932495, 0.35158997774124146, -0.05563167855143547, 0.2046026736497879, 0.3729979991912842, -0.028206568211317062, -0.318655401468277, -0.09511033445596695, 0.012595592066645622, 0.0027333498001098633, 0.035131193697452545, 0.004853479564189911, -0.18408791720867157, 0.10576289147138596, -0.11553087830543518, -0.12297698110342026, 0.32705581188201904, 0.41286545991897583, 0.17702877521514893, -0.08075986802577972, -0.3500661849975586, -0.06284124404191971, 0.3189769685268402, 0.14865346252918243, -0.3886559009552002, 0.2241535633802414, 0.1298566460609436, 0.20014871656894684, 0.32538455724716187, 0.46084025502204895, 0.022029351443052292, -0.06451865285634995, -0.39495256543159485, -0.43277832865715027, 0.5375050902366638, 0.21196846663951874, -0.32295680046081543, -0.12017597258090973, -0.0933184027671814, -0.12758205831050873, 0.045847535133361816, -0.3817824423313141, -0.10365556180477142, -0.09756830334663391, -0.031497761607170105, -0.4701172709465027, 0.14581920206546783, -0.17087671160697937, -0.12030047178268433, -0.06335633993148804, -0.0003438293933868408, 0.2299572080373764, -0.13677114248275757, 0.3738816976547241, -0.011800900101661682 ]
https://github.com/huggingface/datasets/issues/6360
This issue stems from https://github.com/huggingface/datasets/blob/6d2f2a5e0fea3827eccfd1717d8021c15fc4292a/src/datasets/table.py#L2203-L2205 I'll address it as part of https://github.com/huggingface/datasets/pull/6283. In the meantime, this should work ```python import pyarrow as pa from datasets import Image dataset = dataset.with_format("arrow") def embed_images(pa_table): images_arr = pa.chunked_array( [ pa.ListArray.from_arrays(chunk.offsets, Image().embed_storage(chunk.values), mask=chunk.is_null()) for chunk in pa_table["images"].chunks ] ) return pa_table.set_column(pa_table.schema.get_field_index("images"), "images", images_arr) dataset = dataset.map(embed_images, batched=True) dataset = dataset.with_format("python") dataset.push_to_hub(...) ```
Add support for `Sequence(Audio/Image)` feature in `push_to_hub`
### Feature request Allow for `Sequence` of `Image` (or `Audio`) to be embedded inside the shards. ### Motivation Currently, thanks to #3685, when `embed_external_files` is set to True (which is the default) in `push_to_hub`, features of type `Image` and `Audio` are embedded inside the arrow/parquet shards, instead of only storing paths to the files. I've noticed that this behavior does not extend to `Sequence` of `Image`, when working with a [dataset of timelapse images](https://huggingface.co/datasets/1aurent/Human-Embryo-Timelapse). ### Your contribution I'll submit a PR if I find a way to add this feature
58
Add support for `Sequence(Audio/Image)` feature in `push_to_hub` ### Feature request Allow for `Sequence` of `Image` (or `Audio`) to be embedded inside the shards. ### Motivation Currently, thanks to #3685, when `embed_external_files` is set to True (which is the default) in `push_to_hub`, features of type `Image` and `Audio` are embedded inside the arrow/parquet shards, instead of only storing paths to the files. I've noticed that this behavior does not extend to `Sequence` of `Image`, when working with a [dataset of timelapse images](https://huggingface.co/datasets/1aurent/Human-Embryo-Timelapse). ### Your contribution I'll submit a PR if I find a way to add this feature This issue stems from https://github.com/huggingface/datasets/blob/6d2f2a5e0fea3827eccfd1717d8021c15fc4292a/src/datasets/table.py#L2203-L2205 I'll address it as part of https://github.com/huggingface/datasets/pull/6283. In the meantime, this should work ```python import pyarrow as pa from datasets import Image dataset = dataset.with_format("arrow") def embed_images(pa_table): images_arr = pa.chunked_array( [ pa.ListArray.from_arrays(chunk.offsets, Image().embed_storage(chunk.values), mask=chunk.is_null()) for chunk in pa_table["images"].chunks ] ) return pa_table.set_column(pa_table.schema.get_field_index("images"), "images", images_arr) dataset = dataset.map(embed_images, batched=True) dataset = dataset.with_format("python") dataset.push_to_hub(...) ```
[ -0.255060076713562, -0.5069053173065186, -0.11654671281576157, 0.14346259832382202, -0.07700437307357788, -0.09264026582241058, 0.1639629453420639, 0.2216341495513916, -0.26074954867362976, 0.17967505753040314, 0.046998776495456696, 0.26361843943595886, -0.4362025260925293, 0.16191110014915466, 0.019483476877212524, -0.11654733121395111, 0.17083469033241272, 0.25490760803222656, 0.3873010277748108, 0.15251176059246063, -0.25089824199676514, -0.03947599604725838, -0.10074915736913681, -0.030357759445905685, -0.28555068373680115, 0.04869646579027176, -0.09204842895269394, -0.14131732285022736, 0.023144785314798355, -0.34679827094078064, -0.25670182704925537, 0.19102412462234497, 0.11374805867671967, 0.27290967106819153, -0.0001239733974216506, -0.07202395051717758, 0.5071851015090942, -0.15588580071926117, -0.10968080908060074, -0.1309485286474228, -0.50267493724823, -0.09341439604759216, 0.05762491375207901, -0.27766773104667664, 0.014322303235530853, 0.12585020065307617, 0.18671943247318268, 0.15408119559288025, 0.3910731077194214, -0.035382382571697235, 0.07164888828992844, 0.06589850783348083, 0.1338176429271698, 0.07107891142368317, 0.6388089060783386, 0.5541126728057861, -0.31803831458091736, -0.2652539014816284, 0.5817934274673462, 0.2770611643791199, 0.021766485646367073, 0.3154558539390564, 0.1392197161912918, -0.10880117118358612, 0.33147183060646057, 0.1348564773797989, -0.045908983796834946, -0.38250622153282166, -0.530707836151123, 0.024745993316173553, 0.027901258319616318, -0.4779628813266754, -0.40519899129867554, -0.3925902545452118, -0.15030927956104279, -0.48869800567626953, 0.1607053279876709, 0.15334773063659668, -0.005959369242191315, -0.03527845814824104, -0.23952904343605042, -0.20725283026695251, -0.19670233130455017, 0.0649678111076355, 0.3297925591468811, -0.025378286838531494, 0.19560256600379944, -0.0640239268541336, 0.18867012858390808, -0.015917886048555374, 0.16026470065116882, -0.11554582417011261, 0.04755599796772003, 0.10268740355968475, -0.19496086239814758, -0.11608312278985977, -0.0983654111623764, 0.31828153133392334, -0.04098738357424736, 0.3321179747581482, -0.12408904731273651, 0.232352152466774, -0.06270749866962433, 0.27135956287384033, 0.07880948483943939, -0.1396111100912094, 0.22001603245735168, -0.11367208510637283, 0.01145138218998909, 0.4450729489326477, 0.13686509430408478, 0.05639468505978584, 0.009019657969474792, -0.19480088353157043, -0.06395386904478073, -0.0005483832210302353, -0.019356857985258102, 0.095096156001091, -0.013059176504611969, -0.0443178229033947, 0.0028967857360839844, 0.07039575278759003, 0.09426138550043106, 0.03321204334497452, 0.2416626214981079, -0.1368085891008377, 0.018699847161769867, 0.31748801469802856, -0.07784769684076309, 0.11217496544122696, -0.12215183675289154, 0.3479264974594116, -0.1693616509437561, 0.449736088514328, -0.01648547500371933, -0.2991405725479126, -0.01976950094103813, -0.04280756413936615, 0.36095893383026123, 0.07686910778284073, -0.2527490258216858, -0.047424715012311935, 0.07740898430347443, 0.07791043817996979, -0.2889549434185028, 0.05144912749528885, -0.28688177466392517, 0.11027470231056213, -0.21255412697792053, 0.05889805406332016, -0.35448145866394043, -0.19299711287021637, 0.13382720947265625, -0.0074278851971030235, -0.5086272954940796, 0.37800151109695435, -0.4273494482040405, 0.10305583477020264, -0.11679962277412415, -0.300447940826416, 0.12714824080467224, 0.09315897524356842, -0.5546583533287048, -0.1087743490934372, 0.14921170473098755, 0.22651752829551697, -0.12362083047628403, 0.02792760729789734, 0.13875946402549744, 0.16976866126060486, -0.17509549856185913, 0.023541752249002457, 0.09756612777709961, -0.08468840271234512, -0.30046775937080383, 0.4985229969024658, 0.09720732271671295, -0.6915474534034729, -0.03156479448080063, -0.27547717094421387, -0.04073064774274826, 0.12717470526695251, 0.15598204731941223, 0.10990571975708008, 0.6469703912734985, -0.281851202249527, 0.09110083431005478, 0.4093163311481476, 0.18454931676387787, -0.06091080605983734, -0.17284801602363586, -0.23168738186359406, -0.27497532963752747, 0.16325068473815918, -0.23384785652160645, -0.16047866642475128, 0.10313926637172699, 0.06775973737239838, 0.14041069149971008, 0.14811448752880096, 0.39681535959243774, 0.273933082818985, 0.5291841626167297, -0.004656719043850899, 0.017640870064496994, -0.46255308389663696, -0.11195643246173859, 0.23694108426570892, -0.04304400831460953, 0.06428997218608856, -0.6702269911766052, -0.08568841218948364, -0.039645351469516754, 0.12147339433431625, -0.39240115880966187, 0.16538077592849731, -0.045015111565589905, -0.2676345705986023, -0.0008716285228729248, 0.1961461305618286, 0.048874080181121826, 0.3945840001106262, 0.03686170279979706, 0.07349042594432831, -0.4964822828769684, 0.6637693643569946, 0.08175324648618698, -0.2508769929409027, 0.0767354890704155, 0.45361602306365967, 0.04096473008394241, -0.22776448726654053, 0.30749472975730896, 0.47996726632118225, 0.5231686234474182, 0.5904736518859863, -0.4618260860443115, 0.21942275762557983, 0.47606998682022095, -0.486503928899765, 0.08370466530323029, -0.20708122849464417, 0.08698020875453949, -0.1349005252122879, -0.22012093663215637, 0.4036707878112793, 0.2582082748413086, 0.30729278922080994, -0.05607190728187561, -0.18712010979652405, -0.28710803389549255, 0.12709245085716248, -0.27348461747169495, -0.15334385633468628, -0.0980008989572525, 0.076642706990242, -0.11802412569522858, -0.29921993613243103, 0.2175363004207611, 0.022217802703380585, 0.3403279483318329, 0.15173664689064026, -0.04893410578370094, 0.16494524478912354, -0.21797016263008118, -0.28374484181404114, 0.39709508419036865, -0.05916760861873627, 0.009451568126678467, 0.1901874542236328, -0.3171144425868988, -0.017270563170313835, -0.19982947409152985, -0.09002973139286041, 0.010485030710697174, 0.15081925690174103, 0.30565157532691956, 0.20439070463180542, 0.41178786754608154, 0.10847590863704681, -0.06282518804073334, -0.3722396492958069, 0.02946869283914566, 0.0013542138040065765, -0.24414730072021484, -0.1975688934326172, -0.28072690963745117, -0.10901820659637451, 0.15175214409828186, -0.12172961235046387, -0.0179055854678154, -0.2066248208284378, 0.24014979600906372, 0.17628955841064453, -0.1250089406967163, 0.3510555624961853, 0.32365819811820984, 0.154188334941864, 0.01016208529472351, -0.21856413781642914, -0.3649151623249054, -0.04806779697537422, 0.4767172634601593, -0.05580388009548187, 0.05904093757271767, 0.3565312922000885, 0.17991003394126892, 0.2590639591217041, 0.05779089033603668, -0.3266282081604004, -0.24131527543067932, 0.1215520054101944, -0.13147187232971191, 0.07751926779747009, -0.004788786172866821, -0.14130233228206635, 0.1571655571460724, -0.3966860771179199, 0.32497695088386536, 0.019065476953983307, -0.32542678713798523, 0.0899469330906868, -0.051158323884010315, 0.18753929436206818, -0.07741405814886093, 0.3348502516746521, -0.3074866533279419, -0.5212706327438354, 0.24313822388648987, 0.4387022852897644, 0.0757114589214325, 0.2896794080734253, 0.15839314460754395, -0.2683182954788208, -0.052644550800323486, -0.20037616789340973, -0.004628129303455353, 0.1859157681465149, 0.49472948908805847, -0.2112354338169098, -0.11327032744884491, -0.12066588550806046, -0.22387446463108063, -0.1589544117450714, 0.49742764234542847, -0.1166321188211441, -0.5896905660629272, -0.018812160938978195, 0.035352036356925964, 0.07304741442203522, -0.18054530024528503, 0.30158764123916626, 0.12121288478374481, -0.0015679411590099335, -0.04975278675556183, 0.02160055935382843, 0.13399600982666016, 0.4603502154350281, -0.28177088499069214, 0.24801552295684814, 0.39753374457359314, -0.0013660639524459839, 0.34626734256744385, 0.01987336575984955, -0.20883673429489136, 0.4871499538421631, -0.14302417635917664, 0.08637845516204834, -0.2900661826133728, 0.280125230550766, -0.04047882929444313, 0.1313159167766571, 0.04932696372270584, 0.13174580037593842, 0.0015112385153770447, -0.08359348773956299, -0.09202323108911514, 0.009524203836917877, -0.07496760785579681, -0.13530410826206207, -0.13590097427368164, -0.0245840921998024, 0.17761388421058655, -0.1731148064136505, -0.2348206639289856, -0.06512312591075897, -0.2833006978034973, 0.09458506852388382, -0.12761060893535614, 0.4744406044483185, -0.15295931696891785, -0.19717341661453247, -0.06687547266483307, -0.2374439835548401, -0.09256705641746521, 0.3768782615661621, 0.10047547519207001, -0.02604905515909195, -0.09808153659105301, 0.10048434138298035, -0.047853585332632065, 0.41879257559776306, -0.32430213689804077, 0.07376483827829361, -0.06925725936889648, -0.029056746512651443, -0.4457811415195465, -0.06804882735013962, -0.07955969125032425, -0.021619681268930435, -0.5080128312110901, 0.8306236267089844, -0.11419686675071716, -0.11230364441871643, -0.08599108457565308, 0.060057416558265686, 0.004072993993759155, -0.06152794137597084, 0.08765320479869843, 0.10252527892589569, -0.49116548895835876, -0.03863599896430969, 0.5149803161621094, 0.24528418481349945, 0.02369018644094467, -0.3858688771724701, 0.10224159061908722, 0.017557017505168915, 0.004974208772182465, -0.22717885673046112, 0.4675072431564331, -0.22352764010429382, 0.3307236433029175, 0.006861500442028046, 0.06092658266425133, 0.182878777384758, -0.007577603682875633, 0.07407011091709137, -0.05898439884185791, 0.1641920953989029, -0.19941727817058563, 0.15300320088863373, 0.6463058590888977, 0.2463008463382721, 0.29834088683128357, -0.45396557450294495, 0.20282332599163055, -0.8109843730926514, -0.18547028303146362, 0.21983838081359863, -0.23479896783828735, -0.06341776251792908, 0.17027956247329712, 0.3012794256210327, -0.03153783828020096, -0.13539807498455048, 0.06490085273981094, 0.5755525231361389, -0.35686957836151123, 0.5145086050033569, 0.05937705934047699, 1.1529918909072876, 0.22391115128993988, 0.33775460720062256, 0.4504341781139374, 0.07885982096195221, 0.19948530197143555, -0.2776370644569397, -0.0517573356628418, -0.04294873774051666, -0.13855968415737152, -0.10327140986919403, -0.13443291187286377, -0.1173117607831955, 0.17153453826904297, -0.1296372413635254, -0.11002133786678314, 0.09495994448661804, 0.32984134554862976, -0.17630329728126526, -0.03819282352924347, -0.10061954706907272, -0.28162866830825806, 0.02089185267686844, 0.052479904145002365, 0.38705337047576904, -0.2633502185344696, -0.08473984152078629, -0.22629597783088684, -0.16858206689357758, 0.1126883402466774, -0.16526462137699127, -0.02379726991057396, -0.07919832319021225, 0.16009356081485748, -0.2880573868751526, -0.4020525813102722, 0.15603822469711304, 0.04847864434123039, 0.08648587763309479, -0.3399016857147217, -0.22384795546531677, 0.14059893786907196, -0.031247545033693314, -0.10895153880119324, -0.2577419579029083, -0.07821712642908096, 0.07222592830657959, -0.07042105495929718, 0.1242312490940094, -0.10819956660270691, 0.023589640855789185, -0.40172553062438965, 0.01630409061908722, 0.22896786034107208, -0.09890620410442352, 0.1438891589641571, -0.545931339263916, -0.007335461676120758, -0.23017944395542145, -0.12251830101013184, 0.07008402049541473, 0.02372046932578087, -0.24190738797187805, 0.22450987994670868, -0.29073795676231384, -0.023516975343227386, 0.02489433065056801, 0.3640679121017456, -0.013775442726910114, -0.1849903166294098, 0.17581328749656677, 0.04016183316707611, -0.27095261216163635, -0.05902494490146637, 0.11054160445928574, 0.2953474521636963, -0.6527202129364014, -0.11524525284767151, -0.1296258270740509, 0.028030365705490112, -0.1062554195523262, 0.08274303376674652, -0.05041569098830223, -0.14741787314414978, -0.11716040968894958, -0.22195592522621155, 0.00794246792793274, 0.6029164791107178, -0.18385113775730133, 0.31586953997612, -0.4445505142211914, 0.018497571349143982, 0.007782705128192902, 0.10199413448572159, -0.1925448179244995, 0.1599571406841278, -0.010425500571727753, 0.2076486498117447, -0.15758280456066132, -0.011689416132867336, 0.07965274900197983, -0.22995206713676453, -0.017523661255836487, 0.5403502583503723, -0.44679877161979675, 0.005302779376506805, -0.08500733971595764, 0.21602138876914978, 0.1556473970413208, 0.2448749840259552, -0.09868786484003067, -0.06456233561038971, -0.17375025153160095, -0.18645361065864563, 0.08797535300254822, 0.17378586530685425, -0.10450465232133865, -0.2742891311645508, 1.0547174215316772, -0.002583654597401619, 0.1269242912530899, 0.18479515612125397, 0.29174333810806274, 0.4902665913105011, -0.10285544395446777, -0.010780519805848598, -0.31645187735557556, 0.032278724014759064, -0.12217161059379578, 0.4873278737068176, 0.2836129665374756, -0.03364032134413719, 0.31593427062034607, 0.1558978259563446, -0.22166015207767487, -0.13508781790733337, 0.5815126299858093, 0.06800518184900284, -0.2587130665779114, -0.26989758014678955, -0.027631230652332306, 0.08966516703367233, 0.08672215789556503, -0.07884184271097183, 0.2226378321647644, -0.16690069437026978, 0.10425171256065369, 0.061242811381816864, 0.48143288493156433, 0.27097856998443604, -0.16616307199001312, 0.06115157902240753, 0.5885635018348694, -0.36953651905059814, -0.11367470026016235, 0.010885003954172134, 0.30751949548721313, 0.01650865562260151, 0.007654042914509773, 0.03490294888615608, 0.5215047597885132, 0.26955461502075195, -0.23365354537963867, 0.26376253366470337, 0.48317962884902954, -0.14676502346992493, 0.49246692657470703, -0.05804119259119034, -0.5187353491783142, 0.2664389908313751, 0.39616361260414124, 0.07477978616952896, 0.049809783697128296, 0.4289523959159851, 0.007637985050678253, -0.06607536971569061, -0.13189704716205597, 0.18949374556541443, 0.4096461832523346, 0.019117165356874466, 0.18450304865837097, -0.0653318241238594, -0.7341067790985107, -0.1870817244052887, -0.040051110088825226, -0.015054849907755852, 0.12625963985919952, 0.1048927754163742, 0.3892920911312103, 0.33135032653808594, 0.03721321001648903, 0.2988691031932831, 0.44180789589881897, -0.18363064527511597, 0.23109613358974457, 0.007757794111967087, -0.07665303349494934, 0.2829757034778595, -0.08339596539735794, 0.31504157185554504, -0.10392218828201294, -0.0796162411570549, 0.34228581190109253, -0.0601201169192791, -0.009730271995067596, 0.057996734976768494, 0.07157646864652634, 0.04718075320124626, -0.06535458564758301, 0.22787922620773315, 0.11961153894662857, -0.020226696506142616, -0.25705111026763916, 0.21003353595733643, -0.057886235415935516, -0.08056672662496567, 0.28389716148376465, -0.27066653966903687, -0.28567835688591003, 0.26129651069641113, -0.1897139698266983, -0.28550079464912415, 0.02351808175444603, -0.049956485629081726, -0.29693692922592163, 0.031102191656827927, 0.2631166875362396, -0.01607990264892578, -0.4073842763900757, 0.23959022760391235, 0.14081484079360962, 0.23075386881828308, 0.022144697606563568, -0.5427659749984741, -0.33948031067848206, 0.19241788983345032, 0.0025181742385029793, -0.2831650674343109, 0.4300992786884308, 0.06342611461877823, 0.1624535620212555, 0.06869454681873322, -0.0625951886177063, 0.030376233160495758, -0.39218634366989136, 0.18828527629375458, -0.4376370310783386, 0.2521434426307678, 0.4012206196784973, 0.0028333421796560287, -0.019775066524744034, 0.020692698657512665, 0.119569793343544, 0.1007298082113266, -0.06569862365722656, 0.06970451027154922, 0.039284706115722656, -0.16734939813613892, -0.25613927841186523, 0.31332993507385254, -0.1586790531873703, -0.03768941015005112, -0.264240562915802, 0.12477587908506393, -0.14620625972747803, -0.32897767424583435, -0.007028911262750626, -0.1673385202884674, -0.14829754829406738, 0.6470163464546204, -0.13411447405815125, -0.2115589827299118, -0.0582377165555954, 0.37265047430992126, -0.08057280629873276, -0.07213971018791199, -0.13957712054252625, 0.04473854601383209, -0.42118555307388306, 0.28058525919914246, 0.04410264641046524, -0.13251499831676483, 0.08260230720043182, 0.005235195159912109, -0.14514319598674774, -0.5377923846244812, 0.4720565676689148, 0.17525067925453186, -0.04281892254948616, 0.24965275824069977, 0.12514081597328186, 0.08115743845701218, 0.2195030152797699, -0.425714910030365, -0.158124178647995, 0.13076739013195038, 0.2545323669910431, -0.15688948333263397, 0.2724582254886627, 0.2809670567512512, -0.2457844316959381, -0.14524829387664795, -0.17930319905281067, 0.14811290800571442, 0.17722049355506897, -0.13082373142242432, -0.34832072257995605 ]
https://github.com/huggingface/datasets/issues/6359
Most likely, the data file inference logic is the problem here. You can run the following code to verify this: ```python import time from datasets.data_files import get_data_patterns start_time = time.time() get_data_patterns("/path/to/img_dir") end_time = time.time() print(f"Elapsed time: {end_time - start_time:.2f}s") ``` We plan to optimize this for the next version (or version after that). In the meantime, specifying the split patterns manually should give better performance: ```python ds = load_dataset("imagefolder", data_files={"train": "path/to/img_dir/train/**", ...}, split="train") ```
Stuck in "Resolving data files..."
### Describe the bug I have an image dataset with 300k images, the size of image is 768 * 768. When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part? From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes. ### Steps to reproduce the bug # Run following code two times dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train') ### Expected behavior Fast dataset building ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Huggingface_hub version: 0.17.3 - PyArrow version: 10.0.1 - Pandas version: 1.5.3
74
Stuck in "Resolving data files..." ### Describe the bug I have an image dataset with 300k images, the size of image is 768 * 768. When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part? From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes. ### Steps to reproduce the bug # Run following code two times dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train') ### Expected behavior Fast dataset building ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Huggingface_hub version: 0.17.3 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 Most likely, the data file inference logic is the problem here. You can run the following code to verify this: ```python import time from datasets.data_files import get_data_patterns start_time = time.time() get_data_patterns("/path/to/img_dir") end_time = time.time() print(f"Elapsed time: {end_time - start_time:.2f}s") ``` We plan to optimize this for the next version (or version after that). In the meantime, specifying the split patterns manually should give better performance: ```python ds = load_dataset("imagefolder", data_files={"train": "path/to/img_dir/train/**", ...}, split="train") ```
[ -0.23090443015098572, 0.04058697819709778, -0.10604532063007355, 0.36753690242767334, 0.2609904706478119, 0.13373884558677673, 0.34540820121765137, 0.47421953082084656, -0.10366508364677429, 0.11970315873622894, 0.16956403851509094, 0.3559846878051758, 0.1605689525604248, -0.18263012170791626, -0.4411311447620392, -0.22654663026332855, -0.0342274010181427, 0.07452916353940964, -0.00871254876255989, -0.11590547114610672, -0.20622707903385162, 0.023898644372820854, -0.16543778777122498, -0.26032137870788574, -0.711973249912262, -0.335965633392334, -0.06182316690683365, 0.06397896260023117, -0.2485315203666687, -0.2844299077987671, 0.12351904064416885, -0.043671492487192154, -0.0912167876958847, 0.3995298147201538, -0.00012005397002212703, -0.10184619575738907, 0.6070083975791931, 0.21350806951522827, -0.11404398083686829, 0.27869075536727905, -0.16903290152549744, -0.33051052689552307, 0.21836894750595093, -0.3753055930137634, 0.07773254811763763, -0.3076440989971161, -0.04188074171543121, -0.28979790210723877, 0.3883837163448334, -0.10235662758350372, 0.11232352256774902, -0.002246551215648651, -0.021347351372241974, -0.09620082378387451, -0.102491594851017, 0.16476014256477356, 0.051929011940956116, 0.44994184374809265, 0.10262256860733032, -0.25717592239379883, -0.0723772644996643, 0.3101365566253662, 0.02689080685377121, 0.2157067358493805, 0.20114359259605408, 0.2410944402217865, -0.012061350047588348, -0.42754030227661133, 0.019392745569348335, 0.038478802889585495, 0.29421448707580566, 0.22596147656440735, -0.21666184067726135, -0.5511650443077087, -0.11253851652145386, -0.14995279908180237, 0.10671497881412506, 0.1624489277601242, -0.15347054600715637, -0.05768723413348198, -0.013846166431903839, 0.015159569680690765, -0.011940628290176392, -0.06929139792919159, -0.18875771760940552, -0.12414366751909256, 0.07001768052577972, 0.2895854115486145, 0.23470577597618103, 0.08930885791778564, 0.08136212825775146, -0.32271382212638855, 0.1764153093099594, 0.17951682209968567, -0.6519597172737122, 0.13489235937595367, 0.0924617201089859, 0.18143248558044434, -0.0071671828627586365, 0.13475923240184784, -0.13285507261753082, -0.2630946636199951, -0.017411917448043823, -0.17481867969036102, 0.2644118666648865, 0.30203887820243835, -0.33563172817230225, 0.0977948009967804, 0.2762558162212372, -0.006550166755914688, -0.3559775650501251, 0.027686133980751038, -0.05158139765262604, -0.5366821885108948, -0.07338035106658936, -0.08227948844432831, 0.26825541257858276, -0.01700623333454132, -0.11084191501140594, -0.10098758339881897, -0.21259784698486328, -0.251058965921402, 0.13016732037067413, 0.1386137306690216, -0.28064751625061035, 0.42541781067848206, -0.0024666190147399902, -0.05150259658694267, -0.4346983730792999, 0.22116997838020325, -0.08405691385269165, -0.1852448582649231, -0.4179731011390686, -0.0860176682472229, 0.027111075818538666, -0.0741453617811203, -0.04770137369632721, 0.212259903550148, 0.010898074135184288, -0.1462528109550476, 0.170711487531662, -0.4683679938316345, -0.0747646689414978, 0.13060587644577026, -0.2104821503162384, 0.3133944869041443, -0.21411365270614624, 0.08926698565483093, -0.03160175681114197, 0.25993606448173523, -0.41348081827163696, -0.10319992154836655, -0.15460248291492462, 0.09507155418395996, -0.03791731968522072, 0.2817073464393616, -0.22440221905708313, -0.07180310785770416, 0.20046228170394897, 0.11461018025875092, -0.02084283158183098, -0.1531926989555359, 0.0016395226120948792, -0.2094210386276245, 0.24387797713279724, 0.31000787019729614, -0.28330886363983154, 0.4475516974925995, -0.34232181310653687, 0.17157253623008728, 0.16693651676177979, 0.4575904309749603, -0.21471479535102844, 0.38899606466293335, -0.4889916181564331, 0.1417202204465866, 0.03857773542404175, -0.13757261633872986, -0.5263123512268066, 0.292158305644989, -0.24747222661972046, 0.1368250846862793, 0.1956709623336792, 0.28233081102371216, 0.05536697804927826, -0.12429016083478928, -0.04112784564495087, 0.41119930148124695, -0.13345344364643097, -0.09428826719522476, -0.37949204444885254, -0.1419835090637207, -0.05927625671029091, 0.06696303188800812, -0.02929355762898922, 0.05180472880601883, 0.13025091588497162, -0.1935632824897766, 0.3743372857570648, -0.021718312054872513, 0.07308993488550186, 0.1458621323108673, 0.21564629673957825, 0.0947980284690857, 0.2853967845439911, 0.2131766378879547, -0.3773477375507355, 0.43015870451927185, 0.04397422820329666, -0.1695004254579544, -0.5222402811050415, -0.06904256343841553, -0.15600402653217316, -0.09970434010028839, -0.2588944137096405, 0.053049392998218536, -0.07409808039665222, 0.07900744676589966, 0.12865930795669556, 0.10634366422891617, 0.057532280683517456, 0.4595414400100708, -0.20573467016220093, 0.042716577649116516, -0.4387919008731842, 0.46270495653152466, 0.16562528908252716, -0.07946345210075378, -0.17642226815223694, -0.2738426923751831, -0.038842231035232544, -0.1930205374956131, -0.17072777450084686, 0.21515579521656036, 0.24503615498542786, 0.2855660915374756, 0.1650492250919342, 0.07608208060264587, 0.1026902049779892, -0.3493671715259552, 0.0971580445766449, -0.10299330949783325, 0.18877530097961426, -0.01677928864955902, -0.14560377597808838, 0.25989124178886414, -0.35123634338378906, 0.38549309968948364, 0.016389183700084686, -0.15739405155181885, 0.18530070781707764, -0.0760577917098999, 0.14609618484973907, 0.07744894176721573, 0.3481139540672302, 0.2724688649177551, 0.41811200976371765, 0.33735641837120056, -0.1907094419002533, 0.21518400311470032, 0.6262258291244507, -0.10818248242139816, -0.20877909660339355, 0.1926174908876419, 0.11888667196035385, 0.0027966201305389404, -0.009078951552510262, 0.4187195599079132, 0.5132099986076355, 0.24452757835388184, 0.10707490146160126, -0.0188630148768425, -0.1386474370956421, -0.15301793813705444, 0.13333848118782043, 0.11011537909507751, 0.5132681131362915, 0.2588520050048828, 0.08916477859020233, 0.06258249282836914, -0.22375744581222534, -0.13219928741455078, 0.1190866082906723, 0.22180943191051483, 0.05865873396396637, 0.23011943697929382, -0.317929744720459, -0.1220405250787735, -0.11783130466938019, 0.1264038383960724, -0.17323169112205505, -0.22341859340667725, -0.1924860179424286, -0.13852667808532715, 0.07587164640426636, 0.10092424601316452, -0.1427258849143982, 0.15457643568515778, 0.21845665574073792, -0.04681817442178726, -0.3119064271450043, -0.1524282544851303, -0.06528296321630478, -0.016968052834272385, 0.2341190129518509, 0.028154905885457993, 0.2851453125476837, -0.15211272239685059, 0.020418256521224976, -0.17084664106369019, -0.46946918964385986, 0.03271353244781494, -0.013448336161673069, 0.3969067335128784, 0.005802944302558899, 0.3065122365951538, 0.0637044608592987, -0.07415167987346649, 0.2928287386894226, 0.09807931631803513, -0.07664068788290024, -0.26933667063713074, 0.024465762078762054, 0.16101714968681335, -0.003944925963878632, -0.2544972598552704, -0.19756115972995758, -0.33092206716537476, 0.49949413537979126, -0.021412547677755356, 0.0405372679233551, 0.18950998783111572, 0.17897279560565948, 0.02966543659567833, -0.28667983412742615, -0.03271017596125603, -0.16023290157318115, -0.14464488625526428, 0.389242947101593, 0.03269711136817932, -0.13035036623477936, -0.2958361804485321, -0.2544007897377014, 0.07136406004428864, 0.13577322661876678, -0.4896753132343292, -0.2746129035949707, -0.6782143712043762, 0.2383597046136856, -0.23973830044269562, 0.1144062727689743, 0.07093321532011032, -0.0989486426115036, -0.14277341961860657, -0.1589478850364685, 0.20635497570037842, 0.14447273313999176, 0.04169706255197525, 0.09845878183841705, 0.239446759223938, 0.4252784848213196, 0.045968323945999146, 0.6054309010505676, 0.27212727069854736, -0.0253117848187685, 0.19882892072200775, -0.13274052739143372, 0.1507863998413086, -0.3659718632698059, -0.16869662702083588, 0.05170917138457298, -0.027405716478824615, -0.08361499756574631, -0.0744730532169342, 0.11399269104003906, 0.0032932981848716736, -0.03820222616195679, -0.031818222254514694, -0.260392427444458, -0.24861635267734528, 0.11419190466403961, -0.18479999899864197, 0.14525294303894043, 0.05831451714038849, -0.0017888545989990234, -0.009497508406639099, -0.0210074745118618, 0.06724043935537338, 0.014523066580295563, 0.3817491829395294, -0.11134355515241623, -0.010266147553920746, -0.26706522703170776, -0.1377701759338379, 0.17184151709079742, 0.18196386098861694, 0.06682398170232773, 0.11077617108821869, -0.03854475915431976, 0.4113517999649048, -0.15770211815834045, 1.0478551387786865, 0.24542996287345886, 0.041651926934719086, -0.12339772284030914, -0.10224724560976028, -0.2411498725414276, 0.02202364057302475, 0.11188304424285889, 0.10104553401470184, -0.20019760727882385, 0.41964060068130493, -0.3013349771499634, -0.16067928075790405, 0.0757555216550827, 0.40906280279159546, -0.1529076099395752, -0.202946737408638, -0.27248093485832214, -0.18397432565689087, -0.19620944559574127, 0.023117665201425552, 0.05956748127937317, 0.07454659044742584, -0.11752668023109436, -0.29961538314819336, -0.4245092570781708, -0.18272146582603455, -0.11121271550655365, 0.07161172479391098, 0.4204932153224945, -0.24601824581623077, 0.4659016728401184, 0.3306410312652588, 0.15791204571723938, 0.26040026545524597, 0.681774914264679, -0.15621836483478546, -0.05067727342247963, 0.14898435771465302, -0.11310746520757675, 0.22305142879486084, 0.34339529275894165, -0.3720115125179291, -0.1360558122396469, -0.1993672102689743, 0.2492671012878418, -0.4945952594280243, 0.1418548971414566, 0.6770868301391602, 0.18081878125667572, -0.33097514510154724, -0.3430599570274353, 0.48414093255996704, 0.2176532745361328, -0.16477733850479126, 0.5786494016647339, 0.12789729237556458, 0.02182774245738983, -0.055228251963853836, -0.07082763314247131, 0.9730104804039001, -0.0552821084856987, 0.10568786412477493, 0.029024280607700348, -0.187863290309906, 0.43236443400382996, 0.03904428333044052, 0.23311662673950195, -0.1452806144952774, -0.1352575421333313, 0.14775779843330383, -0.27260956168174744, 0.07463639974594116, 0.29483792185783386, 0.23136895895004272, 0.11130215227603912, -0.2289242148399353, -0.156311497092247, -0.2569423317909241, 0.3321755528450012, -0.10360438376665115, -0.013364852406084538, -0.22946763038635254, 0.014059171080589294, 0.06014872342348099, 0.015809383243322372, 0.027191180735826492, 0.053957726806402206, -0.19819384813308716, -0.13137593865394592, 0.17127040028572083, 0.07817985117435455, -0.17164912819862366, 0.25788235664367676, -0.19308075308799744, -0.4212975800037384, -0.08047166466712952, 0.10964035987854004, -0.4267725348472595, -0.0217642392963171, 0.10711640119552612, 0.5851554870605469, -0.00014179199934005737, 0.2023504376411438, 0.21113675832748413, -0.3270692527294159, 0.2968081831932068, 0.06233204901218414, 0.020190641283988953, -0.4918774962425232, -0.3771527111530304, -0.1167244166135788, -0.11582417786121368, 0.3547671139240265, 0.05459682643413544, 0.20282314717769623, -0.2224101722240448, -0.020362641662359238, -0.10603396594524384, -0.03413066267967224, 0.11124805361032486, 0.2635948061943054, 0.08357912302017212, 0.6496148705482483, -0.0808856338262558, -0.3978613018989563, 0.023765746504068375, 0.25558435916900635, 0.23375433683395386, 0.06303620338439941, 0.40153768658638, 0.09522153437137604, -0.28143253922462463, -0.07536844164133072, -0.015391401946544647, -0.007592648267745972, -0.9301789999008179, 0.4300950765609741, -0.03428635746240616, 0.3190179765224457, 0.07615549862384796, -0.29344144463539124, 0.04632792994379997, -0.3828357458114624, -0.25275805592536926, -0.31449344754219055, -0.1495244801044464, 0.2782602310180664, -0.3067586421966553, 0.24279358983039856, -0.04809556528925896, 0.027753274887800217, 0.07742461562156677, 0.08447745442390442, -0.21197223663330078, 0.3028815686702728, -0.16135409474372864, 0.23621900379657745, -0.14972451329231262, -0.14463379979133606, 0.19371259212493896, -0.0018127113580703735, 0.1279774308204651, 0.22406817972660065, 0.05974449962377548, -0.18386487662792206, -0.07247217744588852, 0.1783529371023178, -0.20934349298477173, -0.04004649817943573, 0.24930599331855774, -0.4766963720321655, -0.19322273135185242, -0.027461737394332886, 0.07347351312637329, -0.04210133105516434, 0.02053861692547798, -0.46085262298583984, 0.20725888013839722, -0.23896971344947815, -0.004782155156135559, 0.3772307336330414, -0.31494179368019104, 0.3656492233276367, 0.27422863245010376, 0.1826036274433136, -0.04614279791712761, 0.03763379156589508, -0.2835734784603119, -0.13889770209789276, 0.08913250267505646, -0.2712779641151428, 0.26288115978240967, -0.10633683204650879, -0.08732084929943085, -0.23454804718494415, 0.5475298166275024, 0.4386799931526184, 0.041010718792676926, -0.20423778891563416, 0.10671159625053406, 0.12073688954114914, -0.2699934244155884, -0.0920286476612091, 0.0776483416557312, 0.0019306428730487823, 0.08931635320186615, 0.00995367020368576, 0.16259117424488068, 0.3890688121318817, -0.44743406772613525, -0.052728526294231415, 0.3109273612499237, 0.02026500552892685, 0.10918007791042328, 0.5991325974464417, 0.2890470027923584, -0.12649980187416077, 0.41631102561950684, 0.0205695778131485, 0.13122881948947906, 0.6117175817489624, -0.21641004085540771, 0.2429933398962021, 0.06845523416996002, 0.35654327273368835, 0.030755145475268364, -0.25208449363708496, -0.09317801892757416, 0.20886093378067017, -0.36135274171829224, -0.0639045238494873, -0.13339629769325256, 0.45007216930389404, -0.033034369349479675, -0.12893763184547424, -0.16948668658733368, 0.43029940128326416, -0.03463225066661835, -0.014755800366401672, 0.09606100618839264, -0.2455240935087204, -0.19754323363304138, 0.0872604176402092, -0.03238983824849129, -0.05951538309454918, 0.2774786651134491, 0.2919331192970276, 0.10097561776638031, -0.3043927848339081, 0.0033715907484292984, -0.022989686578512192, 0.5397710800170898, -0.2190060317516327, 0.28130900859832764, 0.23448731005191803, -0.07289008796215057, 0.04213452711701393, 0.35059699416160583, 0.3573850691318512, 0.3239576518535614, -0.07387363910675049, -0.12478023022413254, 0.17770341038703918, 0.08804544806480408, -0.053282544016838074, 0.36068016290664673, 0.017157400026917458, -0.08486530929803848, 0.1682721972465515, 0.04238542169332504, -0.24556469917297363, -0.21126332879066467, -0.05942658334970474, 0.20599615573883057, -0.29475224018096924, 0.21112370491027832, -0.24875909090042114, -0.030126184225082397, -0.22351300716400146, 0.15266969799995422, -0.809660792350769, -0.24030925333499908, 0.39725688099861145, -0.42019766569137573, -0.170331209897995, -0.10279496014118195, 0.04488625377416611, -0.5966681838035583, 0.5693639516830444, 0.14848239719867706, 0.5265018343925476, -0.197369784116745, -0.23995307087898254, -0.6433257460594177, -0.19298885762691498, -0.18936868011951447, 0.07408283650875092, 0.07706312090158463, 0.25675177574157715, -0.20998036861419678, 0.04242100566625595, 0.6207962036132812, -0.06773585826158524, 0.16190466284751892, 0.3361010253429413, -0.314472496509552, -0.032566942274570465, -0.16300068795681, -0.18007907271385193, -0.14807894825935364, -0.4495038390159607, 0.12550558149814606, -0.09436352550983429, -0.015453286468982697, 0.12237420678138733, -0.08182434737682343, 0.32465845346450806, 0.19499510526657104, 0.5045993328094482, 0.2835102677345276, 0.3174019753932953, 0.1119985431432724, -0.16346481442451477, -0.1163427084684372, -0.20079980790615082, 0.08864209055900574, 0.10660305619239807, 0.1808091402053833, 0.276284784078598, -0.2154155820608139, 0.08387741446495056, -0.21363338828086853, -0.13751620054244995, -0.15018099546432495, 0.08090098202228546, -0.18604201078414917, -0.1791379749774933, -0.26441776752471924, 0.28184884786605835, 0.09235897660255432, 0.3794262409210205, 0.17964401841163635, 0.04484561085700989, -0.3098710775375366, -0.4223339557647705, 0.5335380434989929, -0.2253030389547348, -0.34167101979255676, 0.228244349360466, 0.10243912041187286, 0.08393381536006927, 0.13262242078781128, -0.11903281509876251, -0.04238748550415039, 0.4373946785926819, -0.040029384195804596, -0.027073755860328674, 0.26558324694633484, 0.08775076270103455, -0.009764641523361206, 0.02257843315601349, -0.02985592558979988, 0.012563841417431831, -0.014488071203231812, 0.08814004063606262, -0.10598059743642807 ]
https://github.com/huggingface/datasets/issues/6359
Hi, @mariosasko, you are right; data file inference logic is extremely slow. I have done a similar test, that is I modify the source code of datasets/load.py to measure the cost of two suspicious operations: ```python def get_module(self) -> DatasetModule: base_path = Path(self.data_dir or "").expanduser().resolve().as_posix() start = time.time() patterns = sanitize_patterns(self.data_files) if self.data_files is not None else get_data_patterns(base_path) print(f"patterns: {time.time() - start}") start = time.time() data_files = DataFilesDict.from_patterns( patterns, download_config=self.download_config, base_path=base_path, ) print(f"data_files: {time.time() - start}") ``` It gaves: patterns: 3062.2050700187683 data_files: 413.9576675891876 Thus, these two operations contribute to almost all of load time. What's going on in them?
Stuck in "Resolving data files..."
### Describe the bug I have an image dataset with 300k images, the size of image is 768 * 768. When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part? From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes. ### Steps to reproduce the bug # Run following code two times dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train') ### Expected behavior Fast dataset building ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Huggingface_hub version: 0.17.3 - PyArrow version: 10.0.1 - Pandas version: 1.5.3
99
Stuck in "Resolving data files..." ### Describe the bug I have an image dataset with 300k images, the size of image is 768 * 768. When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part? From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes. ### Steps to reproduce the bug # Run following code two times dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train') ### Expected behavior Fast dataset building ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Huggingface_hub version: 0.17.3 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 Hi, @mariosasko, you are right; data file inference logic is extremely slow. I have done a similar test, that is I modify the source code of datasets/load.py to measure the cost of two suspicious operations: ```python def get_module(self) -> DatasetModule: base_path = Path(self.data_dir or "").expanduser().resolve().as_posix() start = time.time() patterns = sanitize_patterns(self.data_files) if self.data_files is not None else get_data_patterns(base_path) print(f"patterns: {time.time() - start}") start = time.time() data_files = DataFilesDict.from_patterns( patterns, download_config=self.download_config, base_path=base_path, ) print(f"data_files: {time.time() - start}") ``` It gaves: patterns: 3062.2050700187683 data_files: 413.9576675891876 Thus, these two operations contribute to almost all of load time. What's going on in them?
[ -0.2094925194978714, 0.1629522740840912, -0.089963898062706, 0.4162213206291199, 0.14655184745788574, 0.10716225951910019, 0.2901347577571869, 0.44508206844329834, -0.08686953037977219, 0.10743442177772522, 0.11540091037750244, 0.3833844065666199, 0.20739655196666718, -0.2878902554512024, -0.39628279209136963, -0.11655579507350922, -0.013868242502212524, 0.005139969289302826, -0.050784409046173096, -0.11281504482030869, -0.21594387292861938, 0.03769700229167938, -0.20382384955883026, -0.2222166508436203, -0.611744225025177, -0.34641551971435547, -0.02440783753991127, 0.05006609112024307, -0.32104191184043884, -0.3412132263183594, 0.1369764506816864, 0.041445739567279816, -0.13968397676944733, 0.4793086647987366, -0.0001229946647072211, -0.15869194269180298, 0.5912115573883057, 0.23773978650569916, -0.1271430253982544, 0.2577856779098511, -0.10645986348390579, -0.28866589069366455, 0.18851825594902039, -0.3478480279445648, 0.1018664538860321, -0.32262033224105835, -0.03909876197576523, -0.29301536083221436, 0.27460142970085144, -0.02501610293984413, 0.07332301139831543, -0.0034426897764205933, -0.021145500242710114, -0.07201696932315826, -0.1166241317987442, 0.18206654489040375, 0.09811437129974365, 0.5111780166625977, 0.15510518848896027, -0.24799644947052002, -0.04601223021745682, 0.2543178200721741, -0.004233069717884064, 0.19744649529457092, 0.16069108247756958, 0.17756254971027374, 0.07244715094566345, -0.4220150113105774, 0.008288092911243439, 0.10576595366001129, 0.3258567154407501, 0.17824819684028625, -0.2655809223651886, -0.49072617292404175, -0.09992635250091553, -0.09138529747724533, 0.13138547539710999, 0.13010728359222412, -0.27504828572273254, -0.03551441803574562, 0.020109374076128006, -0.02188972756266594, -0.050680771470069885, -0.0937662124633789, -0.1381060928106308, -0.1357584297657013, 0.028947066515684128, 0.22164684534072876, 0.21236909925937653, 0.11828570067882538, 0.10832537710666656, -0.42896008491516113, 0.20379270613193512, 0.21662992238998413, -0.7254019975662231, 0.12578445672988892, 0.1905992031097412, 0.20797576010227203, 0.04812435060739517, 0.08103053271770477, -0.07660534232854843, -0.2291571944952011, -0.06501155346632004, -0.14857444167137146, 0.2252311408519745, 0.2980128526687622, -0.41802674531936646, 0.11471743136644363, 0.3094848096370697, 0.09345521777868271, -0.25219088792800903, 0.024038419127464294, -0.09820618480443954, -0.5158841013908386, -0.020047105848789215, -0.09309835731983185, 0.3618732690811157, -0.10850277543067932, -0.21396371722221375, -0.06788381189107895, -0.2206505686044693, -0.23860524594783783, 0.2167205810546875, 0.1416567862033844, -0.3600967526435852, 0.48063895106315613, 0.022584721446037292, -0.057595834136009216, -0.35357916355133057, 0.2514945864677429, -0.06928695738315582, -0.15187916159629822, -0.3994751572608948, -0.0327611081302166, 0.07096274197101593, -0.009385045617818832, -0.09488734602928162, 0.20959287881851196, 0.003823503851890564, -0.1466888189315796, 0.18055079877376556, -0.5145643949508667, -0.020280983299016953, 0.06482473015785217, -0.3342626392841339, 0.278615802526474, -0.1752229481935501, 0.08635151386260986, -0.006033740937709808, 0.21423238515853882, -0.4509947597980499, -0.03704829514026642, -0.11925862729549408, 0.09146878123283386, -0.14170971512794495, 0.27094829082489014, -0.3409862816333771, 0.028876934200525284, 0.11389435827732086, 0.07260456681251526, -0.051699038594961166, -0.1908552646636963, 0.010446973145008087, -0.1563405692577362, 0.33311957120895386, 0.4043973982334137, -0.3675020933151245, 0.4624007046222687, -0.3328593373298645, 0.12178388983011246, 0.16661402583122253, 0.45550549030303955, -0.23396055400371552, 0.48527517914772034, -0.5367375016212463, 0.1322002112865448, 0.10822322964668274, -0.2203226089477539, -0.5336210131645203, 0.3336099684238434, -0.23097962141036987, 0.19363194704055786, 0.20264941453933716, 0.2582694888114929, -0.005672834813594818, -0.18245039880275726, -0.030144166201353073, 0.33527785539627075, -0.07138940691947937, -0.07813433557748795, -0.3761700391769409, -0.1338074654340744, -0.001960163004696369, 0.04126770794391632, -0.09267596900463104, 0.08792401850223541, 0.15659180283546448, -0.2355213314294815, 0.4188210368156433, -0.0196812953799963, -0.05269022658467293, 0.08236387372016907, 0.29992038011550903, 0.0598621591925621, 0.2851828634738922, 0.13919369876384735, -0.30444979667663574, 0.407102108001709, 0.035010598599910736, -0.22726128995418549, -0.5086089372634888, -0.06751542538404465, -0.13550660014152527, -0.03972029313445091, -0.28525543212890625, 0.07435165345668793, -0.06357879936695099, 0.05560979247093201, 0.12923745810985565, 0.09712466597557068, 0.08839349448680878, 0.4598182737827301, -0.30924350023269653, -0.0245037954300642, -0.427768349647522, 0.3546275198459625, 0.17243175208568573, 0.012155979871749878, -0.1654607057571411, -0.35022416710853577, -0.1288217008113861, -0.21245791018009186, -0.19249098002910614, 0.18110108375549316, 0.2907021641731262, 0.28204187750816345, 0.23880666494369507, 0.12940119206905365, 0.01673303358256817, -0.35527393221855164, 0.06329453736543655, -0.09592297673225403, 0.29812487959861755, -0.02315659075975418, -0.10596445202827454, 0.24149607121944427, -0.3584692180156708, 0.3478786051273346, 0.019776783883571625, -0.2363314926624298, 0.23901766538619995, 0.011920526623725891, 0.1365220695734024, 0.11331537365913391, 0.40714114904403687, 0.3378542959690094, 0.49793437123298645, 0.31086334586143494, -0.2086910903453827, 0.10323397070169449, 0.4732376039028168, -0.11724744737148285, -0.22272278368473053, 0.2019157111644745, 0.15279802680015564, -0.03438922017812729, -0.02018832601606846, 0.44925951957702637, 0.6243920922279358, 0.20138812065124512, 0.14470723271369934, 0.015114052221179008, -0.1507490575313568, -0.20578674972057343, 0.11841675639152527, 0.13337835669517517, 0.47785472869873047, 0.2325393408536911, 0.0949857234954834, 0.1190372109413147, -0.2311711609363556, -0.14209216833114624, 0.14600223302841187, 0.18958640098571777, -0.03087010234594345, 0.2789653241634369, -0.24072910845279694, -0.1191953718662262, -0.12595956027507782, 0.20841355621814728, -0.021339353173971176, -0.2445119023323059, -0.2325955033302307, -0.12197290360927582, 0.15183643996715546, 0.01637272909283638, -0.2412985861301422, 0.1808520406484604, 0.16917458176612854, -0.11172176152467728, -0.3398061692714691, -0.13137847185134888, -0.07619285583496094, -0.0270527470856905, 0.309993714094162, 0.047288186848163605, 0.2741278111934662, -0.1595197468996048, -0.019430186599493027, -0.20464074611663818, -0.5482084155082703, 0.004620618186891079, 0.04710126295685768, 0.4545539319515228, 0.11710968613624573, 0.22969216108322144, 0.07538390159606934, -0.012635484337806702, 0.21643206477165222, 0.0819847509264946, -0.1316002905368805, -0.21266159415245056, -0.0572662428021431, 0.07325034588575363, 0.03669296205043793, -0.28315138816833496, -0.2570446729660034, -0.28116852045059204, 0.4669197201728821, 0.0378936305642128, 0.0051779672503471375, 0.26051783561706543, 0.10285542905330658, 0.10893194377422333, -0.24541397392749786, 0.05463762581348419, -0.1545550674200058, -0.19840684533119202, 0.3685292601585388, 0.09340102970600128, -0.1855842024087906, -0.3252103924751282, -0.20648223161697388, 0.11899098008871078, 0.13173404335975647, -0.5061678290367126, -0.31450513005256653, -0.6455522775650024, 0.2665523588657379, -0.21252714097499847, 0.085415780544281, 0.10959689319133759, -0.0495586059987545, -0.11734940111637115, -0.1292807161808014, 0.19440409541130066, 0.1712019294500351, -0.017240114510059357, 0.06989063322544098, 0.22243911027908325, 0.4133140742778778, 0.08144378662109375, 0.47589021921157837, 0.31029021739959717, -0.07376890629529953, 0.21255432069301605, -0.06127701699733734, 0.24578948318958282, -0.2906530499458313, -0.14306852221488953, 0.019053656607866287, -0.029012449085712433, -0.17184874415397644, -0.15000803768634796, 0.026392463594675064, -0.0002973824739456177, -0.054778192192316055, -0.006947673857212067, -0.26179933547973633, -0.23495686054229736, 0.05471169203519821, -0.37396153807640076, 0.10046930611133575, 0.08383969962596893, 0.0058119893074035645, -0.08766467869281769, -0.04221035912632942, 0.11731097847223282, 0.07173509895801544, 0.42587029933929443, -0.13292258977890015, -0.09381134808063507, -0.2815415859222412, -0.15528780221939087, 0.17876087129116058, 0.08228380233049393, 0.1575174778699875, 0.08495276421308517, 0.018054597079753876, 0.3831409215927124, -0.20000244677066803, 0.9773474335670471, 0.26370301842689514, 0.047401588410139084, -0.0831366553902626, -0.09715510159730911, -0.2880236804485321, -0.00864286720752716, -0.054697416722774506, 0.060153648257255554, -0.28349214792251587, 0.425592303276062, -0.2770009934902191, -0.14869463443756104, 0.06453271210193634, 0.49090439081192017, -0.12854638695716858, -0.23616454005241394, -0.26541948318481445, -0.1718023419380188, -0.13159500062465668, 0.046430133283138275, -0.025350134819746017, 0.052618298679590225, -0.13945508003234863, -0.2574288845062256, -0.41192737221717834, -0.00458216667175293, 0.02058648318052292, 0.1724783480167389, 0.3362328112125397, -0.24540559947490692, 0.47664105892181396, 0.3147246539592743, 0.10926522314548492, 0.29367387294769287, 0.6230279803276062, -0.085389643907547, -0.10429070889949799, 0.05733804032206535, -0.014110598713159561, 0.2076285481452942, 0.2927759289741516, -0.44169238209724426, -0.15053841471672058, -0.1669100970029831, 0.14142745733261108, -0.44898951053619385, 0.18874672055244446, 0.7713823318481445, 0.28446394205093384, -0.32113349437713623, -0.3231823146343231, 0.5059003233909607, 0.27365073561668396, -0.2517441511154175, 0.6232333779335022, 0.06321573257446289, -0.011567281559109688, -0.07192442566156387, -0.08461588621139526, 0.9465612173080444, -0.036117058247327805, 0.06166378781199455, 0.11916560679674149, -0.1607699990272522, 0.4477889835834503, 0.09859903156757355, 0.14693373441696167, -0.09960995614528656, -0.17551811039447784, 0.14993953704833984, -0.2965991497039795, 0.11097274720668793, 0.3184380531311035, 0.18284884095191956, 0.13481397926807404, -0.28690099716186523, -0.1946117877960205, -0.16522309184074402, 0.34085333347320557, -0.0035332180559635162, 0.0222790464758873, -0.26220232248306274, 0.016300018876791, 0.08247227966785431, 0.008937034755945206, -0.015407733619213104, 0.0012117885053157806, -0.25167906284332275, -0.0655987560749054, 0.1666542887687683, 0.185970276594162, -0.15983296930789948, 0.2986655831336975, -0.12703239917755127, -0.28810399770736694, -0.011527225375175476, 0.20209495723247528, -0.38095104694366455, 0.07415568828582764, 0.019602885469794273, 0.5213981866836548, -0.08665281534194946, 0.24937719106674194, 0.35678574442863464, -0.35198163986206055, 0.32546451687812805, 0.04809676855802536, -0.04468122124671936, -0.4226921796798706, -0.3788914084434509, -0.09269936382770538, -0.029339030385017395, 0.2993137538433075, 0.19024839997291565, 0.2524878978729248, -0.3063676953315735, -0.03094765543937683, -0.21774615347385406, 0.02812344580888748, 0.09234611690044403, 0.33689507842063904, 0.02261263132095337, 0.681831955909729, -0.036197636276483536, -0.46325692534446716, 0.0858733057975769, 0.2686866223812103, 0.13248981535434723, 0.04737076908349991, 0.4687422811985016, 0.0069899484515190125, -0.2740408778190613, -0.06157489866018295, -0.03643910586833954, -0.07017684727907181, -0.8601499199867249, 0.32331493496894836, 0.060050517320632935, 0.30962616205215454, 0.08412747085094452, -0.2945559322834015, 0.08362973481416702, -0.3643624782562256, -0.30638587474823, -0.3618013858795166, -0.15120038390159607, 0.2186315357685089, -0.30525481700897217, 0.22690114378929138, -0.05230032280087471, -0.06285326182842255, 0.007725909352302551, 0.0644686296582222, -0.1920851469039917, 0.30319035053253174, -0.19706863164901733, 0.2237587571144104, -0.08376912772655487, -0.10332317650318146, 0.1548405885696411, -0.07521536201238632, 0.12476683408021927, 0.15490011870861053, 0.05238163471221924, -0.15863782167434692, -0.028876982629299164, 0.19840659201145172, -0.20909807085990906, -0.0512734092772007, 0.30100709199905396, -0.4795054793357849, -0.20306238532066345, -0.028610307723283768, 0.006813213229179382, -0.036173976957798004, 0.008366834372282028, -0.3729020059108734, 0.14341598749160767, -0.23692338168621063, -0.012348100543022156, 0.46067753434181213, -0.34657981991767883, 0.26994267106056213, 0.17809033393859863, 0.21199144423007965, -0.04081092029809952, 0.0005682706832885742, -0.35399478673934937, -0.0527268685400486, 0.08086318522691727, -0.2145497351884842, 0.2914913594722748, -0.05108753964304924, 0.01140826940536499, -0.20585867762565613, 0.45735880732536316, 0.5261531472206116, 0.10148686170578003, -0.22252362966537476, 0.09583340585231781, 0.08325052261352539, -0.26067325472831726, -0.09379500150680542, 0.08715403079986572, -0.023559732362627983, 0.10652841627597809, -0.014911666512489319, 0.1692965030670166, 0.3469264507293701, -0.35278424620628357, -0.14194682240486145, 0.31281155347824097, -0.01030108891427517, 0.09086258709430695, 0.5904861092567444, 0.2760416269302368, -0.1371862143278122, 0.42974188923835754, 0.04087602719664574, 0.12101899832487106, 0.5858055353164673, -0.19864845275878906, 0.20634303987026215, 0.08488891273736954, 0.37210845947265625, 0.03901861608028412, -0.24420949816703796, 0.043149128556251526, 0.27525773644447327, -0.38884085416793823, -0.06547003984451294, -0.09014628827571869, 0.3688106834888458, -0.041408006101846695, -0.07448844611644745, -0.1596800535917282, 0.40042632818222046, -0.022825395688414574, -0.031027110293507576, 0.039734236896038055, -0.22675243020057678, -0.0899634137749672, -0.04981248080730438, -0.06877394020557404, -0.024668686091899872, 0.23556281626224518, 0.2684391736984253, 0.05621808022260666, -0.30321624875068665, -0.020882096141576767, 0.0388139970600605, 0.5300312042236328, -0.210053950548172, 0.2641354203224182, 0.1860799342393875, -0.017964612692594528, 0.0771518349647522, 0.49110907316207886, 0.4003022611141205, 0.3849012851715088, -0.019407574087381363, -0.09329624474048615, 0.12086506187915802, 0.0429382398724556, -0.03189340978860855, 0.34263283014297485, -0.02774578332901001, -0.1418054699897766, 0.20110608637332916, 0.01170755922794342, -0.20335908234119415, -0.21120430529117584, -0.049728427082300186, 0.19092079997062683, -0.3562958240509033, 0.2447528839111328, -0.22633036971092224, -0.045050762593746185, -0.2571479380130768, 0.20790892839431763, -0.7587074041366577, -0.19402199983596802, 0.4531528055667877, -0.4210848808288574, -0.14526352286338806, -0.050021491944789886, 0.04546680301427841, -0.571986198425293, 0.5240820646286011, 0.19667235016822815, 0.5628744959831238, -0.19198936223983765, -0.12095780670642853, -0.7582280039787292, -0.1684539020061493, -0.09315476566553116, 0.040991321206092834, 0.07415938377380371, 0.21204999089241028, -0.13001807034015656, 0.13096851110458374, 0.5204953551292419, -0.09198866784572601, 0.09247519075870514, 0.3112131357192993, -0.32224830985069275, -0.010361003689467907, -0.1861044317483902, -0.16430051624774933, -0.1914207935333252, -0.4603360891342163, 0.11629555374383926, -0.12275224179029465, -0.03872313350439072, 0.13857416808605194, -0.010289929807186127, 0.2604748606681824, 0.31920385360717773, 0.5272156596183777, 0.30938926339149475, 0.40255582332611084, 0.10279048979282379, -0.15450212359428406, -0.10631783306598663, -0.1720932573080063, 0.09078606963157654, 0.1582680642604828, 0.05955006182193756, 0.10668109357357025, -0.13993608951568604, 0.026325292885303497, -0.13870126008987427, -0.15559712052345276, -0.18061040341854095, -0.051898956298828125, -0.2708401679992676, -0.19216755032539368, -0.2662893533706665, 0.3442854881286621, 0.08193215727806091, 0.29752489924430847, 0.18359583616256714, 0.04237119108438492, -0.31449753046035767, -0.3792805075645447, 0.5180898308753967, -0.19735562801361084, -0.23175139725208282, 0.11801177263259888, 0.20715898275375366, 0.002619253471493721, 0.09498248994350433, -0.10027521848678589, 0.011156141757965088, 0.5136117935180664, -0.10534109175205231, -0.03097124770283699, 0.31702160835266113, 0.04014023393392563, 0.07110348343849182, -0.01643303781747818, -0.046680327504873276, -0.12283596396446228, 0.03024473786354065, 0.03206591308116913, -0.08501505851745605 ]
https://github.com/huggingface/datasets/issues/6359
Furthermore, what's my current workaround about this problem? Should I save it by `save_to_disk()` and load dataset through `load_from_disk`?
Stuck in "Resolving data files..."
### Describe the bug I have an image dataset with 300k images, the size of image is 768 * 768. When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part? From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes. ### Steps to reproduce the bug # Run following code two times dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train') ### Expected behavior Fast dataset building ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Huggingface_hub version: 0.17.3 - PyArrow version: 10.0.1 - Pandas version: 1.5.3
19
Stuck in "Resolving data files..." ### Describe the bug I have an image dataset with 300k images, the size of image is 768 * 768. When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part? From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes. ### Steps to reproduce the bug # Run following code two times dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train') ### Expected behavior Fast dataset building ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Huggingface_hub version: 0.17.3 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 Furthermore, what's my current workaround about this problem? Should I save it by `save_to_disk()` and load dataset through `load_from_disk`?
[ -0.2394724190235138, -0.006858140230178833, -0.12425383925437927, 0.3820543885231018, 0.29293784499168396, 0.18949246406555176, 0.26252657175064087, 0.40455177426338196, -0.054701972752809525, 0.03535822778940201, 0.22675317525863647, 0.3705781102180481, 0.1320250928401947, -0.19226327538490295, -0.3468713164329529, -0.1804599016904831, -0.01867656409740448, 0.064511239528656, -0.04870171844959259, -0.098343625664711, -0.23375354707241058, 0.028679078444838524, -0.15968088805675507, -0.25327086448669434, -0.6265920996665955, -0.3732426166534424, -0.01541859284043312, 0.02753882110118866, -0.2139650285243988, -0.3309679329395294, 0.15030589699745178, -0.036348745226860046, -0.05960901081562042, 0.4522698223590851, -0.0001208437024615705, -0.08694524317979813, 0.6055527925491333, 0.17588679492473602, -0.12049093842506409, 0.2233835607767105, -0.1969098448753357, -0.3771301507949829, 0.1954176276922226, -0.4027359187602997, 0.12486406415700912, -0.30133694410324097, 0.002343691885471344, -0.3555251955986023, 0.3355594873428345, -0.10554419457912445, 0.12480427324771881, 0.015776604413986206, 0.05658097565174103, -0.049104511737823486, -0.12958261370658875, 0.12098012864589691, 0.04736175388097763, 0.4413205087184906, 0.08117125928401947, -0.13970330357551575, -0.03273206949234009, 0.32418161630630493, 0.08318370580673218, 0.14642034471035004, 0.2317330241203308, 0.17053890228271484, -0.053895022720098495, -0.43019944429397583, 0.020352603867650032, -0.008467288687825203, 0.42840564250946045, 0.134691521525383, -0.26766330003738403, -0.4477693438529968, -0.029112759977579117, -0.137978658080101, 0.1456121802330017, 0.1950904279947281, -0.170247882604599, -0.10595670342445374, -0.08655253052711487, -0.12477613985538483, -0.07764684408903122, -0.07689807564020157, -0.08237382024526596, -0.21415382623672485, 0.01511560007929802, 0.30375948548316956, 0.26409825682640076, 0.043775223195552826, 0.16177019476890564, -0.26419124007225037, 0.1937572956085205, 0.24413514137268066, -0.6244086623191833, 0.1740427315235138, -0.006277615204453468, 0.14234130084514618, 0.10321705043315887, 0.02269483357667923, -0.10899024456739426, -0.2867080867290497, -0.07162376493215561, -0.1457267701625824, 0.21204762160778046, 0.3520945906639099, -0.23121841251850128, 0.07522940635681152, 0.3356209993362427, -0.02741631492972374, -0.32576069235801697, 0.0005160998553037643, -0.1072084829211235, -0.47686439752578735, 0.013852216303348541, -0.09193739295005798, 0.24888737499713898, -0.04189365357160568, -0.002060629427433014, -0.041934408247470856, -0.07951308786869049, -0.2580530643463135, 0.07062346488237381, 0.15214668214321136, -0.22646833956241608, 0.3989834487438202, -0.01709621399641037, -0.10612146556377411, -0.3363511562347412, 0.3053285479545593, -0.031587932258844376, -0.20908868312835693, -0.36088597774505615, -0.12096518278121948, 0.010170049965381622, -0.14969795942306519, 0.043604761362075806, 0.19487908482551575, -0.028159085661172867, -0.10026490688323975, 0.20586316287517548, -0.3928278982639313, -0.13833391666412354, 0.16582056879997253, -0.140414297580719, 0.3058308959007263, -0.23244816064834595, 0.09173975884914398, 0.01136218011379242, 0.32500016689300537, -0.3512263894081116, -0.08511915802955627, -0.16501536965370178, 0.09569299221038818, 0.009207509458065033, 0.288169801235199, -0.23679834604263306, -0.17724600434303284, 0.1871703714132309, 0.02455233782529831, 0.05922093242406845, -0.11232183873653412, 0.0351775661110878, -0.22558659315109253, 0.18216630816459656, 0.28298652172088623, -0.2597607374191284, 0.41889703273773193, -0.2872770428657532, 0.08310412615537643, 0.12976914644241333, 0.35961514711380005, -0.14174334704875946, 0.3554653227329254, -0.5331935286521912, -0.016421601176261902, 0.08907614648342133, -0.24441155791282654, -0.6119126081466675, 0.32600605487823486, -0.18878847360610962, 0.02090705931186676, 0.20262554287910461, 0.3437378406524658, -0.005710359662771225, -0.049964625388383865, -0.001662377268075943, 0.41300255060195923, -0.15750394761562347, -0.06484614312648773, -0.35012102127075195, -0.11004969477653503, -0.07055853307247162, 0.07967649400234222, -0.050650738179683685, 0.09174902737140656, 0.13735991716384888, -0.2049822360277176, 0.31571629643440247, -0.03942117840051651, 0.10521876811981201, 0.2798178791999817, 0.20261581242084503, -0.0003668833523988724, 0.2759564220905304, 0.24514299631118774, -0.4558009207248688, 0.3817739188671112, 0.05685780942440033, -0.205114483833313, -0.538823664188385, -0.04600142687559128, -0.1756182312965393, -0.046632684767246246, -0.26925548911094666, 0.09222157299518585, -0.07832907885313034, 0.1140880286693573, 0.19284354150295258, 0.1365816295146942, 0.013621576130390167, 0.5149224996566772, -0.2192571759223938, 0.04879244044423103, -0.5043074488639832, 0.39627403020858765, 0.13412123918533325, -0.05757587030529976, -0.19942697882652283, -0.29739686846733093, -0.017018532380461693, -0.2235536277294159, -0.18985116481781006, 0.2360953986644745, 0.1971767544746399, 0.3119327127933502, 0.2117270678281784, 0.018648803234100342, 0.16308197379112244, -0.36223387718200684, 0.09588415920734406, -0.09354320168495178, 0.2276294082403183, -0.007318764925003052, -0.2056126892566681, 0.2139367163181305, -0.4098060131072998, 0.323379248380661, 0.07123439759016037, -0.13512679934501648, 0.24872775375843048, -0.039663705974817276, 0.06569551676511765, 0.07238489389419556, 0.39009255170822144, 0.3432534635066986, 0.4881488084793091, 0.29193127155303955, -0.23244300484657288, 0.15687374770641327, 0.564055323600769, -0.10418723523616791, -0.1571914106607437, 0.24502111971378326, 0.15166783332824707, 0.014708824455738068, 0.021480469033122063, 0.4453156590461731, 0.4103524088859558, 0.2064223289489746, 0.013621012680232525, 0.013881048187613487, -0.07306712120771408, -0.09004974365234375, 0.07515859603881836, 0.019855353981256485, 0.5392482280731201, 0.3388754427433014, 0.07854204624891281, 0.006770893931388855, -0.26831939816474915, -0.09756559878587723, 0.13954147696495056, 0.2509339153766632, 0.060463204979896545, 0.1712491810321808, -0.22529616951942444, -0.10307108610868454, -0.08162534236907959, 0.20510827004909515, -0.22785893082618713, -0.18645957112312317, -0.23957884311676025, -0.08230392634868622, 0.1448836326599121, 0.18173882365226746, -0.17532861232757568, 0.13609376549720764, 0.23010484874248505, -0.005727093666791916, -0.3012291193008423, -0.18412216007709503, 0.027379512786865234, -0.03142298012971878, 0.18022260069847107, -0.08855931460857391, 0.3605334162712097, -0.1551510989665985, 0.11468058079481125, -0.3048810660839081, -0.39790278673171997, 0.0538923516869545, 0.004917191341519356, 0.46102452278137207, 0.013959858566522598, 0.32722029089927673, -0.024886630475521088, 0.03521287441253662, 0.2462543249130249, 0.0769803524017334, -0.09573808312416077, -0.2852414846420288, 0.0006196461617946625, 0.1495521068572998, 0.029936164617538452, -0.25376206636428833, -0.26551082730293274, -0.3658590316772461, 0.5060077905654907, -0.08477529883384705, 0.10490020364522934, 0.13017089664936066, 0.14577315747737885, 0.049875371158123016, -0.2098003327846527, -0.013118786737322807, -0.1519453376531601, -0.2534497082233429, 0.3997287154197693, -0.018372569233179092, -0.18306592106819153, -0.25577789545059204, -0.2417377531528473, 0.11818565428256989, 0.1865043044090271, -0.5059145092964172, -0.2861587405204773, -0.589859127998352, 0.260702908039093, -0.24757100641727448, 0.1635311394929886, 0.049283288419246674, -0.1138111799955368, -0.10986410826444626, -0.1717202067375183, 0.16318123042583466, 0.05905802547931671, 0.04866708815097809, 0.1894364207983017, 0.32094401121139526, 0.5375567078590393, -0.07329259812831879, 0.5904608964920044, 0.2291000634431839, 0.0877453088760376, 0.23803986608982086, -0.2090364247560501, 0.20286130905151367, -0.2892681360244751, -0.17850425839424133, -0.007533255964517593, 0.01925928145647049, -0.12765705585479736, -0.1611882895231247, 0.1318352222442627, 0.08577107638120651, -0.030774258077144623, -0.048355814069509506, -0.3445788621902466, -0.14689962565898895, 0.04429560899734497, -0.19096636772155762, 0.2353423684835434, 0.03128840774297714, -0.03401969373226166, -0.012231610715389252, -0.028009293600916862, 0.024249188601970673, 0.023503975942730904, 0.43163493275642395, -0.11578713357448578, -0.1099642813205719, -0.3219526410102844, -0.1959112584590912, 0.18787989020347595, 0.17503218352794647, 0.19108539819717407, 0.08831169456243515, 0.0293411985039711, 0.3369802236557007, -0.19538694620132446, 1.0839730501174927, 0.21520550549030304, 0.07449975609779358, -0.09890957176685333, -0.07154097408056259, -0.3687957525253296, 0.06530963629484177, 0.21523204445838928, 0.19550073146820068, -0.28954750299453735, 0.4416176378726959, -0.29961806535720825, -0.1216772198677063, 0.015818744897842407, 0.3970305621623993, -0.2619042992591858, -0.2555658221244812, -0.27151861786842346, -0.2856179177761078, -0.24400663375854492, 0.01865808106958866, -0.02954947203397751, 0.05204419046640396, -0.03369621932506561, -0.26910096406936646, -0.42612090706825256, -0.1636222004890442, -0.17814284563064575, 0.03734539821743965, 0.46944528818130493, -0.2001471072435379, 0.4763050973415375, 0.2894638180732727, 0.10446752607822418, 0.27002155780792236, 0.6819635033607483, -0.1981736123561859, 0.023786332458257675, 0.20632880926132202, -0.1815618872642517, 0.2795453369617462, 0.23917049169540405, -0.344438761472702, -0.12003357708454132, -0.17000442743301392, 0.20658375322818756, -0.4392786920070648, 0.08981543779373169, 0.5680946707725525, 0.2208920270204544, -0.35345712304115295, -0.34698837995529175, 0.5185984373092651, 0.2503422796726227, -0.13509567081928253, 0.5999386310577393, 0.05395975708961487, 0.004449423402547836, -0.07001791149377823, -0.10064170509576797, 0.9113320112228394, -0.12091509997844696, 0.12377382814884186, -0.018886398524045944, -0.20253664255142212, 0.40470677614212036, 0.023766830563545227, 0.24500314891338348, -0.24294701218605042, -0.1017489954829216, 0.13971847295761108, -0.3182375431060791, 0.029747093096375465, 0.22500871121883392, 0.19439338147640228, 0.1855999380350113, -0.2455078661441803, -0.21790191531181335, -0.30462175607681274, 0.33521008491516113, -0.14261716604232788, -0.06725161522626877, -0.3329121470451355, 0.00840156152844429, -0.023315999656915665, 0.02895929664373398, -0.07204176485538483, 0.12105657160282135, -0.10422186553478241, -0.16260099411010742, 0.20727336406707764, 0.02869502454996109, -0.13004301488399506, 0.2685602605342865, -0.16954419016838074, -0.496695876121521, -0.1250436156988144, 0.10134200751781464, -0.38911524415016174, 0.008418163284659386, 0.10958245396614075, 0.5103437900543213, 0.0016832537949085236, 0.21631400287151337, 0.09803859889507294, -0.22688446938991547, 0.2925359904766083, -0.01020868867635727, 0.0722951591014862, -0.447109192609787, -0.40825989842414856, -0.1426094025373459, -0.10535404086112976, 0.2816709876060486, 0.002963078673928976, 0.18074989318847656, -0.2641514241695404, -0.02020670473575592, -0.10421308875083923, -0.04716058820486069, 0.10233665257692337, 0.2777005434036255, 0.07417232543230057, 0.6891252398490906, -0.008794261142611504, -0.31431540846824646, 0.0683109238743782, 0.27975723147392273, 0.2735362946987152, -0.028484545648097992, 0.4010840952396393, 0.14959676563739777, -0.24269935488700867, -0.10637018084526062, 0.02225382626056671, 0.030842505395412445, -0.8641771078109741, 0.4935574531555176, -0.06028750166296959, 0.3619314432144165, 0.007074866443872452, -0.3093143105506897, 0.062461744993925095, -0.3951278030872345, -0.20166613161563873, -0.3224610686302185, -0.31327980756759644, 0.260100394487381, -0.2111639380455017, 0.30385494232177734, -0.00965975970029831, -0.18409469723701477, 0.11670965701341629, -0.009394390508532524, -0.1913997232913971, 0.2693459689617157, -0.22706934809684753, 0.19084587693214417, -0.026852332055568695, -0.04895232245326042, 0.1989898979663849, -0.049933649599552155, 0.12756703794002533, 0.21491503715515137, 0.058644264936447144, -0.17335450649261475, -0.02570311352610588, 0.1893356442451477, -0.19754250347614288, -0.08758582174777985, 0.19410419464111328, -0.5077083706855774, -0.20908302068710327, 0.09448160976171494, 0.06463521718978882, -0.0532255582511425, 0.037493571639060974, -0.4545402228832245, 0.12315242737531662, -0.22553786635398865, 0.030715331435203552, 0.37504178285598755, -0.23296812176704407, 0.42472487688064575, 0.35226818919181824, 0.2009328305721283, 0.023179784417152405, 0.05531763285398483, -0.3457925021648407, -0.19657589495182037, 0.08111867308616638, -0.24567127227783203, 0.24653752148151398, -0.20712117850780487, -0.011431097984313965, -0.13911962509155273, 0.5462619662284851, 0.38861656188964844, -0.08019793778657913, -0.15201516449451447, 0.07212897390127182, 0.14036910235881805, -0.29202741384506226, -0.14266332983970642, 0.03358892723917961, -0.04271597042679787, -0.01428203284740448, -0.06186257302761078, 0.1351451575756073, 0.3218576908111572, -0.4431244134902954, 0.010503754019737244, 0.3219173550605774, -0.0006255041807889938, 0.07691305875778198, 0.5333786606788635, 0.27401137351989746, -0.10027272254228592, 0.43820419907569885, 0.09976689517498016, 0.08902798593044281, 0.6398394703865051, -0.1879107803106308, 0.27743467688560486, 0.15030181407928467, 0.3937451243400574, 0.019355108961462975, -0.2965121269226074, -0.03049306944012642, 0.13731428980827332, -0.3586404323577881, -0.04922905191779137, -0.12899386882781982, 0.36647269129753113, 0.006294183433055878, -0.17341230809688568, -0.17200125753879547, 0.44585198163986206, -0.04975264519453049, -0.04440789297223091, 0.08076199889183044, -0.2757883667945862, -0.055911511182785034, 0.17331449687480927, -0.05159960687160492, -0.034261301159858704, 0.21335159242153168, 0.32951515913009644, 0.09351640939712524, -0.3212001621723175, 0.13485467433929443, 0.036046694964170456, 0.4587152600288391, -0.1787704974412918, 0.3170751631259918, 0.22187389433383942, -0.06690377742052078, -0.056348975747823715, 0.42161792516708374, 0.32311269640922546, 0.3249003291130066, -0.054204173386096954, -0.09894202649593353, 0.15470477938652039, 0.10904081910848618, -0.02709602192044258, 0.3934251070022583, 0.07468320429325104, -0.07663090527057648, 0.11148478090763092, 0.04016263782978058, -0.2158837467432022, -0.1054907888174057, -0.0928039699792862, 0.14810435473918915, -0.1654159128665924, 0.1445983499288559, -0.2182585448026657, -0.07677726447582245, -0.17085714638233185, 0.18954022228717804, -0.7671763300895691, -0.22934648394584656, 0.5608067512512207, -0.36294132471084595, -0.15802861750125885, -0.1259676218032837, 0.03741370141506195, -0.6035054326057434, 0.6070009469985962, 0.22231866419315338, 0.463891863822937, -0.19811247289180756, -0.25292813777923584, -0.6711018085479736, -0.17724424600601196, -0.13192445039749146, 0.1560617834329605, 0.06520587205886841, 0.21548527479171753, -0.21852357685565948, -0.0056450567208230495, 0.643855094909668, -0.03912459313869476, 0.11490610986948013, 0.32256969809532166, -0.2858854830265045, -0.09470199048519135, -0.08420238643884659, -0.1283126175403595, -0.16101433336734772, -0.5085557699203491, 0.11807308346033096, -0.12275733053684235, 0.001515805721282959, 0.0638064295053482, -0.05400241166353226, 0.2310468554496765, 0.14395339787006378, 0.5851190686225891, 0.2724679112434387, 0.29081976413726807, 0.12242154777050018, -0.20079576969146729, -0.023819219321012497, -0.28755301237106323, 0.12111398577690125, 0.060982514172792435, 0.19474095106124878, 0.2234480082988739, -0.16141781210899353, 0.08879120647907257, -0.288047730922699, -0.18794786930084229, -0.18862450122833252, 0.10792679339647293, -0.0985640212893486, -0.1888621747493744, -0.21645429730415344, 0.141099214553833, 0.09216676652431488, 0.3695090413093567, 0.21097275614738464, 0.08004555106163025, -0.30753394961357117, -0.3732283413410187, 0.4772093892097473, -0.14742735028266907, -0.32885241508483887, 0.2553485333919525, 0.086957186460495, 0.05365116894245148, 0.07933428138494492, -0.1506456732749939, 0.04129089415073395, 0.4685138761997223, -0.10008199512958527, -0.0327688604593277, 0.2669243812561035, 0.015085402876138687, 0.02256595343351364, 0.03279437869787216, 0.07751162350177765, -0.03099166788160801, -0.04518423229455948, 0.03629899024963379, -0.0612005777657032 ]
https://github.com/huggingface/datasets/issues/6358
You may be able to make it work by tweaking some environment variables, such as [`HF_HOME`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#hfhome) or [`HF_DATASETS_CACHE`](https://huggingface.co/docs/datasets/cache#cache-directory).
Mounting datasets cache fails due to absolute paths.
### Describe the bug Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache. ### Steps to reproduce the bug 1. Create a datasets cache by downloading some data 2. Mount the dataset folder into a docker container or remote system. 3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache. 4. Attempt to access the data from within the docker container. 5. An error is thrown saying no file exists at \<absolute path to original cache location\> ### Expected behavior The data is loaded without error ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
18
Mounting datasets cache fails due to absolute paths. ### Describe the bug Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache. ### Steps to reproduce the bug 1. Create a datasets cache by downloading some data 2. Mount the dataset folder into a docker container or remote system. 3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache. 4. Attempt to access the data from within the docker container. 5. An error is thrown saying no file exists at \<absolute path to original cache location\> ### Expected behavior The data is loaded without error ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 You may be able to make it work by tweaking some environment variables, such as [`HF_HOME`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#hfhome) or [`HF_DATASETS_CACHE`](https://huggingface.co/docs/datasets/cache#cache-directory).
[ -0.00010085105895996094, 0.028453439474105835, 0.08273055404424667, 0.13505060970783234, 0.24859587848186493, 0.023465223610401154, 0.1194758415222168, 0.21675515174865723, 0.049085840582847595, 0.09170372039079666, -0.07647693157196045, 0.08717919886112213, -0.2398337721824646, -0.33649641275405884, 0.1839090883731842, -0.09930216521024704, 0.11063720285892487, 0.05225735530257225, -0.3125903904438019, 0.029754847288131714, -0.1311311274766922, 0.202350914478302, 0.13913801312446594, 0.166703000664711, -0.2379504144191742, 0.037578411400318146, -0.19137811660766602, 0.2753063440322876, 0.12263599783182144, -0.39663252234458923, 0.4465194344520569, 0.08144405484199524, 0.07906824350357056, 0.8231343030929565, -0.00012033669190714136, 0.14614343643188477, 0.25310373306274414, 0.02604909986257553, -0.37389707565307617, -0.460959255695343, -0.40953588485717773, -0.03222960606217384, 0.08424187451601028, -0.16108232736587524, -0.1557101011276245, 0.11569888144731522, 0.000859653577208519, -0.3523237705230713, 0.5980058908462524, 0.11831146478652954, 0.12908831238746643, 0.2749701142311096, -0.10171828418970108, -0.04732392728328705, 0.2526150047779083, 0.1292528361082077, -0.22262698411941528, 0.521798849105835, -0.04575139284133911, 0.04095999151468277, 0.03460611775517464, 0.14331071078777313, -0.11364123225212097, 0.08816354721784592, 0.2764192521572113, -0.012393347918987274, -0.48835334181785583, -0.0017042327672243118, 0.04950753599405289, 0.4200117588043213, 0.49604669213294983, -0.4395657479763031, -0.602446436882019, -0.3402248024940491, -0.17548981308937073, -0.17269210517406464, 0.4340618848800659, 0.025032345205545425, -0.005694940686225891, 0.26936423778533936, -0.20412921905517578, -0.1661905199289322, -0.3248206377029419, 0.09033675491809845, 0.012022346258163452, -0.09719927608966827, -0.2919420301914215, 0.18499299883842468, -0.050163306295871735, 0.13136349618434906, 0.1124788150191307, -0.11203256249427795, 0.08681046962738037, 0.15549366176128387, -0.18170499801635742, 0.16905754804611206, -0.02917645499110222, 0.3019830286502838, 0.2391120344400406, 0.06168721988797188, 0.09067308157682419, 0.014762412756681442, -0.28938063979148865, 0.2010176181793213, -0.03147021681070328, 0.42807328701019287, -0.11218036711215973, -0.05108547955751419, 0.2938075661659241, 0.20639637112617493, -0.10248641669750214, -0.2874244749546051, -0.04277328774333, -0.12142260372638702, -0.20668473839759827, 0.03487764298915863, 0.10393525660037994, -0.3075409531593323, -0.04241332784295082, 0.02746232971549034, 0.2230834662914276, 0.34237295389175415, 0.2564476728439331, 0.33735042810440063, -0.00630936399102211, -0.11064685881137848, 0.08519485592842102, 0.2729167342185974, 0.06720122694969177, 0.26930171251296997, -0.1657789945602417, 0.10877564549446106, -0.2228689193725586, 0.30169108510017395, 0.14078228175640106, -0.0826413631439209, 0.2746564745903015, 0.022104613482952118, 0.19302669167518616, 0.006771549582481384, -0.19747143983840942, -0.04924887791275978, 0.046831365674734116, 0.35335588455200195, -0.027861885726451874, 0.3391803801059723, 0.20777475833892822, 0.1778622567653656, -0.060278818011283875, -0.013166200369596481, -0.1026884913444519, -0.31981146335601807, 0.14617283642292023, -0.006488589569926262, -0.2420808970928192, 0.35999795794487, -0.31462010741233826, -0.049384742975234985, -0.010276976972818375, -0.12158933281898499, 0.13556738197803497, 0.08686716854572296, -0.09343452006578445, -0.17191512882709503, 0.4497741460800171, 0.6902187466621399, 0.019978798925876617, 0.03743185102939606, 0.037798937410116196, -0.02317454107105732, -0.11340456455945969, 0.28987401723861694, 0.04496296867728233, -0.028918839991092682, -0.4187361001968384, -0.1444557011127472, 0.00587298721075058, -0.46796172857284546, -0.4912969470024109, 0.19627472758293152, -0.07384240627288818, 0.2960466742515564, 0.16123205423355103, -0.15106579661369324, -0.016837360337376595, -0.0505845881998539, -0.054384518414735794, 0.22956643998622894, 0.2129053920507431, -0.16896212100982666, -0.27198055386543274, -0.18222476541996002, -0.11837616562843323, 0.023849666118621826, 0.23151060938835144, 0.1558828204870224, 0.1662917137145996, 0.11047529429197311, 0.17848949134349823, -0.11988919228315353, -0.04188893735408783, 0.5355591177940369, 0.31821566820144653, 0.22491464018821716, -0.004705049097537994, -0.2608765661716461, -0.3324034512042999, 0.3909757733345032, -0.1094142347574234, -0.26718926429748535, -0.2439492791891098, -0.18549039959907532, 0.012184195220470428, 0.18465960025787354, -0.05598561838269234, 0.030772890895605087, 0.05704463645815849, 0.15263114869594574, 0.2576453387737274, 0.2801380455493927, -0.13015350699424744, 0.5971230864524841, -0.0978478416800499, 0.14570526778697968, -0.027308931574225426, 0.2483203411102295, 0.07038070261478424, -0.13197021186351776, -0.20842555165290833, 0.30717337131500244, 0.3563806414604187, -0.24498754739761353, -0.12350046634674072, 0.5404945611953735, -0.11194605380296707, 0.23023559153079987, -0.0630272626876831, 0.2687082290649414, 0.3317302167415619, -0.18032784759998322, -0.22476628422737122, -0.13843141496181488, -0.0471297949552536, 0.13153888285160065, -0.16388025879859924, 0.0852019190788269, -0.5260407328605652, 0.32800543308258057, 0.0665692612528801, -0.0021215304732322693, 0.009928695857524872, 0.07125256955623627, -0.2053433507680893, -0.06907763332128525, 0.4811381697654724, 0.0685504600405693, 0.3148632049560547, -0.2883265018463135, -0.03209706395864487, 0.07107271999120712, 0.020926466211676598, 0.19825415313243866, 0.13941414654254913, 0.22603219747543335, -0.21271631121635437, -0.035042449831962585, 0.3064825236797333, 0.20179782807826996, 0.2317911684513092, 0.12595060467720032, 0.3227423429489136, 0.18238359689712524, -0.11264374852180481, -0.015293397009372711, -0.04226028174161911, 0.11295189708471298, -0.061423156410455704, -0.07591737806797028, 0.06820496916770935, 0.2644652724266052, -0.140799880027771, -0.25220707058906555, -0.2873401641845703, 0.04078948497772217, -0.2928612232208252, 0.27398931980133057, -0.2536916732788086, 0.15914386510849, -0.13585034012794495, -0.4102204442024231, -0.2258317470550537, -0.277825266122818, -0.14948315918445587, 0.4543103575706482, 0.022185824811458588, 0.08603017032146454, -0.011610053479671478, 0.1270034909248352, -0.07959354668855667, -0.07785211503505707, -0.2998945713043213, -0.04781009629368782, -0.11598941683769226, -0.1167302057147026, 0.0001717694103717804, -0.014328919351100922, 0.11159723997116089, -0.17509150505065918, 0.15313124656677246, -0.5326367020606995, -0.30609461665153503, 0.07698819041252136, 0.08307182788848877, 0.6467130780220032, 0.21846666932106018, 0.16329270601272583, -0.24093511700630188, -0.06984516233205795, 0.1726917028427124, -0.0808260440826416, 0.14334636926651, -0.011126846075057983, -0.09713932871818542, -0.06669192761182785, -0.16528233885765076, 0.1439189910888672, -0.2712149918079376, -0.33744102716445923, 0.5436833500862122, -0.020245302468538284, -0.0044896528124809265, 0.1524829864501953, 0.08001109212636948, 0.12314118444919586, -0.31000781059265137, 0.16762396693229675, -0.2005644142627716, -0.5716201066970825, 0.22365638613700867, -0.2590879201889038, -0.3023204803466797, -0.07745400071144104, -0.00825045257806778, 0.12496420741081238, 0.11806069314479828, -0.5109798312187195, -0.41184020042419434, -0.17156268656253815, 0.2871716320514679, 0.07066507637500763, 0.08163997530937195, 0.0767020583152771, -0.08482161164283752, 0.05232712998986244, -0.29561638832092285, -0.07770030945539474, 0.0997215062379837, -0.09423182904720306, 0.15507905185222626, 0.1751163750886917, 0.11157094687223434, 0.2819508910179138, 0.7120710611343384, 0.1217365562915802, 0.049655456095933914, 0.4448384642601013, -0.030727600678801537, 0.9490540027618408, -0.19771525263786316, -0.4046443700790405, 0.0719606801867485, 0.031085319817066193, -0.10125967115163803, 0.030536696314811707, 0.42243555188179016, 0.5226770043373108, 0.013202309608459473, -0.2432451695203781, -0.11970598995685577, -0.2589903473854065, -0.07217999547719955, -0.16739435493946075, -0.024478036910295486, 0.22586898505687714, -0.08561694622039795, -0.2775372564792633, -0.12213710695505142, 0.19435641169548035, 0.6458677649497986, 0.4348575174808502, 0.34597957134246826, -0.05624537914991379, -0.03325130417943001, -0.48348671197891235, -0.055235132575035095, -0.11932894587516785, 0.3497292101383209, -0.37210404872894287, 0.41519060730934143, 0.029540184885263443, -0.035369064658880234, 0.8633736968040466, 0.001825658604502678, -0.06570109724998474, -0.21432870626449585, -0.10604971647262573, -0.627931535243988, 0.25875163078308105, 0.3399943709373474, 0.2833312451839447, -0.04230698198080063, 0.28825655579566956, -0.16954109072685242, 0.16541767120361328, -0.35255855321884155, 0.3863050639629364, -0.12007135897874832, -0.4386502206325531, -0.19974789023399353, -0.17607316374778748, -0.1234055608510971, -0.03638077899813652, 0.07553178817033768, -0.22279353439807892, 0.14352616667747498, -0.08101635426282883, -0.14721587300300598, -0.0678037777543068, -0.128033846616745, 0.0704515278339386, 0.35657864809036255, -0.3338734209537506, 0.13251444697380066, 0.4849676191806793, -0.025022760033607483, 0.2861442267894745, 0.39738234877586365, -0.32684630155563354, 0.14657840132713318, -0.07543252408504486, -0.14837102591991425, -0.09609758108854294, 0.34521013498306274, -0.226300448179245, 0.028529610484838486, 0.14963212609291077, 0.06501545011997223, -0.20112738013267517, 0.1617332547903061, -0.1494988352060318, 0.10145072638988495, 0.08527042716741562, -0.17063069343566895, 0.5943028926849365, 0.21147018671035767, -0.17220337688922882, 0.5052987337112427, 0.7772505283355713, -0.48731231689453125, 0.30762046575546265, -0.08149570226669312, 0.8938323259353638, -0.25108569860458374, 0.2747901678085327, 0.295048326253891, -0.27373746037483215, 0.7155411839485168, -0.12202367186546326, 0.07103367149829865, -0.20297706127166748, -0.41284438967704773, -0.09919141232967377, -0.18440552055835724, 0.015019034966826439, -0.10285293310880661, -0.011231690645217896, 0.31003889441490173, -0.19864574074745178, 0.2629104256629944, -0.0047720130532979965, -0.2584252655506134, -0.09395460039377213, -0.3039591312408447, -0.275988906621933, 0.14051100611686707, 0.0013918587937951088, 0.3054017722606659, -0.16094136238098145, -0.12196199595928192, -0.13550320267677307, 0.020793266594409943, -0.2756880819797516, 0.00991828739643097, -0.2214546501636505, 0.10055111348628998, 0.22091498970985413, -0.2809608280658722, -0.08947712928056717, 0.1523149162530899, 0.5740761160850525, 0.13309058547019958, -0.36426037549972534, 0.04970857501029968, -0.057711195200681686, -0.1199861615896225, -0.20545029640197754, -0.053423795849084854, -0.03837710991501808, 0.03517515957355499, 0.1348593384027481, -0.27539941668510437, -0.30288976430892944, -0.3454890251159668, 0.2862035930156708, -0.015090655535459518, 0.08444669842720032, 0.12799085676670074, -0.29945939779281616, -0.09497593343257904, 0.07422879338264465, -0.3020540177822113, 0.057010501623153687, 0.096602663397789, -0.06756943464279175, 0.037328511476516724, -0.02479127049446106, 0.01862262189388275, 0.045388028025627136, 0.5438141822814941, -0.33882883191108704, -0.2348404973745346, 0.30054211616516113, 0.014731675386428833, -0.3473753333091736, 0.03544981777667999, -0.028677619993686676, 0.3397512435913086, -0.3856552839279175, -0.004341494292020798, -0.20008113980293274, 0.18198901414871216, -0.23705345392227173, -0.2732881009578705, 0.5384504199028015, -0.13651451468467712, -0.02980531007051468, -0.5116949677467346, -0.3660235106945038, 0.12368200719356537, -0.4268035590648651, 0.11167146265506744, 0.07202543318271637, -0.30872270464897156, 0.11947257071733475, -0.08308316022157669, -0.2260793298482895, 0.10931219905614853, -0.37571173906326294, -0.2087583988904953, 0.3324703872203827, 0.0654677003622055, 0.21062128245830536, -0.18076445162296295, 0.018362507224082947, 0.2600043714046478, -0.1661936193704605, -0.06515537202358246, -0.3592835068702698, 0.15538784861564636, 0.15048009157180786, -0.16402675211429596, 0.016338523477315903, -0.05549086257815361, 0.06014419347047806, -0.19781337678432465, 0.2100505828857422, 0.5693411827087402, 0.03175390511751175, -0.15744034945964813, -0.1283343881368637, 0.12518201768398285, -0.44212043285369873, 0.12074209749698639, 0.0025698430836200714, 0.11730559170246124, 0.10946741700172424, 0.1093454658985138, -0.23235781490802765, -0.09842850267887115, -0.09658440947532654, 0.005014035850763321, -0.1671029031276703, -0.06601302325725555, 0.2897472083568573, -0.20374655723571777, 0.06969910860061646, 0.2647593021392822, 0.42674726247787476, -0.3219834268093109, -0.22428590059280396, -0.07573364675045013, 0.3352362811565399, 0.017398174852132797, 0.004886113107204437, 0.06509949266910553, 0.03213948383927345, 0.03753338009119034, 0.1667836606502533, 0.1557110846042633, 0.48898082971572876, -0.3324243426322937, 0.16380034387111664, 0.018488779664039612, 0.4999811053276062, -0.2681672275066376, -0.008241832256317139, 0.054722860455513, -0.11246076971292496, 0.28547751903533936, 0.22983190417289734, 0.20688089728355408, 0.15601488947868347, 0.5915964841842651, -0.24579907953739166, 0.20175489783287048, -0.05584254860877991, -0.18948401510715485, 0.08459659665822983, -0.47941944003105164, -0.06671334058046341, -0.047183409333229065, 0.2233961522579193, 0.03290712833404541, -0.5150809288024902, 0.13916710019111633, -0.5875231027603149, 0.0844390019774437, 0.0931454598903656, -0.027534328401088715, -0.14466504752635956, -0.13582651317119598, 0.20637592673301697, -0.1366630643606186, 0.14220458269119263, -0.21668800711631775, 0.01400845404714346, -0.2950989305973053, 0.18284955620765686, -0.009256154298782349, 0.1787540316581726, -0.25639593601226807, -0.2506178021430969, 0.33154410123825073, -0.07384396344423294, -0.02923276275396347, 0.33548182249069214, 0.3775036334991455, -0.09120359271764755, 0.053816910833120346, -0.0259486585855484, 0.4568173289299011, 0.1673567295074463, 0.11559413373470306, 0.05153903737664223, -0.014800390228629112, -0.02383703738451004, 0.08294223994016647, 0.19899597764015198, -0.10084839165210724, -0.11493039131164551, 0.2526991665363312, 0.11395969241857529, -0.10095144063234329, 0.4503205418586731, -0.15871527791023254, 0.5168800950050354, -0.21004973351955414, 0.0309993177652359, -0.16205252707004547, -0.07159584760665894, -0.01146581582725048, -0.032931018620729446, -0.24971267580986023, 0.1003146767616272, 0.3606349229812622, -0.2288341522216797, 0.02183634415268898, 0.1029263436794281, 0.01013384759426117, 0.20373141765594482, 0.3022680878639221, 0.5280975699424744, 0.27047601342201233, -0.3339576721191406, 0.03311380743980408, -0.485769122838974, 0.0878714770078659, -0.1559915840625763, 0.04370521754026413, -0.023951293900609016, -0.1533758044242859, -0.23937463760375977, 0.013071544468402863, 0.26106882095336914, 0.14409390091896057, 0.026655837893486023, -0.371725857257843, -0.1860465258359909, -0.021856579929590225, 0.14332382380962372, -0.10693711787462234, -0.08430349826812744, -0.21818619966506958, 0.14350959658622742, 0.04205717518925667, -0.0064311400055885315, 0.02603399008512497, 0.24502381682395935, -0.23763655126094818, 0.05397660657763481, 0.12831462919712067, 0.21028254926204681, -0.024878233671188354, 0.04489165544509888, -0.26700863242149353, -0.3466384708881378, -0.27596190571784973, -0.03283267468214035, -0.12200897932052612, -0.1807037889957428, 0.49604731798171997, -0.424660325050354, -0.6210841536521912, -0.4449256658554077, 0.030050083994865417, 0.16909259557724, 0.002372298389673233, -0.07299342751502991, 0.2641001343727112, -0.24197091162204742, 0.24868160486221313, 0.4894106984138489, 0.10613751411437988, 0.018362224102020264, 0.3514677584171295, -0.14260007441043854, -0.20824413001537323, 0.5945666432380676, -0.5022560358047485, -0.2772771716117859, 0.08031782507896423, 0.3309229016304016, 0.12132477760314941, -0.2277182638645172, -0.5283300876617432, -0.017769232392311096, 0.2592228949069977, 0.06315408647060394, -0.04679016023874283, -0.15248343348503113, -0.31972894072532654, 0.17250493168830872, 0.005106933414936066, 0.21875296533107758, 0.06169067323207855, -0.11423664540052414, 0.1695120930671692, -0.24085527658462524 ]
https://github.com/huggingface/datasets/issues/6358
> You may be able to make it work by tweaking some environment variables, such as [`HF_HOME`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#hfhome) or [`HF_DATASETS_CACHE`](https://huggingface.co/docs/datasets/cache#cache-directory). I am already doing this. The problem is that, while this seemingly allows flexibility, the absolute paths written into the cache still have the old cache directory. The paths written into the cache should be relative to the cache location to allow this sort of flexibility. Sorry, I omitted this in the reproduction steps, I have now added it.
Mounting datasets cache fails due to absolute paths.
### Describe the bug Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache. ### Steps to reproduce the bug 1. Create a datasets cache by downloading some data 2. Mount the dataset folder into a docker container or remote system. 3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache. 4. Attempt to access the data from within the docker container. 5. An error is thrown saying no file exists at \<absolute path to original cache location\> ### Expected behavior The data is loaded without error ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
78
Mounting datasets cache fails due to absolute paths. ### Describe the bug Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache. ### Steps to reproduce the bug 1. Create a datasets cache by downloading some data 2. Mount the dataset folder into a docker container or remote system. 3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache. 4. Attempt to access the data from within the docker container. 5. An error is thrown saying no file exists at \<absolute path to original cache location\> ### Expected behavior The data is loaded without error ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 > You may be able to make it work by tweaking some environment variables, such as [`HF_HOME`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#hfhome) or [`HF_DATASETS_CACHE`](https://huggingface.co/docs/datasets/cache#cache-directory). I am already doing this. The problem is that, while this seemingly allows flexibility, the absolute paths written into the cache still have the old cache directory. The paths written into the cache should be relative to the cache location to allow this sort of flexibility. Sorry, I omitted this in the reproduction steps, I have now added it.
[ 0.053802065551280975, 0.05613492429256439, 0.08096794784069061, 0.06797824800014496, 0.2428542971611023, -0.015263326466083527, 0.10982009768486023, 0.20520839095115662, 0.03088117390871048, 0.05655992776155472, -0.1255326271057129, 0.11960466206073761, -0.24449720978736877, -0.3772185742855072, 0.1891603022813797, -0.10236307978630066, 0.07787135988473892, 0.04136133939027786, -0.3215946853160858, -0.02936677634716034, -0.11165284365415573, 0.2125656008720398, 0.20006702840328217, 0.16764697432518005, -0.17907986044883728, 0.017861293628811836, -0.18501362204551697, 0.2788086533546448, 0.16108956933021545, -0.41057029366493225, 0.4367198646068573, 0.12822113931179047, 0.12882176041603088, 0.7518690824508667, -0.00011820914369309321, 0.16463136672973633, 0.20790405571460724, 0.02739662677049637, -0.4010886251926422, -0.4190499484539032, -0.34750497341156006, -0.03063178062438965, 0.05749814212322235, -0.19889360666275024, -0.14737513661384583, 0.09508433938026428, 0.02152845449745655, -0.3795771896839142, 0.5996991395950317, 0.0637163445353508, 0.13066688179969788, 0.23277445137500763, -0.16381824016571045, -0.02818472497165203, 0.20765279233455658, 0.10644270479679108, -0.16219794750213623, 0.4664223790168762, -0.0795406699180603, 0.07499288767576218, 0.015787607058882713, 0.14679338037967682, -0.13031594455242157, 0.06121017783880234, 0.3023369312286377, -0.002232007682323456, -0.47783827781677246, 0.04599586874246597, 0.06761010736227036, 0.397632360458374, 0.45326751470565796, -0.45602095127105713, -0.6193302273750305, -0.3654960095882416, -0.17716029286384583, -0.18464846909046173, 0.3671894073486328, 0.012359794229269028, 0.01229693740606308, 0.27206385135650635, -0.20911306142807007, -0.1789061725139618, -0.31718170642852783, 0.1086297258734703, -0.0058763399720191956, -0.09802639484405518, -0.2854994237422943, 0.15952222049236298, 0.0027887916658073664, 0.15797461569309235, 0.03073125332593918, -0.07684088498353958, 0.09288842976093292, 0.16095197200775146, -0.15271668136119843, 0.18337060511112213, -0.02667349949479103, 0.44318652153015137, 0.2724461555480957, 0.07837255299091339, 0.11329623311758041, 0.03344743326306343, -0.29950404167175293, 0.13200026750564575, -0.027249962091445923, 0.44090184569358826, -0.0818357765674591, -0.10619951784610748, 0.2551667392253876, 0.21374297142028809, -0.08446241915225983, -0.2867409884929657, -0.047176435589790344, -0.19878382980823517, -0.17691747844219208, 0.02268432453274727, 0.08464999496936798, -0.2901086211204529, -0.03088996186852455, 0.02129450812935829, 0.20448201894760132, 0.34554141759872437, 0.2558960020542145, 0.38471120595932007, -0.02587006986141205, -0.06387840211391449, 0.05409899353981018, 0.22933977842330933, 0.04873193800449371, 0.2620253562927246, -0.1824791133403778, 0.11573691666126251, -0.2728613018989563, 0.2951526641845703, 0.11403568089008331, -0.12965397536754608, 0.2753845453262329, 0.04012353718280792, 0.17395664751529694, 0.09006305038928986, -0.2778327167034149, 0.013957910239696503, 0.11081910878419876, 0.2907189130783081, -0.08398085087537766, 0.3674875795841217, 0.18286241590976715, 0.1646208018064499, -0.0631827861070633, -0.029605228453874588, -0.08244146406650543, -0.31867238879203796, 0.1823350191116333, 0.0033958544954657555, -0.25600749254226685, 0.33905720710754395, -0.26126983761787415, -0.08343350887298584, 0.007686380296945572, -0.0908367782831192, 0.12276172637939453, 0.08191976696252823, -0.09329475462436676, -0.17472882568836212, 0.4319308400154114, 0.7230840921401978, 0.035967305302619934, 0.019343063235282898, 0.05816199257969856, -0.02126246504485607, -0.19022183120250702, 0.2879146635532379, 0.031852468848228455, -0.053524017333984375, -0.4287978708744049, -0.21178512275218964, -0.015015020966529846, -0.4799143671989441, -0.4810042083263397, 0.21111659705638885, -0.04840581864118576, 0.3155154585838318, 0.1728019267320633, -0.19200880825519562, -0.02447257563471794, -0.03494197130203247, -0.058199092745780945, 0.19600781798362732, 0.21962416172027588, -0.15464657545089722, -0.3062444031238556, -0.18494650721549988, -0.14550426602363586, -0.028048772364854813, 0.20580585300922394, 0.14264130592346191, 0.16693326830863953, 0.08295388519763947, 0.2501579225063324, -0.13031545281410217, -0.007815372198820114, 0.5223878622055054, 0.29816585779190063, 0.24687032401561737, -0.05520819127559662, -0.2307019829750061, -0.3705134093761444, 0.38327544927597046, -0.11926786601543427, -0.2698298692703247, -0.22490859031677246, -0.21360602974891663, -0.004348341375589371, 0.11383172869682312, -0.0623767115175724, -0.021986227482557297, 0.06119365990161896, 0.174404576420784, 0.3077917993068695, 0.23925305902957916, -0.16638654470443726, 0.6350351572036743, -0.09043291956186295, 0.11827117204666138, -0.10020917654037476, 0.2304825782775879, 0.08029111474752426, -0.11108751595020294, -0.23360881209373474, 0.30958792567253113, 0.356807678937912, -0.2307305634021759, -0.05742894113063812, 0.508571207523346, -0.13477694988250732, 0.25590765476226807, -0.1130392774939537, 0.30003905296325684, 0.35635292530059814, -0.14827902615070343, -0.17615263164043427, -0.17394891381263733, -0.06909940391778946, 0.16305875778198242, -0.1907252073287964, 0.10577161610126495, -0.5148010849952698, 0.3222167193889618, 0.10516252368688583, -0.029083866626024246, 0.0021636635065078735, 0.0244688019156456, -0.249055415391922, -0.12868632376194, 0.4470214545726776, 0.1375572234392166, 0.36488789319992065, -0.25322452187538147, -0.05322801321744919, 0.11947168409824371, 0.015506920404732227, 0.21054203808307648, 0.11529170721769333, 0.22952677309513092, -0.2049037516117096, -0.03610695153474808, 0.2874411940574646, 0.23688071966171265, 0.2312927544116974, 0.16436642408370972, 0.2992056906223297, 0.21033407747745514, -0.11745253205299377, -0.016169019043445587, -0.05365597456693649, 0.08057855069637299, -0.08710014820098877, -0.0646481141448021, 0.03279445692896843, 0.25564298033714294, -0.13691143691539764, -0.23237639665603638, -0.2969256639480591, 0.014604678377509117, -0.29071298241615295, 0.26038452982902527, -0.3324882686138153, 0.12596793472766876, -0.1769503653049469, -0.38364195823669434, -0.2158224880695343, -0.26746439933776855, -0.14599202573299408, 0.4027501046657562, -0.012803137302398682, 0.15096907317638397, -0.009044595062732697, 0.11354124546051025, -0.14175859093666077, -0.1416921466588974, -0.2762224078178406, -0.08208409696817398, -0.1377706229686737, -0.10967521369457245, -0.001242164522409439, -0.03341304883360863, 0.08439084142446518, -0.17805026471614838, 0.09118188917636871, -0.5710767507553101, -0.2711453139781952, 0.08049365878105164, 0.09376688301563263, 0.6551363468170166, 0.22718693315982819, 0.17093873023986816, -0.2227083295583725, -0.046553757041692734, 0.14209160208702087, -0.12449686229228973, 0.13044562935829163, -0.07179288566112518, -0.0655437782406807, -0.0366581454873085, -0.14099866151809692, 0.12112841010093689, -0.2651273012161255, -0.3626820743083954, 0.5432261228561401, -0.009476929903030396, -0.003856876865029335, 0.19361600279808044, 0.0429367758333683, 0.054369185119867325, -0.26958850026130676, 0.20065699517726898, -0.25560224056243896, -0.5706411600112915, 0.243570014834404, -0.25438734889030457, -0.2854948341846466, -0.12276618927717209, -0.062253694981336594, 0.17463554441928864, 0.10993269085884094, -0.46423250436782837, -0.4066348075866699, -0.14380274713039398, 0.2967270016670227, 0.09457214176654816, 0.15240758657455444, 0.10364149510860443, -0.0627824068069458, 0.02278287336230278, -0.2719089984893799, -0.10296405851840973, 0.1390906423330307, -0.07473324239253998, 0.10389910638332367, 0.14406050741672516, 0.06879527121782303, 0.27237746119499207, 0.7337577939033508, 0.13901323080062866, -0.000698824820574373, 0.48213839530944824, -0.010979698039591312, 0.9366214275360107, -0.18777084350585938, -0.40812933444976807, 0.038576845079660416, 0.044850826263427734, -0.10174718499183655, 0.03190924972295761, 0.41300854086875916, 0.5453301668167114, 0.02646699547767639, -0.24223938584327698, -0.09647441655397415, -0.3226027190685272, -0.047182269394397736, -0.13112762570381165, -0.0295347198843956, 0.21387743949890137, -0.08164661377668381, -0.2844165861606598, -0.09472648054361343, 0.22182613611221313, 0.6638970375061035, 0.4168873131275177, 0.3754594326019287, -0.06759053468704224, 0.016143571585416794, -0.46939149498939514, -0.03750762343406677, -0.10018917918205261, 0.2582132816314697, -0.3431970477104187, 0.34241199493408203, -0.011684279888868332, -0.04748249799013138, 0.8683086037635803, 0.03607841581106186, -0.07966755330562592, -0.18511182069778442, -0.08862301707267761, -0.5960778594017029, 0.2558971643447876, 0.3986707329750061, 0.25063571333885193, -0.09366054832935333, 0.25798916816711426, -0.20946528017520905, 0.11986052989959717, -0.32755035161972046, 0.4481838345527649, -0.15960624814033508, -0.41478443145751953, -0.20229291915893555, -0.18176785111427307, -0.14166001975536346, -0.0663841962814331, 0.053370460867881775, -0.2116619050502777, 0.12513595819473267, -0.05167386680841446, -0.12014786899089813, -0.1478869915008545, -0.10416296124458313, 0.05629131942987442, 0.38372257351875305, -0.2996184229850769, 0.10673043131828308, 0.47217655181884766, 0.028051866218447685, 0.29131290316581726, 0.4195505976676941, -0.40636274218559265, 0.1841530203819275, -0.08609838783740997, -0.07082965970039368, -0.0441850908100605, 0.38703516125679016, -0.2020597755908966, 0.020437436178326607, 0.19053423404693604, 0.041966184973716736, -0.19469775259494781, 0.14628100395202637, -0.18467968702316284, 0.08490140736103058, 0.12623152136802673, -0.2396630197763443, 0.6040353775024414, 0.18915927410125732, -0.19180750846862793, 0.5161536335945129, 0.8119543194770813, -0.5047417283058167, 0.28596997261047363, -0.07602222263813019, 0.9197468161582947, -0.15104448795318604, 0.3104458451271057, 0.283994197845459, -0.2740994989871979, 0.701876699924469, -0.11139461398124695, 0.05949384346604347, -0.19974085688591003, -0.28603217005729675, -0.07569465041160583, -0.17306376993656158, 0.006084126885980368, -0.06525874137878418, 0.04997023940086365, 0.3687540888786316, -0.1847517192363739, 0.23198892176151276, -0.0119659174233675, -0.16216258704662323, -0.11871092021465302, -0.31147700548171997, -0.28290948271751404, 0.1362272948026657, -0.00281674787402153, 0.27659013867378235, -0.20009779930114746, -0.15872041881084442, -0.09822610765695572, 0.0909593254327774, -0.21830639243125916, -0.020701691508293152, -0.265329509973526, 0.14125336706638336, 0.17353209853172302, -0.3047245144844055, -0.11824263632297516, 0.1833629310131073, 0.5929127335548401, 0.100140780210495, -0.3263799548149109, 0.07029049098491669, -0.034481920301914215, -0.07682681083679199, -0.23894000053405762, -0.0667441263794899, 0.02447686903178692, 0.061104916036129, 0.11498230695724487, -0.3019804060459137, -0.2976495027542114, -0.3338145315647125, 0.26238298416137695, -0.04498414322733879, 0.07201403379440308, 0.0959220826625824, -0.2568631172180176, -0.018020909279584885, 0.09068746864795685, -0.2683301568031311, 0.06572555005550385, 0.1115112230181694, -0.03301146253943443, 0.049210093915462494, -0.06837587058544159, 0.02665717899799347, 0.0027380362153053284, 0.5716654062271118, -0.3734699785709381, -0.22028875350952148, 0.303031861782074, -0.058043599128723145, -0.34628742933273315, 0.03438997268676758, -0.05011492967605591, 0.32410433888435364, -0.379287451505661, 0.0027280114591121674, -0.14787399768829346, 0.19534297287464142, -0.241378515958786, -0.29086536169052124, 0.49804091453552246, -0.1245018020272255, -0.015207096934318542, -0.4220340847969055, -0.33952194452285767, 0.19222593307495117, -0.43904244899749756, 0.12089463323354721, 0.06651179492473602, -0.24557945132255554, 0.12338382750749588, -0.09848892688751221, -0.25362175703048706, 0.12350019067525864, -0.2951469421386719, -0.21079999208450317, 0.27535128593444824, 0.02821594662964344, 0.20940186083316803, -0.19183498620986938, 0.03756674379110336, 0.2859558165073395, -0.1971663236618042, -0.07911550253629684, -0.3721078038215637, 0.15043270587921143, 0.14631076157093048, -0.1291372925043106, 0.03542700409889221, -0.025665316730737686, 0.12566062808036804, -0.20552578568458557, 0.2288684844970703, 0.617089033126831, 0.04617036134004593, -0.12254169583320618, -0.13927467167377472, 0.11154110729694366, -0.414686918258667, 0.06758890300989151, -0.0007719323039054871, 0.10403013229370117, 0.14375664293766022, 0.11977168172597885, -0.29228851199150085, -0.12477394193410873, -0.0585002675652504, 0.00949772261083126, -0.12812887132167816, -0.035961661487817764, 0.24648740887641907, -0.1470748484134674, -0.03690847381949425, 0.2516249418258667, 0.41556721925735474, -0.28890979290008545, -0.2319846749305725, -0.08478479832410812, 0.36070337891578674, 0.03692517429590225, -0.015604265034198761, 0.10472047328948975, 0.018479786813259125, 0.016375593841075897, 0.23764677345752716, 0.19080527126789093, 0.5279803276062012, -0.35115766525268555, 0.21308915317058563, -0.0066984668374061584, 0.49848729372024536, -0.2880721092224121, 0.000986829400062561, 0.0786062479019165, -0.10982225090265274, 0.27880948781967163, 0.2556082010269165, 0.2577606439590454, 0.23109260201454163, 0.5544413328170776, -0.27173516154289246, 0.20109377801418304, -0.09082375466823578, -0.14580461382865906, 0.09483243525028229, -0.5044080018997192, -0.09967848658561707, -0.07717691361904144, 0.20683246850967407, 0.05941418930888176, -0.48474210500717163, 0.16822469234466553, -0.5364556312561035, 0.06443901360034943, 0.11186628043651581, 0.009917031973600388, -0.14038345217704773, -0.16560348868370056, 0.1601039469242096, -0.16977664828300476, 0.13480299711227417, -0.17795483767986298, -0.0071474527940154076, -0.3498445451259613, 0.18008406460285187, -0.04186305031180382, 0.18187645077705383, -0.27791279554367065, -0.24067702889442444, 0.2703760266304016, -0.02775019407272339, 0.02735958993434906, 0.3459264039993286, 0.394092857837677, -0.14440374076366425, 0.03348168730735779, -0.029019521549344063, 0.3963523805141449, 0.14636074006557465, 0.12519216537475586, 0.04633430391550064, 0.02717718854546547, -0.005872875452041626, 0.0437907874584198, 0.11650396883487701, -0.12906014919281006, -0.14947807788848877, 0.24203383922576904, 0.12862351536750793, -0.11412221938371658, 0.4488191306591034, -0.1481424868106842, 0.5008343458175659, -0.20005151629447937, 0.018767595291137695, -0.07306966185569763, -0.0779954344034195, 0.033053044229745865, -0.01852380856871605, -0.2659440338611603, 0.11626967787742615, 0.35636645555496216, -0.25154808163642883, 0.04231521487236023, 0.08110520243644714, 0.02738548442721367, 0.26451054215431213, 0.30600935220718384, 0.44682514667510986, 0.2518388032913208, -0.3568881154060364, 0.03427134454250336, -0.49270176887512207, 0.012310642749071121, -0.11990679800510406, 0.059873707592487335, -0.06703708320856094, -0.13744138181209564, -0.19329291582107544, 0.0073967743664979935, 0.2433939129114151, 0.12386052310466766, 0.03209073096513748, -0.35967540740966797, -0.18097630143165588, 0.02835540473461151, 0.16418620944023132, -0.07687148451805115, -0.028910305351018906, -0.2483365535736084, 0.08498868346214294, 0.03616814687848091, 0.007632330060005188, 0.032114382833242416, 0.26620596647262573, -0.18242038786411285, 0.08288809657096863, 0.11967016756534576, 0.20869630575180054, -0.1512884795665741, 0.019879259169101715, -0.26204878091812134, -0.3675251305103302, -0.2061671018600464, -0.07374897599220276, -0.14428523182868958, -0.15789934992790222, 0.47591158747673035, -0.40809208154678345, -0.6267048716545105, -0.48092004656791687, 0.04015989974141121, 0.2221442610025406, 0.05578254163265228, -0.06288153678178787, 0.2799889147281647, -0.20062877237796783, 0.23362571001052856, 0.4583631455898285, 0.18360474705696106, -0.02703288197517395, 0.3842313885688782, -0.16184887290000916, -0.23184236884117126, 0.6239176392555237, -0.512668251991272, -0.2250467836856842, 0.12021571397781372, 0.3630828261375427, 0.15697062015533447, -0.25292178988456726, -0.5197620987892151, 0.026029542088508606, 0.2599581480026245, 0.07038944959640503, -0.05073457956314087, -0.17288102209568024, -0.34028905630111694, 0.12171576172113419, 0.015343137085437775, 0.19718165695667267, 0.10879912972450256, -0.11730875074863434, 0.14272478222846985, -0.2700793743133545 ]
https://github.com/huggingface/datasets/issues/6358
I'm unable to reproduce this with the cache ```bash export HF_CACHE=$PWD/hf_cache python -c "import datasets; datasets.load_dataset('imdb')" ``` imported inside a dummy container that is built from ```bash FROM python:3.9 WORKDIR /usr/src/app RUN pip install datasets COPY ./hf_cache ./hf_cache ENV HF_HOME=./hf_cache ENV HF_DATASETS_OFFLINE=1 CMD ["python"] ``` What do you mean by "absolute paths written into the cache"? Paths inside the HF cache paths are based on hash (hashed URL of the downloaded files, etc.)
Mounting datasets cache fails due to absolute paths.
### Describe the bug Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache. ### Steps to reproduce the bug 1. Create a datasets cache by downloading some data 2. Mount the dataset folder into a docker container or remote system. 3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache. 4. Attempt to access the data from within the docker container. 5. An error is thrown saying no file exists at \<absolute path to original cache location\> ### Expected behavior The data is loaded without error ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3
73
Mounting datasets cache fails due to absolute paths. ### Describe the bug Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache. ### Steps to reproduce the bug 1. Create a datasets cache by downloading some data 2. Mount the dataset folder into a docker container or remote system. 3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache. 4. Attempt to access the data from within the docker container. 5. An error is thrown saying no file exists at \<absolute path to original cache location\> ### Expected behavior The data is loaded without error ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.16.4 - PyArrow version: 13.0.0 - Pandas version: 2.0.3 I'm unable to reproduce this with the cache ```bash export HF_CACHE=$PWD/hf_cache python -c "import datasets; datasets.load_dataset('imdb')" ``` imported inside a dummy container that is built from ```bash FROM python:3.9 WORKDIR /usr/src/app RUN pip install datasets COPY ./hf_cache ./hf_cache ENV HF_HOME=./hf_cache ENV HF_DATASETS_OFFLINE=1 CMD ["python"] ``` What do you mean by "absolute paths written into the cache"? Paths inside the HF cache paths are based on hash (hashed URL of the downloaded files, etc.)
[ 0.013612456619739532, 0.28743523359298706, 0.03356702998280525, 0.12142452597618103, 0.17181266844272614, 0.09251341223716736, 0.315844863653183, 0.2463112622499466, 0.07502992451190948, 0.018458478152751923, 0.02460268884897232, 0.11198748648166656, -0.14733318984508514, -0.6419860124588013, 0.13109853863716125, 0.014099789783358574, 0.1335093080997467, 0.06422437727451324, -0.24872055649757385, -0.14073015749454498, -0.07715533673763275, 0.09483166038990021, 0.07851247489452362, 0.07559196650981903, -0.221244677901268, 0.048822954297065735, -0.08810077607631683, 0.26055026054382324, 0.13072776794433594, -0.4059944152832031, 0.452038437128067, 0.09058740735054016, 0.11800538003444672, 0.8036795854568481, -0.00012296682689338923, 0.15374884009361267, 0.3032831847667694, 0.006710909307003021, -0.3999972641468048, -0.42056265473365784, -0.5888275504112244, -0.07353129237890244, 0.02012510597705841, -0.28147241473197937, -0.036621931940317154, 0.1560526192188263, -0.061638474464416504, -0.4994266629219055, 0.46251359581947327, 0.21138215065002441, 0.11135253310203552, 0.06044355779886246, -0.2504682242870331, 0.014194902032613754, 0.4261486530303955, 0.048728153109550476, -0.2090853601694107, 0.3885599672794342, -0.019581545144319534, 0.04171278327703476, 0.06616056710481644, 0.1222909688949585, -0.20325462520122528, 0.15780089795589447, 0.26931390166282654, -0.02407156489789486, -0.5108442902565002, 0.002989223226904869, 0.06430162489414215, 0.4179507791996002, 0.6023054122924805, -0.4732583165168762, -0.6145086884498596, -0.27771106362342834, -0.21287985146045685, -0.13202941417694092, 0.37619736790657043, 0.04093436151742935, 0.02306247130036354, 0.24840885400772095, -0.1454237997531891, -0.1317676305770874, -0.3244428038597107, 0.07582926750183105, -0.0796990841627121, -0.029658254235982895, -0.125552698969841, 0.15581321716308594, -0.1916227638721466, 0.20270484685897827, 0.4021952748298645, -0.26402395963668823, 0.17696556448936462, 0.17168892920017242, -0.15489119291305542, 0.22987337410449982, -0.022484779357910156, 0.16647060215473175, 0.22831444442272186, -0.0651361420750618, 0.07550048828125, 0.019784841686487198, -0.3091576099395752, 0.29615408182144165, -0.021901948377490044, 0.41230490803718567, -0.15229769051074982, 0.0689496397972107, 0.3302200734615326, 0.0811867043375969, -0.23691734671592712, -0.22834303975105286, -0.09369970113039017, -0.12311814725399017, 0.08835679292678833, 0.10411138832569122, 0.07403437048196793, -0.3742205500602722, -0.15180253982543945, 0.1346232146024704, 0.16258639097213745, 0.28629186749458313, 0.18269920349121094, 0.3109828531742096, -0.05079854279756546, 0.026819147169589996, 0.03993953764438629, 0.19902412593364716, 0.03332546353340149, 0.20338177680969238, -0.09757422655820847, 0.09658686816692352, -0.25272923707962036, 0.22552847862243652, 0.17134201526641846, 0.0670822262763977, 0.2063373476266861, 0.12713050842285156, 0.15775592625141144, -0.03940964862704277, -0.050178587436676025, -0.20259961485862732, 0.16238893568515778, 0.35643327236175537, 0.07260625064373016, 0.3310391902923584, 0.16608478128910065, 0.10691647231578827, -0.01714339852333069, 0.18689194321632385, -0.15942153334617615, -0.23800089955329895, 0.16819271445274353, -0.02167489565908909, -0.22185859084129333, 0.36667728424072266, -0.27469977736473083, -0.1542198359966278, 0.06816013157367706, -0.10090656578540802, 0.16471466422080994, -0.13520677387714386, -0.036152370274066925, -0.18306505680084229, 0.3531644940376282, 0.679311215877533, -0.16986185312271118, 0.18231725692749023, -0.014848202466964722, 0.1028662621974945, -0.08433471620082855, 0.28236982226371765, 0.021878205239772797, 0.03172774240374565, -0.36064499616622925, -0.15739017724990845, 0.10847406089305878, -0.5388995409011841, -0.5888360738754272, 0.2693691551685333, 0.06053033471107483, 0.3353240489959717, 0.1714639961719513, -0.10034152120351791, 0.19041034579277039, -0.048242129385471344, -0.09062841534614563, 0.2717195749282837, 0.09553501009941101, -0.2209159880876541, -0.2927921414375305, -0.13115084171295166, -0.11455974727869034, -0.017505329102277756, 0.4338061213493347, 0.14348651468753815, 0.2646626830101013, 0.12308647483587265, 0.21074867248535156, -0.07127413153648376, -0.022602364420890808, 0.5356683135032654, 0.324087530374527, 0.2506568133831024, 0.08890683203935623, -0.212794229388237, -0.26827964186668396, 0.4024035930633545, -0.0694829672574997, -0.3721259832382202, -0.28655755519866943, -0.21269087493419647, 0.0843023955821991, 0.17408080399036407, -0.1291854828596115, 0.14683105051517487, 0.049809105694293976, 0.20112484693527222, 0.0764353945851326, 0.14337576925754547, -0.09508243203163147, 0.6342452764511108, -0.07297810167074203, 0.09851887822151184, 0.14299803972244263, 0.2300589233636856, 0.05212721973657608, -0.0926705077290535, -0.2968006730079651, 0.2928593158721924, 0.38079261779785156, -0.2105695754289627, -0.16602641344070435, 0.47533276677131653, 0.04430750757455826, 0.13355249166488647, -0.07511608302593231, 0.37436145544052124, 0.32402461767196655, -0.19182854890823364, -0.06365843862295151, -0.1297326385974884, 0.013741541653871536, 0.09092729538679123, -0.16437697410583496, 0.040028125047683716, -0.5190689563751221, 0.33336710929870605, 0.06693775951862335, -0.10732495784759521, 0.046901389956474304, 0.01656094193458557, -0.14389553666114807, -0.06997304409742355, 0.37877127528190613, 0.10242286324501038, 0.3077183663845062, -0.28063294291496277, 0.017390795052051544, 0.12548291683197021, 0.030255787074565887, 0.1917267143726349, 0.20950554311275482, 0.14526796340942383, -0.19504675269126892, -0.09128543734550476, 0.2576122283935547, 0.3280686140060425, 0.21323396265506744, 0.11139789968729019, 0.3693337142467499, 0.1428995430469513, -0.16722321510314941, 0.03505747392773628, -0.05504181236028671, 0.11283950507640839, -0.026052160188555717, 0.0894450843334198, 0.04760413244366646, 0.3370344936847687, -0.008597031235694885, -0.35057777166366577, -0.23600473999977112, 0.02767639048397541, -0.25525063276290894, 0.3459981083869934, -0.33479028940200806, 0.30257534980773926, -0.09244202077388763, -0.33984610438346863, -0.08410806953907013, -0.31402015686035156, -0.18658211827278137, 0.4489864110946655, 0.12157739698886871, 0.061180636286735535, -0.24565237760543823, 0.12213596701622009, -0.06878091394901276, -0.0927421897649765, -0.17358937859535217, -0.07159698754549026, -0.16267293691635132, -0.15081650018692017, 0.007554307579994202, 0.010870661586523056, 0.1384909749031067, -0.09513327479362488, 0.1794697642326355, -0.4830433130264282, -0.29772865772247314, 0.05129719153046608, 0.19472840428352356, 0.6245663166046143, 0.11473355442285538, 0.12604178488254547, -0.24267901480197906, -0.015997175127267838, 0.07907165586948395, 0.015233151614665985, 0.24012169241905212, 0.019368141889572144, -0.16548985242843628, -0.18275466561317444, -0.045969683676958084, 0.010518435388803482, -0.3185482323169708, -0.3010316789150238, 0.22828537225723267, 0.032540880143642426, 0.07832922041416168, 0.09632585942745209, 0.03485092520713806, 0.10732559859752655, -0.09268330037593842, 0.14918473362922668, -0.16224783658981323, -0.5347027778625488, 0.3142838776111603, -0.2925454378128052, -0.2447909265756607, -0.00824437290430069, -0.0315718874335289, 0.09720100462436676, 0.3179740905761719, -0.5880428552627563, -0.1897851526737213, -0.09005508571863174, 0.28508755564689636, 0.020118528977036476, 0.01910880021750927, 0.05211123451590538, -0.07593503594398499, 0.09887896478176117, -0.4793121814727783, -0.06614644825458527, 0.0365716852247715, -0.06757588684558868, 0.2030314803123474, 0.1943035125732422, 0.17183548212051392, 0.31584829092025757, 0.7245544791221619, 0.1135784387588501, 0.0509575754404068, 0.4646965265274048, 0.04455875605344772, 0.9024466276168823, -0.100473552942276, -0.31067928671836853, -0.03490671515464783, 0.06628146767616272, -0.24880120158195496, -0.03524370491504669, 0.34778550267219543, 0.3443838655948639, 0.07111993432044983, -0.19744734466075897, -0.1166258379817009, -0.2149512767791748, 0.004808491095900536, -0.4304501414299011, 0.06426730751991272, 0.24167247116565704, -0.017334699630737305, -0.29730406403541565, -0.08061091601848602, 0.15726637840270996, 0.5834912657737732, 0.4531533122062683, 0.31255894899368286, 0.057651057839393616, -0.020418301224708557, -0.24238409101963043, -0.13062143325805664, -0.05782105773687363, 0.521034836769104, -0.40020254254341125, 0.49290239810943604, -0.06174015998840332, -0.05622737854719162, 0.8370707631111145, -0.24557064473628998, 0.0209526177495718, -0.05363088473677635, 0.013632863759994507, -0.48666825890541077, 0.1300840824842453, 0.31130045652389526, 0.34874415397644043, -0.1557161509990692, 0.11535719037055969, -0.030293509364128113, 0.24849875271320343, -0.36999228596687317, 0.3945263624191284, -0.15210489928722382, -0.44836971163749695, -0.09546230733394623, -0.06566810607910156, -0.0018766000866889954, -0.07875549793243408, -0.001459367573261261, -0.31523171067237854, 0.09355985373258591, -0.1663784682750702, -0.1994934380054474, -0.014498129487037659, -0.08692198991775513, 0.10548892617225647, 0.3299066126346588, -0.40027379989624023, 0.13297228515148163, 0.3977828323841095, -0.09261460602283478, 0.38911256194114685, 0.34389984607696533, -0.3876872956752777, 0.22965097427368164, -0.08896666765213013, -0.2560620903968811, -0.11098827421665192, 0.28326961398124695, -0.21267859637737274, -0.10081644356250763, 0.11640094220638275, -0.08823093771934509, -0.0313631109893322, 0.06778936833143234, -0.16667577624320984, 0.034010205417871475, 0.03546495735645294, -0.34133294224739075, 0.5803906917572021, 0.1872844249010086, -0.23909103870391846, 0.48009106516838074, 0.5708154439926147, -0.5989267826080322, 0.44917240738868713, -0.011906296014785767, 0.828244686126709, -0.1858195960521698, 0.15596400201320648, 0.14555740356445312, -0.2544557750225067, 0.508192241191864, -0.2600919306278229, -0.01652335934340954, -0.234201580286026, -0.4341951608657837, -0.17075380682945251, -0.30717211961746216, 0.09510593861341476, 0.050784122198820114, -0.09151599556207657, 0.3228016495704651, -0.3412848114967346, 0.22273805737495422, 0.04038117080926895, -0.28116196393966675, -0.040730077773332596, -0.20625320076942444, -0.0578475184738636, 0.14644579589366913, 0.003915373235940933, 0.12009915709495544, -0.1981050670146942, -0.09042122960090637, -0.19173207879066467, 0.09049894660711288, -0.2923493981361389, 0.068437859416008, -0.268942654132843, 0.19998356699943542, 0.1059466004371643, -0.31386321783065796, -0.04724372923374176, 0.00856554415076971, 0.5459791421890259, 0.07868267595767975, -0.27304932475090027, 0.03338206186890602, 0.12078865617513657, -0.07840240001678467, -0.06586645543575287, -0.03082333877682686, 0.07804287225008011, 0.06649209558963776, 0.06679058074951172, -0.2351590096950531, -0.3698332905769348, -0.39987820386886597, 0.39137694239616394, -0.09425407648086548, 0.3176928162574768, 0.19062183797359467, -0.386056512594223, -0.05292876809835434, 0.010330252349376678, -0.2534230351448059, 0.04562556743621826, 0.06260814517736435, -0.03295300900936127, 0.23182803392410278, -0.043094463646411896, -0.014430426061153412, 0.12550833821296692, 0.48169565200805664, -0.21844123303890228, -0.20661497116088867, 0.23367328941822052, -0.0420011430978775, -0.38628119230270386, 0.00901445746421814, -0.032598815858364105, 0.22570911049842834, -0.2232286036014557, -0.07889725267887115, -0.40381067991256714, 0.2431589514017105, -0.1727430373430252, -0.4941890239715576, 0.4939202070236206, -0.05026929825544357, -0.19996926188468933, -0.6313783526420593, -0.23390458524227142, 0.09491169452667236, -0.4082137942314148, 0.09306390583515167, -0.04394787177443504, -0.4365217089653015, 0.09830699861049652, -0.137282595038414, -0.18703874945640564, 0.07691095769405365, -0.2745150625705719, -0.08210231363773346, 0.19897502660751343, 0.1428460031747818, 0.04226554557681084, -0.2497681826353073, -0.0006220079958438873, 0.21587081253528595, -0.11838778853416443, -0.05478070676326752, -0.35541829466819763, 0.19726864993572235, 0.2090887725353241, -0.11028537154197693, -0.036148350685834885, -0.21133165061473846, 0.005970759317278862, -0.17597979307174683, 0.20168288052082062, 0.5109738111495972, -0.036180686205625534, -0.0974869579076767, -0.09249599277973175, 0.10379038006067276, -0.5220097303390503, 0.11622505635023117, 0.00497925840318203, 0.1772296130657196, 0.10940594971179962, 0.20623251795768738, -0.15181319415569305, -0.07421495765447617, -0.23372742533683777, -0.014151118695735931, -0.2473200261592865, 0.0022560134530067444, 0.42035597562789917, -0.285500168800354, 0.2800922989845276, 0.42954322695732117, 0.3039194345474243, -0.28940314054489136, -0.29257500171661377, -0.09702309966087341, 0.2863495349884033, 0.033042892813682556, 0.02063637226819992, -0.03537013381719589, -0.026512380689382553, 0.05920232832431793, 0.12589071691036224, 0.1360224485397339, 0.5941235423088074, -0.40258461236953735, 0.1401316523551941, -0.012039460241794586, 0.6110982298851013, -0.4453478455543518, 0.021140307188034058, 0.15545350313186646, -0.11779461055994034, 0.3252755105495453, 0.14452147483825684, 0.187871515750885, 0.08978690207004547, 0.7990310788154602, -0.11997761577367783, 0.20794536173343658, 0.27379053831100464, -0.2875349521636963, 0.028758708387613297, -0.47275322675704956, -0.011815102770924568, -0.03066243976354599, 0.26375266909599304, 0.08427895605564117, -0.4435095489025116, -0.18483467400074005, -0.4356045126914978, 0.1288316547870636, 0.1897183656692505, -0.16380104422569275, -0.14974768459796906, -0.0238330140709877, 0.23396411538124084, -0.12990611791610718, 0.08080266416072845, -0.2779143452644348, -0.01821906864643097, -0.16989432275295258, 0.08775857090950012, 0.1081802025437355, 0.13353510200977325, -0.20056000351905823, -0.051886700093746185, 0.2794651687145233, -0.0213443785905838, -0.10728568583726883, 0.30391570925712585, 0.26183629035949707, 0.01052412111312151, 0.036859601736068726, -0.15240667760372162, 0.43037891387939453, 0.30682802200317383, 0.008578523993492126, -0.03120507299900055, 0.030319366604089737, -0.08792592585086823, 0.054355621337890625, 0.1661854088306427, -0.1879458725452423, -0.1301795393228531, 0.16385695338249207, 0.09668393433094025, -0.0627879649400711, 0.5051052570343018, -0.014833550900220871, 0.39539051055908203, -0.1871557980775833, 0.04940227419137955, -0.005550340749323368, -0.14740586280822754, 0.0902368575334549, -0.01883675903081894, -0.1891082227230072, -0.031225400045514107, 0.6077620387077332, -0.29007548093795776, 0.07172375172376633, 0.1395401507616043, 0.00930161401629448, 0.12589633464813232, 0.22052346169948578, 0.4641695022583008, 0.27188947796821594, -0.3837030529975891, 0.15548372268676758, -0.5039096474647522, 0.0233694389462471, -0.2423144280910492, -0.047722745686769485, 0.09400385618209839, -0.06225422024726868, -0.24603943526744843, 0.010791009292006493, 0.3304576873779297, 0.1381300687789917, 0.06048141419887543, -0.26930704712867737, -0.20973676443099976, -0.0819176733493805, 0.18348893523216248, -0.07194527238607407, -0.17719444632530212, -0.42499175667762756, 0.10453588515520096, 0.03320794552564621, -0.009026870131492615, 0.040605559945106506, 0.03711271286010742, -0.01776449754834175, 0.16663435101509094, 0.2068205326795578, 0.13157688081264496, 0.14759448170661926, 0.05452152341604233, -0.20427778363227844, -0.3640500605106354, -0.23963697254657745, -0.0166265070438385, -0.11467649042606354, -0.17537400126457214, 0.4394862651824951, -0.39113369584083557, -0.606081485748291, -0.3722562789916992, -0.021909669041633606, 0.05459785461425781, 0.010652009397745132, -0.07333758473396301, 0.2340664565563202, -0.29849591851234436, 0.3112175166606903, 0.4318600296974182, -0.008366704918444157, 0.043432384729385376, 0.4212639033794403, -0.11824234575033188, -0.1678059846162796, 0.48753005266189575, -0.4403073191642761, -0.3111037313938141, -0.03620176017284393, 0.37101560831069946, -0.04801099747419357, -0.14479459822177887, -0.46252626180648804, -0.04111310839653015, 0.38132598996162415, -0.05938520282506943, -0.11096286028623581, -0.20395679771900177, -0.16415280103683472, 0.2759944200515747, 0.029137343168258667, 0.13403141498565674, -0.07915997505187988, -0.08884667605161667, 0.015867337584495544, -0.25226008892059326 ]
https://github.com/huggingface/datasets/issues/6354
I am having issues as well with this. However, the error I am getting is : `RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.` Also did not work with pyspark==3.3.0 and py4j==0.10.9.5
`IterableDataset.from_spark` does not support multiple workers in pytorch `Dataloader`
### Describe the bug Looks like `IterableDataset.from_spark` does not support multiple workers in pytorch `Dataloader` if I'm not missing anything. Also, returns not consistent error messages, which probably depend on the nondeterministic order of worker executions Some exampes I've encountered: ``` File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__ yield from self.generate_examples_fn() File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id")) File "/databricks/spark/python/pyspark/instrumentation_utils.py", line 54, in wrapper logger.log_failure( File "/databricks/spark/python/pyspark/databricks/usage_logger.py", line 70, in log_failure self.logger.recordFunctionCallFailureEvent( File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__ return_value = get_return_value( File "/databricks/spark/python/pyspark/errors/exceptions/captured.py", line 188, in deco return f(*a, **kw) File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 342, in get_return_value return OUTPUT_CONVERTER[type](answer[2:], gateway_client) KeyError: 'c' ``` ``` File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__ yield from self.generate_examples_fn() File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id")) File "/databricks/spark/python/pyspark/sql/utils.py", line 162, in wrapped return f(*args, **kwargs) File "/databricks/spark/python/pyspark/sql/functions.py", line 4893, in spark_partition_id return _invoke_function("spark_partition_id") File "/databricks/spark/python/pyspark/sql/functions.py", line 98, in _invoke_function return Column(jf(*args)) File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__ return_value = get_return_value( File "/databricks/spark/python/pyspark/errors/exceptions/captured.py", line 188, in deco return f(*a, **kw) File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 342, in get_return_value return OUTPUT_CONVERTER[type](answer[2:], gateway_client) KeyError: 'm' ``` ``` File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__ yield from self.generate_examples_fn() File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id")) File "/databricks/spark/python/pyspark/sql/utils.py", line 162, in wrapped return f(*args, **kwargs) File "/databricks/spark/python/pyspark/sql/functions.py", line 4893, in spark_partition_id return _invoke_function("spark_partition_id") File "/databricks/spark/python/pyspark/sql/functions.py", line 97, in _invoke_function jf = _get_jvm_function(name, SparkContext._active_spark_context) File "/databricks/spark/python/pyspark/sql/functions.py", line 88, in _get_jvm_function return getattr(sc._jvm.functions, name) File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1725, in __getattr__ raise Py4JError(message) py4j.protocol.Py4JError: functions does not exist in the JVM ``` ### Steps to reproduce the bug ```python import pandas as pd import numpy as np batch_size = 16 pdf = pd.DataFrame({ key: np.random.rand(16*100) for key in ['feature', 'target'] }) test_df = spark.createDataFrame(pdf) from datasets import IterableDataset from torch.utils.data import DataLoader ids = IterableDataset.from_spark(test_df) for batch in DataLoader(ids, batch_size=16, num_workers=4): for k, b in batch.items(): print(k, b.shape, sep='\t') print('\n') ``` ### Expected behavior For `num_workers` equal to 0 or 1 works fine as expected: ``` feature torch.Size([16]) target torch.Size([16]) feature torch.Size([16]) target torch.Size([16]) .... ``` Expected to support workers >1. ### Environment info Databricks 13.3 LTS ML runtime - Spark 3.4.1 pyspark==3.4.1 py4j==0.10.9.7 datasets==2.13.1 and also tested with datasets==2.14.6
62
`IterableDataset.from_spark` does not support multiple workers in pytorch `Dataloader` ### Describe the bug Looks like `IterableDataset.from_spark` does not support multiple workers in pytorch `Dataloader` if I'm not missing anything. Also, returns not consistent error messages, which probably depend on the nondeterministic order of worker executions Some exampes I've encountered: ``` File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__ yield from self.generate_examples_fn() File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id")) File "/databricks/spark/python/pyspark/instrumentation_utils.py", line 54, in wrapper logger.log_failure( File "/databricks/spark/python/pyspark/databricks/usage_logger.py", line 70, in log_failure self.logger.recordFunctionCallFailureEvent( File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__ return_value = get_return_value( File "/databricks/spark/python/pyspark/errors/exceptions/captured.py", line 188, in deco return f(*a, **kw) File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 342, in get_return_value return OUTPUT_CONVERTER[type](answer[2:], gateway_client) KeyError: 'c' ``` ``` File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__ yield from self.generate_examples_fn() File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id")) File "/databricks/spark/python/pyspark/sql/utils.py", line 162, in wrapped return f(*args, **kwargs) File "/databricks/spark/python/pyspark/sql/functions.py", line 4893, in spark_partition_id return _invoke_function("spark_partition_id") File "/databricks/spark/python/pyspark/sql/functions.py", line 98, in _invoke_function return Column(jf(*args)) File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__ return_value = get_return_value( File "/databricks/spark/python/pyspark/errors/exceptions/captured.py", line 188, in deco return f(*a, **kw) File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 342, in get_return_value return OUTPUT_CONVERTER[type](answer[2:], gateway_client) KeyError: 'm' ``` ``` File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__ yield from self.generate_examples_fn() File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id")) File "/databricks/spark/python/pyspark/sql/utils.py", line 162, in wrapped return f(*args, **kwargs) File "/databricks/spark/python/pyspark/sql/functions.py", line 4893, in spark_partition_id return _invoke_function("spark_partition_id") File "/databricks/spark/python/pyspark/sql/functions.py", line 97, in _invoke_function jf = _get_jvm_function(name, SparkContext._active_spark_context) File "/databricks/spark/python/pyspark/sql/functions.py", line 88, in _get_jvm_function return getattr(sc._jvm.functions, name) File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1725, in __getattr__ raise Py4JError(message) py4j.protocol.Py4JError: functions does not exist in the JVM ``` ### Steps to reproduce the bug ```python import pandas as pd import numpy as np batch_size = 16 pdf = pd.DataFrame({ key: np.random.rand(16*100) for key in ['feature', 'target'] }) test_df = spark.createDataFrame(pdf) from datasets import IterableDataset from torch.utils.data import DataLoader ids = IterableDataset.from_spark(test_df) for batch in DataLoader(ids, batch_size=16, num_workers=4): for k, b in batch.items(): print(k, b.shape, sep='\t') print('\n') ``` ### Expected behavior For `num_workers` equal to 0 or 1 works fine as expected: ``` feature torch.Size([16]) target torch.Size([16]) feature torch.Size([16]) target torch.Size([16]) .... ``` Expected to support workers >1. ### Environment info Databricks 13.3 LTS ML runtime - Spark 3.4.1 pyspark==3.4.1 py4j==0.10.9.7 datasets==2.13.1 and also tested with datasets==2.14.6 I am having issues as well with this. However, the error I am getting is : `RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.` Also did not work with pyspark==3.3.0 and py4j==0.10.9.5
[ -0.28735220432281494, -0.16247272491455078, -0.06743581593036652, 0.5066515207290649, -0.03184495121240616, -0.3001953959465027, 0.7239212393760681, -0.012372683733701706, -0.012353334575891495, 0.030812911689281464, 0.008178908377885818, 0.445117712020874, -0.003525044769048691, 0.015948012471199036, -0.1470773071050644, -0.0500490628182888, -0.0534568689763546, -0.08822028338909149, -0.4748924970626831, 0.08345551788806915, -0.250813364982605, 0.3793138861656189, -0.18931114673614502, 0.09771355241537094, -0.411388099193573, -0.1263248473405838, -0.26578831672668457, 0.00044086016714572906, 0.3202952444553375, -0.23772908747196198, 0.26636892557144165, 0.169984370470047, 0.09847044944763184, 0.7632467150688171, -0.0001190683979075402, 0.07295958697795868, 0.28211304545402527, 0.11122319102287292, -0.020859453827142715, -0.32778099179267883, 0.17495307326316833, -0.23814931511878967, 0.25343599915504456, -0.40419062972068787, 0.2138614058494568, -0.2514370381832123, 0.0840500220656395, 0.004519328474998474, 0.3865968585014343, 0.11346974968910217, 0.17539876699447632, 0.17944574356079102, -0.16484570503234863, -0.06815442442893982, -0.0025077518075704575, 0.019266847521066666, 0.03774838149547577, 0.3531457483768463, 0.1335034966468811, -0.05465460568666458, -0.44700202345848083, -0.028259363025426865, 0.005894899368286133, 0.3765612542629242, 0.2280714213848114, -0.0020801499485969543, -0.1865129917860031, -0.3506026864051819, -0.0876375287771225, 0.17230938374996185, 0.3391120731830597, -0.24365323781967163, -0.29787319898605347, -0.312391996383667, -0.1339435577392578, -0.015518847852945328, 0.464664101600647, 0.05275328457355499, -0.054289061576128006, -0.14405949413776398, -0.0945381298661232, 0.28170540928840637, -0.13772399723529816, -0.020488668233156204, -0.18611493706703186, 0.48040494322776794, -0.07621447741985321, 0.25193870067596436, 0.49896568059921265, 0.059287022799253464, 0.339578777551651, -0.038983799517154694, 0.26646551489830017, -0.11366251111030579, -0.32113268971443176, -0.1440051943063736, 0.0442214198410511, -0.49905911087989807, -0.17652952671051025, 0.06989120692014694, -0.05995341017842293, -0.10224556922912598, -0.011476647108793259, 0.11170117557048798, 0.44766148924827576, -0.2353956699371338, -0.020749811083078384, 0.3077006936073303, 0.42914092540740967, 0.08770870417356491, -0.022297918796539307, 0.013652032241225243, -0.0231182761490345, -0.528381884098053, 0.2814161777496338, 0.13515377044677734, 0.08944445848464966, 0.19957835972309113, -0.26968756318092346, -0.2591801881790161, -0.4311305582523346, -0.30598896741867065, -0.024440916255116463, 0.17073291540145874, -0.1925356388092041, -0.12106789648532867, -0.009745001792907715, 0.19680222868919373, 0.09801019728183746, -0.049321822822093964, -0.08357468247413635, 0.132407546043396, 0.13446299731731415, -0.0056944433599710464, 0.08950068056583405, -0.2721693813800812, 0.2501555383205414, 0.37434738874435425, -0.11885800212621689, -0.17238405346870422, 0.18756745755672455, -0.49689003825187683, -0.22264932096004486, -0.08719557523727417, 0.11809335649013519, 0.35689592361450195, -0.1627976894378662, 0.1332765519618988, -0.0027740299701690674, 0.08702131360769272, -0.2945896089076996, -0.1962859332561493, -0.3852919936180115, 0.1321282833814621, -0.1346578598022461, -0.1164005696773529, -0.1952381432056427, -0.2121475785970688, 0.2570597529411316, -0.20164458453655243, 0.1585032343864441, -0.38851526379585266, -0.14548256993293762, -0.2743120491504669, -0.14544782042503357, 0.4607738256454468, -0.1209351122379303, -0.058502815663814545, 0.023888394236564636, 0.014024898409843445, 0.3227938413619995, 0.17124372720718384, -0.16752859950065613, 0.300376832485199, -0.433815598487854, 0.2110660970211029, -0.002576403319835663, -0.24104516208171844, -0.09295625984668732, 0.6665254831314087, 0.12318506836891174, 0.2972894310951233, 0.3068530261516571, 0.0684674009680748, 0.2992381453514099, -0.1994098722934723, 0.32684433460235596, 0.21083340048789978, -0.06265828758478165, 0.0508265420794487, -0.05807342380285263, -0.024743299931287766, 0.11496181786060333, 0.07238888740539551, 0.3019167482852936, -0.17935261130332947, -0.005177881568670273, -0.08106763660907745, 0.3551366627216339, -0.06546775996685028, -0.057510022073984146, 0.268826961517334, -0.06478407979011536, -0.009969927370548248, 0.14165820181369781, -0.2123301923274994, -0.4437013268470764, 0.1951320320367813, -0.027896765619516373, -0.09340925514698029, 0.044538624584674835, 0.0992865115404129, -0.004048895090818405, 0.025414571166038513, -0.453347772359848, -0.12384872883558273, 0.05040925368666649, 0.2893650531768799, -0.1355069875717163, -0.0744907483458519, -0.06380540132522583, 0.3739984631538391, -0.2559725046157837, -0.12196187674999237, -0.1092265248298645, 0.46642476320266724, -0.11324708163738251, -0.28032466769218445, -0.05738961324095726, 0.16944757103919983, 0.2352035641670227, -0.26536357402801514, -0.0026551317423582077, 0.25092366337776184, 0.12488417327404022, 0.23618686199188232, -0.3098643720149994, 0.24670149385929108, 0.3818816542625427, 0.17996324598789215, -0.08033457398414612, 0.4491986930370331, -0.1444207727909088, -0.17618468403816223, 0.16262075304985046, 0.3996829688549042, -0.5273168683052063, 0.2802881598472595, 0.026593193411827087, 0.12060797214508057, 0.3360781967639923, 0.09901357442140579, -0.16647891700267792, 0.13128209114074707, 0.22352367639541626, -0.14630477130413055, 0.11843378841876984, -0.07189859449863434, -0.5339334011077881, -0.10358352959156036, 0.2317710816860199, 0.16434916853904724, 0.19029974937438965, -0.0766705796122551, -0.1430349051952362, -0.1414090096950531, 0.2498435229063034, 0.5794194936752319, 0.5155055522918701, 0.0005638599395751953, -0.02944984659552574, -0.2597331404685974, 0.006801377981901169, -0.12241626530885696, 0.035139042884111404, -0.07014112174510956, 0.3873964548110962, 0.33155691623687744, 0.03716927394270897, 0.1291845142841339, 0.017937585711479187, -0.3299497663974762, 0.19031211733818054, 0.23935151100158691, -0.25926220417022705, 0.17124909162521362, -0.16999758780002594, -0.43184399604797363, -0.25578510761260986, -0.00545075535774231, -0.1938309222459793, -0.2837319076061249, -0.18781422078609467, 0.7786916494369507, -0.08480747044086456, 0.2495228797197342, 0.23106344044208527, -0.03319409489631653, 0.057227782905101776, 0.16818535327911377, -0.34284916520118713, 0.17006224393844604, -0.09529969096183777, -0.011928059160709381, 0.30698058009147644, -0.24304862320423126, 0.29485809803009033, -0.003143325448036194, -0.30488672852516174, -0.6749900579452515, 0.1751231551170349, 0.23846599459648132, 0.04593363404273987, 0.37420323491096497, 0.2976454496383667, -0.0985143631696701, -0.14495079219341278, -0.381348192691803, 0.32210683822631836, -0.27754995226860046, -0.07143951952457428, 0.24728459119796753, -0.27760496735572815, 0.2451530545949936, 0.05721202492713928, -0.007767725735902786, -0.35871806740760803, -0.29514947533607483, 0.13562172651290894, 0.0002251267433166504, 0.3181816339492798, 0.07808022201061249, -0.08712945133447647, -0.014220412820577621, 0.23813733458518982, -0.3717273473739624, -0.01185460202395916, -0.11543238908052444, 0.33796587586402893, -0.17929042875766754, -0.32291850447654724, -0.08236207067966461, -0.007807005196809769, 0.016248662024736404, 0.04230184480547905, -0.3515017628669739, -0.4802006781101227, -0.04463541507720947, 0.19447940587997437, -0.2508505880832672, -0.05261731892824173, 0.4819810688495636, 0.05507339537143707, 0.10324814915657043, -0.05359979718923569, -0.19731399416923523, 0.19435253739356995, 0.30084022879600525, 0.032583266496658325, 0.058086033910512924, 0.3996979594230652, 0.11367110908031464, 0.5479575991630554, 0.1827109158039093, -0.06517089903354645, 0.302369624376297, -0.3048976957798004, -0.09843011200428009, 0.21905550360679626, -0.43708327412605286, -0.15860877931118011, -0.44016945362091064, 0.025870487093925476, 0.05931355059146881, -0.4886816143989563, -0.08264806866645813, 0.1262555718421936, -0.006466589868068695, -0.2542283833026886, -0.09544362872838974, 0.29332488775253296, -0.45810186862945557, 0.15854886174201965, -0.3699074983596802, 0.07666275650262833, -0.1328597366809845, 0.04670429229736328, -0.02754654362797737, -0.11636073887348175, 0.4304790794849396, -0.024934574961662292, 0.015001431107521057, -0.13196368515491486, -0.14434045553207397, 0.1739318072795868, 0.22464683651924133, 0.16959813237190247, 0.2403004914522171, 0.19567295908927917, 0.2322864830493927, -0.08955536782741547, 0.9298154711723328, -0.013476778753101826, 0.042912986129522324, 0.09002382308244705, -0.5112492442131042, -0.32873624563217163, -0.29659488797187805, -0.4046291708946228, 0.11665085703134537, 0.3762258291244507, 0.6277812719345093, -0.17435340583324432, -0.17813007533550262, 0.3453303277492523, -0.18150678277015686, -0.23603752255439758, -0.3538108468055725, -0.22594623267650604, -0.21184298396110535, -0.20236900448799133, 0.13268274068832397, 0.25805771350860596, 0.2670964002609253, -0.2313675731420517, -0.08067474514245987, 0.058840177953243256, -0.22251103818416595, -0.05612456426024437, 0.14043691754341125, 0.2475004494190216, -0.33242112398147583, 0.17263785004615784, 0.45466360449790955, -0.006179112941026688, 0.16998551785945892, 0.04528422653675079, 0.10090809315443039, -0.11570143699645996, 0.3890478312969208, -0.1142800897359848, 0.21680127084255219, 0.10382644832134247, -0.1055411696434021, 0.08887052536010742, -0.23028767108917236, 0.07193600386381149, -0.09861299395561218, -0.05109238252043724, 0.5583791136741638, -0.09959825873374939, -0.05414880812168121, -0.34892380237579346, 0.16578730940818787, 0.11186684668064117, 0.09410172700881958, 0.3837895095348358, -0.14909404516220093, -0.08483095467090607, 0.36021965742111206, 0.06540125608444214, 0.5198525190353394, -0.006833519786596298, -0.07720720767974854, 0.36089253425598145, -0.023053817451000214, 0.5677491426467896, -0.08112488687038422, 0.38702160120010376, -0.5948235988616943, -0.16102227568626404, 0.1018894836306572, -0.1717185378074646, -0.1194983422756195, 0.08144555985927582, -0.180548757314682, 0.21178749203681946, 0.1679113805294037, 0.13774722814559937, -0.24480906128883362, 0.11685441434383392, -0.24507459998130798, -0.12195197492837906, 0.13880115747451782, 0.019705824553966522, -0.017472103238105774, 0.2761840224266052, -0.2721673548221588, -0.17546215653419495, 0.37596595287323, -0.07824382930994034, -0.3330283761024475, 0.08384428918361664, -0.2959669828414917, 0.4008307158946991, 0.14300650358200073, -0.25683486461639404, -0.023249834775924683, 0.323994904756546, 0.007577033713459969, -0.41297364234924316, 0.09779112786054611, -0.16120892763137817, -0.21405161917209625, 0.062445152550935745, -0.15061435103416443, -0.04198101907968521, 0.3165665566921234, -0.259676992893219, -0.06770934909582138, -0.19587871432304382, 0.009471256285905838, -0.6424801349639893, 0.18183633685112, 0.29297882318496704, -0.20683079957962036, -0.100192591547966, -0.0004566274583339691, 0.045894816517829895, -0.1442919671535492, -0.3405194878578186, 0.04707885906100273, 0.10477511584758759, -0.13343998789787292, 0.23559421300888062, -0.42526939511299133, -0.005618348717689514, -0.02359870634973049, 0.23466342687606812, 0.12424503266811371, 0.09301166236400604, 0.4962014853954315, 0.19973871111869812, -0.043688978999853134, -0.11611127853393555, -0.13456636667251587, 0.11304640769958496, -0.5953401923179626, 0.3299570381641388, -0.30359676480293274, 0.16743771731853485, -0.17254112660884857, 0.2819253206253052, 0.18470188975334167, 0.29650774598121643, -0.20427870750427246, -0.24462787806987762, -0.08516475558280945, 0.09177973866462708, -0.09067563712596893, 0.03232741355895996, 0.03655925393104553, 0.07946956157684326, 0.0018496960401535034, 0.15994882583618164, -0.2361980378627777, 0.08298996835947037, -0.31652456521987915, -0.12071847915649414, 0.3099043071269989, -0.2600094676017761, -0.07642094045877457, 0.21737372875213623, 0.05999371409416199, 0.2453642189502716, 0.11272040009498596, -0.11283115297555923, -0.06358973681926727, 0.09424827992916107, 0.07745732367038727, -0.1265108436346054, 0.006921149790287018, -0.19638073444366455, -0.16894769668579102, -0.10538581013679504, 0.0647893026471138, 0.14451059699058533, -0.05753094330430031, 0.21062339842319489, 0.4133378863334656, 0.21302393078804016, -0.34661293029785156, 0.0634976178407669, 0.08677779883146286, 0.05799181014299393, -0.13715305924415588, 0.44545310735702515, 0.2614368796348572, 0.013391435146331787, -0.1820390522480011, 0.03536892682313919, 0.2636871933937073, 0.21433891355991364, 0.2977888584136963, -0.33304563164711, -0.01168215274810791, -0.05146094784140587, 0.44188520312309265, 0.5267378687858582, -0.2451881319284439, -0.1506626158952713, 0.0832517147064209, 0.18684282898902893, -0.10172568261623383, -0.05970333144068718, 0.08526195585727692, -0.07013066112995148, -0.020058467984199524, 0.2720722258090973, 0.29352641105651855, 0.1256730556488037, 0.15163564682006836, 0.2606048583984375, 0.3327702581882477, -0.5339267253875732, 0.06290856748819351, 0.21489012241363525, -0.132087841629982, 0.021781234070658684, 0.6185001730918884, -0.040773820132017136, 0.18279647827148438, 0.19563017785549164, 0.243255615234375, 0.19203448295593262, 0.15206079185009003, -0.32339411973953247, 0.43864715099334717, -0.34907859563827515, -0.12247331440448761, -0.16814064979553223, -0.07200583815574646, -0.22844766080379486, -0.0562250055372715, 0.023865029215812683, -0.5717101097106934, 0.009732581675052643, -0.3302167057991028, 0.09635139256715775, -0.35640183091163635, 0.11785534024238586, 0.05181468278169632, -0.30310195684432983, -0.04231109470129013, -0.028969574719667435, -0.1577877551317215, -0.013353165239095688, 0.39425426721572876, -0.06343519687652588, -0.29158997535705566, -0.24440838396549225, -0.12474825233221054, -0.006553996820002794, 0.18542958796024323, -0.30556461215019226, 0.07408556342124939, 0.08646766096353531, -0.06889352202415466, -0.4361661970615387, 0.44641387462615967, 0.5251487493515015, 0.26117897033691406, -0.08999095857143402, -0.09956180304288864, -0.2583989202976227, 0.06877546012401581, -0.04065655916929245, 0.18238013982772827, -0.01208426058292389, 0.006377151235938072, 0.1649770587682724, 0.10383811593055725, -0.13032658398151398, 0.3093697428703308, 0.19187180697917938, 0.11411448568105698, -0.0805259495973587, 0.40961048007011414, -0.28713691234588623, -0.22981730103492737, 0.23680326342582703, 0.00984480232000351, -0.11417543143033981, -0.1333080530166626, 0.37597882747650146, -0.04624858498573303, 0.12197442352771759, -0.01805475726723671, 0.0816277265548706, 0.008156947791576385, 0.14974218606948853, 0.3324822187423706, 0.07343661785125732, -0.45761698484420776, 0.006421729922294617, -0.40780961513519287, 0.31632423400878906, 0.04298613220453262, 0.3166675865650177, -0.017724644392728806, 0.45323407649993896, -0.07913433760404587, -0.1756376475095749, 0.22528289258480072, -0.050812553614377975, 0.07964953780174255, 0.4746726155281067, -0.1844857782125473, -0.16402113437652588, -0.01806173473596573, -0.009710149839520454, 0.07752425968647003, -0.3339751362800598, 0.17387773096561432, -0.3355419933795929, 0.09325442463159561, 0.09710192680358887, -0.23973476886749268, 0.3105715215206146, -0.4758835732936859, 0.3384198546409607, 0.12737366557121277, 0.48819687962532043, -0.09656384587287903, -0.008991286158561707, -0.05410630255937576, -0.24279899895191193, -0.24097825586795807, 0.13335970044136047, 0.0371943935751915, 0.3592858910560608, 0.139863520860672, 0.14412714540958405, -0.5992413759231567, 0.2118922770023346, -0.303162157535553, 0.1625402867794037, -0.0760950893163681, 0.10905051231384277, -0.10285637527704239, -0.06476525217294693, 0.16094008088111877, 0.1842680722475052, 0.11747051775455475, 0.09823758155107498, -0.4865341782569885, -0.26680970191955566, 0.07698141783475876, -0.4347417950630188, -0.3086259067058563, -0.42077702283859253, 0.275208979845047, 0.076857790350914, 0.29274871945381165, -0.23167815804481506, -0.11933088302612305, 0.41630908846855164, -0.013730066828429699, 0.0755891352891922, 0.0835639163851738, 0.1734689474105835, -0.035575807094573975, 0.06966693699359894, 0.1265786737203598, 0.15061363577842712, -0.24904194474220276, 0.2690362334251404, -0.21949300169944763 ]
https://github.com/huggingface/datasets/issues/6353
I'm using the latest datasets and fsspec , but still got this error! datasets : Version: 2.13.0 fsspec Version: 2023.10.0 ``` File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/load.py", line 1892, in load_from_disk return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options) File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1371, in load_from_disk dataset_dict[k] = Dataset.load_from_disk( File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1639, in load_from_disk fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options) File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/core.py", line 610, in get_fs_token_paths chain = _un_chain(urlpath0, storage_options or {}) File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/core.py", line 325, in _un_chain cls = get_filesystem_class(protocol) File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/registry.py", line 232, in get_filesystem_class raise ValueError(f"Protocol not known: {protocol}") ```
load_dataset save_to_disk load_from_disk error
### Describe the bug datasets version: 2.10.1 I `load_dataset `and `save_to_disk` sucessfully on windows10( **and I `load_from_disk(/LLM/data/wiki)` succcesfully on windows10**), and I copy the dataset `/LLM/data/wiki` into a ubuntu system, but when I `load_from_disk(/LLM/data/wiki)` on ubuntu, something weird happens: ``` load_from_disk('/LLM/data/wiki') File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/load.py", line 1874, in load_from_disk return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options) File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1309, in load_from_disk dataset_dict[k] = Dataset.load_from_disk( File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1543, in load_from_disk fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options) File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py", line 610, in get_fs_token_paths chain = _un_chain(urlpath0, storage_options or {}) File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py", line 325, in _un_chain cls = get_filesystem_class(protocol) File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/registry.py", line 232, in get_filesystem_class raise ValueError(f"Protocol not known: {protocol}") ValueError: Protocol not known: /LLM/data/wiki ``` It seems that something went wrong on the arrow file? How can I solve this , since currently I can not save_to_disk on ubuntu system ### Steps to reproduce the bug datasets version: 2.10.1 ### Expected behavior datasets version: 2.10.1 ### Environment info datasets version: 2.10.1
83
load_dataset save_to_disk load_from_disk error ### Describe the bug datasets version: 2.10.1 I `load_dataset `and `save_to_disk` sucessfully on windows10( **and I `load_from_disk(/LLM/data/wiki)` succcesfully on windows10**), and I copy the dataset `/LLM/data/wiki` into a ubuntu system, but when I `load_from_disk(/LLM/data/wiki)` on ubuntu, something weird happens: ``` load_from_disk('/LLM/data/wiki') File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/load.py", line 1874, in load_from_disk return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options) File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1309, in load_from_disk dataset_dict[k] = Dataset.load_from_disk( File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1543, in load_from_disk fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options) File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py", line 610, in get_fs_token_paths chain = _un_chain(urlpath0, storage_options or {}) File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py", line 325, in _un_chain cls = get_filesystem_class(protocol) File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/registry.py", line 232, in get_filesystem_class raise ValueError(f"Protocol not known: {protocol}") ValueError: Protocol not known: /LLM/data/wiki ``` It seems that something went wrong on the arrow file? How can I solve this , since currently I can not save_to_disk on ubuntu system ### Steps to reproduce the bug datasets version: 2.10.1 ### Expected behavior datasets version: 2.10.1 ### Environment info datasets version: 2.10.1 I'm using the latest datasets and fsspec , but still got this error! datasets : Version: 2.13.0 fsspec Version: 2023.10.0 ``` File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/load.py", line 1892, in load_from_disk return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options) File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1371, in load_from_disk dataset_dict[k] = Dataset.load_from_disk( File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1639, in load_from_disk fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options) File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/core.py", line 610, in get_fs_token_paths chain = _un_chain(urlpath0, storage_options or {}) File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/core.py", line 325, in _un_chain cls = get_filesystem_class(protocol) File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/registry.py", line 232, in get_filesystem_class raise ValueError(f"Protocol not known: {protocol}") ```
[ -0.3020021915435791, 0.007541164755821228, 0.07424850016832352, 0.35470154881477356, 0.38531994819641113, 0.19839975237846375, 0.30810630321502686, 0.09688099473714828, 0.038030557334423065, 0.08450580388307571, -0.02063780650496483, 0.3757515847682953, 0.020782995969057083, 0.05820032209157944, 0.005796853452920914, -0.043940454721450806, 0.258036732673645, -0.10684759169816971, -0.15890690684318542, -0.21719156205654144, -0.4443010687828064, 0.18944528698921204, -0.15024389326572418, -0.10594085603952408, -0.09335976839065552, -0.2973526120185852, -0.23654580116271973, 0.43008556962013245, 0.0805225521326065, -0.36306750774383545, 0.32007724046707153, -0.27862560749053955, 0.3140893876552582, 0.41641998291015625, -0.00011119423288619146, 0.013939514756202698, 0.20191332697868347, -0.030353903770446777, -0.4545232355594635, -0.17468982934951782, -0.1125314012169838, -0.27858924865722656, 0.06480496376752853, -0.27149027585983276, 0.1610085815191269, 0.08170779794454575, -0.15438322722911835, -0.3643895387649536, 0.047455236315727234, 0.18768975138664246, 0.25833266973495483, 0.22982114553451538, -0.035782456398010254, -0.22925950586795807, 0.19864870607852936, -0.01739085465669632, -0.12234368175268173, 0.24782566726207733, -0.017193738371133804, -0.188584566116333, 0.28183263540267944, 0.0902482271194458, -0.18375197052955627, -0.2039777934551239, 0.259308785200119, 0.03786914050579071, 0.19750717282295227, -0.22230647504329681, 0.15529629588127136, 0.1817575842142105, 0.6693467497825623, -0.3566683232784271, -0.37454643845558167, -0.06648416072130203, 0.00873783603310585, 0.06681299954652786, 0.26627761125564575, 0.2399996817111969, 0.017500117421150208, 0.0997035801410675, -0.07907868921756744, -0.22092443704605103, -0.050789736211299896, 0.24558061361312866, -0.030344150960445404, -0.05469052493572235, -0.13194505870342255, 0.045037977397441864, 0.0670524537563324, 0.04901014268398285, 0.08673897385597229, -0.2468235343694687, -0.026087665930390358, 0.1000426709651947, -0.2838897109031677, 0.021722353994846344, -0.083894744515419, 0.014684299007058144, -0.16710947453975677, 0.17687132954597473, 0.22069010138511658, -0.21818357706069946, 0.2279052585363388, 0.28934866189956665, 0.29199355840682983, 0.26566430926322937, -0.1286855936050415, 0.24854452908039093, 0.23625591397285461, 0.026131387799978256, 0.08223718404769897, -0.06329600512981415, -0.0094379261136055, -0.16858848929405212, 0.24054975807666779, -0.02706380933523178, 0.36033952236175537, -0.07816089689731598, -0.4644821882247925, 0.0962325930595398, 0.2789362967014313, 0.06447266787290573, -0.00377773679792881, 0.4038967490196228, -0.09899477660655975, 0.42662909626960754, -0.001955755054950714, 0.39127594232559204, -0.20078352093696594, 0.38874655961990356, -0.17763057351112366, -0.0957610011100769, 0.017640061676502228, 0.05540958046913147, 0.13098739087581635, -0.2591671645641327, 0.295981764793396, 0.12623979151248932, -0.3066140115261078, -0.09071765094995499, 0.05862756073474884, -0.07679390162229538, -0.010096099227666855, 0.24868007004261017, 0.17726710438728333, 0.46047836542129517, 0.19236181676387787, -0.1722528636455536, -0.11476624011993408, 0.2757527828216553, -0.32384422421455383, -0.16837987303733826, -0.35270217061042786, 0.26934948563575745, -0.04368671774864197, -0.07640489935874939, -0.3991198241710663, -0.18290963768959045, 0.3199383318424225, 0.016366630792617798, 0.11180855333805084, -0.038663722574710846, -0.4682202637195587, -0.3872425854206085, 0.1739526391029358, 0.3885337710380554, -0.4471799433231354, -0.06949639320373535, 0.024891570210456848, -0.22964373230934143, 0.17443780601024628, 0.24897627532482147, 0.05482298135757446, 0.19227692484855652, -0.40514540672302246, 0.2262696474790573, 0.13221235573291779, -0.6127693057060242, -0.4519578814506531, 0.3326862156391144, -0.1509171575307846, -0.04992418736219406, 0.0003069080412387848, 0.08000028878450394, 0.2965606451034546, -0.07619017362594604, 0.09747064858675003, 0.2930595576763153, 0.09072433412075043, 0.1299198865890503, -0.4823365807533264, -0.1895209103822708, 0.20258677005767822, 0.10239549726247787, -0.07044541090726852, 0.20651988685131073, 0.5053045153617859, 0.4086996912956238, 0.28374433517456055, -0.11412297189235687, 0.001921430230140686, 0.3962135314941406, 0.5197309851646423, -0.1264268308877945, -0.12620119750499725, -0.018667396157979965, -0.5319818258285522, 0.24674472212791443, -0.042093392461538315, -0.12197333574295044, 0.05527665466070175, 0.003640003502368927, -0.25429868698120117, 0.05008454620838165, -0.37425607442855835, 0.0830204039812088, 0.11077359318733215, 0.12056462466716766, -0.14952042698860168, 0.25772926211357117, 0.11729328334331512, 0.026479290798306465, -0.27452364563941956, 0.02603798732161522, -0.3316020965576172, 0.40127676725387573, -0.28197118639945984, -0.04227443039417267, -0.05719556286931038, 0.025183778256177902, 0.3036233186721802, -0.02384065091609955, -0.07415708154439926, 0.4466148614883423, 0.07776212692260742, 0.33901169896125793, -0.21614724397659302, -0.1640746146440506, 0.26912394165992737, -0.23284569382667542, 0.19900189340114594, 0.30517101287841797, 0.2999769151210785, -0.07111300528049469, 0.016842195764183998, 0.135747030377388, -0.2441876381635666, 0.07138242572546005, 0.10802298039197922, 0.14597268402576447, 0.1663641482591629, 0.023083843290805817, 0.2366776168346405, -0.2682352066040039, 0.23994280397891998, 0.37383565306663513, 0.4000498950481415, -0.03293213993310928, -0.02369564026594162, 0.09519346058368683, 0.40725380182266235, 0.0184628888964653, 0.17551158368587494, 0.08748151361942291, -0.20799583196640015, -0.08385121077299118, 0.08835604041814804, 0.3435957431793213, 0.5764807462692261, 0.11132588982582092, 0.11507461220026016, 0.1454252153635025, -0.10169762372970581, -0.10036075115203857, 0.32665809988975525, -0.028586357831954956, 0.12928323447704315, 0.27850091457366943, 0.009205255657434464, 0.1858486533164978, -0.19843921065330505, 0.15266010165214539, -0.005121607333421707, 0.22724637389183044, -0.5626521706581116, 0.09028729796409607, -0.2396853268146515, 0.23316407203674316, -0.22030851244926453, 0.13129130005836487, -0.1216796487569809, -0.3355499505996704, -0.08488588780164719, 0.5092928409576416, -0.09941963851451874, 0.09991739690303802, -0.22935280203819275, 0.0852515697479248, -0.040280360728502274, -0.17049549520015717, 0.02529042959213257, -0.07661256194114685, -0.2977104187011719, 0.03452156111598015, 0.41145598888397217, 0.020707447081804276, 0.3107718229293823, -0.1496700495481491, -0.04049293324351311, -0.27365952730178833, -0.035417698323726654, -0.03988983854651451, 0.05512961372733116, 0.34986892342567444, 0.05494685471057892, 0.09839491546154022, -0.07443667948246002, -0.25087592005729675, 0.24502107501029968, -0.024220678955316544, -0.32669228315353394, 0.3725496828556061, 0.07971534878015518, -0.21926593780517578, -0.13796330988407135, -0.2863702178001404, -0.37654364109039307, -0.381486713886261, 0.026784896850585938, -0.11234632134437561, 0.026934169232845306, 0.22466547787189484, 0.24842968583106995, 0.023963477462530136, 0.2945218086242676, -0.08318079262971878, -0.256069540977478, -0.41804856061935425, 0.39875528216362, -0.20159396529197693, -0.49522557854652405, 0.16749435663223267, 0.27349144220352173, -0.07096317410469055, 0.06738777458667755, -0.5113338232040405, -0.1441323310136795, -0.08516993373632431, 0.19409573078155518, -0.1671101152896881, 0.21056658029556274, 0.2546791732311249, 0.051304906606674194, -0.0026607289910316467, -0.10684076696634293, -0.1237393394112587, 0.024432197213172913, -0.014679942280054092, 0.1867089718580246, -0.1702403426170349, 0.20094753801822662, 0.018858768045902252, 0.29267147183418274, 0.29024171829223633, 0.2087026834487915, 0.517240047454834, 0.07910510152578354, 0.5441211462020874, -0.14078888297080994, -0.45306023955345154, 0.09100775420665741, -0.2281808853149414, -0.29097598791122437, 0.30326226353645325, -0.07828481495380402, -0.02119729295372963, -0.016093164682388306, -0.189876526594162, -0.10991644859313965, -0.1947496235370636, -0.06506140530109406, -0.22221527993679047, 0.020698124542832375, -0.01178557425737381, 0.31937146186828613, -0.02846689522266388, -0.10302332043647766, 0.06073325127363205, 0.37907832860946655, -0.19516733288764954, 0.12216603010892868, -0.4703245162963867, -0.13977733254432678, -0.49976763129234314, 0.11344568431377411, 0.10423895716667175, 0.48901358246803284, -0.15131402015686035, -0.16201283037662506, 0.04849845543503761, -0.0967089831829071, 0.5865616798400879, -0.11736921221017838, 0.28233975172042847, 0.21640659868717194, -0.03867366537451744, -0.45656314492225647, -0.15592306852340698, -0.0899665504693985, -0.23440121114253998, -0.16225767135620117, 0.340922087430954, 0.024749040603637695, -0.03668699413537979, -0.4240536391735077, 0.3723543584346771, -0.38141685724258423, -0.095252126455307, -0.3209489583969116, -0.5536009073257446, -0.32451656460762024, -0.2490718513727188, -0.10320275276899338, 0.2293904721736908, -0.1713411509990692, 0.0030328482389450073, -0.32347825169563293, -0.17525017261505127, -0.039219923317432404, -0.023557402193546295, 0.4058704376220703, -0.1244722232222557, 0.33720144629478455, -0.10566268861293793, 0.12294584512710571, 0.5347766280174255, 0.5324152112007141, -0.31353211402893066, -0.11692541837692261, 0.010793328285217285, -0.19916531443595886, -0.13016058504581451, 0.028076473623514175, -0.14333945512771606, -0.21912311017513275, -0.0743294432759285, 0.017666254192590714, -0.4030655026435852, -0.12713396549224854, 0.19041100144386292, -0.021696457639336586, -0.225543811917305, -0.12842360138893127, 0.33070337772369385, -0.0167442187666893, 0.045583367347717285, 0.20595601201057434, 0.02327435091137886, -0.43470320105552673, 0.3684600293636322, 0.009676175191998482, 0.6023597717285156, -0.07220575958490372, 0.2770216166973114, 0.29300159215927124, -0.21713855862617493, 0.24290089309215546, 0.16176481544971466, -0.0880356878042221, -0.41903483867645264, -0.18069294095039368, -0.045643676072359085, 0.018762513995170593, -0.018939759582281113, 0.1745714545249939, -0.24822238087654114, 0.140424907207489, -0.3142153024673462, 0.10115513950586319, -0.021107235923409462, 0.16873888671398163, -0.18851859867572784, -0.22521983087062836, -0.5151563882827759, 0.24682678282260895, 0.1893177628517151, 0.12301907688379288, -0.09289826452732086, 0.05303743854165077, -0.1001501977443695, -0.21737049520015717, -0.18994368612766266, 0.2674891948699951, -0.33056771755218506, 0.5188918113708496, -0.2567630112171173, -0.44783368706703186, 0.023192748427391052, 0.47318747639656067, 0.3838151693344116, 0.013777107000350952, -0.07793367654085159, -0.15892626345157623, -0.13963738083839417, 0.13004982471466064, -0.005018115043640137, 0.005542229861021042, 0.33305901288986206, -0.11242856830358505, -0.08454263210296631, -0.10047288984060287, -0.16503477096557617, -0.08386947959661484, -0.00898599624633789, 0.15983769297599792, -0.13988101482391357, -0.1467524915933609, -0.15835539996623993, -0.23690322041511536, 0.1643822193145752, -0.38912099599838257, 0.12152734398841858, 0.014788669534027576, 0.00017265230417251587, 0.37956321239471436, -0.11783404648303986, -0.2403036653995514, 0.05431070178747177, 0.5025372505187988, -0.14464274048805237, 0.02862779051065445, 0.5872572064399719, -0.10101152211427689, -0.1119965985417366, -0.26365646719932556, 0.5393483638763428, -0.05235050246119499, -0.21377111971378326, 0.10204580426216125, -0.045752473175525665, 0.1317247450351715, -0.18597987294197083, 0.3658562898635864, 0.14669111371040344, -0.07973078638315201, 0.0017865225672721863, -0.4133966565132141, -0.2574155032634735, 0.02874918282032013, 0.06454292684793472, 0.18440571427345276, 0.18227151036262512, -0.04649566113948822, -0.10588843375444412, -0.13984856009483337, -0.3234133720397949, 0.20018190145492554, -0.3170780837535858, -0.05198076367378235, 0.12017861008644104, 0.03809302672743797, 0.13218511641025543, -0.19205212593078613, 0.1690102517604828, -0.1459995061159134, -0.03283942490816116, -0.25707295536994934, -0.21260792016983032, 0.11002031713724136, 0.21911151707172394, -0.14521169662475586, 0.05106503888964653, -0.21418757736682892, 0.04801434278488159, -0.18407697975635529, 0.013029664754867554, 0.4673970937728882, -0.009273555129766464, 0.2227868139743805, -0.007523342967033386, 0.32742005586624146, -0.1884174942970276, 0.3251942992210388, -0.17057716846466064, 0.19284562766551971, -0.12030549347400665, 0.22497425973415375, 0.17704230546951294, 0.002904929220676422, -0.32350674271583557, -0.11808186769485474, 0.04623284190893173, 0.20371143519878387, 0.18401885032653809, -0.31445932388305664, 0.0715370625257492, 0.0893000066280365, 0.17113447189331055, 0.3139946162700653, -0.261488676071167, -0.12680596113204956, 0.28114813566207886, 0.23424440622329712, -0.24336686730384827, -0.2430725395679474, 0.05757564678788185, -0.20427362620830536, -0.19600778818130493, 0.1634381115436554, 0.1109173521399498, -0.3082539141178131, -0.08334918320178986, -0.036426618695259094, 0.4916611909866333, -0.016049031168222427, 0.3031156361103058, 0.4829578995704651, 0.04610997438430786, 0.26957494020462036, -0.18069683015346527, 0.04063202813267708, 0.20415917038917542, 0.5293270945549011, -0.13975346088409424, 0.3333490490913391, -0.054502636194229126, 0.16151277720928192, -0.10276947915554047, -0.5151990652084351, 0.1684722900390625, -0.10120441019535065, -0.1783832460641861, 0.07420581579208374, -0.13282355666160583, 0.31007957458496094, -0.3236522972583771, -0.26985400915145874, 0.022180013358592987, 0.08944354951381683, -0.27286943793296814, -0.21646606922149658, -0.2644764482975006, -0.036077022552490234, 0.23052486777305603, 0.11874143779277802, -0.10987725853919983, -0.34136730432510376, 0.17083297669887543, 0.15978142619132996, -0.2613503336906433, -0.2720237374305725, 0.16064155101776123, 0.3253658413887024, -0.240041583776474, -0.2486538290977478, 0.0681837871670723, 0.11588248610496521, -0.008857734501361847, -0.04421499744057655, 0.19991165399551392, 0.5350955724716187, 0.46016567945480347, 0.016152385622262955, 0.017726752907037735, 0.25817930698394775, 0.02164720743894577, -0.026946723461151123, -0.0746295303106308, -0.0837007537484169, 0.13255536556243896, 0.35538485646247864, 0.16228318214416504, -0.06416214257478714, 0.10178045928478241, 0.26363494992256165, -0.05015026777982712, -0.01612100377678871, 0.23638169467449188, -0.2559864819049835, -0.10175782442092896, -0.22871001064777374, 0.14774444699287415, -0.11441067606210709, 0.2126404047012329, 0.43268513679504395, -0.04547642543911934, 0.24246154725551605, 0.07686343789100647, 0.1055271327495575, -0.05587410554289818, 0.360178679227829, 0.3255954086780548, -0.2352680265903473, -0.27325698733329773, 0.011927753686904907, -0.6629292368888855, 0.17768731713294983, 0.030453883111476898, 0.04444582015275955, -0.13875320553779602, 0.21552106738090515, -0.08842925727367401, -0.0021187798120081425, 0.12207837402820587, 0.13588252663612366, 0.01555091142654419, 0.39393600821495056, -0.2184872180223465, -0.2835386395454407, -0.012041464447975159, -0.046871110796928406, 0.003970921039581299, -0.6223596930503845, 0.14541494846343994, -0.01941867545247078, 0.024197004735469818, -0.15631426870822906, 0.25174230337142944, -0.3160342872142792, -0.16545450687408447, 0.5042310953140259, 0.10268303751945496, 0.2572322487831116, -0.14011862874031067, -0.20684611797332764, -0.02756405621767044, -0.24773643910884857, -0.1967344880104065, 0.17067791521549225, 0.02855449914932251, 0.26601991057395935, -0.27324166893959045, -0.10441181808710098, -0.25793346762657166, 0.3774063289165497, 0.13257792592048645, 0.2775946259498596, -0.2747836112976074, 0.22814573347568512, 0.05346500873565674, 0.02194250002503395, 0.364485502243042, 0.01239101029932499, -0.06995778530836105, 0.4672340750694275, -0.2601219415664673, -0.4974444806575775, 0.1899697482585907, -0.21706974506378174, -0.057457298040390015, 0.017385177314281464, 0.29198604822158813, -0.16895535588264465, 0.005090771242976189, -0.5269594788551331, 0.12758558988571167, 0.4498941898345947, -0.16750550270080566, -0.1968800127506256, 0.17126676440238953, -0.18255272507667542, 0.003937579691410065, 0.011565610766410828, 0.235894113779068, -0.03714607283473015, -0.242612823843956, 0.29617637395858765, -0.3383524417877197 ]
https://github.com/huggingface/datasets/issues/6352
+1 ``` Found cached dataset csv (file:///home/ubuntu/.cache/huggingface/datasets/theSquarePond___csv/theSquarePond--XXXXX-bbf0a8365d693d2c/0.0.0/eea64c71ca8b46dd3f537ed218fc9bf495d5707789152eb2764f5c78fa66d59d) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) Cell In[14], line 4 1 get_ipython().system('pip install -U datasets') 3 # Load dataset from the hub ----> 4 dataset = load_dataset(dataset_name) File ~/anaconda3/envs/python38-env/lib/python3.8/site-packages/datasets/load.py:1810, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 1806 # Build dataset for splits 1807 keep_in_memory = ( 1808 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1809 ) -> 1810 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) 1811 # Rename and cast features to match task schema 1812 if task is not None: File ~/anaconda3/envs/python38-env/lib/python3.8/site-packages/datasets/builder.py:1128, in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory) 1126 is_local = not is_remote_filesystem(self._fs) 1127 if not is_local: -> 1128 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") 1129 if not os.path.exists(self._output_dir): 1130 raise FileNotFoundError( 1131 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call " 1132 "builder.download_and_prepare(), or use " 1133 "datasets.load_dataset() before trying to access the Dataset object." 1134 ) NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. ```
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
I was trying to load the wiki dataset, but i got this error traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
183
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") I was trying to load the wiki dataset, but i got this error traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. +1 ``` Found cached dataset csv (file:///home/ubuntu/.cache/huggingface/datasets/theSquarePond___csv/theSquarePond--XXXXX-bbf0a8365d693d2c/0.0.0/eea64c71ca8b46dd3f537ed218fc9bf495d5707789152eb2764f5c78fa66d59d) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) Cell In[14], line 4 1 get_ipython().system('pip install -U datasets') 3 # Load dataset from the hub ----> 4 dataset = load_dataset(dataset_name) File ~/anaconda3/envs/python38-env/lib/python3.8/site-packages/datasets/load.py:1810, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 1806 # Build dataset for splits 1807 keep_in_memory = ( 1808 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1809 ) -> 1810 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) 1811 # Rename and cast features to match task schema 1812 if task is not None: File ~/anaconda3/envs/python38-env/lib/python3.8/site-packages/datasets/builder.py:1128, in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory) 1126 is_local = not is_remote_filesystem(self._fs) 1127 if not is_local: -> 1128 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") 1129 if not os.path.exists(self._output_dir): 1130 raise FileNotFoundError( 1131 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call " 1132 "builder.download_and_prepare(), or use " 1133 "datasets.load_dataset() before trying to access the Dataset object." 1134 ) NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. ```
[ -0.26059049367904663, -0.20326289534568787, -0.04139687120914459, 0.2912045121192932, 0.2911190390586853, 0.3084626793861389, 0.23816388845443726, 0.41730719804763794, 0.4236239492893219, -0.02376360446214676, 0.10076349973678589, 0.09992368519306183, -0.06720319390296936, -0.00048163533210754395, -0.07775598019361496, -0.19842010736465454, 0.07964292168617249, 0.0975508838891983, 0.11143512278795242, 0.03305957466363907, -0.2395295798778534, 0.1872660368680954, -0.2901981472969055, 0.20343251526355743, -0.43097835779190063, -0.035728298127651215, -0.0009303465485572815, 0.2406291663646698, -0.07381068915128708, -0.3661341667175293, 0.4812163710594177, -0.10537861287593842, 0.3384253978729248, 0.3367757499217987, -0.00010994210606440902, 0.21057452261447906, 0.4018093943595886, 0.01127806305885315, -0.40421628952026367, -0.04439300298690796, -0.293048620223999, -0.35755589604377747, 0.2452285885810852, -0.27949056029319763, -0.11993249505758286, -0.05693347752094269, -0.04090440273284912, -0.3124394118785858, 0.43712788820266724, 0.32619211077690125, 0.233383446931839, 0.11091883480548859, 0.2869102358818054, 0.0657571479678154, -0.016270704567432404, -0.19254450500011444, -0.10881797969341278, 0.09700951725244522, 0.08187265694141388, -0.1970626413822174, 0.004668340086936951, 0.06096632406115532, -0.15937471389770508, 0.22270402312278748, 0.33083376288414, 0.06349007040262222, 0.13967132568359375, -0.34512245655059814, 0.34390026330947876, 0.28737038373947144, 0.9424646496772766, 0.05174100399017334, -0.273308664560318, -0.16013415157794952, -0.11924774199724197, -0.03131775185465813, 0.453728049993515, 0.056945182383060455, -0.3077648878097534, 0.21356190741062164, -0.2150173783302307, -0.21389919519424438, -0.0009755566716194153, 0.19708561897277832, 0.01894843578338623, 0.5648834109306335, -0.00961121916770935, 0.20004665851593018, -0.028130486607551575, -0.15304896235466003, 0.5467876195907593, -0.1712844967842102, -0.02205502986907959, 0.3955903649330139, -0.43496161699295044, 0.13483183085918427, -0.24810181558132172, 0.15005603432655334, 0.07961668819189072, -0.08243469893932343, -0.060601118952035904, 0.07981836795806885, 0.12263886630535126, 0.15073081851005554, 0.3396921455860138, 0.38413602113723755, -0.011056274175643921, 0.0951966941356659, -0.012055296450853348, 0.07110980898141861, -0.09812523424625397, -0.1973397582769394, -0.26843491196632385, -0.24581122398376465, 0.014823541045188904, -0.08864358067512512, 0.09156577289104462, -0.29807597398757935, -0.11528043448925018, 0.016812767833471298, 0.23330944776535034, -0.03752908110618591, 0.016156457364559174, 0.316422700881958, -0.07195955514907837, 0.45478707551956177, 0.018008410930633545, 0.07220718264579773, -0.1672142595052719, 0.14123204350471497, -0.1481395661830902, 0.058709654957056046, -0.13765594363212585, 0.09812313318252563, 0.06705203652381897, -0.14980214834213257, 0.40320080518722534, -0.07966600358486176, 0.020547879859805107, -0.1925993710756302, 0.009748347103595734, 0.022578086704015732, -0.02806892991065979, 0.38739925622940063, -0.1672019362449646, 0.38795042037963867, 0.43796274065971375, -0.3023039400577545, -0.18062841892242432, 0.22495326399803162, -0.683314323425293, -0.4698031544685364, -0.24550506472587585, 0.18682843446731567, -0.005263514816761017, -0.1431831270456314, -0.19995465874671936, -0.04401995986700058, 0.378530889749527, -0.3342244625091553, -0.03254419565200806, -0.17673303186893463, -0.2252482920885086, -0.2318013310432434, 0.39340972900390625, 0.14334368705749512, -0.41230636835098267, -0.05260559543967247, -0.2648579180240631, -0.08141560852527618, 0.1359155923128128, 0.18415521085262299, -0.3081669211387634, 0.3373740613460541, -0.24687746167182922, 0.052937135100364685, 0.3764008581638336, -0.39936208724975586, -0.5940361022949219, 0.020530443638563156, -0.09001956880092621, 0.30022355914115906, -0.19848385453224182, 0.012733902782201767, -0.16063827276229858, -0.1285851001739502, 0.17337390780448914, 0.3331958055496216, 0.025924669578671455, 0.16106685996055603, -0.2629706859588623, -0.38777053356170654, 0.332366943359375, 0.24859285354614258, 0.19038814306259155, 0.002427905797958374, 0.08409230411052704, 0.3420727849006653, 0.21485254168510437, -0.10140090435743332, 0.058237724006175995, 0.2838444113731384, 0.04966256022453308, -0.04849373921751976, 0.01494833454489708, 0.052816346287727356, -0.5230765342712402, 0.42596620321273804, 0.013258799910545349, -0.07780291140079498, 0.06159473955631256, -0.09188172221183777, -0.29845130443573, 0.002660885453224182, -0.4830949306488037, -0.27850204706192017, 0.16631686687469482, 0.18411770462989807, 0.2540477514266968, 0.12629936635494232, -0.19883479177951813, 0.009046593680977821, -0.18835251033306122, -0.012130031362175941, -0.108298659324646, 0.11467500776052475, -0.008673261851072311, -0.0029046162962913513, -0.08416561782360077, 0.2084321677684784, 0.030480418354272842, -0.08533298969268799, -0.3113499581813812, 0.32948172092437744, 0.008539043366909027, 0.18278419971466064, -0.0041534267365932465, -0.015941500663757324, -0.03927600756287575, -0.14516861736774445, -0.04720453545451164, -0.020697178319096565, 0.22003263235092163, -0.15906493365764618, 0.01793542690575123, 0.09123250097036362, 0.10622324049472809, 0.3385236859321594, -0.14658717811107635, 0.13719627261161804, 0.09792648255825043, 0.049537062644958496, 0.2916579842567444, -0.11918434500694275, 0.06783832609653473, 0.03468769043684006, -0.011399298906326294, -0.19380684196949005, 0.3021000325679779, -0.16333863139152527, 0.40834957361221313, 0.16436874866485596, 0.15687644481658936, 0.1372518241405487, -0.16468149423599243, -0.22069497406482697, 0.21871109306812286, -0.0432150736451149, 0.30531081557273865, 0.00670667365193367, -0.03449594974517822, -0.06546610593795776, 0.2256166785955429, -0.008750498294830322, 0.1962854415178299, 0.11368219554424286, 0.2415304183959961, 0.332078754901886, 0.023391693830490112, -0.1079050749540329, -0.21094375848770142, 0.23861590027809143, 0.0796256884932518, 0.3696238100528717, -0.08001095056533813, 0.10957913100719452, -0.18276503682136536, 0.3702635169029236, 0.23699714243412018, -0.1414167732000351, -0.2203773409128189, -0.5086202025413513, -0.04244986176490784, 0.1848384141921997, 0.15148377418518066, 0.24422454833984375, -0.29770582914352417, 0.1159294992685318, 0.08424391597509384, -0.14576195180416107, -0.20206397771835327, -0.38032761216163635, -0.3452833294868469, 0.11174354702234268, 0.4034357964992523, 0.09042380005121231, 0.24754184484481812, -0.16010478138923645, -0.038965657353401184, -0.35025280714035034, -0.10268212109804153, 0.07902146875858307, -0.29053357243537903, 0.34423258900642395, -0.018226347863674164, 0.40282535552978516, -0.34070345759391785, -0.5013721585273743, 0.3694803714752197, -0.3882870674133301, -0.0651588886976242, 0.022330842912197113, 0.08694127202033997, -0.042969025671482086, 0.07329113781452179, -0.1994801163673401, -0.39362040162086487, -0.2345147430896759, -0.09083662927150726, 0.1590750813484192, -0.06039179116487503, -0.08373041450977325, 0.15699559450149536, 0.14462175965309143, 0.08813077211380005, -0.10451488196849823, -0.283751517534256, -0.4099985361099243, 0.2111799418926239, -0.19257864356040955, -0.285231351852417, 0.08805328607559204, 0.11293825507164001, 0.2478116750717163, -0.08207505941390991, -0.5207031965255737, -0.11762233823537827, -0.0988958328962326, 0.2535431981086731, -0.005449317395687103, 0.014561491087079048, 0.2463141679763794, 0.020549438893795013, -0.01784193515777588, -0.011471085250377655, 0.1850864440202713, -0.12103406339883804, -0.20330218970775604, 0.18059639632701874, 0.2091759443283081, 0.2676026225090027, -0.14857858419418335, 0.8820567727088928, 0.25702911615371704, 0.05790335312485695, 0.3647472560405731, -0.0375872403383255, 0.10107181966304779, -0.31260794401168823, -0.28257158398628235, 0.29736223816871643, -0.12773942947387695, -0.0953398197889328, 0.308161199092865, 0.02904646471142769, -0.2584949731826782, -0.3168002963066101, 0.07475224137306213, -0.417100191116333, -0.30486324429512024, 0.0335194393992424, 0.1606767177581787, 0.14510667324066162, -0.0341019332408905, -0.013372354209423065, -0.15875378251075745, -0.45650365948677063, 0.27601003646850586, 0.2906315326690674, -0.10265031456947327, -0.011576991528272629, -0.3973197042942047, -0.26473504304885864, -0.5689088702201843, 0.2628142237663269, 0.24363602697849274, 0.3559790849685669, -0.11114688217639923, 0.008552990853786469, 0.1610421985387802, -0.006169449537992477, 0.4092225432395935, -0.45902958512306213, -0.07025159150362015, 0.2194400131702423, 0.10688506066799164, -0.14715909957885742, -0.1421176791191101, -0.10561534762382507, 0.4150067865848541, -0.09764105826616287, 0.053181931376457214, -0.15645690262317657, -0.15220874547958374, 0.026279866695404053, 0.2900336682796478, -0.2911970019340515, -0.3213808834552765, -0.20982974767684937, -0.1561809927225113, -0.35589754581451416, -0.19267266988754272, -0.15300381183624268, 0.4087578356266022, -0.23142613470554352, 0.0381963849067688, -0.4404725134372711, 0.2707163095474243, -0.03369871526956558, 0.027135781943798065, 0.3218337595462799, 0.13823407888412476, -0.09345455467700958, 0.15660591423511505, 0.03019213303923607, 0.04826436936855316, 0.6018397212028503, 0.003608059138059616, 0.006646871566772461, 0.026077214628458023, -0.029100092127919197, -0.045914508402347565, -0.014719285070896149, -0.13183844089508057, -0.07427626848220825, 0.07777802646160126, 0.07813338935375214, -0.11008981615304947, 0.04614778608083725, 0.2284567952156067, 0.08539937436580658, -0.32178494334220886, -0.3583061993122101, 0.6149122714996338, 0.16835978627204895, -0.04813273996114731, 0.2808283269405365, 0.212357297539711, -0.27053043246269226, -0.01805729791522026, 0.3492525815963745, 0.8678393363952637, -0.24375876784324646, 0.14348308742046356, 0.17836251854896545, 0.47776973247528076, 0.4002162218093872, -0.3750762343406677, 0.12240102887153625, -0.32780689001083374, -0.2774627208709717, -0.18549557030200958, 0.05852431058883667, 0.023190075531601906, 0.017089053988456726, -0.28122562170028687, 0.26631417870521545, -0.24413567781448364, 0.3486098647117615, -0.030721362680196762, 0.2396637350320816, -0.1791229248046875, -0.10757066309452057, -0.30635201930999756, 0.17274655401706696, -0.070787213742733, 0.2804596424102783, -0.23953324556350708, 0.13078704476356506, 0.09295003116130829, -0.16669714450836182, -0.39064252376556396, 0.09905536472797394, -0.13272717595100403, 0.49570322036743164, -0.21697349846363068, -0.2768367826938629, -0.04670429974794388, 0.5597723126411438, 0.488295316696167, 0.10228001326322556, -0.3345904052257538, 0.2091837227344513, -0.11667056381702423, -0.32737472653388977, -0.28062427043914795, 0.0784444510936737, 0.2420375496149063, -0.10670167207717896, -0.26503074169158936, 0.30767419934272766, -0.3726203143596649, -0.297352135181427, 0.10209441184997559, -0.06987563520669937, 0.35324177145957947, -0.30902981758117676, -0.5495811700820923, -0.04229665920138359, -0.06347661465406418, -0.0558164045214653, 0.11507368087768555, 0.01142036821693182, -0.017731649801135063, -0.03485824912786484, 0.23828661441802979, -0.25144195556640625, 0.14087262749671936, 0.438124418258667, 0.1571289747953415, -0.18866118788719177, 0.882259726524353, 0.09844575822353363, -0.19291864335536957, -0.21375086903572083, -0.05881629139184952, 0.16201657056808472, -0.23475022614002228, -0.17023944854736328, 0.17134475708007812, 0.11133474111557007, -0.06730537116527557, 0.5403761267662048, 0.3110371232032776, 0.04986663907766342, -0.08671141415834427, -0.4782150089740753, -0.23828697204589844, 0.15457822382450104, -0.15155866742134094, 0.21670106053352356, 0.033951811492443085, -0.44123679399490356, 0.03624078631401062, 0.12932109832763672, -0.28322744369506836, 0.04444599896669388, -0.34001123905181885, -0.07240438461303711, 0.1191394180059433, 0.08165919780731201, 0.2757164239883423, 0.11006003618240356, 0.13878071308135986, 0.06398019194602966, -0.15613971650600433, -0.2619659900665283, 0.02199968695640564, 0.18796509504318237, 0.29148900508880615, -0.22409367561340332, -0.0006203427910804749, -0.20900557935237885, 0.0168025940656662, -0.23798830807209015, 0.2681357264518738, -0.04964515194296837, -0.06953619420528412, 0.03693056479096413, 0.3063197135925293, 0.17404764890670776, -0.31923606991767883, 0.3170158267021179, -0.21749764680862427, 0.05150848627090454, 0.016212955117225647, -0.07539225369691849, 0.31429076194763184, 0.10659102350473404, 0.1405181735754013, 0.18865880370140076, 0.1904963254928589, 0.08147625625133514, 0.23609188199043274, -0.43821072578430176, 0.0447700172662735, 0.15490666031837463, 0.021232955157756805, 0.42277008295059204, -0.23729567229747772, 0.0278170183300972, 0.3280889093875885, 0.2513449192047119, -0.08781924843788147, -0.29606854915618896, 0.26524174213409424, 0.037991009652614594, -0.05688101053237915, 0.03795458748936653, 0.17302444577217102, -0.4656962752342224, 0.0008131228387355804, 0.08420179784297943, 0.3087182641029358, -0.40314754843711853, 0.12437604367733002, 0.4582737684249878, -0.06951391696929932, -0.04074025899171829, -0.011728804558515549, -0.029680265113711357, 0.06752458959817886, 0.2011013627052307, -0.29263967275619507, 0.26309698820114136, -0.13156764209270477, 0.24344468116760254, -0.29017534852027893, -0.5874444842338562, 0.504902720451355, 0.08458121120929718, -0.20477549731731415, 0.19517911970615387, -0.002755235880613327, 0.07799649238586426, -0.06797447800636292, 0.03785014525055885, -0.41014766693115234, 0.21752674877643585, -0.17201244831085205, -0.2345934957265854, 0.02788880467414856, -0.18401601910591125, 0.09639047086238861, 0.046337127685546875, -0.08662179112434387, -0.198697030544281, 0.10626551508903503, 0.0667816773056984, -0.17766442894935608, -0.1574668288230896, 0.1714678704738617, 0.37822866439819336, 0.07198116928339005, -0.18861457705497742, 0.21691976487636566, 0.12331666797399521, 0.041200097650289536, 0.028950873762369156, 0.28320440649986267, 0.3890122175216675, 0.4322963356971741, -0.33120056986808777, 0.06526565551757812, 0.03295276686549187, -0.0012042000889778137, 0.052775830030441284, 0.4191892743110657, -0.031771305948495865, -0.011595059186220169, 0.303010493516922, 0.20410361886024475, -0.16142529249191284, -0.07206206768751144, -0.2075684815645218, 0.2699234187602997, -0.23426024615764618, -0.1547723412513733, 0.1298677623271942, 0.007762834429740906, -0.09800945222377777, 0.2719282805919647, -0.28241658210754395, 0.06436549127101898, 0.12921616435050964, -0.05399380251765251, 0.220261812210083, -0.02207913063466549, 0.07407203316688538, -0.18123337626457214, 0.6020042300224304, 0.5072507858276367, -0.11441832780838013, -0.11410258710384369, -0.19408106803894043, -0.6187779307365417, 0.23944193124771118, -0.2043803334236145, -0.2539597749710083, 0.2344713807106018, -0.17599967122077942, -0.05581007897853851, 0.34577712416648865, 0.0807478278875351, 0.12459047138690948, -0.047331783920526505, 0.034438300877809525, -0.341117799282074, -0.1720326840877533, 0.06221979483962059, 0.003984929993748665, -0.13043183088302612, -0.47930842638015747, 0.18394234776496887, -0.08496902883052826, 0.004654631018638611, -0.10692320764064789, 0.15127041935920715, -0.03705856204032898, -0.2785709500312805, 0.39839112758636475, 0.2401154637336731, 0.39346620440483093, 0.002543315291404724, -0.02556726336479187, -0.39495405554771423, -0.29457250237464905, -0.16092048585414886, 0.1373818963766098, -0.08033955097198486, 0.32483747601509094, -0.25624263286590576, 0.00225279713049531, -0.22753500938415527, 0.20371776819229126, 0.15974879264831543, 0.2806698977947235, -0.08350159227848053, -0.05622075870633125, 0.06365815550088882, 0.12444677948951721, 0.43566253781318665, 0.22579964995384216, 0.06171068549156189, 0.10864570736885071, -0.07992599904537201, -0.19240732491016388, 0.40517789125442505, -0.44745880365371704, -0.30896350741386414, 0.031984586268663406, -0.07702518999576569, -0.156086727976799, -0.17836476862430573, -0.47637808322906494, 0.14448824524879456, 0.48256373405456543, 0.0463779978454113, -0.11087460815906525, 0.12149468064308167, -0.027025938034057617, -0.037679366767406464, -0.16560834646224976, 0.08205267786979675, -0.17696711421012878, -0.02696971967816353, -0.2414638102054596, -0.2768847942352295 ]
https://github.com/huggingface/datasets/issues/6352
+1 ``` Found cached dataset csv ([file://C:/Users/Shady/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1](file:///C:/Users/Shady/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1)) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) Cell In[38], line 3 1 huggingface_dataset_name = "knkarthick/dialogsum" ----> 3 dataset = load_dataset(huggingface_dataset_name) File D:\Desktop\Workspace\GenAI\genai\lib\site-packages\datasets\load.py:1804, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 1800 # Build dataset for splits 1801 keep_in_memory = ( 1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1803 ) -> 1804 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) 1805 # Rename and cast features to match task schema 1806 if task is not None: File D:\Desktop\Workspace\GenAI\genai\lib\site-packages\datasets\builder.py:1108, in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory) 1106 is_local = not is_remote_filesystem(self._fs) 1107 if not is_local: -> 1108 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") 1109 if not os.path.exists(self._output_dir): 1110 raise FileNotFoundError( 1111 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call " 1112 "builder.download_and_prepare(), or use " 1113 "datasets.load_dataset() before trying to access the Dataset object." 1114 ) NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. ```
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
I was trying to load the wiki dataset, but i got this error traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
175
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") I was trying to load the wiki dataset, but i got this error traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. +1 ``` Found cached dataset csv ([file://C:/Users/Shady/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1](file:///C:/Users/Shady/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1)) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) Cell In[38], line 3 1 huggingface_dataset_name = "knkarthick/dialogsum" ----> 3 dataset = load_dataset(huggingface_dataset_name) File D:\Desktop\Workspace\GenAI\genai\lib\site-packages\datasets\load.py:1804, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 1800 # Build dataset for splits 1801 keep_in_memory = ( 1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1803 ) -> 1804 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) 1805 # Rename and cast features to match task schema 1806 if task is not None: File D:\Desktop\Workspace\GenAI\genai\lib\site-packages\datasets\builder.py:1108, in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory) 1106 is_local = not is_remote_filesystem(self._fs) 1107 if not is_local: -> 1108 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") 1109 if not os.path.exists(self._output_dir): 1110 raise FileNotFoundError( 1111 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call " 1112 "builder.download_and_prepare(), or use " 1113 "datasets.load_dataset() before trying to access the Dataset object." 1114 ) NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. ```
[ -0.22216784954071045, -0.21753501892089844, -0.05269908159971237, 0.3149651288986206, 0.2889442443847656, 0.3062695264816284, 0.2462485432624817, 0.4402695596218109, 0.4070063829421997, -0.022959955036640167, 0.08359038084745407, 0.12875205278396606, -0.07824663817882538, 0.017831921577453613, -0.05677419155836105, -0.21034863591194153, 0.07324241101741791, 0.06333068013191223, 0.09232301265001297, 0.015873640775680542, -0.24962812662124634, 0.16997911036014557, -0.27545300126075745, 0.1785167008638382, -0.4312741458415985, -0.04097156226634979, -0.022053450345993042, 0.22833408415317535, -0.05985039472579956, -0.3683958053588867, 0.4609893262386322, -0.13731573522090912, 0.354960173368454, 0.34682801365852356, -0.00010862593626370654, 0.22044818103313446, 0.42930227518081665, 0.00327986478805542, -0.4315219223499298, -0.014627590775489807, -0.26947277784347534, -0.34785282611846924, 0.23633597791194916, -0.3062014579772949, -0.1057550311088562, -0.042416565120220184, -0.04943692684173584, -0.3257625699043274, 0.44346868991851807, 0.3341318666934967, 0.24498993158340454, 0.12554115056991577, 0.2964962124824524, 0.0570947527885437, -0.02171039953827858, -0.21139739453792572, -0.12315163016319275, 0.10243961215019226, 0.07010062038898468, -0.140783429145813, 0.013373814523220062, 0.04430536925792694, -0.1396302580833435, 0.19806738197803497, 0.3612263798713684, 0.041717953979969025, 0.1733856201171875, -0.36025694012641907, 0.30980604887008667, 0.30327755212783813, 0.9261820912361145, 0.05067216232419014, -0.2476208209991455, -0.15563611686229706, -0.09252896904945374, -0.026665396988391876, 0.43103307485580444, 0.0708555355668068, -0.3256608843803406, 0.19000935554504395, -0.18473340570926666, -0.18471282720565796, 0.010046049952507019, 0.1946432888507843, 0.024795517325401306, 0.5732226967811584, 0.020756568759679794, 0.20311249792575836, -0.018642593175172806, -0.13567689061164856, 0.5156366229057312, -0.17610014975070953, -0.03698786348104477, 0.37100639939308167, -0.39041516184806824, 0.12537504732608795, -0.2353065311908722, 0.15227648615837097, 0.07168904691934586, -0.11699137091636658, -0.021265873685479164, 0.07356826961040497, 0.09040716290473938, 0.1473814845085144, 0.3273715078830719, 0.35765284299850464, 0.007037332281470299, 0.09279026836156845, -0.010378379374742508, 0.06962886452674866, -0.09607144445180893, -0.1552201509475708, -0.2835821509361267, -0.2526363432407379, -0.009639173746109009, -0.08035485446453094, 0.06198497116565704, -0.2749783992767334, -0.10836254805326462, 0.026273425668478012, 0.2387523204088211, -0.05392597243189812, 0.02158842235803604, 0.30876439809799194, -0.09697706997394562, 0.4238206446170807, 0.008033528923988342, 0.07697958499193192, -0.1570982038974762, 0.12911853194236755, -0.1474255472421646, 0.07302562892436981, -0.1462099552154541, 0.08952409774065018, 0.06246629357337952, -0.14403218030929565, 0.41570574045181274, -0.06603973358869553, -0.03672908991575241, -0.17911246418952942, -0.0021452903747558594, 0.008811738342046738, -0.049720399081707, 0.364387184381485, -0.17128469049930573, 0.36726000905036926, 0.4248766303062439, -0.26744505763053894, -0.17774975299835205, 0.23344860970973969, -0.6670094728469849, -0.4564394950866699, -0.25240036845207214, 0.1906139999628067, -0.01278785988688469, -0.16643063724040985, -0.2206800878047943, -0.01975419744849205, 0.33437567949295044, -0.3373587429523468, -0.02664581686258316, -0.178177610039711, -0.2294311374425888, -0.22402667999267578, 0.38241395354270935, 0.13051773607730865, -0.40634390711784363, -0.04774760827422142, -0.26300033926963806, -0.08557015657424927, 0.13224147260189056, 0.15439540147781372, -0.3339669108390808, 0.3489532768726349, -0.25437983870506287, 0.03626985847949982, 0.3588940501213074, -0.38809770345687866, -0.536240816116333, 0.027179695665836334, -0.10251051932573318, 0.28246769309043884, -0.1925378143787384, 0.01193593442440033, -0.17289204895496368, -0.12523096799850464, 0.16810232400894165, 0.3367254436016083, 0.06538370996713638, 0.1278144121170044, -0.2938823997974396, -0.38131341338157654, 0.32287538051605225, 0.22177031636238098, 0.18537965416908264, -0.020392954349517822, 0.08400683104991913, 0.25483474135398865, 0.2106018364429474, -0.06950302422046661, 0.03413653373718262, 0.3098807632923126, 0.020967574790120125, -0.049233563244342804, 0.008174553513526917, 0.06104308366775513, -0.5174999237060547, 0.4289783537387848, 0.016793787479400635, -0.05414960905909538, 0.06809254735708237, -0.0859784185886383, -0.2756425142288208, 0.0058679357171058655, -0.4795072674751282, -0.2977437376976013, 0.17302004992961884, 0.18107372522354126, 0.2543371319770813, 0.1533604860305786, -0.1819232702255249, -0.03173753619194031, -0.1799028217792511, -0.016280898824334145, -0.11061577498912811, 0.12108901888132095, -0.0015178965404629707, 0.009743336588144302, -0.08906083554029465, 0.19831109046936035, 0.026125770062208176, -0.07808010280132294, -0.306904673576355, 0.3272830843925476, 0.031511448323726654, 0.1768735945224762, 0.02311656065285206, -0.06908319890499115, -0.019262805581092834, -0.15156489610671997, -0.048189543187618256, 0.014509961009025574, 0.2130979597568512, -0.1769922375679016, 0.03209036588668823, 0.10967235267162323, 0.11418429762125015, 0.3386273682117462, -0.11876767128705978, 0.1371491253376007, 0.08326861262321472, 0.044077202677726746, 0.3049246072769165, -0.09190887957811356, 0.08328752219676971, 0.06748782098293304, -0.009899541735649109, -0.18242257833480835, 0.2996536195278168, -0.14584361016750336, 0.40372467041015625, 0.15964362025260925, 0.1563645750284195, 0.16273099184036255, -0.16755250096321106, -0.21245647966861725, 0.2110002636909485, -0.04186444729566574, 0.2888355255126953, 0.023901544511318207, -0.023645341396331787, -0.06611137092113495, 0.22194960713386536, -0.00747188925743103, 0.22001175582408905, 0.12875919044017792, 0.2732964754104614, 0.3333756625652313, -0.0006390996277332306, -0.10397271811962128, -0.19813662767410278, 0.22139795124530792, 0.11399998515844345, 0.37749800086021423, -0.09008719772100449, 0.07490721344947815, -0.1928870975971222, 0.3913184404373169, 0.19914481043815613, -0.1340712010860443, -0.23964951932430267, -0.528318464756012, -0.05214325711131096, 0.18321490287780762, 0.12276570498943329, 0.23863011598587036, -0.3186289966106415, 0.10889334976673126, 0.05582360178232193, -0.12054407596588135, -0.21174252033233643, -0.4047448933124542, -0.3804585039615631, 0.11795533448457718, 0.4559706747531891, 0.10531550645828247, 0.2706851363182068, -0.13149020075798035, -0.05568831041455269, -0.345110148191452, -0.11275806277990341, 0.07317934930324554, -0.3026016652584076, 0.347257524728775, -0.03197870030999184, 0.42898374795913696, -0.3684688210487366, -0.5443592071533203, 0.3728659152984619, -0.3767392039299011, -0.043149542063474655, 0.04326365888118744, 0.08870324492454529, -0.026318974792957306, 0.08223865926265717, -0.23472198843955994, -0.4115644097328186, -0.2359897792339325, -0.06907676160335541, 0.15434852242469788, -0.05114568769931793, -0.06424131244421005, 0.158503919839859, 0.15835529565811157, 0.0980338603258133, -0.09657878428697586, -0.26342278718948364, -0.3987402319908142, 0.2076067328453064, -0.2256339192390442, -0.29898661375045776, 0.06476058065891266, 0.11061947047710419, 0.200654074549675, -0.09742806106805801, -0.5503264665603638, -0.06777264177799225, -0.10577908903360367, 0.25421103835105896, 0.0013354092370718718, 0.00846489891409874, 0.24281951785087585, 0.03460534289479256, -0.03162003308534622, -0.016329258680343628, 0.19855067133903503, -0.09919515997171402, -0.2700767517089844, 0.20743250846862793, 0.18843042850494385, 0.2903740108013153, -0.14243540167808533, 0.8331685066223145, 0.2603047490119934, 0.04449886083602905, 0.35901397466659546, -0.05001948028802872, 0.07098495960235596, -0.3170539438724518, -0.2751652002334595, 0.28803741931915283, -0.1572418212890625, -0.08014850318431854, 0.32597753405570984, 0.023564886301755905, -0.27199769020080566, -0.33891505002975464, 0.03294970095157623, -0.41129180788993835, -0.3074589967727661, 0.05375555157661438, 0.1439153105020523, 0.12886521220207214, -0.0583285316824913, -0.00507519394159317, -0.18548032641410828, -0.45099183917045593, 0.2767099142074585, 0.27379390597343445, -0.10576598346233368, -0.015305599197745323, -0.42707374691963196, -0.21752436459064484, -0.5629857182502747, 0.2716645896434784, 0.22394677996635437, 0.35776087641716003, -0.07259202003479004, -0.010105997323989868, 0.15115201473236084, -0.035010822117328644, 0.4271262586116791, -0.4402649998664856, -0.058395739644765854, 0.20762553811073303, 0.16132327914237976, -0.18093454837799072, -0.14025449752807617, -0.0950344055891037, 0.41244441270828247, -0.0270469281822443, 0.06009925156831741, -0.16640838980674744, -0.1330896019935608, 0.057130154222249985, 0.26868683099746704, -0.2820630967617035, -0.35120099782943726, -0.22520732879638672, -0.16315610706806183, -0.30545201897621155, -0.17865212261676788, -0.1617756187915802, 0.40356820821762085, -0.25364136695861816, 0.013391770422458649, -0.4146927297115326, 0.23219341039657593, -0.012210514396429062, 0.014004506170749664, 0.3264378011226654, 0.15551799535751343, -0.07046925276517868, 0.15890002250671387, 0.059295810759067535, 0.057042911648750305, 0.6163012385368347, -0.034500207751989365, 0.01870230957865715, 0.024722199887037277, -0.04876941069960594, -0.019926413893699646, 0.002245485782623291, -0.10198386758565903, -0.07166635245084763, 0.06881766766309738, 0.06242052838206291, -0.1158234179019928, 0.03705565631389618, 0.24652215838432312, 0.06710650771856308, -0.3709304630756378, -0.3655117452144623, 0.6527916193008423, 0.15658171474933624, -0.036014631390571594, 0.304141104221344, 0.19027116894721985, -0.28135770559310913, -0.0394623838365078, 0.34505710005760193, 0.8828222155570984, -0.2278856635093689, 0.13842648267745972, 0.206050306558609, 0.4840794801712036, 0.3896232545375824, -0.38422197103500366, 0.10148097574710846, -0.3369092643260956, -0.24740192294120789, -0.18367551267147064, 0.053306788206100464, 0.01893612928688526, 0.016168445348739624, -0.2684441804885864, 0.21580864489078522, -0.27796536684036255, 0.3500025272369385, -0.02766585722565651, 0.2827875018119812, -0.2117135375738144, -0.07794289290904999, -0.3090009391307831, 0.17744624614715576, -0.050437767058610916, 0.25265294313430786, -0.2317117601633072, 0.10212878882884979, 0.06720375269651413, -0.17795073986053467, -0.3874049186706543, 0.09253659099340439, -0.15418392419815063, 0.5257837772369385, -0.25843286514282227, -0.27665823698043823, -0.05228893458843231, 0.5480850338935852, 0.47955307364463806, 0.08915211260318756, -0.33082476258277893, 0.22213685512542725, -0.08678703010082245, -0.330508828163147, -0.25492697954177856, 0.06361615657806396, 0.25386273860931396, -0.12618926167488098, -0.2938457727432251, 0.32964423298835754, -0.36450690031051636, -0.32261714339256287, 0.06868182122707367, -0.08871215581893921, 0.2977563142776489, -0.28969597816467285, -0.564592719078064, -0.013679694384336472, -0.09347772598266602, -0.050304774194955826, 0.12461432069540024, -0.0011124499142169952, -0.01597277633845806, -0.018342066556215286, 0.22460348904132843, -0.2592104375362396, 0.11678348481655121, 0.44864800572395325, 0.16639305651187897, -0.1559007167816162, 0.8838388919830322, 0.12563464045524597, -0.19606783986091614, -0.22302041947841644, -0.021409831941127777, 0.21228858828544617, -0.21441489458084106, -0.1639414280653, 0.17033375799655914, 0.1330762654542923, -0.062148161232471466, 0.539494514465332, 0.2933872938156128, 0.022168846800923347, -0.07151560485363007, -0.49031367897987366, -0.24555140733718872, 0.19510580599308014, -0.13344460725784302, 0.2413436323404312, 0.027871988713741302, -0.38857078552246094, 0.02817758172750473, 0.1343226134777069, -0.29227033257484436, 0.05885389447212219, -0.2814667820930481, -0.0901588723063469, 0.09789714962244034, 0.0805559977889061, 0.27565863728523254, 0.12182839214801788, 0.1484859585762024, 0.07489152997732162, -0.1428707093000412, -0.26582273840904236, 0.010595403611660004, 0.18383577466011047, 0.2533658444881439, -0.21713891625404358, -0.015214234590530396, -0.2539636492729187, 0.01604330912232399, -0.20422157645225525, 0.23426109552383423, -0.04583882912993431, -0.08357010036706924, 0.05104514956474304, 0.33875221014022827, 0.197756826877594, -0.30292201042175293, 0.3161884844303131, -0.23435062170028687, 0.062175966799259186, 0.019280429929494858, -0.07223979383707047, 0.3004647195339203, 0.1033565104007721, 0.13690848648548126, 0.16144853830337524, 0.1557426154613495, 0.11480984091758728, 0.2155313491821289, -0.4159311354160309, 0.05678912252187729, 0.14266741275787354, 0.0023095235228538513, 0.485956609249115, -0.22643467783927917, 0.036259301006793976, 0.341857373714447, 0.2564026415348053, -0.09509474039077759, -0.2818186283111572, 0.22944439947605133, 0.01606374979019165, -0.06829603761434555, 0.009664267301559448, 0.16302679479122162, -0.4421405792236328, -0.016048088669776917, 0.07074011862277985, 0.25568288564682007, -0.4058372378349304, 0.13923139870166779, 0.4757690727710724, -0.052028682082891464, -0.05930084362626076, -0.04874701052904129, -0.03140393644571304, 0.06522106379270554, 0.19785359501838684, -0.2880517840385437, 0.266745001077652, -0.14951634407043457, 0.2283433973789215, -0.2634660303592682, -0.5860159397125244, 0.525665283203125, 0.10345905274152756, -0.2066936492919922, 0.23911811411380768, 0.01915604993700981, 0.13707932829856873, -0.06904511153697968, 0.029117323458194733, -0.4474733769893646, 0.22170643508434296, -0.1575520932674408, -0.22813533246517181, -0.002412170171737671, -0.2196437120437622, 0.0912894532084465, 0.05066322535276413, -0.10037970542907715, -0.1913224458694458, 0.0777614638209343, 0.11392904818058014, -0.1828056424856186, -0.16249220073223114, 0.15339039266109467, 0.36050912737846375, 0.11226813495159149, -0.1818157285451889, 0.21689452230930328, 0.14344452321529388, 0.03646448999643326, 0.01984724961221218, 0.24454203248023987, 0.39933210611343384, 0.42638838291168213, -0.3626960813999176, 0.03605753183364868, 0.017197657376527786, 0.005538225173950195, 0.04952356964349747, 0.41889142990112305, 0.02563174068927765, -0.0368308499455452, 0.32827484607696533, 0.20663827657699585, -0.15832065045833588, -0.07569196075201035, -0.18620514869689941, 0.2847234606742859, -0.2533957064151764, -0.14503397047519684, 0.13302424550056458, 0.005982547998428345, -0.09366396069526672, 0.25290825963020325, -0.2857005000114441, 0.08612978458404541, 0.13748596608638763, -0.05681721866130829, 0.19729018211364746, -0.04884684085845947, 0.080339714884758, -0.19628699123859406, 0.6226208209991455, 0.49000221490859985, -0.09911173582077026, -0.11442212760448456, -0.1935451626777649, -0.602260947227478, 0.22437602281570435, -0.21460279822349548, -0.2749970555305481, 0.222683846950531, -0.20923924446105957, -0.04547633230686188, 0.32840558886528015, 0.08632829785346985, 0.09679478406906128, -0.05868086591362953, 0.0602310411632061, -0.36121314764022827, -0.15371352434158325, 0.036055561155080795, 0.038488760590553284, -0.1227995902299881, -0.47386184334754944, 0.20224668085575104, -0.0875130444765091, 0.012637346982955933, -0.1375250220298767, 0.13164454698562622, -0.0025319531559944153, -0.23793992400169373, 0.3885869085788727, 0.2175053507089615, 0.48052769899368286, -0.009271785616874695, -0.05377275496721268, -0.4141143560409546, -0.27973055839538574, -0.13814663887023926, 0.16709935665130615, -0.0486191064119339, 0.3043428659439087, -0.24832239747047424, -0.035112712532281876, -0.21112702786922455, 0.23785638809204102, 0.14217878878116608, 0.288217157125473, -0.11677920818328857, -0.09823615849018097, 0.09163007885217667, 0.10572971403598785, 0.44798335433006287, 0.2896875739097595, 0.06225525960326195, 0.11094910651445389, -0.07257360965013504, -0.19082525372505188, 0.4050973057746887, -0.4413759708404541, -0.2967064380645752, 0.02106921747326851, -0.0903158038854599, -0.1393067091703415, -0.1240466833114624, -0.5088819861412048, 0.13426585495471954, 0.4927383065223694, 0.0715913474559784, -0.08924165368080139, 0.1317151039838791, 0.020043499767780304, -0.038431137800216675, -0.15593969821929932, 0.0863005667924881, -0.1830071210861206, -0.01744082197546959, -0.23489992320537567, -0.28018689155578613 ]
https://github.com/huggingface/datasets/issues/6352
This error stems from a breaking change in `fsspec`. It has been fixed in the latest `datasets` release (`2.14.6`). Updating the installation with `pip install -U datasets` should fix the issue.
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
I was trying to load the wiki dataset, but i got this error traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
31
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") I was trying to load the wiki dataset, but i got this error traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. This error stems from a breaking change in `fsspec`. It has been fixed in the latest `datasets` release (`2.14.6`). Updating the installation with `pip install -U datasets` should fix the issue.
[ -0.36869052052497864, -0.10481400042772293, 0.001288868486881256, 0.1946215033531189, 0.27150219678878784, 0.0910446047782898, 0.062023088335990906, 0.3505300283432007, 0.38558250665664673, 0.03684042766690254, 0.15493622422218323, 0.20195260643959045, -0.050123684108257294, 0.28850123286247253, -0.1578100323677063, -0.18019996583461761, 0.19849678874015808, 0.13243284821510315, -0.022746995091438293, 0.09337575733661652, -0.18804296851158142, 0.289600133895874, -0.28691333532333374, 0.15822875499725342, -0.3673878014087677, 0.07463399320840836, -0.040267378091812134, 0.23402975499629974, -0.17717483639717102, -0.5925015211105347, 0.5585702061653137, -0.18501640856266022, 0.29087063670158386, 0.2985510230064392, -0.00011634403199423105, 0.14387382566928864, 0.45930200815200806, 0.017602495849132538, -0.32629886269569397, 0.07457873225212097, -0.316256582736969, -0.43757200241088867, 0.2425767183303833, -0.17847990989685059, -0.06227419525384903, -0.16781778633594513, -0.049323901534080505, -0.29464322328567505, 0.46597105264663696, 0.4910892844200134, 0.19855743646621704, 0.09446272253990173, 0.32353031635284424, -0.03486345335841179, 0.03279297053813934, -0.3149280250072479, -0.13730362057685852, -0.2877734303474426, 0.0026443377137184143, -0.25649261474609375, 0.06706888973712921, -0.02049829438328743, -0.09227950870990753, 0.15789516270160675, 0.3620060682296753, -0.09065402299165726, 0.2521490454673767, -0.3558071255683899, 0.27663230895996094, 0.2639273703098297, 0.8795590996742249, 0.04918834939599037, -0.36139747500419617, -0.12112955749034882, -0.12851952016353607, 0.059752047061920166, 0.3696490228176117, -0.11422634869813919, -0.28698813915252686, 0.13492542505264282, 0.07889582216739655, -0.2677430808544159, 0.025220513343811035, 0.24147392809391022, 0.005614474415779114, 0.4050341844558716, -0.018552184104919434, 0.17251402139663696, -0.028103962540626526, -0.2623288035392761, 0.4426894187927246, -0.0602264329791069, -0.13305974006652832, 0.26593446731567383, -0.368897944688797, 0.08732198178768158, -0.00562705285847187, 0.18265749514102936, -0.039464302361011505, -0.0948796346783638, -0.29460984468460083, 0.14752118289470673, 0.0956132560968399, 0.20161277055740356, 0.25061535835266113, 0.24498815834522247, 0.12259795516729355, 0.11649346351623535, -0.02255229279398918, -0.045513685792684555, -0.05731391906738281, -0.19113169610500336, -0.1493186056613922, -0.37577012181282043, -0.2403467297554016, -0.07304754853248596, 0.04634921997785568, -0.2961859703063965, -0.14285951852798462, 0.0600234717130661, 0.38763362169265747, -0.033050287514925, -0.10977552086114883, 0.33040958642959595, -0.03362130746245384, 0.6192833185195923, 0.03752865642309189, 0.10346203297376633, -0.30034536123275757, 0.17665798962116241, -0.10922086983919144, -0.029919398948550224, -0.2068372666835785, 0.055198729038238525, 0.037691809237003326, -0.017139680683612823, 0.35055917501449585, -0.12677526473999023, -0.086041659116745, -0.052108313888311386, -0.17298486828804016, 0.05650632828474045, -0.017742011696100235, 0.4507425129413605, -0.2574039697647095, 0.3851242959499359, 0.3536381423473358, -0.2636632025241852, -0.21497711539268494, 0.21083489060401917, -0.5810545086860657, -0.4282808303833008, -0.30448776483535767, 0.11523598432540894, 0.06122688949108124, -0.22481763362884521, -0.31978926062583923, -0.028308171778917313, 0.20207519829273224, -0.4967557191848755, -0.01946188509464264, -0.3304653465747833, -0.34484779834747314, -0.16760137677192688, 0.2314145565032959, 0.16789206862449646, -0.31135761737823486, -0.13699236512184143, -0.32651033997535706, -0.12892305850982666, 0.11477072536945343, 0.10889837890863419, -0.26082924008369446, 0.2642258107662201, -0.17020362615585327, 0.022534817457199097, 0.4576464891433716, -0.4878321886062622, -0.6016172170639038, 0.09888926893472672, 0.07407572865486145, 0.14923515915870667, -0.18968220055103302, -0.15695996582508087, -0.032872822135686874, -0.13940951228141785, -0.0018782131373882294, 0.24707113206386566, 0.026875721290707588, 0.2090904712677002, -0.2104620635509491, -0.5126625895500183, 0.44056153297424316, 0.13568344712257385, 0.2593223452568054, 0.08822137117385864, 0.07563084363937378, 0.2839664816856384, 0.24923476576805115, -0.0303785502910614, 0.024697862565517426, 0.3083898723125458, 0.30767467617988586, 0.019170572981238365, 0.0518864244222641, -0.19896292686462402, -0.436222642660141, 0.43676117062568665, -0.05467148497700691, -0.08255618065595627, 0.0742657333612442, 0.0330619141459465, -0.2508901059627533, 0.06225304305553436, -0.3323438763618469, -0.35309073328971863, 0.07186461240053177, 0.13288918137550354, 0.2419542819261551, 0.1468665599822998, -0.15967822074890137, 0.021972140297293663, -0.10021995007991791, -0.01850549876689911, -0.0761680155992508, 0.2024616003036499, 0.01685011386871338, -0.0649712085723877, -0.09271065145730972, 0.2906095087528229, 0.1382148265838623, -0.0830523669719696, -0.34914255142211914, 0.3959586024284363, 0.31684792041778564, 0.10806024074554443, -0.021627141162753105, 0.0595540925860405, -0.05064157396554947, -0.23744474351406097, -0.04962962865829468, 0.09079240262508392, 0.14523860812187195, -0.04168657958507538, 0.07125842571258545, -0.045131616294384, 0.11490832269191742, 0.41169559955596924, -0.13027328252792358, 0.1941230297088623, 0.17468540370464325, 0.0030638277530670166, 0.23174433410167694, -0.13377897441387177, 0.040173862129449844, 0.10995501279830933, -0.004320822656154633, -0.151871919631958, 0.4029601812362671, -0.04112233966588974, 0.45694422721862793, 0.21479348838329315, 0.007432589307427406, 0.3039594888687134, -0.1356646865606308, -0.17085376381874084, 0.3407021760940552, -0.02170751988887787, 0.3005521297454834, 0.04154874384403229, -0.15463533997535706, -0.006606684066355228, 0.2028529942035675, 0.08317983150482178, 0.30519670248031616, 0.14579910039901733, 0.18277381360530853, 0.289092481136322, 0.12473978102207184, -0.02564404159784317, -0.2342885285615921, 0.1877596080303192, -0.01856335997581482, 0.3935852348804474, -0.13057184219360352, 0.17584289610385895, -0.30181339383125305, 0.3214176297187805, 0.09340463578701019, -0.06273543834686279, -0.038991861045360565, -0.48361992835998535, -0.046368371695280075, 0.23451977968215942, 0.11837629228830338, 0.28823137283325195, -0.23259645700454712, 0.11282936483621597, 0.059572674334049225, -0.023462818935513496, -0.22087286412715912, -0.2673719525337219, -0.43277549743652344, 0.012182269245386124, 0.4483376145362854, 0.2443162202835083, 0.14152806997299194, -0.03705623745918274, -0.06249766796827316, -0.35354065895080566, -0.19438457489013672, 0.05580209195613861, -0.23869474232196808, 0.40951892733573914, 0.018910901620984077, 0.2950247526168823, -0.12835970520973206, -0.4209284782409668, 0.31718146800994873, -0.5252508521080017, -0.008779581636190414, 0.03777754306793213, 0.03523518517613411, -0.15805290639400482, 0.01868380606174469, -0.31193652749061584, -0.37885215878486633, -0.20757031440734863, 0.08328436315059662, 0.02673134207725525, -0.02427656576037407, -0.09778967499732971, 0.1803039312362671, -0.023985382169485092, -0.07352615892887115, -0.1661689281463623, -0.1982283592224121, -0.2823559045791626, 0.12926986813545227, -0.30141571164131165, -0.34464937448501587, 0.08708880841732025, 0.17301660776138306, 0.061767254024744034, -0.13760007917881012, -0.48345234990119934, -0.043466173112392426, -0.2314353734254837, 0.2839546501636505, -0.036174897104501724, 0.13066230714321136, 0.4148077964782715, 0.14243468642234802, -0.00409727543592453, -0.15925079584121704, 0.22566327452659607, -0.11872775852680206, -0.1415153443813324, 0.13942302763462067, 0.07206091284751892, 0.2185859978199005, -0.10217950493097305, 0.7706573605537415, 0.42925402522087097, 0.05849689245223999, 0.3065059185028076, -0.21664199233055115, 0.08565443009138107, -0.3621175289154053, -0.2712082862854004, 0.28468057513237, -0.2396276593208313, -0.02956421673297882, 0.29461967945098877, 0.05291545391082764, -0.21521274745464325, -0.20790112018585205, 0.30277523398399353, -0.38837242126464844, -0.298805832862854, -0.0202605240046978, 0.1560032069683075, 0.2248966097831726, 0.030429311096668243, 0.10359203815460205, -0.14774051308631897, -0.3667061924934387, 0.285204142332077, 0.2167823612689972, -0.18094760179519653, -0.01894289441406727, -0.39273393154144287, -0.2743575870990753, -0.6062971353530884, 0.2041969746351242, 0.21911169588565826, 0.46215710043907166, -0.0819842591881752, 0.025465063750743866, 0.09619324654340744, -0.0427325963973999, 0.3728705942630768, -0.4928569495677948, -0.06664133071899414, 0.25600650906562805, 0.22759252786636353, -0.3565645217895508, -0.21138544380664825, -0.03330158442258835, 0.3102763593196869, -0.04103948175907135, -0.06678649038076401, -0.150310218334198, -0.27635201811790466, -0.007298496551811695, 0.15742434561252594, -0.24330611526966095, -0.1186496913433075, -0.19988325238227844, -0.032218221575021744, -0.3138273358345032, -0.305900514125824, -0.11524742841720581, 0.38640907406806946, -0.317256361246109, 0.05441747605800629, -0.3814697265625, 0.2445903718471527, -0.07488882541656494, 0.013154376298189163, 0.3326946496963501, 0.12587565183639526, -0.054015494883060455, 0.14197158813476562, -0.053322434425354004, 0.2071627974510193, 0.6282250881195068, -0.08878543972969055, -0.031081385910511017, 0.059168025851249695, 0.0686962902545929, -0.04817555844783783, 0.10201133787631989, -0.18826036155223846, -0.12207836657762527, -0.0062507521361112595, 0.146444171667099, -0.2539963722229004, 0.1166229322552681, 0.3608326315879822, 0.12061213701963425, -0.18193134665489197, -0.3636598289012909, 0.7125648260116577, 0.1771271824836731, -0.07842712104320526, 0.27660703659057617, 0.32459938526153564, -0.2101239264011383, 0.19920112192630768, 0.11176517605781555, 0.7636168003082275, -0.11665090918540955, 0.18919327855110168, 0.1910257339477539, 0.3818979263305664, 0.30470797419548035, -0.40778130292892456, -0.01545001845806837, -0.2791961431503296, -0.1823684275150299, -0.18072205781936646, 0.001880452036857605, 0.20730602741241455, -0.024115893989801407, -0.22827109694480896, 0.32487496733665466, -0.08803601562976837, 0.14475469291210175, 0.02533721551299095, 0.2705758512020111, -0.09808506816625595, -0.12803292274475098, -0.34099066257476807, 0.19283141195774078, 0.023924387991428375, 0.2902858555316925, -0.16252170503139496, 0.1290510892868042, 0.03345920145511627, -0.16621166467666626, -0.6019222140312195, 0.12786976993083954, -0.09774661809206009, 0.4768003225326538, -0.07505367696285248, -0.08628231287002563, 0.0930883139371872, 0.5330827236175537, 0.3342381417751312, 0.1057148277759552, -0.4461606442928314, 0.278563529253006, -0.08268497884273529, -0.22244054079055786, -0.106172114610672, 0.053690169006586075, 0.1652912050485611, -0.09279558807611465, -0.29046332836151123, 0.18973776698112488, -0.3936060667037964, -0.23486921191215515, 0.17855361104011536, -0.02255360037088394, 0.4304391145706177, -0.33699870109558105, -0.5449535250663757, 0.07198512554168701, 0.08481979370117188, -0.08451095968484879, 0.08292871713638306, 0.0014166533946990967, -0.08172914385795593, 0.2600686550140381, 0.15482249855995178, -0.21006500720977783, 0.1498936265707016, 0.4307914078235626, -0.05194095894694328, -0.07503977417945862, 0.8685649037361145, 0.036575719714164734, -0.17252114415168762, -0.1825055480003357, 0.01358465850353241, 0.09117695689201355, -0.18832029402256012, -0.2688746154308319, 0.12809185683727264, 0.004811838269233704, 0.08990661799907684, 0.7709431648254395, 0.12416922301054001, -0.026143983006477356, -0.07514828443527222, -0.33540821075439453, -0.09891648590564728, 0.14987188577651978, -0.14161771535873413, 0.2175310254096985, -0.08562614023685455, -0.20977628231048584, -0.10892809182405472, 0.10790812224149704, -0.23587504029273987, 0.168824702501297, -0.08769074827432632, -0.022961333394050598, 0.13496752083301544, 0.07959650456905365, 0.3140515387058258, -0.08082073926925659, 0.03210044279694557, 0.09340304136276245, -0.226019024848938, -0.18710047006607056, -0.1049114316701889, 0.19166578352451324, 0.3648652136325836, -0.23732176423072815, -0.05410059913992882, -0.20597633719444275, -0.030521493405103683, -0.1959076225757599, 0.2411586046218872, 0.08676435798406601, -0.14328649640083313, 0.2613242268562317, 0.29729458689689636, 0.13545961678028107, -0.08313044905662537, 0.3977091908454895, -0.10622246563434601, 0.15639621019363403, 0.009371235966682434, 0.10442526638507843, 0.19697518646717072, 0.11167637258768082, 0.17126776278018951, 0.208192840218544, 0.17780250310897827, 0.18907548487186432, 0.21138888597488403, -0.4655373990535736, 0.06605619192123413, 0.13869866728782654, 0.05731093883514404, 0.5320175886154175, -0.18603019416332245, -0.007650204002857208, 0.44875872135162354, 0.22256220877170563, -0.15194222331047058, -0.3262392282485962, 0.2983893156051636, 0.05221565440297127, -0.04518117010593414, -0.11552261561155319, 0.2834789752960205, -0.5541699528694153, 0.07825277745723724, 0.15262676775455475, 0.0072562433779239655, -0.30821987986564636, 0.28923138976097107, 0.31905120611190796, 0.00535612553358078, -0.04229125753045082, 0.006792804226279259, -0.08334940671920776, 0.08440634608268738, 0.4644467830657959, -0.08382388204336166, 0.352505624294281, -0.07553130388259888, 0.260137140750885, -0.3514768183231354, -0.6184098720550537, 0.5184111595153809, -0.16672511398792267, -0.08349394798278809, 0.10259224474430084, 0.02413851022720337, 0.2345544397830963, -0.10543206334114075, -0.09500280022621155, -0.41269904375076294, 0.21720844507217407, -0.14238259196281433, -0.43280142545700073, 0.2617797255516052, -0.011599943041801453, 0.1594654619693756, 0.05163399130105972, -0.13760364055633545, -0.24540001153945923, 0.28247058391571045, 0.14041650295257568, -0.18577033281326294, -0.18939976394176483, -0.05378784239292145, 0.30618035793304443, 0.16274338960647583, -0.08613422513008118, 0.28739726543426514, -0.02307410165667534, -0.14879484474658966, -0.04028373956680298, 0.252724826335907, 0.46529123187065125, 0.3168194591999054, -0.48223719000816345, 0.01428120955824852, -0.008786683902144432, 0.06181032955646515, 0.11893901973962784, 0.4164513051509857, -0.09835165739059448, 0.14019320905208588, 0.24457590281963348, 0.13800176978111267, -0.15670087933540344, -0.23377004265785217, -0.24604271352291107, 0.3341364562511444, -0.33586204051971436, 0.03188396990299225, 0.13698330521583557, 0.226854607462883, -0.10323461890220642, 0.30274707078933716, -0.34437626600265503, -0.003122132271528244, 0.23820717632770538, -0.028634125366806984, 0.23054084181785583, -0.09918497502803802, 0.05719535052776337, -0.17646804451942444, 0.5425515174865723, 0.45248767733573914, -0.030535951256752014, 0.009058661758899689, -0.23782476782798767, -0.53421550989151, 0.11806133389472961, -0.23678980767726898, -0.10061761736869812, 0.25684550404548645, -0.10355810821056366, -0.15054656565189362, 0.19608750939369202, 0.12227924168109894, -0.0011881515383720398, -0.07029148936271667, 0.151389941573143, -0.31541377305984497, 0.03510485589504242, -0.08973127603530884, 0.0485258549451828, -0.07615385204553604, -0.5238589644432068, 0.1262296736240387, -0.1295781135559082, -0.04303726553916931, -0.05996864289045334, -0.004861854016780853, -0.06797068566083908, -0.5225113034248352, 0.4600878655910492, 0.26248231530189514, 0.3570077419281006, -0.07365775108337402, -0.15221473574638367, -0.42716625332832336, -0.41411447525024414, -0.13730068504810333, 0.15950080752372742, -0.17239828407764435, 0.39967283606529236, -0.3076990246772766, 0.10379213094711304, -0.2554786503314972, 0.1078140139579773, 0.15875113010406494, 0.1592661291360855, -0.21880164742469788, 0.034716978669166565, -0.027662381529808044, 0.14950348436832428, 0.22162890434265137, 0.26340946555137634, 0.0409039631485939, 0.20185521245002747, -0.0034680962562561035, -0.1701556295156479, 0.4411471486091614, -0.439770370721817, -0.3185466527938843, -0.04664980247616768, 0.0006973892450332642, -0.19497212767601013, -0.24846979975700378, -0.5056139230728149, 0.050505176186561584, 0.31364667415618896, 0.09888360649347305, -0.08442984521389008, 0.10236258059740067, -0.13611078262329102, -0.07134281098842621, -0.19323475658893585, 0.3930707275867462, -0.16409972310066223, 0.0422842800617218, -0.03873908892273903, -0.27491819858551025 ]
https://github.com/huggingface/datasets/issues/6350
`load_dataset` returns a `DatasetDict` object unless `split` is defined, in which case it returns a `Dataset` (or a list of datasets if `split` is a list). We've discussed dropping `DatasetDict` from the API in https://github.com/huggingface/datasets/issues/5189 to always return the same type in `load_dataset` and support datasets without (explicit) splits. IIRC the main discussion point is deciding what to return when loading a dataset with multiple splits, but `split` is not specified. What would you expect as a return value in that scenario?
Different objects are returned from calls that should be returning the same kind of object.
### Describe the bug 1. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir, split='train[:1%]') 2. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir) The only difference I would expect these calls to have is the size of the dataset. But, while 2. returns a dictionary with "train" key in it, 1. returns a dataset WITHOUT any initial "train" keyword. Both calls are to be used within exactly the same context. They should return identically structured datasets of different size. ### Steps to reproduce the bug See above. ### Expected behavior Expect both calls to return the same structured Dataset structure but with different number of elements, i.e. call 1. should have 1% of the data of the call 2.0 ### Environment info Ubuntu 20.04 gcc 9.x.x. It is really irrelevant.
82
Different objects are returned from calls that should be returning the same kind of object. ### Describe the bug 1. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir, split='train[:1%]') 2. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir) The only difference I would expect these calls to have is the size of the dataset. But, while 2. returns a dictionary with "train" key in it, 1. returns a dataset WITHOUT any initial "train" keyword. Both calls are to be used within exactly the same context. They should return identically structured datasets of different size. ### Steps to reproduce the bug See above. ### Expected behavior Expect both calls to return the same structured Dataset structure but with different number of elements, i.e. call 1. should have 1% of the data of the call 2.0 ### Environment info Ubuntu 20.04 gcc 9.x.x. It is really irrelevant. `load_dataset` returns a `DatasetDict` object unless `split` is defined, in which case it returns a `Dataset` (or a list of datasets if `split` is a list). We've discussed dropping `DatasetDict` from the API in https://github.com/huggingface/datasets/issues/5189 to always return the same type in `load_dataset` and support datasets without (explicit) splits. IIRC the main discussion point is deciding what to return when loading a dataset with multiple splits, but `split` is not specified. What would you expect as a return value in that scenario?
[ 0.065458744764328, -0.35832369327545166, -0.047362830489873886, 0.541680097579956, 0.15500470995903015, -0.27208226919174194, 0.2597043514251709, 0.172197625041008, 0.10662220418453217, 0.15586790442466736, -0.15613983571529388, 0.31378409266471863, -0.04439716413617134, 0.3652834892272949, -0.024172235280275345, -0.2792162299156189, 0.17914138734340668, 0.06686512380838394, -0.09482593834400177, -0.3108758330345154, -0.11311300098896027, 0.5632565021514893, 0.09311699867248535, 0.16635164618492126, -0.6222881078720093, 0.005307391285896301, -0.19270223379135132, 0.12742778658866882, -0.053884923458099365, -0.09327498078346252, 0.60222327709198, -0.006467822007834911, -0.31362614035606384, 0.40642446279525757, -0.00011896874639205635, 0.10233145952224731, 0.1069055125117302, -0.05779372900724411, -0.22349075973033905, -0.4928985834121704, 0.09773087501525879, -0.1396632194519043, 0.3633905053138733, -0.17792212963104248, -0.042902156710624695, -0.09468181431293488, -0.12964224815368652, -0.3910175561904907, 0.2641482651233673, 0.07794354110956192, 0.16721715033054352, 0.1275208741426468, -0.32374322414398193, -0.09159043431282043, 0.3900776505470276, 0.3113870918750763, -0.021807849407196045, 0.16028758883476257, -0.12536722421646118, 0.21806234121322632, 0.17081372439861298, 0.10705575346946716, -0.19060835242271423, 0.2244216948747635, -0.029070746153593063, 0.4023273289203644, -0.3171062767505646, -0.2099023014307022, 0.14037363231182098, 0.2983321249485016, 0.48220887780189514, -0.0067753419280052185, -0.20860373973846436, -0.4968891143798828, -0.08605197817087173, -0.2355969101190567, 0.10015437006950378, 0.2849465608596802, -0.1476270854473114, 0.02868308499455452, -0.24066868424415588, 0.36370182037353516, 0.004386648535728455, 0.06402209401130676, -0.364402174949646, -0.19929465651512146, -0.09431871771812439, 0.4819507300853729, -0.08568510413169861, 0.34484919905662537, -0.21172741055488586, -0.2660883069038391, -0.004312808625400066, -0.11314008384943008, -0.045580994337797165, -0.0118354931473732, 0.2150011956691742, -0.3048635721206665, 0.3946802616119385, 0.2396288812160492, 0.11565019190311432, 0.05476905032992363, -0.2897990047931671, 0.02013108693063259, 0.46303388476371765, 0.23479507863521576, 0.12496425211429596, 0.0899864062666893, 0.05493533983826637, -0.05993835628032684, -0.34937724471092224, -0.03312193974852562, 0.3393397033214569, 0.16018404066562653, 0.03886381536722183, 0.07439668476581573, 0.3803139626979828, -0.34084391593933105, -0.4446600675582886, -0.04606863483786583, -0.2586694061756134, -0.08731479942798615, -0.1471804678440094, 0.19213572144508362, 0.053500860929489136, 0.3736187219619751, 0.05637890845537186, 0.17087899148464203, -0.2980262041091919, -0.3497638404369354, -0.26991602778434753, -0.23181374371051788, -0.3936464786529541, 0.1670936644077301, 0.13201265037059784, -0.030887490138411522, 0.11264091730117798, 0.29513996839523315, -0.030117105692625046, -0.33107274770736694, 0.17959612607955933, -0.336821049451828, 0.41907477378845215, -0.00458191242069006, 0.002719581127166748, 0.28357142210006714, 0.21578848361968994, -0.004463940858840942, -0.14200879633426666, -0.08633097261190414, -0.40121209621429443, -0.3897797465324402, 0.17479833960533142, 0.0962536558508873, 0.0046758949756622314, 0.2699577212333679, -0.13744108378887177, 0.5619325637817383, 0.10093015432357788, -0.10428562760353088, 0.0181162990629673, -0.17441314458847046, -0.35261794924736023, -0.43129897117614746, -0.009124066680669785, 0.24528443813323975, -0.33150655031204224, -0.2550598680973053, 0.10207752883434296, -0.31726664304733276, 0.03596435487270355, 0.2443004697561264, -0.2903583347797394, 0.27078744769096375, -0.4168059825897217, -0.14621202647686005, 0.08794713765382767, -0.16620957851409912, -0.5218116044998169, 0.14630398154258728, 0.044500529766082764, 0.3471996784210205, 0.04078351706266403, -0.04148609936237335, 0.320934921503067, 0.1416786015033722, 0.3934864401817322, 0.30401015281677246, -0.0415554903447628, 0.030146658420562744, -0.13591039180755615, -0.07100694626569748, 0.1595144122838974, -0.1890716552734375, 0.06113075837492943, 0.1341366171836853, 0.0245760977268219, -0.14687390625476837, 0.25757527351379395, -0.026628192514181137, -0.11646676808595657, -0.20213504135608673, 0.05690774694085121, 0.11589618027210236, 0.09583667665719986, -0.07478038221597672, -0.5829615592956543, 0.29105061292648315, -0.10570251196622849, -0.10252375900745392, 0.03994745388627052, -0.22377613186836243, -0.1837439239025116, 0.06809071451425552, -0.060696009546518326, -0.19932852685451508, 0.05672815814614296, 0.30322039127349854, 0.1619139164686203, 0.1719236969947815, -0.11518813669681549, 0.4894191324710846, -0.05191884934902191, 0.18294957280158997, -0.16878369450569153, 0.48775094747543335, 0.21772870421409607, -0.09889595955610275, -0.24087654054164886, 0.16524945199489594, 0.17311730980873108, -0.1615430861711502, -0.10348118841648102, 0.22901201248168945, 0.3221418857574463, -0.16269102692604065, -0.19177845120429993, -0.018743157386779785, 0.04842280596494675, 0.12636040151119232, 0.10140439122915268, 0.028805658221244812, 0.21345408260822296, -0.23072975873947144, 0.01299340184777975, 0.7672535181045532, 0.09430792927742004, 0.28881770372390747, 0.0593770295381546, -0.026623312383890152, -0.04082534834742546, 0.011292360723018646, -0.10199742019176483, -0.16187995672225952, 0.04544445499777794, -0.3011414706707001, 0.2581024765968323, 0.1568925827741623, -0.2719859480857849, 0.07389265298843384, 0.9049249887466431, -0.11569029092788696, 0.030558237805962563, -0.0033722748048603535, -0.15996915102005005, -0.19574907422065735, -0.07523653656244278, 0.35210126638412476, 0.7526580691337585, 0.1783749908208847, 0.057234302163124084, 0.06597305089235306, -0.03613368794322014, 0.031239282339811325, 0.20572307705879211, 0.24567630887031555, 0.07452334463596344, 0.23198050260543823, 0.14558972418308258, -0.12856726348400116, -0.41388726234436035, -0.03793329745531082, 0.0005524232983589172, -0.17959576845169067, -0.11340826004743576, 0.19564306735992432, -0.168250173330307, -0.06813958287239075, -0.42236241698265076, -0.10988438874483109, -0.21369615197181702, -0.21032027900218964, -0.1486329734325409, 0.09839941561222076, -0.0861002579331398, -0.09558850526809692, -0.09403006732463837, 0.34067052602767944, -0.1990702748298645, 0.17722833156585693, 0.13962596654891968, 0.10493774712085724, -0.4026837646961212, -0.04538567736744881, 0.046493735164403915, -0.09539953619241714, 0.4279790222644806, -0.14305655658245087, -0.1300467997789383, -0.06165485456585884, -0.27941179275512695, 0.4169037342071533, -0.13966383039951324, 0.005595700815320015, 0.31985166668891907, 0.05426032841205597, 0.16138038039207458, -0.15891480445861816, 0.21797578036785126, -0.19920770823955536, -0.22999656200408936, -0.007661741226911545, 0.038600511848926544, 0.04294449836015701, -0.21706578135490417, -0.43607428669929504, -0.07115808874368668, -0.09490322321653366, 0.12107236683368683, -0.02665921300649643, 0.12058305740356445, 0.011800229549407959, -0.010693669319152832, 0.16232308745384216, 0.1066938266158104, 0.14101934432983398, -0.5550056099891663, -0.15114454925060272, -0.20330718159675598, -0.10772281140089035, -0.3160804212093353, -0.28393611311912537, -0.13132213056087494, 0.06086030602455139, 0.059094224125146866, -0.47477656602859497, 0.04653899744153023, -0.07864902913570404, 0.1456068903207779, 0.08653122186660767, -0.22317561507225037, 0.23841586709022522, -0.010921701788902283, -0.05650775134563446, -0.22504284977912903, -0.33776745200157166, 0.18476250767707825, 0.11336345225572586, 0.12641572952270508, 0.17365920543670654, 0.11187101900577545, 0.09959590435028076, 0.602367639541626, 0.24431197345256805, -0.10267962515354156, 0.2505641579627991, 0.22167249023914337, 0.20816415548324585, -0.49542221426963806, -0.20400241017341614, -0.07220718264579773, -0.2750931978225708, -0.11887004971504211, 0.4203889071941376, 0.027788765728473663, -0.18324816226959229, -0.1518799066543579, -0.043156154453754425, -0.08892663568258286, -0.3152875602245331, 0.16276396811008453, -0.1882157176733017, -0.3588158190250397, 0.08401316404342651, 0.1566014587879181, -0.14486294984817505, 0.3145526647567749, -0.07914337515830994, -0.0040892548859119415, -0.05654492974281311, 0.026739727705717087, -0.7441859245300293, -0.07314430177211761, -0.34676456451416016, 0.47502410411834717, 0.07849385589361191, -0.11113299429416656, 0.09311996400356293, -0.15802618861198425, 0.3920573890209198, 0.17468811571598053, 0.8303183317184448, 0.24750038981437683, -0.34809884428977966, 0.07095485925674438, -0.1663183867931366, -0.3199910521507263, -0.4401675760746002, -0.1782972663640976, 0.485680490732193, 0.11915756016969681, 0.26009660959243774, -0.5185904502868652, -0.2293931543827057, 0.016035106033086777, 0.09739968925714493, -0.10558311641216278, 0.09009112417697906, -0.22720536589622498, -0.07103586196899414, -0.04226737469434738, 0.03160977363586426, -0.1375424861907959, 0.12176674604415894, -0.42525482177734375, -0.43708232045173645, -0.07224767655134201, -0.08018389344215393, 0.01777447760105133, -0.06416169553995132, 0.5055907368659973, -0.26038116216659546, -0.029657702893018723, 0.40866750478744507, 0.6290429830551147, 0.01938159577548504, 0.7154773473739624, -0.33543723821640015, -0.2594788372516632, 0.23723992705345154, -0.09667229652404785, 0.1309737265110016, 0.5121166706085205, 0.033818796277046204, -0.03481391444802284, -0.09172940254211426, 0.03945164382457733, -0.010388834401965141, 0.06645052134990692, 0.45575273036956787, 0.06333591043949127, -0.657263457775116, -0.5565394759178162, 0.40945005416870117, 0.12399469316005707, -0.3269893527030945, 0.5763641595840454, 0.17993350327014923, -0.34147948026657104, 0.640242338180542, -0.2994452118873596, 0.9545742273330688, 0.17843440175056458, 0.2909282445907593, 0.36427929997444153, -0.19641315937042236, 0.5335860848426819, -0.12295785546302795, 0.13182422518730164, -0.3058536946773529, -0.24918417632579803, -0.05802405625581741, -0.18145199120044708, -0.11031519621610641, 0.2618717849254608, -0.12105981260538101, 0.19142873585224152, -0.21406054496765137, 0.0010427976958453655, -0.26005107164382935, 0.12428824603557587, 0.15012632310390472, 0.09589685499668121, -0.08923350274562836, 0.043199390172958374, -0.02840777486562729, 0.4337436258792877, 0.011842325329780579, 0.08312144130468369, -0.2858612537384033, -0.4611055254936218, -0.22399763762950897, -0.09938815981149673, -0.031498514115810394, 0.36197975277900696, 0.20811031758785248, -0.3137199878692627, -0.21707141399383545, 0.2136261910200119, 0.12817466259002686, -0.17975515127182007, 0.028361668810248375, 0.07266618311405182, -0.07400542497634888, 0.4558834135532379, -0.0189234409481287, -0.40287357568740845, 0.5227808356285095, 0.1773957759141922, -0.28378599882125854, -0.17062948644161224, -0.12880782783031464, -0.09604082256555557, -0.10401380062103271, 0.24403035640716553, 0.21470342576503754, -0.6490806937217712, -0.09330181777477264, 0.13822463154792786, 0.26750051975250244, -0.23236313462257385, 0.03474859893321991, -0.063296839594841, -0.07170376181602478, 0.12410043925046921, 0.1991082727909088, -0.44677427411079407, -0.16517023742198944, 0.09766693413257599, 0.45881569385528564, -0.04424135759472847, 0.4165685474872589, 0.03209066390991211, -0.030644845217466354, -0.05336464196443558, 0.029674768447875977, 0.38151296973228455, -0.6464771628379822, 0.483716756105423, -0.11723415553569794, 0.14798209071159363, -0.055071890354156494, 0.1937444508075714, 0.06385393440723419, 0.2788638174533844, -0.10012928396463394, -0.2196875810623169, -0.012181784957647324, 0.22530430555343628, -0.24718144536018372, 0.4186820685863495, 0.14060726761817932, 0.02872505411505699, 0.02220778912305832, 0.11498797684907913, -0.22614610195159912, 0.09782622009515762, -0.03867185860872269, 0.11279843747615814, 0.3116321861743927, -0.0673956647515297, 0.21737998723983765, 0.10213185101747513, 0.026345260441303253, 0.08719991892576218, -0.09432648122310638, -0.12130770087242126, -0.24245357513427734, 0.2054031640291214, 0.01987980678677559, 0.13987122476100922, -0.010167624801397324, 0.23944091796875, 0.33562150597572327, -0.20980417728424072, 0.46404799818992615, 0.33897164463996887, -0.0029225684702396393, 0.1270819902420044, 0.18044528365135193, 0.28864577412605286, -0.1770113855600357, 0.17021289467811584, 0.034961678087711334, 0.10935896635055542, 0.24193868041038513, 0.15388043224811554, -0.18061359226703644, -0.05359876900911331, -0.11952008306980133, 0.13579629361629486, 0.09327526390552521, 0.1227106973528862, 0.10992643982172012, -0.18367835879325867, 0.1338788866996765, -0.07510948181152344, 0.23332242667675018, 0.07948249578475952, -0.2139582633972168, -0.08953407406806946, -0.19507768750190735, 0.12892819941043854, 0.04126696288585663, -0.20248980820178986, 0.303707093000412, 0.06565383076667786, -0.14772847294807434, 0.2308475524187088, 0.21662858128547668, 0.17743751406669617, -0.1934916377067566, -0.08814490586519241, 0.28599727153778076, 0.1849483996629715, 0.5633513331413269, 0.3500111401081085, 0.043237969279289246, 0.2517554759979248, 0.31414711475372314, -0.004660202190279961, 0.05469197407364845, 0.4327658712863922, -0.13397730886936188, 0.13675105571746826, -0.13054776191711426, -0.049859669059515, 0.4050142467021942, -0.40341174602508545, 0.0540798120200634, 0.3539685010910034, -0.3252951204776764, 0.254456490278244, 0.005127266049385071, 0.2405163198709488, -0.33188822865486145, -0.31774991750717163, -0.4057003855705261, -0.02213694527745247, -0.20069202780723572, -0.01783079281449318, 0.008453063666820526, -0.2244732528924942, -0.14312565326690674, 0.30131784081459045, -0.26997435092926025, -0.24828283488750458, 0.3504236936569214, -0.12460535764694214, -0.22532157599925995, -0.25710946321487427, 0.008965583518147469, -0.019059782847762108, 0.13781386613845825, -0.08464274555444717, 0.17870424687862396, 0.2503608465194702, -0.1244727298617363, 0.28917890787124634, -0.03218327462673187, 0.2892400622367859, 0.08785730600357056, -0.08604912459850311, -0.16076824069023132, 0.13517701625823975, 0.054102517664432526, -0.11966367065906525, 0.15958423912525177, -0.02938907966017723, -0.2846072316169739, 0.19059760868549347, 0.09287877380847931, -0.08008754253387451, -0.16133609414100647, 0.2862854599952698, 0.40007728338241577, -0.6154875159263611, 0.4588087201118469, -0.4750038981437683, -0.017187967896461487, -0.34393972158432007, 0.18509550392627716, -0.3901185095310211, -0.4011109173297882, 0.04956791549921036, 0.1848585456609726, 0.12732425332069397, -0.10890428721904755, 0.037961363792419434, -0.10960794240236282, 0.11695104837417603, -0.008227940648794174, 0.10568919777870178, -0.18309366703033447, 0.04407691955566406, -0.1344737410545349, 0.2963292598724365, 0.12068960815668106, 0.30752119421958923, -0.19964230060577393, 0.1553712636232376, -0.029412779957056046, -0.06528978794813156, 0.1991051435470581, 0.1881411373615265, 0.07789366692304611, 0.15787120163440704, -0.3808198869228363, -0.27797919511795044, -0.29738470911979675, -0.28527435660362244, 0.05043452978134155, -0.3255174160003662, 0.0042211739346385, -0.028843294829130173, -0.07187321782112122, -0.12592768669128418, -0.06405681371688843, 0.1772354245185852, -0.12758852541446686, 0.2927130162715912, 0.5577343106269836, 0.45870327949523926, 0.046476975083351135, -0.21431964635849, 0.03150147199630737, -0.11408741772174835, -0.2557458281517029, 0.5020924806594849, -0.19757980108261108, 0.37881535291671753, -0.09125075489282608, 0.28466176986694336, 0.04272659122943878, 0.20953959226608276, 0.3309495449066162, -0.11390289664268494, -0.3504474461078644, 0.018789052963256836, -0.2146427482366562, -0.14940111339092255, 0.24625036120414734, 0.7083632946014404, 0.1255173534154892, -0.09649533033370972, -0.15866461396217346, -0.011550981551408768, 0.44777366518974304, -0.2891324758529663, -0.17595577239990234, -0.07908906042575836, 0.34211206436157227, 0.3081437945365906, -0.1837763786315918, -0.4624323546886444, -0.30840402841567993, 0.3405359983444214, -0.29834645986557007, -0.1934678554534912, 0.15768574178218842, 0.05429098755121231, -0.11240527033805847, -0.13015687465667725, 0.1362772285938263, 0.08224289119243622, -0.5032217502593994, 0.5723208785057068, -0.2812126874923706 ]
https://github.com/huggingface/datasets/issues/6350
> `load_dataset` returns a `DatasetDict` object unless `split` is defined, in which case it returns a `Dataset` (or a list of datasets if `split` is a list). We've discussed dropping `DatasetDict` from the API in #5189 to always return the same type in `load_dataset` and support datasets without (explicit) splits. IIRC the main discussion point is deciding what to return when loading a dataset with multiple splits, but `split` is not specified. What would you expect as a return value in that scenario? Wouldn't a dataset with multiple splits already have keys and their related data arrays? Lets say the dataset has "train" : trainset, "valid": validset and "test": testset So a dictionary can be returned,, i.e. { "train": trainset, "valid": validset, "test": testset } if a split is provided split=['train[:80%]', 'valid[80%:90%]', 'test[90%:100%]'] would also return the same dictionary as above. split='train[:10%]' should return the same value as split=['train[:10%]'] { "train": trainset }
Different objects are returned from calls that should be returning the same kind of object.
### Describe the bug 1. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir, split='train[:1%]') 2. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir) The only difference I would expect these calls to have is the size of the dataset. But, while 2. returns a dictionary with "train" key in it, 1. returns a dataset WITHOUT any initial "train" keyword. Both calls are to be used within exactly the same context. They should return identically structured datasets of different size. ### Steps to reproduce the bug See above. ### Expected behavior Expect both calls to return the same structured Dataset structure but with different number of elements, i.e. call 1. should have 1% of the data of the call 2.0 ### Environment info Ubuntu 20.04 gcc 9.x.x. It is really irrelevant.
153
Different objects are returned from calls that should be returning the same kind of object. ### Describe the bug 1. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir, split='train[:1%]') 2. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir) The only difference I would expect these calls to have is the size of the dataset. But, while 2. returns a dictionary with "train" key in it, 1. returns a dataset WITHOUT any initial "train" keyword. Both calls are to be used within exactly the same context. They should return identically structured datasets of different size. ### Steps to reproduce the bug See above. ### Expected behavior Expect both calls to return the same structured Dataset structure but with different number of elements, i.e. call 1. should have 1% of the data of the call 2.0 ### Environment info Ubuntu 20.04 gcc 9.x.x. It is really irrelevant. > `load_dataset` returns a `DatasetDict` object unless `split` is defined, in which case it returns a `Dataset` (or a list of datasets if `split` is a list). We've discussed dropping `DatasetDict` from the API in #5189 to always return the same type in `load_dataset` and support datasets without (explicit) splits. IIRC the main discussion point is deciding what to return when loading a dataset with multiple splits, but `split` is not specified. What would you expect as a return value in that scenario? Wouldn't a dataset with multiple splits already have keys and their related data arrays? Lets say the dataset has "train" : trainset, "valid": validset and "test": testset So a dictionary can be returned,, i.e. { "train": trainset, "valid": validset, "test": testset } if a split is provided split=['train[:80%]', 'valid[80%:90%]', 'test[90%:100%]'] would also return the same dictionary as above. split='train[:10%]' should return the same value as split=['train[:10%]'] { "train": trainset }
[ 0.0666290819644928, -0.18669439852237701, -0.08955486118793488, 0.5604851841926575, 0.058909911662340164, -0.2986440658569336, 0.28418415784835815, 0.21379944682121277, 0.12141849100589752, 0.16319358348846436, -0.017049366608262062, 0.4322671890258789, -0.04269466549158096, 0.2692185044288635, -0.11658215522766113, -0.18335969746112823, 0.18118196725845337, 0.10833601653575897, -0.027421724051237106, -0.3097015917301178, -0.14221175014972687, 0.4199059307575226, 0.07582870125770569, 0.10915735363960266, -0.6052096486091614, -0.028225770220160484, -0.26863884925842285, 0.06144005060195923, -0.07116612792015076, -0.17099791765213013, 0.49703821539878845, 0.0440247505903244, -0.3411937654018402, 0.34543469548225403, -0.00011885123240062967, 0.04594149440526962, 0.1419660598039627, -0.036306120455265045, -0.2258305847644806, -0.4601573050022125, -0.09099937975406647, -0.17656314373016357, 0.36451005935668945, -0.26185768842697144, 0.041870586574077606, -0.22086960077285767, -0.16502100229263306, -0.5530492067337036, 0.24284979701042175, 0.13259035348892212, 0.16014516353607178, -0.09148024767637253, -0.3130965232849121, -0.05171051621437073, 0.34348946809768677, 0.24373286962509155, 0.010632127523422241, 0.07042372226715088, -0.027571823447942734, 0.19061759114265442, 0.17099881172180176, 0.016315564513206482, -0.22758811712265015, 0.1842002421617508, -0.06835067272186279, 0.33607926964759827, -0.19946208596229553, -0.2766777276992798, 0.20172031223773956, 0.24899539351463318, 0.6291348934173584, 0.04118765890598297, -0.1734028160572052, -0.4297114312648773, -0.09483185410499573, -0.17013920843601227, 0.06964141130447388, 0.27103179693222046, -0.11487463861703873, -0.00024192244745790958, -0.19006779789924622, 0.3332345485687256, -0.03775086998939514, 0.0978718027472496, -0.34500253200531006, -0.03305068612098694, 0.027682479470968246, 0.5227805972099304, -0.17025220394134521, 0.33567988872528076, -0.061020638793706894, -0.35607582330703735, -0.0022524737287312746, -0.07086427509784698, 0.001409728080034256, -0.03624088689684868, 0.2426527589559555, -0.4171886146068573, 0.39344748854637146, 0.19717846810817719, 0.22162669897079468, 0.1495881974697113, -0.2452508807182312, 0.0027726097032427788, 0.5383046865463257, 0.16295382380485535, 0.16748583316802979, 0.1735002100467682, -0.002506292425096035, -0.14201557636260986, -0.39535874128341675, 0.0022418806329369545, 0.26738572120666504, 0.19721759855747223, 0.1374526023864746, 0.19526952505111694, 0.3317607641220093, -0.3169490098953247, -0.40610605478286743, -0.006274625658988953, -0.3757447600364685, -0.07282578200101852, -0.1914837807416916, 0.12259336560964584, 0.12339287251234055, 0.4822506606578827, -0.003911413252353668, 0.1336214393377304, -0.22088822722434998, -0.3671439290046692, -0.23936432600021362, -0.22554446756839752, -0.3308509588241577, 0.09893664717674255, 0.2005840241909027, 0.06870850920677185, 0.08427206426858902, 0.2753463089466095, -0.07606077194213867, -0.35784387588500977, 0.27022355794906616, -0.29941871762275696, 0.46227896213531494, -0.012159857898950577, -0.0016415789723396301, 0.2683109939098358, 0.19519835710525513, -0.11922059953212738, -0.20972391963005066, 0.0632275938987732, -0.4366323947906494, -0.37040311098098755, 0.1676359623670578, 0.12610198557376862, -0.033113010227680206, 0.24905315041542053, -0.06727264821529388, 0.5383131504058838, 0.104834645986557, -0.15878932178020477, -0.030213892459869385, -0.21198220551013947, -0.2616875171661377, -0.5373237133026123, -0.0657256469130516, 0.2148190438747406, -0.5013343691825867, -0.1357446163892746, -0.058219730854034424, -0.2083495557308197, 0.04747244715690613, 0.11420269310474396, -0.3507480025291443, 0.3417133688926697, -0.35313695669174194, -0.12232304364442825, 0.12122943997383118, -0.2122144103050232, -0.5833438038825989, 0.20252437889575958, 0.08727362751960754, 0.36006760597229004, 0.11222371459007263, -0.001724250614643097, 0.3811829686164856, 0.20902924239635468, 0.39729875326156616, 0.2956434488296509, -0.022388581186532974, 0.032313063740730286, -0.15205232799053192, -0.07154951989650726, 0.12192582339048386, -0.22721213102340698, 0.11548706889152527, 0.035073548555374146, 0.060460932552814484, -0.1400390863418579, 0.2655565142631531, -0.019771289080381393, -0.09859448671340942, -0.27409929037094116, 0.12174881994724274, 0.00431014783680439, 0.1271531581878662, 0.007940731942653656, -0.5633984804153442, 0.34081485867500305, -0.10654045641422272, -0.16045202314853668, 0.005781315267086029, -0.24998557567596436, -0.12065158784389496, 0.14219015836715698, -0.12188512086868286, -0.1532021462917328, 0.09463130682706833, 0.2519512176513672, 0.07853638380765915, 0.11015927791595459, -0.07875537127256393, 0.4354166090488434, 0.08694678544998169, 0.050398875027894974, -0.026050394400954247, 0.5112494230270386, 0.15811528265476227, -0.04293646663427353, -0.22793279588222504, 0.15956471860408783, 0.18459461629390717, -0.12386824190616608, -0.12295444309711456, 0.2197408676147461, 0.47040361166000366, -0.25761914253234863, -0.30094102025032043, 0.05392666906118393, 0.07969065755605698, 0.18136145174503326, 0.1770947277545929, 0.08825081586837769, 0.2331811636686325, -0.28791168332099915, 0.030116146430373192, 0.7605733871459961, 0.17032085359096527, 0.32193440198898315, 0.03573183715343475, -0.029518000781536102, 0.0008138343691825867, 0.012143619358539581, -0.09685258567333221, -0.2104325145483017, -0.05635694041848183, -0.2659962475299835, 0.2591314911842346, 0.1350852996110916, -0.08188426494598389, 0.173941507935524, 0.8033426403999329, -0.0534210205078125, 0.06515580415725708, -0.08539196848869324, -0.15178263187408447, -0.22796525061130524, -0.05581408739089966, 0.4577246606349945, 0.8029673099517822, 0.1635444313287735, 0.04403689503669739, 0.010932611301541328, -0.02471458539366722, 0.061965808272361755, 0.2355767786502838, 0.24547432363033295, 0.1641385406255722, 0.3162115812301636, 0.09139494597911835, -0.1223207414150238, -0.30253714323043823, -0.1555413156747818, 0.10712940990924835, -0.1187112107872963, -0.10063617676496506, 0.19519108533859253, -0.22395730018615723, -0.10043846815824509, -0.3516455888748169, -0.0826529860496521, -0.05104896426200867, -0.2733697295188904, -0.08111964166164398, -0.02062261290848255, -0.1406354159116745, -0.15328145027160645, -0.10686591267585754, 0.3134034276008606, -0.21973296999931335, 0.16121123731136322, 0.18670406937599182, -0.010599318891763687, -0.4305590093135834, -0.03095395863056183, 0.08971650898456573, -0.1469501554965973, 0.4310709834098816, 0.0299077108502388, -0.1026574894785881, -0.03925566375255585, -0.30003541707992554, 0.30372917652130127, -0.053442854434251785, -0.07221950590610504, 0.28804051876068115, -0.025469329208135605, 0.2520361542701721, -0.260716050863266, 0.09911848604679108, -0.15248724818229675, -0.22934672236442566, 0.014465853571891785, 0.0029082484543323517, -0.00991283729672432, -0.17047381401062012, -0.4946731626987457, -0.10335877537727356, -0.10184630751609802, -0.021725039929151535, 0.05498203635215759, 0.1847342699766159, -0.10138016939163208, 0.03203105553984642, 0.14579230546951294, 0.22398073971271515, 0.047317370772361755, -0.487873911857605, 0.09635308384895325, -0.2048512101173401, -0.13274236023426056, -0.3289628326892853, -0.1946266144514084, -0.16685891151428223, 0.149749293923378, 0.10984344780445099, -0.4779965281486511, 0.14075948297977448, -0.045432671904563904, 0.13393616676330566, 0.01587075926363468, -0.3063294589519501, 0.26601317524909973, 0.11336997151374817, -0.06501277536153793, -0.20111346244812012, -0.23503747582435608, 0.17443104088306427, 0.17083783447742462, 0.14439545571804047, 0.15343590080738068, 0.09239669144153595, 0.09958731383085251, 0.5467631816864014, 0.20291516184806824, -0.1437835842370987, 0.2150254100561142, 0.2959865629673004, 0.12128773331642151, -0.4408075511455536, -0.1254018247127533, -0.18365104496479034, -0.30243542790412903, -0.22193464636802673, 0.4545246958732605, -0.013711169362068176, -0.4078066945075989, -0.1720089316368103, -0.009385652840137482, -0.1029304713010788, -0.296802818775177, 0.19683700799942017, -0.3990381956100464, -0.3325897753238678, 0.07431597262620926, 0.16934742033481598, -0.18093931674957275, 0.3168494403362274, -0.18408238887786865, -0.15415869653224945, -0.08405748009681702, -0.060551829636096954, -0.7720268964767456, -0.12107230722904205, -0.22718137502670288, 0.5044545531272888, 0.08293959498405457, -0.028484927490353584, 0.15076158940792084, -0.10309688746929169, 0.3546646535396576, 0.12904474139213562, 0.7390087246894836, 0.09828346967697144, -0.343014121055603, 0.16279035806655884, -0.06395173817873001, -0.2723824381828308, -0.45656728744506836, -0.22634677588939667, 0.5976750254631042, 0.02496982365846634, 0.20476257801055908, -0.5033680200576782, -0.15222318470478058, -0.11636635661125183, 0.13769197463989258, -0.14380744099617004, 0.09094220399856567, -0.1930004358291626, -0.067037433385849, -0.05629844218492508, -0.03072497248649597, -0.1731148064136505, 0.12593111395835876, -0.46976861357688904, -0.4963667094707489, -0.06121012568473816, -0.07177393138408661, -0.027176834642887115, -0.059433143585920334, 0.5158501863479614, -0.26893219351768494, 0.005712464451789856, 0.3016435205936432, 0.5882604718208313, 0.053000353276729584, 0.629119873046875, -0.22743265330791473, -0.1298157274723053, 0.19009929895401, -0.13247747719287872, 0.1450614333152771, 0.5003776550292969, 0.04585740342736244, -0.043762315064668655, -0.14399971067905426, -0.029901821166276932, 0.0912514477968216, 0.03850248456001282, 0.3635932505130768, -0.07465583086013794, -0.7031485438346863, -0.60860675573349, 0.39039748907089233, 0.1038084328174591, -0.3624795973300934, 0.6637506484985352, 0.13315421342849731, -0.3458743989467621, 0.8485227823257446, -0.15870818495750427, 0.9478115439414978, 0.1570238471031189, 0.28058215975761414, 0.21404044330120087, -0.20995691418647766, 0.4885072410106659, -0.17887139320373535, 0.14546865224838257, -0.3037552833557129, -0.2206827998161316, -0.04563422501087189, -0.1919947862625122, -0.032410960644483566, 0.476813405752182, -0.21779479086399078, 0.09815441071987152, -0.2185281217098236, -0.049304716289043427, -0.23918819427490234, 0.18842947483062744, 0.15144149959087372, 0.1989346742630005, 0.1500874161720276, 0.03716371953487396, -0.034937940537929535, 0.3083987832069397, -0.0381292924284935, 0.1263955533504486, -0.32377707958221436, -0.4856659173965454, -0.3083072900772095, -0.1428799033164978, -0.01940612867474556, 0.49979057908058167, 0.06319376826286316, -0.28457969427108765, -0.1657092571258545, 0.20935285091400146, -0.023384973406791687, -0.11362828314304352, -0.022750861942768097, 0.10753465443849564, 0.010546904988586903, 0.36976954340934753, 0.04652316868305206, -0.4314746558666229, 0.4975414574146271, 0.15813018381595612, -0.3257068991661072, -0.06183498352766037, -0.13871869444847107, -0.17893418669700623, -0.1747172474861145, 0.319002240896225, 0.25882667303085327, -0.5721501708030701, -0.13154736161231995, 0.19212570786476135, 0.13086943328380585, -0.18030384182929993, 0.03699244558811188, -0.059907469898462296, -0.0666952133178711, 0.26003098487854004, 0.1533084362745285, -0.4538835287094116, -0.11717058718204498, 0.10669903457164764, 0.5802088975906372, -0.024646032601594925, 0.4584358334541321, -0.03364796191453934, 0.0005706101655960083, -0.08523501455783844, 0.010512620210647583, 0.2867549657821655, -0.5157671570777893, 0.38728296756744385, -0.16495592892169952, 0.17408758401870728, -0.003651365637779236, 0.09232278913259506, 0.03555474057793617, 0.3982500433921814, -0.1368662416934967, -0.2211882770061493, 0.03510056436061859, 0.24447643756866455, -0.22361160814762115, 0.4176299273967743, -0.0073811933398246765, -0.08828987181186676, -0.008524037897586823, 0.2314879149198532, -0.21399903297424316, 0.05322471261024475, 0.003536902368068695, 0.1263023167848587, 0.24037332832813263, -0.005399506539106369, 0.04515092447400093, 0.10672730207443237, 0.05001303553581238, -0.011479642242193222, -0.037471380084753036, -0.12129358947277069, -0.12636849284172058, 0.20703953504562378, 0.10123899579048157, 0.2070624977350235, -0.053458862006664276, 0.07744553685188293, 0.3305285573005676, -0.12589457631111145, 0.3586178421974182, 0.2960847020149231, -0.0899423360824585, 0.19544315338134766, 0.2181459367275238, 0.3645179867744446, -0.22794920206069946, 0.2425241768360138, 0.0012997910380363464, 0.1623098999261856, 0.27064216136932373, 0.24851806461811066, -0.08212783932685852, -0.11843282729387283, -0.16388405859470367, 0.11763906478881836, -0.028620116412639618, 0.12585876882076263, 0.18283018469810486, -0.12995153665542603, 0.20400340855121613, -0.05468764528632164, 0.15266689658164978, 0.15628136694431305, -0.22195468842983246, -0.06498360633850098, -0.19766560196876526, 0.1263500452041626, 0.03729277849197388, -0.30400392413139343, 0.19826999306678772, 0.056044697761535645, -0.15657636523246765, 0.24933546781539917, 0.26355648040771484, 0.09010718762874603, -0.21251904964447021, -0.07301811873912811, 0.32092517614364624, 0.1889294534921646, 0.5643397569656372, 0.47104793787002563, 0.04933900386095047, 0.16724097728729248, 0.18428972363471985, -0.06019945070147514, 0.057292595505714417, 0.47147682309150696, -0.09464281797409058, 0.19882895052433014, 0.0469677560031414, -0.14910179376602173, 0.43905824422836304, -0.3178521394729614, 0.09997949004173279, 0.3432133197784424, -0.2960329055786133, 0.23385457694530487, 0.15305787324905396, 0.033147819340229034, -0.26844504475593567, -0.2210947424173355, -0.4015025794506073, -0.14157560467720032, -0.18517304956912994, 0.05685143917798996, -0.05519513040781021, -0.274474561214447, -0.1694117784500122, 0.22259527444839478, -0.3248942494392395, -0.2242007851600647, 0.3391103744506836, -0.0864701122045517, -0.2543676495552063, -0.18263423442840576, 0.19823290407657623, -0.051893047988414764, 0.1537887156009674, -0.17676502466201782, 0.09389594197273254, 0.2718456983566284, -0.12761779129505157, 0.2700473964214325, -0.15552020072937012, 0.29739558696746826, 0.20982179045677185, -0.23989124596118927, -0.11737547814846039, 0.14040310680866241, -0.024052787572145462, -0.1732846051454544, 0.14857834577560425, -0.07158830761909485, -0.3257836103439331, 0.2359696328639984, 0.09079568833112717, -0.05669764429330826, -0.14022420346736908, 0.44716280698776245, 0.39435309171676636, -0.4954102039337158, 0.395326167345047, -0.36180469393730164, -0.0792083591222763, -0.14845699071884155, 0.21142561733722687, -0.3550857901573181, -0.5801947712898254, 0.07887347042560577, 0.1911599487066269, 0.11329956352710724, -0.17273619771003723, 0.030671853572130203, -0.1470901519060135, 0.1762397587299347, -0.0454336442053318, 0.13970954716205597, -0.24201127886772156, -0.0063375383615493774, -0.1694953441619873, 0.3074020743370056, -0.009232553653419018, 0.1876172125339508, -0.1675519496202469, 0.20937834680080414, -0.004150316119194031, -0.05563618242740631, 0.17756134271621704, 0.22534890472888947, 0.05122092366218567, 0.2838822901248932, -0.4335268437862396, -0.29682883620262146, -0.20353132486343384, -0.24496789276599884, -0.015008430927991867, -0.42106300592422485, 0.05508587881922722, -0.005705256015062332, -0.03124988079071045, -0.1851278841495514, -0.19544938206672668, 0.3358149528503418, 0.02049195021390915, 0.3347741961479187, 0.5093207359313965, 0.5416277050971985, 0.053648993372917175, -0.1609674096107483, 0.005514760967344046, 0.004748549312353134, -0.20392334461212158, 0.5219485759735107, -0.10432427376508713, 0.28459692001342773, -0.04772772639989853, 0.39399632811546326, 0.16147755086421967, 0.11386033892631531, 0.20581987500190735, -0.05710229650139809, -0.34181466698646545, -0.04204178601503372, -0.20721237361431122, -0.13893380761146545, 0.21751902997493744, 0.6180732846260071, 0.12174330651760101, -0.1528572291135788, -0.10779159516096115, 0.011971212923526764, 0.3253467082977295, -0.16363643109798431, -0.16150814294815063, -0.0869927853345871, 0.35490092635154724, 0.13956984877586365, -0.02781698666512966, -0.27982455492019653, -0.37486517429351807, 0.4373808205127716, -0.3275778293609619, -0.21943455934524536, 0.1154116541147232, 0.11573130637407303, -0.135165274143219, -0.15402726829051971, 0.09842336922883987, 0.02450346201658249, -0.4282904863357544, 0.44449537992477417, -0.3196113109588623 ]
https://github.com/huggingface/datasets/issues/6349
I'm unable to reproduce this error. The server hosting the files may have been down temporarily, so try again.
Can't load ds = load_dataset("imdb")
### Describe the bug I did `from datasets import load_dataset, load_metric` and then `ds = load_dataset("imdb")` and it gave me the error: ExpectedMoreDownloadedFiles: {'http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz'} I tried doing `ds = load_dataset("imdb",download_mode="force_redownload")` as well as reinstalling dataset. I still face this problem. ### Steps to reproduce the bug 1. from datasets import load_dataset, load_metric 2. ds = load_dataset("imdb") ### Expected behavior It should load and give me this when I run `ds` DatasetDict({ train: Dataset({ features: ['text', 'label'], num_rows: 25000 }) test: Dataset({ features: ['text', 'label'], num_rows: 25000 }) unsupervised: Dataset({ features: ['text', 'label'], num_rows: 50000 }) }) ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-164-generic-x86_64-with-glibc2.17 - Python version: 3.8.18 - Huggingface_hub version: 0.16.2 - PyArrow version: 13.0.0 - Pandas version: 2.0.2
19
Can't load ds = load_dataset("imdb") ### Describe the bug I did `from datasets import load_dataset, load_metric` and then `ds = load_dataset("imdb")` and it gave me the error: ExpectedMoreDownloadedFiles: {'http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz'} I tried doing `ds = load_dataset("imdb",download_mode="force_redownload")` as well as reinstalling dataset. I still face this problem. ### Steps to reproduce the bug 1. from datasets import load_dataset, load_metric 2. ds = load_dataset("imdb") ### Expected behavior It should load and give me this when I run `ds` DatasetDict({ train: Dataset({ features: ['text', 'label'], num_rows: 25000 }) test: Dataset({ features: ['text', 'label'], num_rows: 25000 }) unsupervised: Dataset({ features: ['text', 'label'], num_rows: 50000 }) }) ### Environment info - `datasets` version: 2.14.6 - Platform: Linux-5.4.0-164-generic-x86_64-with-glibc2.17 - Python version: 3.8.18 - Huggingface_hub version: 0.16.2 - PyArrow version: 13.0.0 - Pandas version: 2.0.2 I'm unable to reproduce this error. The server hosting the files may have been down temporarily, so try again.
[ -0.3720935881137848, 0.034979745745658875, -0.05936967581510544, 0.5213468670845032, 0.41254252195358276, 0.1490505039691925, 0.34063592553138733, 0.1281067281961441, 0.6659700274467468, 0.07853162288665771, -0.1272823065519333, 0.14698487520217896, -0.03618531674146652, 0.06833256781101227, 0.025375783443450928, -0.13824594020843506, 0.016870852559804916, -0.013022195547819138, -0.12123601883649826, 0.009276151657104492, -0.19209876656532288, 0.24735675752162933, -0.35830533504486084, -0.1084207072854042, -0.2501099109649658, 0.10590797662734985, 0.0029572993516921997, 0.12266609072685242, -0.2734450697898865, -0.2972704768180847, 0.3573562502861023, 0.12031656503677368, 0.4726550579071045, 0.4911368191242218, -0.00012007863551843911, -0.0235382542014122, 0.4949324131011963, -0.1735377013683319, -0.31827419996261597, -0.49633166193962097, -0.17200282216072083, -0.05563194677233696, 0.3193424940109253, -0.07856893539428711, 0.13219714164733887, -0.24067816138267517, -0.09317860752344131, -0.3892045021057129, -0.08224336802959442, 0.3045421242713928, 0.14504772424697876, 0.1425892412662506, 0.11531370878219604, -0.24170777201652527, 0.09963405877351761, -0.023279428482055664, -0.032092925161123276, 0.7286022901535034, 0.0930706262588501, -0.13595908880233765, 0.04600844904780388, -0.154335618019104, -0.23740413784980774, 0.058241844177246094, 0.3945524990558624, 0.2070845365524292, 0.20419742166996002, -0.20729511976242065, 0.1255645453929901, 0.38185569643974304, 0.820830225944519, 0.022582143545150757, -0.49198606610298157, -0.15558242797851562, 0.17543524503707886, -0.24512112140655518, 0.1322825402021408, 0.037612177431583405, -0.06253056228160858, 0.2009093165397644, -0.08859648555517197, 0.08807559311389923, -0.11896101385354996, 0.4518548548221588, -0.2591822147369385, -0.06355437636375427, -0.09694729745388031, 0.1054099053144455, 0.37732425332069397, -0.030920276418328285, 0.2527307868003845, 0.010354973375797272, -0.07050532102584839, -0.06363427639007568, -0.44953879714012146, 0.19388076663017273, 0.06062983348965645, -0.03128734603524208, -0.018631838262081146, 0.3381056487560272, 0.15595301985740662, -0.0614154115319252, -0.13183178007602692, 0.18093611299991608, 0.4372612237930298, 0.475406289100647, -0.023902367800474167, 0.1957244575023651, 0.19395661354064941, 0.4144965708255768, -0.22073498368263245, -0.22524631023406982, -0.16336336731910706, -0.30164405703544617, 0.2704569399356842, -0.13045084476470947, 0.1506854146718979, -0.25340330600738525, -0.4367152154445648, 0.10221890360116959, 0.09191636741161346, -0.18344296514987946, 0.10625584423542023, 0.3394565284252167, -0.1160697191953659, 0.36294853687286377, 0.22386550903320312, 0.4995354413986206, 0.028224989771842957, -0.17789512872695923, -0.14716923236846924, 0.0012776106595993042, -0.08832421153783798, 0.0035520344972610474, 0.33512577414512634, -0.1880999356508255, 0.36378371715545654, 0.1764279156923294, 0.1450977623462677, -0.36802878975868225, 0.03337530046701431, -0.14011718332767487, 0.09658615291118622, 0.3299442231655121, 0.13013149797916412, 0.1196429505944252, 0.1471956968307495, -0.16453850269317627, -0.0036612674593925476, 0.38076043128967285, -0.42243659496307373, -0.18399423360824585, -0.06591372936964035, 0.11161322891712189, -0.14545901119709015, -0.23403498530387878, -0.8776758313179016, 0.14569152891635895, -0.21630875766277313, -0.12189050018787384, -0.04542938247323036, -0.13521012663841248, 0.06088602542877197, -0.11571365594863892, 0.2848373353481293, 0.5786116123199463, -0.4317079186439514, 0.009669534862041473, -0.30886316299438477, 0.13343417644500732, 0.15949824452400208, 0.19949720799922943, -0.42035776376724243, 0.36274653673171997, -0.42217403650283813, -0.07785873115062714, 0.2918122708797455, -0.3653848171234131, -0.5871778130531311, 0.386528342962265, -0.03328651189804077, 0.396686851978302, 0.034426406025886536, 0.13359065353870392, 0.21274349093437195, 0.07505638897418976, 0.19203101098537445, 0.14947865903377533, 0.05687756836414337, -0.37825870513916016, -0.21315324306488037, -0.15159493684768677, 0.4024915099143982, 0.08439645171165466, 0.2546599805355072, 0.2414216250181198, 0.0649486780166626, 0.21656528115272522, 0.30147185921669006, -0.005189236253499985, -0.24244818091392517, -0.007964464835822582, -0.19713927805423737, 0.3876186013221741, 0.15018510818481445, -0.0442114993929863, -0.2898804545402527, 0.35578787326812744, 0.02025427669286728, -0.11352360248565674, -0.014848049730062485, -0.012789450585842133, -0.42230671644210815, -0.024636711925268173, -0.04119228199124336, -0.03987984359264374, -0.017509594559669495, -0.04800688102841377, -0.2603200078010559, 0.024305768311023712, -0.3195226788520813, 0.21911388635635376, -0.3099578320980072, 0.2636600732803345, -0.2814085781574249, 0.40649330615997314, -0.008342020213603973, 0.0809495598077774, -0.1464756280183792, -0.3294050395488739, 0.2840815484523773, -0.17309848964214325, -0.2419407069683075, 0.3063770830631256, 0.1922716647386551, 0.09437618404626846, -0.38739049434661865, -0.1499686986207962, 0.27863433957099915, -0.09042468667030334, 0.2469874620437622, 0.22695541381835938, 0.07592034339904785, -0.1253567934036255, -0.07685160636901855, 0.07621029764413834, -0.23529335856437683, 0.34638169407844543, -0.008029192686080933, -0.12960433959960938, 0.18025273084640503, -0.1992279440164566, -0.05378376320004463, -0.30834683775901794, 0.20798276364803314, 0.012014497071504593, -0.025788642466068268, -0.03656695783138275, -0.02605672925710678, 0.04552764073014259, 0.37957966327667236, -0.0032958239316940308, 0.018047574907541275, 0.2541506290435791, -0.21143853664398193, 0.009051814675331116, -0.0889044776558876, 0.25897306203842163, 0.4048408269882202, 0.18486174941062927, -0.145354762673378, -0.11094121634960175, -0.010913662612438202, -0.2855784296989441, 0.1635405421257019, 0.1426788866519928, 0.015565082430839539, 0.44250476360321045, 0.014560528099536896, 0.1507953703403473, -0.3266724646091461, -0.2121690809726715, -0.03552594780921936, 0.35020938515663147, -0.361554354429245, 0.028368592262268066, -0.36871230602264404, -0.01905052363872528, 0.03118988871574402, -0.10464972257614136, -0.11195074021816254, -0.2352021336555481, -0.33200550079345703, 0.39607998728752136, 0.18896158039569855, -0.05154326930642128, -0.10917945206165314, 0.048886753618717194, -0.07603375613689423, 0.08328298479318619, 0.043094515800476074, -0.017723221331834793, -0.20169994235038757, -0.043953198939561844, 0.4553235173225403, -0.020385071635246277, -0.016081033274531364, -0.1875852644443512, -0.10092790424823761, -0.03836457058787346, -0.24504664540290833, -0.2741778492927551, 0.05264560878276825, 0.3199811577796936, -0.06350631266832352, 0.3493877053260803, 0.10755059123039246, -0.2883336842060089, 0.04643821343779564, -0.11584408581256866, 0.1396450698375702, 0.1133042499423027, 0.1239059641957283, -0.04070982709527016, -0.0972961038351059, -0.5516411066055298, -0.05369981378316879, -0.32220616936683655, 0.2650335729122162, 0.19244691729545593, -0.05735376104712486, 0.2286721169948578, 0.29135382175445557, -0.053230855613946915, 0.4943775534629822, 0.15091000497341156, -0.19215896725654602, -0.2921167016029358, 0.3534289598464966, -0.1129179447889328, -0.2985552251338959, 0.03946053981781006, -0.002918712794780731, 0.16189166903495789, -0.061571259051561356, -0.6322009563446045, 0.03415488079190254, -0.08329596370458603, 0.05885966122150421, -0.06033916398882866, -0.16419430077075958, 0.05957929790019989, -0.13541381061077118, -0.025639735162258148, -0.09109915792942047, -0.13907843828201294, 0.039580367505550385, -0.034697920083999634, -0.07175621390342712, -0.0706140398979187, 0.4734906852245331, -0.2168361395597458, 0.1980036348104477, 0.02366652339696884, 0.051570285111665726, 0.2360111027956009, -0.05905664712190628, 0.36066263914108276, -0.34337368607521057, -0.564351499080658, -0.1766878068447113, -0.15404759347438812, -0.04410342127084732, 0.18128052353858948, -0.07049552351236343, -0.17364558577537537, -0.23915709555149078, 0.05380982160568237, -0.12643027305603027, 0.016452588140964508, 0.1611618995666504, -0.18004170060157776, -0.23542270064353943, 0.17861711978912354, 0.2679401934146881, -0.14256685972213745, -0.1424686461687088, 0.047581300139427185, 0.10862943530082703, 0.2900291383266449, -0.142565056681633, 0.026309341192245483, 0.14138077199459076, -0.28713446855545044, 0.1161622554063797, -0.10046583414077759, 0.3231620192527771, 0.1321346014738083, 0.08955472707748413, 0.14808225631713867, 0.02680167555809021, 0.7077273726463318, -0.2639879286289215, 0.11554303765296936, 0.17600524425506592, -0.08863463997840881, -0.5422071814537048, -0.030378539115190506, -0.09814958274364471, -0.04097440466284752, 0.08649228513240814, 0.544978678226471, -0.004020616412162781, 0.15467923879623413, 0.2747519612312317, 0.3021587133407593, -0.07815617322921753, -0.3641449809074402, -0.23345375061035156, -0.1128590852022171, -0.17599977552890778, -0.3373126685619354, 0.10179908573627472, 0.19326160848140717, -0.3117368221282959, -0.24638919532299042, -0.268375039100647, -0.050272323191165924, 0.2198275625705719, 0.030588224530220032, 0.22342564165592194, 0.2206016331911087, 0.14673170447349548, 0.21206901967525482, -0.06327717006206512, 0.43071702122688293, 0.7950779795646667, -0.2397497296333313, -0.38820740580558777, 0.04870893433690071, 0.010827984660863876, -0.07917557656764984, 0.17240992188453674, -0.17176397144794464, -0.11126208305358887, 0.06958071887493134, 0.008069591596722603, -0.27472513914108276, 0.15965405106544495, 0.4440688192844391, 0.036281768232584, -0.19819320738315582, -0.7887672185897827, 0.588843822479248, 0.26500988006591797, -0.04395130276679993, 0.4278022050857544, 0.06676189601421356, -0.2975650727748871, 0.29595816135406494, -0.08045361936092377, 0.7437141537666321, -0.0874965712428093, -0.11985485255718231, 0.18282786011695862, -0.008835822343826294, 0.1542183756828308, -0.2637067437171936, 0.13528715074062347, -0.204471156001091, -0.46898844838142395, -0.08944094926118851, -0.12459132075309753, 0.17178788781166077, 0.3242374062538147, -0.0865597054362297, 0.2215867042541504, -0.3824889659881592, 0.012392258271574974, 0.03409889340400696, 0.5102885961532593, -0.00925666093826294, -0.0743640586733818, -0.1900608241558075, 0.07086921483278275, 0.19540536403656006, 0.14561665058135986, 0.010865375399589539, 0.031152084469795227, -0.05790604650974274, -0.14921054244041443, -0.4462176263332367, 0.19576609134674072, -0.16065126657485962, 0.19547827541828156, -0.2904927134513855, -0.2881784439086914, 0.218276709318161, 0.45790356397628784, 0.22022879123687744, 0.20374339818954468, -0.06761743873357773, 0.16753244400024414, -0.17206189036369324, -0.21040238440036774, 0.05093972757458687, -0.030294138938188553, 0.13287603855133057, 0.05180973559617996, -0.4246840476989746, -0.026457075029611588, -0.017216909676790237, -0.21746332943439484, 0.10092298686504364, 0.20269238948822021, 0.247381791472435, -0.4425973892211914, -0.2681680917739868, -0.09042537957429886, 0.1623365879058838, -0.2816299796104431, 0.04281775280833244, 0.03596648946404457, 0.20864811539649963, -0.12808333337306976, 0.2818172872066498, -0.4620938301086426, -0.12196218967437744, 0.7424885034561157, 0.04355788603425026, 0.04440521448850632, 0.3185933530330658, 0.036591239273548126, -0.07411829382181168, -0.10549284517765045, 0.03823144733905792, 0.14339829981327057, -0.5602951645851135, 0.43102678656578064, 0.07440824806690216, 0.36107173562049866, 0.17231544852256775, 0.05401107296347618, 0.09310175478458405, -0.06260013580322266, -0.11922545731067657, -0.4810054898262024, -0.15723112225532532, 0.16547875106334686, 0.00466559175401926, 0.11258779466152191, -0.09758445620536804, -0.45934560894966125, -0.14124076068401337, -0.03021892160177231, -0.17763490974903107, 0.223714217543602, 0.02045457810163498, -0.1018240749835968, 0.1229904443025589, -0.16617213189601898, 0.20168523490428925, -0.2122461348772049, 0.09334588795900345, 0.03006742149591446, 0.20869947969913483, -0.16689753532409668, -0.23007464408874512, 0.1834905594587326, 0.050493378192186356, -0.07756178081035614, -0.15460751950740814, -0.3167431950569153, -0.17268988490104675, -0.2890101671218872, 0.26264071464538574, 0.41644757986068726, 0.042547307908535004, 0.028164930641651154, 0.20180687308311462, 0.038034647703170776, -0.2553463876247406, 0.1959007829427719, -0.02080920711159706, 0.2647879123687744, 0.1821526736021042, -0.007711117155849934, 0.27356624603271484, 0.1331966519355774, -0.40881842374801636, 0.10706515610218048, -0.03313663974404335, 0.18248522281646729, 0.6145597100257874, -0.38979843258857727, 0.24596497416496277, 0.28124162554740906, 0.21917979419231415, 0.39743760228157043, -0.14105843007564545, -0.017019852995872498, -0.018938643857836723, 0.12941990792751312, -0.4181075394153595, -0.15131635963916779, 0.24625205993652344, 0.08801227807998657, -0.09518055617809296, 0.10143093764781952, 0.17127640545368195, -0.39264029264450073, 0.06280683726072311, 0.018244396895170212, 0.5806928277015686, 0.05085078999400139, 0.4016774892807007, 0.3811211884021759, 0.02768556773662567, 0.029673483222723007, 0.24379976093769073, 0.24695222079753876, 0.2609845697879791, 0.355169415473938, -0.2360410988330841, -0.08589649945497513, -0.1376241147518158, 0.18761886656284332, -0.1921500861644745, -0.5169727206230164, 0.08452501893043518, 0.29258739948272705, -0.26089203357696533, 0.056478142738342285, -0.025541454553604126, 0.28634193539619446, -0.16343596577644348, -0.045889660716056824, -0.16526438295841217, -0.20606297254562378, -0.20045103132724762, -0.07969015091657639, 0.06140868365764618, -0.2481546700000763, -0.15592700242996216, 0.04887286573648453, -0.051163505762815475, -0.15374670922756195, -0.1688041239976883, 0.1812903881072998, -0.3121834099292755, -0.5961877703666687, -0.15252862870693207, 0.020132802426815033, 0.13188417255878448, -0.36415010690689087, 0.2562140226364136, 0.3324747383594513, 0.05961860716342926, 0.48181408643722534, 0.23447361588478088, 0.4813922941684723, 0.39652490615844727, 0.22780878841876984, 0.04654565826058388, 0.1242089718580246, -0.10621029138565063, -0.03420596569776535, 0.1746823787689209, 0.19116076827049255, 0.21953634917736053, 0.10865722596645355, 0.13891062140464783, -0.12902197241783142, 0.30714085698127747, 0.16865625977516174, 0.4369651675224304, -0.4719892740249634, 0.14622509479522705, -0.036448586732149124, 0.10499951243400574, -0.36705607175827026, -0.09407410025596619, -0.25820213556289673, -0.3493250012397766, 0.3255082070827484, -0.12360264360904694, -0.005946822464466095, 0.000053126364946365356, 0.0348232164978981, -0.20397064089775085, 0.2525896430015564, 0.3546154201030731, 0.20132911205291748, -0.3646703064441681, 0.047376811504364014, -0.7762361764907837, 0.08483367413282394, -0.02787773124873638, 0.11910459399223328, 0.05852842703461647, 0.06166364997625351, -0.1244787946343422, 0.08726786077022552, 0.1694718301296234, 0.0497143529355526, 0.02323080226778984, 0.13344523310661316, -0.384917289018631, -0.17878620326519012, -0.15277829766273499, 0.034419946372509, -0.13135242462158203, -0.2989700734615326, 0.05107486993074417, -0.48328226804733276, -0.12302470952272415, -0.016291743144392967, -0.07281437516212463, -0.0753006860613823, 0.4723547101020813, 0.585425078868866, -0.059424012899398804, 0.7248201966285706, 0.04121500253677368, -0.1398634910583496, -0.3654264509677887, -0.3601350486278534, -0.06871508061885834, 0.31551092863082886, 0.2810889780521393, 0.2447522133588791, -0.266901433467865, -0.13937100768089294, -0.18863460421562195, 0.2700459361076355, 0.01806686818599701, -0.1398562788963318, -0.42798399925231934, -0.09235674142837524, -0.10108824074268341, -0.05452406778931618, 0.08911518007516861, 0.20103693008422852, 0.05356123298406601, 0.0954548567533493, 0.030654117465019226, -0.2011452317237854, 0.4791109561920166, -0.2753075957298279, -0.025989361107349396, -0.2203977406024933, 0.06444395333528519, 0.06927609443664551, 0.13997064530849457, -0.35560041666030884, 0.11912046372890472, 0.4821445047855377, 0.04986914247274399, -0.1860201358795166, 0.27780646085739136, -0.20640572905540466, 0.25408124923706055, -0.12207004427909851, 0.23468269407749176, 0.11676789075136185, -0.3352920114994049, 0.11710969358682632, -0.19285555183887482 ]
https://github.com/huggingface/datasets/issues/6347
This was fixed in https://github.com/huggingface/datasets/pull/6247. You can find the fix in the `main` version of the docs
Incorrect example code in 'Create a dataset' docs
### Describe the bug On [this](https://huggingface.co/docs/datasets/create_dataset) page, the example code for loading in images and audio is incorrect. Currently, examples are: ``` python from datasets import ImageFolder dataset = load_dataset("imagefolder", data_dir="/path/to/pokemon") ``` and ``` python from datasets import AudioFolder dataset = load_dataset("audiofolder", data_dir="/path/to/folder") ``` I'm pretty sure the imports are wrong and should be: ``` python from datasets import load_dataset dataset = load_dataset("audiofolder", data_dir="/path/to/folder") ``` I am happy to update this if this is right but just wanted to check before making any changes. ### Steps to reproduce the bug Go to https://huggingface.co/docs/datasets/create_dataset ### Expected behavior N/A ### Environment info N/A
17
Incorrect example code in 'Create a dataset' docs ### Describe the bug On [this](https://huggingface.co/docs/datasets/create_dataset) page, the example code for loading in images and audio is incorrect. Currently, examples are: ``` python from datasets import ImageFolder dataset = load_dataset("imagefolder", data_dir="/path/to/pokemon") ``` and ``` python from datasets import AudioFolder dataset = load_dataset("audiofolder", data_dir="/path/to/folder") ``` I'm pretty sure the imports are wrong and should be: ``` python from datasets import load_dataset dataset = load_dataset("audiofolder", data_dir="/path/to/folder") ``` I am happy to update this if this is right but just wanted to check before making any changes. ### Steps to reproduce the bug Go to https://huggingface.co/docs/datasets/create_dataset ### Expected behavior N/A ### Environment info N/A This was fixed in https://github.com/huggingface/datasets/pull/6247. You can find the fix in the `main` version of the docs
[ 0.10520012676715851, -0.3185540735721588, -0.02481408417224884, 0.494010865688324, 0.09755562245845795, -0.02400396764278412, 0.3480840027332306, -0.08572138100862503, 0.09643727540969849, 0.09243978559970856, -0.1433936357498169, 0.17106789350509644, -0.07363775372505188, 0.32302072644233704, 0.31260037422180176, -0.13733291625976562, 0.2922028601169586, 0.20943960547447205, -0.3215024173259735, -0.06994107365608215, -0.1920192837715149, 0.4307301938533783, -0.2532813549041748, 0.023870617151260376, -0.33407264947891235, 0.14059410989284515, -0.24061088263988495, 0.46232476830482483, -0.22921891510486603, -0.28483444452285767, 0.2452555000782013, 0.06626418232917786, 0.10408609360456467, 0.6147080659866333, -0.00011750643898267299, -0.06245727837085724, 0.3117799162864685, -0.1676407754421234, -0.0900702178478241, -0.29700756072998047, -0.30064907670021057, -0.02737528830766678, 0.13941562175750732, -0.08295001089572906, 0.027708828449249268, -0.3132513761520386, -0.07776510715484619, -0.2416650354862213, 0.6037489771842957, 0.2760358452796936, 0.1684471219778061, 0.29949861764907837, 0.18003275990486145, -0.09499131143093109, 0.09863042086362839, 0.4667122960090637, -0.013747334480285645, 0.4451139569282532, 0.16415083408355713, -0.010193321853876114, 0.12491089105606079, 0.3507920205593109, 0.14889967441558838, 0.034579306840896606, 0.5960197448730469, 0.2520642578601837, -0.40504956245422363, -0.41208991408348083, -0.1495993584394455, 0.36322858929634094, 0.49260902404785156, -0.2576582729816437, -0.5770527720451355, -0.3466811776161194, -0.054874617606401443, -0.29132571816444397, 0.3145652711391449, 0.2544465661048889, -0.08335070312023163, 0.09465905278921127, -0.27855658531188965, -0.1533198207616806, -0.072341188788414, 0.3053204417228699, 0.1653071641921997, -0.22782808542251587, -0.33253931999206543, -0.04078199714422226, 0.01627260074019432, -0.23552098870277405, -0.012872857972979546, -0.14565767347812653, 0.04252292588353157, 0.3444843590259552, -0.06685730069875717, 0.1495954990386963, 0.010159668512642384, 0.379634827375412, 0.1034604012966156, -0.007801853585988283, 0.10757052898406982, -0.13380496203899384, -0.2188618928194046, 0.30572885274887085, 0.12910623848438263, 0.1355193853378296, 0.14432014524936676, -0.11840905249118805, 0.2103366255760193, 0.25228747725486755, 0.1249530017375946, -0.19149518013000488, -0.16018928587436676, -0.1402094066143036, -0.11066514253616333, -0.33905914425849915, 0.3472859263420105, -0.11648593842983246, -0.12226033210754395, 0.029886111617088318, -0.08264418691396713, -0.16430944204330444, 0.044105883687734604, 0.3103606104850769, 0.08393455296754837, -0.2804330587387085, 0.18204447627067566, 0.5423827171325684, -0.109201580286026, -0.05177082121372223, -0.1736326962709427, 0.19326624274253845, -0.25975391268730164, 0.06761065870523453, 0.15385957062244415, -0.3123672604560852, 0.5234842896461487, 0.23034422099590302, 0.22466689348220825, -0.16340228915214539, -0.02920844778418541, 0.1036045029759407, 0.187967449426651, 0.13364246487617493, 0.10450130701065063, 0.07201745361089706, 0.11400015652179718, -0.17838817834854126, -0.09832153469324112, 0.10148920118808746, -0.32661348581314087, -0.05854015052318573, -0.17258772253990173, 0.11908235400915146, -0.33609539270401, 0.04588540643453598, -0.492759108543396, 0.24550190567970276, 0.044853575527668, -0.3295589089393616, -0.03470172360539436, -0.04154486581683159, -0.29222559928894043, -0.10845974087715149, 0.42054322361946106, 0.7536675930023193, -0.20067518949508667, -0.15089201927185059, -0.04440680891275406, -0.0675610899925232, -0.03134213015437126, 0.23747286200523376, -0.14428137242794037, 0.3336105942726135, -0.5369755029678345, 0.0738602876663208, 0.16311413049697876, -0.5146086812019348, 0.11196263134479523, 0.1236276924610138, 0.08718076348304749, 0.21196049451828003, 0.05397126078605652, -0.005920715630054474, -0.03673359379172325, -0.00610002875328064, 0.12043380737304688, 0.29645490646362305, -0.00841276440769434, 0.2246238887310028, 0.04592268913984299, -0.29395759105682373, 0.13214479386806488, 0.05507366359233856, -0.37926825881004333, 0.28251567482948303, 0.12990954518318176, 0.04242657124996185, 0.32413846254348755, -0.17965295910835266, -0.03007335774600506, 0.36164039373397827, 0.2740977704524994, 0.09058909118175507, 0.03329547122120857, -0.21951362490653992, -0.4122520983219147, 0.15068289637565613, -0.0706290677189827, 0.14861708879470825, -0.0032037533819675446, -0.025614023208618164, -0.3738726079463959, -0.08815460652112961, -0.41274169087409973, -0.1748105138540268, 0.0645742416381836, -0.04038459435105324, 0.06086712330579758, 0.02349090576171875, -0.1573910415172577, 0.4789007902145386, 0.0032321587204933167, 0.27729910612106323, -0.6287049651145935, 0.27884986996650696, 0.034195199608802795, -0.14388491213321686, 0.16001421213150024, 0.10328631103038788, 0.1748524308204651, -0.19177532196044922, -0.07798048108816147, 0.6498209834098816, 0.36934226751327515, 0.5015416145324707, -0.18758368492126465, 0.1071256473660469, 0.3429926335811615, -0.2602877616882324, 0.1662079095840454, 0.0844876617193222, 0.26893338561058044, -0.01676386594772339, -0.512063205242157, 0.3344641327857971, -0.08983628451824188, 0.08966320753097534, 0.21971601247787476, -0.17131084203720093, -0.0047699809074401855, 0.24550746381282806, -0.26635822653770447, -0.20078730583190918, 0.09835586696863174, 0.055168673396110535, 0.41658419370651245, 0.06352325528860092, -0.21516942977905273, -0.16170048713684082, 0.12874072790145874, -0.0936695858836174, 0.008675016462802887, 0.20514261722564697, -0.05058339238166809, -0.19194680452346802, 0.10930462181568146, 0.15574704110622406, 0.37207886576652527, 0.14707836508750916, -0.08745396137237549, 0.1804547756910324, 0.05939122289419174, -0.14068709313869476, 0.26991596817970276, 0.06908243894577026, 0.04432256147265434, -0.08666777610778809, 0.0011301003396511078, -0.13394257426261902, -0.3518778383731842, 0.054738447070121765, -0.15708918869495392, 0.08157899230718613, -0.6495654582977295, 0.002968110144138336, -0.17691633105278015, -0.3183456063270569, -0.40313342213630676, -0.07670249044895172, -0.3029365539550781, -0.11501991748809814, -0.17773310840129852, 0.1518479436635971, -0.1413968801498413, -0.06460407376289368, -0.02955971285700798, -0.008362963795661926, -0.292944997549057, 0.003076782450079918, -0.10815010964870453, 0.25995370745658875, -0.16127550601959229, 0.018156155943870544, 0.17777171730995178, 0.33042043447494507, 0.2759389579296112, -0.42511725425720215, -0.01739751175045967, -0.08372990787029266, -0.42754289507865906, 0.2816208004951477, 0.007130831480026245, 0.451140820980072, 0.20034602284431458, 0.061874743551015854, -0.006476953625679016, -0.2234407216310501, 0.22289370000362396, -0.19270947575569153, -0.23007580637931824, 0.002161845564842224, 0.07178681343793869, 0.06346065551042557, -0.24946822226047516, -0.3098706007003784, -0.114918053150177, -0.22201918065547943, 0.27590179443359375, 0.1835913509130478, 0.04578057676553726, 0.3100459575653076, 0.21267245709896088, 0.15221670269966125, -0.15073427557945251, 0.1892508715391159, -0.09852638840675354, -0.5359107255935669, 0.19023491442203522, -0.31545352935791016, -0.3303120732307434, -0.14462170004844666, -0.045988500118255615, 0.12392503023147583, -0.08827929198741913, -0.05345378816127777, -0.44147351384162903, -0.34582823514938354, 0.09777405858039856, 0.08436156809329987, 0.37646427750587463, 0.14859268069267273, -0.04188074916601181, 0.017427265644073486, -0.3559970557689667, -0.25304579734802246, 0.16108708083629608, -0.12863080203533173, -0.10053938627243042, 0.1857658326625824, 0.299775630235672, -0.42968714237213135, 0.42138195037841797, 0.31883931159973145, 0.1099499762058258, 0.4456610381603241, -0.3109418451786041, 0.6354272961616516, -0.17707300186157227, -0.16041451692581177, 0.09543293714523315, 0.12364057451486588, -0.027756474912166595, 0.20340149104595184, 0.29855775833129883, 0.18192905187606812, -0.122648224234581, 0.11736942827701569, -0.6489113569259644, -0.1131521463394165, -0.14515288174152374, -0.007798089180141687, 0.04330604523420334, 0.03519343584775925, 0.06421591341495514, -0.018198490142822266, 0.0005334019660949707, -0.000550348311662674, 0.25723156332969666, 0.2775841951370239, 0.1797083616256714, -0.4061887860298157, -0.0548660084605217, -0.34695711731910706, -0.1168692409992218, 0.05361451953649521, 0.30766740441322327, 0.013501077890396118, -0.015324972569942474, -0.09085787832736969, 0.07412154972553253, 0.5616081953048706, 0.13544854521751404, -0.07076914608478546, -0.1195741593837738, -0.14443805813789368, -0.4151143729686737, 0.055299848318099976, -0.33353865146636963, 0.11264419555664062, 0.0593099482357502, 0.4799189865589142, -0.3605024814605713, -0.20829379558563232, 0.06392551958560944, 0.4082877039909363, -0.06381992250680923, -0.10696019232273102, -0.24874871969223022, -0.35124367475509644, -0.42120102047920227, -0.2503490447998047, 0.19842714071273804, 0.05253635719418526, -0.08708447217941284, 0.04372308403253555, 0.12780648469924927, 0.14869236946105957, 0.21847808361053467, 0.1328534185886383, 0.5796396136283875, -0.024762341752648354, 0.2922099232673645, 0.38627889752388, -0.05367710441350937, 0.20651020109653473, 0.5266941785812378, -0.20106729865074158, -0.1899629831314087, -0.10288501530885696, -0.14106403291225433, 0.15794610977172852, 0.2537316083908081, -0.026544049382209778, -0.12457549571990967, 0.20497772097587585, -0.02121790498495102, -0.3967392146587372, 0.08844266831874847, 0.3457200527191162, 0.031651850789785385, 0.05038727447390556, -0.5456490516662598, 0.5231537818908691, 0.07406727969646454, -0.025479711592197418, 0.47816675901412964, 0.5905934572219849, -0.19215461611747742, 0.05156923457980156, -0.11878837645053864, 0.8064574599266052, 0.11273333430290222, 0.3510792851448059, 0.5596346259117126, -0.41201603412628174, 0.3790920078754425, 0.09404904395341873, -0.18057852983474731, -0.30802738666534424, -0.18635216355323792, 0.061438605189323425, -0.17816801369190216, -0.039722006767988205, -0.008722197264432907, -0.05842720717191696, 0.2484392374753952, -0.33269283175468445, 0.19610881805419922, -0.09765627235174179, 0.2244764119386673, -0.21236775815486908, -0.33121639490127563, -0.4062696099281311, 0.10900238156318665, 0.2232382893562317, 0.3049500286579132, -0.22046172618865967, -0.08176188170909882, -0.21377304196357727, -0.2911366820335388, -0.13968324661254883, 0.05537895858287811, -0.1677991896867752, 0.014944430440664291, 0.11703262478113174, -0.21291539072990417, 0.10420668870210648, 0.611774206161499, 0.23297742009162903, -0.013153952546417713, -0.4141116440296173, 0.10784383863210678, -0.23530533909797668, 0.16524745523929596, -0.10485297441482544, -0.0023605041205883026, 0.019488295540213585, -0.04950861632823944, -0.066132552921772, -0.17746073007583618, -0.16672863066196442, 0.1366461217403412, -0.18130093812942505, 0.08939383924007416, -0.3051619529724121, -0.22641032934188843, -0.40104109048843384, -0.0739540308713913, 0.16213937103748322, -0.26337873935699463, 0.07677394151687622, 0.41186726093292236, -0.031318359076976776, -0.04058991000056267, 0.16853375732898712, -0.1682780236005783, -0.18220116198062897, 0.3661334812641144, -0.09041790664196014, -0.1781662404537201, 0.4531007707118988, 0.16082219779491425, -0.09408336877822876, -0.07380267977714539, 0.33586567640304565, 0.33298999071121216, -0.42830929160118103, 0.2285587638616562, 0.029539451003074646, 0.008429959416389465, -0.14838233590126038, 0.17181995511054993, 0.181771382689476, -0.22506149113178253, 0.23371034860610962, -0.231211856007576, -0.23786228895187378, 0.41533881425857544, 0.08042055368423462, 0.19772127270698547, -0.09300822019577026, -0.0898229330778122, 0.22628198564052582, -0.2451343536376953, -0.2674950361251831, 0.24780461192131042, 0.06603271514177322, -0.06870526820421219, 0.39411553740501404, 0.21695639193058014, 0.28755348920822144, -0.2562539279460907, -0.004687905311584473, -0.15921391546726227, -0.23352371156215668, -0.06611310690641403, -0.3223498463630676, 0.1557265669107437, 0.14033806324005127, -0.35309937596321106, 0.27484697103500366, -0.08121808618307114, -0.15398450195789337, -0.3115678131580353, 0.2092769891023636, 0.28766563534736633, -0.0009203795343637466, 0.04471844807267189, -0.06608787178993225, 0.0783204436302185, 0.025904178619384766, 0.01744641363620758, 0.08766503632068634, 0.07525325566530228, 0.12481387704610825, -0.05738036707043648, -0.17604707181453705, -0.11786047369241714, 0.2830919325351715, 0.2884848713874817, 0.07311353087425232, 0.10550309717655182, 0.1339324712753296, -0.2188047468662262, 0.2918725609779358, -0.04694322496652603, 0.5090465545654297, 0.336498886346817, -0.23660321533679962, 0.270447313785553, 0.07232438772916794, 0.13486507534980774, -0.15643680095672607, -0.08933792263269424, -0.0502738356590271, -0.20661137998104095, 0.03239716589450836, 0.20414626598358154, 0.009140878915786743, 0.18942897021770477, -0.2633209526538849, -0.03837301954627037, 0.4274018704891205, 0.011234249919652939, 0.2505660057067871, 0.1817706674337387, -0.32546520233154297, 0.28622114658355713, 0.18380825221538544, 0.09037657082080841, 0.12205071747303009, 0.33620670437812805, -0.1212472915649414, 0.28971919417381287, -0.10825583338737488, 0.13361693918704987, 0.2950044274330139, -0.3274580240249634, -0.06511284410953522, 0.14325952529907227, 0.1341995894908905, 0.11541895568370819, -0.07404866814613342, 0.47644126415252686, -0.4167296290397644, -0.045928195118904114, -0.251257061958313, -0.014755511656403542, -0.017814505845308304, -0.1673007607460022, 0.13168621063232422, -0.3692680597305298, -0.08121047168970108, -0.07616525888442993, -0.17664194107055664, -0.3715260922908783, 0.07605011016130447, -0.13072243332862854, -0.07201268523931503, -0.4524824619293213, -0.05251727253198624, 0.1262657642364502, 0.0022503696382045746, -0.16626319289207458, 0.24233819544315338, 0.2867285907268524, -0.2593107521533966, 0.2114955484867096, 0.46221524477005005, 0.6294407844543457, 0.3496345579624176, 0.32742100954055786, 0.026689283549785614, 0.05110320821404457, -0.029715154320001602, 0.04771825671195984, 0.21755869686603546, 0.02502993308007717, 0.17383873462677002, 0.28927984833717346, 0.15222802758216858, -0.18274810910224915, -0.17180965840816498, 0.3457021415233612, 0.06413974612951279, -0.4033276438713074, 0.20333534479141235, -0.6387584805488586, 0.04555020481348038, -0.18056800961494446, -0.08341480791568756, -0.46000435948371887, 0.1738099753856659, 0.2736073136329651, 0.14473716914653778, 0.026324864476919174, 0.06956756114959717, 0.045031044632196426, 0.19825789332389832, 0.3852331340312958, 0.3639284074306488, 0.3638974130153656, -0.26754239201545715, -0.2807086110115051, -0.8097897171974182, -0.09212946146726608, -0.07461985945701599, 0.004426591098308563, 0.014672521501779556, 0.00565125048160553, 0.09303250163793564, 0.06551031768321991, 0.1589202880859375, 0.14510466158390045, -0.0464077927172184, -0.055556125938892365, -0.09662817418575287, -0.19729579985141754, -0.09288611263036728, 0.20747683942317963, -0.040082480758428574, -0.3360583186149597, 0.05960030108690262, -0.26692456007003784, -0.0582977831363678, -0.15515457093715668, 0.31552600860595703, -0.2818174660205841, -0.2700166702270508, 0.2566869556903839, 0.1098516434431076, 0.28766632080078125, -0.2601323127746582, -0.282867431640625, -0.08245229721069336, -0.2582032084465027, -0.1865009367465973, 0.32105574011802673, -0.26040637493133545, 0.396261602640152, -0.1719813048839569, -0.42525437474250793, -0.39633578062057495, 0.25189009308815, 0.22360917925834656, -0.062494464218616486, -0.5197996497154236, 0.26904982328414917, -0.226467564702034, -0.10754123330116272, 0.2336447387933731, 0.1419897973537445, -0.28392088413238525, 0.11183673143386841, -0.06783736497163773, -0.22085925936698914, 0.6119199395179749, -0.4651913344860077, 0.01707465946674347, -0.19284217059612274, 0.20301447808742523, 0.3037998676300049, -0.3063396215438843, -0.5349796414375305, 0.33507272601127625, 0.29100900888442993, -0.09838013350963593, -0.11257918179035187, 0.3128936290740967, -0.24847397208213806, -0.13463717699050903, -0.006785467267036438, 0.31238800287246704, 0.18721577525138855, -0.30125343799591064, 0.3194747269153595, -0.11049672216176987 ]
https://github.com/huggingface/datasets/issues/6330
I also encountered a similar error below. Appreciate the team could shed some light on this issue. ``` --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) [/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb) Cell 1 line 4 [1](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0) from datasets import load_dataset, load_dataset [3](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=2) # ds = load_dataset("parquet", data_dir="/home/ubuntu/work/EveryDream2trainer/datasets/monse_v1/data") ----> [4](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3) ds = load_dataset("Raspberry-ai/monse-v1") File [/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/load.py:1804](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/load.py:1804), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 1800 # Build dataset for splits 1801 keep_in_memory = ( 1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1803 ) -> 1804 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) 1805 # Rename and cast features to match task schema 1806 if task is not None: File [/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/builder.py:1108](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/builder.py:1108), in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory) 1106 is_local = not is_remote_filesystem(self._fs) 1107 if not is_local: -> 1108 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") 1109 if not os.path.exists(self._output_dir): 1110 raise FileNotFoundError( 1111 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call " 1112 "builder.download_and_prepare(), or use " 1113 "datasets.load_dataset() before trying to access the Dataset object." 1114 ) NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. ``` Code to reproduce the issue: ``` from datasets import load_dataset ds = load_dataset("Raspberry-ai/monse-v1") ``` Dependencies: ``` Package Version ------------------------- ------------ absl-py 2.0.0 accelerate 0.23.0 aiohttp 3.8.4 aiosignal 1.3.1 antlr4-python3-runtime 4.9.3 anyio 4.0.0 appdirs 1.4.4 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.3.0 asttokens 2.4.0 async-lru 2.0.4 async-timeout 4.0.3 attrs 23.1.0 Babel 2.13.0 backcall 0.2.0 beautifulsoup4 4.12.2 bitsandbytes 0.41.1 bleach 6.1.0 braceexpand 0.1.7 cachetools 5.3.1 certifi 2023.7.22 cffi 1.16.0 charset-normalizer 3.3.1 click 8.1.7 cmake 3.27.7 colorama 0.4.6 comm 0.1.4 compel 1.1.6 datasets 2.11.0 debugpy 1.8.0 decorator 5.1.1 defusedxml 0.7.1 diffusers 0.18.0 dill 0.3.6 docker-pycreds 0.4.0 dowg 0.3.1 einops 0.7.0 einops-exts 0.0.4 exceptiongroup 1.1.3 executing 2.0.0 fastjsonschema 2.18.1 filelock 3.12.4 fqdn 1.5.1 frozenlist 1.4.0 fsspec 2023.10.0 ftfy 6.1.1 gitdb 4.0.11 GitPython 3.1.40 google-auth 2.23.3 google-auth-oauthlib 1.1.0 grpcio 1.59.0 huggingface-hub 0.18.0 idna 3.4 importlib-metadata 6.8.0 inflection 0.5.1 ipykernel 6.25.2 ipython 8.16.1 isoduration 20.11.0 jedi 0.19.1 Jinja2 3.1.2 joblib 1.3.2 json5 0.9.14 jsonpointer 2.4 jsonschema 4.19.1 jsonschema-specifications 2023.7.1 jupyter_client 8.4.0 jupyter_core 5.4.0 jupyter-events 0.8.0 jupyter-lsp 2.2.0 jupyter_server 2.8.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.7 jupyterlab-pygments 0.2.2 jupyterlab_server 2.25.0 lightning-utilities 0.9.0 lion-pytorch 0.1.2 lit 17.0.3 Markdown 3.5 MarkupSafe 2.1.3 matplotlib-inline 0.1.6 mistune 3.0.2 more-itertools 10.1.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.14 mypy-extensions 1.0.0 nbclient 0.8.0 nbconvert 7.9.2 nbformat 5.9.2 nest-asyncio 1.5.8 networkx 3.2 nltk 3.8.1 notebook_shim 0.2.3 numpy 1.23.5 oauthlib 3.2.2 omegaconf 2.2.3 open-clip-torch 2.22.0 open-flamingo 2.0.0 overrides 7.4.0 packaging 23.2 pandas 2.1.1 pandocfilters 1.5.0 parso 0.8.3 pathtools 0.1.2 pexpect 4.8.0 pickleshare 0.7.5 Pillow 10.1.0 pip 23.3.1 platformdirs 3.11.0 prometheus-client 0.17.1 prompt-toolkit 3.0.39 protobuf 3.20.1 psutil 5.9.6 ptyprocess 0.7.0 pure-eval 0.2.2 pyarrow 13.0.0 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycparser 2.21 pyDeprecate 0.3.2 Pygments 2.16.1 pynvml 11.4.1 pyparsing 3.1.1 pyre-extensions 0.0.29 python-dateutil 2.8.2 python-json-logger 2.0.7 pytorch-lightning 1.6.5 pytz 2023.3.post1 PyYAML 6.0.1 pyzmq 25.1.1 referencing 0.30.2 regex 2023.10.3 requests 2.31.0 requests-oauthlib 1.3.1 responses 0.18.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rpds-py 0.10.6 rsa 4.9 safetensors 0.4.0 scipy 1.11.3 Send2Trash 1.8.2 sentencepiece 0.1.98 sentry-sdk 1.32.0 setproctitle 1.3.3 setuptools 68.2.2 six 1.16.0 smmap 5.0.1 sniffio 1.3.0 soupsieve 2.5 stack-data 0.6.3 sympy 1.12 tensorboard 2.15.0 tensorboard-data-server 0.7.1 terminado 0.17.1 timm 0.9.8 tinycss2 1.2.1 tokenizers 0.13.3 tomli 2.0.1 torch 2.0.1+cu118 torchmetrics 1.2.0 torchvision 0.15.2+cu118 tornado 6.3.3 tqdm 4.66.1 traitlets 5.11.2 transformers 4.29.2 triton 2.0.0 types-python-dateutil 2.8.19.14 typing_extensions 4.8.0 typing-inspect 0.9.0 tzdata 2023.3 uri-template 1.3.0 urllib3 2.0.7 wandb 0.15.12 wcwidth 0.2.8 webcolors 1.13 webdataset 0.2.62 webencodings 0.5.1 websocket-client 1.6.4 Werkzeug 3.0.0 wheel 0.41.2 xformers 0.0.20 xxhash 3.4.1 yarl 1.9.2 zipp 3.17.0 ```
Latest fsspec==2023.10.0 issue with streaming datasets
### Describe the bug Loading a streaming dataset with this version of fsspec fails with the following error: `NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.` I suspect the issue is with this PR https://github.com/fsspec/filesystem_spec/pull/1381 ### Steps to reproduce the bug 1. Upgrade fsspec to version `2023.10.0` 2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)` 3. Observe the following exception: ``` File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset return builder_instance.as_streaming_dataset(split=split) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset raise NotImplementedError( NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet. ``` ### Expected behavior Should stream the dataset as normal. ### Environment info datasets@main fsspec==2023.10.0
588
Latest fsspec==2023.10.0 issue with streaming datasets ### Describe the bug Loading a streaming dataset with this version of fsspec fails with the following error: `NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.` I suspect the issue is with this PR https://github.com/fsspec/filesystem_spec/pull/1381 ### Steps to reproduce the bug 1. Upgrade fsspec to version `2023.10.0` 2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)` 3. Observe the following exception: ``` File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset return builder_instance.as_streaming_dataset(split=split) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset raise NotImplementedError( NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet. ``` ### Expected behavior Should stream the dataset as normal. ### Environment info datasets@main fsspec==2023.10.0 I also encountered a similar error below. Appreciate the team could shed some light on this issue. ``` --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) [/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb) Cell 1 line 4 [1](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0) from datasets import load_dataset, load_dataset [3](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=2) # ds = load_dataset("parquet", data_dir="/home/ubuntu/work/EveryDream2trainer/datasets/monse_v1/data") ----> [4](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3) ds = load_dataset("Raspberry-ai/monse-v1") File [/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/load.py:1804](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/load.py:1804), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs) 1800 # Build dataset for splits 1801 keep_in_memory = ( 1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1803 ) -> 1804 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory) 1805 # Rename and cast features to match task schema 1806 if task is not None: File [/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/builder.py:1108](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/builder.py:1108), in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory) 1106 is_local = not is_remote_filesystem(self._fs) 1107 if not is_local: -> 1108 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.") 1109 if not os.path.exists(self._output_dir): 1110 raise FileNotFoundError( 1111 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call " 1112 "builder.download_and_prepare(), or use " 1113 "datasets.load_dataset() before trying to access the Dataset object." 1114 ) NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported. ``` Code to reproduce the issue: ``` from datasets import load_dataset ds = load_dataset("Raspberry-ai/monse-v1") ``` Dependencies: ``` Package Version ------------------------- ------------ absl-py 2.0.0 accelerate 0.23.0 aiohttp 3.8.4 aiosignal 1.3.1 antlr4-python3-runtime 4.9.3 anyio 4.0.0 appdirs 1.4.4 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.3.0 asttokens 2.4.0 async-lru 2.0.4 async-timeout 4.0.3 attrs 23.1.0 Babel 2.13.0 backcall 0.2.0 beautifulsoup4 4.12.2 bitsandbytes 0.41.1 bleach 6.1.0 braceexpand 0.1.7 cachetools 5.3.1 certifi 2023.7.22 cffi 1.16.0 charset-normalizer 3.3.1 click 8.1.7 cmake 3.27.7 colorama 0.4.6 comm 0.1.4 compel 1.1.6 datasets 2.11.0 debugpy 1.8.0 decorator 5.1.1 defusedxml 0.7.1 diffusers 0.18.0 dill 0.3.6 docker-pycreds 0.4.0 dowg 0.3.1 einops 0.7.0 einops-exts 0.0.4 exceptiongroup 1.1.3 executing 2.0.0 fastjsonschema 2.18.1 filelock 3.12.4 fqdn 1.5.1 frozenlist 1.4.0 fsspec 2023.10.0 ftfy 6.1.1 gitdb 4.0.11 GitPython 3.1.40 google-auth 2.23.3 google-auth-oauthlib 1.1.0 grpcio 1.59.0 huggingface-hub 0.18.0 idna 3.4 importlib-metadata 6.8.0 inflection 0.5.1 ipykernel 6.25.2 ipython 8.16.1 isoduration 20.11.0 jedi 0.19.1 Jinja2 3.1.2 joblib 1.3.2 json5 0.9.14 jsonpointer 2.4 jsonschema 4.19.1 jsonschema-specifications 2023.7.1 jupyter_client 8.4.0 jupyter_core 5.4.0 jupyter-events 0.8.0 jupyter-lsp 2.2.0 jupyter_server 2.8.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.7 jupyterlab-pygments 0.2.2 jupyterlab_server 2.25.0 lightning-utilities 0.9.0 lion-pytorch 0.1.2 lit 17.0.3 Markdown 3.5 MarkupSafe 2.1.3 matplotlib-inline 0.1.6 mistune 3.0.2 more-itertools 10.1.0 mpmath 1.3.0 multidict 6.0.4 multiprocess 0.70.14 mypy-extensions 1.0.0 nbclient 0.8.0 nbconvert 7.9.2 nbformat 5.9.2 nest-asyncio 1.5.8 networkx 3.2 nltk 3.8.1 notebook_shim 0.2.3 numpy 1.23.5 oauthlib 3.2.2 omegaconf 2.2.3 open-clip-torch 2.22.0 open-flamingo 2.0.0 overrides 7.4.0 packaging 23.2 pandas 2.1.1 pandocfilters 1.5.0 parso 0.8.3 pathtools 0.1.2 pexpect 4.8.0 pickleshare 0.7.5 Pillow 10.1.0 pip 23.3.1 platformdirs 3.11.0 prometheus-client 0.17.1 prompt-toolkit 3.0.39 protobuf 3.20.1 psutil 5.9.6 ptyprocess 0.7.0 pure-eval 0.2.2 pyarrow 13.0.0 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycparser 2.21 pyDeprecate 0.3.2 Pygments 2.16.1 pynvml 11.4.1 pyparsing 3.1.1 pyre-extensions 0.0.29 python-dateutil 2.8.2 python-json-logger 2.0.7 pytorch-lightning 1.6.5 pytz 2023.3.post1 PyYAML 6.0.1 pyzmq 25.1.1 referencing 0.30.2 regex 2023.10.3 requests 2.31.0 requests-oauthlib 1.3.1 responses 0.18.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rpds-py 0.10.6 rsa 4.9 safetensors 0.4.0 scipy 1.11.3 Send2Trash 1.8.2 sentencepiece 0.1.98 sentry-sdk 1.32.0 setproctitle 1.3.3 setuptools 68.2.2 six 1.16.0 smmap 5.0.1 sniffio 1.3.0 soupsieve 2.5 stack-data 0.6.3 sympy 1.12 tensorboard 2.15.0 tensorboard-data-server 0.7.1 terminado 0.17.1 timm 0.9.8 tinycss2 1.2.1 tokenizers 0.13.3 tomli 2.0.1 torch 2.0.1+cu118 torchmetrics 1.2.0 torchvision 0.15.2+cu118 tornado 6.3.3 tqdm 4.66.1 traitlets 5.11.2 transformers 4.29.2 triton 2.0.0 types-python-dateutil 2.8.19.14 typing_extensions 4.8.0 typing-inspect 0.9.0 tzdata 2023.3 uri-template 1.3.0 urllib3 2.0.7 wandb 0.15.12 wcwidth 0.2.8 webcolors 1.13 webdataset 0.2.62 webencodings 0.5.1 websocket-client 1.6.4 Werkzeug 3.0.0 wheel 0.41.2 xformers 0.0.20 xxhash 3.4.1 yarl 1.9.2 zipp 3.17.0 ```
[ -0.3962833285331726, -0.05229148268699646, 0.0895015299320221, 0.22059676051139832, 0.20769593119621277, -0.055554941296577454, 0.11532916873693466, 0.1682538241147995, -0.1815401017665863, 0.2266596555709839, -0.04434163123369217, 0.2020154893398285, -0.05888967961072922, 0.46524885296821594, 0.03397677466273308, -0.23244670033454895, 0.21127451956272125, 0.14988012611865997, -0.1464025378227234, 0.22781431674957275, -0.0821220800280571, 0.3697831630706787, -0.12801358103752136, -0.21536098420619965, -0.029460404068231583, 0.16141241788864136, -0.12643900513648987, 0.17121705412864685, -0.10415706038475037, -0.5332136750221252, 0.3809048533439636, -0.17306113243103027, 0.254564493894577, 0.4597490429878235, -0.00012335454812273383, 0.006056293845176697, 0.5310839414596558, -0.0723167359828949, -0.15169838070869446, -0.30244457721710205, -0.19589100778102875, -0.26546645164489746, -0.0151263028383255, 0.25471192598342896, -0.26283830404281616, -0.20207948982715607, 0.009919246658682823, -0.7879800796508789, 0.27228865027427673, 0.3747536540031433, 0.14287173748016357, 0.19683434069156647, -0.026495270431041718, 0.008660480380058289, 0.2627696692943573, -0.18580487370491028, -0.2406647801399231, -0.19479148089885712, 0.18100841343402863, -0.14754951000213623, -0.18196675181388855, 0.1777859777212143, 0.1020108237862587, 0.11307931691408157, 0.4155324697494507, -0.2101781666278839, -0.061200641095638275, -0.3317200839519501, 0.15244711935520172, 0.22920677065849304, 0.7077828645706177, 0.01362454704940319, -0.6167389154434204, -0.09039445221424103, -0.12665405869483948, -0.5123699307441711, 0.31349998712539673, 0.06076594442129135, -0.0026567243039608, 0.051399365067481995, -0.054596446454524994, -0.05314486846327782, -0.1525323987007141, 0.15104611217975616, 0.062038205564022064, -0.08312661945819855, -0.1033172607421875, 0.02535596303641796, 0.058088548481464386, -0.19863323867321014, 0.29792219400405884, -0.2449784129858017, 0.01818424090743065, 0.28900253772735596, -0.5223836898803711, 0.11736267805099487, 0.13254180550575256, 0.19935666024684906, -0.25148844718933105, 0.2541203200817108, -0.1104210615158081, 0.04396476596593857, -0.11898837983608246, 0.0316479466855526, 0.24166229367256165, 0.2237953394651413, 0.18970376253128052, 0.04911883920431137, 0.12271767854690552, 0.1920538693666458, -0.01830270141363144, -0.2446931004524231, 0.04201429337263107, -0.1369849294424057, -0.15225379168987274, 0.08605541288852692, 0.19445139169692993, -0.48492351174354553, -0.1933407336473465, 0.10936185717582703, -0.05517951399087906, -0.009297113865613937, -0.01428096555173397, 0.31312963366508484, -0.03208335489034653, 0.7415672540664673, -0.055459462106227875, 0.05051444098353386, -0.18048793077468872, -0.29430022835731506, -0.20641957223415375, -0.1397121250629425, -0.10473722219467163, 0.27085599303245544, 0.2672168016433716, -0.7928380966186523, 0.2491685450077057, -0.26839736104011536, -0.09626773744821548, 0.06467008590698242, -0.10598921030759811, -0.1674523949623108, 0.11390897631645203, 0.41653141379356384, -0.2797020375728607, 0.10119674354791641, 0.014000440016388893, 0.21845129132270813, -0.06322566419839859, 0.17704163491725922, -0.004354558885097504, -0.5156026482582092, -0.08583281189203262, 0.07666847109794617, -0.1833781599998474, -0.1578586846590042, -0.32015207409858704, 0.08235742151737213, 0.009243082255125046, -0.2859426736831665, -0.11255083978176117, -0.12923139333724976, -0.7099601030349731, -0.1189049780368805, 0.21696382761001587, 0.477140873670578, -0.4753419756889343, -0.13269054889678955, -0.3968435525894165, -0.045676976442337036, 0.3566547632217407, 0.20769305527210236, -0.09602823853492737, -0.11698044091463089, -0.1683204174041748, 0.15490543842315674, -0.04561665654182434, -0.2788660526275635, -0.46666330099105835, 0.4678913652896881, 0.05344720184803009, 0.36655160784721375, 0.2139645516872406, -0.11601307988166809, 0.23344369232654572, -0.08447267860174179, 0.17379339039325714, 0.23487785458564758, -0.2011876404285431, 0.051526330411434174, -0.29386043548583984, -0.36009472608566284, 0.20582567155361176, 0.22273677587509155, 0.21012668311595917, 0.25522521138191223, 0.12305985391139984, 0.02765890210866928, 0.23167109489440918, -0.023539088666439056, 0.1803334653377533, 0.20599058270454407, 0.6657282114028931, 0.09497149288654327, 0.03823282942175865, -0.32110267877578735, -0.36656588315963745, 0.36699095368385315, 0.13195011019706726, -0.08573229610919952, 0.3643544018268585, 0.029798701405525208, 0.01653560996055603, -0.06163255125284195, -0.17569506168365479, -0.22324025630950928, -0.03595590591430664, 0.2257685661315918, 0.07152226567268372, -0.04437202215194702, -0.31466758251190186, 0.3884240388870239, -0.19424261152744293, -0.13839469850063324, -0.22052589058876038, 0.33523648977279663, 0.04373249411582947, -0.25255700945854187, -0.0017686188220977783, 0.11394736170768738, 0.3313739001750946, -0.11416516453027725, -0.25686323642730713, 0.40683478116989136, 0.4234441816806793, 0.3070891499519348, -0.3304961621761322, 0.3556786775588989, 0.2888236939907074, -0.2507208585739136, -0.05514565855264664, 0.3796464204788208, 0.09870244562625885, -0.0007782578468322754, 0.10016728937625885, 0.22960089147090912, 0.12068403512239456, 0.19358858466148376, 0.12631425261497498, -0.06267962604761124, 0.2587500810623169, 0.12903520464897156, -0.062118303030729294, -0.11101607233285904, 0.40090811252593994, -0.29690682888031006, 0.31030723452568054, -0.08233834058046341, -0.22249290347099304, 0.028411144390702248, 0.07550927996635437, 0.056004077196121216, -0.4726575016975403, 0.12989458441734314, -0.22053876519203186, -0.20175950229167938, 0.5924773216247559, 0.327903687953949, 0.5910863280296326, 0.12503400444984436, -0.042971886694431305, 0.21465153992176056, 0.2258807122707367, -0.12681031227111816, 0.23429320752620697, -0.1261919140815735, 0.08626184612512589, 0.34847238659858704, 0.16680032014846802, 0.17510372400283813, -0.21968384087085724, -0.01931140571832657, 0.01943761110305786, 0.2126213163137436, -0.331434965133667, -0.017726730555295944, -0.38963034749031067, -0.30925968289375305, -0.2080928236246109, 0.21450002491474152, 0.0034460220485925674, -0.23065680265426636, -0.1570797711610794, 0.7053333520889282, -0.1514759659767151, 0.14527887105941772, -0.21077677607536316, 0.34513020515441895, -0.04828714579343796, 0.03871705383062363, -0.2505568861961365, 0.17088840901851654, -0.2979024052619934, -0.03957274928689003, 0.35536766052246094, -0.21138516068458557, 0.043679870665073395, 0.02772808074951172, -0.028192363679409027, -0.4898514747619629, -0.26533886790275574, 0.16911625862121582, 0.06026298180222511, 0.37939512729644775, -0.07264278829097748, 0.07855437695980072, 0.23554767668247223, -0.141167551279068, 0.04957957565784454, -0.4981432259082794, -0.23239922523498535, 0.04081214964389801, -0.08783833682537079, 0.13284863531589508, -0.1658090353012085, -0.2834603190422058, -0.3149547874927521, -0.42604219913482666, 0.3011382818222046, -0.24058987200260162, 0.07954145222902298, 0.2818572521209717, -0.05672186613082886, -0.05822074040770531, -0.06294329464435577, -0.2747991681098938, -0.16821061074733734, -0.3811746835708618, 0.1495177447795868, -0.23414981365203857, -0.4998549222946167, 0.09082366526126862, 0.287635862827301, -0.08482745289802551, 0.13368594646453857, -0.3661717176437378, 0.05615375190973282, -0.22355517745018005, 0.04571320116519928, -0.05389938876032829, -0.2270532101392746, 0.345241904258728, -0.13742107152938843, -0.00948154553771019, -0.2505635619163513, -0.28058135509490967, -0.026882369071245193, 0.34977877140045166, 0.20691180229187012, 0.07115912437438965, 0.2027173638343811, 0.16058722138404846, 0.6069149971008301, 0.40889620780944824, -0.09029434621334076, 0.6099040508270264, 0.10729362070560455, 0.29555341601371765, -0.22860053181648254, -0.14096015691757202, -0.0619220994412899, -0.13965681195259094, -0.1694623827934265, 0.20433199405670166, 0.19699469208717346, -0.27074357867240906, -0.1274077594280243, 0.07674086093902588, -0.002334780991077423, 0.01698974519968033, 0.023292718455195427, -0.438993364572525, 0.43609973788261414, 0.02246326208114624, 0.10104689747095108, 0.08334671705961227, -0.24891075491905212, 0.014455750584602356, 0.24625614285469055, 0.33388006687164307, 0.079713836312294, -0.003434218466281891, -0.1388925015926361, -0.5173632502555847, 0.12826143205165863, 0.21422019600868225, 0.715455174446106, -0.4000788927078247, -0.08370894193649292, 0.03771348297595978, 0.010151658207178116, 0.19273410737514496, -0.43227025866508484, 0.2576841115951538, 0.24881181120872498, -0.1908012479543686, -0.11671072244644165, -0.23281070590019226, 0.09059125185012817, -0.08978506177663803, -0.08257345855236053, 0.5566508173942566, -0.015786252915859222, -0.19730237126350403, -0.11677469313144684, 0.025845464318990707, -0.03717504441738129, -0.09151196479797363, -0.15316404402256012, -0.001878984272480011, 0.010064184665679932, -0.12521368265151978, -0.1559506505727768, 0.22262638807296753, -0.22736778855323792, 0.22501961886882782, -0.028081616386771202, 0.16962061822414398, -0.01032571867108345, -0.1488916575908661, 0.22051718831062317, -0.004309933632612228, 0.3989974856376648, 0.36141687631607056, -0.036810994148254395, 0.34965741634368896, 0.4338843524456024, 0.04402497783303261, -0.34692496061325073, 0.196268692612648, 0.27815359830856323, -0.0028441287577152252, 0.3378107249736786, -0.25352048873901367, 0.052116744220256805, 0.2994335889816284, -0.10875735431909561, -0.18525467813014984, 0.04966748133301735, 0.1341562569141388, 0.04466924071311951, 0.002255711704492569, -0.4726813733577728, 0.3072993755340576, 0.03801966458559036, 0.05204063653945923, 0.38578933477401733, -0.00609235092997551, -0.08350392431020737, 0.36808839440345764, -0.1672184020280838, 0.6379013061523438, -0.0358661413192749, 0.1408993899822235, 0.1641717404127121, -0.1343589425086975, 0.06057779863476753, -0.16057078540325165, 0.1240803450345993, -0.19597655534744263, -0.26161015033721924, -0.10559862852096558, -0.05786394327878952, 0.44607242941856384, -0.17681099474430084, -0.01751621812582016, 0.4786818325519562, 0.17558811604976654, 0.3795014023780823, 0.15953397750854492, 0.1960316300392151, -0.10527630895376205, -0.11179390549659729, -0.3926313519477844, 0.14717376232147217, -0.049468617886304855, 0.28622186183929443, -0.006855331361293793, -0.06919892132282257, 0.1348937302827835, 0.03627920150756836, -0.5659937858581543, 0.2842172384262085, -0.35431063175201416, 0.09967575967311859, -0.2458679974079132, -0.11993463337421417, 0.11447733640670776, 0.19070857763290405, -0.12860740721225739, -0.2627702057361603, -0.3999084532260895, 0.13924594223499298, 0.11841781437397003, 0.1555526703596115, -0.029269637539982796, -0.14916692674160004, 0.26136618852615356, -0.1943073272705078, -0.14166046679019928, -0.0977184921503067, -0.37405967712402344, -0.4426170587539673, 0.40492120385169983, -0.06094706803560257, 0.3109181821346283, 0.023393291980028152, -0.04270807281136513, 0.09528356045484543, 0.13296376168727875, -0.12235800921916962, 0.09326206892728806, -0.015429947525262833, -0.22003377974033356, -0.15891169011592865, -0.1205700933933258, -0.12081579864025116, -0.05801767855882645, 0.6441304683685303, -0.20987968146800995, 0.1118435189127922, 0.49260133504867554, 0.010079696774482727, -0.13076220452785492, -0.03331055864691734, -0.09467083215713501, -0.060961052775382996, -0.08420306444168091, -0.10489184409379959, -0.1620483100414276, 0.037999168038368225, 0.03314056247472763, 0.5513266324996948, 0.21807026863098145, -0.12110021710395813, -0.222686305642128, -0.22743824124336243, -0.23007002472877502, 0.04667763411998749, -0.2973124086856842, 0.17318423092365265, -0.20059309899806976, 0.1052861213684082, -0.07103870064020157, -0.0737668126821518, -0.2101207971572876, 0.17735272645950317, 0.13417431712150574, 0.058526355773210526, 0.22197681665420532, 0.03717781975865364, 0.3297363519668579, -0.15508133172988892, -0.02787463180720806, 0.12685002386569977, -0.3293972313404083, -0.08543635904788971, -0.04329456016421318, 0.1697472631931305, 0.43303462862968445, -0.3289082944393158, -0.20004715025424957, -0.23820734024047852, -0.18949607014656067, -0.04356461763381958, 0.04634631425142288, 0.37095022201538086, -0.17770017683506012, 0.1361033022403717, 0.20492427051067352, 0.19262966513633728, -0.05349548161029816, 0.33657488226890564, -0.05908516049385071, 0.1978449523448944, -0.04312123730778694, 0.23123309016227722, 0.06041061133146286, 0.010348021984100342, 0.024502791464328766, -0.07813623547554016, 0.1065622940659523, 0.21841712296009064, 0.3611977696418762, -0.3613712191581726, 0.06827831268310547, 0.13449496030807495, 0.3378280699253082, 0.2175310254096985, -0.001282021403312683, 0.007281802594661713, 0.2579592168331146, 0.13476130366325378, -0.08378726243972778, -0.09998468309640884, 0.09952748566865921, 0.08198396861553192, -0.045857023447752, -0.15462912619113922, 0.5952460765838623, -0.15990552306175232, 0.24283665418624878, 0.11630183458328247, 0.1655643880367279, -0.05656209960579872, 0.3904980719089508, 0.08005618304014206, 0.16534264385700226, 0.23697717487812042, 0.006888462230563164, -0.14428012073040009, -0.010960355401039124, 0.33272385597229004, 0.1313474029302597, 0.2522031366825104, 0.00801301933825016, 0.15299981832504272, -0.1563999205827713, -0.884955644607544, 0.09456397593021393, 0.09232417494058609, -0.16950517892837524, 0.1156214028596878, 0.007598213851451874, 0.5218513607978821, -0.2950558662414551, -0.24546942114830017, -0.15656881034374237, 0.051125381141901016, -0.16988277435302734, -0.2123471200466156, 0.17537492513656616, -0.008316323161125183, 0.0016020089387893677, 0.2093675285577774, -0.025010569021105766, 0.16766031086444855, 0.594763994216919, 0.049644917249679565, -0.24988026916980743, -0.1436341404914856, -0.32274994254112244, 0.32397013902664185, 0.2939494252204895, -0.13403496146202087, 0.4524956941604614, -0.17051440477371216, -0.1540093868970871, 0.20583298802375793, 0.21108050644397736, 0.3020944595336914, 0.22338567674160004, 0.047492217272520065, 0.026226390153169632, 0.11077296733856201, 0.07412763684988022, 0.18713760375976562, 0.3831467926502228, -0.05234370008111, 0.2997841536998749, 0.29431915283203125, 0.024159502238035202, -0.04367612302303314, 0.13026893138885498, -0.1255309134721756, 0.297621488571167, -0.4275321066379547, 0.19571170210838318, -0.08622123301029205, 0.09595087170600891, -0.03678952902555466, 0.13107068836688995, -0.1606156975030899, 0.10914608091115952, 0.5013504028320312, 0.010751426219940186, 0.2353186309337616, 0.08312240242958069, 0.04214301332831383, -0.08376789093017578, 0.1811695396900177, 0.42558786273002625, -0.12616083025932312, -0.27240443229675293, -0.37997639179229736, -0.5623792409896851, 0.09584122896194458, -0.024701260030269623, 0.3434753119945526, 0.013550873845815659, 0.25432461500167847, -0.06207341328263283, -0.08127232640981674, -0.11666591465473175, -0.14407825469970703, -0.053930774331092834, 0.22618889808654785, -0.31707876920700073, 0.03920178860425949, 0.1169949471950531, 0.0533096119761467, -0.0811716839671135, -0.49105340242385864, 0.0668146014213562, 0.062000822275877, -0.035930536687374115, 0.16367347538471222, -0.31221216917037964, -0.09290635585784912, -0.41511306166648865, 0.2658432126045227, 0.02962379716336727, 0.3347160518169403, -0.03302626684308052, -0.2808399796485901, -0.48050984740257263, -0.2886415123939514, -0.20265710353851318, -0.04986526817083359, -0.37213483452796936, 0.611918032169342, -0.17593979835510254, 0.2331913560628891, -0.5175117254257202, 0.290500283241272, -0.1200801283121109, -0.21209032833576202, -0.33678004145622253, 0.2701692581176758, -0.36083003878593445, 0.20306843519210815, -0.07335137575864792, 0.22059515118598938, -0.058390986174345016, 0.024642691016197205, -0.3717082440853119, -0.16606828570365906, 0.5125210285186768, -0.7782444953918457, -0.008217930793762207, -0.0545818991959095, 0.18115222454071045, 0.4228377640247345, -0.17474158108234406, -0.4311305284500122, 0.035608530044555664, 0.23256446421146393, -0.13000713288784027, 0.057795844972133636, 0.06418050825595856, -0.21701809763908386, 0.08958442509174347, -0.10662784427404404, 0.3792791962623596, 0.05276050046086311, -0.067854143679142, 0.15847760438919067, -0.31841298937797546 ]
https://github.com/huggingface/datasets/issues/6330
Thanks for reporting and for the investigation, @ZachNagengast! :hugs: We are investigating the root cause of the issue. In the meantime, we are going to pin fsspec < 2023.10.0.
Latest fsspec==2023.10.0 issue with streaming datasets
### Describe the bug Loading a streaming dataset with this version of fsspec fails with the following error: `NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.` I suspect the issue is with this PR https://github.com/fsspec/filesystem_spec/pull/1381 ### Steps to reproduce the bug 1. Upgrade fsspec to version `2023.10.0` 2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)` 3. Observe the following exception: ``` File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset return builder_instance.as_streaming_dataset(split=split) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset raise NotImplementedError( NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet. ``` ### Expected behavior Should stream the dataset as normal. ### Environment info datasets@main fsspec==2023.10.0
29
Latest fsspec==2023.10.0 issue with streaming datasets ### Describe the bug Loading a streaming dataset with this version of fsspec fails with the following error: `NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.` I suspect the issue is with this PR https://github.com/fsspec/filesystem_spec/pull/1381 ### Steps to reproduce the bug 1. Upgrade fsspec to version `2023.10.0` 2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)` 3. Observe the following exception: ``` File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset return builder_instance.as_streaming_dataset(split=split) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset raise NotImplementedError( NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet. ``` ### Expected behavior Should stream the dataset as normal. ### Environment info datasets@main fsspec==2023.10.0 Thanks for reporting and for the investigation, @ZachNagengast! :hugs: We are investigating the root cause of the issue. In the meantime, we are going to pin fsspec < 2023.10.0.
[ -0.44810670614242554, -0.09368070214986801, 0.07924748212099075, 0.2137065976858139, 0.21421100199222565, -0.08358780294656754, 0.07893026620149612, 0.21099360287189484, -0.11809461563825607, 0.2367476224899292, -0.023853646591305733, 0.15875737369060516, -0.07089647650718689, 0.46412670612335205, 0.03059963509440422, -0.21205388009548187, 0.2052822709083557, 0.14135991036891937, -0.098504938185215, 0.20818549394607544, -0.10977158695459366, 0.32350048422813416, -0.1063677966594696, -0.25390541553497314, -0.0492095947265625, 0.15659908950328827, -0.1270076334476471, 0.15914340317249298, -0.10529445111751556, -0.5379761457443237, 0.37859994173049927, -0.15242567658424377, 0.26420044898986816, 0.4450482726097107, -0.00011717982852132991, 0.03012075275182724, 0.5292683243751526, -0.04327902942895889, -0.1824634075164795, -0.25471630692481995, -0.1401749551296234, -0.2658143639564514, -0.01039762794971466, 0.2361624389886856, -0.2942394018173218, -0.24960781633853912, 0.018354976549744606, -0.7414255142211914, 0.2996397912502289, 0.36149168014526367, 0.19277001917362213, 0.17620815336704254, -0.01550319790840149, -0.01132478192448616, 0.22864072024822235, -0.18591947853565216, -0.20727702975273132, -0.1998482495546341, 0.1732819825410843, -0.12599149346351624, -0.2115584760904312, 0.17137999832630157, 0.049385957419872284, 0.09911105036735535, 0.3646945655345917, -0.22645623981952667, -0.06619367003440857, -0.34872835874557495, 0.13197925686836243, 0.24989554286003113, 0.6511350870132446, 0.021628806367516518, -0.5666759014129639, -0.07337412238121033, -0.11194079369306564, -0.5156792998313904, 0.2898663878440857, 0.03920585662126541, -0.03662366047501564, 0.06702625751495361, -0.023963896557688713, -0.06193217635154724, -0.12389716506004333, 0.18781119585037231, 0.11634331196546555, -0.09902280569076538, -0.09841254353523254, 0.004075990989804268, 0.06254442036151886, -0.181086003780365, 0.24782072007656097, -0.23544391989707947, 0.008994188159704208, 0.2563391625881195, -0.5381744503974915, 0.09521330893039703, 0.11169199645519257, 0.2097226232290268, -0.2278304100036621, 0.25589048862457275, -0.1111900806427002, 0.06694871187210083, -0.13325493037700653, 0.034706614911556244, 0.17961560189723969, 0.20874139666557312, 0.14979685842990875, 0.022676430642604828, 0.1267375648021698, 0.18140935897827148, -0.04421660676598549, -0.21547655761241913, 0.06920069456100464, -0.14855536818504333, -0.19074101746082306, 0.06294520199298859, 0.20420095324516296, -0.4562034010887146, -0.19032198190689087, 0.10434219241142273, -0.08954227715730667, 0.008000936359167099, -0.030652502551674843, 0.33718177676200867, -0.05699252709746361, 0.7201945185661316, -0.022543907165527344, 0.0366089753806591, -0.19467388093471527, -0.25852423906326294, -0.24080073833465576, -0.14814314246177673, -0.09926696121692657, 0.27426329255104065, 0.2776361107826233, -0.7539952397346497, 0.24838733673095703, -0.23003152012825012, -0.12315914779901505, 0.06106415390968323, -0.08282038569450378, -0.15553461015224457, 0.149051696062088, 0.40593981742858887, -0.2690991461277008, 0.10653865337371826, 0.049261949956417084, 0.20331446826457977, -0.04880330711603165, 0.1407935470342636, 0.0053594671189785, -0.46842217445373535, -0.07527581602334976, 0.129104346036911, -0.16087062656879425, -0.189226895570755, -0.3178161084651947, 0.12239275872707367, -0.03682253509759903, -0.28327643871307373, -0.08190926909446716, -0.12345340847969055, -0.6482999920845032, -0.12459941953420639, 0.23742035031318665, 0.4611906111240387, -0.40110257267951965, -0.16172993183135986, -0.4000856280326843, -0.0626215785741806, 0.3654695749282837, 0.1977037787437439, -0.10084083676338196, -0.14067739248275757, -0.1754692643880844, 0.1348429024219513, -0.014809571206569672, -0.2658517360687256, -0.4673650860786438, 0.47375738620758057, 0.02545216679573059, 0.35856491327285767, 0.19723278284072876, -0.09882602840662003, 0.2299724817276001, -0.08946666121482849, 0.14708133041858673, 0.26304906606674194, -0.13632962107658386, 0.0561293289065361, -0.3431510031223297, -0.3742593228816986, 0.2181311547756195, 0.19448167085647583, 0.17593100666999817, 0.23274333775043488, 0.12635748088359833, 0.038676917552948, 0.27823406457901, 0.0007526017725467682, 0.14365741610527039, 0.19707177579402924, 0.6562775373458862, 0.09269608557224274, 0.01606408879160881, -0.32676002383232117, -0.3859737515449524, 0.3527902066707611, 0.1671009063720703, -0.11012056469917297, 0.3926186263561249, -0.006907723844051361, 0.063569076359272, -0.05960859730839729, -0.2015729695558548, -0.2331731617450714, 0.021631646901369095, 0.26105767488479614, 0.05729169398546219, -0.03681236878037453, -0.3181462287902832, 0.3802953362464905, -0.19746920466423035, -0.1527005434036255, -0.2374701201915741, 0.3246794641017914, 0.032568320631980896, -0.24210789799690247, 0.029700681567192078, 0.11256382614374161, 0.3309875428676605, -0.07007238268852234, -0.23827794194221497, 0.4196646809577942, 0.3831808567047119, 0.3010978698730469, -0.2776264548301697, 0.32880645990371704, 0.26196303963661194, -0.30109140276908875, -0.06328941881656647, 0.43861547112464905, 0.09080055356025696, 0.017689108848571777, 0.09887702763080597, 0.215287983417511, 0.1458321511745453, 0.18680346012115479, 0.14196227490901947, -0.07856670022010803, 0.2721201181411743, 0.12892816960811615, -0.06727378070354462, -0.10570849478244781, 0.43314027786254883, -0.2899330258369446, 0.3198045492172241, -0.0857715755701065, -0.27714115381240845, 0.03672738000750542, 0.13600203394889832, 0.06568163633346558, -0.418744295835495, 0.17539888620376587, -0.263994038105011, -0.21480995416641235, 0.5820028781890869, 0.27462834119796753, 0.5471709370613098, 0.17380303144454956, -0.048885393887758255, 0.19201095402240753, 0.22755371034145355, -0.15382763743400574, 0.24654659628868103, -0.10607568919658661, 0.05148551985621452, 0.32174044847488403, 0.19875995814800262, 0.183966264128685, -0.29335010051727295, -0.028370805084705353, -0.02591538056731224, 0.19860567152500153, -0.318895161151886, -0.021297838538885117, -0.41199421882629395, -0.2940559983253479, -0.1953992396593094, 0.14327923953533173, 0.007649069651961327, -0.2270699143409729, -0.11563470959663391, 0.6487445831298828, -0.13548652827739716, 0.18075865507125854, -0.21477459371089935, 0.32992076873779297, -0.05544181913137436, 0.009043989703059196, -0.28231650590896606, 0.18052509427070618, -0.30060356855392456, 0.014543801546096802, 0.35018640756607056, -0.17744103074073792, 0.0654611736536026, 0.07578498870134354, -0.03270673379302025, -0.45985883474349976, -0.27600163221359253, 0.13882483541965485, 0.03889521211385727, 0.3692384362220764, -0.10206815600395203, 0.08538463711738586, 0.24188821017742157, -0.16497191786766052, 0.03464199975132942, -0.5426011085510254, -0.22517713904380798, 0.038992881774902344, -0.11320339143276215, 0.1586877852678299, -0.1691591888666153, -0.32661449909210205, -0.33324891328811646, -0.47843605279922485, 0.31075650453567505, -0.19436094164848328, 0.05577278137207031, 0.3080626428127289, -0.024751581251621246, -0.05133390799164772, -0.059806935489177704, -0.2509228587150574, -0.21003305912017822, -0.36664530634880066, 0.14064323902130127, -0.2147069126367569, -0.4874897599220276, 0.0732094943523407, 0.2712947130203247, -0.10787996649742126, 0.112822026014328, -0.4023782014846802, 0.0529034286737442, -0.23406147956848145, 0.06111358851194382, -0.05404515936970711, -0.2173350751399994, 0.34337541460990906, -0.12126810848712921, -0.06564462929964066, -0.2291199266910553, -0.20586366951465607, -0.050054363906383514, 0.2859983742237091, 0.21852438151836395, 0.03163512423634529, 0.21160981059074402, 0.15817387402057648, 0.6121025085449219, 0.4086155593395233, -0.10076959431171417, 0.6090866923332214, 0.089047871530056, 0.32648709416389465, -0.2796614170074463, -0.15081627666950226, -0.03912697732448578, -0.13491679728031158, -0.16232122480869293, 0.21750986576080322, 0.16049054265022278, -0.2757266163825989, -0.12557893991470337, 0.09473462402820587, -0.0138164684176445, -0.0035951510071754456, 0.011488238349556923, -0.358572393655777, 0.3665645122528076, -0.00534047931432724, 0.11151796579360962, 0.08630359172821045, -0.2853054404258728, 0.04631168767809868, 0.22402307391166687, 0.2960354685783386, 0.10694053769111633, -0.045188456773757935, -0.12386370450258255, -0.5207443833351135, 0.16186952590942383, 0.15514418482780457, 0.6686158180236816, -0.39034709334373474, -0.11512677371501923, 0.044943660497665405, -0.017942223697900772, 0.1939420849084854, -0.39833077788352966, 0.2380746603012085, 0.26575618982315063, -0.13215649127960205, -0.14094054698944092, -0.17959487438201904, 0.0756431445479393, -0.07350403070449829, -0.05545742064714432, 0.5335026383399963, -0.014277026057243347, -0.18681484460830688, -0.11485458165407181, 0.03471076488494873, -0.06382474303245544, -0.11586011946201324, -0.17804279923439026, 0.0074785202741622925, -0.03262704983353615, -0.13540785014629364, -0.14510539174079895, 0.2125188708305359, -0.29285097122192383, 0.16180089116096497, -0.04337373748421669, 0.1497831493616104, -0.016565725207328796, -0.16332213580608368, 0.22144722938537598, 0.021935850381851196, 0.38551026582717896, 0.3761212229728699, 0.01267886534333229, 0.3253209888935089, 0.44463443756103516, 0.04827229306101799, -0.32564252614974976, 0.19858211278915405, 0.2907969057559967, 0.029913801699876785, 0.3357551097869873, -0.234595388174057, 0.07568604499101639, 0.28958624601364136, -0.06309466809034348, -0.22238565981388092, 0.11534491926431656, 0.13816021382808685, 0.02769555151462555, -0.01830548793077469, -0.49324071407318115, 0.3760913014411926, 0.03061714768409729, 0.030451178550720215, 0.38925912976264954, -0.014256022870540619, -0.085279181599617, 0.39624476432800293, -0.15569761395454407, 0.6812562942504883, -0.03353995084762573, 0.13979756832122803, 0.1758318543434143, -0.06852822005748749, 0.08221358060836792, -0.22233833372592926, 0.15540574491024017, -0.21283870935440063, -0.28609713912010193, -0.07560228556394577, -0.03681723028421402, 0.4290091395378113, -0.18704922497272491, -0.04834075644612312, 0.4698335528373718, 0.1623603105545044, 0.36554428935050964, 0.14681343734264374, 0.22304993867874146, -0.12980149686336517, -0.13462945818901062, -0.4147048890590668, 0.20618540048599243, -0.036233507096767426, 0.27175071835517883, -0.002169586718082428, -0.05920655280351639, 0.1717933863401413, 0.02112443745136261, -0.5300594568252563, 0.30368971824645996, -0.39363372325897217, 0.10018250346183777, -0.26255807280540466, -0.09420027583837509, 0.012727290391921997, 0.21763241291046143, -0.15313124656677246, -0.21277904510498047, -0.3985860049724579, 0.16401036083698273, 0.12083041667938232, 0.13100233674049377, -0.05977839231491089, -0.17399822175502777, 0.3024160861968994, -0.19832801818847656, -0.14264944195747375, -0.02687554433941841, -0.30394962430000305, -0.4688967168331146, 0.3855571448802948, -0.08763502538204193, 0.3263613283634186, 0.034459758549928665, -0.06181934475898743, 0.10973644256591797, 0.10085481405258179, -0.12744124233722687, 0.13925686478614807, -0.015359848737716675, -0.22064833343029022, -0.16252318024635315, -0.09961983561515808, -0.12480058521032333, -0.08300220966339111, 0.6202816367149353, -0.1791907101869583, 0.1371915489435196, 0.4982379674911499, 0.04465113580226898, -0.14218856394290924, -0.08786098659038544, -0.08959423750638962, -0.020606858655810356, -0.08843787014484406, -0.11872784793376923, -0.11232861876487732, 0.04227818548679352, 0.06466251611709595, 0.5600360631942749, 0.1661837249994278, -0.1649348884820938, -0.23319481313228607, -0.2322894185781479, -0.23574751615524292, 0.05413847044110298, -0.2945276200771332, 0.20385026931762695, -0.17635929584503174, 0.08117860555648804, -0.07393448799848557, -0.057921916246414185, -0.273267924785614, 0.1434738039970398, 0.1194920465350151, 0.028763756155967712, 0.160562202334404, 0.030690262094140053, 0.3942522406578064, -0.12866149842739105, 0.019439704716205597, 0.1374356597661972, -0.3323943614959717, -0.14230234920978546, -0.026975587010383606, 0.15015877783298492, 0.42266133427619934, -0.29160189628601074, -0.22371593117713928, -0.21267130970954895, -0.16223160922527313, -0.06524968147277832, 0.04577338695526123, 0.34721073508262634, -0.16957037150859833, 0.13534574210643768, 0.2013847529888153, 0.19578155875205994, -0.016686998307704926, 0.28876203298568726, -0.05486958473920822, 0.21661297976970673, -0.03734995052218437, 0.1681116819381714, 0.057442422956228256, 0.021042950451374054, 0.0510057769715786, -0.08824008703231812, 0.13065285980701447, 0.24555020034313202, 0.34189146757125854, -0.3434304893016815, 0.01028396189212799, 0.1387096345424652, 0.3268248438835144, 0.2152610570192337, -0.004645340144634247, 0.003456488251686096, 0.24551478028297424, 0.1931445598602295, -0.08929997682571411, -0.07400734722614288, 0.09457400441169739, 0.06700926274061203, -0.038007039576768875, -0.1867586076259613, 0.529487669467926, -0.1719810962677002, 0.24984049797058105, 0.13615217804908752, 0.12763568758964539, -0.09083442389965057, 0.380115807056427, 0.03961503505706787, 0.1744355857372284, 0.19033101201057434, -0.005908996798098087, -0.14465637505054474, 0.026940923184156418, 0.33257079124450684, 0.10928107053041458, 0.2619296610355377, 0.030660167336463928, 0.12001370638608932, -0.14383924007415771, -0.8715800046920776, 0.11054138094186783, 0.07804898917675018, -0.21262353658676147, 0.15323418378829956, -0.0010998621582984924, 0.51142817735672, -0.27360033988952637, -0.22850006818771362, -0.17526517808437347, 0.03893611207604408, -0.1601049154996872, -0.2234008014202118, 0.15792135894298553, 0.009208545088768005, -0.029875896871089935, 0.21716664731502533, -0.02061193622648716, 0.12999610602855682, 0.5386744737625122, 0.05864877998828888, -0.27919670939445496, -0.1696767956018448, -0.3412119448184967, 0.3217211663722992, 0.3009418249130249, -0.14973413944244385, 0.45300424098968506, -0.13234877586364746, -0.1522497683763504, 0.1876952350139618, 0.2009335160255432, 0.28054043650627136, 0.19235454499721527, -0.003806915134191513, 0.06228752061724663, 0.1085466742515564, 0.06309372931718826, 0.14529457688331604, 0.38107576966285706, -0.03135891258716583, 0.2907739281654358, 0.2992224395275116, 0.0881376564502716, -0.09856174141168594, 0.15089018642902374, -0.13164831697940826, 0.33775678277015686, -0.43338868021965027, 0.21194547414779663, -0.042822644114494324, 0.12911295890808105, -0.06526891142129898, 0.1232069730758667, -0.21209599077701569, 0.10281597077846527, 0.5109878778457642, -0.004373829811811447, 0.2235621213912964, 0.018049780279397964, 0.07624411582946777, -0.09785112738609314, 0.2176811844110489, 0.41954517364501953, -0.11579261720180511, -0.23042508959770203, -0.33900612592697144, -0.5693966746330261, 0.10585103929042816, -0.012432578951120377, 0.3593866229057312, -0.050463031977415085, 0.24152401089668274, -0.03811194747686386, -0.028490755707025528, -0.1532088816165924, -0.15580399334430695, -0.014123328030109406, 0.20215599238872528, -0.3033559322357178, 0.050290368497371674, 0.09074484556913376, 0.0745345801115036, -0.07675342261791229, -0.5045338869094849, 0.0602741576731205, -0.025225184857845306, 0.02190348505973816, 0.14417338371276855, -0.33323007822036743, -0.07865586131811142, -0.40177279710769653, 0.3382132053375244, 0.03689347207546234, 0.2717280089855194, -0.09218555688858032, -0.29075855016708374, -0.46474528312683105, -0.28072455525398254, -0.23144711554050446, -0.08977876603603363, -0.37347057461738586, 0.6374226808547974, -0.17132404446601868, 0.21967992186546326, -0.49586600065231323, 0.271553635597229, -0.104359470307827, -0.24061334133148193, -0.3207140862941742, 0.25026291608810425, -0.3413340449333191, 0.19539378583431244, -0.08662983775138855, 0.26449456810951233, -0.06342785060405731, 0.036386601626873016, -0.3488304913043976, -0.2075326144695282, 0.5230141282081604, -0.7888439893722534, 0.0042268335819244385, -0.0754704549908638, 0.22628998756408691, 0.4372992515563965, -0.1400374323129654, -0.4345303475856781, 0.0715467631816864, 0.24320727586746216, -0.08722957223653793, 0.06312112510204315, 0.1005437970161438, -0.24087563157081604, 0.09747040271759033, -0.10897617787122726, 0.378132164478302, 0.09869245439767838, -0.053096190094947815, 0.17934730648994446, -0.3244710862636566 ]
https://github.com/huggingface/datasets/issues/6330
You can also update `datasets`: ``` pip install -U datasets ``` It will also update `fsspec` to use the right version
Latest fsspec==2023.10.0 issue with streaming datasets
### Describe the bug Loading a streaming dataset with this version of fsspec fails with the following error: `NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.` I suspect the issue is with this PR https://github.com/fsspec/filesystem_spec/pull/1381 ### Steps to reproduce the bug 1. Upgrade fsspec to version `2023.10.0` 2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)` 3. Observe the following exception: ``` File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset return builder_instance.as_streaming_dataset(split=split) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset raise NotImplementedError( NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet. ``` ### Expected behavior Should stream the dataset as normal. ### Environment info datasets@main fsspec==2023.10.0
21
Latest fsspec==2023.10.0 issue with streaming datasets ### Describe the bug Loading a streaming dataset with this version of fsspec fails with the following error: `NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.` I suspect the issue is with this PR https://github.com/fsspec/filesystem_spec/pull/1381 ### Steps to reproduce the bug 1. Upgrade fsspec to version `2023.10.0` 2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)` 3. Observe the following exception: ``` File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset return builder_instance.as_streaming_dataset(split=split) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset raise NotImplementedError( NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet. ``` ### Expected behavior Should stream the dataset as normal. ### Environment info datasets@main fsspec==2023.10.0 You can also update `datasets`: ``` pip install -U datasets ``` It will also update `fsspec` to use the right version
[ -0.48434990644454956, -0.09176057577133179, 0.06091972813010216, 0.20084726810455322, 0.20000611245632172, -0.06782572716474533, 0.050473786890506744, 0.2100011259317398, -0.0857999175786972, 0.21352194249629974, -0.019064685329794884, 0.21504412591457367, -0.056027695536613464, 0.46829530596733093, 0.014260850846767426, -0.22754600644111633, 0.20692861080169678, 0.1467081904411316, -0.12188851833343506, 0.19807636737823486, -0.07931679487228394, 0.33746302127838135, -0.08738096058368683, -0.2339366376399994, -0.00830216333270073, 0.12171286344528198, -0.08224258571863174, 0.12612223625183105, -0.15082544088363647, -0.5611511468887329, 0.3610004186630249, -0.1482906937599182, 0.262500137090683, 0.47979864478111267, -0.00011638274736469612, 0.03299210965633392, 0.5327140688896179, -0.03815527632832527, -0.174279123544693, -0.31198805570602417, -0.12277807295322418, -0.3416195511817932, -0.01917235739529133, 0.21221531927585602, -0.26692599058151245, -0.23179778456687927, 0.03338675945997238, -0.7294564843177795, 0.3241206705570221, 0.38108906149864197, 0.20282116532325745, 0.17856204509735107, 0.03204485774040222, -0.013156400993466377, 0.24900993704795837, -0.227889746427536, -0.21725086867809296, -0.1935032308101654, 0.15472127497196198, -0.10368102788925171, -0.13277672231197357, 0.2161020040512085, 0.02608170360326767, 0.11416584253311157, 0.36258232593536377, -0.22951777279376984, -0.0276813805103302, -0.36638468503952026, 0.1264951527118683, 0.234572634100914, 0.6261738538742065, -0.004189893137663603, -0.6016446352005005, -0.06839115172624588, -0.10616856068372726, -0.510971188545227, 0.260953813791275, 0.058816105127334595, -0.05297001823782921, 0.0749303549528122, -0.0018303245306015015, -0.09819478541612625, -0.11586940288543701, 0.19629940390586853, 0.09648597240447998, -0.0670219361782074, -0.11224336177110672, 0.008326655253767967, 0.08715979754924774, -0.2023792564868927, 0.2545793056488037, -0.20616619288921356, 0.0058976467698812485, 0.26847997307777405, -0.506698489189148, 0.11614002287387848, 0.1249847412109375, 0.22781653702259064, -0.23415610194206238, 0.25438055396080017, -0.11619748175144196, 0.05104745924472809, -0.12415912002325058, 0.04174073040485382, 0.18522274494171143, 0.1997588872909546, 0.11614909768104553, 0.06573580950498581, 0.1345050185918808, 0.18949751555919647, -0.010664582252502441, -0.20517559349536896, 0.06072237342596054, -0.1807670295238495, -0.20266193151474, 0.06978560239076614, 0.2145046889781952, -0.43327629566192627, -0.21050405502319336, 0.0830664336681366, -0.029567576944828033, 0.001231703907251358, -0.04949601739645004, 0.3319641947746277, -0.09278871864080429, 0.7111824154853821, -0.015595123171806335, 0.03193814679980278, -0.22314783930778503, -0.2293797731399536, -0.23675912618637085, -0.13154202699661255, -0.06570462882518768, 0.22065210342407227, 0.26289936900138855, -0.7786650061607361, 0.30735430121421814, -0.24338048696517944, -0.14449580013751984, 0.08432188630104065, -0.09584052115678787, -0.16751964390277863, 0.09208400547504425, 0.4311050474643707, -0.24310028553009033, 0.11871381103992462, 0.055192600935697556, 0.18070249259471893, -0.06291716545820236, 0.13380402326583862, -0.012817863374948502, -0.4533948600292206, -0.09431029111146927, 0.12886516749858856, -0.14095793664455414, -0.1997486650943756, -0.3496071398258209, 0.08486238121986389, -0.012570876628160477, -0.3132980465888977, -0.11683626472949982, -0.15684109926223755, -0.6000067591667175, -0.1274697482585907, 0.24374696612358093, 0.41697150468826294, -0.3856107294559479, -0.1686682403087616, -0.42190468311309814, -0.05336003750562668, 0.3705427050590515, 0.1949777603149414, -0.06980504840612411, -0.09976056218147278, -0.14242666959762573, 0.09836705029010773, 0.04534812271595001, -0.3307364881038666, -0.49112460017204285, 0.44568705558776855, 0.05946087837219238, 0.3331089913845062, 0.19446754455566406, -0.10505937784910202, 0.2504763603210449, -0.05315365642309189, 0.1387150138616562, 0.22443701326847076, -0.1349879950284958, 0.03599364310503006, -0.3371434211730957, -0.3769385814666748, 0.20798298716545105, 0.20854169130325317, 0.1799149066209793, 0.189273864030838, 0.11884497106075287, 0.038602206856012344, 0.2675640881061554, 0.022395268082618713, 0.12701401114463806, 0.21574851870536804, 0.6736176609992981, 0.11331608146429062, -0.005984079092741013, -0.3454289436340332, -0.34330666065216064, 0.3310135304927826, 0.14497080445289612, -0.10992926359176636, 0.3233247995376587, -0.007380887866020203, 0.020919471979141235, -0.07296714186668396, -0.17836692929267883, -0.23288142681121826, 0.033201150596141815, 0.25970739126205444, 0.08248573541641235, -0.037354957312345505, -0.30247679352760315, 0.397278755903244, -0.17569798231124878, -0.13161930441856384, -0.2457052767276764, 0.30878520011901855, -0.024160820990800858, -0.249026358127594, 0.040838927030563354, 0.13262300193309784, 0.32461318373680115, -0.08094996958971024, -0.22040283679962158, 0.44919541478157043, 0.372585654258728, 0.27394092082977295, -0.28873559832572937, 0.31299567222595215, 0.2712653577327728, -0.27457502484321594, -0.06403634697198868, 0.4519069492816925, 0.0706978589296341, 0.06603172421455383, 0.1062283143401146, 0.16395829617977142, 0.09773752093315125, 0.17251981794834137, 0.14133822917938232, -0.05209457129240036, 0.2909730076789856, 0.1722436547279358, -0.07540898025035858, -0.10448747873306274, 0.4316903352737427, -0.28112632036209106, 0.3274773359298706, -0.13073667883872986, -0.2471104860305786, 0.03454265743494034, 0.13590273261070251, 0.10420073568820953, -0.40689197182655334, 0.1364859938621521, -0.24136768281459808, -0.18709701299667358, 0.5593333840370178, 0.28947630524635315, 0.5281248092651367, 0.19117039442062378, -0.05960451066493988, 0.1963239312171936, 0.19625887274742126, -0.11949700117111206, 0.2369985282421112, -0.10763648897409439, 0.018941093236207962, 0.32295021414756775, 0.17694838345050812, 0.17756584286689758, -0.2456100881099701, -0.04236322268843651, -0.05729169771075249, 0.22189871966838837, -0.30097106099128723, -0.018810197710990906, -0.40741467475891113, -0.27139657735824585, -0.19053764641284943, 0.13404077291488647, 0.02026035636663437, -0.2312421202659607, -0.11827617138624191, 0.6601524353027344, -0.11968410015106201, 0.2093420922756195, -0.21015289425849915, 0.28625765442848206, -0.03415849059820175, 0.0024387799203395844, -0.24950073659420013, 0.14663729071617126, -0.3117341995239258, 0.009439896792173386, 0.3208416998386383, -0.14425350725650787, 0.0842522606253624, 0.012002825736999512, -0.03568338602781296, -0.47248801589012146, -0.27165594696998596, 0.14659637212753296, -0.0028529628179967403, 0.42250242829322815, -0.05313616245985031, 0.1058194637298584, 0.24169670045375824, -0.13915644586086273, 0.050932370126247406, -0.5317234992980957, -0.19088706374168396, 0.006961725652217865, -0.11717208474874496, 0.1202838346362114, -0.16135433316230774, -0.36231571435928345, -0.36956658959388733, -0.49347978830337524, 0.2925713360309601, -0.15399645268917084, 0.053550515323877335, 0.29700031876564026, 0.022784680128097534, -0.06554954499006271, -0.051462799310684204, -0.22679704427719116, -0.1971045881509781, -0.351621150970459, 0.1672767549753189, -0.2368720918893814, -0.4960740804672241, 0.09047874808311462, 0.28296640515327454, -0.05247609317302704, 0.0942898839712143, -0.4154856204986572, 0.018064554780721664, -0.23156879842281342, 0.08669588714838028, -0.060811229050159454, -0.13144341111183167, 0.35505783557891846, -0.10784642398357391, -0.06305328011512756, -0.24836421012878418, -0.19691920280456543, -0.07183191180229187, 0.25316354632377625, 0.2417302429676056, 0.039469003677368164, 0.22938990592956543, 0.15384282171726227, 0.6342644691467285, 0.43870973587036133, -0.08734969049692154, 0.5622298717498779, 0.049966342747211456, 0.3564545214176178, -0.2557436525821686, -0.17998090386390686, -0.0648089125752449, -0.13585682213306427, -0.14254018664360046, 0.20373466610908508, 0.16135895252227783, -0.25017601251602173, -0.13899247348308563, 0.12977322936058044, -0.031424835324287415, -0.010813266038894653, -0.024468975141644478, -0.3494744300842285, 0.40684884786605835, 0.03366664797067642, 0.12377297133207321, 0.039677694439888, -0.26605314016342163, 0.059925325214862823, 0.21560245752334595, 0.24203303456306458, 0.1408105492591858, -0.04180832579731941, -0.17592881619930267, -0.5400558114051819, 0.1646343618631363, 0.15419691801071167, 0.6549440622329712, -0.3581658601760864, -0.08803912997245789, 0.019901713356375694, -0.022850774228572845, 0.1789063811302185, -0.41686999797821045, 0.21536052227020264, 0.25737810134887695, -0.08378951996564865, -0.19902315735816956, -0.19502192735671997, 0.06294290721416473, -0.07021132111549377, -0.051803432404994965, 0.5207062363624573, -0.06729192286729813, -0.197365403175354, -0.075106680393219, 0.040923185646533966, -0.04690856859087944, -0.0569218173623085, -0.20053961873054504, -0.03954099118709564, -0.05481955036520958, -0.14798903465270996, -0.12880903482437134, 0.22305648028850555, -0.2612190246582031, 0.19670574367046356, -0.03518916293978691, 0.15884090960025787, -0.016235969960689545, -0.12069521099328995, 0.2705780863761902, 0.0012534558773040771, 0.3630921244621277, 0.36944690346717834, -0.00891856849193573, 0.3136727511882782, 0.5019348859786987, 0.03622281178832054, -0.3438156247138977, 0.14789000153541565, 0.28842031955718994, 0.003992006182670593, 0.28717002272605896, -0.2379077672958374, 0.04561673477292061, 0.2803040146827698, -0.04522914066910744, -0.17606589198112488, 0.14437836408615112, 0.1710730493068695, 0.04676158353686333, -0.016235090792179108, -0.5176830887794495, 0.377885103225708, 0.07042069733142853, 0.04129134118556976, 0.37593215703964233, -0.0007541105151176453, -0.08480150997638702, 0.38309985399246216, -0.17845562100410461, 0.664103090763092, 0.0006959279999136925, 0.14471067488193512, 0.20346428453922272, -0.09640274941921234, 0.08080489933490753, -0.24885490536689758, 0.13032439351081848, -0.19441670179367065, -0.25687170028686523, -0.07121443748474121, -0.00838044285774231, 0.4140816628932953, -0.1918184906244278, -0.08319095522165298, 0.499055951833725, 0.21105614304542542, 0.3580445647239685, 0.13491041958332062, 0.20853012800216675, -0.1419939249753952, -0.12080124765634537, -0.4183426797389984, 0.21601927280426025, -0.04432941973209381, 0.2721586525440216, -0.015869326889514923, -0.04557511955499649, 0.14259004592895508, -0.012725003063678741, -0.5357619524002075, 0.24940750002861023, -0.41914185881614685, 0.12001465260982513, -0.27007636427879333, -0.10815048217773438, -0.014757446944713593, 0.21277932822704315, -0.13812793791294098, -0.16293874382972717, -0.3876001238822937, 0.16372516751289368, 0.10342130064964294, 0.08609533309936523, -0.04425175487995148, -0.12715071439743042, 0.25399529933929443, -0.20424440503120422, -0.14001700282096863, -0.004493305459618568, -0.3360663056373596, -0.43406862020492554, 0.41711780428886414, -0.08449074625968933, 0.28456348180770874, 0.03144252672791481, -0.06063702702522278, 0.10800324380397797, 0.1283554583787918, -0.12904226779937744, 0.14460182189941406, -0.006696907803416252, -0.2191143035888672, -0.10723463445901871, -0.10632921010255814, -0.1225009635090828, -0.099981889128685, 0.5863711833953857, -0.20586521923542023, 0.13697406649589539, 0.5103797912597656, 0.017499156296253204, -0.14509892463684082, -0.0826447457075119, -0.10687518864870071, -0.07579518854618073, -0.0835661068558693, -0.1018509641289711, -0.12718801200389862, 0.016753986477851868, 0.06717076897621155, 0.5787923336029053, 0.19538427889347076, -0.16394543647766113, -0.20844894647598267, -0.22120967507362366, -0.22493872046470642, 0.10343122482299805, -0.2695172429084778, 0.204976886510849, -0.1410350501537323, 0.07682419568300247, -0.10120528936386108, -0.08027742803096771, -0.27826499938964844, 0.13722749054431915, 0.12403780966997147, 0.0544741116464138, 0.1861635446548462, 0.0407731868326664, 0.36068975925445557, -0.13104218244552612, 0.030487902462482452, 0.12102732062339783, -0.35270458459854126, -0.15934571623802185, -0.043528806418180466, 0.14188528060913086, 0.4073660969734192, -0.29635804891586304, -0.1794809103012085, -0.20682404935359955, -0.16488227248191833, -0.07397446036338806, 0.054279766976833344, 0.3404961824417114, -0.15558330714702606, 0.1612229198217392, 0.18592692911624908, 0.18741737306118011, 0.016859620809555054, 0.30085262656211853, -0.05331113934516907, 0.20659521222114563, -0.025105144828557968, 0.22129486501216888, 0.0798700749874115, 0.017824620008468628, 0.054255690425634384, -0.1038534939289093, 0.16306161880493164, 0.24225813150405884, 0.3608838617801666, -0.37666288018226624, 0.06281585991382599, 0.16582462191581726, 0.33028513193130493, 0.24566178023815155, -0.010344482958316803, 0.0011593028903007507, 0.2573104500770569, 0.2019130289554596, -0.12520813941955566, -0.06097766011953354, 0.06765580922365189, 0.054280899465084076, 0.0005431845784187317, -0.18021999299526215, 0.5345442295074463, -0.1479857712984085, 0.25159114599227905, 0.1510283499956131, 0.14971530437469482, -0.09784069657325745, 0.3993598222732544, 0.050904203206300735, 0.1747315526008606, 0.17298851907253265, -0.028723234310746193, -0.1477176547050476, -0.00046743452548980713, 0.36958029866218567, 0.0888034999370575, 0.2419622540473938, 0.0692484974861145, 0.1249563917517662, -0.16433122754096985, -0.8224502801895142, 0.06681011617183685, 0.018911927938461304, -0.20032340288162231, 0.13611359894275665, 0.014907585456967354, 0.4948978126049042, -0.29040318727493286, -0.24224886298179626, -0.1831471174955368, 0.04573171213269234, -0.1491384655237198, -0.25988200306892395, 0.16050325334072113, 0.012972459197044373, -0.036730483174324036, 0.2011459320783615, 0.0031518531031906605, 0.11056962609291077, 0.49179020524024963, 0.062170546501874924, -0.2731432318687439, -0.22311672568321228, -0.33273932337760925, 0.3064208924770355, 0.28858834505081177, -0.13397012650966644, 0.47021955251693726, -0.11429402232170105, -0.18707908689975739, 0.13862022757530212, 0.2358119934797287, 0.34432438015937805, 0.1824323832988739, -0.003447992727160454, 0.041753895580768585, 0.07623812556266785, 0.06160712242126465, 0.13459815084934235, 0.3637302815914154, -0.037153422832489014, 0.2974911034107208, 0.2836379408836365, 0.09611797332763672, -0.10789395868778229, 0.13000796735286713, -0.15518075227737427, 0.31281977891921997, -0.43169844150543213, 0.23560476303100586, -0.07869449257850647, 0.13283267617225647, -0.07232959568500519, 0.11971095204353333, -0.24535158276557922, 0.12442556023597717, 0.5188126564025879, 0.036980703473091125, 0.21597729623317719, -0.003757115453481674, 0.07962818443775177, -0.10739995539188385, 0.21122905611991882, 0.42129868268966675, -0.0638861358165741, -0.21458765864372253, -0.34510260820388794, -0.5765061378479004, 0.07741668820381165, -0.06921926140785217, 0.3068581819534302, -0.05920521914958954, 0.21238112449645996, -0.05257648602128029, 0.004055448807775974, -0.10255981981754303, -0.16747641563415527, 0.007931366562843323, 0.22782456874847412, -0.29004210233688354, 0.03841676935553551, 0.03491998463869095, 0.09043754637241364, -0.04988358914852142, -0.502857506275177, 0.021495291963219643, -0.03468106687068939, 0.029903963208198547, 0.1466779112815857, -0.3357505798339844, -0.07527272403240204, -0.44175171852111816, 0.3350403606891632, 0.03648507595062256, 0.2722657322883606, -0.08073052763938904, -0.30225318670272827, -0.5049737691879272, -0.2782208323478699, -0.25245532393455505, -0.04488908499479294, -0.36788511276245117, 0.6341800689697266, -0.19883456826210022, 0.19019006192684174, -0.4963183104991913, 0.2918615937232971, -0.08506956696510315, -0.2568763196468353, -0.3006390333175659, 0.22680604457855225, -0.30370086431503296, 0.19626650214195251, -0.09957711398601532, 0.23997072875499725, -0.07001708447933197, 0.07189053297042847, -0.3382681608200073, -0.22462065517902374, 0.528616189956665, -0.7775408625602722, 0.0012589991092681885, -0.06544936448335648, 0.2195480316877365, 0.4489215910434723, -0.16143493354320526, -0.430359810590744, 0.08905713260173798, 0.22655947506427765, -0.10673925280570984, 0.055695705115795135, 0.09234173595905304, -0.22203387320041656, 0.10241983830928802, -0.10408078134059906, 0.4095873534679413, 0.06279419362545013, -0.061189204454422, 0.18695473670959473, -0.3115336298942566 ]
https://github.com/huggingface/datasets/issues/6327
You can clone the `togethercomputer/RedPajama-Data-1T-Sample` repo and load the dataset with `load_dataset("path/to/cloned_repo")` to use it offline.
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
### Describe the bug Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs. ### Steps to reproduce the bug I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process. So I try the following code to load the files streamingly ```py dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True) print(next(iter(dataset['train']))) ``` Sadly, it raises the following: ``` FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl' ``` I've noticed that the dataset can be properly found in the begining ``` Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub. ``` But it seems that the paths couldn't be properly parsed when loading iteratively. How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works. Thanks. ### Expected behavior Properly load the dataset. ### Environment info `datasets==2.14.5`
16
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)` ### Describe the bug Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs. ### Steps to reproduce the bug I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process. So I try the following code to load the files streamingly ```py dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True) print(next(iter(dataset['train']))) ``` Sadly, it raises the following: ``` FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl' ``` I've noticed that the dataset can be properly found in the begining ``` Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub. ``` But it seems that the paths couldn't be properly parsed when loading iteratively. How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works. Thanks. ### Expected behavior Properly load the dataset. ### Environment info `datasets==2.14.5` You can clone the `togethercomputer/RedPajama-Data-1T-Sample` repo and load the dataset with `load_dataset("path/to/cloned_repo")` to use it offline.
[ -0.33369070291519165, -0.10643325001001358, 0.10457661002874374, 0.33565500378608704, 0.1996665745973587, 0.007022194564342499, 0.20944146811962128, 0.36828163266181946, 0.0730251893401146, 0.0012076348066329956, 0.15766292810440063, 0.28006261587142944, -0.20167627930641174, -0.1230023205280304, -0.021764561533927917, -0.05131087824702263, -0.08652577549219131, 0.17819440364837646, -0.11513189226388931, 0.019068986177444458, -0.100918710231781, 0.2891969382762909, -0.27553266286849976, 0.03725210577249527, -0.08573570102453232, -0.012144757434725761, -0.0912543311715126, 0.4832437038421631, -0.023501254618167877, -0.13152606785297394, 0.21387571096420288, -0.06398449838161469, 0.19575271010398865, 0.6028723120689392, -0.00012228498235344887, 0.13889148831367493, 0.17505507171154022, -0.3115908205509186, -0.3196912109851837, -0.5971412658691406, -0.32240521907806396, 0.001599535346031189, 0.050952181220054626, -0.21964667737483978, -0.15284612774848938, -0.24989724159240723, 0.23846212029457092, -0.2582864761352539, 0.4575362801551819, 0.23508897423744202, 0.04524991288781166, 0.14384493231773376, 0.09258539974689484, 0.07430373132228851, -0.09207098186016083, 0.18474403023719788, 0.009927734732627869, 0.3621394634246826, 0.047674283385276794, -0.09468798339366913, -0.06323052942752838, 0.32604101300239563, -0.22990885376930237, 0.014308329671621323, 0.32358747720718384, 0.0827503353357315, -0.23202019929885864, -0.3165819048881531, 0.0054944828152656555, 0.33657291531562805, 0.38073158264160156, -0.273898720741272, -0.44493359327316284, -0.3977128565311432, -0.021598588675260544, -0.33488985896110535, 0.2835220992565155, 0.28766390681266785, -0.23299841582775116, 0.14273375272750854, 0.1366153508424759, -0.30331119894981384, -0.32885071635246277, 0.20271648466587067, 0.21462367475032806, -0.06291714310646057, -0.08940157294273376, 0.09051105380058289, 0.05999761447310448, 0.08636749535799026, -0.23062452673912048, 0.0025105420500040054, 0.09715788066387177, 0.2536012530326843, -0.14607959985733032, 0.21235206723213196, 0.10537592321634293, -0.146656796336174, 0.09645569324493408, 0.04029921442270279, 0.41063448786735535, -0.0987425297498703, -0.19579769670963287, 0.1957196742296219, 0.2093256711959839, 0.19705525040626526, -0.012553580105304718, 0.045106191188097, 0.32586756348609924, 0.5235635042190552, -0.16075609624385834, -0.05495341494679451, -0.21205803751945496, -0.1125742495059967, -0.187795490026474, -0.048121899366378784, 0.43105119466781616, -0.1851767897605896, -0.3241778016090393, -0.1368345022201538, -0.10603688657283783, -0.028096845373511314, 0.1077645868062973, 0.441519558429718, -0.0730380266904831, 0.07470087707042694, 0.16567757725715637, 0.23556655645370483, -0.23512712121009827, -0.23924915492534637, -0.11602994799613953, 0.18373502790927887, -0.22281807661056519, 0.050746090710163116, 0.11681558191776276, -0.35088294744491577, 0.4643254578113556, -0.18008379638195038, 0.08004692196846008, -0.2292410135269165, 0.018105462193489075, -0.1145787462592125, 0.15037184953689575, 0.2676355540752411, -0.04918740689754486, 0.10592726618051529, 0.2911433279514313, -0.03295420855283737, -0.02841760218143463, 0.19940148293972015, -0.39685890078544617, -0.3107828199863434, 0.26379716396331787, 0.0010863980278372765, -0.4941903352737427, 0.05797479674220085, -0.2876478135585785, -0.055544305592775345, -0.017302293330430984, -0.5291861295700073, -0.03799022361636162, -0.041929103434085846, -0.10352236777544022, -0.2231292873620987, 0.421862930059433, 0.9821243286132812, -0.3147834837436676, -0.09990771859884262, 0.11577408760786057, -0.07349232584238052, 0.07925348728895187, 0.23884126543998718, -0.2372792363166809, 0.26143574714660645, -0.5445769429206848, -0.0018696039915084839, 0.597967803478241, -0.43844470381736755, -0.3357347548007965, 0.349575400352478, -0.3791279196739197, 0.28703737258911133, 0.23935538530349731, 0.03846701979637146, -0.17876392602920532, 0.0021891966462135315, 0.2092272937297821, 0.20988795161247253, 0.0038669612258672714, 0.12306387722492218, -0.2571665048599243, -0.25962865352630615, 0.24873802065849304, 0.12917254865169525, -0.03172279894351959, 0.10731673240661621, 0.05393483489751816, -0.038488611578941345, 0.4093804359436035, -0.19876691699028015, 0.014541510492563248, 0.12945756316184998, 0.18402375280857086, 0.018072109669446945, 0.06480894982814789, 0.18456098437309265, -0.40845993161201477, 0.31646081805229187, 0.147764652967453, -0.28542637825012207, -0.38955986499786377, 0.14829307794570923, 0.07592806220054626, -0.11509443819522858, -0.5097124576568604, -0.3119969666004181, -0.07666313648223877, 0.20140668749809265, 0.20752409100532532, 0.017101749777793884, -0.527125358581543, 0.7245537638664246, -0.374942809343338, 0.16267135739326477, -0.614489734172821, 0.27102598547935486, 0.21431127190589905, -0.053739044815301895, -0.03994964808225632, 0.16230818629264832, -0.036075908690690994, -0.2657899856567383, -0.09554092586040497, 0.42169737815856934, 0.15332257747650146, 0.37734663486480713, 0.15902741253376007, -0.07321689277887344, 0.12107472121715546, -0.23270779848098755, -0.07072511315345764, 0.25159376859664917, 0.2109355479478836, 0.15976983308792114, -0.24182122945785522, 0.479531854391098, -0.155348002910614, 0.29572364687919617, 0.3292211592197418, -0.08379676938056946, 0.19616809487342834, 0.04299752414226532, -0.4064441919326782, -0.02471788227558136, 0.507056474685669, 0.05321656912565231, 0.33500707149505615, -0.09036827832460403, -0.40732523798942566, -0.08844634890556335, 0.12232792377471924, 0.16065002977848053, 0.05520216375589371, 0.11948375403881073, -0.17212921380996704, 0.08128932118415833, -0.05653880536556244, 0.3961472511291504, 0.45992550253868103, 0.0300593338906765, -0.2222566157579422, 0.2168741375207901, -0.05021345242857933, -0.1379014253616333, 0.05146786943078041, 0.04598548263311386, 0.3215346932411194, 0.44798868894577026, -0.054105013608932495, 0.07974313199520111, -0.4002660810947418, -0.2814503312110901, -0.06371349096298218, 0.1815333366394043, -0.39023804664611816, 0.21508625149726868, -0.1782747507095337, -0.3875052332878113, -0.3737649917602539, 0.05419490486383438, -0.07106684148311615, -0.002523820847272873, -0.22104370594024658, 0.34908732771873474, -0.04431534558534622, 0.0009464435279369354, -0.29322847723960876, 0.018117472529411316, 0.02314862608909607, -0.6316937804222107, 0.08204661309719086, -0.090707927942276, -0.051919907331466675, -0.10294732451438904, 0.24610409140586853, -0.15253311395645142, 0.17456194758415222, -0.25304654240608215, -0.0832124799489975, -0.17187973856925964, -0.1354903280735016, 0.04657365381717682, -0.09630937874317169, 0.07314389944076538, 0.04808898642659187, 0.4651401937007904, 0.14235208928585052, -0.20884038507938385, 0.1916307657957077, -0.3036668598651886, -0.17899426817893982, 0.09506967663764954, 0.0547344796359539, 0.1286042034626007, -0.09960803389549255, -0.6534104943275452, -0.21187777817249298, -0.4051317572593689, 0.2255718857049942, -0.08254755288362503, 0.08233791589736938, 0.3305562734603882, 0.2841603755950928, 0.20288124680519104, -0.05071359500288963, 0.01861751824617386, 0.024842500686645508, -0.40302449464797974, 0.42574986815452576, -0.06875479221343994, -0.2792237102985382, 0.24262595176696777, -0.13202637434005737, 0.266185998916626, 0.3266562819480896, -0.4411333203315735, -0.26776590943336487, 0.3716944456100464, 0.026889465749263763, -0.025649501010775566, -0.1691443771123886, 0.23912453651428223, -0.17414583265781403, 0.0806451290845871, -0.12010357528924942, -0.0692804828286171, 0.15207679569721222, 0.26721206307411194, 0.4216144382953644, 0.17044857144355774, 0.5852832794189453, -0.05282929912209511, 0.675841212272644, 0.30481967329978943, 0.174355149269104, 0.3927340507507324, -0.0491192489862442, 0.41611817479133606, -0.11667095124721527, -0.1023007184267044, -0.08535754680633545, 0.03681433945894241, -0.2648163437843323, 0.1638147234916687, 0.1708998680114746, -0.10543721169233322, -0.47177621722221375, -0.030674561858177185, -0.39907756447792053, -0.2503519356250763, 0.18387268483638763, -0.004630579613149166, 0.11448641121387482, 0.01358862966299057, 0.09655272215604782, 0.013020023703575134, -0.11104612052440643, 0.0349072627723217, 0.568842887878418, 0.3580150008201599, 0.1952369213104248, -0.07492439448833466, -0.2101021111011505, -0.23355832695960999, 0.076438769698143, 0.1102820336818695, 0.38136938214302063, -0.047332923859357834, -0.21611177921295166, 0.057167649269104004, -0.09367652982473373, 0.6115874648094177, -0.03468969091773033, 0.027530912309885025, -0.0007677525281906128, -0.12225690484046936, -0.20945437252521515, -0.171712726354599, 0.21989889442920685, 0.40736138820648193, 0.05162414535880089, 0.18917179107666016, -0.14912430942058563, -0.05827975645661354, -0.06618980318307877, 0.2929060161113739, -0.14218378067016602, -0.13925404846668243, -0.398127943277359, -0.2350749373435974, -0.3780660629272461, -0.0627836287021637, -0.1664355993270874, 0.030277296900749207, -0.015554055571556091, 0.1984911859035492, 0.15066266059875488, 0.03233549743890762, -0.08912336826324463, 0.08482789993286133, 0.4977646768093109, -0.12064199149608612, 0.10821564495563507, 0.732968270778656, 0.18241092562675476, 0.2525184750556946, 0.675127387046814, 0.046507615596055984, -0.4481540620326996, 0.06818975508213043, -0.11899733543395996, 0.08168958127498627, 0.408109188079834, -0.20199653506278992, -0.03772103413939476, 0.22747255861759186, -0.02841949835419655, -0.0806814655661583, -0.04350857436656952, 0.27179864048957825, -0.06355109065771103, -0.19259707629680634, -0.6949070692062378, 0.3263767957687378, 0.046294718980789185, 0.05505561828613281, 0.3932468295097351, -0.06320010125637054, -0.21818502247333527, 0.3314754366874695, -0.250642865896225, 0.7336889505386353, 0.03167083114385605, 0.2486146241426468, 0.4243658185005188, 0.06705565750598907, 0.541929304599762, -0.33927062153816223, 0.3031025528907776, -0.2356170266866684, -0.21696312725543976, -0.09757912904024124, -0.23094907402992249, 0.13578283786773682, -0.0067805079743266106, -0.12312644720077515, 0.5089527368545532, -0.039374977350234985, 0.17044810950756073, 0.07254283875226974, -0.041586000472307205, 0.13749894499778748, -0.0788077563047409, -0.5680601596832275, -0.09189977496862411, -0.06400805711746216, 0.4580201208591461, -0.02039754018187523, -0.29540354013442993, -0.1717330515384674, -0.10885462909936905, -0.11932168155908585, 0.270041286945343, -0.2713300585746765, 0.11484917998313904, -0.17027628421783447, -0.22965115308761597, -0.20663277804851532, 0.5957053303718567, 0.015738103538751602, -0.27405428886413574, -0.236038938164711, 0.10159516334533691, -0.08583305031061172, -0.06399881094694138, -0.2862357497215271, -0.02085965871810913, 0.4229554831981659, -0.056231576949357986, 0.1254674345254898, 0.2260676622390747, -0.3484792709350586, -0.3301573693752289, 0.14138467609882355, -0.0077237337827682495, 0.13022848963737488, 0.1516890525817871, -0.30309364199638367, 0.23038390278816223, -0.030553482472896576, -0.005594871938228607, -0.03597918152809143, 0.3320119082927704, -0.26050376892089844, -0.13060811161994934, 0.12509068846702576, -0.4186488389968872, 0.05600951611995697, 0.509558379650116, -0.09899614751338959, -0.08053791522979736, 0.5796023011207581, 0.079038605093956, 0.014623895287513733, -0.09411761909723282, -0.035414665937423706, 0.1392122507095337, -0.4089435636997223, 0.018499836325645447, 0.11752842366695404, 0.44951266050338745, -0.01794436201453209, -0.145319402217865, 0.19843339920043945, -0.19419923424720764, -0.11901544779539108, -0.5495316386222839, -0.3457174301147461, 0.251618891954422, -0.004063272383064032, -0.038858748972415924, 0.08790183067321777, -0.24115052819252014, 0.32501131296157837, -0.26385262608528137, -0.14456337690353394, 0.1341789960861206, -0.03510042652487755, 0.01557954028248787, 0.33104196190834045, 0.2973148226737976, 0.508115828037262, 0.005203574895858765, -0.02957472950220108, -0.10920816659927368, -0.2678292989730835, -0.01645895093679428, -0.17119625210762024, 0.22428187727928162, 0.008997002616524696, 0.010160665959119797, -0.08980771899223328, -0.31233519315719604, 0.04077436029911041, -0.0900934487581253, 0.13522739708423615, 0.007679082453250885, -0.07682083547115326, -0.10031589865684509, 0.02223723754286766, 0.07231603562831879, -0.31762397289276123, 0.14403575658798218, -0.14253075420856476, 0.21355301141738892, 0.2520226240158081, 0.07151225209236145, -0.2492290437221527, -0.03290955722332001, -0.10864295065402985, -0.023339517414569855, -0.1573970764875412, 0.12069552391767502, 0.2733630836009979, -0.47369372844696045, 0.2088337540626526, -0.22729095816612244, 0.2461961805820465, 0.5056753158569336, -0.2557566165924072, 0.11798983067274094, 0.1496240645647049, 0.013403724879026413, -0.2368479073047638, 0.055575329810380936, 0.3883466422557831, 0.012290529906749725, 0.03693503886461258, 0.2485119104385376, 0.0825958326458931, -0.0576540008187294, -0.0308309867978096, 0.10284152626991272, 0.44574373960494995, -0.27913305163383484, 0.3294128179550171, 0.2513259947299957, 0.022726699709892273, 0.31097328662872314, -0.18483540415763855, 0.27625638246536255, 0.18916326761245728, 0.29239949584007263, -0.2839680016040802, 0.27423176169395447, 0.002948218956589699, 0.005027434788644314, -0.2885117828845978, -0.7016327381134033, -0.19544491171836853, 0.2740093469619751, -0.0702914148569107, 0.21241815388202667, -0.17065483331680298, 0.44187942147254944, -0.28732967376708984, 0.04542205110192299, -0.06891368329524994, 0.03882741183042526, -0.004409444984048605, -0.01973223313689232, 0.006932944059371948, -0.35944849252700806, -0.1298268884420395, 0.03773964196443558, 0.15721020102500916, -0.102754145860672, 0.07637691497802734, 0.1177690327167511, -0.11467169970273972, -0.33250799775123596, 0.08281983435153961, 0.19250985980033875, 0.10290186107158661, -0.20751607418060303, 0.32290253043174744, 0.05204349011182785, -0.026669975370168686, 0.24890030920505524, -0.02920631878077984, 0.44058212637901306, 0.4040917456150055, 0.01251211017370224, 0.09668590128421783, 0.051232777535915375, -0.015630807727575302, -0.0023513436317443848, 0.1049925684928894, -0.0733463391661644, -0.07750879228115082, 0.36975568532943726, 0.04284777492284775, -0.0005617141723632812, 0.502973198890686, 0.05337770655751228, 0.26282820105552673, -0.11529582738876343, 0.050775520503520966, -0.1904067099094391, 0.18569007515907288, -0.18035057187080383, -0.07833985984325409, -0.40228453278541565, 0.1060364842414856, 0.3309730291366577, -0.075563445687294, 0.03970498591661453, 0.20518125593662262, -0.00794934295117855, 0.06366831809282303, 0.2937249541282654, 0.5692696571350098, 0.08704513311386108, -0.2856687307357788, -0.0849158838391304, -0.8362767696380615, 0.0983949601650238, -0.05558464676141739, 0.1531934291124344, -0.2067212462425232, 0.23963579535484314, 0.041403502225875854, 0.02316819503903389, 0.15127988159656525, -0.20265913009643555, 0.07856960594654083, 0.21656987071037292, -0.2732830345630646, -0.4324338138103485, -0.02534106746315956, 0.3057149052619934, -0.011755619198083878, -0.2077806442975998, -0.015747899189591408, -0.20586544275283813, -0.08629962801933289, 0.18446433544158936, -0.0061545222997665405, -0.22785086929798126, -0.29335108399391174, 0.3055528402328491, -0.16058620810508728, 0.2633771598339081, -0.00014685839414596558, -0.3095046281814575, -0.40648385882377625, -0.12116484344005585, -0.13951395452022552, 0.15387116372585297, 0.14561061561107635, 0.6183735132217407, -0.25591355562210083, -0.10058175027370453, -0.49200522899627686, 0.07983435690402985, 0.08733277022838593, -0.28910431265830994, -0.21636906266212463, 0.13126985728740692, 0.0251634418964386, 0.3242281675338745, -0.0346682034432888, 0.09284837543964386, -0.2129935920238495, 0.04309946298599243, -0.25413426756858826, -0.08506786823272705, 0.6583105325698853, -0.5007292032241821, 0.05060417950153351, 0.012677446007728577, 0.22747522592544556, 0.18211528658866882, 0.1953965276479721, -0.433260440826416, 0.3116176426410675, 0.28424373269081116, -0.06556527316570282, -0.30210211873054504, -0.038488082587718964, -0.16203095018863678, 0.01859945058822632, 0.05380964279174805, 0.1984279900789261, 0.06919245421886444, -0.45417293906211853, 0.2660905420780182, -0.22592779994010925 ]
https://github.com/huggingface/datasets/issues/6327
@mariosasko Thank you for your kind reply! I'll try it as a workaround. Does that mean that currently it's not supported to simply load with a short name?
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
### Describe the bug Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs. ### Steps to reproduce the bug I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process. So I try the following code to load the files streamingly ```py dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True) print(next(iter(dataset['train']))) ``` Sadly, it raises the following: ``` FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl' ``` I've noticed that the dataset can be properly found in the begining ``` Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub. ``` But it seems that the paths couldn't be properly parsed when loading iteratively. How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works. Thanks. ### Expected behavior Properly load the dataset. ### Environment info `datasets==2.14.5`
28
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)` ### Describe the bug Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs. ### Steps to reproduce the bug I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process. So I try the following code to load the files streamingly ```py dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True) print(next(iter(dataset['train']))) ``` Sadly, it raises the following: ``` FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl' ``` I've noticed that the dataset can be properly found in the begining ``` Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub. ``` But it seems that the paths couldn't be properly parsed when loading iteratively. How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works. Thanks. ### Expected behavior Properly load the dataset. ### Environment info `datasets==2.14.5` @mariosasko Thank you for your kind reply! I'll try it as a workaround. Does that mean that currently it's not supported to simply load with a short name?
[ -0.33369070291519165, -0.10643325001001358, 0.10457661002874374, 0.33565500378608704, 0.1996665745973587, 0.007022194564342499, 0.20944146811962128, 0.36828163266181946, 0.0730251893401146, 0.0012076348066329956, 0.15766292810440063, 0.28006261587142944, -0.20167627930641174, -0.1230023205280304, -0.021764561533927917, -0.05131087824702263, -0.08652577549219131, 0.17819440364837646, -0.11513189226388931, 0.019068986177444458, -0.100918710231781, 0.2891969382762909, -0.27553266286849976, 0.03725210577249527, -0.08573570102453232, -0.012144757434725761, -0.0912543311715126, 0.4832437038421631, -0.023501254618167877, -0.13152606785297394, 0.21387571096420288, -0.06398449838161469, 0.19575271010398865, 0.6028723120689392, -0.00012228498235344887, 0.13889148831367493, 0.17505507171154022, -0.3115908205509186, -0.3196912109851837, -0.5971412658691406, -0.32240521907806396, 0.001599535346031189, 0.050952181220054626, -0.21964667737483978, -0.15284612774848938, -0.24989724159240723, 0.23846212029457092, -0.2582864761352539, 0.4575362801551819, 0.23508897423744202, 0.04524991288781166, 0.14384493231773376, 0.09258539974689484, 0.07430373132228851, -0.09207098186016083, 0.18474403023719788, 0.009927734732627869, 0.3621394634246826, 0.047674283385276794, -0.09468798339366913, -0.06323052942752838, 0.32604101300239563, -0.22990885376930237, 0.014308329671621323, 0.32358747720718384, 0.0827503353357315, -0.23202019929885864, -0.3165819048881531, 0.0054944828152656555, 0.33657291531562805, 0.38073158264160156, -0.273898720741272, -0.44493359327316284, -0.3977128565311432, -0.021598588675260544, -0.33488985896110535, 0.2835220992565155, 0.28766390681266785, -0.23299841582775116, 0.14273375272750854, 0.1366153508424759, -0.30331119894981384, -0.32885071635246277, 0.20271648466587067, 0.21462367475032806, -0.06291714310646057, -0.08940157294273376, 0.09051105380058289, 0.05999761447310448, 0.08636749535799026, -0.23062452673912048, 0.0025105420500040054, 0.09715788066387177, 0.2536012530326843, -0.14607959985733032, 0.21235206723213196, 0.10537592321634293, -0.146656796336174, 0.09645569324493408, 0.04029921442270279, 0.41063448786735535, -0.0987425297498703, -0.19579769670963287, 0.1957196742296219, 0.2093256711959839, 0.19705525040626526, -0.012553580105304718, 0.045106191188097, 0.32586756348609924, 0.5235635042190552, -0.16075609624385834, -0.05495341494679451, -0.21205803751945496, -0.1125742495059967, -0.187795490026474, -0.048121899366378784, 0.43105119466781616, -0.1851767897605896, -0.3241778016090393, -0.1368345022201538, -0.10603688657283783, -0.028096845373511314, 0.1077645868062973, 0.441519558429718, -0.0730380266904831, 0.07470087707042694, 0.16567757725715637, 0.23556655645370483, -0.23512712121009827, -0.23924915492534637, -0.11602994799613953, 0.18373502790927887, -0.22281807661056519, 0.050746090710163116, 0.11681558191776276, -0.35088294744491577, 0.4643254578113556, -0.18008379638195038, 0.08004692196846008, -0.2292410135269165, 0.018105462193489075, -0.1145787462592125, 0.15037184953689575, 0.2676355540752411, -0.04918740689754486, 0.10592726618051529, 0.2911433279514313, -0.03295420855283737, -0.02841760218143463, 0.19940148293972015, -0.39685890078544617, -0.3107828199863434, 0.26379716396331787, 0.0010863980278372765, -0.4941903352737427, 0.05797479674220085, -0.2876478135585785, -0.055544305592775345, -0.017302293330430984, -0.5291861295700073, -0.03799022361636162, -0.041929103434085846, -0.10352236777544022, -0.2231292873620987, 0.421862930059433, 0.9821243286132812, -0.3147834837436676, -0.09990771859884262, 0.11577408760786057, -0.07349232584238052, 0.07925348728895187, 0.23884126543998718, -0.2372792363166809, 0.26143574714660645, -0.5445769429206848, -0.0018696039915084839, 0.597967803478241, -0.43844470381736755, -0.3357347548007965, 0.349575400352478, -0.3791279196739197, 0.28703737258911133, 0.23935538530349731, 0.03846701979637146, -0.17876392602920532, 0.0021891966462135315, 0.2092272937297821, 0.20988795161247253, 0.0038669612258672714, 0.12306387722492218, -0.2571665048599243, -0.25962865352630615, 0.24873802065849304, 0.12917254865169525, -0.03172279894351959, 0.10731673240661621, 0.05393483489751816, -0.038488611578941345, 0.4093804359436035, -0.19876691699028015, 0.014541510492563248, 0.12945756316184998, 0.18402375280857086, 0.018072109669446945, 0.06480894982814789, 0.18456098437309265, -0.40845993161201477, 0.31646081805229187, 0.147764652967453, -0.28542637825012207, -0.38955986499786377, 0.14829307794570923, 0.07592806220054626, -0.11509443819522858, -0.5097124576568604, -0.3119969666004181, -0.07666313648223877, 0.20140668749809265, 0.20752409100532532, 0.017101749777793884, -0.527125358581543, 0.7245537638664246, -0.374942809343338, 0.16267135739326477, -0.614489734172821, 0.27102598547935486, 0.21431127190589905, -0.053739044815301895, -0.03994964808225632, 0.16230818629264832, -0.036075908690690994, -0.2657899856567383, -0.09554092586040497, 0.42169737815856934, 0.15332257747650146, 0.37734663486480713, 0.15902741253376007, -0.07321689277887344, 0.12107472121715546, -0.23270779848098755, -0.07072511315345764, 0.25159376859664917, 0.2109355479478836, 0.15976983308792114, -0.24182122945785522, 0.479531854391098, -0.155348002910614, 0.29572364687919617, 0.3292211592197418, -0.08379676938056946, 0.19616809487342834, 0.04299752414226532, -0.4064441919326782, -0.02471788227558136, 0.507056474685669, 0.05321656912565231, 0.33500707149505615, -0.09036827832460403, -0.40732523798942566, -0.08844634890556335, 0.12232792377471924, 0.16065002977848053, 0.05520216375589371, 0.11948375403881073, -0.17212921380996704, 0.08128932118415833, -0.05653880536556244, 0.3961472511291504, 0.45992550253868103, 0.0300593338906765, -0.2222566157579422, 0.2168741375207901, -0.05021345242857933, -0.1379014253616333, 0.05146786943078041, 0.04598548263311386, 0.3215346932411194, 0.44798868894577026, -0.054105013608932495, 0.07974313199520111, -0.4002660810947418, -0.2814503312110901, -0.06371349096298218, 0.1815333366394043, -0.39023804664611816, 0.21508625149726868, -0.1782747507095337, -0.3875052332878113, -0.3737649917602539, 0.05419490486383438, -0.07106684148311615, -0.002523820847272873, -0.22104370594024658, 0.34908732771873474, -0.04431534558534622, 0.0009464435279369354, -0.29322847723960876, 0.018117472529411316, 0.02314862608909607, -0.6316937804222107, 0.08204661309719086, -0.090707927942276, -0.051919907331466675, -0.10294732451438904, 0.24610409140586853, -0.15253311395645142, 0.17456194758415222, -0.25304654240608215, -0.0832124799489975, -0.17187973856925964, -0.1354903280735016, 0.04657365381717682, -0.09630937874317169, 0.07314389944076538, 0.04808898642659187, 0.4651401937007904, 0.14235208928585052, -0.20884038507938385, 0.1916307657957077, -0.3036668598651886, -0.17899426817893982, 0.09506967663764954, 0.0547344796359539, 0.1286042034626007, -0.09960803389549255, -0.6534104943275452, -0.21187777817249298, -0.4051317572593689, 0.2255718857049942, -0.08254755288362503, 0.08233791589736938, 0.3305562734603882, 0.2841603755950928, 0.20288124680519104, -0.05071359500288963, 0.01861751824617386, 0.024842500686645508, -0.40302449464797974, 0.42574986815452576, -0.06875479221343994, -0.2792237102985382, 0.24262595176696777, -0.13202637434005737, 0.266185998916626, 0.3266562819480896, -0.4411333203315735, -0.26776590943336487, 0.3716944456100464, 0.026889465749263763, -0.025649501010775566, -0.1691443771123886, 0.23912453651428223, -0.17414583265781403, 0.0806451290845871, -0.12010357528924942, -0.0692804828286171, 0.15207679569721222, 0.26721206307411194, 0.4216144382953644, 0.17044857144355774, 0.5852832794189453, -0.05282929912209511, 0.675841212272644, 0.30481967329978943, 0.174355149269104, 0.3927340507507324, -0.0491192489862442, 0.41611817479133606, -0.11667095124721527, -0.1023007184267044, -0.08535754680633545, 0.03681433945894241, -0.2648163437843323, 0.1638147234916687, 0.1708998680114746, -0.10543721169233322, -0.47177621722221375, -0.030674561858177185, -0.39907756447792053, -0.2503519356250763, 0.18387268483638763, -0.004630579613149166, 0.11448641121387482, 0.01358862966299057, 0.09655272215604782, 0.013020023703575134, -0.11104612052440643, 0.0349072627723217, 0.568842887878418, 0.3580150008201599, 0.1952369213104248, -0.07492439448833466, -0.2101021111011505, -0.23355832695960999, 0.076438769698143, 0.1102820336818695, 0.38136938214302063, -0.047332923859357834, -0.21611177921295166, 0.057167649269104004, -0.09367652982473373, 0.6115874648094177, -0.03468969091773033, 0.027530912309885025, -0.0007677525281906128, -0.12225690484046936, -0.20945437252521515, -0.171712726354599, 0.21989889442920685, 0.40736138820648193, 0.05162414535880089, 0.18917179107666016, -0.14912430942058563, -0.05827975645661354, -0.06618980318307877, 0.2929060161113739, -0.14218378067016602, -0.13925404846668243, -0.398127943277359, -0.2350749373435974, -0.3780660629272461, -0.0627836287021637, -0.1664355993270874, 0.030277296900749207, -0.015554055571556091, 0.1984911859035492, 0.15066266059875488, 0.03233549743890762, -0.08912336826324463, 0.08482789993286133, 0.4977646768093109, -0.12064199149608612, 0.10821564495563507, 0.732968270778656, 0.18241092562675476, 0.2525184750556946, 0.675127387046814, 0.046507615596055984, -0.4481540620326996, 0.06818975508213043, -0.11899733543395996, 0.08168958127498627, 0.408109188079834, -0.20199653506278992, -0.03772103413939476, 0.22747255861759186, -0.02841949835419655, -0.0806814655661583, -0.04350857436656952, 0.27179864048957825, -0.06355109065771103, -0.19259707629680634, -0.6949070692062378, 0.3263767957687378, 0.046294718980789185, 0.05505561828613281, 0.3932468295097351, -0.06320010125637054, -0.21818502247333527, 0.3314754366874695, -0.250642865896225, 0.7336889505386353, 0.03167083114385605, 0.2486146241426468, 0.4243658185005188, 0.06705565750598907, 0.541929304599762, -0.33927062153816223, 0.3031025528907776, -0.2356170266866684, -0.21696312725543976, -0.09757912904024124, -0.23094907402992249, 0.13578283786773682, -0.0067805079743266106, -0.12312644720077515, 0.5089527368545532, -0.039374977350234985, 0.17044810950756073, 0.07254283875226974, -0.041586000472307205, 0.13749894499778748, -0.0788077563047409, -0.5680601596832275, -0.09189977496862411, -0.06400805711746216, 0.4580201208591461, -0.02039754018187523, -0.29540354013442993, -0.1717330515384674, -0.10885462909936905, -0.11932168155908585, 0.270041286945343, -0.2713300585746765, 0.11484917998313904, -0.17027628421783447, -0.22965115308761597, -0.20663277804851532, 0.5957053303718567, 0.015738103538751602, -0.27405428886413574, -0.236038938164711, 0.10159516334533691, -0.08583305031061172, -0.06399881094694138, -0.2862357497215271, -0.02085965871810913, 0.4229554831981659, -0.056231576949357986, 0.1254674345254898, 0.2260676622390747, -0.3484792709350586, -0.3301573693752289, 0.14138467609882355, -0.0077237337827682495, 0.13022848963737488, 0.1516890525817871, -0.30309364199638367, 0.23038390278816223, -0.030553482472896576, -0.005594871938228607, -0.03597918152809143, 0.3320119082927704, -0.26050376892089844, -0.13060811161994934, 0.12509068846702576, -0.4186488389968872, 0.05600951611995697, 0.509558379650116, -0.09899614751338959, -0.08053791522979736, 0.5796023011207581, 0.079038605093956, 0.014623895287513733, -0.09411761909723282, -0.035414665937423706, 0.1392122507095337, -0.4089435636997223, 0.018499836325645447, 0.11752842366695404, 0.44951266050338745, -0.01794436201453209, -0.145319402217865, 0.19843339920043945, -0.19419923424720764, -0.11901544779539108, -0.5495316386222839, -0.3457174301147461, 0.251618891954422, -0.004063272383064032, -0.038858748972415924, 0.08790183067321777, -0.24115052819252014, 0.32501131296157837, -0.26385262608528137, -0.14456337690353394, 0.1341789960861206, -0.03510042652487755, 0.01557954028248787, 0.33104196190834045, 0.2973148226737976, 0.508115828037262, 0.005203574895858765, -0.02957472950220108, -0.10920816659927368, -0.2678292989730835, -0.01645895093679428, -0.17119625210762024, 0.22428187727928162, 0.008997002616524696, 0.010160665959119797, -0.08980771899223328, -0.31233519315719604, 0.04077436029911041, -0.0900934487581253, 0.13522739708423615, 0.007679082453250885, -0.07682083547115326, -0.10031589865684509, 0.02223723754286766, 0.07231603562831879, -0.31762397289276123, 0.14403575658798218, -0.14253075420856476, 0.21355301141738892, 0.2520226240158081, 0.07151225209236145, -0.2492290437221527, -0.03290955722332001, -0.10864295065402985, -0.023339517414569855, -0.1573970764875412, 0.12069552391767502, 0.2733630836009979, -0.47369372844696045, 0.2088337540626526, -0.22729095816612244, 0.2461961805820465, 0.5056753158569336, -0.2557566165924072, 0.11798983067274094, 0.1496240645647049, 0.013403724879026413, -0.2368479073047638, 0.055575329810380936, 0.3883466422557831, 0.012290529906749725, 0.03693503886461258, 0.2485119104385376, 0.0825958326458931, -0.0576540008187294, -0.0308309867978096, 0.10284152626991272, 0.44574373960494995, -0.27913305163383484, 0.3294128179550171, 0.2513259947299957, 0.022726699709892273, 0.31097328662872314, -0.18483540415763855, 0.27625638246536255, 0.18916326761245728, 0.29239949584007263, -0.2839680016040802, 0.27423176169395447, 0.002948218956589699, 0.005027434788644314, -0.2885117828845978, -0.7016327381134033, -0.19544491171836853, 0.2740093469619751, -0.0702914148569107, 0.21241815388202667, -0.17065483331680298, 0.44187942147254944, -0.28732967376708984, 0.04542205110192299, -0.06891368329524994, 0.03882741183042526, -0.004409444984048605, -0.01973223313689232, 0.006932944059371948, -0.35944849252700806, -0.1298268884420395, 0.03773964196443558, 0.15721020102500916, -0.102754145860672, 0.07637691497802734, 0.1177690327167511, -0.11467169970273972, -0.33250799775123596, 0.08281983435153961, 0.19250985980033875, 0.10290186107158661, -0.20751607418060303, 0.32290253043174744, 0.05204349011182785, -0.026669975370168686, 0.24890030920505524, -0.02920631878077984, 0.44058212637901306, 0.4040917456150055, 0.01251211017370224, 0.09668590128421783, 0.051232777535915375, -0.015630807727575302, -0.0023513436317443848, 0.1049925684928894, -0.0733463391661644, -0.07750879228115082, 0.36975568532943726, 0.04284777492284775, -0.0005617141723632812, 0.502973198890686, 0.05337770655751228, 0.26282820105552673, -0.11529582738876343, 0.050775520503520966, -0.1904067099094391, 0.18569007515907288, -0.18035057187080383, -0.07833985984325409, -0.40228453278541565, 0.1060364842414856, 0.3309730291366577, -0.075563445687294, 0.03970498591661453, 0.20518125593662262, -0.00794934295117855, 0.06366831809282303, 0.2937249541282654, 0.5692696571350098, 0.08704513311386108, -0.2856687307357788, -0.0849158838391304, -0.8362767696380615, 0.0983949601650238, -0.05558464676141739, 0.1531934291124344, -0.2067212462425232, 0.23963579535484314, 0.041403502225875854, 0.02316819503903389, 0.15127988159656525, -0.20265913009643555, 0.07856960594654083, 0.21656987071037292, -0.2732830345630646, -0.4324338138103485, -0.02534106746315956, 0.3057149052619934, -0.011755619198083878, -0.2077806442975998, -0.015747899189591408, -0.20586544275283813, -0.08629962801933289, 0.18446433544158936, -0.0061545222997665405, -0.22785086929798126, -0.29335108399391174, 0.3055528402328491, -0.16058620810508728, 0.2633771598339081, -0.00014685839414596558, -0.3095046281814575, -0.40648385882377625, -0.12116484344005585, -0.13951395452022552, 0.15387116372585297, 0.14561061561107635, 0.6183735132217407, -0.25591355562210083, -0.10058175027370453, -0.49200522899627686, 0.07983435690402985, 0.08733277022838593, -0.28910431265830994, -0.21636906266212463, 0.13126985728740692, 0.0251634418964386, 0.3242281675338745, -0.0346682034432888, 0.09284837543964386, -0.2129935920238495, 0.04309946298599243, -0.25413426756858826, -0.08506786823272705, 0.6583105325698853, -0.5007292032241821, 0.05060417950153351, 0.012677446007728577, 0.22747522592544556, 0.18211528658866882, 0.1953965276479721, -0.433260440826416, 0.3116176426410675, 0.28424373269081116, -0.06556527316570282, -0.30210211873054504, -0.038488082587718964, -0.16203095018863678, 0.01859945058822632, 0.05380964279174805, 0.1984279900789261, 0.06919245421886444, -0.45417293906211853, 0.2660905420780182, -0.22592779994010925 ]
https://github.com/huggingface/datasets/issues/6327
It is, but manually downloading repo files to the cache can easily lead to failure (the HF cache is not meant to be modified by a user besides deleting the files 🙂), as in your case. Hence, the clone + `load_dataset("path/to/cloned_repo")` workflow should be used instead.
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
### Describe the bug Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs. ### Steps to reproduce the bug I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process. So I try the following code to load the files streamingly ```py dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True) print(next(iter(dataset['train']))) ``` Sadly, it raises the following: ``` FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl' ``` I've noticed that the dataset can be properly found in the begining ``` Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub. ``` But it seems that the paths couldn't be properly parsed when loading iteratively. How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works. Thanks. ### Expected behavior Properly load the dataset. ### Environment info `datasets==2.14.5`
46
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)` ### Describe the bug Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs. ### Steps to reproduce the bug I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process. So I try the following code to load the files streamingly ```py dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True) print(next(iter(dataset['train']))) ``` Sadly, it raises the following: ``` FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl' ``` I've noticed that the dataset can be properly found in the begining ``` Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub. ``` But it seems that the paths couldn't be properly parsed when loading iteratively. How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works. Thanks. ### Expected behavior Properly load the dataset. ### Environment info `datasets==2.14.5` It is, but manually downloading repo files to the cache can easily lead to failure (the HF cache is not meant to be modified by a user besides deleting the files 🙂), as in your case. Hence, the clone + `load_dataset("path/to/cloned_repo")` workflow should be used instead.
[ -0.33369070291519165, -0.10643325001001358, 0.10457661002874374, 0.33565500378608704, 0.1996665745973587, 0.007022194564342499, 0.20944146811962128, 0.36828163266181946, 0.0730251893401146, 0.0012076348066329956, 0.15766292810440063, 0.28006261587142944, -0.20167627930641174, -0.1230023205280304, -0.021764561533927917, -0.05131087824702263, -0.08652577549219131, 0.17819440364837646, -0.11513189226388931, 0.019068986177444458, -0.100918710231781, 0.2891969382762909, -0.27553266286849976, 0.03725210577249527, -0.08573570102453232, -0.012144757434725761, -0.0912543311715126, 0.4832437038421631, -0.023501254618167877, -0.13152606785297394, 0.21387571096420288, -0.06398449838161469, 0.19575271010398865, 0.6028723120689392, -0.00012228498235344887, 0.13889148831367493, 0.17505507171154022, -0.3115908205509186, -0.3196912109851837, -0.5971412658691406, -0.32240521907806396, 0.001599535346031189, 0.050952181220054626, -0.21964667737483978, -0.15284612774848938, -0.24989724159240723, 0.23846212029457092, -0.2582864761352539, 0.4575362801551819, 0.23508897423744202, 0.04524991288781166, 0.14384493231773376, 0.09258539974689484, 0.07430373132228851, -0.09207098186016083, 0.18474403023719788, 0.009927734732627869, 0.3621394634246826, 0.047674283385276794, -0.09468798339366913, -0.06323052942752838, 0.32604101300239563, -0.22990885376930237, 0.014308329671621323, 0.32358747720718384, 0.0827503353357315, -0.23202019929885864, -0.3165819048881531, 0.0054944828152656555, 0.33657291531562805, 0.38073158264160156, -0.273898720741272, -0.44493359327316284, -0.3977128565311432, -0.021598588675260544, -0.33488985896110535, 0.2835220992565155, 0.28766390681266785, -0.23299841582775116, 0.14273375272750854, 0.1366153508424759, -0.30331119894981384, -0.32885071635246277, 0.20271648466587067, 0.21462367475032806, -0.06291714310646057, -0.08940157294273376, 0.09051105380058289, 0.05999761447310448, 0.08636749535799026, -0.23062452673912048, 0.0025105420500040054, 0.09715788066387177, 0.2536012530326843, -0.14607959985733032, 0.21235206723213196, 0.10537592321634293, -0.146656796336174, 0.09645569324493408, 0.04029921442270279, 0.41063448786735535, -0.0987425297498703, -0.19579769670963287, 0.1957196742296219, 0.2093256711959839, 0.19705525040626526, -0.012553580105304718, 0.045106191188097, 0.32586756348609924, 0.5235635042190552, -0.16075609624385834, -0.05495341494679451, -0.21205803751945496, -0.1125742495059967, -0.187795490026474, -0.048121899366378784, 0.43105119466781616, -0.1851767897605896, -0.3241778016090393, -0.1368345022201538, -0.10603688657283783, -0.028096845373511314, 0.1077645868062973, 0.441519558429718, -0.0730380266904831, 0.07470087707042694, 0.16567757725715637, 0.23556655645370483, -0.23512712121009827, -0.23924915492534637, -0.11602994799613953, 0.18373502790927887, -0.22281807661056519, 0.050746090710163116, 0.11681558191776276, -0.35088294744491577, 0.4643254578113556, -0.18008379638195038, 0.08004692196846008, -0.2292410135269165, 0.018105462193489075, -0.1145787462592125, 0.15037184953689575, 0.2676355540752411, -0.04918740689754486, 0.10592726618051529, 0.2911433279514313, -0.03295420855283737, -0.02841760218143463, 0.19940148293972015, -0.39685890078544617, -0.3107828199863434, 0.26379716396331787, 0.0010863980278372765, -0.4941903352737427, 0.05797479674220085, -0.2876478135585785, -0.055544305592775345, -0.017302293330430984, -0.5291861295700073, -0.03799022361636162, -0.041929103434085846, -0.10352236777544022, -0.2231292873620987, 0.421862930059433, 0.9821243286132812, -0.3147834837436676, -0.09990771859884262, 0.11577408760786057, -0.07349232584238052, 0.07925348728895187, 0.23884126543998718, -0.2372792363166809, 0.26143574714660645, -0.5445769429206848, -0.0018696039915084839, 0.597967803478241, -0.43844470381736755, -0.3357347548007965, 0.349575400352478, -0.3791279196739197, 0.28703737258911133, 0.23935538530349731, 0.03846701979637146, -0.17876392602920532, 0.0021891966462135315, 0.2092272937297821, 0.20988795161247253, 0.0038669612258672714, 0.12306387722492218, -0.2571665048599243, -0.25962865352630615, 0.24873802065849304, 0.12917254865169525, -0.03172279894351959, 0.10731673240661621, 0.05393483489751816, -0.038488611578941345, 0.4093804359436035, -0.19876691699028015, 0.014541510492563248, 0.12945756316184998, 0.18402375280857086, 0.018072109669446945, 0.06480894982814789, 0.18456098437309265, -0.40845993161201477, 0.31646081805229187, 0.147764652967453, -0.28542637825012207, -0.38955986499786377, 0.14829307794570923, 0.07592806220054626, -0.11509443819522858, -0.5097124576568604, -0.3119969666004181, -0.07666313648223877, 0.20140668749809265, 0.20752409100532532, 0.017101749777793884, -0.527125358581543, 0.7245537638664246, -0.374942809343338, 0.16267135739326477, -0.614489734172821, 0.27102598547935486, 0.21431127190589905, -0.053739044815301895, -0.03994964808225632, 0.16230818629264832, -0.036075908690690994, -0.2657899856567383, -0.09554092586040497, 0.42169737815856934, 0.15332257747650146, 0.37734663486480713, 0.15902741253376007, -0.07321689277887344, 0.12107472121715546, -0.23270779848098755, -0.07072511315345764, 0.25159376859664917, 0.2109355479478836, 0.15976983308792114, -0.24182122945785522, 0.479531854391098, -0.155348002910614, 0.29572364687919617, 0.3292211592197418, -0.08379676938056946, 0.19616809487342834, 0.04299752414226532, -0.4064441919326782, -0.02471788227558136, 0.507056474685669, 0.05321656912565231, 0.33500707149505615, -0.09036827832460403, -0.40732523798942566, -0.08844634890556335, 0.12232792377471924, 0.16065002977848053, 0.05520216375589371, 0.11948375403881073, -0.17212921380996704, 0.08128932118415833, -0.05653880536556244, 0.3961472511291504, 0.45992550253868103, 0.0300593338906765, -0.2222566157579422, 0.2168741375207901, -0.05021345242857933, -0.1379014253616333, 0.05146786943078041, 0.04598548263311386, 0.3215346932411194, 0.44798868894577026, -0.054105013608932495, 0.07974313199520111, -0.4002660810947418, -0.2814503312110901, -0.06371349096298218, 0.1815333366394043, -0.39023804664611816, 0.21508625149726868, -0.1782747507095337, -0.3875052332878113, -0.3737649917602539, 0.05419490486383438, -0.07106684148311615, -0.002523820847272873, -0.22104370594024658, 0.34908732771873474, -0.04431534558534622, 0.0009464435279369354, -0.29322847723960876, 0.018117472529411316, 0.02314862608909607, -0.6316937804222107, 0.08204661309719086, -0.090707927942276, -0.051919907331466675, -0.10294732451438904, 0.24610409140586853, -0.15253311395645142, 0.17456194758415222, -0.25304654240608215, -0.0832124799489975, -0.17187973856925964, -0.1354903280735016, 0.04657365381717682, -0.09630937874317169, 0.07314389944076538, 0.04808898642659187, 0.4651401937007904, 0.14235208928585052, -0.20884038507938385, 0.1916307657957077, -0.3036668598651886, -0.17899426817893982, 0.09506967663764954, 0.0547344796359539, 0.1286042034626007, -0.09960803389549255, -0.6534104943275452, -0.21187777817249298, -0.4051317572593689, 0.2255718857049942, -0.08254755288362503, 0.08233791589736938, 0.3305562734603882, 0.2841603755950928, 0.20288124680519104, -0.05071359500288963, 0.01861751824617386, 0.024842500686645508, -0.40302449464797974, 0.42574986815452576, -0.06875479221343994, -0.2792237102985382, 0.24262595176696777, -0.13202637434005737, 0.266185998916626, 0.3266562819480896, -0.4411333203315735, -0.26776590943336487, 0.3716944456100464, 0.026889465749263763, -0.025649501010775566, -0.1691443771123886, 0.23912453651428223, -0.17414583265781403, 0.0806451290845871, -0.12010357528924942, -0.0692804828286171, 0.15207679569721222, 0.26721206307411194, 0.4216144382953644, 0.17044857144355774, 0.5852832794189453, -0.05282929912209511, 0.675841212272644, 0.30481967329978943, 0.174355149269104, 0.3927340507507324, -0.0491192489862442, 0.41611817479133606, -0.11667095124721527, -0.1023007184267044, -0.08535754680633545, 0.03681433945894241, -0.2648163437843323, 0.1638147234916687, 0.1708998680114746, -0.10543721169233322, -0.47177621722221375, -0.030674561858177185, -0.39907756447792053, -0.2503519356250763, 0.18387268483638763, -0.004630579613149166, 0.11448641121387482, 0.01358862966299057, 0.09655272215604782, 0.013020023703575134, -0.11104612052440643, 0.0349072627723217, 0.568842887878418, 0.3580150008201599, 0.1952369213104248, -0.07492439448833466, -0.2101021111011505, -0.23355832695960999, 0.076438769698143, 0.1102820336818695, 0.38136938214302063, -0.047332923859357834, -0.21611177921295166, 0.057167649269104004, -0.09367652982473373, 0.6115874648094177, -0.03468969091773033, 0.027530912309885025, -0.0007677525281906128, -0.12225690484046936, -0.20945437252521515, -0.171712726354599, 0.21989889442920685, 0.40736138820648193, 0.05162414535880089, 0.18917179107666016, -0.14912430942058563, -0.05827975645661354, -0.06618980318307877, 0.2929060161113739, -0.14218378067016602, -0.13925404846668243, -0.398127943277359, -0.2350749373435974, -0.3780660629272461, -0.0627836287021637, -0.1664355993270874, 0.030277296900749207, -0.015554055571556091, 0.1984911859035492, 0.15066266059875488, 0.03233549743890762, -0.08912336826324463, 0.08482789993286133, 0.4977646768093109, -0.12064199149608612, 0.10821564495563507, 0.732968270778656, 0.18241092562675476, 0.2525184750556946, 0.675127387046814, 0.046507615596055984, -0.4481540620326996, 0.06818975508213043, -0.11899733543395996, 0.08168958127498627, 0.408109188079834, -0.20199653506278992, -0.03772103413939476, 0.22747255861759186, -0.02841949835419655, -0.0806814655661583, -0.04350857436656952, 0.27179864048957825, -0.06355109065771103, -0.19259707629680634, -0.6949070692062378, 0.3263767957687378, 0.046294718980789185, 0.05505561828613281, 0.3932468295097351, -0.06320010125637054, -0.21818502247333527, 0.3314754366874695, -0.250642865896225, 0.7336889505386353, 0.03167083114385605, 0.2486146241426468, 0.4243658185005188, 0.06705565750598907, 0.541929304599762, -0.33927062153816223, 0.3031025528907776, -0.2356170266866684, -0.21696312725543976, -0.09757912904024124, -0.23094907402992249, 0.13578283786773682, -0.0067805079743266106, -0.12312644720077515, 0.5089527368545532, -0.039374977350234985, 0.17044810950756073, 0.07254283875226974, -0.041586000472307205, 0.13749894499778748, -0.0788077563047409, -0.5680601596832275, -0.09189977496862411, -0.06400805711746216, 0.4580201208591461, -0.02039754018187523, -0.29540354013442993, -0.1717330515384674, -0.10885462909936905, -0.11932168155908585, 0.270041286945343, -0.2713300585746765, 0.11484917998313904, -0.17027628421783447, -0.22965115308761597, -0.20663277804851532, 0.5957053303718567, 0.015738103538751602, -0.27405428886413574, -0.236038938164711, 0.10159516334533691, -0.08583305031061172, -0.06399881094694138, -0.2862357497215271, -0.02085965871810913, 0.4229554831981659, -0.056231576949357986, 0.1254674345254898, 0.2260676622390747, -0.3484792709350586, -0.3301573693752289, 0.14138467609882355, -0.0077237337827682495, 0.13022848963737488, 0.1516890525817871, -0.30309364199638367, 0.23038390278816223, -0.030553482472896576, -0.005594871938228607, -0.03597918152809143, 0.3320119082927704, -0.26050376892089844, -0.13060811161994934, 0.12509068846702576, -0.4186488389968872, 0.05600951611995697, 0.509558379650116, -0.09899614751338959, -0.08053791522979736, 0.5796023011207581, 0.079038605093956, 0.014623895287513733, -0.09411761909723282, -0.035414665937423706, 0.1392122507095337, -0.4089435636997223, 0.018499836325645447, 0.11752842366695404, 0.44951266050338745, -0.01794436201453209, -0.145319402217865, 0.19843339920043945, -0.19419923424720764, -0.11901544779539108, -0.5495316386222839, -0.3457174301147461, 0.251618891954422, -0.004063272383064032, -0.038858748972415924, 0.08790183067321777, -0.24115052819252014, 0.32501131296157837, -0.26385262608528137, -0.14456337690353394, 0.1341789960861206, -0.03510042652487755, 0.01557954028248787, 0.33104196190834045, 0.2973148226737976, 0.508115828037262, 0.005203574895858765, -0.02957472950220108, -0.10920816659927368, -0.2678292989730835, -0.01645895093679428, -0.17119625210762024, 0.22428187727928162, 0.008997002616524696, 0.010160665959119797, -0.08980771899223328, -0.31233519315719604, 0.04077436029911041, -0.0900934487581253, 0.13522739708423615, 0.007679082453250885, -0.07682083547115326, -0.10031589865684509, 0.02223723754286766, 0.07231603562831879, -0.31762397289276123, 0.14403575658798218, -0.14253075420856476, 0.21355301141738892, 0.2520226240158081, 0.07151225209236145, -0.2492290437221527, -0.03290955722332001, -0.10864295065402985, -0.023339517414569855, -0.1573970764875412, 0.12069552391767502, 0.2733630836009979, -0.47369372844696045, 0.2088337540626526, -0.22729095816612244, 0.2461961805820465, 0.5056753158569336, -0.2557566165924072, 0.11798983067274094, 0.1496240645647049, 0.013403724879026413, -0.2368479073047638, 0.055575329810380936, 0.3883466422557831, 0.012290529906749725, 0.03693503886461258, 0.2485119104385376, 0.0825958326458931, -0.0576540008187294, -0.0308309867978096, 0.10284152626991272, 0.44574373960494995, -0.27913305163383484, 0.3294128179550171, 0.2513259947299957, 0.022726699709892273, 0.31097328662872314, -0.18483540415763855, 0.27625638246536255, 0.18916326761245728, 0.29239949584007263, -0.2839680016040802, 0.27423176169395447, 0.002948218956589699, 0.005027434788644314, -0.2885117828845978, -0.7016327381134033, -0.19544491171836853, 0.2740093469619751, -0.0702914148569107, 0.21241815388202667, -0.17065483331680298, 0.44187942147254944, -0.28732967376708984, 0.04542205110192299, -0.06891368329524994, 0.03882741183042526, -0.004409444984048605, -0.01973223313689232, 0.006932944059371948, -0.35944849252700806, -0.1298268884420395, 0.03773964196443558, 0.15721020102500916, -0.102754145860672, 0.07637691497802734, 0.1177690327167511, -0.11467169970273972, -0.33250799775123596, 0.08281983435153961, 0.19250985980033875, 0.10290186107158661, -0.20751607418060303, 0.32290253043174744, 0.05204349011182785, -0.026669975370168686, 0.24890030920505524, -0.02920631878077984, 0.44058212637901306, 0.4040917456150055, 0.01251211017370224, 0.09668590128421783, 0.051232777535915375, -0.015630807727575302, -0.0023513436317443848, 0.1049925684928894, -0.0733463391661644, -0.07750879228115082, 0.36975568532943726, 0.04284777492284775, -0.0005617141723632812, 0.502973198890686, 0.05337770655751228, 0.26282820105552673, -0.11529582738876343, 0.050775520503520966, -0.1904067099094391, 0.18569007515907288, -0.18035057187080383, -0.07833985984325409, -0.40228453278541565, 0.1060364842414856, 0.3309730291366577, -0.075563445687294, 0.03970498591661453, 0.20518125593662262, -0.00794934295117855, 0.06366831809282303, 0.2937249541282654, 0.5692696571350098, 0.08704513311386108, -0.2856687307357788, -0.0849158838391304, -0.8362767696380615, 0.0983949601650238, -0.05558464676141739, 0.1531934291124344, -0.2067212462425232, 0.23963579535484314, 0.041403502225875854, 0.02316819503903389, 0.15127988159656525, -0.20265913009643555, 0.07856960594654083, 0.21656987071037292, -0.2732830345630646, -0.4324338138103485, -0.02534106746315956, 0.3057149052619934, -0.011755619198083878, -0.2077806442975998, -0.015747899189591408, -0.20586544275283813, -0.08629962801933289, 0.18446433544158936, -0.0061545222997665405, -0.22785086929798126, -0.29335108399391174, 0.3055528402328491, -0.16058620810508728, 0.2633771598339081, -0.00014685839414596558, -0.3095046281814575, -0.40648385882377625, -0.12116484344005585, -0.13951395452022552, 0.15387116372585297, 0.14561061561107635, 0.6183735132217407, -0.25591355562210083, -0.10058175027370453, -0.49200522899627686, 0.07983435690402985, 0.08733277022838593, -0.28910431265830994, -0.21636906266212463, 0.13126985728740692, 0.0251634418964386, 0.3242281675338745, -0.0346682034432888, 0.09284837543964386, -0.2129935920238495, 0.04309946298599243, -0.25413426756858826, -0.08506786823272705, 0.6583105325698853, -0.5007292032241821, 0.05060417950153351, 0.012677446007728577, 0.22747522592544556, 0.18211528658866882, 0.1953965276479721, -0.433260440826416, 0.3116176426410675, 0.28424373269081116, -0.06556527316570282, -0.30210211873054504, -0.038488082587718964, -0.16203095018863678, 0.01859945058822632, 0.05380964279174805, 0.1984279900789261, 0.06919245421886444, -0.45417293906211853, 0.2660905420780182, -0.22592779994010925 ]
https://github.com/huggingface/datasets/issues/6324
Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix. JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon. Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets`
Conversion to Arrow fails due to wrong type heuristic
### Describe the bug I have a list of dictionaries with valid/JSON-serializable values. One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on. If trying to convert this list to a dataset with `Dataset.from_list()`, I always get `ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers. Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation. ### Steps to reproduce the bug * create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset. ### Expected behavior There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion). ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35 - Python version: 3.9.18 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.1
97
Conversion to Arrow fails due to wrong type heuristic ### Describe the bug I have a list of dictionaries with valid/JSON-serializable values. One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on. If trying to convert this list to a dataset with `Dataset.from_list()`, I always get `ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers. Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation. ### Steps to reproduce the bug * create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset. ### Expected behavior There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion). ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35 - Python version: 3.9.18 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.1 Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix. JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon. Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets`
[ -0.13682855665683746, -0.08490268886089325, 0.047282736748456955, 0.18112041056156158, 0.4715591371059418, -0.02025952935218811, 0.2181384414434433, 0.3003539741039276, -0.2322429120540619, -0.14563122391700745, 0.018224947154521942, 0.5438294410705566, -0.030470455065369606, -0.01941857486963272, -0.22284570336341858, -0.14017997682094574, 0.1448119878768921, 0.14477428793907166, -0.012342851608991623, -0.01002907007932663, -0.09116507321596146, 0.04245874285697937, -0.23945367336273193, 0.057065241038799286, 0.02432645857334137, -0.13121874630451202, 0.058239564299583435, -0.1498565822839737, 0.0377633273601532, -0.4905492067337036, 0.08465886116027832, -0.28318125009536743, 0.26231223344802856, 0.41524767875671387, -0.0001317612041020766, -0.043445006012916565, 0.44141310453414917, 0.06704552471637726, -0.4016268253326416, -0.026938900351524353, 0.0398440808057785, -0.1301041841506958, 0.33474305272102356, -0.13870953023433685, -0.022732801735401154, -0.5756148099899292, -0.13077782094478607, -0.33226820826530457, 0.544452965259552, 0.4350407123565674, 0.07023665308952332, -0.05130423605442047, 0.3298935890197754, 0.20461273193359375, 0.29966476559638977, 0.6489039659500122, -0.1374422311782837, 0.40133538842201233, 0.03283761441707611, 0.14691674709320068, 0.023384761065244675, -0.048080869019031525, -0.0793818011879921, -0.023378439247608185, 0.28368502855300903, 0.20773547887802124, 0.12684446573257446, -0.14009369909763336, 0.012772811576724052, 0.13773725926876068, 0.5513536334037781, -0.36300843954086304, -0.37143874168395996, -0.14967603981494904, -0.2125922441482544, -0.3199484050273895, 0.043510355055332184, -0.11694379895925522, -0.2649899125099182, 0.2442803978919983, 0.20584505796432495, 0.0355137474834919, -0.3506758511066437, 0.3200681805610657, -0.1849258542060852, 0.0269772931933403, 0.1276206374168396, 0.21029329299926758, 0.11249217391014099, -0.27033618092536926, 0.4169246256351471, -0.14622822403907776, -0.032401859760284424, -0.025840137153863907, -0.06712818145751953, -0.169371098279953, -0.22175544500350952, -0.2578951120376587, 0.0908009260892868, -0.03408975899219513, -0.02269608899950981, 0.03672606870532036, -0.0050440579652786255, -0.12479038536548615, 0.4130377471446991, 0.0827433168888092, 0.039570435881614685, 0.25916868448257446, 0.20735713839530945, 0.01611567661166191, 0.285790354013443, 0.10380230844020844, 0.07224137336015701, -0.09320913255214691, 0.4050785303115845, -0.05244431644678116, 0.16210022568702698, -0.04876535385847092, -0.29105183482170105, 0.07216474413871765, -0.6111747026443481, 0.18944182991981506, -0.11021093279123306, 0.04241054132580757, 0.004937369376420975, 0.44487234950065613, 0.08133838325738907, 0.3103502690792084, -0.10032954812049866, -0.07207661122083664, 0.0947200208902359, -0.12463335692882538, -0.0978211909532547, -0.27456557750701904, -0.04019556939601898, 0.12329506129026413, -0.13801389932632446, 0.40772366523742676, -0.052936285734176636, -0.055610448122024536, -0.09198953211307526, -0.1334500014781952, 0.08158136904239655, 0.013636525720357895, -0.41239264607429504, 0.15235309302806854, 0.19098494946956635, -0.40223392844200134, -0.15657687187194824, 0.333595871925354, -0.11086785048246384, 0.033031217753887177, -0.3107905089855194, -0.029562324285507202, -0.05123405158519745, -0.21259668469429016, -0.3772575855255127, 0.24518828094005585, 0.26679012179374695, 0.01575528085231781, 0.1734124720096588, -0.3423280119895935, 0.413823664188385, -0.3656572103500366, -0.08409266173839569, 0.3049129247665405, -0.6361575126647949, 0.07318776845932007, -0.1535482555627823, 0.06406707316637039, 0.4378410875797272, 0.37734368443489075, -0.19778260588645935, -0.04368342086672783, -0.06205577403306961, 0.22503802180290222, 0.16233918070793152, -0.1378074586391449, -0.3535785675048828, 0.241702601313591, 0.1363985687494278, -0.00938107818365097, -0.038913074880838394, 0.040061336010694504, 0.18245966732501984, -0.14371511340141296, 0.05915384367108345, 0.1696394383907318, -0.17382700741291046, 0.029250048100948334, -0.16769157350063324, -0.17859910428524017, 0.3549136221408844, -0.013313744217157364, 0.0034212663304060698, 0.02643437683582306, 0.19686736166477203, -0.06882424652576447, 0.2156662791967392, -0.15504615008831024, 0.10035037249326706, -0.022476401180028915, 0.37753888964653015, -0.14889350533485413, 0.2793637216091156, -0.11294741928577423, -0.34422069787979126, -0.15106989443302155, -0.23381999135017395, -0.07369101792573929, -0.3593275845050812, -0.20009289681911469, -0.30405688285827637, 0.18400879204273224, 0.038179248571395874, 0.3048066198825836, 0.004774533212184906, -0.020261958241462708, -0.11883407831192017, 0.11887723207473755, -0.12279228121042252, -0.3621215224266052, 0.07618603855371475, 0.2499420940876007, -0.007870765402913094, 0.08956357091665268, 0.06359481811523438, -0.2630056142807007, -0.13395199179649353, 0.1502106487751007, 0.06530935317277908, -0.05439629405736923, -0.22659270465373993, 0.3461587131023407, 0.1868382692337036, -0.01720879226922989, -0.13514026999473572, 0.20201930403709412, 0.37800878286361694, -0.5087366700172424, -0.09416038542985916, 0.6718674302101135, 0.11891787499189377, -0.07466357201337814, -0.13532641530036926, 0.146342933177948, 0.09563674032688141, 0.39795756340026855, -0.3194040060043335, 0.4579794406890869, 0.4523769021034241, 0.18467701971530914, -0.058840375393629074, 0.006894238293170929, -0.17809957265853882, 0.06968113780021667, -0.005111515522003174, 0.17133179306983948, -0.3537219166755676, 0.26184985041618347, 0.0479670949280262, -0.13460123538970947, 0.390590637922287, 0.21623176336288452, -0.24873393774032593, -0.12194779515266418, 0.4233745336532593, -0.06000459939241409, 0.1352468580007553, 0.05816541984677315, 0.08680246770381927, -0.10834255069494247, -0.2522042393684387, -0.09179632365703583, 0.33084264397621155, 0.08336364477872849, 0.33448225259780884, 0.01614975929260254, 0.28564882278442383, -0.05391469597816467, -0.1570063680410385, -0.049382857978343964, 0.05549365282058716, 0.18040406703948975, -0.5236549377441406, 0.26893970370292664, -0.6220015287399292, 0.08874008059501648, -0.08911348134279251, -0.4559546113014221, 0.005153682082891464, -0.18408066034317017, -0.010516662150621414, 0.07603652030229568, -0.22664609551429749, 0.15313947200775146, 0.024538181722164154, 0.112395741045475, 0.03475208580493927, -0.2968834638595581, -0.48707669973373413, -0.26656410098075867, -0.5041369795799255, -0.09755642712116241, 0.44512924551963806, -0.1685584932565689, 0.1408427357673645, -0.1171388030052185, -0.22496436536312103, -0.35265278816223145, -0.42979326844215393, 0.10923384875059128, -0.07495081424713135, 0.22687296569347382, 0.4312315583229065, 0.07836148142814636, -0.2897133231163025, 0.13603335618972778, 0.14774438738822937, 0.20398670434951782, -0.09927375614643097, 0.4640589654445648, -0.1990589201450348, 0.06263477355241776, -0.047228965908288956, -0.1317325085401535, -0.10859347134828568, -0.04663682356476784, 0.2175704389810562, 0.032142966985702515, 0.10281575471162796, 0.2318897843360901, 0.3037424087524414, 0.0024510659277439117, -0.002467367798089981, -0.041805483400821686, 0.009267814457416534, 0.5598138570785522, 0.425351619720459, 0.027597103267908096, -0.27793726325035095, -0.1173478290438652, -0.1464223563671112, -0.14360371232032776, 0.31547340750694275, -0.27895739674568176, -0.019483324140310287, -0.41584283113479614, 0.3654114902019501, -0.3003547191619873, -0.05146580934524536, 0.18944616615772247, 0.2566225230693817, 0.05419998615980148, -0.17485719919204712, 0.12276381254196167, 0.21628324687480927, -0.09599737077951431, 0.36916863918304443, 0.3115752041339874, 0.4768694043159485, 0.11151553690433502, 0.5113764405250549, 0.23471416532993317, -0.4074247479438782, 0.292664498090744, -0.20278289914131165, 0.04919078201055527, -0.052546847611665726, 0.08780569583177567, -0.21398182213306427, -0.07645127177238464, -0.05743632838129997, 0.005947384983301163, -0.13049189746379852, -0.17282885313034058, 0.13342756032943726, 0.0934557318687439, -0.16954141855239868, -0.21981482207775116, 0.13877266645431519, -0.4732600450515747, -0.06512448191642761, -0.1136760413646698, 0.21265169978141785, -0.008510611951351166, -0.17001447081565857, 0.3119580149650574, -0.10762698948383331, 0.06420500576496124, 0.11489009112119675, -0.0026820898056030273, -0.34382688999176025, -0.20760390162467957, 0.30798470973968506, 0.038252122700214386, 0.4472110867500305, 0.12195774912834167, -0.08503970503807068, 0.10881686210632324, 0.09158814698457718, 0.24134087562561035, 0.0031168051064014435, -0.1577194482088089, -0.007532492280006409, 0.1797630488872528, -0.4071444869041443, 0.00048789381980895996, -0.42057114839553833, 0.36802226305007935, -0.11087506264448166, 0.11444618552923203, -0.8034756779670715, -0.012931939214468002, 0.039641525596380234, 0.266434907913208, -0.016213305294513702, 0.056228622794151306, -0.01662987470626831, -0.49156659841537476, -0.24248185753822327, 0.12883177399635315, 0.481178879737854, 0.23719550669193268, 0.003879062831401825, -0.3535950183868408, -0.45700275897979736, -0.2629300355911255, 0.06288468837738037, -0.013617750257253647, 0.4451967477798462, -0.2725300192832947, -0.12437720596790314, -0.2128947377204895, 0.2886393666267395, 0.5579573512077332, 0.3180601894855499, 0.37396255135536194, -0.7592387199401855, -0.0069437697529792786, -0.03729483485221863, 0.145382821559906, 0.05208071321249008, -0.22304852306842804, 0.06593962758779526, -0.12393592298030853, 0.013838467188179493, 0.1181478500366211, -0.11855863034725189, 0.16297698020935059, 0.032313525676727295, -0.1438276320695877, -0.017771035432815552, 0.6464676856994629, -0.00929214060306549, -0.059090226888656616, 0.21741151809692383, 0.4983188509941101, -0.21270260214805603, 0.2576577663421631, 0.6020824313163757, 1.0010310411453247, 0.05988844856619835, 0.09912264347076416, 0.3623828887939453, -0.39105406403541565, 0.35718676447868347, 0.3669518232345581, -0.15701909363269806, -0.5157111287117004, 0.309291273355484, -0.06841548532247543, -0.15495769679546356, -0.02155883237719536, 0.20251771807670593, -0.29689761996269226, 0.1313696950674057, -0.6691046953201294, 0.40363338589668274, 0.3493695557117462, -0.16615718603134155, -0.255592405796051, -0.1450258046388626, -0.1547742486000061, -0.016563907265663147, -0.16202402114868164, -0.13027632236480713, -0.11125317215919495, -0.2772071659564972, -0.3061896562576294, -0.06431369483470917, -0.230427086353302, -0.03603306785225868, -0.2759392559528351, 0.1841571033000946, 0.1732054203748703, -0.4182802438735962, 0.09120269864797592, 0.43467339873313904, 0.32877010107040405, -0.01560239028185606, -0.2971608638763428, -0.11027245223522186, 0.09209410846233368, 0.11734656989574432, 0.30052417516708374, -0.1569165140390396, 0.3818913996219635, 0.12007638812065125, -0.03431802988052368, 0.033526621758937836, -0.08072464168071747, -0.17581012845039368, -0.03412725031375885, -0.13466870784759521, -0.13165612518787384, -0.28367406129837036, 0.24343301355838776, -0.40169790387153625, -0.26941585540771484, -0.1577327847480774, -0.026335489004850388, 0.03235399350523949, 0.18451499938964844, 0.30028122663497925, -0.15308868885040283, -0.07603208720684052, 0.08267554640769958, -0.14544163644313812, 0.0783679187297821, -0.007432997226715088, 0.3519967198371887, 0.1562892198562622, -0.28127387166023254, -0.12082616239786148, 0.1561497151851654, 0.0823395848274231, -0.6633656024932861, 0.6123895049095154, -0.3527780771255493, -0.10059669613838196, -0.2328883558511734, 0.22014835476875305, 0.22176975011825562, 0.13729539513587952, -0.3115280270576477, -0.12726256251335144, -0.20221351087093353, 0.29961255192756653, 0.059507403522729874, 0.10115323960781097, -0.10088291764259338, -0.12644453346729279, -0.08313771337270737, -0.4355825185775757, -0.09865736216306686, -0.04030732810497284, 0.1129901185631752, 0.04407603293657303, -0.4419967532157898, 0.1538456678390503, -0.05744502693414688, 0.01747914031147957, -0.011097703129053116, 0.2195933759212494, 0.35358744859695435, -0.028012173250317574, -0.014217406511306763, 0.21133284270763397, 0.18211281299591064, -0.169499009847641, 0.09009674191474915, -0.2102624773979187, -0.19886015355587006, -0.18808376789093018, -0.22832222282886505, 0.09278547018766403, -0.058830685913562775, 0.19287097454071045, 0.5386662483215332, 0.17694711685180664, -0.022297561168670654, 0.16165460646152496, -0.0915631577372551, 0.3068058490753174, -0.267919659614563, 0.3804546594619751, 0.2615576982498169, -0.10977569222450256, -0.20246057212352753, 0.2799474596977234, 0.2583938539028168, -0.15138643980026245, 0.34097909927368164, -0.30192330479621887, -0.10776840150356293, 0.2512286901473999, 0.37390097975730896, 0.5679665207862854, -0.32210326194763184, -0.029824957251548767, 0.26851874589920044, 0.0070082382299005985, -0.2655181884765625, -0.09679576754570007, -0.29180434346199036, 0.05367983505129814, -0.16490668058395386, 0.34933212399482727, 0.00020875036716461182, -0.09546380490064621, -0.13367386162281036, -0.10884211957454681, -0.00023487210273742676, -0.1498594582080841, -0.021227333694696426, 0.82445228099823, -0.07959052175283432, -0.040142983198165894, 0.3826279640197754, -0.20422929525375366, 0.21403291821479797, 0.18416564166545868, -0.2076752930879593, 0.16880211234092712, 0.23953790962696075, -0.08054958283901215, 0.22836437821388245, 0.14108087122440338, -0.018421350046992302, 0.14839597046375275, 0.32652607560157776, 0.02975362166762352, 0.47019296884536743, 0.5095992684364319, 0.10397842526435852, -0.10530444979667664, -0.31998682022094727, -0.057373058050870895, -0.14800599217414856, -0.050724856555461884, -0.28661826252937317, 0.0004470348358154297, -0.23089483380317688, -0.31619709730148315, -0.3596077263355255, -0.13681849837303162, 0.48051273822784424, 0.27203357219696045, 0.04912970960140228, -0.6377260684967041, 0.3311973214149475, 0.12920738756656647, 0.3132954239845276, -0.13360390067100525, -0.03882831335067749, 0.2192588746547699, -0.30350399017333984, -0.002673825714737177, 0.23843353986740112, 0.28801101446151733, 0.4700988233089447, -0.4987359642982483, 0.06966470927000046, -0.17166569828987122, -0.19809529185295105, 0.056356191635131836, 0.27331456542015076, -0.08425179123878479, 0.18346931040287018, 0.24535779654979706, -0.06187531724572182, 0.029034603387117386, 0.021813606843352318, -0.13191771507263184, 0.05907254293560982, -0.08050160109996796, 0.527717113494873, -0.10158482193946838, -0.17517691850662231, 0.17115047574043274, -0.160821333527565, 0.031631432473659515, -0.4209369122982025, 0.2947232723236084, -0.006085403263568878, 0.07963642477989197, -0.018622485920786858, -0.007535630837082863, -0.016115479171276093, 0.25688058137893677, 0.032272256910800934, 0.19239787757396698, -0.12631092965602875, 0.35003289580345154, -0.4641566574573517, 0.13124524056911469, 0.11899752914905548, -0.3092339038848877, 0.467562735080719, 0.2688865065574646, 0.06052769348025322, 0.412538081407547, 0.29055970907211304, 0.16136479377746582, 0.08003988116979599, 0.41237857937812805, 0.08394496142864227, -0.0804360955953598, 0.032455623149871826, 0.04972319304943085, -0.09441141784191132, -0.36901211738586426, 0.5860493183135986, 0.16629990935325623, -0.09941602498292923, -0.11778679490089417, 0.024264156818389893, 0.35918182134628296, -0.07725116610527039, 0.21031300723552704, 0.3700277805328369, 0.22688625752925873, 0.09038340300321579, 0.008393913507461548, -0.07686588168144226, -0.2579107880592346, -0.517748236656189, 0.4352785348892212, -0.3379300534725189, 0.023059040307998657, -0.22747796773910522, 0.022334111854434013, -0.182450532913208, -0.1368499994277954, 0.040114082396030426, 0.08275900781154633, -0.548250138759613, 0.3058655858039856, -0.34010034799575806, 0.024329639971256256, 0.032635197043418884, 0.08888506889343262, 0.07851386815309525, 0.26627254486083984, -0.22932404279708862, -0.7095010280609131, 0.31887078285217285, -0.22307541966438293, -0.2581397593021393, 0.19129715859889984, 0.04589449614286423, 0.2611640989780426, -0.16886098682880402, -0.2792910933494568, -0.2516116797924042, 0.32853639125823975, 0.01860225945711136, -0.04695826396346092, -0.131272092461586, 0.11324877291917801, 0.1597370207309723, -0.22598899900913239, 0.6453506946563721, -0.16285067796707153, 0.18914709985256195, 0.04651808738708496, -0.38776475191116333 ]
https://github.com/huggingface/datasets/issues/6324
> Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix. > > JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon. > > Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets` Ok many thanks, I was able to mitigate the problem by manually checking and converting all problematic fields now.
Conversion to Arrow fails due to wrong type heuristic
### Describe the bug I have a list of dictionaries with valid/JSON-serializable values. One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on. If trying to convert this list to a dataset with `Dataset.from_list()`, I always get `ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers. Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation. ### Steps to reproduce the bug * create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset. ### Expected behavior There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion). ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35 - Python version: 3.9.18 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.1
121
Conversion to Arrow fails due to wrong type heuristic ### Describe the bug I have a list of dictionaries with valid/JSON-serializable values. One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on. If trying to convert this list to a dataset with `Dataset.from_list()`, I always get `ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers. Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation. ### Steps to reproduce the bug * create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset. ### Expected behavior There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion). ### Environment info - `datasets` version: 2.14.5 - Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35 - Python version: 3.9.18 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.1 > Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix. > > JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon. > > Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets` Ok many thanks, I was able to mitigate the problem by manually checking and converting all problematic fields now.
[ -0.1248508095741272, -0.08872330188751221, 0.048213206231594086, 0.19750455021858215, 0.49781298637390137, -0.03315145522356033, 0.23462632298469543, 0.31393522024154663, -0.23804914951324463, -0.1408153772354126, 0.0366579070687294, 0.5494917035102844, -0.01877778209745884, -0.018783610314130783, -0.21995508670806885, -0.15037119388580322, 0.15172040462493896, 0.1365804523229599, -0.012384850531816483, -0.010054893791675568, -0.09933912754058838, 0.04565972834825516, -0.2399047315120697, 0.07427055388689041, 0.037501011043787, -0.12871351838111877, 0.07079906761646271, -0.11871064454317093, 0.02520688623189926, -0.4888632893562317, 0.06472336500883102, -0.312876433134079, 0.24496044218540192, 0.4183101952075958, -0.0001309766375925392, -0.04467630386352539, 0.42467331886291504, 0.07202758640050888, -0.37701690196990967, -0.05143417418003082, 0.06265890598297119, -0.12973447144031525, 0.33196544647216797, -0.13580887019634247, -0.0347796306014061, -0.5479254722595215, -0.13242903351783752, -0.29716479778289795, 0.5558774471282959, 0.45699581503868103, 0.07180281728506088, -0.03845372423529625, 0.3484286069869995, 0.21632418036460876, 0.30520257353782654, 0.6268173456192017, -0.13907074928283691, 0.4030269980430603, 0.03302169218659401, 0.14916366338729858, 0.018470197916030884, -0.046522967517375946, -0.08618058264255524, -0.047327689826488495, 0.2776552140712738, 0.19641435146331787, 0.1369820535182953, -0.14987313747406006, 0.029303837567567825, 0.12405133247375488, 0.53195720911026, -0.373921662569046, -0.3665941655635834, -0.13749554753303528, -0.21402746438980103, -0.34231919050216675, 0.06150569021701813, -0.11081968247890472, -0.2609385550022125, 0.2373226433992386, 0.21721334755420685, 0.045584555715322495, -0.36760658025741577, 0.31115227937698364, -0.1976626068353653, 0.030031569302082062, 0.1292569786310196, 0.20669114589691162, 0.09616763144731522, -0.27849337458610535, 0.4205982983112335, -0.1484755575656891, -0.029868967831134796, -0.029490530490875244, -0.08686122298240662, -0.17717328667640686, -0.22019872069358826, -0.2893076539039612, 0.0837419331073761, -0.03414088115096092, -0.019793882966041565, 0.050323210656642914, 0.013588085770606995, -0.12294471263885498, 0.4110124707221985, 0.08835554122924805, 0.02122492715716362, 0.2608735263347626, 0.20237037539482117, 0.03466305881738663, 0.27289828658103943, 0.0980568677186966, 0.08154194802045822, -0.10471036285161972, 0.3900800049304962, -0.04639098420739174, 0.1691248118877411, -0.06328977644443512, -0.2844916582107544, 0.07756033539772034, -0.6172124743461609, 0.1965167075395584, -0.10106241703033447, 0.04539027065038681, 0.002973400056362152, 0.42635250091552734, 0.08328212797641754, 0.326416015625, -0.08917186409235, -0.07022709399461746, 0.09188033640384674, -0.11686709523200989, -0.11458529531955719, -0.2665277123451233, -0.04517402499914169, 0.12249405682086945, -0.13094189763069153, 0.4120767116546631, -0.062075626105070114, -0.06806599348783493, -0.11258585751056671, -0.1472538709640503, 0.07038338482379913, 0.023985974490642548, -0.4142841696739197, 0.15462656319141388, 0.20224615931510925, -0.39543381333351135, -0.14234519004821777, 0.3421092629432678, -0.12517745792865753, 0.016053155064582825, -0.29473307728767395, -0.027946501970291138, -0.03825294226408005, -0.2177594006061554, -0.37927788496017456, 0.24460537731647491, 0.27265670895576477, 0.025490403175354004, 0.18006129562854767, -0.33947575092315674, 0.404485821723938, -0.3628953695297241, -0.08468479663133621, 0.30810269713401794, -0.6199201345443726, 0.09635045379400253, -0.14590054750442505, 0.07215786725282669, 0.4422955811023712, 0.3883831799030304, -0.19949817657470703, -0.04880600795149803, -0.04793539643287659, 0.2337374985218048, 0.16463136672973633, -0.14705544710159302, -0.34062325954437256, 0.24772104620933533, 0.1263035535812378, 0.0021105334162712097, -0.05334664136171341, 0.015441138297319412, 0.1812959909439087, -0.14097462594509125, 0.023608360439538956, 0.16800710558891296, -0.17859163880348206, 0.05367136001586914, -0.18764136731624603, -0.1649438440799713, 0.36382654309272766, -0.015086546540260315, 0.02033914625644684, 0.01887540891766548, 0.20071949064731598, -0.06652825325727463, 0.21073171496391296, -0.156509667634964, 0.09634719043970108, -0.01939762756228447, 0.3838253915309906, -0.1707778424024582, 0.2705715000629425, -0.11428207159042358, -0.34400904178619385, -0.1538631021976471, -0.26064133644104004, -0.049010347574949265, -0.36139893531799316, -0.16486825048923492, -0.32079023122787476, 0.18104779720306396, 0.0449308417737484, 0.2957487106323242, 0.008472632616758347, -0.03283732384443283, -0.13624674081802368, 0.12104704231023788, -0.1253838837146759, -0.37658941745758057, 0.05252007395029068, 0.2665720582008362, -0.000799279659986496, 0.0816858634352684, 0.05703691393136978, -0.2683147192001343, -0.13456228375434875, 0.13664421439170837, 0.10060587525367737, -0.049578212201595306, -0.23878160119056702, 0.3401774764060974, 0.18884453177452087, 0.0020415261387825012, -0.15255074203014374, 0.1931576430797577, 0.3829728364944458, -0.5196549296379089, -0.09672278165817261, 0.6666401624679565, 0.10906928032636642, -0.08511078357696533, -0.10754254460334778, 0.14355120062828064, 0.10820309817790985, 0.3975933790206909, -0.3035767078399658, 0.4429405927658081, 0.46299853920936584, 0.16140727698802948, -0.04210268333554268, 0.018955938518047333, -0.1779833883047104, 0.09678623080253601, -0.013321943581104279, 0.17742331326007843, -0.3669865131378174, 0.2790655493736267, 0.05832500383257866, -0.13051050901412964, 0.3602922558784485, 0.2323283851146698, -0.2235950231552124, -0.13190995156764984, 0.41352343559265137, -0.06464006006717682, 0.1287740021944046, 0.05590033903717995, 0.07526253908872604, -0.0891263484954834, -0.2472197711467743, -0.09558792412281036, 0.3520914614200592, 0.07089059054851532, 0.35514768958091736, 0.025747060775756836, 0.2878982126712799, -0.04859260469675064, -0.1592743694782257, -0.026901759207248688, 0.08734942227602005, 0.19570791721343994, -0.5355432033538818, 0.26507070660591125, -0.6220180988311768, 0.09528079628944397, -0.101531982421875, -0.46701788902282715, -0.006573881953954697, -0.16697807610034943, -0.007162447087466717, 0.10044148564338684, -0.22346094250679016, 0.168307363986969, 0.057826071977615356, 0.10292969644069672, 0.03898577392101288, -0.30002257227897644, -0.4990983009338379, -0.2660031318664551, -0.5077593326568604, -0.09522006660699844, 0.467855304479599, -0.17273563146591187, 0.1259196251630783, -0.09720391780138016, -0.23784589767456055, -0.373249351978302, -0.43688252568244934, 0.09693491458892822, -0.0902949646115303, 0.21775133907794952, 0.40468481183052063, 0.09469291567802429, -0.28506284952163696, 0.12604792416095734, 0.15137514472007751, 0.20598538219928741, -0.11129158735275269, 0.49780651926994324, -0.21077218651771545, 0.04641706496477127, -0.04633867368102074, -0.14030268788337708, -0.10513530671596527, -0.04673679918050766, 0.20596939325332642, 0.03304551541805267, 0.10679909586906433, 0.245944082736969, 0.29440078139305115, -0.014608532190322876, 0.008610174059867859, -0.0410296767950058, 0.011982318013906479, 0.5468544960021973, 0.41425013542175293, 0.024842683225870132, -0.28746384382247925, -0.11097357422113419, -0.13534119725227356, -0.13455919921398163, 0.3339925706386566, -0.29190686345100403, -0.009124744683504105, -0.40571704506874084, 0.3602810502052307, -0.30964359641075134, -0.06920157372951508, 0.19511525332927704, 0.2649436295032501, 0.053969595581293106, -0.16031746566295624, 0.1130332350730896, 0.2090335488319397, -0.0824216827750206, 0.3965796232223511, 0.289350688457489, 0.4936217665672302, 0.12367203086614609, 0.5195543766021729, 0.21731559932231903, -0.3990577757358551, 0.3025692403316498, -0.2043454945087433, 0.036084480583667755, -0.05512847378849983, 0.07674616575241089, -0.20297452807426453, -0.0821138471364975, -0.0566616952419281, -0.0009359754621982574, -0.15559673309326172, -0.18531331419944763, 0.12514635920524597, 0.08589374274015427, -0.17863932251930237, -0.22273573279380798, 0.14881393313407898, -0.45223796367645264, -0.048209622502326965, -0.10321003198623657, 0.2113393396139145, -0.010280102491378784, -0.19288207590579987, 0.319025456905365, -0.10384583473205566, 0.05225852504372597, 0.11071246862411499, 0.01737044006586075, -0.36291494965553284, -0.20719078183174133, 0.3008168637752533, 0.040537279099226, 0.440803587436676, 0.11034167557954788, -0.07987748831510544, 0.11559011042118073, 0.08734831213951111, 0.24209639430046082, 0.016933703795075417, -0.15507078170776367, -0.0074722059071063995, 0.16305741667747498, -0.38292503356933594, -0.005627073347568512, -0.41128048300743103, 0.354558527469635, -0.11555324494838715, 0.13620899617671967, -0.819772481918335, -0.022576117888092995, 0.04205615818500519, 0.2647673785686493, -0.02285926789045334, 0.056640997529029846, -0.02195669710636139, -0.4991355538368225, -0.24231946468353271, 0.12746255099773407, 0.47022950649261475, 0.24247872829437256, -0.000043313950300216675, -0.3485270142555237, -0.43527132272720337, -0.25219613313674927, 0.048502348363399506, 0.0028568506240844727, 0.4266049563884735, -0.2776728570461273, -0.12490393966436386, -0.22906246781349182, 0.27724504470825195, 0.572696328163147, 0.3082244396209717, 0.3845006227493286, -0.7485796809196472, -0.022111767902970314, -0.030758092179894447, 0.13924361765384674, 0.07678312808275223, -0.22449681162834167, 0.0838804617524147, -0.14268150925636292, 0.00823734886944294, 0.12355628609657288, -0.1489967554807663, 0.18988549709320068, 0.023252036422491074, -0.1176452785730362, -0.0033320337533950806, 0.6376662850379944, -0.04553604871034622, -0.04053572565317154, 0.1991077959537506, 0.5017045736312866, -0.2004740983247757, 0.27085891366004944, 0.5901238918304443, 1.020371675491333, 0.04825136810541153, 0.07841850072145462, 0.383080393075943, -0.3999914824962616, 0.36987000703811646, 0.36176449060440063, -0.15506069362163544, -0.5382653474807739, 0.2988579273223877, -0.06103982776403427, -0.14565905928611755, 0.0024779364466667175, 0.20680934190750122, -0.297104150056839, 0.12575459480285645, -0.6548371911048889, 0.39121490716934204, 0.3456951975822449, -0.16955137252807617, -0.24306218326091766, -0.15487869083881378, -0.19291651248931885, -0.018245983868837357, -0.18454059958457947, -0.13639870285987854, -0.1088724136352539, -0.2958383858203888, -0.31083059310913086, -0.07330314069986343, -0.2220090627670288, -0.009167477488517761, -0.2834826409816742, 0.18684285879135132, 0.17457878589630127, -0.40624427795410156, 0.09771507978439331, 0.4115564227104187, 0.34862011671066284, -0.03896432742476463, -0.2928246855735779, -0.10306648910045624, 0.10090655088424683, 0.11684862524271011, 0.29119154810905457, -0.14586371183395386, 0.3995174467563629, 0.0974385067820549, -0.03437855839729309, 0.04196303337812424, -0.09341646730899811, -0.17231759428977966, -0.02687019109725952, -0.144923597574234, -0.13257968425750732, -0.28857696056365967, 0.22461268305778503, -0.40008169412612915, -0.27915817499160767, -0.16805455088615417, -0.02113558165729046, 0.014200359582901001, 0.18040111660957336, 0.3103284239768982, -0.17262309789657593, -0.08694028109312057, 0.07323042303323746, -0.1589977741241455, 0.05056332051753998, 0.010137423872947693, 0.3595614433288574, 0.15576039254665375, -0.2807541489601135, -0.11384716629981995, 0.14202919602394104, 0.06410090625286102, -0.6596925854682922, 0.6000437140464783, -0.34438151121139526, -0.1057751476764679, -0.226810485124588, 0.210820272564888, 0.2238927036523819, 0.14070197939872742, -0.2978651821613312, -0.13834959268569946, -0.20123955607414246, 0.2867884337902069, 0.06349526345729828, 0.0865045040845871, -0.09522373229265213, -0.07607118785381317, -0.07539700716733932, -0.42225611209869385, -0.10263088345527649, -0.02713119424879551, 0.10030953586101532, 0.05855681002140045, -0.4548484683036804, 0.14600816369056702, -0.0576496347784996, 0.019477568566799164, -0.013091571629047394, 0.22069083154201508, 0.3604148328304291, -0.029252778738737106, -0.02230529859662056, 0.21260130405426025, 0.20891150832176208, -0.17487427592277527, 0.08130332827568054, -0.21398219466209412, -0.19344313442707062, -0.18086056411266327, -0.23221898078918457, 0.1078096479177475, -0.06067054718732834, 0.18876859545707703, 0.5265472531318665, 0.1802578866481781, -0.03289143368601799, 0.15798074007034302, -0.10781349241733551, 0.309568852186203, -0.2680620551109314, 0.3760089576244354, 0.23981674015522003, -0.11390389502048492, -0.21812750399112701, 0.26240670680999756, 0.2600095272064209, -0.16013169288635254, 0.36154845356941223, -0.30030202865600586, -0.13033410906791687, 0.24425238370895386, 0.36832961440086365, 0.5649338364601135, -0.33131852746009827, -0.0337352380156517, 0.274750679731369, 0.005951395258307457, -0.28236663341522217, -0.08456964790821075, -0.3026978373527527, 0.028203003108501434, -0.1692824363708496, 0.33822333812713623, 0.014153137803077698, -0.09675745666027069, -0.11278382688760757, -0.10285018384456635, 0.017700590193271637, -0.15101897716522217, -0.02582719922065735, 0.797910749912262, -0.09434133768081665, -0.03580470010638237, 0.3837900161743164, -0.18323396146297455, 0.20339202880859375, 0.15591959655284882, -0.19583241641521454, 0.14498446881771088, 0.2044275552034378, -0.09304540604352951, 0.215008944272995, 0.1329997032880783, -0.027263600379228592, 0.1539919525384903, 0.3205920159816742, 0.01775294914841652, 0.4642985463142395, 0.5076863765716553, 0.12105397880077362, -0.10204247385263443, -0.30655795335769653, -0.023227812722325325, -0.14856599271297455, -0.024384859949350357, -0.2788255214691162, 0.0064617544412612915, -0.2400500327348709, -0.3175477683544159, -0.357234925031662, -0.12640970945358276, 0.47649329900741577, 0.29650571942329407, 0.02860935404896736, -0.6129868626594543, 0.2997026741504669, 0.13684922456741333, 0.31664592027664185, -0.1379999965429306, -0.027480442076921463, 0.21586066484451294, -0.3315263092517853, -0.01334539894014597, 0.2374865710735321, 0.2848586142063141, 0.49884340167045593, -0.5094783306121826, 0.07079797238111496, -0.15669657289981842, -0.2109990119934082, 0.07478396594524384, 0.2802240252494812, -0.07949812710285187, 0.18983489274978638, 0.24559076130390167, -0.06529572606086731, 0.02780793234705925, 0.018173128366470337, -0.10215599834918976, 0.0667266771197319, -0.05988641455769539, 0.515333354473114, -0.08775043487548828, -0.17590531706809998, 0.16021332144737244, -0.17068472504615784, 0.02614244818687439, -0.40667665004730225, 0.2906053960323334, -0.002120252698659897, 0.0942472591996193, -0.02369392290711403, -0.0037806443870067596, 0.00421542301774025, 0.270651251077652, 0.020559098571538925, 0.17790067195892334, -0.16110414266586304, 0.34952694177627563, -0.4689393639564514, 0.15801110863685608, 0.13197097182273865, -0.28175273537635803, 0.4813889265060425, 0.2688392996788025, 0.06086144596338272, 0.39411312341690063, 0.28880712389945984, 0.1314832866191864, 0.09360795468091965, 0.42706170678138733, 0.09226520359516144, -0.07046985626220703, 0.033606164157390594, 0.04133038967847824, -0.10111625492572784, -0.3493728041648865, 0.6117340326309204, 0.17006541788578033, -0.09659267216920853, -0.12304240465164185, 0.029964253306388855, 0.35402756929397583, -0.05689869448542595, 0.18597476184368134, 0.35872262716293335, 0.23080018162727356, 0.07904665172100067, 0.004006318747997284, -0.06611742079257965, -0.2571455240249634, -0.5300301909446716, 0.44035857915878296, -0.3217920660972595, 0.0035520270466804504, -0.1943970024585724, 0.0009369291365146637, -0.20649877190589905, -0.11848527938127518, 0.038522884249687195, 0.05135250464081764, -0.5619799494743347, 0.3011113107204437, -0.31023451685905457, 0.024811476469039917, 0.03491417318582535, 0.10210363566875458, 0.08559352159500122, 0.2827630043029785, -0.251893013715744, -0.7251496315002441, 0.32851406931877136, -0.22938501834869385, -0.25900498032569885, 0.19817012548446655, 0.05380881205201149, 0.24074918031692505, -0.1684935986995697, -0.2863013744354248, -0.2519225478172302, 0.31533122062683105, 0.017704878002405167, -0.0480676144361496, -0.13347595930099487, 0.09746773540973663, 0.1633789986371994, -0.22014190256595612, 0.6513062715530396, -0.14597368240356445, 0.19833844900131226, 0.045170463621616364, -0.36665016412734985 ]
https://github.com/huggingface/datasets/issues/6320
The expression "train+test" concatenates the splits. The individual splits as separate datasets can be obtained as follows: ```python train_ds, test_ds = load_dataset("<dataset_name>", split=["train", "test"]) train_10pct_ds, test_10pct_ds = load_dataset("<dataset_name>", split=["train[:10%]", "test[:%10]"]) ```
Dataset slice splits can't load training and validation at the same time
### Describe the bug According to the [documentation](https://huggingface.co/docs/datasets/v2.14.5/loading#slice-splits) is should be possible to run the following command: `train_test_ds = datasets.load_dataset("bookcorpus", split="train+test")` to load the train and test sets from the dataset. However executing the equivalent code: `speech_commands_v1 = load_dataset("superb", "ks", split="train+test")` only yields the following output: > Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 54175 > }) Where loading the dataset without the split argument yields: > DatasetDict({ > train: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 51094 > }) > validation: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 6798 > }) > test: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 3081 > }) > }) Thus, the API seems to be broken in this regard. This is a bit annoying since I want to be able to use the split argument with `split="train[:10%]+test[:10%]"` to have smaller dataset to work with when validating my model is working correctly. ### Steps to reproduce the bug `speech_commands_v1 = load_dataset("superb", "ks", split="train+test")` ### Expected behavior > DatasetDict({ > train: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 51094 > }) > test: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 3081 > }) > }) ### Environment info ``` import datasets print(datasets.__version__) ``` > 2.14.5 ``` import sys print(sys.version) ``` > 3.9.17 (main, Jul 5 2023, 20:41:20) > [GCC 11.2.0]
31
Dataset slice splits can't load training and validation at the same time ### Describe the bug According to the [documentation](https://huggingface.co/docs/datasets/v2.14.5/loading#slice-splits) is should be possible to run the following command: `train_test_ds = datasets.load_dataset("bookcorpus", split="train+test")` to load the train and test sets from the dataset. However executing the equivalent code: `speech_commands_v1 = load_dataset("superb", "ks", split="train+test")` only yields the following output: > Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 54175 > }) Where loading the dataset without the split argument yields: > DatasetDict({ > train: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 51094 > }) > validation: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 6798 > }) > test: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 3081 > }) > }) Thus, the API seems to be broken in this regard. This is a bit annoying since I want to be able to use the split argument with `split="train[:10%]+test[:10%]"` to have smaller dataset to work with when validating my model is working correctly. ### Steps to reproduce the bug `speech_commands_v1 = load_dataset("superb", "ks", split="train+test")` ### Expected behavior > DatasetDict({ > train: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 51094 > }) > test: Dataset({ > features: ['file', 'audio', 'label'], > num_rows: 3081 > }) > }) ### Environment info ``` import datasets print(datasets.__version__) ``` > 2.14.5 ``` import sys print(sys.version) ``` > 3.9.17 (main, Jul 5 2023, 20:41:20) > [GCC 11.2.0] The expression "train+test" concatenates the splits. The individual splits as separate datasets can be obtained as follows: ```python train_ds, test_ds = load_dataset("<dataset_name>", split=["train", "test"]) train_10pct_ds, test_10pct_ds = load_dataset("<dataset_name>", split=["train[:10%]", "test[:%10]"]) ```
[ -0.12745431065559387, -0.10093505680561066, -0.006819732487201691, 0.26014244556427, 0.14704033732414246, 0.07430852949619293, 0.36141237616539, 0.24388569593429565, -0.18307682871818542, -0.059660300612449646, -0.3403538465499878, 0.1565178781747818, -0.009768269956111908, 0.5907857418060303, -0.056756388396024704, -0.35070258378982544, 0.11486934870481491, -0.020285505801439285, 0.07787435501813889, 0.14903414249420166, 0.12198923528194427, 0.27952274680137634, -0.1794680655002594, -0.04181420058012009, -0.3756140470504761, -0.23367762565612793, 0.05094023793935776, 0.12687620520591736, -0.0809430256485939, -0.25154587626457214, 0.331957072019577, 0.06000090762972832, -0.013919994235038757, 0.46385902166366577, -0.0001273098459932953, 0.29228872060775757, 0.32540786266326904, -0.00573652982711792, -0.4287683069705963, -0.255113810300827, -0.03031797707080841, -0.11416425555944443, 0.22389841079711914, 0.03270187973976135, -0.23144450783729553, -0.15109360218048096, -0.20774982869625092, 0.06316497921943665, 0.8177499175071716, 0.03887166082859039, 0.07689720392227173, 0.29951152205467224, -0.12078947573900223, -0.12254734337329865, -0.34706586599349976, 0.497672975063324, -0.192593514919281, -0.19728446006774902, -0.1082007884979248, 0.10313516110181808, 0.03426896408200264, 0.19094036519527435, 0.025267302989959717, 0.0388459712266922, -0.0672067180275917, 0.08172087371349335, -0.5274951457977295, -0.2233118712902069, -0.04413209855556488, 0.27885156869888306, 0.22338862717151642, -0.028675168752670288, -0.4688446521759033, -0.4112381637096405, -0.20246607065200806, -0.24230733513832092, 0.15316572785377502, 0.33824971318244934, -0.0023900046944618225, 0.1418382227420807, -0.44507884979248047, -0.031232960522174835, 0.025952689349651337, 0.07316833734512329, 0.0725046843290329, 0.12585467100143433, -0.1610608845949173, 0.09060561656951904, 0.40699946880340576, -0.07154136896133423, -0.20195531845092773, -0.11536301672458649, -0.18665385246276855, 0.4159165024757385, -0.41169124841690063, 0.07238022983074188, -0.14167964458465576, 0.11595998704433441, 0.25334882736206055, 0.16306951642036438, -0.1252240240573883, 0.04740901291370392, -0.25059616565704346, 0.013766787946224213, 0.5932230353355408, 0.21184250712394714, 0.3786688446998596, 0.36353155970573425, 0.028364595025777817, 0.26305654644966125, 0.14848607778549194, -0.016825854778289795, 0.08023813366889954, -0.1067323237657547, -0.5281885266304016, -0.1441420614719391, 0.17089314758777618, -0.0783771350979805, -0.17506739497184753, -0.20476000010967255, -0.28740042448043823, -0.13491733372211456, 0.14679932594299316, 0.3160483241081238, 0.005014698952436447, 0.11967843770980835, -0.12523849308490753, 0.2554621696472168, -0.31733572483062744, -0.19331881403923035, -0.20023250579833984, 0.1141243577003479, -0.12063682079315186, 0.03336160629987717, 0.31634822487831116, -0.3186647295951843, 0.1761273294687271, 0.3074135184288025, 0.061936311423778534, -0.11739867925643921, -0.31060168147087097, -0.2295529842376709, 0.043477851897478104, 0.3854718506336212, 0.21923205256462097, 0.14557744562625885, 0.005186118185520172, 0.0029992982745170593, -0.010015986859798431, 0.0952097624540329, -0.1874983310699463, -0.03200551122426987, 0.1550416648387909, 0.06578922271728516, -0.21424324810504913, 0.2361929714679718, -0.36358436942100525, 0.5389570593833923, 0.210923969745636, -0.29675647616386414, -0.21387991309165955, -0.12736311554908752, -0.38595473766326904, -0.04742304980754852, 0.5461986064910889, 0.4027796685695648, -0.279056191444397, -0.3455875515937805, -0.0812687799334526, -0.11465060710906982, -0.056711070239543915, 0.5813950300216675, -0.26500818133354187, 0.2911984324455261, -0.31838297843933105, 0.4046919345855713, 0.37633979320526123, -0.1474771350622177, -0.17114341259002686, 0.32102835178375244, -0.08984343707561493, 0.33604755997657776, -0.09865053743124008, -0.29143765568733215, 0.2835235297679901, -0.08274000138044357, 0.04267886281013489, 0.32085442543029785, -0.11867676675319672, -0.052779197692871094, -0.10606307536363602, -0.2669590711593628, 0.32431328296661377, 0.24621708691120148, 0.14903230965137482, -0.20490066707134247, -0.14440253376960754, 0.04518356919288635, 0.5354743003845215, -0.022170521318912506, 0.0049127861857414246, 0.022541116923093796, -0.18595227599143982, 0.012136024422943592, 0.0525418221950531, -0.2927454113960266, -0.4995254874229431, 0.17366214096546173, 0.11219370365142822, 0.05323177948594093, 0.16691622138023376, -0.05686822533607483, -0.22263941168785095, -0.14398041367530823, -0.32885581254959106, -0.23157018423080444, -0.08307074010372162, -0.16193494200706482, 0.2296990305185318, 0.16694293916225433, -0.32988256216049194, 0.3933578133583069, -0.220820352435112, 0.2531033158302307, -0.3389100730419159, 0.2514037489891052, 0.12429989874362946, -0.06679897755384445, -0.29623186588287354, 0.1638317108154297, 0.07542513310909271, -0.26716893911361694, -0.04255826771259308, 0.32233646512031555, 0.3357522487640381, 0.03107948787510395, -0.5862517356872559, -0.10153251886367798, 0.28793859481811523, 0.03162412345409393, -0.12393572926521301, -0.11770803481340408, 0.05904139205813408, -0.25527265667915344, -0.3479680120944977, 0.26206058263778687, -0.46327245235443115, 0.3208809494972229, 0.04912237077951431, -0.031070422381162643, 0.19185467064380646, -0.09514664113521576, -0.19791603088378906, -0.20878207683563232, 0.2484305202960968, -0.3000906705856323, 0.17125128209590912, -0.07610087841749191, -0.07320208847522736, -0.1637393832206726, 0.3444060683250427, -0.06307706236839294, -0.0905153751373291, -0.061199937015771866, -0.002459978684782982, 0.13590796291828156, -0.023302357643842697, 0.05843230336904526, 0.2809005379676819, 0.06233181059360504, 0.08996091783046722, 0.0090108010917902, 0.07043527066707611, -0.09838618338108063, 0.16166236996650696, 0.24614077806472778, -0.28215643763542175, 0.12392053008079529, -0.11615443974733353, -0.05344031751155853, -0.30957767367362976, 0.4595707654953003, 0.15739557147026062, -0.2082357406616211, -0.5082923173904419, 0.050391897559165955, -0.3732447326183319, 0.1799561083316803, -0.26799649000167847, -0.4194241166114807, -0.06330892443656921, -0.2897607982158661, 0.017374487593770027, 0.1936955749988556, -0.127538800239563, 0.2826484143733978, -0.07960814982652664, 0.10225443542003632, -0.3430528938770294, -0.020633555948734283, 0.004570081830024719, 0.04894247278571129, -0.08413082361221313, 0.05424930900335312, 0.37956616282463074, 0.4554067850112915, 0.11473827809095383, -0.11374358087778091, -0.42942360043525696, 0.2790701985359192, -0.21221867203712463, 0.24545222520828247, -0.24862447381019592, 0.3771626651287079, 0.07232062518596649, -0.010794386267662048, 0.029716886579990387, -0.3447454571723938, 0.32329219579696655, -0.09664884209632874, -0.13330799341201782, -0.11819303035736084, 0.26381954550743103, -0.11512140929698944, -0.35425227880477905, -0.2549714148044586, -0.3937734365463257, -0.23682276904582977, 0.2692846953868866, -0.22405996918678284, -0.129032701253891, 0.07352261245250702, -0.15183426439762115, -0.08718942850828171, -0.13524587452411652, -0.017313599586486816, -0.34308549761772156, -0.0092092826962471, 0.14015555381774902, -0.18807443976402283, -0.21679052710533142, -0.05954432860016823, 0.08374299854040146, -0.06446581333875656, -0.1329425871372223, -0.09864463657140732, 0.22495898604393005, -0.23773571848869324, 0.19523116946220398, 0.008532258681952953, 0.0726119801402092, 0.3043745160102844, -0.20174124836921692, 0.2108824998140335, -0.045511774718761444, -0.33183151483535767, 0.21622231602668762, 0.06919863075017929, -0.13563452661037445, 0.08231095969676971, 0.31998080015182495, -0.03196121007204056, 0.8726679086685181, 0.39813756942749023, -0.03447436913847923, 0.1965121030807495, 0.08446957916021347, 0.32574450969696045, -0.22463153302669525, -0.6712904572486877, 0.14170558750629425, -0.07194359600543976, -0.11950349807739258, 0.20168742537498474, 0.12671691179275513, 0.051337696611881256, -0.20830252766609192, 0.05834977328777313, -0.239379420876503, -0.2839919924736023, 0.11466305702924728, -0.10744674503803253, 0.007793968543410301, 0.04005821794271469, 0.4057459831237793, 0.18164022266864777, 0.09276587516069412, 0.03205715864896774, 0.16105917096138, 0.40057477355003357, -0.05366592854261398, -0.6295243501663208, -0.12845128774642944, -0.23677799105644226, 0.040474049746990204, 0.2725173234939575, 0.07371272146701813, -0.24510954320430756, -0.19534382224082947, 0.20391860604286194, 0.08450587093830109, 0.9985637068748474, 0.17924432456493378, 0.14050546288490295, 0.052936337888240814, -0.29347220063209534, -0.00775676965713501, -0.18654300272464752, 0.10160714387893677, 0.14598247408866882, 0.3710317015647888, 0.47293591499328613, -0.43243300914764404, -0.192325621843338, 0.30122822523117065, 0.07498425245285034, -0.07214723527431488, -0.06682147830724716, -0.1582156866788864, 0.03564275801181793, -0.03004765883088112, 0.2391211986541748, 0.28510719537734985, 0.28295108675956726, -0.22585006058216095, 0.0003724396228790283, 0.05343613773584366, -0.3580920100212097, 0.031491417437791824, 0.18372106552124023, 0.28667300939559937, -0.018559610471129417, 0.20069707930088043, 0.39232704043388367, -0.034626711159944534, -0.003557242453098297, 0.628749668598175, -0.23920483887195587, -0.34810948371887207, -0.16730937361717224, 0.08180686831474304, 0.3276875913143158, 0.3292044997215271, 0.11994040012359619, -0.04067796841263771, 0.1937541365623474, 0.12020303308963776, -0.27434980869293213, 0.04154496639966965, 0.17938846349716187, -0.021939504891633987, -0.40109679102897644, -0.24048146605491638, 0.20665733516216278, 0.17709065973758698, 0.1174926906824112, 0.325041800737381, 0.27717989683151245, -0.33386772871017456, 0.10014615952968597, -0.3440338969230652, 0.6669530868530273, 0.18688195943832397, 0.058521635830402374, 0.19704179465770721, 0.13977248966693878, 0.4368569552898407, -0.19229252636432648, 0.07661671936511993, -0.2560920715332031, -0.3505552113056183, -0.10651664435863495, -0.04912929609417915, -0.08253182470798492, 0.017225801944732666, -0.06913978606462479, 0.3222740888595581, -0.20465406775474548, 0.5149237513542175, -0.15201419591903687, 0.18781258165836334, 0.07341790199279785, -0.14677926898002625, -0.3453231453895569, 0.03530848026275635, -0.09816874563694, 0.13564783334732056, 0.060451213270425797, -0.048964813351631165, 0.0787162184715271, -0.3246360719203949, -0.2775251865386963, 0.2986034154891968, -0.24504798650741577, 0.253322958946228, 0.0796751081943512, -0.260140985250473, 0.3104170560836792, 0.3988119959831238, 0.13951152563095093, -0.18670612573623657, -0.008404701016843319, 0.2222476303577423, -0.19558733701705933, 0.156657412648201, -0.26544198393821716, -0.10672204941511154, 0.24272426962852478, 0.14057034254074097, -0.13790908455848694, -0.22687219083309174, -0.21315434575080872, -0.10479152947664261, -0.23561009764671326, 0.35522958636283875, -0.04227699339389801, -0.5765796899795532, -0.2637053430080414, 0.00023518875241279602, 0.5366552472114563, -0.21769151091575623, -0.038525164127349854, -0.02962283045053482, -0.18255700170993805, 0.17089207470417023, 0.17263618111610413, 0.08964170515537262, -0.10763534903526306, 0.3193593919277191, -0.19200648367404938, 0.09191402047872543, 0.4605003595352173, 0.3649113178253174, -0.023114632815122604, -0.14724145829677582, -0.02473718672990799, 0.31012997031211853, -0.24588406085968018, 0.20483914017677307, 0.13424915075302124, -0.10119258612394333, -0.07705597579479218, 0.42009079456329346, 0.06277714669704437, -0.13615047931671143, -0.06476762890815735, -0.311071515083313, 0.10026533901691437, 0.2916780710220337, -0.08973638713359833, 0.031892240047454834, 0.13597963750362396, 0.43583160638809204, -0.026384882628917694, 0.390175998210907, -0.13733623921871185, 0.16645263135433197, 0.15492404997348785, 0.08099900186061859, -0.00045141763985157013, -0.26924800872802734, 0.4258996248245239, -0.10214029252529144, -0.03783443197607994, 0.039260946214199066, -0.01569206826388836, -0.08173200488090515, -0.12990380823612213, 0.14603325724601746, 0.034355662763118744, 0.0387011393904686, -0.20241472125053406, 0.07447074353694916, -0.05446533486247063, -0.2138037532567978, 0.4333677589893341, 0.07417502999305725, 0.10364824533462524, 0.1722303330898285, 0.38380855321884155, 0.2585102617740631, -0.05993781238794327, 0.38185957074165344, -0.12186528742313385, -0.039949867874383926, 0.0401841402053833, 0.07445590198040009, 0.12918253242969513, 0.04812687635421753, -0.18833418190479279, 0.026940615847706795, 0.5638365745544434, -0.056396644562482834, 0.040710028260946274, -0.21416576206684113, -0.13548000156879425, -0.10248523205518723, 0.4875038266181946, 0.7037369608879089, 0.15702418982982635, 0.16214555501937866, -0.0010794736444950104, 0.09115076065063477, -0.0029219835996627808, -0.2059478610754013, 0.36897605657577515, 0.15184959769248962, -0.04823458939790726, 0.21030232310295105, -0.14410091936588287, 0.3027001619338989, -0.14048054814338684, 0.2759026885032654, 0.40296247601509094, -0.0908687636256218, 0.6087844371795654, 0.6013618111610413, -0.24901153147220612, 0.11842794716358185, -0.006300605833530426, -0.42805105447769165, 0.033130574971437454, -0.03157903999090195, -0.35461947321891785, 0.349627286195755, -0.005091442726552486, 0.2232760787010193, 0.2347988784313202, -0.39159661531448364, -0.32667940855026245, 0.16824698448181152, -0.08735470473766327, 0.12879520654678345, -0.11061638593673706, 0.7223208546638489, -0.4346100687980652, -0.4858968257904053, -0.5490430593490601, 0.22825577855110168, -0.15549826622009277, -0.032421525567770004, -0.08884652704000473, -0.20180055499076843, -0.0535544827580452, 0.09379100054502487, 0.04664475843310356, -0.1450066864490509, 0.5614274740219116, -0.1149674504995346, -0.19274792075157166, -0.2379578948020935, -0.37064868211746216, 0.24199649691581726, 0.043880395591259, -0.24611763656139374, 0.2696421444416046, 0.10748730599880219, -0.16267822682857513, 0.1211780309677124, 0.05425497144460678, 0.29898086190223694, 0.11100783944129944, -0.051977649331092834, -0.253248393535614, -0.017619367688894272, 0.03980399668216705, 0.056920796632766724, 0.49957817792892456, -0.06720413267612457, 0.15801799297332764, 0.28220731019973755, 0.07952482998371124, -0.06448230147361755, 0.10695961862802505, -0.13332390785217285, 0.26778849959373474, -0.654214084148407, 0.5136585235595703, -0.3622293770313263, 0.014892101287841797, -0.27181997895240784, -0.04018286243081093, -0.07909201085567474, 0.1432335376739502, -0.028869513422250748, -0.13032294809818268, 0.06824122369289398, -0.06547382473945618, 0.017456259578466415, 0.11167123913764954, 0.3900984227657318, 0.2884919345378876, -0.20782065391540527, -0.17337927222251892, 0.03126096725463867, -0.2679741680622101, -0.18357881903648376, -0.03761598467826843, 0.20965467393398285, -0.09137515723705292, -0.08365073055028915, 0.16181805729866028, 0.18466566503047943, 0.010170742869377136, -0.0752001628279686, 0.08200111985206604, 0.037532955408096313, -0.22985930740833282, 0.25224143266677856, -0.16902485489845276, 0.03900456428527832, -0.014181476086378098, -0.2507743239402771, 0.14097338914871216, -0.08584481477737427, -0.24924148619174957, 0.2620169520378113, -0.00026922672986984253, 0.17860794067382812, -0.26717686653137207, 0.19920891523361206, 0.3826392590999603, 0.4265235662460327, 0.008231453597545624, 0.10055708885192871, -0.29686984419822693, -0.083540178835392, -0.3729807138442993, 0.35447919368743896, -0.1258402019739151, 0.6449707746505737, -0.3803398907184601, 0.019961221143603325, -0.2276570200920105, -0.11569017171859741, -0.08183106034994125, 0.045554742217063904, -0.09682676196098328, 0.05771773308515549, -0.1006406918168068, 0.13875526189804077, 0.38489869236946106, 0.38774988055229187, -0.30597323179244995, 0.07166402786970139, -0.06996393948793411, -0.3033871650695801, 0.399300217628479, -0.4947025775909424, -0.14262811839580536, -0.14892277121543884, 0.012884620577096939, 0.34721171855926514, -0.4017866551876068, -0.5746932029724121, -0.23795968294143677, 0.04301711544394493, -0.06293852627277374, 0.09098249673843384, 0.34126633405685425, 0.25368985533714294, -0.2605762183666229, -0.0758574903011322, 0.245193749666214, 0.2719500660896301, -0.3164401352405548, 0.28058212995529175, -0.1591206043958664 ]
https://github.com/huggingface/datasets/issues/6319
Hi! Instead of processing a single example at a time, you should use the batched `map` for the best performance (with `num_proc=1`) - the fast tokenizers can process a batch's samples in parallel in that scenario. E.g., the following code in Colab takes an hour to complete: ```python # !pip install datasets transformers from datasets import load_dataset from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"]) ```
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
73
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, Hi! Instead of processing a single example at a time, you should use the batched `map` for the best performance (with `num_proc=1`) - the fast tokenizers can process a batch's samples in parallel in that scenario. E.g., the following code in Colab takes an hour to complete: ```python # !pip install datasets transformers from datasets import load_dataset from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"]) ```
[ -0.6238995790481567, 0.08061352372169495, 0.04081980884075165, 0.1330558806657791, 0.1382634937763214, 0.09867337346076965, 0.2976037859916687, 0.24050694704055786, -0.1358392834663391, -0.11661169677972794, -0.06945439428091049, 0.7371479272842407, -0.08465425670146942, -0.3263970613479614, -0.36928269267082214, 0.19813869893550873, 0.2144692838191986, 0.22920511662960052, 0.3980138599872589, -0.015381470322608948, 0.0057687908411026, 0.10013937205076218, -0.3415997624397278, 0.04825612157583237, -0.6410811543464661, -0.20964838564395905, -0.05246139317750931, -0.31286174058914185, -0.18543753027915955, -0.4506608843803406, 0.08366086333990097, 0.23183664679527283, -0.171231210231781, 0.7430108189582825, -0.00012056125706294551, -0.09630943834781647, 0.030757032334804535, 0.32384002208709717, 0.07781989872455597, -0.02879232168197632, -0.27739036083221436, -0.040880054235458374, -0.04530446603894234, -0.02245306223630905, 0.2921803295612335, 0.09039893746376038, 0.1091744527220726, -0.2592000365257263, 0.38345345854759216, 0.10681043565273285, 0.08609408140182495, 0.2562619745731354, -0.1580684781074524, -0.036562953144311905, 0.09324727952480316, -0.06544221192598343, -0.1301957219839096, 0.06686848402023315, 0.39085090160369873, -0.36296069622039795, -0.22258363664150238, -0.02632058598101139, -0.3385772109031677, -0.09071452170610428, -0.17488349974155426, -0.21970410645008087, -0.0041627436876297, -0.5528364181518555, 0.39707648754119873, 0.2329067587852478, 0.18055228888988495, -0.03873962163925171, -0.033104442059993744, -0.1877649426460266, -0.22892974317073822, -0.12930746376514435, 0.21542829275131226, -0.02803540788590908, -0.12843717634677887, 0.1787548065185547, -0.3641086220741272, 0.2206859439611435, 0.10890147089958191, 0.16373543441295624, -0.13814541697502136, 0.534091591835022, 0.07386172562837601, 0.2324971854686737, 0.08527548611164093, -0.04646231234073639, 0.010077130049467087, -0.013450546190142632, 0.0835866779088974, 0.24941444396972656, -0.4017249643802643, -0.12318766117095947, 0.11970314383506775, -0.3122234344482422, 0.26486581563949585, -0.1843225210905075, -0.3139941692352295, 0.2650597393512726, -0.16896799206733704, 0.2523397207260132, 0.3221953809261322, 0.024700291454792023, -0.0436580590903759, 0.27112847566604614, 0.40711554884910583, -0.29758167266845703, -0.404573917388916, 0.2016279697418213, -0.1932142674922943, -0.18654672801494598, 0.10122384130954742, -0.0185539647936821, -0.1528187096118927, -0.08720246702432632, -0.18611076474189758, 0.19150450825691223, -0.45499497652053833, 0.1929471790790558, 0.125832200050354, 0.2793317139148712, -0.19587847590446472, 0.1575615555047989, -0.24086661636829376, -0.26847803592681885, -0.24029430747032166, -0.18228863179683685, -0.01066773571074009, -0.33998724818229675, -0.23357130587100983, 0.1036975160241127, -0.041692424565553665, 0.04772914573550224, 0.21732348203659058, 0.09588497877120972, -0.07143478095531464, -0.0347801148891449, 0.15586885809898376, -0.40908071398735046, 0.1520022451877594, 0.09840721637010574, -0.1799885630607605, 0.5779924988746643, -0.028769414871931076, -0.14378617703914642, -0.1547495722770691, 0.12058098614215851, -0.3188089430332184, -0.04316113144159317, 0.024211211130023003, 0.04412205144762993, -0.16525626182556152, -0.060004010796546936, -0.32808297872543335, 0.18371091783046722, 0.29157155752182007, -0.0005621537566184998, 0.010987438261508942, -0.14300744235515594, -0.19644056260585785, -0.1404886245727539, 0.04905002564191818, 0.2040594518184662, -0.2041158378124237, -0.05572659149765968, 0.08686024695634842, 0.29901066422462463, 0.27571550011634827, 0.4254917800426483, -0.010417360812425613, 0.3663468062877655, -0.295805424451828, 0.20751667022705078, 0.15226009488105774, 0.2254984974861145, -0.5075994729995728, 0.16693878173828125, -0.04684702306985855, -0.039951954036951065, -0.4342280626296997, -0.1060991883277893, 0.652560830116272, -0.12666036188602448, 0.48521849513053894, 0.17407271265983582, -0.09310153871774673, 0.11729668080806732, -0.28692594170570374, -0.27054354548454285, 0.051355164498090744, 0.10721772164106369, 0.1855163872241974, -0.17149534821510315, -0.21765659749507904, -0.060991913080215454, 0.19300413131713867, 0.1679975688457489, -0.017536794766783714, 0.22847940027713776, 0.2700693607330322, -0.10050243139266968, 0.11359614133834839, -0.3039184510707855, 0.01641407050192356, 0.3146737515926361, 0.286823570728302, -0.05332707241177559, -0.00605379045009613, 0.0011685118079185486, 0.024561502039432526, 0.1946765035390854, -0.14224383234977722, 0.12287726998329163, -0.012990918010473251, -0.1146845817565918, -0.1962313950061798, 0.15655261278152466, -0.1681009829044342, -0.01296079158782959, 0.11277785152196884, 0.1293305605649948, 0.18946631252765656, 0.13341540098190308, -0.03980021923780441, -0.18131378293037415, -0.10745416581630707, 0.025601312518119812, 0.23054468631744385, -0.11227476596832275, -0.29352015256881714, 0.19294093549251556, 0.2476302832365036, 0.0578884556889534, -0.19636625051498413, 0.2153397649526596, 0.184730663895607, -0.06868436932563782, -0.17752064764499664, 0.1930818110704422, -0.07706268876791, -0.21225884556770325, 0.09338465332984924, 0.16136661171913147, 0.02697702869772911, 0.3525635898113251, -0.1906632035970688, 0.22559520602226257, 0.17603129148483276, 0.023609772324562073, -0.10972338914871216, 0.23657891154289246, 0.3752461075782776, -0.012125817127525806, 0.2632840871810913, 0.19452190399169922, 0.07731115818023682, 0.1364896297454834, 0.5704362392425537, 0.09514684975147247, -0.03671104833483696, 0.17842955887317657, -0.30115559697151184, 0.0050284042954444885, 0.09375792741775513, 0.0989723727107048, 0.3055446147918701, -0.037214335054159164, 0.08605417609214783, -0.11271794885396957, -0.11545855551958084, 0.010756470263004303, 0.01410369947552681, 0.23436279594898224, 0.2627614736557007, 0.19457443058490753, 0.19669200479984283, 0.23555217683315277, -0.28421664237976074, -0.5270472764968872, 0.10943081229925156, 0.4465198516845703, -0.06991291046142578, 0.12675423920154572, -0.16593337059020996, 0.1058613657951355, 0.0353541299700737, -0.062042005360126495, -0.13545748591423035, -0.35624566674232483, -0.1313009262084961, 0.033883411437273026, 0.11715491116046906, 0.40896371006965637, 0.034409552812576294, 0.09252893924713135, 0.07708508521318436, -0.03348922356963158, -0.2077009379863739, -0.36968833208084106, -0.23031699657440186, -0.07830066978931427, 0.41781237721443176, -0.2109496146440506, 0.10537891089916229, 0.1875869333744049, -0.26422083377838135, 0.05172652751207352, -0.3578524887561798, 0.05301765352487564, -0.15269409120082855, 0.0353461429476738, 0.12585067749023438, 0.30855613946914673, -0.4487185478210449, -0.15052370727062225, 0.3146514296531677, -0.5668466091156006, 0.14345401525497437, -0.16058814525604248, -0.02735518105328083, -0.27986717224121094, 0.09642812609672546, 0.05928369238972664, -0.0757860615849495, -0.21496540307998657, 0.3077675998210907, -0.15238286554813385, -0.02803894504904747, 0.1799982190132141, 0.2684117555618286, 0.17494748532772064, 0.09398582577705383, -0.2713649868965149, -0.11564942449331284, -0.14403247833251953, 0.47532665729522705, -0.057457245886325836, -0.1345355361700058, -0.04304555803537369, -0.022796597331762314, 0.14097297191619873, 0.0753408819437027, -0.3798815906047821, 0.45350050926208496, -0.35271158814430237, 0.06776152551174164, -0.023112837225198746, -0.06720548123121262, 0.25369590520858765, 0.11049875617027283, 0.05013255029916763, 0.06058987230062485, -0.27401021122932434, -0.06387342512607574, 0.05180682986974716, 0.11922983825206757, 0.07568204402923584, 0.40977928042411804, 0.24828305840492249, 0.6680771708488464, 0.3356931507587433, -0.1827501505613327, -0.02636145055294037, 0.06630697846412659, 0.013759208843111992, -0.19657191634178162, -0.43152347207069397, 0.0332556813955307, -0.12066233158111572, -0.3783037066459656, 0.2522188127040863, 0.0418953001499176, -0.5728872418403625, 0.05742675065994263, -0.13434046506881714, 0.17579253017902374, -0.2968432307243347, 0.2262740135192871, -0.22030951082706451, -0.02128688618540764, 0.07606956362724304, 0.15308040380477905, -0.3416512906551361, -0.20205910503864288, 0.19241012632846832, -0.14459705352783203, -0.027179822325706482, -0.2704957127571106, -0.6381148099899292, 0.22504453361034393, -0.5046972632408142, 0.18416327238082886, -0.03344199061393738, 0.5498707890510559, -0.0404762402176857, 0.24477791786193848, 0.1196008026599884, -0.15690311789512634, 0.5084607601165771, -0.09306926280260086, -0.10716493427753448, 0.20824387669563293, 0.11473090946674347, -0.2758975625038147, -0.08453387767076492, 0.08118809759616852, 0.43906670808792114, 0.5062640309333801, 0.340537428855896, -0.11899182945489883, -0.21644708514213562, 0.018082119524478912, 0.09434729814529419, -0.06361985206604004, -0.20077335834503174, -0.110289067029953, -0.036477092653512955, -0.17227934300899506, 0.18859252333641052, 0.19285517930984497, -0.16226820647716522, 0.15213307738304138, -0.38232508301734924, -0.13662651181221008, -0.27429643273353577, 0.14506550133228302, 0.12731915712356567, 0.1420174539089203, -0.03167551010847092, 0.457956999540329, 0.3524564206600189, -0.055928539484739304, 0.10731284320354462, 0.06687010824680328, -0.1621111035346985, -0.17329254746437073, 0.08292195200920105, 0.0073723942041397095, 0.5508002042770386, 0.4660649597644806, -0.10971138626337051, 0.06334824860095978, -0.27071839570999146, 0.35233399271965027, -0.05429527163505554, 0.398174911737442, 0.3930676579475403, 0.21150296926498413, -0.7208508253097534, -0.3005293309688568, 0.1293444186449051, 0.3737502098083496, -0.22990025579929352, 0.6225211024284363, -0.30169904232025146, -0.1528717279434204, 0.807583749294281, 0.2026830017566681, 1.0685621500015259, -0.3202700614929199, 0.009564800187945366, -0.2652450203895569, 0.20265072584152222, 0.21163268387317657, -0.5638329386711121, 0.13295044004917145, -0.3408249616622925, -0.25780797004699707, -0.04317133501172066, -0.10080355405807495, 0.04621104523539543, 0.2945649325847626, -0.12074949592351913, 0.06463933736085892, 0.11950710415840149, 0.5645155310630798, 0.10288741439580917, 0.06814859807491302, 0.3334420919418335, -0.3136219382286072, -0.05953620374202728, 0.06829030811786652, 0.06203613430261612, 0.06535090506076813, 0.007699094712734222, 0.01909678801894188, -0.04923729598522186, 0.002921082079410553, -0.5500174164772034, -0.12607097625732422, -0.5061051845550537, 0.12936705350875854, 0.09840600192546844, 0.2606637477874756, 0.23632866144180298, 0.13483436405658722, 0.038642093539237976, 0.37621089816093445, 0.025852667167782784, 0.5010564923286438, 0.18230664730072021, -0.016903379932045937, 0.3515391945838928, -0.396629273891449, 0.040199123322963715, 0.018342502415180206, -0.011796846985816956, 0.1076199859380722, -0.0343717560172081, -0.34536176919937134, -0.1522935926914215, 0.2218518853187561, 0.6251702308654785, -0.12785589694976807, -0.022741198539733887, 0.03326251357793808, 0.03273962438106537, -0.24113212525844574, 0.05267174169421196, 0.24239706993103027, 0.09044013917446136, 0.653606116771698, -0.25263285636901855, -0.16408240795135498, -0.06600168347358704, 0.33140993118286133, -0.13236668705940247, -0.12359490990638733, 0.3228895962238312, 0.0955076515674591, -0.23383507132530212, -0.11505276709794998, 0.35083967447280884, -0.018391016870737076, -0.29311129450798035, -0.04492475837469101, -0.6649928092956543, -0.029122501611709595, 0.1614215224981308, 0.23127371072769165, -0.07263273745775223, -0.06871189177036285, -0.062302444130182266, -0.4463401734828949, -0.4442673325538635, -0.1819288432598114, -0.005284752696752548, 0.20922617614269257, -0.10175466537475586, -0.10489314794540405, -0.20308548212051392, 0.27375170588493347, -0.16337423026561737, 0.14817699790000916, -0.19255071878433228, -0.024989143013954163, -0.2213410586118698, -0.16109107434749603, 0.2169790416955948, -0.2624777555465698, -0.06510893255472183, 0.5157901048660278, 0.18807578086853027, -0.09814167022705078, -0.27216190099716187, 0.19156639277935028, 0.20641407370567322, -0.24889186024665833, 0.11679781228303909, -0.045537810772657394, -0.024357914924621582, -0.3861902952194214, -0.10902288556098938, 0.09117399901151657, -0.030929312109947205, -0.18793991208076477, 0.37122324109077454, -0.005242958664894104, -0.131461039185524, 0.07007730007171631, 0.14062975347042084, 0.20810353755950928, 0.24206578731536865, 0.2554447650909424, 0.09238677471876144, -0.07389117777347565, -0.09373283386230469, 0.16003179550170898, 0.2528441548347473, -0.02771291695535183, 0.4765888452529907, -0.45453381538391113, -0.04183752462267876, 0.31278422474861145, 0.2460235059261322, 0.6082339882850647, -0.15866881608963013, -0.36287721991539, 0.578196108341217, 0.06812433898448944, 0.01818215847015381, -0.15908615291118622, 0.6619235873222351, 0.09429040551185608, 0.04225754737854004, 0.14472009241580963, 0.020180292427539825, -0.15941642224788666, -0.20245587825775146, 0.2063044309616089, 0.483818382024765, -0.1394566148519516, 0.1615341603755951, 0.05077385529875755, 0.143183171749115, 0.06207340583205223, 0.15249031782150269, 0.10698136687278748, 0.30406323075294495, 0.2573598325252533, 0.09900478273630142, 0.13987717032432556, 0.29789412021636963, 0.18412363529205322, 0.19573502242565155, -0.296730101108551, -0.05908431485295296, 0.4026247262954712, -0.11540450155735016, 0.1291077435016632, 0.10616868734359741, 0.2663748860359192, -0.15968777239322662, -0.5033312439918518, -0.06801348179578781, 0.22649265825748444, -0.2446208894252777, -0.11971862614154816, 0.22106122970581055, -0.08168335258960724, -0.15727882087230682, 0.23661160469055176, -0.06576572358608246, -0.004592712968587875, 0.27959275245666504, 0.12181437760591507, 0.05030934512615204, -0.2517280876636505, -0.24339890480041504, -0.042458903044462204, 0.4370221495628357, -0.2858281135559082, 0.08055788278579712, -0.47555011510849, -0.13800427317619324, -0.513436496257782, 0.24320311844348907, 0.3637979328632355, 0.2800138294696808, -0.3446345031261444, 0.12792575359344482, -0.21827371418476105, 0.08390379697084427, 0.015714548528194427, 0.4325890839099884, -0.12262082099914551, -0.3408704996109009, 0.08932039141654968, -0.046358540654182434, -0.16576607525348663, -0.18095003068447113, 0.07153667509555817, 0.34399059414863586, 0.23864352703094482, -0.01705338805913925, 0.04260095953941345, -0.20486634969711304, -0.038120053708553314, -0.20135308802127838, 0.00010659545660018921, -0.20830179750919342, 0.3736264407634735, -0.34395140409469604, 0.11864610016345978, -0.1875869631767273, 0.03984164819121361, -0.06314384937286377, 0.3389507532119751, 0.4605501890182495, -0.0007135150954127312, -0.5053994059562683, -0.2699984014034271, -0.33478471636772156, 0.10306774079799652, -0.2958652377128601, 0.18561415374279022, -0.0344751738011837, -0.019861720502376556, -0.04203558340668678, 0.2874189615249634, -0.026002302765846252, 0.07259982079267502, -0.09580698609352112, 0.49758970737457275, -0.21128548681735992, 0.26260626316070557, -0.16406624019145966, -0.02498036064207554, 0.012875996530056, -0.3582944869995117, 0.41504326462745667, -0.24055199325084686, -0.018789272755384445, -0.06876489520072937, -0.21347248554229736, 0.003419734537601471, -0.34213778376579285, 0.3436260223388672, 0.09693069756031036, 0.09856262803077698, 0.09007367491722107, -0.011270053684711456, -0.23344817757606506, -0.10325880348682404, -0.04541142284870148, 0.12173326313495636, 0.16928566992282867, 0.26580503582954407, -0.22091081738471985, 0.18266454339027405, -0.2566000819206238, -0.31604713201522827, -0.04670862853527069, -0.29151028394699097, -0.1677994430065155, 0.11134179681539536, -0.12000717967748642, 0.4139019250869751, -0.08818422257900238, 0.5169763565063477, -0.10534121096134186, 0.2969737648963928, -0.44428709149360657, -0.13069258630275726, 0.36494511365890503, -0.7251001000404358, -0.5077706575393677, -0.14778223633766174, -0.043972842395305634, 0.30970948934555054, 0.12189795821905136, -0.11667680740356445, -0.30896666646003723, 0.2410936802625656, -0.1251608282327652, -0.6288139820098877, 0.022741805762052536, 0.20505228638648987, 0.03588196635246277, -0.19965937733650208, 0.46472838521003723, 0.02588353306055069, -0.36239373683929443, 0.3397170603275299, 0.0018794164061546326 ]
https://github.com/huggingface/datasets/issues/6319
Batched is far worse. A single batch of 1000 took hours and that was only 1% On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***> wrote: > Hi! You should use the batched map for the best performance (with > num_proc=1) - the fast tokenizers can process a batch's samples in > parallel. > > E.g., the following code in Colab takes an hour to complete: > > # !pip install datasets transformersfrom datasets import load_datasetfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-cased")dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"]) > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771503757>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABDD3ZJHPSRVDEXFNMXR2N3YAFWFZAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDGNZVG4> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
125
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, Batched is far worse. A single batch of 1000 took hours and that was only 1% On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***> wrote: > Hi! You should use the batched map for the best performance (with > num_proc=1) - the fast tokenizers can process a batch's samples in > parallel. > > E.g., the following code in Colab takes an hour to complete: > > # !pip install datasets transformersfrom datasets import load_datasetfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-cased")dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"]) > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771503757>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABDD3ZJHPSRVDEXFNMXR2N3YAFWFZAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDGNZVG4> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
[ -0.6426334381103516, 0.04849633574485779, 0.041576087474823, 0.15280376374721527, 0.12931455671787262, 0.12522882223129272, 0.26164349913597107, 0.26831841468811035, -0.09941567480564117, -0.1265753209590912, -0.08454795181751251, 0.7016130089759827, -0.09337520599365234, -0.3706992268562317, -0.3324893116950989, 0.18045100569725037, 0.2372853010892868, 0.22640946507453918, 0.2983464300632477, -0.04651711508631706, -0.03356841206550598, 0.09759742766618729, -0.37525475025177, 0.014406701549887657, -0.5900881886482239, -0.23279879987239838, -0.04140563681721687, -0.26893630623817444, -0.21978554129600525, -0.45404160022735596, 0.1336023509502411, 0.17769311368465424, -0.1430710405111313, 0.7698659300804138, -0.00011993577209068462, -0.09614739567041397, 0.0563390776515007, 0.3218269944190979, 0.07360391318798065, 0.031641602516174316, -0.3295803666114807, -0.06581961363554001, -0.07008898258209229, -0.029716797173023224, 0.2665053606033325, 0.10411422699689865, 0.13150052726268768, -0.3102651834487915, 0.3832988739013672, 0.12362293899059296, 0.0896700918674469, 0.3002511262893677, -0.14405855536460876, -0.043530337512493134, 0.09972190111875534, -0.028016895055770874, -0.1405198574066162, 0.1303059607744217, 0.4132021367549896, -0.4063799977302551, -0.23245134949684143, -0.04678461328148842, -0.34741124510765076, -0.08449332416057587, -0.13317349553108215, -0.1979985535144806, -0.016691438853740692, -0.5472995042800903, 0.3705315887928009, 0.2669273912906647, 0.0898720920085907, -0.0012657532934099436, -0.0578819140791893, -0.20911653339862823, -0.26804447174072266, -0.11895392835140228, 0.21158866584300995, 0.0017192438244819641, -0.14731524884700775, 0.1676100343465805, -0.397417813539505, 0.20329508185386658, 0.10199669003486633, 0.145944744348526, -0.09542523324489594, 0.5607548952102661, 0.0865088701248169, 0.22659476101398468, 0.11951793730258942, -0.049189645797014236, 0.05009961128234863, -0.0391254648566246, 0.052783723920583725, 0.24092285335063934, -0.4216620922088623, -0.09672043472528458, 0.1136879175901413, -0.24001501500606537, 0.27681878209114075, -0.2676823139190674, -0.31687623262405396, 0.25163114070892334, -0.11556626856327057, 0.23630867898464203, 0.3054460287094116, 0.04877333715558052, -0.05012086033821106, 0.3586481213569641, 0.3894444704055786, -0.30606865882873535, -0.35379746556282043, 0.21729055047035217, -0.1711401343345642, -0.2010711431503296, 0.07193967700004578, -0.0030794069170951843, -0.18527844548225403, -0.06645143032073975, -0.1854001134634018, 0.1495693027973175, -0.3643803596496582, 0.1577325463294983, 0.11050017178058624, 0.26071426272392273, -0.22599473595619202, 0.14053207635879517, -0.293864905834198, -0.27775007486343384, -0.21388676762580872, -0.1678086817264557, -0.010059408843517303, -0.33345863223075867, -0.2810969650745392, 0.08269413560628891, -0.03277052566409111, -0.02729661762714386, 0.20395271480083466, 0.08794450759887695, -0.07198470085859299, 0.004617705941200256, 0.12489015609025955, -0.40595749020576477, 0.1795966476202011, 0.1251477301120758, -0.1930285096168518, 0.5750644207000732, -0.0037712480407208204, -0.11152586340904236, -0.15661250054836273, 0.14317752420902252, -0.3294280469417572, -0.06101710721850395, 0.01570369489490986, 0.051449891179800034, -0.19038960337638855, -0.058990541845560074, -0.3905804455280304, 0.17256318032741547, 0.28080299496650696, -0.001901097595691681, 0.016983836889266968, -0.14620396494865417, -0.20575067400932312, -0.17154188454151154, 0.0459260493516922, 0.21264797449111938, -0.25785407423973083, -0.043067969381809235, 0.08602653443813324, 0.2773503065109253, 0.31390973925590515, 0.47921350598335266, -0.03713507577776909, 0.3424188196659088, -0.29747676849365234, 0.22413672506809235, 0.13480307161808014, 0.17510224878787994, -0.48946988582611084, 0.21565109491348267, -0.0401705801486969, -0.03499816730618477, -0.409035861492157, -0.08574235439300537, 0.7049323320388794, -0.12747932970523834, 0.49915432929992676, 0.19005441665649414, -0.10608835518360138, 0.114162877202034, -0.30923038721084595, -0.28948456048965454, 0.05246388912200928, 0.09145206212997437, 0.1682346761226654, -0.13631120324134827, -0.18883858621120453, -0.15694302320480347, 0.21587440371513367, 0.1800430417060852, 0.003815341740846634, 0.20821917057037354, 0.2916671335697174, -0.1487520933151245, 0.07445770502090454, -0.28090256452560425, -0.03835521265864372, 0.33861881494522095, 0.2629689574241638, -0.07590863108634949, 0.013393614441156387, 0.011103510856628418, 0.021874964237213135, 0.1809719204902649, -0.12409835308790207, 0.08337242901325226, -0.024634964764118195, -0.1163722574710846, -0.1591375470161438, 0.10864138603210449, -0.18734316527843475, -0.04453800618648529, 0.1502782702445984, 0.12641173601150513, 0.13875515758991241, 0.1146334856748581, -0.027384920045733452, -0.17622190713882446, -0.08230336755514145, 0.026573657989501953, 0.23728187382221222, -0.14363285899162292, -0.2699302136898041, 0.2271331250667572, 0.20504817366600037, 0.08187410235404968, -0.17086797952651978, 0.17417365312576294, 0.18375970423221588, -0.07385090738534927, -0.17629282176494598, 0.1779133677482605, -0.0747552141547203, -0.22654125094413757, 0.07135365903377533, 0.17473645508289337, 0.031546324491500854, 0.33809933066368103, -0.21436305344104767, 0.21808749437332153, 0.15312090516090393, 0.01989639550447464, -0.09005910903215408, 0.20408937335014343, 0.36423927545547485, 0.017563968896865845, 0.27461594343185425, 0.197043776512146, 0.0802505612373352, 0.12557147443294525, 0.577603816986084, 0.08050961792469025, -0.04792547598481178, 0.18310993909835815, -0.30807235836982727, -0.01692185550928116, 0.12506763637065887, 0.13913442194461823, 0.3375925123691559, -0.029863964766263962, 0.1389237344264984, -0.09186454862356186, -0.08731719851493835, -0.011239346116781235, 0.02513974905014038, 0.19271785020828247, 0.2788349390029907, 0.1767432689666748, 0.15430273115634918, 0.2357344627380371, -0.2448584884405136, -0.4732136130332947, 0.06355307996273041, 0.43029648065567017, -0.0952342227101326, 0.10441908240318298, -0.14489519596099854, 0.09974326193332672, -0.0031662993133068085, -0.07742974907159805, -0.1436520516872406, -0.3807069957256317, -0.14401432871818542, -0.010194841772317886, 0.13870888948440552, 0.3876711428165436, 0.06429101526737213, 0.10080917179584503, 0.03526978939771652, -0.05490628629922867, -0.2348715364933014, -0.3767639994621277, -0.25118377804756165, -0.06373901665210724, 0.39967605471611023, -0.2117365002632141, 0.11511792987585068, 0.1624518632888794, -0.2591371536254883, 0.07278860360383987, -0.3240423798561096, 0.022448882460594177, -0.16241908073425293, 0.07491627335548401, 0.1504291296005249, 0.3244898021221161, -0.43656283617019653, -0.12193319946527481, 0.3098739981651306, -0.5850247144699097, 0.12263579666614532, -0.18965506553649902, -0.07031466066837311, -0.27864396572113037, 0.09247466176748276, 0.06602794677019119, -0.11730127781629562, -0.22266937792301178, 0.31678780913352966, -0.19687089323997498, -0.0293927900493145, 0.18333762884140015, 0.2573786675930023, 0.17235705256462097, 0.03803226724267006, -0.314579576253891, -0.09539495408535004, -0.21173003315925598, 0.4808410406112671, -0.059683963656425476, -0.1311911642551422, -0.027543939650058746, -0.0029330402612686157, 0.1498267501592636, 0.11131235957145691, -0.40601107478141785, 0.48024457693099976, -0.35904771089553833, 0.09924552589654922, -0.0026443263050168753, -0.02609942853450775, 0.2342056930065155, 0.07849742472171783, 0.04304785281419754, 0.037320829927921295, -0.2873826026916504, -0.09804718941450119, 0.03262538090348244, 0.14953896403312683, 0.07249289751052856, 0.43632829189300537, 0.24967491626739502, 0.7069782018661499, 0.37955591082572937, -0.17753422260284424, -0.06709377467632294, 0.056664131581783295, 0.060942891985177994, -0.18501251935958862, -0.4361913502216339, 0.0750967338681221, -0.12759338319301605, -0.4099843204021454, 0.19318155944347382, 0.0578109547495842, -0.5735381245613098, 0.0448756217956543, -0.1189136654138565, 0.16032102704048157, -0.26630550622940063, 0.2309742420911789, -0.17388571798801422, 0.001968919299542904, 0.08425210416316986, 0.16897457838058472, -0.2849327325820923, -0.2441411316394806, 0.19055071473121643, -0.1570519208908081, -0.03257512301206589, -0.2616194486618042, -0.6087356805801392, 0.21193444728851318, -0.5422898530960083, 0.1972162425518036, -0.027930978685617447, 0.576694667339325, -0.012196503579616547, 0.2535693645477295, 0.09246359020471573, -0.09291413426399231, 0.5550486445426941, -0.09196154028177261, -0.044751957058906555, 0.17129743099212646, 0.14082010090351105, -0.288167804479599, -0.0684010311961174, 0.07872466742992401, 0.43414586782455444, 0.5187479257583618, 0.3720090985298157, -0.0935399979352951, -0.17935049533843994, 0.017381276935338974, 0.11316262185573578, -0.03305193781852722, -0.22530582547187805, -0.11466405540704727, -0.013642191886901855, -0.08292411267757416, 0.1584729105234146, 0.20490558445453644, -0.19816240668296814, 0.19141052663326263, -0.3808804154396057, -0.11661642789840698, -0.2340967059135437, 0.12124460935592651, 0.11758041381835938, 0.12275020778179169, -0.002779293805360794, 0.43937110900878906, 0.3650743365287781, -0.10460271686315536, 0.13375094532966614, 0.13258355855941772, -0.24059268832206726, -0.1230679452419281, 0.034254733473062515, 0.04098018258810043, 0.5121023654937744, 0.4595181345939636, -0.1277182549238205, 0.046219684183597565, -0.19159868359565735, 0.32194557785987854, -0.07087510824203491, 0.35959264636039734, 0.37684470415115356, 0.23107025027275085, -0.7637564539909363, -0.3351735472679138, 0.12446370720863342, 0.3868336081504822, -0.22253122925758362, 0.6057581901550293, -0.3425012528896332, -0.16124534606933594, 0.7563076019287109, 0.23172162473201752, 1.0129046440124512, -0.3359858989715576, 0.04179738089442253, -0.2443963885307312, 0.14151471853256226, 0.21055161952972412, -0.4533320665359497, 0.13482604920864105, -0.3374861776828766, -0.2458517849445343, -0.05683799833059311, -0.09766925871372223, 0.07586170732975006, 0.303862065076828, -0.10399532318115234, 0.08657120168209076, 0.14179809391498566, 0.5927181243896484, 0.10342465341091156, 0.01798161119222641, 0.38903552293777466, -0.3167450428009033, -0.09323112666606903, 0.06552381068468094, 0.04484669119119644, 0.03268719092011452, 0.023172665387392044, -0.006727991625666618, -0.04617548733949661, 0.006005957722663879, -0.5501014590263367, -0.10626459866762161, -0.5179227590560913, 0.12524369359016418, 0.1463538259267807, 0.22929544746875763, 0.2226138859987259, 0.10622510313987732, -0.001629900187253952, 0.36227887868881226, 0.014056438580155373, 0.4929518699645996, 0.1986682265996933, 0.013375949114561081, 0.38237425684928894, -0.3970080018043518, 0.0402207151055336, 0.03350651264190674, 0.025281205773353577, 0.10001876950263977, -0.06471360474824905, -0.323773056268692, -0.15992015600204468, 0.26030659675598145, 0.5518632531166077, -0.13924720883369446, -0.03905509412288666, 0.004460051655769348, 0.05193677544593811, -0.22786785662174225, 0.04709794744849205, 0.23190976679325104, 0.11919500678777695, 0.6925252676010132, -0.2181069552898407, -0.19055330753326416, -0.06892874091863632, 0.3634583055973053, -0.1331740766763687, -0.1488664150238037, 0.268441379070282, 0.11408045887947083, -0.2380615472793579, -0.12007583677768707, 0.3635563254356384, 0.019015423953533173, -0.2726183831691742, -0.038351092487573624, -0.6462541222572327, -0.0010517090559005737, 0.2018393874168396, 0.21608895063400269, 0.002697013784199953, -0.10066322982311249, -0.06302449107170105, -0.4287285804748535, -0.4295061230659485, -0.1758004128932953, 0.015250008553266525, 0.1846884787082672, -0.10490697622299194, -0.13811081647872925, -0.16636346280574799, 0.287413090467453, -0.16920256614685059, 0.12704963982105255, -0.14927968382835388, -0.034751079976558685, -0.2325531542301178, -0.11963091790676117, 0.25662949681282043, -0.26736971735954285, -0.072763592004776, 0.4968114197254181, 0.1447230577468872, -0.1006992980837822, -0.22836124897003174, 0.19181227684020996, 0.19369758665561676, -0.27628040313720703, 0.1159181296825409, -0.08784744888544083, -0.026911389082670212, -0.395971417427063, -0.13155634701251984, 0.12524345517158508, -0.041824474930763245, -0.1739666759967804, 0.36069217324256897, 0.003366732969880104, -0.08873757719993591, 0.09093406796455383, 0.08966533839702606, 0.18263141810894012, 0.23108498752117157, 0.2607836425304413, 0.11375997960567474, -0.09434209018945694, -0.09289520978927612, 0.12908028066158295, 0.25259000062942505, -0.004867132753133774, 0.4857933819293976, -0.46326518058776855, -0.04571465030312538, 0.3237813115119934, 0.28384238481521606, 0.5899597406387329, -0.16761966049671173, -0.3510514795780182, 0.5371619462966919, 0.0673656314611435, 0.0065698400139808655, -0.1613495647907257, 0.6644602417945862, 0.15825393795967102, 0.045457951724529266, 0.1627570539712906, 0.019580066204071045, -0.18562287092208862, -0.21710608899593353, 0.19562959671020508, 0.5061203241348267, -0.1599975824356079, 0.16687753796577454, 0.03287659212946892, 0.14943557977676392, 0.04035112261772156, 0.17100179195404053, 0.12627297639846802, 0.29473555088043213, 0.34010642766952515, 0.1046014353632927, 0.1777832806110382, 0.31316110491752625, 0.18757972121238708, 0.1668546199798584, -0.30849990248680115, -0.01360600721091032, 0.4159342348575592, -0.1603139340877533, 0.1294979453086853, 0.1480453610420227, 0.3157566785812378, -0.22701048851013184, -0.4776390790939331, -0.023226670920848846, 0.1678406000137329, -0.2326153814792633, -0.09588302671909332, 0.2136390507221222, -0.07067402452230453, -0.13469332456588745, 0.23730160295963287, -0.09236682951450348, 0.002115752547979355, 0.33633843064308167, 0.10476871579885483, 0.03195220232009888, -0.22255827486515045, -0.25623729825019836, -0.0582193061709404, 0.4285937547683716, -0.28695762157440186, 0.09003941714763641, -0.5049147009849548, -0.13174830377101898, -0.48915690183639526, 0.2665559649467468, 0.39992132782936096, 0.32271599769592285, -0.28857120871543884, 0.12909984588623047, -0.19684821367263794, 0.06420060992240906, -0.0162869393825531, 0.4500057101249695, -0.1311778873205185, -0.2901860475540161, 0.09720919281244278, -0.030321748927235603, -0.15760046243667603, -0.11697151511907578, 0.03792552649974823, 0.32260581851005554, 0.2488671839237213, -0.07942624390125275, 0.024028651416301727, -0.22516778111457825, -0.03762858361005783, -0.19122794270515442, -0.0004068836569786072, -0.20598594844341278, 0.4021201729774475, -0.37458229064941406, 0.11384952068328857, -0.17959065735340118, 0.040262944996356964, -0.038131989538669586, 0.41075456142425537, 0.47831836342811584, 0.018498612567782402, -0.4900265634059906, -0.275827556848526, -0.3414624333381653, 0.07316140085458755, -0.32984495162963867, 0.1948779672384262, -0.04581514745950699, -0.035479165613651276, -0.05245434492826462, 0.2963810861110687, -0.02793724089860916, 0.06914591789245605, -0.09725917875766754, 0.46850770711898804, -0.20026257634162903, 0.2274223268032074, -0.16667035222053528, -0.00923510454595089, 0.04470463842153549, -0.3787838816642761, 0.42363929748535156, -0.21951761841773987, -0.03541480004787445, -0.10368417203426361, -0.20757049322128296, 0.026213817298412323, -0.3193550109863281, 0.3301352858543396, 0.13529521226882935, 0.13543367385864258, 0.10417632758617401, -0.03811131417751312, -0.24816828966140747, -0.1095266342163086, -0.04016370326280594, 0.10813955217599869, 0.1610601544380188, 0.22940339148044586, -0.22767585515975952, 0.10798592120409012, -0.26678022742271423, -0.30360984802246094, -0.04617326334118843, -0.22441549599170685, -0.16964265704154968, 0.1176217645406723, -0.10686549544334412, 0.36687442660331726, -0.07057192176580429, 0.5256286263465881, -0.09072175621986389, 0.27207279205322266, -0.41877150535583496, -0.13784971833229065, 0.35450708866119385, -0.7848482131958008, -0.48078474402427673, -0.1499009132385254, -0.06791045516729355, 0.29854294657707214, 0.09567546844482422, -0.15959680080413818, -0.3156129717826843, 0.25746339559555054, -0.11390708386898041, -0.5589106678962708, 0.03010987490415573, 0.15597163140773773, 0.07535741478204727, -0.17388083040714264, 0.4652935862541199, 0.040851786732673645, -0.407234251499176, 0.3534640073776245, -0.02686547487974167 ]
https://github.com/huggingface/datasets/issues/6319
Which specific version of datasets are you using? What is the architecture of your colab setup? Ram? Cores? OS? On Thu, Oct 19, 2023, 2:27 PM pensive introvert ***@***.***> wrote: > Batched is far worse. A single batch of 1000 took hours and that was only > 1% > > > On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***> > wrote: > >> Hi! You should use the batched map for the best performance (with >> num_proc=1) - the fast tokenizers can process a batch's samples in >> parallel. >> >> E.g., the following code in Colab takes an hour to complete: >> >> # !pip install datasets transformersfrom datasets import load_datasetfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-cased")dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"]) >> >> — >> Reply to this email directly, view it on GitHub >> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771503757>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/ABDD3ZJHPSRVDEXFNMXR2N3YAFWFZAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDGNZVG4> >> . >> You are receiving this because you authored the thread.Message ID: >> ***@***.***> >> >
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
163
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, Which specific version of datasets are you using? What is the architecture of your colab setup? Ram? Cores? OS? On Thu, Oct 19, 2023, 2:27 PM pensive introvert ***@***.***> wrote: > Batched is far worse. A single batch of 1000 took hours and that was only > 1% > > > On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***> > wrote: > >> Hi! You should use the batched map for the best performance (with >> num_proc=1) - the fast tokenizers can process a batch's samples in >> parallel. >> >> E.g., the following code in Colab takes an hour to complete: >> >> # !pip install datasets transformersfrom datasets import load_datasetfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-cased")dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"]) >> >> — >> Reply to this email directly, view it on GitHub >> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771503757>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/ABDD3ZJHPSRVDEXFNMXR2N3YAFWFZAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDGNZVG4> >> . >> You are receiving this because you authored the thread.Message ID: >> ***@***.***> >> >
[ -0.6481049060821533, 0.10938793420791626, 0.024797581136226654, 0.10106520354747772, 0.0879831314086914, 0.12319760024547577, 0.27200183272361755, 0.2651056945323944, -0.1283535659313202, -0.057041190564632416, -0.055256787687540054, 0.6183364987373352, -0.12706303596496582, -0.23674380779266357, -0.3632725775241852, 0.200847789645195, 0.23262310028076172, 0.17975451052188873, 0.37825894355773926, 0.013601697981357574, -0.05289999768137932, 0.09430905431509018, -0.3617616295814514, -0.02587403729557991, -0.7112902998924255, -0.21808239817619324, -0.11002274602651596, -0.21995925903320312, -0.2947818636894226, -0.3993639051914215, 0.1278083324432373, 0.23760579526424408, -0.16132795810699463, 0.7184571623802185, -0.00011953662033192813, -0.13348573446273804, -0.03314322978258133, 0.27080434560775757, -0.008889317512512207, -0.06065890192985535, -0.2812004089355469, -0.14450716972351074, -0.002861078828573227, -0.040658414363861084, 0.21072128415107727, 0.08170388638973236, 0.13404688239097595, -0.22012312710285187, 0.3701794147491455, 0.09365224838256836, 0.09745997190475464, 0.1544668972492218, -0.20553281903266907, -0.0396341010928154, 0.16131016612052917, -0.042214274406433105, -0.2023923695087433, 0.2584409713745117, 0.3612072169780731, -0.33944767713546753, -0.17306584119796753, -0.0373694971203804, -0.33595043420791626, -0.0366663821041584, -0.20316536724567413, -0.17046108841896057, -0.016550227999687195, -0.5492026209831238, 0.3932773172855377, 0.18781879544258118, 0.17964190244674683, -0.020679382607340813, 0.03119809180498123, -0.23228216171264648, -0.242340087890625, -0.23060011863708496, 0.2321377396583557, 0.003984127193689346, -0.17780801653862, 0.2070101648569107, -0.35559237003326416, 0.23631525039672852, 0.20193597674369812, 0.17806179821491241, -0.06781592965126038, 0.4779076874256134, 0.05001257732510567, 0.2336554378271103, 0.10345623642206192, 0.009233878925442696, 0.05323319882154465, 0.0229647234082222, 0.039902213960886, 0.23500724136829376, -0.3799116611480713, -0.033676162362098694, 0.07641296088695526, -0.23309889435768127, 0.2539260685443878, -0.17755015194416046, -0.21936741471290588, 0.22301393747329712, -0.15550631284713745, 0.2967342734336853, 0.2791782021522522, 0.032827869057655334, 0.004705877974629402, 0.24400289356708527, 0.40447962284088135, -0.2544664740562439, -0.4511116147041321, 0.19864146411418915, -0.139932781457901, -0.22818590700626373, 0.054378069937229156, 0.01879246160387993, -0.07650759071111679, -0.13344785571098328, -0.2537572383880615, 0.15834687650203705, -0.5089267492294312, 0.15456357598304749, 0.11071380972862244, 0.2893069088459015, -0.21875078976154327, 0.13858899474143982, -0.2083732634782791, -0.32187512516975403, -0.20390591025352478, -0.20519697666168213, -0.019381312653422356, -0.26779085397720337, -0.31342077255249023, 0.15066277980804443, -0.014867447316646576, 0.050407566130161285, 0.21064266562461853, 0.09294779598712921, -0.07843010127544403, -0.027049392461776733, 0.11389672011137009, -0.43644317984580994, 0.18611975014209747, 0.07762929797172546, -0.16588068008422852, 0.5256991982460022, -0.016150247305631638, -0.13045744597911835, -0.10497365891933441, 0.09834890067577362, -0.34606361389160156, -0.04537452757358551, 0.063700370490551, 0.05026941001415253, -0.07493974268436432, 0.010141903534531593, -0.3666911721229553, 0.22877025604248047, 0.23333284258842468, -0.02196018397808075, 0.034342311322689056, -0.10816273838281631, -0.26844215393066406, -0.22084051370620728, 0.07148874551057816, 0.19649866223335266, -0.3046652376651764, -0.01151181012392044, 0.18337668478488922, 0.3231383264064789, 0.3572480082511902, 0.4397027790546417, 0.006939765065908432, 0.2957072854042053, -0.3554769456386566, 0.15833812952041626, 0.22932887077331543, 0.2821945250034332, -0.4518193006515503, 0.1841176301240921, -0.02510305494070053, -0.048695411533117294, -0.39383500814437866, -0.12697617709636688, 0.7035005688667297, -0.11915551126003265, 0.5945045351982117, 0.1647932529449463, -0.10989505052566528, 0.11812546104192734, -0.3536607027053833, -0.20701360702514648, 0.007559262216091156, 0.05670061707496643, 0.08707838505506516, -0.14078786969184875, -0.1703508496284485, -0.23310065269470215, 0.2246936410665512, 0.15978696942329407, -0.031937677413225174, 0.18990018963813782, 0.30591458082199097, -0.15910989046096802, 0.056470125913619995, -0.2723987102508545, 0.0027143796905875206, 0.34440112113952637, 0.2811885178089142, -0.07817529141902924, 0.01797628588974476, -0.05375836789608002, 0.01112847775220871, 0.19568803906440735, -0.11437869071960449, 0.08478446304798126, -0.022861696779727936, -0.1293310523033142, -0.1705726981163025, 0.16878388822078705, -0.19209422171115875, 0.07749784737825394, 0.03199535608291626, 0.15625706315040588, 0.2899262011051178, 0.15756243467330933, -0.031293995678424835, -0.24784311652183533, -0.043387848883867264, 0.06615839898586273, 0.25758302211761475, -0.18378017842769623, -0.3242570459842682, 0.2608475983142853, 0.2466798722743988, -0.050691794604063034, -0.16693800687789917, 0.2071627676486969, 0.14903272688388824, 0.06771153211593628, -0.14871734380722046, 0.07977040112018585, -0.08874338865280151, -0.2200833410024643, 0.1404581069946289, 0.24404022097587585, 0.03774181753396988, 0.3011089861392975, -0.22905169427394867, 0.2221936285495758, 0.13352328538894653, 0.03682434558868408, -0.031551286578178406, 0.20387206971645355, 0.39804214239120483, -0.022154919803142548, 0.19844388961791992, 0.22025319933891296, 0.02950230985879898, 0.2108108401298523, 0.6137742400169373, 0.1278141587972641, -0.05224606767296791, 0.13235217332839966, -0.23836100101470947, -0.022367801517248154, 0.19658499956130981, 0.1494353860616684, 0.3513243794441223, -0.02001962810754776, 0.08194003254175186, -0.05571023374795914, -0.08874715864658356, -0.01825474202632904, 0.034894201904535294, 0.12829603254795074, 0.3304092586040497, 0.13089746236801147, 0.1792895793914795, 0.2029665857553482, -0.2921207845211029, -0.44085028767585754, 0.06846871972084045, 0.4527522623538971, -0.04857316613197327, 0.10390087217092514, -0.22291678190231323, -0.027985017746686935, 0.03144162520766258, 0.00016719475388526917, -0.1532488763332367, -0.41553008556365967, -0.13794952630996704, 0.09470343589782715, 0.13380175828933716, 0.3601803183555603, 0.04677967727184296, 0.12069955468177795, 0.04651521146297455, -0.01929537206888199, -0.18015386164188385, -0.3491237461566925, -0.2666500508785248, -0.046763259917497635, 0.43423593044281006, -0.14007242023944855, 0.18040680885314941, 0.143039733171463, -0.2795799970626831, 0.08164579421281815, -0.2559548318386078, 0.020223408937454224, -0.1693737655878067, 0.05160240828990936, 0.15375354886054993, 0.33399978280067444, -0.5256465673446655, -0.11066724359989166, 0.31457388401031494, -0.5778436064720154, 0.0748969092965126, -0.2517396807670593, -0.04024006053805351, -0.32739919424057007, 0.06281648576259613, 0.07604604214429855, -0.11224149167537689, -0.2760600447654724, 0.3135543167591095, -0.14011576771736145, -0.0175432451069355, 0.13528722524642944, 0.23821237683296204, 0.13469524681568146, 0.16147740185260773, -0.2627145051956177, -0.16339918971061707, -0.25132256746292114, 0.38535720109939575, -0.06651578843593597, -0.13268667459487915, 0.06363452970981598, -0.0024787411093711853, 0.09702809900045395, 0.10265038907527924, -0.35660606622695923, 0.4193682074546814, -0.30361196398735046, 0.15240241587162018, 0.05270054191350937, -0.08894763141870499, 0.19362927973270416, 0.06801067292690277, 0.02420230209827423, 0.07387460768222809, -0.3769550323486328, -0.057497359812259674, 0.12297042459249496, 0.1943243145942688, 0.12959475815296173, 0.42205289006233215, 0.27511608600616455, 0.6927204132080078, 0.2844463586807251, -0.17446249723434448, 0.032181523740291595, 0.06734779477119446, 0.05226535722613335, -0.22334185242652893, -0.4826264977455139, 0.15920239686965942, -0.15014655888080597, -0.43122929334640503, 0.2232733815908432, 0.036428116261959076, -0.5762606859207153, -0.018925108015537262, -0.10693302750587463, 0.1424538940191269, -0.29830706119537354, 0.21224652230739594, -0.2302745282649994, -0.022172946482896805, 0.09026218205690384, 0.11689066141843796, -0.27979931235313416, -0.21642626821994781, 0.12145641446113586, -0.12770506739616394, -0.05678502470254898, -0.25863730907440186, -0.5778326988220215, 0.266059935092926, -0.6081479787826538, 0.2470470815896988, 0.03619542345404625, 0.4820430874824524, -0.03232058137655258, 0.26150405406951904, 0.1375572681427002, -0.07947291433811188, 0.6044260263442993, -0.08086393028497696, -0.17709383368492126, 0.1861874908208847, 0.15726825594902039, -0.2605288624763489, -0.16900208592414856, 0.11690653860569, 0.5971509218215942, 0.5342682003974915, 0.20047304034233093, -0.08353688567876816, -0.2055860012769699, 0.0915093868970871, 0.10442327708005905, -0.06876136362552643, -0.20905877649784088, -0.09839931130409241, -0.03115711733698845, -0.14713874459266663, 0.1900137960910797, 0.17196133732795715, -0.17815318703651428, 0.1306098997592926, -0.40117084980010986, -0.06623435765504837, -0.2815781235694885, 0.11982286721467972, 0.08733506500720978, 0.11967349052429199, 0.01620691642165184, 0.39988601207733154, 0.28794580698013306, 0.09124887734651566, 0.17865537106990814, 0.15126243233680725, -0.19730237126350403, -0.06724762916564941, 0.03953506797552109, 0.0049095600843429565, 0.5502799153327942, 0.5047970414161682, -0.14184480905532837, 0.06367461383342743, -0.36572444438934326, 0.3157120943069458, 0.03859768807888031, 0.3669733703136444, 0.3461005389690399, 0.23569221794605255, -0.7321020364761353, -0.3483006954193115, 0.10078263282775879, 0.4169155955314636, -0.21569137275218964, 0.5845955014228821, -0.429212361574173, -0.14737984538078308, 0.7821939587593079, 0.21189674735069275, 1.0791174173355103, -0.3165293037891388, 0.027262359857559204, -0.20671774446964264, 0.23641206324100494, 0.22293487191200256, -0.5704318284988403, 0.10527946054935455, -0.33905988931655884, -0.32111233472824097, -0.06756463646888733, -0.0839025154709816, 0.03707532957196236, 0.24833598732948303, -0.11498754471540451, 0.1345423460006714, 0.16375857591629028, 0.5302237272262573, 0.07468461245298386, -0.0807686522603035, 0.32819709181785583, -0.2511671781539917, -0.1589963436126709, 0.05837131291627884, 0.03181935101747513, 0.004869973286986351, -0.028995882719755173, 0.028839055448770523, -0.07247966527938843, 0.021050289273262024, -0.5203348398208618, -0.142076775431633, -0.6143737435340881, 0.12645408511161804, 0.07865479588508606, 0.2577386498451233, 0.10753744095563889, 0.0950951874256134, 0.01241990551352501, 0.3220807909965515, 0.08504224568605423, 0.43603628873825073, 0.23250409960746765, -0.020646343007683754, 0.2989733815193176, -0.41100138425827026, 0.15394960343837738, -0.015237100422382355, 0.01804688572883606, 0.09285047650337219, -0.03195582330226898, -0.37671804428100586, -0.12764686346054077, 0.2602904736995697, 0.5899378061294556, -0.15470290184020996, -0.16517949104309082, 0.0022810734808444977, 0.01644851267337799, -0.2686973810195923, 0.05070213973522186, 0.22729527950286865, 0.11738228797912598, 0.6545524001121521, -0.18637894093990326, -0.17165961861610413, -0.0820082426071167, 0.3312264084815979, -0.11894924938678741, -0.09385231137275696, 0.2638270854949951, 0.09240245819091797, -0.2274952232837677, -0.11097542941570282, 0.35246992111206055, -0.01575944758951664, -0.22577832639217377, 0.036420926451683044, -0.5557701587677002, 0.06692624092102051, 0.18658651411533356, 0.29642945528030396, 0.012458126991987228, -0.020125214010477066, -0.047514524310827255, -0.4620088040828705, -0.39930200576782227, -0.17901746928691864, -0.03674911707639694, 0.21167394518852234, -0.05650682374835014, -0.062048301100730896, -0.15123289823532104, 0.2376684546470642, -0.17705965042114258, 0.14732593297958374, -0.2025080919265747, -0.05267123505473137, -0.11607750505208969, -0.09736749529838562, 0.2345762848854065, -0.21412745118141174, -0.0686577707529068, 0.5469424724578857, 0.1422499716281891, -0.12068813294172287, -0.17631180584430695, 0.1903316080570221, 0.17669282853603363, -0.2380300611257553, 0.08925443887710571, -0.06024899333715439, -0.01909034140408039, -0.4011926054954529, -0.14474335312843323, 0.1277703046798706, -0.049111753702163696, -0.21279412508010864, 0.3304823338985443, 0.0071272216737270355, -0.10455979406833649, 0.12808465957641602, 0.09307079017162323, 0.17773975431919098, 0.23302681744098663, 0.2602810859680176, 0.041468072682619095, -0.09406904876232147, -0.0308210551738739, 0.1000857949256897, 0.08760198950767517, -0.08101870864629745, 0.4539310038089752, -0.44225403666496277, -0.11308253556489944, 0.2689027190208435, 0.2980848550796509, 0.5592211484909058, -0.12409527599811554, -0.3138292133808136, 0.5371643304824829, 0.05498534440994263, -0.005184046924114227, -0.05662843957543373, 0.7641738653182983, 0.19658935070037842, 0.07213540375232697, 0.17652246356010437, 0.09263312071561813, -0.16999953985214233, -0.25130751729011536, 0.1738070845603943, 0.30888378620147705, -0.1416320502758026, 0.1419796347618103, -0.05041658878326416, 0.21265238523483276, 0.10274747014045715, 0.15947632491588593, 0.12116606533527374, 0.3250613212585449, 0.29655641317367554, 0.08358955383300781, 0.18757522106170654, 0.3308873176574707, 0.18038158118724823, 0.14691677689552307, -0.3616487681865692, 0.07632080465555191, 0.4559900760650635, -0.17871153354644775, 0.1449774205684662, 0.12521223723888397, 0.31272849440574646, -0.21929813921451569, -0.5628398656845093, -0.04018472880125046, 0.2454371154308319, -0.2521422505378723, -0.046233028173446655, 0.17522090673446655, -0.08298979699611664, -0.23770806193351746, 0.2445250004529953, -0.09586569666862488, -0.012570681050419807, 0.285754919052124, 0.08799247443675995, 0.06996934115886688, -0.23058652877807617, -0.23688943684101105, -0.059922654181718826, 0.48545220494270325, -0.24217967689037323, 0.07685453444719315, -0.5623549818992615, -0.12336450070142746, -0.48247045278549194, 0.19323252141475677, 0.4065399765968323, 0.3046696186065674, -0.32833489775657654, 0.09849872440099716, -0.22727051377296448, 0.056951455771923065, -0.02875921130180359, 0.4152209460735321, -0.09861242771148682, -0.3642810881137848, 0.15092208981513977, -0.021442264318466187, -0.16171357035636902, -0.0964525043964386, 0.07970015704631805, 0.32057780027389526, 0.20144100487232208, -0.14483079314231873, 0.03903336077928543, -0.19544419646263123, -0.1278132200241089, -0.14925973117351532, 0.020353317260742188, -0.32582196593284607, 0.301047682762146, -0.42567723989486694, 0.14776211977005005, -0.20330974459648132, 0.05255558341741562, -0.10131935775279999, 0.35604995489120483, 0.5401058197021484, 0.06910350173711777, -0.46800872683525085, -0.30179762840270996, -0.3003273606300354, 0.0468481183052063, -0.28778547048568726, 0.18509039282798767, -0.0893850028514862, -0.0351765900850296, -0.015544012188911438, 0.3003331422805786, -0.05499632656574249, 0.17273466289043427, -0.015104908496141434, 0.42874541878700256, -0.2786804437637329, 0.21463514864444733, -0.1531902700662613, -0.07263579964637756, 0.023330964148044586, -0.38849106431007385, 0.38860422372817993, -0.34360772371292114, -0.03704056516289711, -0.08397766947746277, -0.24674974381923676, 0.034140147268772125, -0.31198862195014954, 0.3420332670211792, 0.15159198641777039, 0.11042820662260056, 0.10696928203105927, -0.007115229964256287, -0.19368861615657806, -0.10615886747837067, -0.029550256207585335, 0.15237963199615479, 0.1970357596874237, 0.32161080837249756, -0.20017234981060028, 0.17497849464416504, -0.20188266038894653, -0.14689227938652039, -0.008838802576065063, -0.2143627405166626, -0.0788557305932045, 0.08545516431331635, -0.10145055502653122, 0.3943801820278168, -0.049578242003917694, 0.5207117795944214, -0.14943546056747437, 0.29242217540740967, -0.3971356749534607, -0.1312946081161499, 0.37042465806007385, -0.6660071015357971, -0.3974868059158325, -0.13980866968631744, -0.03758379817008972, 0.3506193459033966, 0.09347494691610336, -0.10723592340946198, -0.38652604818344116, 0.23416876792907715, -0.12630802392959595, -0.5711507797241211, 0.11419573426246643, 0.1287492960691452, 0.08261796832084656, -0.19980379939079285, 0.41283753514289856, -0.010758108459413052, -0.4000427722930908, 0.3509863018989563, -0.020097147673368454 ]
https://github.com/huggingface/datasets/issues/6319
from functools import partial import transformers from datasets import load_dataset, concatenate_datasets, load_from_disk model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf" output_dir="/opt/data/data/LongLoRA/checkpoints" cache_dir="/opt/data/data/LongLoRA/cache" model_max_length=16384 IGNORE_INDEX = -100 DEFAULT_PAD_TOKEN = "[PAD]" DEFAULT_EOS_TOKEN = "</s>" DEFAULT_BOS_TOKEN = "<s>" DEFAULT_UNK_TOKEN = "<unk>" tokenizer = transformers.LlamaTokenizerFast.from_pretrained( model_name_or_path, cache_dir=cache_dir, model_max_length=model_max_length, padding_side="right", use_fast=True, #use_fast=False ) special_tokens_dict = dict() if tokenizer.pad_token is None: special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN if tokenizer.eos_token is None: special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN if tokenizer.bos_token is None: special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN if tokenizer.unk_token is None: special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN tokenizer.add_special_tokens(special_tokens_dict) def tokenize_fn(tokenizer, example): context_length = tokenizer.model_max_length outputs = tokenizer( tokenizer.eos_token.join(example["text"]), #truncation=False, truncation=True, return_tensors="pt", #return_tensors="np", pad_to_multiple_of=context_length, padding=True, ) return {"input_ids": outputs["input_ids"].view(-1, context_length)} for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=16, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***> wrote: > Can you please provide a self-contained reproducer? > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
170
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, from functools import partial import transformers from datasets import load_dataset, concatenate_datasets, load_from_disk model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf" output_dir="/opt/data/data/LongLoRA/checkpoints" cache_dir="/opt/data/data/LongLoRA/cache" model_max_length=16384 IGNORE_INDEX = -100 DEFAULT_PAD_TOKEN = "[PAD]" DEFAULT_EOS_TOKEN = "</s>" DEFAULT_BOS_TOKEN = "<s>" DEFAULT_UNK_TOKEN = "<unk>" tokenizer = transformers.LlamaTokenizerFast.from_pretrained( model_name_or_path, cache_dir=cache_dir, model_max_length=model_max_length, padding_side="right", use_fast=True, #use_fast=False ) special_tokens_dict = dict() if tokenizer.pad_token is None: special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN if tokenizer.eos_token is None: special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN if tokenizer.bos_token is None: special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN if tokenizer.unk_token is None: special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN tokenizer.add_special_tokens(special_tokens_dict) def tokenize_fn(tokenizer, example): context_length = tokenizer.model_max_length outputs = tokenizer( tokenizer.eos_token.join(example["text"]), #truncation=False, truncation=True, return_tensors="pt", #return_tensors="np", pad_to_multiple_of=context_length, padding=True, ) return {"input_ids": outputs["input_ids"].view(-1, context_length)} for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=16, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***> wrote: > Can you please provide a self-contained reproducer? > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
[ -0.6168144345283508, 0.07999947667121887, 0.05563335493206978, 0.20444941520690918, 0.2958584725856781, 0.12437372654676437, 0.2487582415342331, 0.3236621022224426, -0.10938513278961182, -0.13184724748134613, -0.19389095902442932, 0.6695704460144043, -0.06927616894245148, -0.4167860150337219, -0.27635377645492554, 0.16567382216453552, 0.20886331796646118, 0.12861666083335876, 0.290213018655777, -0.062228430062532425, -0.06579497456550598, 0.042703866958618164, -0.28154855966567993, -0.008720021694898605, -0.5759648084640503, -0.07758861035108566, -0.009028233587741852, -0.19113388657569885, -0.12882229685783386, -0.49303823709487915, 0.07235298305749893, 0.10570937395095825, -0.19647464156150818, 0.7518895268440247, -0.00011996035755146295, -0.10678613930940628, 0.010537639260292053, 0.24811092019081116, 0.052390363067388535, 0.09757868945598602, -0.15889519453048706, -0.02581683173775673, -0.11429601907730103, -0.016620755195617676, 0.2547513544559479, 0.06119776889681816, 0.10704729706048965, -0.27669215202331543, 0.34501922130584717, 0.1686270833015442, 0.09592154622077942, 0.2521144151687622, -0.12805967032909393, -0.0023865997791290283, 0.19014742970466614, -0.08689644932746887, -0.1368309110403061, 0.10668306052684784, 0.3610529899597168, -0.32709649205207825, -0.2342468500137329, -0.0592181459069252, -0.419522225856781, -0.15363401174545288, -0.11509241163730621, -0.24274981021881104, 0.007102177478373051, -0.4677819311618805, 0.4706481695175171, 0.323302686214447, 0.17813600599765778, -0.09361875802278519, -0.02685418911278248, -0.16406597197055817, -0.28353995084762573, -0.1632750779390335, 0.24338942766189575, 0.01013384759426117, -0.06759808212518692, 0.15907973051071167, -0.33111506700515747, 0.17339083552360535, 0.11590226739645004, 0.21101060509681702, -0.16528545320034027, 0.536991536617279, 0.15987583994865417, 0.2247007042169571, 0.025908006355166435, -0.0722603052854538, -0.06024252623319626, -0.020961543545126915, 0.019052496179938316, 0.2960982620716095, -0.4717777371406555, -0.06661935150623322, 0.1601967215538025, -0.3164941966533661, 0.35857513546943665, -0.2481473684310913, -0.34909725189208984, 0.3126368522644043, -0.19583339989185333, 0.2189427614212036, 0.2664530873298645, 0.01815115660429001, -0.06060473620891571, 0.36002376675605774, 0.4140610694885254, -0.338291198015213, -0.32609957456588745, 0.19594070315361023, -0.11728210002183914, -0.20850926637649536, 0.09567044675350189, -0.011113101616501808, -0.13806429505348206, -0.09063814580440521, -0.15860804915428162, 0.22117313742637634, -0.5713104009628296, 0.12568002939224243, 0.13670231401920319, 0.34684163331985474, -0.259753555059433, 0.15703898668289185, -0.1837906539440155, -0.2086675465106964, -0.22248658537864685, -0.14890551567077637, -0.06205812841653824, -0.3380988538265228, -0.253975510597229, 0.11192765831947327, 0.028215155005455017, 0.06112432852387428, 0.1642976701259613, 0.07250961661338806, -0.14234387874603271, -0.08864393085241318, 0.13018053770065308, -0.3213346600532532, 0.18155527114868164, 0.07901718467473984, -0.24473100900650024, 0.5588843822479248, -0.003894383553415537, -0.13662897050380707, -0.15396656095981598, 0.12643933296203613, -0.23866583406925201, -0.05600586533546448, 0.04910290241241455, 0.06083282083272934, -0.12220099568367004, 0.005944772623479366, -0.2442326545715332, 0.12857112288475037, 0.32633453607559204, 0.06453010439872742, 0.07860226929187775, -0.13459575176239014, -0.2607276439666748, -0.20554131269454956, 0.08316794782876968, 0.20716282725334167, -0.14555300772190094, -0.05879177153110504, 0.15553930401802063, 0.20645055174827576, 0.2315615713596344, 0.4249538481235504, 0.03230699524283409, 0.32157620787620544, -0.31798428297042847, 0.24034073948860168, 0.2449100911617279, 0.1695600003004074, -0.5884498953819275, 0.2657739222049713, 0.012402378022670746, -0.07488298416137695, -0.4418700635433197, 0.0062160007655620575, 0.6111196875572205, -0.14858685433864594, 0.39809566736221313, 0.2775619328022003, -0.03188518434762955, 0.040475986897945404, -0.319189190864563, -0.2840900421142578, 0.060562070459127426, 0.13702940940856934, 0.16037216782569885, -0.13387982547283173, -0.16394935548305511, -0.1102910041809082, 0.2869059443473816, 0.1563868671655655, 0.0231013223528862, 0.24482955038547516, 0.35085904598236084, -0.06960508227348328, 0.1452033668756485, -0.32778680324554443, -0.17324641346931458, 0.3360317051410675, 0.220198392868042, -0.13123494386672974, -0.024487994611263275, -0.026417404413223267, 0.021595321595668793, 0.20541220903396606, -0.17363879084587097, 0.12410125136375427, -0.007917158305644989, -0.11236875504255295, -0.1565922498703003, 0.20869095623493195, -0.16976559162139893, -0.0173577219247818, 0.09216170758008957, 0.11468756198883057, 0.1559191197156906, 0.13354013860225677, -0.05047339200973511, -0.1745731234550476, -0.09554564207792282, 0.05205670744180679, 0.29849180579185486, -0.13648642599582672, -0.25329554080963135, 0.2319364845752716, 0.190999835729599, 0.02427060902118683, -0.2714966833591461, 0.3152313828468323, 0.15424679219722748, -0.0481351763010025, -0.11185324192047119, 0.1636258363723755, -0.1205032467842102, -0.30597591400146484, 0.058960020542144775, 0.10074033588171005, 0.02529389038681984, 0.3066732883453369, -0.17845439910888672, 0.21596604585647583, 0.20815980434417725, -0.07270540297031403, -0.08314460515975952, 0.2158244252204895, 0.4141402244567871, -0.001183507964015007, 0.3065047860145569, 0.2059120386838913, 0.023779429495334625, 0.0767936035990715, 0.6414348483085632, 0.045906320214271545, 0.044679608196020126, 0.1496378481388092, -0.2451067417860031, 0.027387991547584534, 0.01735120825469494, 0.11118726432323456, 0.30456578731536865, -0.06754177063703537, 0.1470644772052765, -0.011614786460995674, -0.09397637844085693, -0.05441838130354881, -0.008679598569869995, 0.11619339883327484, 0.2654479146003723, 0.324039489030838, 0.15115951001644135, 0.2323572337627411, -0.30719685554504395, -0.4235004782676697, 0.1252671182155609, 0.446729838848114, -0.07605081796646118, 0.09446390718221664, -0.20890004932880402, 0.11177059262990952, -0.008496027439832687, -0.0581715926527977, -0.24672728776931763, -0.4202783405780792, -0.16085457801818848, -0.037349432706832886, 0.12111705541610718, 0.5053715109825134, 0.032946325838565826, 0.01852339506149292, 0.09149253368377686, -0.07392767816781998, -0.20164355635643005, -0.3772938847541809, -0.27591606974601746, -0.11264650523662567, 0.5043506622314453, -0.25724875926971436, 0.06304100900888443, 0.21350020170211792, -0.33884406089782715, -0.002703828737139702, -0.32083451747894287, 0.006387399043887854, -0.07087463140487671, 0.0019041839987039566, 0.17139098048210144, 0.2958170771598816, -0.29580405354499817, -0.0505264550447464, 0.3882417678833008, -0.5811415314674377, 0.1424258053302765, -0.0795794427394867, -0.01175466924905777, -0.25493887066841125, 0.06367288529872894, 0.08328178524971008, 0.0121671874076128, -0.2819806933403015, 0.23690661787986755, -0.23437339067459106, 0.027319829910993576, 0.18779006600379944, 0.23119479417800903, 0.16220062971115112, 0.019658725708723068, -0.27508383989334106, -0.17342014610767365, -0.013009853661060333, 0.46207091212272644, -0.06702779978513718, -0.1844291239976883, -0.03486654907464981, -0.050969574600458145, 0.15849417448043823, 0.15202033519744873, -0.4738195836544037, 0.5096522569656372, -0.4282427430152893, 0.10403205454349518, -0.13717901706695557, -0.031997404992580414, 0.20592118799686432, 0.08196677267551422, 0.0907420888543129, 0.0325205996632576, -0.2474890649318695, -0.07106564939022064, 0.05550127103924751, 0.1478525698184967, 0.05201800912618637, 0.48802170157432556, 0.27698954939842224, 0.5939275026321411, 0.29499515891075134, -0.1492970883846283, 0.011347221210598946, 0.03066341020166874, 0.02163073420524597, -0.20455387234687805, -0.4250184893608093, 0.10864663124084473, -0.1602710485458374, -0.31704264879226685, 0.17805606126785278, 0.024046815931797028, -0.5851534605026245, 0.052290529012680054, -0.1047944724559784, 0.24585101008415222, -0.24849224090576172, 0.263531893491745, -0.22068576514720917, -0.041676029562950134, 0.059579432010650635, 0.16642001271247864, -0.26417845487594604, -0.19730603694915771, 0.28405100107192993, -0.11418277025222778, 0.014313049614429474, -0.2693764567375183, -0.6374510526657104, 0.33070099353790283, -0.5238854885101318, 0.1699071079492569, -0.08007249236106873, 0.5527870655059814, -0.0633973479270935, 0.21744221448898315, 0.09265139698982239, -0.14481869339942932, 0.6487617492675781, -0.09165002405643463, -0.00396366324275732, 0.2229825109243393, 0.20525452494621277, -0.35910266637802124, -0.07916848361492157, 0.13148680329322815, 0.34320521354675293, 0.524634063243866, 0.355415403842926, -0.18031994998455048, -0.1949121057987213, -0.037088774144649506, 0.1500529646873474, -0.04975195229053497, -0.2584228217601776, -0.09252277761697769, -0.01210874319076538, -0.08129263669252396, 0.14420299232006073, 0.13513758778572083, -0.15743902325630188, 0.21912747621536255, -0.3574790060520172, -0.13727563619613647, -0.2733125686645508, 0.0939362570643425, 0.031926825642585754, 0.10864602029323578, -0.014753714203834534, 0.43800151348114014, 0.2552779018878937, -0.005518920719623566, 0.06710980832576752, 0.17048417031764984, -0.2000684142112732, -0.09484153985977173, 0.018522389233112335, 0.0124308280646801, 0.5113216638565063, 0.4752664268016815, -0.06733883917331696, 0.08036541938781738, -0.18620428442955017, 0.2709265351295471, -0.11119633913040161, 0.2808678150177002, 0.3677092492580414, 0.2422819435596466, -0.6435720324516296, -0.3086499273777008, 0.25118622183799744, 0.31807416677474976, -0.1823458969593048, 0.6205850839614868, -0.45301735401153564, -0.17644880712032318, 0.7457543611526489, 0.2656373679637909, 1.0328699350357056, -0.3647281527519226, 0.02299121767282486, -0.18689189851284027, 0.09022222459316254, 0.19002413749694824, -0.5564007759094238, 0.14025095105171204, -0.40102308988571167, -0.21118256449699402, -0.05693326145410538, -0.11017227917909622, 0.028275765478610992, 0.29257529973983765, -0.09050650894641876, 0.01664065197110176, 0.05786214768886566, 0.595666766166687, 0.09439779072999954, 0.1125221848487854, 0.25444644689559937, -0.2477603256702423, -0.17660032212734222, 0.06237134337425232, 0.024617116898298264, 0.011851796880364418, 0.013994704931974411, 0.0054846592247486115, -0.12297780066728592, 0.007311567664146423, -0.4904564619064331, -0.044117894023656845, -0.48431286215782166, 0.1307869553565979, 0.14467623829841614, 0.17314104735851288, 0.23282302916049957, 0.18481771647930145, -0.08854848146438599, 0.32864806056022644, 0.025250369682908058, 0.5039056539535522, 0.18264174461364746, 0.023073632270097733, 0.44266819953918457, -0.36475223302841187, -0.010485096834599972, 0.035811662673950195, -0.038126423954963684, 0.10995254665613174, 0.02199959009885788, -0.30324840545654297, -0.17966501414775848, 0.18813756108283997, 0.5631729960441589, -0.12868115305900574, -0.10199792683124542, 0.016850588843226433, 0.03717777878046036, -0.16554975509643555, 0.05395985394716263, 0.25909215211868286, 0.07571761310100555, 0.5859753489494324, -0.2261911928653717, -0.1822778582572937, -0.0808284729719162, 0.37265336513519287, -0.17984086275100708, -0.10338078439235687, 0.29589152336120605, 0.2221209555864334, -0.19249196350574493, -0.10318916290998459, 0.3007522225379944, 0.12329927086830139, -0.3054336607456207, -0.1355401873588562, -0.6642512083053589, -0.021582528948783875, 0.09587657451629639, 0.14755217730998993, -0.06997312605381012, -0.086390420794487, -0.06312204897403717, -0.4687090218067169, -0.417616605758667, -0.1678595095872879, 0.02637588419020176, 0.22567513585090637, -0.3167598843574524, -0.10671304911375046, -0.23674696683883667, 0.33849313855171204, -0.164107084274292, 0.13338971138000488, -0.196473628282547, -0.03263946622610092, -0.21720631420612335, -0.19829720258712769, 0.1879282146692276, -0.2311379313468933, -0.05422776937484741, 0.43217259645462036, 0.08526389300823212, -0.0876028835773468, -0.2782425284385681, 0.2031746208667755, 0.16675031185150146, -0.2549310624599457, 0.12957128882408142, -0.19201955199241638, -0.05178249254822731, -0.4012450575828552, -0.09540441632270813, 0.17265647649765015, -0.11854001879692078, -0.05405452102422714, 0.29951152205467224, 0.011825041845440865, -0.12649977207183838, 0.023989945650100708, 0.06547309458255768, 0.12434189766645432, 0.2601695656776428, 0.19782087206840515, 0.10367174446582794, -0.035594403743743896, -0.2041386216878891, 0.1404954195022583, 0.12611883878707886, -0.10855885595083237, 0.5290717482566833, -0.4205425977706909, -0.05591540411114693, 0.39706936478614807, 0.28728336095809937, 0.6435379981994629, -0.2118171751499176, -0.3269093632698059, 0.5285830497741699, 0.08430756628513336, 0.025217868387699127, -0.19254295527935028, 0.7998390197753906, 0.07478252798318863, 0.027075283229351044, 0.09411812573671341, -0.010983474552631378, -0.21420201659202576, -0.20248691737651825, 0.19393852353096008, 0.48197901248931885, -0.2621012330055237, 0.07719609141349792, 0.058228544890880585, 0.150873601436615, 0.05175985395908356, 0.2283332645893097, 0.11559894680976868, 0.3340253531932831, 0.34038209915161133, 0.21565315127372742, 0.05000171810388565, 0.2274145483970642, 0.2329542189836502, 0.23216363787651062, -0.3304295539855957, -0.10231111198663712, 0.4399372935295105, -0.2447444200515747, 0.08318309485912323, 0.04967604577541351, 0.20393428206443787, -0.10613425076007843, -0.49355190992355347, -0.026910096406936646, 0.18127569556236267, -0.26212963461875916, -0.06796322762966156, 0.2420443445444107, -0.07042445242404938, -0.1110934317111969, 0.20937514305114746, -0.06247841194272041, 0.018614811822772026, 0.2944132089614868, 0.1307673454284668, 0.04204164072871208, -0.17881518602371216, -0.23317578434944153, -0.09015141427516937, 0.42455658316612244, -0.2948300838470459, 0.05550069361925125, -0.3935786485671997, -0.13252957165241241, -0.5342004895210266, 0.13930726051330566, 0.3081553280353546, 0.323403000831604, -0.33300113677978516, 0.22496668994426727, -0.18098321557044983, 0.07697983831167221, -0.001409776508808136, 0.4706982970237732, -0.1069941520690918, -0.30581507086753845, 0.10601045191287994, -0.058941736817359924, -0.16146552562713623, -0.18773874640464783, 0.0734146237373352, 0.4239213764667511, 0.2403619885444641, -0.0253526009619236, -0.03914996236562729, -0.2538524866104126, -0.06886174529790878, -0.1577305644750595, -0.010563232004642487, -0.2280772179365158, 0.36206960678100586, -0.278940886259079, 0.16462668776512146, -0.20167183876037598, 0.036123812198638916, -0.1005437821149826, 0.3159909248352051, 0.5411356091499329, 0.16468992829322815, -0.46212053298950195, -0.20170223712921143, -0.36445295810699463, 0.17330624163150787, -0.35454294085502625, 0.17724405229091644, 0.02738911285996437, 0.03731544315814972, -0.05293085426092148, 0.24101802706718445, 0.008885450661182404, 0.04159993678331375, 0.034169234335422516, 0.4730869233608246, -0.17446687817573547, 0.12474194169044495, -0.1280609369277954, -0.012294350191950798, -0.00956493616104126, -0.40652942657470703, 0.41180896759033203, -0.27692902088165283, -0.011133916676044464, -0.10548903048038483, -0.22121238708496094, 0.060338906943798065, -0.15884508192539215, 0.3053276836872101, 0.16141760349273682, 0.14377236366271973, 0.11040239036083221, -0.09028807282447815, -0.23813150823116302, -0.06716880202293396, 0.013294748961925507, 0.06022590398788452, 0.11646051704883575, 0.24848686158657074, -0.2799028158187866, 0.09433162212371826, -0.2893570065498352, -0.14023590087890625, -0.1141953319311142, -0.21808838844299316, -0.11041238903999329, 0.13550959527492523, -0.07764662057161331, 0.3419780135154724, 0.023680828511714935, 0.5284774899482727, -0.07786853611469269, 0.2941216230392456, -0.42126163840293884, -0.05294777452945709, 0.3651862144470215, -0.7131102085113525, -0.45592790842056274, -0.10567790269851685, -0.0638808012008667, 0.2516106367111206, 0.1577623188495636, -0.16250857710838318, -0.3133075535297394, 0.2942315638065338, -0.06973445415496826, -0.6543228626251221, 0.01244240254163742, 0.19096216559410095, 0.006817467510700226, -0.16421088576316833, 0.4605734944343567, 0.03028539940714836, -0.360908567905426, 0.32602399587631226, -0.03031191974878311 ]
https://github.com/huggingface/datasets/issues/6319
I changed the tokenizer to one without "Fast suffix, and something changed. The fraction, although still slowed a lot at 80% was able to get over the finish line of 100% I have to do more testng, see if the whole set can be processed On Thu, Oct 19, 2023 at 3:03 PM pensive introvert < ***@***.***> wrote: > from functools import partial > import transformers > from datasets import load_dataset, concatenate_datasets, load_from_disk > > model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf" > output_dir="/opt/data/data/LongLoRA/checkpoints" > cache_dir="/opt/data/data/LongLoRA/cache" > model_max_length=16384 > > IGNORE_INDEX = -100 > DEFAULT_PAD_TOKEN = "[PAD]" > DEFAULT_EOS_TOKEN = "</s>" > DEFAULT_BOS_TOKEN = "<s>" > DEFAULT_UNK_TOKEN = "<unk>" > > > tokenizer = transformers.LlamaTokenizerFast.from_pretrained( > model_name_or_path, > cache_dir=cache_dir, > model_max_length=model_max_length, > padding_side="right", > use_fast=True, > #use_fast=False > ) > > special_tokens_dict = dict() > if tokenizer.pad_token is None: > special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN > if tokenizer.eos_token is None: > special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN > if tokenizer.bos_token is None: > special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN > if tokenizer.unk_token is None: > special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN > > tokenizer.add_special_tokens(special_tokens_dict) > > def tokenize_fn(tokenizer, example): > context_length = tokenizer.model_max_length > outputs = tokenizer( > tokenizer.eos_token.join(example["text"]), > #truncation=False, > truncation=True, > return_tensors="pt", > #return_tensors="np", > pad_to_multiple_of=context_length, > padding=True, > ) > return {"input_ids": outputs["input_ids"].view(-1, context_length)} > > for idx in range(100): > dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", > cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') > dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, > num_proc=16, remove_columns=["text", "meta"]) > dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") > > > On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***> > wrote: > >> Can you please provide a self-contained reproducer? >> >> — >> Reply to this email directly, view it on GitHub >> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE> >> . >> You are receiving this because you authored the thread.Message ID: >> ***@***.***> >> >
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
290
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, I changed the tokenizer to one without "Fast suffix, and something changed. The fraction, although still slowed a lot at 80% was able to get over the finish line of 100% I have to do more testng, see if the whole set can be processed On Thu, Oct 19, 2023 at 3:03 PM pensive introvert < ***@***.***> wrote: > from functools import partial > import transformers > from datasets import load_dataset, concatenate_datasets, load_from_disk > > model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf" > output_dir="/opt/data/data/LongLoRA/checkpoints" > cache_dir="/opt/data/data/LongLoRA/cache" > model_max_length=16384 > > IGNORE_INDEX = -100 > DEFAULT_PAD_TOKEN = "[PAD]" > DEFAULT_EOS_TOKEN = "</s>" > DEFAULT_BOS_TOKEN = "<s>" > DEFAULT_UNK_TOKEN = "<unk>" > > > tokenizer = transformers.LlamaTokenizerFast.from_pretrained( > model_name_or_path, > cache_dir=cache_dir, > model_max_length=model_max_length, > padding_side="right", > use_fast=True, > #use_fast=False > ) > > special_tokens_dict = dict() > if tokenizer.pad_token is None: > special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN > if tokenizer.eos_token is None: > special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN > if tokenizer.bos_token is None: > special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN > if tokenizer.unk_token is None: > special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN > > tokenizer.add_special_tokens(special_tokens_dict) > > def tokenize_fn(tokenizer, example): > context_length = tokenizer.model_max_length > outputs = tokenizer( > tokenizer.eos_token.join(example["text"]), > #truncation=False, > truncation=True, > return_tensors="pt", > #return_tensors="np", > pad_to_multiple_of=context_length, > padding=True, > ) > return {"input_ids": outputs["input_ids"].view(-1, context_length)} > > for idx in range(100): > dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", > cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') > dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, > num_proc=16, remove_columns=["text", "meta"]) > dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") > > > On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***> > wrote: > >> Can you please provide a self-contained reproducer? >> >> — >> Reply to this email directly, view it on GitHub >> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE> >> . >> You are receiving this because you authored the thread.Message ID: >> ***@***.***> >> >
[ -0.5819017887115479, 0.12894117832183838, 0.033899616450071335, 0.16532237827777863, 0.20738404989242554, 0.16037096083164215, 0.23931464552879333, 0.29810354113578796, -0.06317737698554993, -0.18398520350456238, -0.10214298963546753, 0.6148468255996704, -0.09060730785131454, -0.360942006111145, -0.28556180000305176, 0.1679876744747162, 0.19378341734409332, 0.17457708716392517, 0.292436420917511, -0.045047979801893234, -0.0385076180100441, 0.07114001363515854, -0.30697333812713623, 0.03173208236694336, -0.5628754496574402, -0.2029639035463333, 0.015881642699241638, -0.19237516820430756, -0.24015356600284576, -0.46761852502822876, 0.0906529575586319, 0.11187994480133057, -0.16877511143684387, 0.8041248917579651, -0.00011883651313837618, -0.06896325945854187, 0.015798142179846764, 0.2677840292453766, 0.037730731070041656, 0.00018527358770370483, -0.2023787796497345, -0.06982950866222382, -0.10953842103481293, -0.0512203648686409, 0.2664373219013214, 0.028321344405412674, 0.06604232639074326, -0.3128631114959717, 0.38228827714920044, 0.2019151896238327, 0.10527566075325012, 0.2743864357471466, -0.09982885420322418, 0.02282097563147545, 0.13657259941101074, -0.058659762144088745, -0.1250409334897995, 0.18069066107273102, 0.3104785680770874, -0.35777002573013306, -0.22532103955745697, -0.05280178040266037, -0.36359870433807373, -0.1202656552195549, -0.07138815522193909, -0.23333051800727844, 0.04844135046005249, -0.5176187753677368, 0.3753764033317566, 0.290006548166275, 0.09839063882827759, -0.03361111134290695, -0.05763840675354004, -0.2389349788427353, -0.3032912611961365, -0.11573954671621323, 0.23484256863594055, 0.011791102588176727, -0.089011549949646, 0.19613666832447052, -0.44511327147483826, 0.14868780970573425, 0.12318450957536697, 0.20910616219043732, -0.17024202644824982, 0.4430617094039917, 0.0667916089296341, 0.21945345401763916, 0.07254879176616669, -0.07037794589996338, -0.09063248336315155, -0.11243436485528946, 0.023999236524105072, 0.2687963545322418, -0.4278455078601837, -0.07842463999986649, 0.16364222764968872, -0.25582391023635864, 0.32481497526168823, -0.2236420214176178, -0.32656019926071167, 0.28836575150489807, -0.17505627870559692, 0.22595416009426117, 0.3320884108543396, 0.05396680161356926, -0.05513884872198105, 0.32000598311424255, 0.3821244537830353, -0.29715287685394287, -0.32523036003112793, 0.18813768029212952, -0.13363279402256012, -0.18833094835281372, 0.05101398378610611, -0.034023165702819824, -0.142970472574234, -0.07371463626623154, -0.1766054928302765, 0.2725466787815094, -0.481832891702652, 0.15953443944454193, 0.13784648478031158, 0.2924582064151764, -0.19969122111797333, 0.17033974826335907, -0.1971481591463089, -0.22181454300880432, -0.17758899927139282, -0.12988197803497314, -0.02448255568742752, -0.32188135385513306, -0.27070391178131104, 0.08116210252046585, -0.015135250985622406, 0.021902240812778473, 0.13285015523433685, 0.10496781766414642, -0.10588516294956207, -0.06530611217021942, 0.1738673746585846, -0.3668241500854492, 0.2139057219028473, 0.09475113451480865, -0.22791454195976257, 0.5854100584983826, 0.03172830864787102, -0.1689867079257965, -0.1312418133020401, 0.09871198236942291, -0.2845163941383362, -0.08914722502231598, -0.01418747752904892, 0.08624991774559021, -0.1893952637910843, 0.006436161696910858, -0.2842804491519928, 0.19272707402706146, 0.28343403339385986, 0.027478300034999847, 0.05768870934844017, -0.12390483170747757, -0.27614882588386536, -0.1849980652332306, 0.0956227034330368, 0.2042987048625946, -0.1994674652814865, -0.0662628635764122, 0.11348920315504074, 0.2467651516199112, 0.22208334505558014, 0.44221633672714233, -0.03083539381623268, 0.32001087069511414, -0.33930307626724243, 0.25967320799827576, 0.22098906338214874, 0.25705739855766296, -0.49455246329307556, 0.31107261776924133, -0.047773003578186035, -0.019540898501873016, -0.4624699652194977, -0.12952420115470886, 0.6507400274276733, -0.13542838394641876, 0.47697481513023376, 0.2343616485595703, -0.057050980627536774, 0.04819279909133911, -0.33053475618362427, -0.26092925667762756, 0.13458220660686493, 0.06189977377653122, 0.16744612157344818, -0.11532674729824066, -0.18196845054626465, -0.16814696788787842, 0.27102401852607727, 0.19136254489421844, 0.014370568096637726, 0.24440997838974, 0.30668696761131287, -0.024250298738479614, 0.11095459014177322, -0.39407265186309814, -0.06694906949996948, 0.3335054814815521, 0.27096059918403625, -0.1523028016090393, 0.030836956575512886, 0.03450314700603485, -0.036362625658512115, 0.19290834665298462, -0.16566912829875946, 0.13245774805545807, 0.010834082961082458, -0.19404105842113495, -0.1912948340177536, 0.19777612388134003, -0.2008502185344696, -0.10900295525789261, 0.04632361978292465, 0.10970968008041382, 0.13975216448307037, 0.1690520942211151, -0.024609601125121117, -0.18369467556476593, -0.1299319565296173, 0.041263647377491, 0.24829766154289246, -0.13514766097068787, -0.2562630772590637, 0.2588751018047333, 0.17424459755420685, 0.05022144690155983, -0.23453329503536224, 0.28601527214050293, 0.14933225512504578, -0.020876720547676086, -0.15063078701496124, 0.12293289601802826, -0.0617467537522316, -0.24113285541534424, 0.07281440496444702, 0.11808082461357117, 0.02300773561000824, 0.33205682039260864, -0.20072370767593384, 0.2301817238330841, 0.11487005650997162, -0.047373488545417786, -0.05580266937613487, 0.182553231716156, 0.41817158460617065, -0.03441819176077843, 0.2839595079421997, 0.20986713469028473, 0.06876040250062943, 0.07299020886421204, 0.5790442824363708, 0.020564652979373932, 0.023782357573509216, 0.172585129737854, -0.2869420051574707, -0.024282380938529968, 0.0663648173213005, 0.12173327803611755, 0.3165375888347626, -0.04948677495121956, 0.1695035994052887, -0.08294250071048737, -0.0472552590072155, -0.007921140640974045, 0.07152823358774185, 0.1489129364490509, 0.2919178307056427, 0.3042602241039276, 0.15219610929489136, 0.22185690701007843, -0.28082510828971863, -0.4008406400680542, 0.11247304081916809, 0.3947429955005646, -0.14893268048763275, 0.10780684649944305, -0.20561620593070984, 0.18428590893745422, 0.0008511990308761597, -0.0724482610821724, -0.20977476239204407, -0.43092092871665955, -0.16633130609989166, -0.03491414710879326, 0.11299426853656769, 0.40444013476371765, -0.04738076403737068, -0.01985207200050354, 0.04594634473323822, -0.024305293336510658, -0.2587990164756775, -0.3624986410140991, -0.27372342348098755, -0.09243090450763702, 0.446913480758667, -0.22797110676765442, 0.105074442923069, 0.17720109224319458, -0.35028836131095886, 0.0053008683025836945, -0.3333818316459656, 0.016149353235960007, -0.11005747318267822, 0.08062122017145157, 0.21350523829460144, 0.32400885224342346, -0.3144025206565857, -0.07437385618686676, 0.3777652084827423, -0.5850875377655029, 0.13863825798034668, -0.07526945322751999, -0.02797091007232666, -0.2338244467973709, 0.09334570914506912, 0.0792616605758667, -0.10011900961399078, -0.27128660678863525, 0.3011317253112793, -0.27756431698799133, -0.03829837590456009, 0.19827303290367126, 0.18525637686252594, 0.15852618217468262, -0.0019751638174057007, -0.2687198221683502, -0.16652676463127136, -0.12343556433916092, 0.47573742270469666, -0.060194991528987885, -0.14484985172748566, 0.014312565326690674, -0.019526198506355286, 0.07553458958864212, 0.13640227913856506, -0.4085339903831482, 0.5304818153381348, -0.41049137711524963, 0.10269391536712646, -0.11237641423940659, -0.048752233386039734, 0.19598828256130219, 0.03451228141784668, 0.06014548987150192, 0.012541219592094421, -0.27021944522857666, -0.07652738690376282, 0.07850983738899231, 0.11127732694149017, 0.09522438794374466, 0.5319131016731262, 0.34705013036727905, 0.6758778691291809, 0.30856263637542725, -0.1743279993534088, -0.04560893028974533, 0.04053909331560135, 0.09082013368606567, -0.17722807824611664, -0.43863821029663086, 0.09893463551998138, -0.13840122520923615, -0.40093207359313965, 0.12489146739244461, 0.013780657202005386, -0.5286072492599487, 0.07609270513057709, -0.11014992743730545, 0.2000207006931305, -0.2707725763320923, 0.21801914274692535, -0.25362128019332886, -0.014982376247644424, 0.07771903276443481, 0.19416670501232147, -0.2611163258552551, -0.2199798822402954, 0.2224644273519516, -0.11380340158939362, 0.021373718976974487, -0.2378060519695282, -0.6910426020622253, 0.2614498734474182, -0.48573920130729675, 0.16110101342201233, -0.055542562156915665, 0.6028915643692017, -0.0622340552508831, 0.21555642783641815, 0.06972682476043701, -0.0764101892709732, 0.6276163458824158, -0.10294504463672638, -0.010408763773739338, 0.16817551851272583, 0.11913662403821945, -0.3707960546016693, -0.07393955439329147, 0.1581883579492569, 0.42494064569473267, 0.5452252626419067, 0.34042027592658997, -0.16227206587791443, -0.19429805874824524, 0.007955692708492279, 0.15343992412090302, -0.030735276639461517, -0.2801421582698822, -0.06690431386232376, 0.04887592792510986, -0.10408849269151688, 0.1166924312710762, 0.21188831329345703, -0.18465985357761383, 0.22955821454524994, -0.4136234223842621, -0.12075098603963852, -0.2119370400905609, 0.1492004543542862, -0.00412609800696373, 0.11709459125995636, -0.02226387895643711, 0.40893155336380005, 0.3345029056072235, -0.038474131375551224, 0.10271935909986496, 0.13779041171073914, -0.19223441183567047, -0.08865013718605042, 0.061694540083408356, 0.04459824785590172, 0.4964442253112793, 0.4720793068408966, -0.10904025286436081, 0.023271257057785988, -0.12796495854854584, 0.3310801088809967, -0.15374411642551422, 0.31511759757995605, 0.3869050145149231, 0.20518821477890015, -0.7090892791748047, -0.34192195534706116, 0.17280033230781555, 0.33497294783592224, -0.2012704312801361, 0.6024557948112488, -0.40934985876083374, -0.1711244434118271, 0.7261366844177246, 0.19832220673561096, 1.0118972063064575, -0.35676369071006775, 0.006164731457829475, -0.2396998256444931, 0.09963488578796387, 0.2214851677417755, -0.5885787010192871, 0.05508268624544144, -0.37134188413619995, -0.2543967664241791, -0.07689374685287476, -0.10978973656892776, 0.031165270134806633, 0.3034532964229584, -0.027295157313346863, 0.09747759997844696, 0.073524609208107, 0.6357160806655884, 0.0759030133485794, 0.09413865208625793, 0.29103076457977295, -0.21440765261650085, -0.17621886730194092, 0.08405225723981857, 0.07280347496271133, -0.0025474606081843376, 0.05486719310283661, -0.003150567412376404, -0.1085536926984787, 0.02181728184223175, -0.5491535663604736, -0.09394330531358719, -0.5250592231750488, 0.15044870972633362, 0.1083107441663742, 0.15268594026565552, 0.24687466025352478, 0.14852099120616913, -0.12170891463756561, 0.33998581767082214, 0.02263857237994671, 0.4930279850959778, 0.1332934945821762, 0.028529737144708633, 0.4291350543498993, -0.3595634400844574, 0.024125637486577034, 0.03081212192773819, -0.001704677939414978, 0.10111228376626968, -0.07771525532007217, -0.26231783628463745, -0.2404308170080185, 0.19575504958629608, 0.5655158758163452, -0.20304587483406067, -0.11627402901649475, -0.03724880889058113, 0.0866609737277031, -0.16257226467132568, 0.06626368314027786, 0.23894256353378296, 0.12340892851352692, 0.5680586695671082, -0.27585509419441223, -0.1956212818622589, -0.07624164968729019, 0.37351423501968384, -0.22066323459148407, -0.09081922471523285, 0.30176469683647156, 0.1953442394733429, -0.22415846586227417, -0.12844905257225037, 0.361816942691803, 0.16130796074867249, -0.24622946977615356, -0.09271170198917389, -0.5917588472366333, 0.0287930965423584, 0.08316925168037415, 0.14471891522407532, -0.01586846262216568, -0.12039962410926819, -0.05067175254225731, -0.4935952425003052, -0.36299580335617065, -0.1833793669939041, 0.012754132971167564, 0.23004907369613647, -0.20478838682174683, -0.11597299575805664, -0.22365540266036987, 0.2731236517429352, -0.1812775731086731, 0.17443588376045227, -0.17888101935386658, -0.08723405003547668, -0.23206838965415955, -0.1392335444688797, 0.20182514190673828, -0.2908029556274414, -0.03349753096699715, 0.44495582580566406, 0.13350394368171692, -0.10712039470672607, -0.2358282506465912, 0.1958703249692917, 0.18538682162761688, -0.2607840597629547, 0.15002256631851196, -0.12762251496315002, -0.07631615549325943, -0.37644660472869873, -0.13922743499279022, 0.1883702278137207, -0.03498770296573639, -0.04882984608411789, 0.30058127641677856, -0.02338389679789543, -0.1216045618057251, 0.045874763280153275, 0.047276921570301056, 0.2130153477191925, 0.22430044412612915, 0.24290451407432556, 0.1301732063293457, -0.0428093820810318, -0.2495010495185852, 0.13451707363128662, 0.1528269499540329, -0.059002503752708435, 0.5459543466567993, -0.4298721253871918, -0.05635388568043709, 0.4088273346424103, 0.30079662799835205, 0.6906484961509705, -0.24459093809127808, -0.31302034854888916, 0.4883146584033966, 0.10487101227045059, 0.06936507672071457, -0.13661149144172668, 0.7465847134590149, 0.10752320289611816, -0.0014985278248786926, 0.09238139539957047, -0.0037427693605422974, -0.2016667127609253, -0.23387126624584198, 0.1882282793521881, 0.4785831570625305, -0.22349290549755096, 0.14896336197853088, 0.05693984776735306, 0.190095454454422, 0.010738210752606392, 0.17368321120738983, 0.10513328015804291, 0.344723105430603, 0.34299927949905396, 0.1853896826505661, 0.09947626292705536, 0.30049654841423035, 0.24549590051174164, 0.1781109720468521, -0.3319316506385803, -0.058684397488832474, 0.4640533924102783, -0.20894335210323334, 0.12463085353374481, 0.07369351387023926, 0.2930472493171692, -0.16128584742546082, -0.47558698058128357, -0.004097983241081238, 0.18310055136680603, -0.21326127648353577, -0.029831768944859505, 0.18939727544784546, -0.10953415930271149, -0.16410723328590393, 0.17206621170043945, -0.08203329145908356, 0.013543320819735527, 0.3131914436817169, 0.15334731340408325, 0.06285058706998825, -0.25754472613334656, -0.2467014342546463, -0.055988702923059464, 0.4349657893180847, -0.3288707733154297, 0.045305363833904266, -0.4192962646484375, -0.13484948873519897, -0.4369450807571411, 0.16618235409259796, 0.3807012140750885, 0.3266358971595764, -0.3024597465991974, 0.18666018545627594, -0.1429755836725235, 0.025586068630218506, 0.007084690034389496, 0.5008962750434875, -0.14154765009880066, -0.2666251063346863, 0.11745305359363556, -0.012740172445774078, -0.17139138281345367, -0.2179940938949585, 0.03972114622592926, 0.35785719752311707, 0.16057667136192322, 0.01017521321773529, 0.00995810516178608, -0.211539626121521, -0.06735280156135559, -0.2278575450181961, 0.022529765963554382, -0.25084564089775085, 0.363963782787323, -0.27936238050460815, 0.1623949110507965, -0.17787043750286102, 0.04546897113323212, -0.05380004271864891, 0.3046455383300781, 0.49485114216804504, 0.07981596142053604, -0.48513263463974, -0.22053146362304688, -0.33624202013015747, 0.09518935531377792, -0.30335327982902527, 0.14870445430278778, 0.04410061240196228, -0.023392997682094574, -0.03279067575931549, 0.2633819282054901, -0.011824116110801697, 0.08309121429920197, -0.06381873041391373, 0.47130703926086426, -0.1764497607946396, 0.17040401697158813, -0.21296365559101105, 0.01495428942143917, 0.028573721647262573, -0.3551251292228699, 0.41507089138031006, -0.22919845581054688, -0.029311642050743103, -0.12805725634098053, -0.19486917555332184, 0.046389155089855194, -0.2431567907333374, 0.3588389754295349, 0.1852930784225464, 0.15661415457725525, 0.07628543674945831, -0.0528818741440773, -0.2055339515209198, -0.07107771188020706, -0.05939027667045593, 0.14687612652778625, 0.04873476177453995, 0.20843064785003662, -0.2734892666339874, 0.05045003071427345, -0.2929770350456238, -0.21976903080940247, -0.0889941081404686, -0.1992437094449997, -0.1794832944869995, 0.1324230432510376, -0.07648047804832458, 0.3840755820274353, 0.03163238242268562, 0.5407707095146179, -0.08410502970218658, 0.3705541789531708, -0.38244882225990295, -0.10275378823280334, 0.34117943048477173, -0.7015345692634583, -0.45519018173217773, -0.0650593638420105, -0.04703182727098465, 0.27693161368370056, 0.11780927330255508, -0.17781172692775726, -0.3522055745124817, 0.3464043438434601, -0.0667746439576149, -0.5600628852844238, 0.016512431204319, 0.17273834347724915, 0.05830112099647522, -0.1512102484703064, 0.47865867614746094, 0.022465065121650696, -0.4108794033527374, 0.3585363030433655, -0.007581382989883423 ]
https://github.com/huggingface/datasets/issues/6319
So, using LlamaTokenizerFast was the problem. Changing it to LlamaTokenizer fixed things, On Thu, Oct 19, 2023 at 4:04 PM pensive introvert < ***@***.***> wrote: > I changed the tokenizer to one without "Fast suffix, and something > changed. The fraction, although still slowed a lot at 80% was able to get > over the finish line of 100% > > I have to do more testng, see if the whole set can be processed > > > > On Thu, Oct 19, 2023 at 3:03 PM pensive introvert < > ***@***.***> wrote: > >> from functools import partial >> import transformers >> from datasets import load_dataset, concatenate_datasets, load_from_disk >> >> model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf" >> output_dir="/opt/data/data/LongLoRA/checkpoints" >> cache_dir="/opt/data/data/LongLoRA/cache" >> model_max_length=16384 >> >> IGNORE_INDEX = -100 >> DEFAULT_PAD_TOKEN = "[PAD]" >> DEFAULT_EOS_TOKEN = "</s>" >> DEFAULT_BOS_TOKEN = "<s>" >> DEFAULT_UNK_TOKEN = "<unk>" >> >> >> tokenizer = transformers.LlamaTokenizerFast.from_pretrained( >> model_name_or_path, >> cache_dir=cache_dir, >> model_max_length=model_max_length, >> padding_side="right", >> use_fast=True, >> #use_fast=False >> ) >> >> special_tokens_dict = dict() >> if tokenizer.pad_token is None: >> special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN >> if tokenizer.eos_token is None: >> special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN >> if tokenizer.bos_token is None: >> special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN >> if tokenizer.unk_token is None: >> special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN >> >> tokenizer.add_special_tokens(special_tokens_dict) >> >> def tokenize_fn(tokenizer, example): >> context_length = tokenizer.model_max_length >> outputs = tokenizer( >> tokenizer.eos_token.join(example["text"]), >> #truncation=False, >> truncation=True, >> return_tensors="pt", >> #return_tensors="np", >> pad_to_multiple_of=context_length, >> padding=True, >> ) >> return {"input_ids": outputs["input_ids"].view(-1, context_length)} >> >> for idx in range(100): >> dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", >> cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') >> dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, >> num_proc=16, remove_columns=["text", "meta"]) >> dataset.save_to_disk(training_args.cache_dir + >> f"/training_data_{idx}") >> >> >> On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***> >> wrote: >> >>> Can you please provide a self-contained reproducer? >>> >>> — >>> Reply to this email directly, view it on GitHub >>> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>, >>> or unsubscribe >>> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE> >>> . >>> You are receiving this because you authored the thread.Message ID: >>> ***@***.***> >>> >>
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
327
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, So, using LlamaTokenizerFast was the problem. Changing it to LlamaTokenizer fixed things, On Thu, Oct 19, 2023 at 4:04 PM pensive introvert < ***@***.***> wrote: > I changed the tokenizer to one without "Fast suffix, and something > changed. The fraction, although still slowed a lot at 80% was able to get > over the finish line of 100% > > I have to do more testng, see if the whole set can be processed > > > > On Thu, Oct 19, 2023 at 3:03 PM pensive introvert < > ***@***.***> wrote: > >> from functools import partial >> import transformers >> from datasets import load_dataset, concatenate_datasets, load_from_disk >> >> model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf" >> output_dir="/opt/data/data/LongLoRA/checkpoints" >> cache_dir="/opt/data/data/LongLoRA/cache" >> model_max_length=16384 >> >> IGNORE_INDEX = -100 >> DEFAULT_PAD_TOKEN = "[PAD]" >> DEFAULT_EOS_TOKEN = "</s>" >> DEFAULT_BOS_TOKEN = "<s>" >> DEFAULT_UNK_TOKEN = "<unk>" >> >> >> tokenizer = transformers.LlamaTokenizerFast.from_pretrained( >> model_name_or_path, >> cache_dir=cache_dir, >> model_max_length=model_max_length, >> padding_side="right", >> use_fast=True, >> #use_fast=False >> ) >> >> special_tokens_dict = dict() >> if tokenizer.pad_token is None: >> special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN >> if tokenizer.eos_token is None: >> special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN >> if tokenizer.bos_token is None: >> special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN >> if tokenizer.unk_token is None: >> special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN >> >> tokenizer.add_special_tokens(special_tokens_dict) >> >> def tokenize_fn(tokenizer, example): >> context_length = tokenizer.model_max_length >> outputs = tokenizer( >> tokenizer.eos_token.join(example["text"]), >> #truncation=False, >> truncation=True, >> return_tensors="pt", >> #return_tensors="np", >> pad_to_multiple_of=context_length, >> padding=True, >> ) >> return {"input_ids": outputs["input_ids"].view(-1, context_length)} >> >> for idx in range(100): >> dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", >> cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') >> dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, >> num_proc=16, remove_columns=["text", "meta"]) >> dataset.save_to_disk(training_args.cache_dir + >> f"/training_data_{idx}") >> >> >> On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***> >> wrote: >> >>> Can you please provide a self-contained reproducer? >>> >>> — >>> Reply to this email directly, view it on GitHub >>> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>, >>> or unsubscribe >>> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE> >>> . >>> You are receiving this because you authored the thread.Message ID: >>> ***@***.***> >>> >>
[ -0.5650825500488281, 0.09585857391357422, 0.027538053691387177, 0.1539461612701416, 0.21590092778205872, 0.12963418662548065, 0.16759265959262848, 0.3100394010543823, -0.05893123894929886, -0.16628892719745636, -0.09866967797279358, 0.6297377347946167, -0.07801172137260437, -0.36615490913391113, -0.3116917610168457, 0.20852872729301453, 0.18836171925067902, 0.18826892971992493, 0.3248201608657837, -0.053724076598882675, -0.06065594404935837, 0.048298656940460205, -0.2967299222946167, 0.05245910957455635, -0.5544131994247437, -0.1772947758436203, -0.00599457323551178, -0.23379945755004883, -0.2552952170372009, -0.5086038708686829, 0.06909139454364777, 0.10712600499391556, -0.1844245046377182, 0.7518384456634521, -0.00012007212353637442, -0.10215817391872406, 0.020452428609132767, 0.2714654207229614, 0.10046948492527008, 0.03657010570168495, -0.21655219793319702, -0.06678719818592072, -0.08654503524303436, -0.02576415240764618, 0.2364538460969925, 0.026553094387054443, 0.07370370626449585, -0.30389121174812317, 0.3701399564743042, 0.16343314945697784, 0.0997304916381836, 0.19272151589393616, -0.09605517983436584, 0.01058918610215187, 0.18183346092700958, -0.10538487136363983, -0.13448753952980042, 0.16018922626972198, 0.34750887751579285, -0.4086188077926636, -0.25624483823776245, -0.07419784367084503, -0.348682165145874, -0.11887172609567642, -0.10017870366573334, -0.24554499983787537, 0.0527825728058815, -0.5286210775375366, 0.4231104850769043, 0.30591821670532227, 0.13512015342712402, -0.020883996039628983, -0.010881107300519943, -0.20301418006420135, -0.2532930076122284, -0.13895592093467712, 0.24856919050216675, 0.007193963974714279, -0.09316462278366089, 0.19276028871536255, -0.3754066824913025, 0.1523210108280182, 0.14236009120941162, 0.22107571363449097, -0.12797944247722626, 0.4566055238246918, 0.08777214586734772, 0.24699480831623077, 0.08927097916603088, -0.04385116323828697, -0.09906923025846481, -0.030853277072310448, 0.023668933659791946, 0.279216468334198, -0.4083596467971802, -0.04932873323559761, 0.14400188624858856, -0.270679771900177, 0.3206382095813751, -0.19679753482341766, -0.286692351102829, 0.28589680790901184, -0.1690213680267334, 0.23899826407432556, 0.31890735030174255, 0.03754664584994316, -0.024951163679361343, 0.282614141702652, 0.39744099974632263, -0.3151451349258423, -0.3407336175441742, 0.22731810808181763, -0.11712805181741714, -0.2010836899280548, 0.03967534750699997, -0.022059960290789604, -0.15467756986618042, -0.12229464948177338, -0.17784333229064941, 0.2664790451526642, -0.49028921127319336, 0.15448562800884247, 0.09804314374923706, 0.26328402757644653, -0.22859005630016327, 0.13547100126743317, -0.19731974601745605, -0.22449268400669098, -0.16645745933055878, -0.13850104808807373, -0.005144461989402771, -0.3349411189556122, -0.31062331795692444, 0.06682413816452026, -0.026915639638900757, -0.0010071266442537308, 0.16924452781677246, 0.1297806203365326, -0.12077844887971878, -0.08787374198436737, 0.17508751153945923, -0.39564093947410583, 0.22520330548286438, 0.07617534697055817, -0.221290722489357, 0.5536165833473206, 0.021607080474495888, -0.14986109733581543, -0.1444924771785736, 0.08143562078475952, -0.25555476546287537, -0.025979213416576385, 0.05546630918979645, 0.06600484251976013, -0.17003586888313293, 0.035419564694166183, -0.24131548404693604, 0.18878012895584106, 0.2917992174625397, 0.04430270195007324, 0.0719335675239563, -0.13109415769577026, -0.2532566785812378, -0.21444612741470337, 0.09228862076997757, 0.1671203374862671, -0.20730885863304138, -0.02944224327802658, 0.11440365016460419, 0.23781970143318176, 0.2098265290260315, 0.42113107442855835, 0.009762395173311234, 0.3391793668270111, -0.37291374802589417, 0.3118547201156616, 0.18220898509025574, 0.26392862200737, -0.4749680757522583, 0.2564152777194977, -0.03476661443710327, -0.03409764915704727, -0.4853484332561493, -0.12366913259029388, 0.66458660364151, -0.09075847268104553, 0.48917877674102783, 0.250264436006546, -0.06349435448646545, 0.023358114063739777, -0.3283039331436157, -0.2663392424583435, 0.09982356429100037, 0.08915628492832184, 0.1587247997522354, -0.16744117438793182, -0.15495261549949646, -0.2306276559829712, 0.26532313227653503, 0.19719378650188446, 0.02644718438386917, 0.24564391374588013, 0.3118024170398712, -0.04250641167163849, 0.10766830295324326, -0.3925781846046448, 0.00021405331790447235, 0.3280913829803467, 0.2493349313735962, -0.14033398032188416, 0.023907504975795746, 0.03217773884534836, -0.0413171648979187, 0.1789076030254364, -0.14812323451042175, 0.12219467759132385, 0.004752513021230698, -0.13876663148403168, -0.16412094235420227, 0.23376265168190002, -0.1906861662864685, -0.10918048769235611, 0.08914735168218613, 0.12043167650699615, 0.17597076296806335, 0.14981253445148468, 0.0012161219492554665, -0.20116062462329865, -0.08460909128189087, 0.08362717926502228, 0.28523674607276917, -0.1261458843946457, -0.24213817715644836, 0.2365364283323288, 0.197678804397583, 0.05124775692820549, -0.16781292855739594, 0.2355538010597229, 0.10944506525993347, -0.048713576048612595, -0.14840053021907806, 0.15821442008018494, -0.08204171061515808, -0.28289616107940674, 0.12465725839138031, 0.15871411561965942, 0.049505848437547684, 0.34330040216445923, -0.22167421877384186, 0.2518916130065918, 0.1199272945523262, -0.07023676484823227, -0.060529112815856934, 0.20774897933006287, 0.4560093581676483, -0.015667913481593132, 0.24509212374687195, 0.16610878705978394, 0.07912247627973557, 0.08623777329921722, 0.579800546169281, 0.034740231931209564, 0.03270646929740906, 0.1688094139099121, -0.30805179476737976, 0.006019003689289093, 0.06731875985860825, 0.12129967659711838, 0.32353270053863525, -0.05224549025297165, 0.14417283236980438, -0.0715133398771286, -0.08688715100288391, -0.04042263329029083, 0.054412659257650375, 0.15167979896068573, 0.30596160888671875, 0.318501353263855, 0.12218144536018372, 0.18445828557014465, -0.3036477565765381, -0.3672662377357483, 0.11213456839323044, 0.4000600278377533, -0.09794960916042328, 0.05025588721036911, -0.22591936588287354, 0.15299567580223083, 0.04924121871590614, -0.03501955792307854, -0.23042502999305725, -0.45090579986572266, -0.13615745306015015, -0.032701846212148666, 0.1069079264998436, 0.3910406529903412, -0.05566401779651642, 0.004965052008628845, 0.007009789347648621, -0.023067910224199295, -0.24884110689163208, -0.4301641881465912, -0.27124953269958496, -0.09018188714981079, 0.49388182163238525, -0.195088192820549, 0.14345650374889374, 0.1682683676481247, -0.3595676124095917, 0.029836498200893402, -0.34284234046936035, -0.013193449005484581, -0.11018486320972443, 0.044805996119976044, 0.20444168150424957, 0.33084696531295776, -0.339938223361969, -0.041578128933906555, 0.35889023542404175, -0.5934414267539978, 0.10537374019622803, -0.11479344218969345, -0.018876224756240845, -0.2270255833864212, 0.07958337664604187, 0.06088578701019287, -0.08190245926380157, -0.2689468264579773, 0.3499206304550171, -0.242875874042511, -0.05037226900458336, 0.12726294994354248, 0.20649296045303345, 0.17974135279655457, -0.00446740910410881, -0.29950740933418274, -0.19021475315093994, -0.03511129319667816, 0.4659193456172943, -0.06678769737482071, -0.15662705898284912, 0.04240746796131134, -0.0007834881544113159, 0.11724616587162018, 0.13579025864601135, -0.4428359866142273, 0.5364561080932617, -0.39402031898498535, 0.11913032829761505, -0.1039370596408844, -0.05272737890481949, 0.16654111444950104, 0.07430105656385422, 0.04897144436836243, 0.024064786732196808, -0.2905574440956116, -0.06954440474510193, 0.05974004045128822, 0.1452016532421112, 0.11797536909580231, 0.5271637439727783, 0.3202988803386688, 0.6126993894577026, 0.2942858338356018, -0.0964193344116211, -0.0395963080227375, 0.039658717811107635, 0.04736657068133354, -0.15215161442756653, -0.4220881462097168, 0.1722770631313324, -0.17235176265239716, -0.3611794710159302, 0.14191831648349762, 0.03984201326966286, -0.5176066160202026, 0.07271384447813034, -0.10128311812877655, 0.18466223776340485, -0.2432449609041214, 0.255787193775177, -0.2197733223438263, -0.023000571876764297, 0.0694504901766777, 0.16627278923988342, -0.25260692834854126, -0.24817709624767303, 0.21650022268295288, -0.11150278151035309, 0.01644485630095005, -0.2528497576713562, -0.7145126461982727, 0.3346412777900696, -0.4864093065261841, 0.1919592320919037, -0.05880282074213028, 0.593653678894043, -0.07523255050182343, 0.23125341534614563, 0.0881587564945221, -0.09483884274959564, 0.569645881652832, -0.08809664100408554, -0.04104907810688019, 0.18264950811862946, 0.08447015285491943, -0.3680393695831299, -0.06656569242477417, 0.1469491422176361, 0.4377577304840088, 0.5494769811630249, 0.3110170066356659, -0.17718584835529327, -0.1974717080593109, -0.06278471648693085, 0.15267550945281982, -0.03457960486412048, -0.2267461121082306, -0.0687561184167862, -0.012836731970310211, -0.11762604862451553, 0.1855711042881012, 0.2000487744808197, -0.18677668273448944, 0.20397888123989105, -0.3948546051979065, -0.13796254992485046, -0.28718313574790955, 0.13588404655456543, 0.00020872429013252258, 0.1505255103111267, -0.06637408584356308, 0.404605895280838, 0.3465896546840668, -0.026391394436359406, 0.11036485433578491, 0.11752162873744965, -0.22034689784049988, -0.054708678275346756, 0.0530824139714241, -0.0056636519730091095, 0.5395795702934265, 0.5011260509490967, -0.11381598562002182, 0.09764333069324493, -0.20839080214500427, 0.2980876863002777, -0.12479381263256073, 0.29338711500167847, 0.3570094108581543, 0.2512613534927368, -0.6714473366737366, -0.30128395557403564, 0.1568971574306488, 0.3504319190979004, -0.22154870629310608, 0.6025164723396301, -0.42649155855178833, -0.19503727555274963, 0.7009866237640381, 0.23287825286388397, 1.058328628540039, -0.3533998131752014, 0.02340310625731945, -0.21295428276062012, 0.07732650637626648, 0.18964675068855286, -0.5906340479850769, 0.06822138279676437, -0.38366198539733887, -0.2384292036294937, -0.07687778770923615, -0.10935091972351074, 0.06868571788072586, 0.28521233797073364, -0.03487345576286316, 0.09076980501413345, 0.07229995727539062, 0.6284038424491882, 0.10780128091573715, 0.05799807608127594, 0.2855461835861206, -0.1936393678188324, -0.1469629406929016, 0.06987375766038895, 0.0362202487885952, 0.026566989719867706, 0.06969013810157776, -0.029459109529852867, -0.11333776265382767, 0.03290347009897232, -0.518984317779541, -0.08852392435073853, -0.5582773089408875, 0.12624894082546234, 0.09320458024740219, 0.18980637192726135, 0.24619051814079285, 0.12140829861164093, -0.0769030973315239, 0.34037309885025024, 0.01819433458149433, 0.5083088874816895, 0.18078738451004028, -0.001739218831062317, 0.43154600262641907, -0.3382846415042877, 0.007870281115174294, -0.008175119757652283, 0.006588295102119446, 0.1304825246334076, -0.05123773217201233, -0.3060671091079712, -0.2439160794019699, 0.22063195705413818, 0.5698965787887573, -0.1725599467754364, -0.14239411056041718, -0.04227498918771744, 0.05070142447948456, -0.20000480115413666, 0.05476582795381546, 0.29070591926574707, 0.11552911251783371, 0.5908999443054199, -0.20079626142978668, -0.19029828906059265, -0.06828536093235016, 0.36139124631881714, -0.18896137177944183, -0.12970638275146484, 0.3159297704696655, 0.17894236743450165, -0.23180776834487915, -0.12290628254413605, 0.33648407459259033, 0.19224387407302856, -0.2423247992992401, -0.08585306257009506, -0.6116921901702881, 0.008302271366119385, 0.11691628396511078, 0.1373738944530487, -0.02548527531325817, -0.09084495902061462, -0.06360374391078949, -0.5170304775238037, -0.3648490905761719, -0.14285078644752502, 0.02202298492193222, 0.22488804161548615, -0.21956416964530945, -0.11150460690259933, -0.2048199325799942, 0.32797467708587646, -0.1631268858909607, 0.17604446411132812, -0.1914476752281189, -0.0709470883011818, -0.19774691760540009, -0.15942153334617615, 0.21300214529037476, -0.2501278519630432, -0.049923818558454514, 0.5053457617759705, 0.11379212141036987, -0.08602476119995117, -0.2366379350423813, 0.20073595643043518, 0.1948147565126419, -0.26537975668907166, 0.16550882160663605, -0.1615661382675171, -0.02348310686647892, -0.3526913821697235, -0.20535418391227722, 0.11366699635982513, -0.07331474870443344, -0.09159398078918457, 0.3159415125846863, -0.03403221815824509, -0.0988818109035492, 0.05763790011405945, 0.025311661884188652, 0.17512452602386475, 0.21864591538906097, 0.25049537420272827, 0.09868822991847992, -0.0357201024889946, -0.20941635966300964, 0.11928190290927887, 0.14830388128757477, -0.07976408302783966, 0.5164883136749268, -0.42370152473449707, -0.06758882105350494, 0.36368319392204285, 0.2820297181606293, 0.6675158739089966, -0.2284177839756012, -0.3451289236545563, 0.5271517634391785, 0.08489244431257248, 0.021914325654506683, -0.12041981518268585, 0.7508561611175537, 0.11627624928951263, -0.004363074898719788, 0.06527473032474518, 0.022655464708805084, -0.22904473543167114, -0.28286781907081604, 0.19536836445331573, 0.39341533184051514, -0.25215545296669006, 0.09754805266857147, 0.06102808192372322, 0.17301037907600403, 0.0010007908567786217, 0.16837920248508453, 0.08226883411407471, 0.3001560866832733, 0.3591654598712921, 0.15927749872207642, 0.09466239809989929, 0.3135127127170563, 0.24401149153709412, 0.17952139675617218, -0.3142571449279785, -0.05102493241429329, 0.5352985858917236, -0.18405188620090485, 0.1391066163778305, 0.08449698984622955, 0.3458499610424042, -0.14515651762485504, -0.530112087726593, 0.0097598135471344, 0.21817469596862793, -0.22917386889457703, -0.015061896294355392, 0.1867808997631073, -0.11057944595813751, -0.19236595928668976, 0.20907248556613922, -0.09157001972198486, 0.039811067283153534, 0.3304300308227539, 0.13234463334083557, 0.03848094493150711, -0.28041958808898926, -0.29106730222702026, -0.08195681869983673, 0.4594159722328186, -0.33553755283355713, 0.01334049366414547, -0.44782716035842896, -0.1278129518032074, -0.47361356019973755, 0.16653382778167725, 0.34634435176849365, 0.3175022006034851, -0.3315856456756592, 0.17683887481689453, -0.16402697563171387, 0.0496114045381546, -0.0014410465955734253, 0.5051851272583008, -0.0717320367693901, -0.28797465562820435, 0.1290426105260849, -0.028540009632706642, -0.1675465852022171, -0.20565783977508545, 0.0609842911362648, 0.3580143451690674, 0.19386079907417297, -0.045535918325185776, 0.06630977988243103, -0.22250239551067352, -0.07123847305774689, -0.22160695493221283, 0.044299863278865814, -0.2734488844871521, 0.3549521565437317, -0.2974783480167389, 0.13588708639144897, -0.2139264941215515, 0.03843854367733002, -0.09445615112781525, 0.29556918144226074, 0.5162909030914307, 0.04090885445475578, -0.5048344135284424, -0.2696894407272339, -0.3525955080986023, 0.10556191951036453, -0.3321462571620941, 0.10734836757183075, 0.0595196932554245, -0.05304108187556267, -0.03141823410987854, 0.26050737500190735, -0.03498914837837219, 0.1431860625743866, -0.01621853932738304, 0.4493415355682373, -0.21560396254062653, 0.2106703817844391, -0.17273733019828796, 0.03321060538291931, 0.04345498979091644, -0.36345386505126953, 0.41737300157546997, -0.2258012294769287, -0.014913622289896011, -0.10834604501724243, -0.18780192732810974, 0.030481606721878052, -0.22004228830337524, 0.3481663465499878, 0.17324669659137726, 0.14838160574436188, 0.07526635378599167, -0.07338700443506241, -0.2002772092819214, -0.08072468638420105, -0.0411917120218277, 0.189223974943161, 0.10666851699352264, 0.22112096846103668, -0.26828569173812866, 0.07670184969902039, -0.2710634171962738, -0.1710197627544403, -0.11153347790241241, -0.19527587294578552, -0.12680450081825256, 0.12641192972660065, -0.04601893573999405, 0.37769585847854614, 0.012879807502031326, 0.5794787406921387, -0.09122402966022491, 0.32722207903862, -0.4109765887260437, -0.08952239900827408, 0.3178176283836365, -0.7012706398963928, -0.44835272431373596, -0.03529730066657066, -0.0485706701874733, 0.32903963327407837, 0.10315094888210297, -0.165814608335495, -0.36459222435951233, 0.2949175238609314, -0.04908391833305359, -0.5789856314659119, -0.0068639107048511505, 0.1755686104297638, 0.048277392983436584, -0.16143755614757538, 0.4426336884498596, 0.06326734274625778, -0.4216524362564087, 0.37062105536460876, -0.017922502011060715 ]
https://github.com/huggingface/datasets/issues/6319
Indeed, the tokenizer is super slow. Perhaps @ArthurZucker knows the reason why. ([This](https://colab.research.google.com/drive/1VgeurX-4Fl2X6aBQTwh_X4kuQKZ6K9L1?usp=sharing) simplified Colab can be used to reproduce the behavior)
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
22
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, Indeed, the tokenizer is super slow. Perhaps @ArthurZucker knows the reason why. ([This](https://colab.research.google.com/drive/1VgeurX-4Fl2X6aBQTwh_X4kuQKZ6K9L1?usp=sharing) simplified Colab can be used to reproduce the behavior)
[ -0.5410916805267334, 0.13084936141967773, 0.02908453717827797, 0.1009187251329422, 0.17967413365840912, 0.05452781915664673, 0.2067749798297882, 0.2939973771572113, -0.11034294962882996, -0.12849867343902588, -0.00783967599272728, 0.5993674397468567, -0.07884661853313446, -0.323666512966156, -0.31910252571105957, 0.15609852969646454, 0.25113752484321594, 0.20983803272247314, 0.407158225774765, -0.019060708582401276, -0.002822279930114746, 0.08169940859079361, -0.32195425033569336, 0.10455787926912308, -0.584807813167572, -0.1911897361278534, -0.057251084595918655, -0.205994114279747, -0.27128639817237854, -0.4881419539451599, -0.02014172077178955, 0.23989875614643097, -0.2416638731956482, 0.7306162714958191, -0.00012098337901988998, -0.06085136532783508, -0.0661834180355072, 0.29534512758255005, 0.15960845351219177, -0.03746616840362549, -0.10777638107538223, -0.14648860692977905, -0.08471199125051498, 0.011538222432136536, 0.2210220843553543, -0.13018156588077545, 0.02668783627450466, -0.1833246946334839, 0.3862851858139038, 0.13963991403579712, 0.0914703756570816, 0.24593091011047363, -0.1161201074719429, -0.0017451271414756775, 0.1395878791809082, -0.06387555599212646, -0.13202974200248718, 0.13763314485549927, 0.2714751064777374, -0.32872408628463745, -0.22959277033805847, -0.10095421969890594, -0.3572996258735657, -0.14428012073040009, -0.11277507245540619, -0.2479173243045807, -0.0018032006919384003, -0.49337178468704224, 0.39275631308555603, 0.25906598567962646, 0.16046692430973053, -0.018204960972070694, 0.017286065965890884, -0.18113777041435242, -0.28391560912132263, -0.14888206124305725, 0.26803046464920044, -0.055349402129650116, -0.12378740310668945, 0.20549340546131134, -0.3528825342655182, 0.1602449268102646, 0.17867130041122437, 0.1720820814371109, -0.14197739958763123, 0.42803657054901123, 0.11274746060371399, 0.2634233236312866, 0.10123434662818909, -0.0885499119758606, -0.14881260693073273, 0.035200636833906174, 0.015480052679777145, 0.24043557047843933, -0.4586295485496521, -0.10569944232702255, 0.15970146656036377, -0.3757317066192627, 0.22117744386196136, -0.02069167047739029, -0.31026846170425415, 0.34544438123703003, -0.07736515253782272, 0.25029486417770386, 0.28967559337615967, 0.08951961994171143, -0.040196966379880905, 0.28842198848724365, 0.3554528057575226, -0.3937228322029114, -0.42979276180267334, 0.18855547904968262, -0.15143108367919922, -0.2086840569972992, 0.09524433314800262, -0.024797039106488228, -0.16821300983428955, -0.07241733372211456, -0.19032835960388184, 0.2825865149497986, -0.5319056510925293, 0.16048671305179596, 0.13478106260299683, 0.31548428535461426, -0.18200884759426117, 0.14622583985328674, -0.2376694232225418, -0.2681141495704651, -0.148482084274292, -0.1440993994474411, -0.02207469567656517, -0.3172796368598938, -0.23895840346813202, 0.03883649408817291, -0.08414777368307114, 0.05167765915393829, 0.1633787453174591, 0.139459490776062, -0.10034356266260147, -0.06527487188577652, 0.2498639076948166, -0.35236552357673645, 0.24355706572532654, 0.0552719384431839, -0.2146729677915573, 0.5078144073486328, 0.024680431932210922, -0.15960314869880676, -0.1463569700717926, 0.019728979095816612, -0.30329346656799316, -0.07218427956104279, 0.009294969961047173, 0.05703410506248474, -0.08427517116069794, 0.036394257098436356, -0.2010742872953415, 0.22977203130722046, 0.1417292058467865, 0.01071649044752121, -0.013315532356500626, -0.10691698640584946, -0.21324744820594788, -0.1935473382472992, 0.10079975426197052, 0.14770159125328064, -0.21145400404930115, -0.05313148349523544, 0.2761867046356201, 0.22296199202537537, 0.29987215995788574, 0.42199745774269104, 0.028146978467702866, 0.4033743739128113, -0.3482065796852112, 0.27415624260902405, 0.303773432970047, 0.25381016731262207, -0.49398961663246155, 0.25260332226753235, -0.14251255989074707, -0.04313329979777336, -0.40329405665397644, -0.1738898754119873, 0.7243174314498901, -0.07474830001592636, 0.53716641664505, 0.20653286576271057, -0.025321386754512787, 0.08763144165277481, -0.2806515097618103, -0.1678418219089508, 0.1416785717010498, 0.028360925614833832, 0.07428479939699173, -0.15143151581287384, -0.20128756761550903, -0.19515395164489746, 0.18756011128425598, 0.1598057597875595, -0.03504585102200508, 0.22719401121139526, 0.24592432379722595, -0.04164664074778557, 0.15317989885807037, -0.28295090794563293, 0.1212732270359993, 0.2983930706977844, 0.226072758436203, -0.108030304312706, 0.06554890424013138, -0.0029459893703460693, -0.02181967720389366, 0.19868475198745728, -0.14365142583847046, 0.1345081329345703, 0.002823382616043091, -0.12207363545894623, -0.1367873251438141, 0.23543746769428253, -0.20319697260856628, -0.15273970365524292, 0.039705075323581696, 0.19677937030792236, 0.36976879835128784, 0.029410995543003082, -0.03785400465130806, -0.18290090560913086, -0.11379829794168472, 0.08577191829681396, 0.27640649676322937, -0.2090681791305542, -0.2468714863061905, 0.27113863825798035, 0.20369169116020203, 0.008036267012357712, -0.18241003155708313, 0.2069791853427887, 0.12236007302999496, 0.05515195429325104, -0.14445103704929352, 0.20594140887260437, -0.15046265721321106, -0.2533137798309326, 0.17589670419692993, 0.23222492635250092, 0.13031859695911407, 0.34432244300842285, -0.22543790936470032, 0.30508220195770264, 0.20485086739063263, 0.04078460484743118, -0.04604065790772438, 0.20224343240261078, 0.435769647359848, -0.0495016872882843, 0.1992495208978653, 0.19158022105693817, 0.056666553020477295, 0.10893331468105316, 0.5577321648597717, 0.05217033624649048, 0.005059903487563133, 0.16678732633590698, -0.27209898829460144, -0.01939169317483902, 0.08621639013290405, 0.014655396342277527, 0.28511038422584534, -0.06384752690792084, 0.11749232560396194, -0.050387345254421234, -0.10265632718801498, 0.02146005630493164, 0.057637110352516174, 0.14172761142253876, 0.1856052130460739, 0.273493230342865, 0.11507637053728104, 0.1821749061346054, -0.360984742641449, -0.42205187678337097, 0.10877670347690582, 0.4241947829723358, -0.05960335582494736, 0.11148028075695038, -0.26015204191207886, 0.10597794502973557, 0.08453984558582306, 0.000950448215007782, -0.19469594955444336, -0.40858620405197144, -0.09060771763324738, -0.0010587635915726423, 0.09274058789014816, 0.41942980885505676, -0.019983813166618347, 0.07110653072595596, 0.08242639154195786, 0.00944068469107151, -0.1651393473148346, -0.28731486201286316, -0.2867506146430969, -0.09011021256446838, 0.4607963562011719, -0.23580676317214966, 0.18091823160648346, 0.18689900636672974, -0.28522980213165283, -0.02575543522834778, -0.4131934344768524, 0.0525360107421875, -0.11154833436012268, -0.010862080380320549, 0.17637668550014496, 0.2369508445262909, -0.4032747447490692, -0.04316306114196777, 0.32824617624282837, -0.6075969338417053, 0.028886720538139343, -0.06603264063596725, -0.05775734782218933, -0.2881277799606323, 0.10126707702875137, 0.07526624202728271, -0.056514039635658264, -0.22258098423480988, 0.4164204001426697, -0.15498381853103638, -0.012625077739357948, 0.048135820776224136, 0.18246126174926758, 0.1279778778553009, -0.016526615247130394, -0.17764264345169067, -0.20158424973487854, -0.1914117932319641, 0.3893602192401886, -0.02451103925704956, -0.16943247616291046, 0.06477013230323792, 0.009216420352458954, 0.12980808317661285, 0.1525130420923233, -0.31696653366088867, 0.46777838468551636, -0.31563442945480347, 0.11133643984794617, -0.050312589854002, -0.10930565744638443, 0.25027599930763245, 0.08863352239131927, 0.017854008823633194, 0.09861445426940918, -0.2960788905620575, 0.010364018380641937, 0.054083745926618576, 0.07295279204845428, 0.14128771424293518, 0.5455472469329834, 0.333823561668396, 0.636910080909729, 0.2482272982597351, -0.09563486278057098, -0.009286295622587204, 0.00216069258749485, 0.06251609325408936, -0.17709387838840485, -0.4676896333694458, 0.12997391819953918, -0.12805265188217163, -0.2977861166000366, 0.1781735122203827, 0.03045579046010971, -0.5236750245094299, 0.04834553599357605, -0.12684527039527893, 0.22487080097198486, -0.2681581676006317, 0.24493242800235748, -0.34206685423851013, -0.03983752802014351, 0.0544591024518013, 0.17062252759933472, -0.3336069583892822, -0.19990921020507812, 0.1915932446718216, -0.1695714145898819, 0.026191243901848793, -0.251591295003891, -0.8053448796272278, 0.30294299125671387, -0.5477200746536255, 0.1611906886100769, -0.08217222988605499, 0.5743151307106018, -0.03579817712306976, 0.19380788505077362, 0.12454402446746826, -0.12982696294784546, 0.5906932353973389, -0.04475267976522446, -0.13293898105621338, 0.1820756196975708, 0.04539741575717926, -0.3395158052444458, -0.12853720784187317, 0.1568964570760727, 0.5579167604446411, 0.5481719970703125, 0.33377605676651, -0.14859028160572052, -0.28421008586883545, -0.014915386214852333, 0.11354169249534607, -0.04426062852144241, -0.1954880654811859, -0.08911288529634476, 0.03694900870323181, -0.20987170934677124, 0.24163061380386353, 0.1750313937664032, -0.1315412074327469, 0.21240821480751038, -0.40986377000808716, -0.13087648153305054, -0.25726133584976196, 0.15685582160949707, 0.006839841604232788, 0.16251704096794128, -0.15481965243816376, 0.3757649064064026, 0.41472387313842773, 0.07461565732955933, 0.020888319239020348, 0.061530567705631256, -0.005837193690240383, -0.17613455653190613, 0.0574568435549736, 0.03474227711558342, 0.579921305179596, 0.4909111559391022, -0.12133489549160004, 0.16087520122528076, -0.3907654881477356, 0.3629898130893707, -0.10329116135835648, 0.37823519110679626, 0.4547579288482666, 0.19038434326648712, -0.662437915802002, -0.24408990144729614, 0.011570010334253311, 0.38239333033561707, -0.24456681311130524, 0.6024031639099121, -0.36633560061454773, -0.12795689702033997, 0.7762109637260437, 0.17750762403011322, 1.0854288339614868, -0.3092162311077118, 0.058529503643512726, -0.2353878617286682, 0.17100197076797485, 0.1679707169532776, -0.7376625537872314, 0.07258489727973938, -0.3848075866699219, -0.20658430457115173, -0.09966482222080231, -0.11097390204668045, 0.04282651096582413, 0.2550097703933716, -0.042291298508644104, 0.07419758290052414, 0.12382727861404419, 0.709924042224884, 0.08187054842710495, 0.030453070998191833, 0.305402010679245, -0.22040875256061554, 0.01663469523191452, 0.056092292070388794, 0.12913775444030762, -0.009973004460334778, 0.035963691771030426, 0.018401145935058594, -0.05858614668250084, -0.04999886453151703, -0.48852401971817017, -0.1806243509054184, -0.4635290205478668, 0.1805604249238968, 0.13196170330047607, 0.2672175467014313, 0.11848621070384979, 0.06780806183815002, -0.07454553246498108, 0.3913676142692566, 0.07606181502342224, 0.4531063735485077, 0.2045990377664566, -0.0327599011361599, 0.38782912492752075, -0.39126384258270264, 0.0481865257024765, -0.02215111255645752, -0.012955442070960999, 0.16520309448242188, -0.02400539442896843, -0.4111174941062927, -0.3518608808517456, 0.20759013295173645, 0.6740376353263855, -0.1326136589050293, -0.061309706419706345, -0.050653982907533646, -0.0005671828985214233, -0.2243741750717163, 0.051264721900224686, 0.24950137734413147, 0.07493899762630463, 0.5743310451507568, -0.20799177885055542, -0.18179558217525482, -0.07189136743545532, 0.34520792961120605, -0.19208885729312897, -0.18383541703224182, 0.34703147411346436, 0.037559300661087036, -0.22264952957630157, -0.12327311933040619, 0.3802723288536072, 0.0996803417801857, -0.19264543056488037, -0.03603730350732803, -0.5757484436035156, -0.04450938105583191, 0.1284126192331314, 0.16567155718803406, -0.042454447597265244, -0.062233369797468185, -0.07410264015197754, -0.45551931858062744, -0.3821902275085449, -0.20688873529434204, -0.029412973672151566, 0.1891748160123825, -0.17630207538604736, -0.10025151073932648, -0.2756825387477875, 0.24586345255374908, -0.15679363906383514, 0.1368994414806366, -0.15237291157245636, -0.10157175362110138, -0.2353387326002121, -0.15781356394290924, 0.09703925997018814, -0.21214425563812256, -0.04626871645450592, 0.47169265151023865, 0.15234994888305664, -0.09045398235321045, -0.21184279024600983, 0.2030605971813202, 0.21695615351200104, -0.25906842947006226, 0.16741234064102173, -0.026507806032896042, -0.07278105616569519, -0.38721978664398193, -0.17300473153591156, 0.09442126005887985, -0.054533302783966064, -0.20367930829524994, 0.36261454224586487, -0.050557900220155716, -0.09437243640422821, 0.00990401953458786, 0.1466096192598343, 0.16372521221637726, 0.18926137685775757, 0.21170657873153687, 0.033492568880319595, -0.08116762340068817, -0.13705849647521973, 0.24973425269126892, 0.18238572776317596, -0.12270933389663696, 0.5208711624145508, -0.3852016031742096, -0.09120380878448486, 0.319330096244812, 0.29648515582084656, 0.641159176826477, -0.16730178892612457, -0.3463224172592163, 0.5493074059486389, 0.06689736247062683, 0.04895348846912384, -0.2025347650051117, 0.7441790699958801, 0.11425557732582092, 0.0013108402490615845, 0.023986846208572388, 0.07975791394710541, -0.20422431826591492, -0.2546117901802063, 0.16703025996685028, 0.3793713450431824, -0.277730792760849, 0.10545220971107483, -0.022087305784225464, 0.17259204387664795, 0.005128775257617235, 0.23319685459136963, 0.10384676605463028, 0.32639575004577637, 0.3252728283405304, 0.18450011312961578, 0.14602631330490112, 0.3049899935722351, 0.24872735142707825, 0.1157323569059372, -0.3463835120201111, -0.04018217697739601, 0.4590034484863281, -0.12472431361675262, 0.08071815222501755, 0.06567215919494629, 0.2731553912162781, -0.1301857829093933, -0.5751641988754272, -0.09836097061634064, 0.27031826972961426, -0.2795324921607971, -0.06163512170314789, 0.1357768326997757, -0.10413621366024017, -0.19667206704616547, 0.24783717095851898, -0.06746040284633636, 0.03151392564177513, 0.1302729696035385, 0.063654325902462, 0.07609822601079941, -0.26750266551971436, -0.24887588620185852, -0.1686500608921051, 0.42827895283699036, -0.27948248386383057, 0.03847857564687729, -0.44852080941200256, -0.08334575593471527, -0.3867318034172058, 0.13057677447795868, 0.38604316115379333, 0.3322037160396576, -0.3575620651245117, 0.13246071338653564, -0.3035559356212616, 0.058733806014060974, -0.014701467007398605, 0.5501227974891663, -0.14343905448913574, -0.3998541235923767, 0.08947034925222397, -0.0693274736404419, -0.17927241325378418, -0.23579159379005432, 0.1071096658706665, 0.3662971556186676, 0.22792068123817444, -0.03521089628338814, 0.0628962367773056, -0.20174624025821686, -0.07476924359798431, -0.1589629352092743, 0.047528982162475586, -0.33190372586250305, 0.315250426530838, -0.19915127754211426, 0.1465720236301422, -0.2538425326347351, 0.040533073246479034, -0.06885561347007751, 0.2665948271751404, 0.47746700048446655, 0.0026574800722301006, -0.460019052028656, -0.28745412826538086, -0.31988289952278137, 0.13259363174438477, -0.25244489312171936, 0.157724529504776, 0.03231020271778107, 0.003132946789264679, 0.0140522550791502, 0.273968368768692, -0.02549797296524048, 0.19034823775291443, -0.08703962713479996, 0.33241260051727295, -0.22171348333358765, 0.3289976119995117, -0.11982801556587219, 0.0018249619752168655, -0.0093768909573555, -0.327873170375824, 0.47665876150131226, -0.2806280255317688, -0.013792987912893295, -0.0854625254869461, -0.1990356296300888, -0.0360712930560112, -0.2993166744709015, 0.3547043204307556, 0.13460183143615723, 0.09862862527370453, 0.10874044895172119, 0.03364976495504379, -0.19828259944915771, -0.04094506427645683, -0.09965433180332184, 0.16380561888217926, 0.08863911032676697, 0.21055693924427032, -0.19009068608283997, 0.11149607598781586, -0.19283804297447205, -0.21519334614276886, -0.07278178632259369, -0.26030445098876953, -0.14583146572113037, 0.17441633343696594, -0.0652628093957901, 0.409171998500824, -0.05786485970020294, 0.5032041072845459, -0.07672107219696045, 0.3331761658191681, -0.37166890501976013, -0.10823649168014526, 0.33954477310180664, -0.6198594570159912, -0.37549471855163574, -0.11457288265228271, -0.04930369555950165, 0.3244783878326416, 0.1560852825641632, -0.045550353825092316, -0.3533231019973755, 0.28484198451042175, -0.09638889133930206, -0.5365850925445557, 0.08161461353302002, 0.09297541528940201, 0.04586684703826904, -0.179230734705925, 0.4245980679988861, -0.03139109909534454, -0.3439865708351135, 0.3688407838344574, 0.03753583878278732 ]
https://github.com/huggingface/datasets/issues/6319
same issue here sample to reproduce: https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb with following map line https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb If I directly iterate over the dataset and call the mapping method, it is very fast ```py for sample in dataset: def preprocess_documents_for_donut(sample): ``` if i removed `.convert('RGB')` It can run to completion without getting stuck. I suspect it has something to do with the Image. If I use batch, it's even slower.
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
65
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, same issue here sample to reproduce: https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb with following map line https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb If I directly iterate over the dataset and call the mapping method, it is very fast ```py for sample in dataset: def preprocess_documents_for_donut(sample): ``` if i removed `.convert('RGB')` It can run to completion without getting stuck. I suspect it has something to do with the Image. If I use batch, it's even slower.
[ -0.5472961068153381, 0.10284584760665894, 0.04873661696910858, 0.10942556709051132, 0.15640074014663696, 0.11435630172491074, 0.3405649960041046, 0.33139339089393616, -0.005230031907558441, -0.20240147411823273, -0.09187188744544983, 0.5996783971786499, 0.02987278252840042, -0.36817747354507446, -0.32830461859703064, 0.18705743551254272, 0.2679592967033386, 0.22360564768314362, 0.3123297095298767, -0.11800592392683029, -0.08430393785238266, 0.05285867303609848, -0.32791590690612793, 0.002476215362548828, -0.6185140013694763, -0.25440365076065063, -0.07109140604734421, -0.1553650200366974, -0.21020904183387756, -0.3340388536453247, 0.11478348821401596, 0.2087383270263672, -0.23280374705791473, 0.7293696403503418, -0.00012279758811928332, -0.08719262480735779, -0.04021354764699936, 0.2851521670818329, 0.06628401577472687, -0.0016489848494529724, -0.21080747246742249, 0.031010672450065613, -0.15115562081336975, -0.08753643929958344, 0.20480063557624817, 0.0491478368639946, 0.13302823901176453, -0.25710728764533997, 0.2799314260482788, 0.2260003238916397, 0.05729327350854874, 0.34959855675697327, -0.09852574020624161, 0.010740835219621658, 0.1756528615951538, 0.07544226944446564, -0.17496123909950256, 0.13962924480438232, 0.4377501606941223, -0.4677938222885132, -0.24951191246509552, -0.018415585160255432, -0.3549451231956482, -0.08740293234586716, -0.06463613361120224, -0.10480372607707977, 0.0039034169167280197, -0.5910460352897644, 0.4309541881084442, 0.2510290741920471, 0.09540054202079773, 0.029953576624393463, -0.11656380444765091, -0.229757159948349, -0.2258632779121399, -0.15618139505386353, 0.22293785214424133, 0.0619397908449173, -0.12427762150764465, 0.1074381023645401, -0.39486050605773926, 0.13132426142692566, 0.019829317927360535, 0.26464030146598816, -0.07575865089893341, 0.41966313123703003, 0.12862525880336761, 0.2181214839220047, 0.19727230072021484, -0.08089692890644073, -0.07505355775356293, -0.10723206400871277, 0.10315333306789398, 0.23146703839302063, -0.4734058380126953, -0.07104521989822388, 0.0974385142326355, -0.20805557072162628, 0.2171458601951599, -0.14025598764419556, -0.28944817185401917, 0.2443891167640686, -0.07636144757270813, 0.26212793588638306, 0.2669658362865448, 0.11957883834838867, -0.06387762725353241, 0.47129353880882263, 0.42515528202056885, -0.2759588062763214, -0.3828687369823456, 0.1930493265390396, -0.12163110077381134, -0.18558385968208313, 0.09431338310241699, -0.13035166263580322, -0.0753699317574501, -0.023450113832950592, -0.27087002992630005, 0.20190054178237915, -0.36140531301498413, 0.21529445052146912, 0.06809169799089432, 0.2742178440093994, -0.09228426963090897, 0.10148395597934723, -0.11601214110851288, -0.19893106818199158, -0.30144888162612915, -0.053551219403743744, 0.04352804273366928, -0.29159343242645264, -0.26686641573905945, 0.12423653900623322, -0.02306348830461502, -0.009694220498204231, 0.15555469691753387, 0.04045266658067703, -0.04341056942939758, -0.10656263679265976, 0.2736378014087677, -0.39085742831230164, 0.30560681223869324, 0.1545867919921875, -0.2762543857097626, 0.5137184262275696, 0.04685291275382042, -0.17893481254577637, -0.14585644006729126, 0.092803955078125, -0.3187260627746582, -0.06102251634001732, -0.004123037680983543, 0.03938762843608856, -0.1283954679965973, 0.001499638892710209, -0.2486872524023056, 0.15024641156196594, 0.326572060585022, 0.030871979892253876, 0.062196437269449234, -0.15704834461212158, -0.2943089008331299, -0.12252844870090485, 0.08540226519107819, 0.2815878391265869, -0.041688237339258194, -0.04756815731525421, 0.15831565856933594, 0.2854327857494354, 0.2029018998146057, 0.5702808499336243, 0.020479433238506317, 0.3342130184173584, -0.3261001706123352, 0.2243010550737381, 0.19295497238636017, 0.21790355443954468, -0.5396510362625122, 0.34163573384284973, -0.09245958179235458, -0.016758397221565247, -0.35921233892440796, -0.00232832133769989, 0.695551335811615, -0.12966254353523254, 0.46674051880836487, 0.1865067034959793, -0.0651446133852005, 0.10475338995456696, -0.28687137365341187, -0.2525201737880707, 0.0757790207862854, 0.10412940382957458, 0.1539127230644226, -0.07040613889694214, -0.17284516990184784, -0.18008370697498322, 0.2500324845314026, 0.09438551217317581, -0.010473806411027908, 0.234941303730011, 0.233106330037117, -0.0981377363204956, 0.13475871086120605, -0.3287965953350067, -0.08663231134414673, 0.35400453209877014, 0.2591134011745453, -0.03427289053797722, 0.014312591403722763, -0.013139255344867706, 0.018265604972839355, 0.14522045850753784, -0.2360343188047409, 0.05380235239863396, -0.04907269775867462, -0.12333806604146957, -0.17435410618782043, 0.15693794190883636, -0.1446375995874405, -0.1576058566570282, 0.04991075396537781, 0.13869152963161469, 0.017331618815660477, 0.055093444883823395, -0.05478494614362717, -0.12013914436101913, -0.14499664306640625, -0.004112923517823219, 0.14102670550346375, -0.17517173290252686, -0.22949261963367462, 0.23860913515090942, 0.1201988011598587, 0.1966455578804016, -0.07857899367809296, 0.3338419198989868, 0.24370625615119934, -0.08281010389328003, -0.13163940608501434, 0.3178806006908417, -0.06003512814640999, -0.3241066038608551, 0.00824627373367548, 0.146422877907753, 0.09166337549686432, 0.45075181126594543, -0.18270182609558105, 0.19835194945335388, 0.07885769754648209, -0.016472287476062775, -0.12248251587152481, 0.18419186770915985, 0.45655643939971924, -0.027474118396639824, 0.3394874930381775, 0.224092498421669, 0.07899010181427002, 0.08404485881328583, 0.6741205453872681, 0.024788714945316315, 0.03657747060060501, 0.24389925599098206, -0.18373951315879822, 0.03609280288219452, 0.014428993687033653, -0.030955560505390167, 0.34679508209228516, -0.07446956634521484, 0.16515228152275085, -0.07875976711511612, -0.06600191444158554, -0.07582469284534454, 0.06493592262268066, 0.1843675673007965, 0.24073274433612823, 0.25511714816093445, 0.16779126226902008, 0.18295586109161377, -0.3799898028373718, -0.45167434215545654, 0.07509835809469223, 0.372784823179245, -0.05036025866866112, 0.17935308814048767, -0.05677751451730728, 0.17562107741832733, 0.01994176208972931, -0.018674157559871674, -0.1712433099746704, -0.3136097490787506, -0.1520860642194748, 0.10775147378444672, 0.14099068939685822, 0.39114537835121155, 0.004710100591182709, 0.0417761355638504, 0.11788128316402435, -0.06446661800146103, -0.23544776439666748, -0.34474143385887146, -0.23976624011993408, -0.1307167112827301, 0.4910137951374054, -0.2550797462463379, 0.1593378186225891, 0.12869131565093994, -0.30432450771331787, -0.04299347847700119, -0.3840107023715973, -0.0076775336638092995, -0.09162232279777527, 0.03718678653240204, 0.09563568979501724, 0.351203978061676, -0.23596009612083435, -0.07545270770788193, 0.33531326055526733, -0.5774140357971191, 0.11651080846786499, -0.1115071028470993, -0.06340411305427551, -0.2905218303203583, 0.0902816504240036, -0.06598882377147675, -0.01747138798236847, -0.22143644094467163, 0.4119676947593689, -0.3015763759613037, -0.027506213635206223, 0.20005667209625244, 0.2870866656303406, 0.12761078774929047, 0.043661411851644516, -0.2134215384721756, -0.0743413046002388, -0.19964835047721863, 0.4846981167793274, 0.018757566809654236, -0.20009370148181915, -0.028007127344608307, 0.0000880509614944458, 0.021728646010160446, 0.23895837366580963, -0.4027481973171234, 0.5325844883918762, -0.42062506079673767, 0.06747153401374817, -0.020264169201254845, -0.05476030707359314, 0.26378029584884644, -0.04317764565348625, 0.08837056159973145, 0.06386016309261322, -0.2429264783859253, 0.004376191645860672, 0.09134940803050995, 0.11186105012893677, 0.16867123544216156, 0.49566423892974854, 0.30670952796936035, 0.6761075258255005, 0.40348076820373535, -0.17592526972293854, -0.049531206488609314, 0.0816078707575798, 0.11767304688692093, -0.25664451718330383, -0.5035579800605774, 0.0704202875494957, -0.1787061244249344, -0.45860639214515686, 0.1612279713153839, 0.05751114711165428, -0.6511269211769104, 0.023727700114250183, -0.09584812819957733, 0.1997424066066742, -0.321367084980011, 0.2923682928085327, -0.22479133307933807, 0.0460638664662838, 0.04628946632146835, 0.233651265501976, -0.2145008146762848, -0.24339443445205688, 0.20017945766448975, -0.11656017601490021, 0.09287387132644653, -0.2258795201778412, -0.6267591714859009, 0.11821267008781433, -0.5528829097747803, 0.12699836492538452, -0.061396218836307526, 0.5350049734115601, -0.11681690812110901, 0.19814029335975647, 0.1677727997303009, -0.09978178888559341, 0.6493237018585205, -0.08314158767461777, -0.061771541833877563, 0.14583633840084076, 0.11667685955762863, -0.2668062746524811, -0.05131547898054123, 0.09623673558235168, 0.46364009380340576, 0.5832173824310303, 0.4935157895088196, -0.15362589061260223, -0.17655950784683228, 0.037202123552560806, 0.009944070130586624, -0.022256985306739807, -0.24026548862457275, -0.12985344231128693, 0.0062014758586883545, -0.19856810569763184, 0.2259521782398224, 0.17044010758399963, -0.26573190093040466, 0.10437614470720291, -0.35003799200057983, -0.031062506139278412, -0.14892154932022095, 0.15184402465820312, 0.035853929817676544, 0.07748793065547943, -0.05772249773144722, 0.3948306143283844, 0.4161461293697357, -0.1232035830616951, 0.1599092185497284, 0.2266693413257599, -0.21066610515117645, -0.17736276984214783, 0.04184771701693535, -0.11010335385799408, 0.4511830806732178, 0.5617552399635315, -0.04826580360531807, -0.004168171435594559, -0.14808420836925507, 0.32209208607673645, -0.23042181134223938, 0.2897678017616272, 0.5284996628761292, 0.19457024335861206, -0.6263084411621094, -0.2720569670200348, 0.12695194780826569, 0.24399371445178986, -0.23118627071380615, 0.6022671461105347, -0.4092343747615814, -0.17047765851020813, 0.7279784083366394, 0.17795729637145996, 1.0124989748001099, -0.34634798765182495, 0.15436434745788574, -0.26243558526039124, 0.09579696506261826, 0.11676706373691559, -0.4612540602684021, 0.12775704264640808, -0.33536502718925476, -0.30441516637802124, -0.04345179349184036, -0.084075428545475, 0.06782728433609009, 0.3396606147289276, 0.016481131315231323, 0.10361075401306152, 0.13872818648815155, 0.6633102297782898, 0.1355414241552353, 0.08123144507408142, 0.23225271701812744, -0.2996208071708679, -0.0866268202662468, 0.03897463157773018, 0.055487941950559616, 0.018722284585237503, 0.04725265130400658, -0.013729196041822433, -0.06329438835382462, 0.013384819030761719, -0.5156527757644653, -0.05664785951375961, -0.4684360921382904, 0.15734198689460754, 0.07022795081138611, 0.13610905408859253, 0.17261695861816406, 0.19081775844097137, -0.10088663548231125, 0.24846866726875305, -0.0054576201364398, 0.3979213237762451, 0.20882846415042877, -0.0034762509167194366, 0.40578344464302063, -0.4646349847316742, 0.09727860242128372, 0.07709889113903046, -0.03193603456020355, 0.027881141752004623, -0.07326066493988037, -0.3310316205024719, -0.3104812502861023, 0.2019737958908081, 0.5462753772735596, -0.027327055111527443, -0.05638636276125908, -0.08112473040819168, -0.12436278164386749, -0.17067855596542358, 0.03418968617916107, 0.1571928858757019, 0.13627998530864716, 0.6130109429359436, -0.3319165110588074, -0.2182447910308838, -0.020288195461034775, 0.4590809941291809, -0.1620340645313263, -0.1100597083568573, 0.36411112546920776, 0.12520010769367218, -0.2155120074748993, -0.14916318655014038, 0.37172943353652954, 0.04296068847179413, -0.21526136994361877, -0.04079485684633255, -0.5710659027099609, -0.012756362557411194, 0.11751899123191833, 0.06029186770319939, -0.049089379608631134, -0.12558744847774506, -0.09830767661333084, -0.4732613265514374, -0.35183706879615784, -0.21724137663841248, 0.028009969741106033, 0.22375699877738953, -0.19001805782318115, -0.23179009556770325, -0.12544170022010803, 0.2436693012714386, -0.13652807474136353, 0.08511240035295486, -0.1316043734550476, -0.027210015803575516, -0.12958258390426636, -0.12368717789649963, 0.2861515283584595, -0.2586706876754761, -0.11296465247869492, 0.4566575586795807, 0.17155152559280396, -0.06793506443500519, -0.21484705805778503, 0.20722322165966034, 0.160343199968338, -0.23106306791305542, 0.1590726375579834, -0.19555553793907166, -0.07544656097888947, -0.46891912817955017, -0.09029284119606018, 0.13763785362243652, -0.08721224963665009, -0.17856734991073608, 0.25136715173721313, 0.025160763412714005, -0.005522966384887695, 0.06514640152454376, -0.00797729566693306, 0.1162295788526535, 0.20169185101985931, 0.18129344284534454, 0.07075764983892441, -0.05200750380754471, -0.06603545695543289, 0.15507861971855164, 0.15454816818237305, -0.03798700124025345, 0.6093007326126099, -0.48637574911117554, -0.01579613983631134, 0.3187374174594879, 0.30650240182876587, 0.648859441280365, -0.19292320311069489, -0.3036273419857025, 0.34846484661102295, 0.0596771165728569, 0.069486603140831, -0.2335660457611084, 0.6681633591651917, 0.00918542593717575, 0.03330211341381073, 0.10066033899784088, 0.017991945147514343, -0.23404619097709656, -0.18570151925086975, 0.16618330776691437, 0.4357664883136749, -0.35098522901535034, 0.06244853511452675, -0.07032012939453125, 0.16264066100120544, 0.036568932235240936, 0.14358635246753693, 0.08707663416862488, 0.2984943687915802, 0.2888473868370056, 0.24135354161262512, 0.1904544085264206, 0.3214553892612457, 0.32620930671691895, 0.14587774872779846, -0.28291410207748413, -0.1477351039648056, 0.34156692028045654, -0.16570255160331726, 0.2513701915740967, 0.08732359111309052, 0.23090055584907532, -0.17215335369110107, -0.437811940908432, -0.06020820513367653, 0.13786713778972626, -0.2305949181318283, -0.061674706637859344, 0.06524227559566498, -0.07263778150081635, -0.0704428181052208, 0.21544605493545532, -0.08369703590869904, 0.011439988389611244, 0.3817049562931061, 0.12905365228652954, 0.05314077436923981, -0.20502856373786926, -0.2184562087059021, -0.16356134414672852, 0.4860888421535492, -0.29945674538612366, 0.09441090375185013, -0.34773391485214233, -0.13926975429058075, -0.4000769555568695, 0.24788978695869446, 0.4127311706542969, 0.3563869893550873, -0.3428748846054077, 0.20196086168289185, -0.16090576350688934, -0.012166131287813187, -0.0015310496091842651, 0.4603348970413208, -0.14681661128997803, -0.3015236556529999, 0.060031209141016006, -0.07718789577484131, -0.12622927129268646, -0.14808639883995056, 0.04142170771956444, 0.4194030463695526, 0.2131763994693756, -0.10902497917413712, -0.04691439867019653, -0.2763250470161438, -0.07835795730352402, -0.17234055697917938, -0.05531672015786171, -0.26083773374557495, 0.47248050570487976, -0.38157403469085693, 0.11959393322467804, -0.14245986938476562, 0.019485898315906525, -0.060549456626176834, 0.3941567838191986, 0.4939379394054413, -0.03481092303991318, -0.5365961790084839, -0.19399645924568176, -0.32826340198516846, 0.06770564615726471, -0.30914393067359924, 0.26338475942611694, 0.018708474934101105, 0.06698507815599442, -0.016277968883514404, 0.17003902792930603, 0.036334387958049774, -0.07948273420333862, -0.05511196330189705, 0.5143710374832153, -0.18273282051086426, 0.14296142756938934, -0.22819650173187256, -0.011958260089159012, 0.0248396098613739, -0.3878651559352875, 0.4451218545436859, -0.2167608141899109, -0.07742779701948166, -0.12713946402072906, -0.0797567218542099, -0.0706484392285347, -0.17495295405387878, 0.22768309712409973, 0.19594626128673553, 0.14777539670467377, 0.10902020335197449, -0.07482686638832092, -0.24487145245075226, -0.01891646906733513, -0.11478154361248016, 0.16772930324077606, 0.1103033795952797, 0.26503443717956543, -0.2792513370513916, -0.041640497744083405, -0.25556132197380066, -0.2676517963409424, -0.0695786252617836, -0.370595782995224, -0.1883944720029831, 0.12527072429656982, -0.07669796049594879, 0.4003852903842926, -0.049922097474336624, 0.6121199727058411, -0.040095169097185135, 0.18008878827095032, -0.39448416233062744, -0.13598006963729858, 0.32930558919906616, -0.6971390843391418, -0.4867250919342041, -0.05488866940140724, -0.01586049050092697, 0.24972406029701233, 0.21380554139614105, -0.17816780507564545, -0.31344467401504517, 0.24891510605812073, -0.1344825029373169, -0.5855764150619507, 0.01957106590270996, 0.15297935903072357, 0.11633637547492981, -0.18214479088783264, 0.5165898203849792, 0.002473641186952591, -0.40729910135269165, 0.3194645047187805, -0.0543120838701725 ]
https://github.com/huggingface/datasets/issues/6319
@ewfian > If I directly iterate over the dataset and call the mapping method, it is very fast `Dataset.map` must also convert the images into bytes to write them to an Arrow file (the write itself takes some time, too). You can make the `map` faster by manually converting the images into an "arrow-compatible" representation. Otherwise, the Pillow defaults are used when saving an image, which seems particularly slow for the notebook's case. ```python def preprocess_documents_for_donut(sample): text = json.loads(sample["text"]) d_doc = task_start_token + json2token(text) + eos_token image = sample["image"].convert('RGB') # convert image to bytes buffer = io.BytesIO() image.save(buffer, format="PNG", compress_level=1) return {"image": {"bytes": buffer.getvalue()}, "text": d_doc} proc_dataset = dataset.map(preprocess_documents_for_donut, writer_batch_size=50) ```
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
111
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, @ewfian > If I directly iterate over the dataset and call the mapping method, it is very fast `Dataset.map` must also convert the images into bytes to write them to an Arrow file (the write itself takes some time, too). You can make the `map` faster by manually converting the images into an "arrow-compatible" representation. Otherwise, the Pillow defaults are used when saving an image, which seems particularly slow for the notebook's case. ```python def preprocess_documents_for_donut(sample): text = json.loads(sample["text"]) d_doc = task_start_token + json2token(text) + eos_token image = sample["image"].convert('RGB') # convert image to bytes buffer = io.BytesIO() image.save(buffer, format="PNG", compress_level=1) return {"image": {"bytes": buffer.getvalue()}, "text": d_doc} proc_dataset = dataset.map(preprocess_documents_for_donut, writer_batch_size=50) ```
[ -0.5075655579566956, 0.08682578802108765, 0.024711772799491882, 0.14701423048973083, 0.13376814126968384, 0.17092423141002655, 0.23593086004257202, 0.4097411036491394, -0.0756518766283989, -0.1975446343421936, -0.001470722258090973, 0.6998304724693298, -0.0015343837440013885, -0.3838915228843689, -0.31829366087913513, 0.193336620926857, 0.2605298161506653, 0.17601776123046875, 0.32045093178749084, -0.06243090704083443, -0.10871121287345886, 0.09832718223333359, -0.28217434883117676, 0.01248404011130333, -0.582243800163269, -0.2780926525592804, -0.049076855182647705, -0.1470295786857605, -0.29811567068099976, -0.3755802512168884, 0.012453503906726837, 0.22794972360134125, -0.22196801006793976, 0.6493619084358215, -0.00012085840717190877, -0.07277733087539673, -0.11596854776144028, 0.2080211043357849, 0.053399667143821716, -0.028765462338924408, -0.15714477002620697, -0.13511225581169128, -0.15331244468688965, -0.15911859273910522, 0.3128736615180969, -0.17362965643405914, 0.10560128092765808, -0.26249954104423523, 0.40056514739990234, 0.2489454746246338, 0.08210927248001099, 0.2351887822151184, -0.06494660675525665, 0.016081899404525757, 0.2218085676431656, 0.06180470436811447, -0.18472838401794434, 0.19578710198402405, 0.37878477573394775, -0.4498772919178009, -0.2515087127685547, 0.031402893364429474, -0.37439191341400146, -0.015158342197537422, -0.06904178857803345, -0.14024539291858673, -0.016590651124715805, -0.4910244047641754, 0.40072619915008545, 0.2182532250881195, 0.17442378401756287, -0.005510441493242979, -0.017803138121962547, -0.22786089777946472, -0.2825000286102295, -0.12769180536270142, 0.30351775884628296, 0.09701316803693771, -0.09204977750778198, 0.13069453835487366, -0.3457561731338501, 0.12352661788463593, 0.054960183799266815, 0.25515007972717285, -0.0032435134053230286, 0.26231104135513306, 0.09652810543775558, 0.26373380422592163, 0.17993487417697906, -0.008441684767603874, -0.10841101408004761, -0.047498635947704315, 0.03854312002658844, 0.2051122486591339, -0.34123551845550537, -0.05658246949315071, 0.14646843075752258, -0.378047376871109, 0.30334287881851196, -0.13454566895961761, -0.11313778162002563, 0.19756200909614563, -0.046342793852090836, 0.28643038868904114, 0.3126833736896515, 0.03715447708964348, -0.08309590816497803, 0.28631678223609924, 0.3500503599643707, -0.24292778968811035, -0.37075960636138916, 0.19180956482887268, -0.0827363058924675, -0.3034045696258545, 0.08091966807842255, -0.16088935732841492, -0.00032620877027511597, -0.041415922343730927, -0.18157245218753815, 0.24722899496555328, -0.49967387318611145, 0.14338937401771545, -0.012443114072084427, 0.21178361773490906, -0.14868369698524475, 0.07708121836185455, -0.016743429005146027, -0.21357369422912598, -0.2323000133037567, -0.04078385978937149, 0.03692484647035599, -0.2849462032318115, -0.25676536560058594, 0.12981396913528442, -0.015429459512233734, 0.07593952119350433, 0.1863967925310135, 0.07103997468948364, -0.11968019604682922, -0.10667568445205688, 0.2855350971221924, -0.35808828473091125, 0.29598096013069153, 0.0726114958524704, -0.2749662697315216, 0.5064476728439331, 0.022633951157331467, -0.11941387504339218, -0.1976514756679535, 0.0768950879573822, -0.32712623476982117, 0.00636802613735199, -0.004629191011190414, 0.024806123226881027, -0.043506890535354614, -0.003385378047823906, -0.3737281560897827, 0.1674940437078476, 0.22917209565639496, 0.05227530002593994, 0.11707334220409393, -0.07083079218864441, -0.22116179764270782, -0.16649708151817322, -0.002234354615211487, 0.14841718971729279, -0.1739189624786377, -0.026111051440238953, 0.20181629061698914, 0.25924935936927795, 0.1329256296157837, 0.4543643295764923, 0.061868783086538315, 0.4187329411506653, -0.3481121361255646, 0.20441538095474243, 0.21036359667778015, 0.17053283751010895, -0.5550922751426697, 0.2537000775337219, -0.06503487378358841, 0.0065878406167030334, -0.37955838441848755, -0.07671397924423218, 0.6598846316337585, -0.03503009304404259, 0.510208249092102, 0.204025000333786, 0.005257362499833107, 0.12389589101076126, -0.28354382514953613, -0.2053840011358261, -0.014655894599854946, 0.07517386972904205, 0.08015812933444977, -0.17307773232460022, -0.19170057773590088, -0.2292996048927307, 0.22441135346889496, 0.0531342588365078, 0.028974510729312897, 0.33711063861846924, 0.26772522926330566, -0.0708128958940506, 0.15583251416683197, -0.22260114550590515, -0.07927240431308746, 0.3444608747959137, 0.3448849320411682, -0.0905061662197113, -0.07645469158887863, 0.028248481452465057, 0.034898653626441956, 0.14019480347633362, -0.16701550781726837, 0.060284968465566635, -0.023239264264702797, -0.1650974452495575, -0.16206638514995575, 0.29073211550712585, -0.13951539993286133, -0.03720611706376076, 0.027295537292957306, 0.2047155499458313, 0.1377280205488205, 0.12319725006818771, 0.005263475701212883, -0.17081671953201294, -0.09175187349319458, -0.006495213136076927, 0.12906593084335327, -0.1729687750339508, -0.2648155391216278, 0.24637922644615173, 0.22822163999080658, 0.07374340295791626, -0.14940279722213745, 0.23859171569347382, 0.10993917286396027, -0.14332175254821777, -0.1810024082660675, 0.24834208190441132, -0.05282115191221237, -0.20766128599643707, -0.054370440542697906, 0.17781147360801697, 0.004094024188816547, 0.3762778043746948, -0.2221045345067978, 0.26885131001472473, 0.08498720824718475, 0.011227279901504517, -0.16252818703651428, 0.20024728775024414, 0.4069058299064636, -0.0035669058561325073, 0.27913710474967957, 0.16502098739147186, 0.08175548911094666, 0.02018272876739502, 0.637900710105896, 0.09087158739566803, 0.04945513233542442, 0.2444111406803131, -0.1887442171573639, 0.04401084780693054, 0.09391340613365173, 0.07849805057048798, 0.3934869170188904, -0.04497465118765831, 0.0780293270945549, -0.05795527994632721, -0.15591609477996826, 0.01795448362827301, 0.053635746240615845, 0.13630208373069763, 0.334689736366272, 0.2208280861377716, 0.1408005654811859, 0.13181787729263306, -0.42740076780319214, -0.3667648136615753, 0.07778285443782806, 0.41686832904815674, -0.06676322221755981, 0.1083250492811203, -0.13691852986812592, 0.12154339253902435, 0.049853984266519547, 0.10494763404130936, -0.18422278761863708, -0.2754842936992645, -0.07690341025590897, 0.07698695361614227, 0.08101426064968109, 0.3670957088470459, 0.05231770873069763, 0.1135854423046112, 0.08745148032903671, -0.13035082817077637, -0.2525738775730133, -0.3674556016921997, -0.18244843184947968, -0.12030315399169922, 0.48593869805336, -0.21883045136928558, 0.24338194727897644, 0.08092644065618515, -0.3085020184516907, -0.14504311978816986, -0.40591657161712646, -0.014945100992918015, -0.19343049824237823, 0.026457181200385094, 0.15382727980613708, 0.409038245677948, -0.3441367745399475, -0.017172496765851974, 0.34493568539619446, -0.48331475257873535, -0.023911572992801666, -0.12422607094049454, -0.005003519356250763, -0.26162081956863403, 0.08866672962903976, -0.021205902099609375, 0.07433117926120758, -0.23032182455062866, 0.498440682888031, -0.16248244047164917, -0.04244702681899071, 0.09503626823425293, 0.41056936979293823, 0.12140817940235138, 0.05303807929158211, -0.1543414294719696, -0.11328212171792984, -0.1528605818748474, 0.4679816961288452, -0.047262925654649734, -0.20219561457633972, 0.05414511263370514, 0.07552185654640198, 0.11881639063358307, 0.18395918607711792, -0.5130057334899902, 0.38228121399879456, -0.35662320256233215, 0.13784252107143402, -0.06222732737660408, -0.0766436979174614, 0.2956605851650238, 0.0972118228673935, 0.024736527353525162, 0.0009624511003494263, -0.27481135725975037, -0.006836120039224625, 0.08958706259727478, 0.13204282522201538, 0.1554211676120758, 0.47763317823410034, 0.3338727355003357, 0.5709341168403625, 0.3427393436431885, -0.1014542430639267, 0.08140836656093597, 0.039770372211933136, 0.11529634892940521, -0.20690445601940155, -0.5167696475982666, 0.06521046906709671, -0.21824032068252563, -0.29213446378707886, 0.11219485104084015, 0.03451713174581528, -0.604758083820343, -0.045688241720199585, -0.07861335575580597, 0.030600860714912415, -0.2762068510055542, 0.2793908417224884, -0.21503372490406036, -0.00952082872390747, 0.060963571071624756, 0.1649543195962906, -0.26935875415802, -0.16506078839302063, 0.1826467663049698, -0.15755243599414825, 0.09180822968482971, -0.2548655569553375, -0.7257886528968811, 0.3235985040664673, -0.5074403882026672, 0.18288876116275787, -0.08836614340543747, 0.4208407998085022, -0.05978121981024742, 0.22333714365959167, 0.1353425532579422, -0.21946565806865692, 0.6231102347373962, -0.09369318932294846, -0.11934086680412292, 0.18208375573158264, 0.1264961063861847, -0.42202699184417725, -0.043461233377456665, 0.1277257204055786, 0.3920500576496124, 0.46120795607566833, 0.41031885147094727, -0.15044400095939636, -0.24585245549678802, 0.017606139183044434, 0.02635236084461212, -0.03574774041771889, -0.176707461476326, -0.09529190510511398, -0.07962659001350403, -0.2095387727022171, 0.17499427497386932, 0.20255963504314423, -0.20263250172138214, 0.20800963044166565, -0.33117860555648804, -0.12186389416456223, -0.22382675111293793, 0.05152492597699165, -0.0223764069378376, 0.14366048574447632, -0.11514781415462494, 0.3934389650821686, 0.41767287254333496, 0.11652197688817978, 0.2598273754119873, 0.2153131365776062, -0.22763213515281677, -0.2058449238538742, -0.07271207869052887, -0.04548412561416626, 0.5163482427597046, 0.5832309722900391, -0.07833641767501831, -0.008022032678127289, -0.24966371059417725, 0.30742695927619934, -0.23575058579444885, 0.28118273615837097, 0.5980034470558167, 0.2179974466562271, -0.577868640422821, -0.2718537449836731, 0.14431707561016083, 0.4135249853134155, -0.21949774026870728, 0.6283372640609741, -0.35373201966285706, -0.21560117602348328, 0.728920578956604, 0.2547062039375305, 1.0226914882659912, -0.3201051354408264, 0.2338491529226303, -0.20396330952644348, -0.002793453633785248, 0.14999227225780487, -0.5508260726928711, 0.074849434196949, -0.3086143136024475, -0.2353782206773758, -0.06472408026456833, -0.10566224902868271, 0.1371326446533203, 0.3170890212059021, -0.07664600014686584, 0.0297771617770195, 0.1510884016752243, 0.4730168282985687, 0.004154343158006668, -0.015736259520053864, 0.21685893833637238, -0.29368722438812256, -0.10355842858552933, 0.05174762010574341, 0.056652408093214035, -0.07569368928670883, 0.053637512028217316, 0.010405488312244415, -0.154044970870018, -0.09367936104536057, -0.49523958563804626, -0.17942090332508087, -0.5077296495437622, 0.14813975989818573, 0.04850117489695549, 0.1758435070514679, 0.07860997319221497, 0.20744113624095917, -0.09267312288284302, 0.27280953526496887, 0.013881085440516472, 0.4302700161933899, 0.16058315336704254, -0.043009258806705475, 0.3870866000652313, -0.48683637380599976, 0.14828193187713623, 0.02827160805463791, 0.012653782963752747, 0.08600296080112457, -0.06834287941455841, -0.37163329124450684, -0.24993322789669037, 0.23601152002811432, 0.48499414324760437, -0.07085264474153519, -0.1855841875076294, 0.019480623304843903, -0.08152132481336594, -0.23827102780342102, 0.04755643755197525, 0.202580988407135, 0.1448851376771927, 0.6844812035560608, -0.31469178199768066, -0.26643744111061096, -0.022202232852578163, 0.505964994430542, -0.22540807723999023, -0.19104747474193573, 0.30241215229034424, 0.10226456820964813, -0.20708173513412476, -0.14228317141532898, 0.4949512481689453, 0.1137276440858841, -0.31477946043014526, 0.03760337457060814, -0.5364388823509216, 0.03619667887687683, 0.023291967809200287, 0.2258322834968567, 0.005391860380768776, -0.1418202668428421, 0.021181762218475342, -0.4014919698238373, -0.3875703811645508, -0.0959690660238266, 0.03433698043227196, 0.25923457741737366, -0.19000650942325592, -0.33181285858154297, -0.14065943658351898, 0.23270462453365326, -0.15833604335784912, 0.26858392357826233, -0.1295802742242813, -0.08433815836906433, -0.05526901036500931, -0.03182293847203255, 0.2690919041633606, -0.24424968659877777, -0.04889430105686188, 0.5068227052688599, 0.14166413247585297, -0.09050780534744263, -0.2882010340690613, 0.19697721302509308, 0.14413383603096008, -0.2989667057991028, 0.21906860172748566, -0.25068575143814087, -0.11442646384239197, -0.41237521171569824, -0.2285023331642151, 0.12230837345123291, -0.08448494970798492, -0.17689526081085205, 0.1842220574617386, -0.019639380276203156, 0.05467936396598816, 0.01572795957326889, 0.025306563824415207, 0.2713218033313751, 0.20643284916877747, 0.18284747004508972, 0.03388587385416031, -0.06144917011260986, -0.10911974310874939, 0.19654840230941772, 0.11119526624679565, -0.08224217593669891, 0.562099277973175, -0.47435903549194336, -0.04566127434372902, 0.2655646800994873, 0.3560485541820526, 0.6480020880699158, -0.23408320546150208, -0.3205137252807617, 0.47622087597846985, 0.07911399751901627, 0.02719893306493759, -0.22334608435630798, 0.746711254119873, 0.04739253968000412, 0.018384337425231934, 0.06260724365711212, -0.014895066618919373, -0.17481017112731934, -0.34904783964157104, 0.13122785091400146, 0.3397686183452606, -0.2657786011695862, 0.05808538943529129, -0.025113791227340698, 0.16160935163497925, 0.002404584549367428, 0.11736708879470825, 0.16912715137004852, 0.43583595752716064, 0.28864169120788574, 0.2429616004228592, 0.062103480100631714, 0.3489316403865814, 0.33945217728614807, 0.08499720692634583, -0.2360331416130066, -0.00754185626283288, 0.41150134801864624, -0.1027112752199173, 0.24587289988994598, 0.06407301127910614, 0.22536776959896088, -0.08563180267810822, -0.48919355869293213, -0.0942504033446312, 0.20131611824035645, -0.2194027602672577, -0.0396861806511879, 0.07592375576496124, -0.12502546608448029, -0.17896372079849243, 0.2654306888580322, -0.11268994212150574, -0.12713797390460968, 0.3338495194911957, 0.15755470097064972, 0.10208852589130402, -0.23777012526988983, -0.2350095808506012, -0.15599770843982697, 0.44380781054496765, -0.2941955327987671, 0.021860310807824135, -0.4608287811279297, -0.14434202015399933, -0.4149225056171417, 0.34546348452568054, 0.4221458435058594, 0.2751609981060028, -0.31038886308670044, 0.16489748656749725, -0.21433435380458832, 0.048045121133327484, 0.004178486764431, 0.487149715423584, -0.10209634900093079, -0.4223094582557678, 0.1625968962907791, -0.06346327811479568, -0.14119186997413635, -0.1450088918209076, 0.07102852314710617, 0.3174300491809845, 0.22176149487495422, -0.17342597246170044, -0.07414771616458893, -0.27188611030578613, -0.08605584502220154, -0.2010601907968521, -0.017277471721172333, -0.3627350330352783, 0.40555891394615173, -0.27289676666259766, 0.13915444910526276, -0.14564841985702515, 0.03425034508109093, -0.11868952959775925, 0.35512644052505493, 0.5028979778289795, 0.036098986864089966, -0.49482613801956177, -0.2848893404006958, -0.3188265562057495, 0.06156707555055618, -0.37185290455818176, 0.15125074982643127, 0.042464662343263626, 0.05034690350294113, 0.0916222631931305, 0.2463523894548416, 0.10726585984230042, 0.016917679458856583, -0.026253461837768555, 0.5599777102470398, -0.2660432457923889, 0.17906919121742249, 0.024558050557971, 0.011126609519124031, 0.005860090255737305, -0.38055604696273804, 0.36805030703544617, -0.2725338935852051, -0.03517536073923111, -0.16333799064159393, -0.10604806989431381, -0.07475456595420837, -0.22732408344745636, 0.427537739276886, 0.10586844384670258, 0.06058172881603241, 0.0799468457698822, -0.15962490439414978, -0.1718490719795227, -0.0065804533660411835, -0.049092814326286316, 0.22424617409706116, 0.16524139046669006, 0.34378963708877563, -0.32486119866371155, 0.08184748888015747, -0.1992053985595703, -0.18474875390529633, -0.09626729041337967, -0.3914485275745392, -0.14450937509536743, 0.18153361976146698, -0.02514735609292984, 0.30657869577407837, -0.08441786468029022, 0.5624600648880005, -0.09749013930559158, 0.2783360183238983, -0.4108167886734009, -0.13116709887981415, 0.33814311027526855, -0.6247525215148926, -0.39634472131729126, 0.09485013037919998, -0.049973756074905396, 0.27730029821395874, 0.20966650545597076, -0.1032276302576065, -0.342681884765625, 0.2872026562690735, -0.04935474693775177, -0.6569122076034546, 0.09523888677358627, 0.1620560586452484, 0.08067367970943451, -0.15200163424015045, 0.46466997265815735, -0.0543665885925293, -0.3842056691646576, 0.33081185817718506, -0.09607857465744019 ]
https://github.com/huggingface/datasets/issues/6319
The problem I had was to do with map using fork and copying locks from the parent process in acquired state. I ended up changing the context to use forkserver instead. On Wed, Nov 29, 2023, 10:04 PM Mario Šaško ***@***.***> wrote: > @ewfian <https://github.com/ewfian> > > If I directly iterate over the dataset and call the mapping method, it is > very fast > > Dataset.map must also convert the images into bytes to write them to an > Arrow file (the write itself takes some time, too). > > You can make the map faster by manually converting the images into an > "arrow-compatible" representation. Otherwise, the Pillow defaults are used > when saving an image, which seems particularly slow for the notebook's case. > > def preprocess_documents_for_donut(sample): > text = json.loads(sample["text"]) > d_doc = task_start_token + json2token(text) + eos_token > image = sample["image"].convert('RGB') > # convert image to bytes > buffer = io.BytesIO() > image.save(buffer, format="PNG", compress_level=1) > return {"image": {"bytes": buffer.getvalue()}, "text": d_doc} > proc_dataset = dataset.map(preprocess_documents_for_donut, writer_batch_size=50) > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6319#issuecomment-1833033973>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABDD3ZKKEKJVWBFH7QHLRJ3YG7ZUJAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZTGAZTGOJXGM> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Datasets.map is severely broken
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04,
208
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends. I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works. ### Steps to reproduce the bug Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue. for idx in range(100): dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]') dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"]) dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}") ### Expected behavior I expect map to run at more or less the same speed it starts with and FINISH its processing. ### Environment info Python 3.8, same with 3.10 makes no difference. Ubuntu 20.04, The problem I had was to do with map using fork and copying locks from the parent process in acquired state. I ended up changing the context to use forkserver instead. On Wed, Nov 29, 2023, 10:04 PM Mario Šaško ***@***.***> wrote: > @ewfian <https://github.com/ewfian> > > If I directly iterate over the dataset and call the mapping method, it is > very fast > > Dataset.map must also convert the images into bytes to write them to an > Arrow file (the write itself takes some time, too). > > You can make the map faster by manually converting the images into an > "arrow-compatible" representation. Otherwise, the Pillow defaults are used > when saving an image, which seems particularly slow for the notebook's case. > > def preprocess_documents_for_donut(sample): > text = json.loads(sample["text"]) > d_doc = task_start_token + json2token(text) + eos_token > image = sample["image"].convert('RGB') > # convert image to bytes > buffer = io.BytesIO() > image.save(buffer, format="PNG", compress_level=1) > return {"image": {"bytes": buffer.getvalue()}, "text": d_doc} > proc_dataset = dataset.map(preprocess_documents_for_donut, writer_batch_size=50) > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6319#issuecomment-1833033973>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABDD3ZKKEKJVWBFH7QHLRJ3YG7ZUJAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZTGAZTGOJXGM> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
[ -0.5738916993141174, 0.08227047324180603, 0.01397879421710968, 0.18170377612113953, 0.16029129922389984, 0.11835987865924835, 0.19462914764881134, 0.38573387265205383, -0.01956336945295334, -0.21568940579891205, -0.02014840953052044, 0.6655286550521851, -0.05103820562362671, -0.4103527069091797, -0.333593487739563, 0.104132741689682, 0.24660617113113403, 0.1393115520477295, 0.33684834837913513, 0.005509428679943085, -0.031553927809000015, 0.08391012996435165, -0.2502427399158478, 0.027433879673480988, -0.605830729007721, -0.21016545593738556, -0.053840287029743195, -0.09069342911243439, -0.23254022002220154, -0.4665820002555847, 0.052539460361003876, 0.19705674052238464, -0.2935435175895691, 0.750353217124939, -0.0001192815470858477, -0.022832386195659637, -0.05550418421626091, 0.2668624520301819, 0.08538933098316193, 0.05719917640089989, -0.22860883176326752, -0.15301421284675598, -0.12528155744075775, -0.025396481156349182, 0.2663300633430481, -0.10886330902576447, 0.0943961888551712, -0.32224157452583313, 0.4052630662918091, 0.11359096318483353, 0.08105064183473587, 0.20065025985240936, -0.038389742374420166, -0.028829874470829964, 0.1265244483947754, -0.011478055268526077, -0.1624355912208557, 0.27086201310157776, 0.33634963631629944, -0.3326658010482788, -0.2835448980331421, -0.040151167660951614, -0.38990145921707153, -0.06414584815502167, -0.15637144446372986, -0.24888814985752106, 0.07549092918634415, -0.5193045139312744, 0.3892096281051636, 0.303658664226532, 0.09980721771717072, -0.03495100140571594, -0.036726970225572586, -0.2667906880378723, -0.31894928216934204, -0.15401878952980042, 0.2642884850502014, 0.019629620015621185, -0.1330585777759552, 0.2588665187358856, -0.3172251582145691, 0.13266894221305847, 0.16430340707302094, 0.1684071570634842, -0.0457644984126091, 0.34646764397621155, 0.11879482120275497, 0.2848837375640869, 0.16841641068458557, 0.01821882463991642, -0.0980532169342041, 0.04977212846279144, 0.0055722519755363464, 0.1837390959262848, -0.460536390542984, -0.05088014528155327, 0.10604898631572723, -0.35580652952194214, 0.24555924534797668, -0.08524808287620544, -0.24094882607460022, 0.2530756890773773, -0.17989668250083923, 0.24386662244796753, 0.3043569326400757, -0.03689698502421379, -0.11751490831375122, 0.3606497049331665, 0.3646150231361389, -0.32908332347869873, -0.4163643717765808, 0.21546660363674164, -0.13144227862358093, -0.2597678303718567, 0.08034661412239075, -0.052063100039958954, -0.03263816982507706, -0.05656822770833969, -0.10317271947860718, 0.2336992621421814, -0.4681233763694763, 0.15858973562717438, 0.1052962988615036, 0.2954385578632355, -0.10851272940635681, 0.22075976431369781, -0.13385000824928284, -0.26189666986465454, -0.18424862623214722, -0.08483497053384781, -0.005792936310172081, -0.35235127806663513, -0.28641176223754883, 0.07739076763391495, -0.018775418400764465, -0.005664261057972908, 0.14701148867607117, 0.0870528370141983, -0.1843133270740509, -0.07021649181842804, 0.22660331428050995, -0.38852447271347046, 0.2860375642776489, 0.08488915860652924, -0.29976266622543335, 0.47780004143714905, 0.02710571512579918, -0.048975780606269836, -0.12216920405626297, 0.10252559930086136, -0.3239979147911072, -0.05408061668276787, 0.032970674335956573, 0.036969058215618134, -0.073113813996315, 0.05456266179680824, -0.14919054508209229, 0.17314228415489197, 0.26360490918159485, -0.029911644756793976, 0.06537953019142151, -0.09236618876457214, -0.26024308800697327, -0.19771775603294373, 0.06351480633020401, 0.2147371470928192, -0.2893219292163849, -0.019040271639823914, 0.14142903685569763, 0.19986537098884583, 0.2072623074054718, 0.5030771493911743, 0.03896757587790489, 0.2763715982437134, -0.34120211005210876, 0.19398023188114166, 0.14184822142124176, 0.25546950101852417, -0.49264606833457947, 0.2539195418357849, -0.11637500673532486, -0.03298557177186012, -0.4127693176269531, -0.07516300678253174, 0.7361836433410645, -0.0492229163646698, 0.43045729398727417, 0.1693693995475769, -0.010420501232147217, 0.09380214661359787, -0.2888217568397522, -0.18072310090065002, 0.019684432074427605, 0.045010946691036224, 0.07853244245052338, -0.16826751828193665, -0.17571985721588135, -0.1586478352546692, 0.1896326094865799, 0.15311317145824432, 0.07204670459032059, 0.26119494438171387, 0.20860615372657776, -0.03501485288143158, 0.1239519789814949, -0.2385338544845581, -0.008763866499066353, 0.3937394917011261, 0.27066484093666077, -0.1495039314031601, -0.037430427968502045, 0.09219811856746674, 0.08194802701473236, 0.24845094978809357, -0.11971643567085266, 0.1064007431268692, -0.005492299795150757, -0.16192089021205902, -0.1277688592672348, 0.1543371081352234, -0.187142014503479, -0.0271746888756752, -0.010813459753990173, 0.13997870683670044, 0.27080845832824707, 0.13298940658569336, -0.013202470727264881, -0.19940057396888733, -0.15645088255405426, 0.018864966928958893, 0.1869276612997055, -0.13845324516296387, -0.2773943543434143, 0.3100101351737976, 0.2106674164533615, 0.06581440567970276, -0.11161378026008606, 0.1744959056377411, 0.12290091812610626, -0.10041961818933487, -0.05698806792497635, 0.1972808539867401, -0.09613874554634094, -0.26557499170303345, 0.06104893237352371, 0.10458438098430634, 0.050929825752973557, 0.3911978006362915, -0.21728040277957916, 0.2757885158061981, 0.11180311441421509, 0.02978595346212387, -0.08104297518730164, 0.21830958127975464, 0.37216493487358093, -0.1335352212190628, 0.346706748008728, 0.1775590479373932, 0.09436237812042236, 0.08065095543861389, 0.6190298795700073, 0.059004977345466614, 0.026388077065348625, 0.175515815615654, -0.2375255823135376, 0.028999410569667816, 0.11260759085416794, 0.15676993131637573, 0.30795717239379883, -0.031541623175144196, 0.13698118925094604, -0.08690369129180908, -0.10340739786624908, -0.00585845485329628, 0.08462586253881454, 0.15291015803813934, 0.35314667224884033, 0.2029637098312378, 0.10372796654701233, 0.11300808936357498, -0.3660775125026703, -0.43387460708618164, 0.10470700263977051, 0.39595213532447815, -0.09760716557502747, 0.09855065494775772, -0.25042206048965454, 0.11587747186422348, 0.028212647885084152, 0.05149373412132263, -0.2351011037826538, -0.3847707211971283, -0.13949066400527954, -0.0045330156572163105, 0.06027701497077942, 0.40172725915908813, -0.05974337458610535, -0.018333077430725098, 0.040868595242500305, -0.07412858307361603, -0.18612122535705566, -0.39442458748817444, -0.1405971497297287, -0.08475412428379059, 0.4750818610191345, -0.2210448682308197, 0.1920727789402008, 0.19344471395015717, -0.3644300699234009, -0.041453201323747635, -0.3076373338699341, 0.028438564389944077, -0.18673767149448395, -0.08284295350313187, 0.2016320824623108, 0.4073905348777771, -0.35798904299736023, -0.03560353070497513, 0.32491621375083923, -0.6396764516830444, 0.042643822729587555, -0.15522025525569916, -0.04231061786413193, -0.27823153138160706, 0.028005972504615784, 0.08044229447841644, -0.047508642077445984, -0.32234182953834534, 0.48954254388809204, -0.10689333826303482, 0.00044092070311307907, 0.1196211725473404, 0.3195412755012512, 0.19420069456100464, 0.03566405549645424, -0.15114469826221466, -0.1250816285610199, -0.17153030633926392, 0.3943631649017334, 0.020300406962633133, -0.11431775987148285, 0.03742989897727966, 0.011355400085449219, 0.12089256942272186, 0.16580668091773987, -0.36563748121261597, 0.5242174863815308, -0.3571101725101471, 0.1834525763988495, 0.0007227133028209209, -0.06398080289363861, 0.23530247807502747, 0.09467703104019165, 0.009590473026037216, 0.02288791537284851, -0.2475932538509369, 0.03178787603974342, 0.06803727895021439, 0.08343677222728729, 0.21278606355190277, 0.4387357234954834, 0.34698060154914856, 0.7067515850067139, 0.31561902165412903, -0.08249320089817047, 0.005036188289523125, 0.06661605834960938, 0.11536391079425812, -0.1950802206993103, -0.43654781579971313, 0.054531510919332504, -0.17162735760211945, -0.3238644003868103, 0.0406198687851429, 0.09344848990440369, -0.5493012070655823, 0.03253592550754547, -0.053673677146434784, 0.20569686591625214, -0.267596960067749, 0.2504199147224426, -0.29304489493370056, -0.003077203407883644, 0.0032698586583137512, 0.1886574774980545, -0.26717934012413025, -0.147295743227005, 0.21010395884513855, -0.1893530637025833, 0.09597676247358322, -0.2726600766181946, -0.723436176776886, 0.43249136209487915, -0.5312408208847046, 0.17594455182552338, -0.08280190825462341, 0.46838968992233276, -0.04185449331998825, 0.17569223046302795, 0.10576442629098892, -0.1251790076494217, 0.6663771867752075, -0.05348625034093857, -0.11624316871166229, 0.179787278175354, 0.10620224475860596, -0.36420702934265137, -0.061794016510248184, 0.16891217231750488, 0.5089846253395081, 0.5167476534843445, 0.20111633837223053, -0.184597909450531, -0.23773320019245148, -0.05219588801264763, 0.111451655626297, -0.04400341212749481, -0.22658681869506836, -0.05078636854887009, 0.08882495760917664, -0.2883756160736084, 0.17572855949401855, 0.21324321627616882, -0.25148770213127136, 0.18900850415229797, -0.3656807541847229, -0.11088757961988449, -0.2217932939529419, 0.07054442167282104, -0.019130714237689972, 0.2200639694929123, -0.13141661882400513, 0.43070143461227417, 0.40029019117355347, 0.04570968449115753, 0.07609433680772781, 0.23993033170700073, -0.14530867338180542, -0.08913727104663849, -0.003258783370256424, 0.03598032519221306, 0.4546355903148651, 0.5640867352485657, -0.057121116667985916, 0.0408877432346344, -0.13927987217903137, 0.304440975189209, -0.14671698212623596, 0.27056798338890076, 0.36903026700019836, 0.17944777011871338, -0.5853391289710999, -0.3417263627052307, 0.11488544940948486, 0.3958742618560791, -0.19634641706943512, 0.66132652759552, -0.36453965306282043, -0.13854491710662842, 0.7611134648323059, 0.23533159494400024, 1.0305484533309937, -0.35367777943611145, 0.06070929020643234, -0.21746203303337097, 0.08609217405319214, 0.14737817645072937, -0.5306863784790039, 0.03227191045880318, -0.36231279373168945, -0.25608256459236145, -0.07028266042470932, -0.12497679889202118, 0.04390767216682434, 0.2853052318096161, -0.04422181844711304, 0.07458999007940292, 0.1692052185535431, 0.47874996066093445, 0.046716369688510895, 0.012509383261203766, 0.3558346629142761, -0.31027305126190186, -0.055482327938079834, 0.061821989715099335, 0.08916028589010239, -0.04003070294857025, 0.08054648339748383, -0.04340514913201332, -0.1367170363664627, 0.01848561316728592, -0.5084420442581177, -0.13702203333377838, -0.4984123110771179, 0.19852900505065918, 0.07187718898057938, 0.2918177843093872, 0.09160593152046204, 0.05959758162498474, -0.15332752466201782, 0.30413129925727844, 0.02364172972738743, 0.4487476050853729, 0.3189968466758728, 0.008352972567081451, 0.4362013638019562, -0.3736411929130554, 0.12486395984888077, 0.019368693232536316, -0.014065131545066833, 0.10595772415399551, -0.09164004772901535, -0.40756672620773315, -0.2495277225971222, 0.19724595546722412, 0.5153184533119202, -0.024192826822400093, -0.1959073543548584, 0.009609509259462357, -0.11345312744379044, -0.20634013414382935, 0.05404224246740341, 0.30598148703575134, 0.09423168748617172, 0.5416877865791321, -0.2525084614753723, -0.21043628454208374, -0.06790335476398468, 0.398282527923584, -0.2057906687259674, -0.04839806258678436, 0.2605085074901581, 0.17544054985046387, -0.22217224538326263, -0.10720837116241455, 0.27645111083984375, 0.03588137403130531, -0.3662058115005493, -0.00648869201540947, -0.5936529636383057, -0.031909748911857605, 0.0664932057261467, -0.06844857335090637, -0.00874632503837347, -0.010235048830509186, -0.10219975560903549, -0.3927839696407318, -0.43347442150115967, -0.14515036344528198, -0.06654693931341171, 0.23218312859535217, -0.2290276437997818, -0.2032882571220398, -0.19897860288619995, 0.26796218752861023, -0.16581830382347107, 0.1618783175945282, -0.13870176672935486, -0.08062262833118439, -0.11360954493284225, -0.12712150812149048, 0.1733264923095703, -0.299085408449173, -0.05098569020628929, 0.5119986534118652, 0.08528175950050354, -0.09457774460315704, -0.2077261060476303, 0.1968507021665573, 0.15876653790473938, -0.3084695339202881, 0.1259135901927948, -0.17154763638973236, -0.06693492829799652, -0.4098489284515381, -0.22469298541545868, 0.09950637072324753, -0.10759052634239197, -0.1911560595035553, 0.31616050004959106, -0.0037290453910827637, -0.07325802743434906, 0.07494089007377625, 0.1011388972401619, 0.1678152084350586, 0.15418308973312378, 0.2331835925579071, 0.04948907345533371, -0.08716058731079102, -0.18153026700019836, 0.19920484721660614, 0.06428404897451401, -0.09072081744670868, 0.5992692708969116, -0.3904029130935669, -0.11998257040977478, 0.3197082579135895, 0.4042355418205261, 0.6252768635749817, -0.15387213230133057, -0.29653415083885193, 0.4509129226207733, 0.060784365981817245, 0.06526708602905273, -0.1413651406764984, 0.8041796684265137, 0.08881892263889313, 0.01887422800064087, 0.07264549285173416, 0.050817593932151794, -0.17259609699249268, -0.3495590090751648, 0.2322062849998474, 0.25144559144973755, -0.2863079309463501, 0.10206785053014755, 0.11970050632953644, 0.195695161819458, 0.020723337307572365, 0.1657750904560089, 0.0935535654425621, 0.35487791895866394, 0.35970962047576904, 0.15376925468444824, 0.12658138573169708, 0.32357844710350037, 0.25153470039367676, 0.22120440006256104, -0.2576845586299896, -0.016657963395118713, 0.39346691966056824, -0.18171793222427368, 0.1754198968410492, 0.08913381397724152, 0.24829162657260895, -0.1347874104976654, -0.584473729133606, -0.020948313176631927, 0.2465377151966095, -0.26841866970062256, -0.037959590554237366, 0.13226132094860077, -0.08350691944360733, -0.195247620344162, 0.21744705736637115, -0.08445306122303009, -0.047930631786584854, 0.3220021426677704, 0.14786672592163086, 0.14631827175617218, -0.24965402483940125, -0.269609659910202, -0.13973894715309143, 0.45744889974594116, -0.31252533197402954, -0.007810475304722786, -0.32601213455200195, -0.15505492687225342, -0.40610232949256897, 0.14182502031326294, 0.41457295417785645, 0.2697598338127136, -0.3446072041988373, 0.19538971781730652, -0.14464259147644043, 0.018456824123859406, -0.02527451142668724, 0.5076622366905212, -0.18095475435256958, -0.3754919469356537, 0.16148513555526733, -0.06099875271320343, -0.15900805592536926, -0.2818845212459564, 0.10718287527561188, 0.4232199788093567, 0.2393755316734314, -0.001225639134645462, 0.009959794580936432, -0.26814258098602295, -0.05455674231052399, -0.16236260533332825, 0.06215482950210571, -0.3175566494464874, 0.4100918769836426, -0.36232852935791016, 0.0987401157617569, -0.21557283401489258, 0.0422816202044487, -0.11461195349693298, 0.3786407709121704, 0.46894150972366333, -0.006127538159489632, -0.44872111082077026, -0.17586646974086761, -0.36173829436302185, 0.07689807564020157, -0.3646136224269867, 0.1680188924074173, 0.031042784452438354, -0.015147291123867035, 0.09475348889827728, 0.3018326163291931, 0.0515848845243454, 0.03806193172931671, 0.041859403252601624, 0.471903920173645, -0.19349846243858337, 0.18463216722011566, -0.07132156193256378, 0.016776127740740776, 0.05592740327119827, -0.3771657943725586, 0.4278677999973297, -0.2710842192173004, -0.033756453543901443, -0.05556623637676239, -0.20955635607242584, 0.003587692975997925, -0.2699053883552551, 0.3512762784957886, 0.1306690275669098, 0.04080124944448471, 0.07284080982208252, -0.10494549572467804, -0.24234932661056519, -0.03742223232984543, -0.06676290184259415, 0.20133578777313232, 0.11651179194450378, 0.3722362816333771, -0.25337812304496765, -0.02364961802959442, -0.22550137341022491, -0.2461102455854416, -0.11145909130573273, -0.19133907556533813, -0.1573491394519806, 0.13178230822086334, -0.07233798503875732, 0.40947747230529785, -0.03787895292043686, 0.5018709301948547, -0.05881586670875549, 0.2738250494003296, -0.41760313510894775, -0.14665056765079498, 0.3374287188053131, -0.6067397594451904, -0.343212366104126, -0.020581938326358795, -0.11533937603235245, 0.3542346656322479, 0.18452134728431702, -0.11764484643936157, -0.33117371797561646, 0.2433921843767166, -0.12697893381118774, -0.6004999876022339, 0.018730342388153076, 0.0950586274266243, 0.1073003038764, -0.13713231682777405, 0.4100232720375061, -0.014692464843392372, -0.4403720200061798, 0.3859354257583618, 0.016580648720264435 ]
https://github.com/huggingface/datasets/issues/6317
We have opened an issue in the corresponding Hub dataset: https://huggingface.co/datasets/sentiment140/discussions/3 Let's continue the discussion there.
sentiment140 dataset unavailable
### Describe the bug loading the dataset using load_dataset("sentiment140") returns the following error ConnectionError: Couldn't reach http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip (error 403) ### Steps to reproduce the bug Run the following code (version should not matter). ``` from datasets import load_dataset data = load_dataset("sentiment140") ``` ### Expected behavior The dataset should be loaded just like any other. The main issue is that it is no longer hosted by stanford. It is still available from a [Google Drive Link](https://docs.google.com/file/d/0B04GJPshIjmPRnZManQwWEdTZjg/edit). ### Environment info - `datasets` version: 2.14.5 - Platform: Windows-10-10.0.19045-SP0 - Python version: 3.10.8 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.1
16
sentiment140 dataset unavailable ### Describe the bug loading the dataset using load_dataset("sentiment140") returns the following error ConnectionError: Couldn't reach http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip (error 403) ### Steps to reproduce the bug Run the following code (version should not matter). ``` from datasets import load_dataset data = load_dataset("sentiment140") ``` ### Expected behavior The dataset should be loaded just like any other. The main issue is that it is no longer hosted by stanford. It is still available from a [Google Drive Link](https://docs.google.com/file/d/0B04GJPshIjmPRnZManQwWEdTZjg/edit). ### Environment info - `datasets` version: 2.14.5 - Platform: Windows-10-10.0.19045-SP0 - Python version: 3.10.8 - Huggingface_hub version: 0.17.3 - PyArrow version: 13.0.0 - Pandas version: 2.1.1 We have opened an issue in the corresponding Hub dataset: https://huggingface.co/datasets/sentiment140/discussions/3 Let's continue the discussion there.
[ -0.36286142468452454, 0.09124556183815002, -0.0619184784591198, 0.3383810520172119, 0.035611383616924286, 0.05036894977092743, 0.03202589601278305, 0.31903377175331116, 0.07944399118423462, 0.15020966529846191, -0.2229425013065338, -0.07228529453277588, 0.09144529700279236, 0.2631198763847351, 0.01693163812160492, -0.0962609052658081, -0.11660943925380707, -0.0402701273560524, 0.11287471652030945, 0.05192137509584427, -0.09575748443603516, 0.25895729660987854, -0.2397778481245041, -0.056645311415195465, -0.22460052371025085, -0.10605481266975403, -0.10081448405981064, -0.025393228977918625, -0.12752342224121094, -0.3272082805633545, 0.6333655118942261, -0.02866792306303978, 0.21052101254463196, 0.15239188075065613, -0.00011431784514570609, 0.055873557925224304, 0.20516017079353333, 0.0954643189907074, -0.17246851325035095, -0.39950621128082275, 0.050033435225486755, -0.3708725571632385, -0.014409922063350677, 0.09844709932804108, -0.39852720499038696, -0.0875481516122818, 0.007255449891090393, -0.08997339010238647, 0.2662612199783325, 0.3789113759994507, 0.14715826511383057, 0.2955794632434845, 0.11335082352161407, -0.32310789823532104, -0.05274278670549393, 0.1361423283815384, -0.07914973795413971, 0.22544503211975098, 0.17561155557632446, -0.04185289517045021, -0.05277661979198456, 0.10946962237358093, 0.11957716941833496, -0.03876158967614174, 0.12366390228271484, -0.09314088523387909, 0.02880856767296791, -0.24190138280391693, 0.17121902108192444, 0.25182849168777466, 0.7748060822486877, -0.03559180349111557, -0.29651939868927, -0.15711231529712677, 0.15142008662223816, -0.19659267365932465, 0.28758060932159424, 0.07144252210855484, -0.072031669318676, 0.257741242647171, -0.2716040015220642, -0.12161967158317566, -0.34038615226745605, 0.3256886601448059, -0.278904527425766, 0.24044141173362732, -0.16354195773601532, 0.10617083311080933, -0.2906878888607025, 0.040769245475530624, 0.30077072978019714, 0.051879823207855225, 0.07757370173931122, 0.18405143916606903, -0.26817724108695984, -0.05348378047347069, -0.016458701342344284, 0.4134506583213806, 0.038279712200164795, 0.3778548836708069, 0.007527600973844528, 0.04586922377347946, -0.015045907348394394, -0.12527528405189514, 0.3085325360298157, 0.18244031071662903, 0.026477303355932236, -0.29633811116218567, 0.5207276940345764, 0.2656799852848053, 0.016593120992183685, 0.0391562283039093, 0.015496321022510529, -0.14236515760421753, -0.20267842710018158, -0.17440661787986755, 0.2784581780433655, -0.2653997540473938, -0.6386967897415161, 0.2975675165653229, -0.28581565618515015, -0.09551648795604706, 0.04515885189175606, 0.46635347604751587, -0.36228567361831665, 0.10476018488407135, 0.19043056666851044, 0.03525582700967789, -0.060779791325330734, -0.2941248416900635, -0.2460094690322876, -0.013410172425210476, -0.20123785734176636, -0.044671401381492615, 0.3453439474105835, -0.041729990392923355, 0.40416112542152405, 0.050100572407245636, 0.1788090020418167, -0.15369975566864014, -0.09623599052429199, -0.01604006066918373, 0.09862342476844788, 0.3241378962993622, 0.17036962509155273, -0.00897311419248581, 0.20061060786247253, 0.0717107504606247, 0.09545084834098816, -0.23349522054195404, -0.29506000876426697, -0.22790426015853882, -0.02558787539601326, 0.14116597175598145, -0.3779534697532654, -0.0031421089079231024, -0.32966241240501404, 0.09579066932201385, -0.4101219177246094, -0.0022351518273353577, 0.03523698449134827, -0.11558753997087479, -0.02938336879014969, -0.16523343324661255, 0.3380306363105774, 0.5197161436080933, -0.2686431109905243, -0.22986391186714172, -0.02891119383275509, -0.043252237141132355, -0.0029404014348983765, 0.2444569170475006, -0.338523805141449, 0.2870134711265564, -0.3189561069011688, 0.10944709181785583, 0.1538354754447937, -0.3566741347312927, -0.6594954133033752, 0.24387477338314056, -0.3633096218109131, 0.27797240018844604, -0.18319687247276306, 0.05953027680516243, 0.14658451080322266, 0.12192698568105698, 0.5414941310882568, 0.3624827265739441, 0.2020772248506546, -0.3022938668727875, -0.20067191123962402, -0.17095628380775452, -0.0657486692070961, 0.054933905601501465, 0.33605360984802246, 0.07096260786056519, 0.13097821176052094, 0.014805905520915985, 0.47772228717803955, 0.0725851058959961, 0.13542631268501282, 0.22375471889972687, 0.3787083327770233, 0.35825711488723755, -0.09440812468528748, -0.1517314910888672, -0.1826082468032837, 0.2763824164867401, -0.1646166294813156, 0.17700913548469543, 0.0523613765835762, -0.07368415594100952, -0.3298972249031067, 0.002512402832508087, -0.13737574219703674, -0.04507759213447571, 0.09782879799604416, 0.13258697092533112, 0.19913700222969055, 0.20951564610004425, -0.17314019799232483, 0.5640650987625122, -0.3345421254634857, 0.24296534061431885, -0.27010712027549744, 0.6016669869422913, 0.03937763720750809, -0.2725958526134491, 0.10592173039913177, 0.2560999095439911, 0.22480443120002747, -0.12835632264614105, 0.05794282630085945, 0.27117422223091125, -0.38367509841918945, 0.1966368407011032, 0.1591738760471344, 0.022696226835250854, 0.3683425486087799, -0.5663368701934814, 0.10538725554943085, 0.14383412897586823, -0.04435807466506958, 0.2250722199678421, 0.1395367980003357, 0.5419876575469971, 0.20231834053993225, -0.058255940675735474, 0.052431389689445496, 0.26467087864875793, 0.2886863946914673, 0.05339006334543228, -0.16144976019859314, -0.07364185154438019, 0.4065200090408325, -0.3968024253845215, 0.24484026432037354, -0.19295868277549744, -0.1714687943458557, 0.13141153752803802, -0.1044868752360344, -0.24227991700172424, -0.009370788931846619, 0.08203352987766266, -0.33689576387405396, -0.27084219455718994, 0.17630253732204437, 0.10486537218093872, 0.3648112416267395, 0.1046026200056076, -0.06307882070541382, 0.05605578422546387, -0.22036492824554443, -0.24642406404018402, 0.20323391258716583, 0.1454557627439499, -0.005710002034902573, 0.03661486133933067, 0.24875444173812866, 0.10831989347934723, -0.34657353162765503, -0.056638479232788086, -0.016964174807071686, 0.10333559662103653, -0.2918597459793091, -0.04194759577512741, 0.021281778812408447, -0.08061628043651581, 0.016908425837755203, 0.006852060556411743, -0.16772469878196716, -0.26075345277786255, -0.07239100337028503, 0.16630806028842926, 0.050538524985313416, -0.09645648300647736, -0.1552310585975647, 0.3699091672897339, -0.15589961409568787, -0.024514025077223778, -0.03493977338075638, 0.09404197335243225, -0.1969083547592163, 0.027919568121433258, -0.1292329877614975, 0.0687573030591011, 0.19141799211502075, -0.2293444722890854, 0.040543414652347565, -0.5553814768791199, -0.39842507243156433, 0.08156412839889526, -0.166944682598114, 0.3672938644886017, 0.10661397874355316, 0.34120839834213257, -0.05485491827130318, -0.024866975843906403, 0.19164469838142395, -0.3858478367328644, 0.07316185534000397, 0.003994181752204895, -0.1401328593492508, 0.033203136175870895, 0.21039409935474396, -0.4490760564804077, -0.467296838760376, -0.13078665733337402, 0.2568439245223999, 0.027179203927516937, -0.17569199204444885, 0.11273153126239777, 0.06134003400802612, 0.14862209558486938, 0.09446310997009277, -0.13180673122406006, -0.4224078953266144, -0.3810330629348755, 0.2302827090024948, -0.2814342677593231, -0.4579940736293793, 0.2043668031692505, 0.23232513666152954, 0.3030549883842468, -0.08058713376522064, -0.6924930810928345, 0.12494535744190216, -0.277860164642334, 0.5235807299613953, 0.011526123620569706, -0.1926056295633316, 0.2975095808506012, -0.18867093324661255, -0.14727631211280823, 0.004971355199813843, -0.1510583460330963, -0.04993424937129021, 0.03566138818860054, 0.2897418141365051, -0.07101073861122131, 0.043406400829553604, 0.08405601978302002, 0.514778196811676, 0.24011224508285522, 0.08547119051218033, 0.37882480025291443, 0.06020015478134155, 0.4149753749370575, -0.018866438418626785, -0.2306557297706604, 0.11558697372674942, -0.18785777688026428, -0.09013177454471588, 0.25784510374069214, 0.17602351307868958, -0.11992929875850677, -0.3398069739341736, -0.3960275650024414, -0.11210156977176666, -0.21711313724517822, -0.029998188838362694, -0.03232394903898239, 0.22412672638893127, 0.13638204336166382, 0.09852347522974014, -0.2886155843734741, -0.31844964623451233, 0.18183627724647522, 0.12922532856464386, 0.21091455221176147, 0.05873236060142517, -0.39387062191963196, -0.14895257353782654, -0.652844250202179, 0.26776593923568726, -0.10404481738805771, 0.35511085391044617, -0.38724833726882935, 0.18227006494998932, 0.2110253870487213, -0.0006722770631313324, 0.6153843402862549, -0.2480572909116745, 0.3344178795814514, -0.08055949211120605, -0.016817249357700348, -0.23945561051368713, -0.06319737434387207, -0.11475583910942078, -0.06118788570165634, 0.2925332486629486, 0.8092657923698425, -0.02320539951324463, -0.17365403473377228, 0.12595444917678833, -0.00655706599354744, -0.22603784501552582, -0.017026860266923904, -0.08061685413122177, -0.31756988167762756, -0.028973091393709183, 0.014453604817390442, 0.22624137997627258, 0.30880001187324524, -0.1297668069601059, -0.1471225917339325, 0.039612263441085815, 0.004672378301620483, 0.22826525568962097, -0.0038986653089523315, 0.052883733063936234, 0.14617040753364563, 0.04651540517807007, 0.5153846740722656, 0.1554499715566635, 0.31028127670288086, 0.5204179883003235, -0.06286905705928802, -0.32974445819854736, 0.08955982327461243, 0.1113421693444252, 0.1134992465376854, 0.6291398406028748, -0.10319221019744873, 0.051516637206077576, 0.08019900321960449, 0.02571031078696251, -0.5386419296264648, 0.11846303939819336, 0.29939019680023193, 0.057825084775686264, -0.3166029155254364, -0.37068209052085876, 0.5563944578170776, 0.06484933197498322, -0.1274619996547699, 0.09010487049818039, 0.6485999822616577, -0.21515335142612457, 0.2429761439561844, 0.04883754625916481, 0.8651021718978882, -0.04350936412811279, 0.13019761443138123, 0.3548170328140259, 0.06326253712177277, 0.48710232973098755, -0.32062870264053345, 0.17935243248939514, 0.1452551782131195, -0.1133008673787117, -0.14980190992355347, -0.12856057286262512, 0.14573301374912262, -0.11519831418991089, 0.19228744506835938, 0.23460781574249268, -0.1127491295337677, 0.30353984236717224, 0.18751472234725952, -0.0257684588432312, -0.1179824247956276, 0.24827100336551666, -0.3823876976966858, 0.19255277514457703, -0.10753819346427917, 0.5168445110321045, -0.10154657065868378, -0.07309773564338684, -0.32219547033309937, -0.1272960603237152, -0.41773566603660583, 0.03370624780654907, -0.14255860447883606, 0.007780149579048157, -0.03704708069562912, -0.32978659868240356, 0.17616119980812073, 0.3931313753128052, 0.34928610920906067, 0.1316719353199005, -0.5363704562187195, 0.21743150055408478, -0.3909285366535187, -0.14868134260177612, 0.2053636908531189, 0.06344325840473175, 0.3060581684112549, -0.058654606342315674, -0.39103132486343384, 0.4810395836830139, -0.15155139565467834, -0.25676095485687256, -0.03052884340286255, -0.016524076461791992, -0.25244757533073425, -0.35575640201568604, 0.05194977670907974, -0.18882714211940765, 0.23513668775558472, -0.3380923271179199, 0.08750401437282562, 0.014978930354118347, -0.17854706943035126, -0.19658780097961426, 0.28899669647216797, -0.2239786833524704, -0.20209194719791412, 0.4865429103374481, -0.14465323090553284, -0.2098851203918457, 0.35845640301704407, 0.34483155608177185, -0.025712907314300537, -0.17436248064041138, -0.15374095737934113, 0.5323382019996643, -0.4277994632720947, 0.08550088107585907, -0.03747681528329849, 0.12558382749557495, -0.1730712205171585, 0.47570186853408813, 0.2664461135864258, -0.225347638130188, -0.1333141326904297, -0.5041255354881287, -0.14080999791622162, 0.20592769980430603, 0.09423387050628662, 0.0788746327161789, 0.17541223764419556, 0.03514546528458595, 0.008796744048595428, -0.21824567019939423, -0.28888818621635437, 0.18479053676128387, -0.3585395812988281, -0.08667173981666565, -0.28465142846107483, -0.16631457209587097, 0.19482144713401794, 0.07565808296203613, 0.06855328381061554, -0.15184076130390167, -0.09030534327030182, -0.07759498059749603, -0.06600401550531387, 0.1564442366361618, 0.11050494015216827, -0.14584508538246155, -0.04012623429298401, -0.28161120414733887, 0.06576550006866455, -0.08364101499319077, 0.32155683636665344, 0.35970062017440796, 0.1607135534286499, -0.16661998629570007, -0.0825558602809906, 0.0767897292971611, -0.07417495548725128, 0.16903558373451233, 0.08845441043376923, 0.15003302693367004, 0.020541604608297348, 0.09097692370414734, -0.054609380662441254, -0.038536928594112396, -0.31480780243873596, 0.06962376087903976, 0.09192076325416565, 0.2306167483329773, 0.38300803303718567, -0.3334926962852478, -0.19080272316932678, 0.26576435565948486, 0.29822081327438354, 0.018471812829375267, -0.21082043647766113, 0.172725647687912, -0.0303654707968235, 0.17268826067447662, -0.4489867687225342, -0.2025417685508728, -0.08886285126209259, 0.11531369388103485, 0.021278828382492065, 0.04145868495106697, 0.516761302947998, -0.20059597492218018, -0.270901620388031, 0.16154888272285461, 0.7338079810142517, 0.011953340843319893, 0.11205790191888809, 0.39088404178619385, 0.134368434548378, 0.12922963500022888, 0.2804621160030365, 0.1972644031047821, 0.042636360973119736, 0.3130704462528229, -0.19321301579475403, 0.2559966742992401, -0.11314697563648224, 0.22946473956108093, -0.01633691042661667, -0.2865646779537201, 0.15186640620231628, 0.0799030289053917, -0.26983532309532166, -0.03419437259435654, -0.1933116614818573, 0.35796353220939636, -0.5477885007858276, -0.09295302629470825, -0.4329730272293091, 0.09427103400230408, -0.29206398129463196, -0.0330154187977314, -0.15847349166870117, -0.43115174770355225, 0.11917087435722351, 0.06267102807760239, -0.03542112186551094, -0.32331958413124084, 0.0891282856464386, -0.01876433938741684, -0.25474321842193604, -0.3752337396144867, 0.015006598085165024, 0.053883373737335205, 0.179658442735672, -0.14472956955432892, 0.23650220036506653, -0.059239711612463, -0.267461359500885, 0.019615843892097473, 0.27847129106521606, 0.3880675435066223, -0.011010068468749523, 0.024265404790639877, 0.11791135370731354, 0.10166039317846298, -0.13780134916305542, -0.06991063058376312, 0.3483171761035919, 0.2687855362892151, 0.034378331154584885, 0.1451827585697174, 0.19420546293258667, -0.12312936782836914, 0.1642450988292694, 0.06113269925117493, 0.6781324744224548, -0.4532303810119629, 0.47037485241889954, -0.46368733048439026, -0.1861761510372162, -0.24339698255062103, -0.18144111335277557, -0.19795726239681244, 0.3370477557182312, 0.2550528049468994, -0.07210107147693634, 0.11020644009113312, -0.1615542471408844, 0.08202019333839417, -0.26640528440475464, 0.22609490156173706, 0.4856898784637451, -0.0469086691737175, -0.38096556067466736, -0.15312902629375458, -0.4751111567020416, 0.25963613390922546, -0.11306785047054291, 0.08587472140789032, -0.06270984560251236, 0.0019193366169929504, -0.012308187782764435, -0.11804677546024323, 0.0008417889475822449, -0.14462053775787354, 0.24571624398231506, -0.04532546177506447, -0.36955001950263977, 0.018230538815259933, 0.2241138219833374, 0.36350059509277344, -0.08574742078781128, 0.01754876971244812, 0.25874584913253784, 0.009050309658050537, -0.03092389926314354, -0.124574676156044, -0.0290580615401268, 0.0015753358602523804, -0.5395453572273254, 0.4535388648509979, 0.026482773944735527, 0.30717048048973083, 0.09757435321807861, -0.07625316828489304, -0.5409901142120361, -0.12549690902233124, 0.1697748899459839, -0.02789730578660965, -0.0635446161031723, 0.4530559778213501, -0.013377632945775986, 0.04917208105325699, -0.042369503527879715, 0.05730818584561348, 0.2502533197402954, -0.009017329663038254, -0.416373610496521, 0.031147383153438568, -0.4205544590950012, 0.031186304986476898, 0.22321580350399017, 0.20446357131004333, -0.04726880043745041, -0.1027463972568512, 0.015372306108474731, -0.38602501153945923, 0.4715421199798584, -0.8593255281448364, -0.11861515790224075, -0.1393517702817917, 0.3970182538032532, 0.271602600812912, -0.13052907586097717, -0.31175822019577026, 0.15766243636608124, 0.2755715548992157, 0.10298498719930649, -0.3056461215019226, 0.11672408133745193, -0.06693550944328308, -0.004917114973068237, 0.07518801093101501, 0.2954264283180237, 0.12035413086414337, -0.13124144077301025, 0.23984959721565247, -0.07202697545289993 ]