html_url
stringlengths
48
51
title
stringlengths
5
268
comments
stringlengths
70
51.8k
body
stringlengths
0
29.8k
comment_length
int64
16
1.52k
text
stringlengths
164
54.1k
embeddings
sequence
https://github.com/huggingface/datasets/issues/2945
Protect master branch
@lhoestq now the 2 are implemented. Please note that for the the second protection, finally I have chosen to protect the master branch only from **merge commits** (see update comment above), so no need to disable/re-enable the protection on each release (direct commits, different from merge commits, can be pushed to the remote master branch; and eventually reverted without messing up the repo history).
After accidental merge commit (91c55355b634d0dc73350a7ddee1a6776dbbdd69) into `datasets` master branch, all commits present in the feature branch were permanently added to `datasets` master branch history, as e.g.: - 00cc036fea7c7745cfe722360036ed306796a3f2 - 13ae8c98602bbad8197de3b9b425f4c78f582af1 - ... I propose to protect our master branch, so that we avoid we can accidentally make this kind of mistakes in the future: - [x] For Pull Requests using GitHub, allow only squash merging, so that only a single commit per Pull Request is merged into the master branch - Currently, simple merge commits are already disabled - I propose to disable rebase merging as well - ~~Protect the master branch from direct pushes (to avoid accidentally pushing of merge commits)~~ - ~~This protection would reject direct pushes to master branch~~ - ~~If so, for each release (when we need to commit directly to the master branch), we should previously disable the protection and re-enable it again after the release~~ - [x] Protect the master branch only from direct pushing of **merge commits** - GitHub offers the possibility to protect the master branch only from merge commits (which are the ones that introduce all the commits from the feature branch into the master branch). - No need to disable/re-enable this protection on each release This purpose of this Issue is to open a discussion about this problem and to agree in a solution.
64
Protect master branch After accidental merge commit (91c55355b634d0dc73350a7ddee1a6776dbbdd69) into `datasets` master branch, all commits present in the feature branch were permanently added to `datasets` master branch history, as e.g.: - 00cc036fea7c7745cfe722360036ed306796a3f2 - 13ae8c98602bbad8197de3b9b425f4c78f582af1 - ... I propose to protect our master branch, so that we avoid we can accidentally make this kind of mistakes in the future: - [x] For Pull Requests using GitHub, allow only squash merging, so that only a single commit per Pull Request is merged into the master branch - Currently, simple merge commits are already disabled - I propose to disable rebase merging as well - ~~Protect the master branch from direct pushes (to avoid accidentally pushing of merge commits)~~ - ~~This protection would reject direct pushes to master branch~~ - ~~If so, for each release (when we need to commit directly to the master branch), we should previously disable the protection and re-enable it again after the release~~ - [x] Protect the master branch only from direct pushing of **merge commits** - GitHub offers the possibility to protect the master branch only from merge commits (which are the ones that introduce all the commits from the feature branch into the master branch). - No need to disable/re-enable this protection on each release This purpose of this Issue is to open a discussion about this problem and to agree in a solution. @lhoestq now the 2 are implemented. Please note that for the the second protection, finally I have chosen to protect the master branch only from **merge commits** (see update comment above), so no need to disable/re-enable the protection on each release (direct commits, different from merge commits, can be pushed to the remote master branch; and eventually reverted without messing up the repo history).
[ -0.15531975030899048, -0.10023094713687897, -0.07032088935375214, -0.07981614768505096, -0.104254350066185, -0.18798762559890747, 0.01040300726890564, 0.27286356687545776, -0.009848978370428085, -0.08414009213447571, 0.2926146686077118, -0.07787517458200455, -0.13245651125907898, 0.21589021384716034, -0.0562291219830513, 0.17054539918899536, 0.2003229260444641, -0.04079771041870117, -0.0923328846693039, 0.02792298048734665, 0.022608809173107147, -0.06870293617248535, 0.08319979906082153, 0.04363047704100609, -0.1837833970785141, 0.005400864407420158, -0.014811558648943901, 0.15649643540382385, -0.43976572155952454, -0.4695698320865631, 0.14524710178375244, 0.23224006593227386, 0.02510657161474228, 0.5705344676971436, -0.00010436370939714834, -0.0003457963466644287, 0.169486403465271, -0.04060111939907074, -0.14010202884674072, -0.21546302735805511, -0.4901066720485687, -0.44479528069496155, -0.07006335258483887, -0.008354775607585907, 0.12880679965019226, 0.05286795645952225, -0.13250048458576202, 0.02384556084871292, 0.384845495223999, 0.10555251687765121, 0.2386108785867691, -0.10285163670778275, 0.18124066293239594, 0.013769678771495819, 0.3920089304447174, 0.5474529266357422, -0.0666346624493599, 0.30320021510124207, 0.05401802808046341, 0.0006766496226191521, 0.06110614910721779, 0.17410795390605927, -0.08237249404191971, -0.28666993975639343, 0.22701933979988098, -0.1779913604259491, 0.5181735157966614, -0.42435336112976074, -0.24158355593681335, -0.0831172838807106, 0.05237922444939613, -0.17814648151397705, -0.40890365839004517, -0.2419358491897583, -0.14994710683822632, 0.0076336320489645, 0.0677805095911026, 0.24686458706855774, 0.03974023088812828, 0.0036496631801128387, -0.37736496329307556, -0.27180925011634827, -0.004407934844493866, 0.04920414835214615, 0.1419411301612854, -0.16262903809547424, 0.0664263665676117, -0.1270381212234497, 0.2942221164703369, -0.04732781648635864, -0.14698350429534912, -0.36763426661491394, -0.24133381247520447, -0.012587281875312328, -0.10261379182338715, -0.1957472264766693, -0.2462070882320404, -0.3248272240161896, 0.425130695104599, 0.38896799087524414, -0.3832732141017914, 0.013739971444010735, -0.030489303171634674, -0.08101627975702286, 0.20718435943126678, 0.11785800755023956, -0.010489948093891144, 0.05848907679319382, 0.5307134985923767, 0.3144405782222748, 0.005158044397830963, 0.3255855441093445, 0.3015693724155426, 0.0030475580133497715, 0.03444693610072136, 0.574118435382843, 0.4289444088935852, -0.2629207670688629, 0.12764763832092285, 0.19597388803958893, -0.3412008285522461, -0.3845081031322479, 0.07113100588321686, -0.0861722007393837, 0.11032518744468689, 0.027132727205753326, -0.11471141129732132, 0.06680183112621307, 0.0451907142996788, -0.03808599337935448, -0.30790308117866516, -0.14148560166358948, -0.3744000196456909, -0.06853028386831284, 0.1860402673482895, -0.45710426568984985, 0.14916765689849854, 0.4325246512889862, -0.06803794205188751, -0.19928531348705292, 0.0445522740483284, 0.12922535836696625, 0.05558646470308304, 0.2961198389530182, -0.1537979394197464, -0.452628493309021, 0.22359654307365417, 0.13133291900157928, -0.06689941138029099, 0.19400441646575928, -0.15989995002746582, -0.26162219047546387, -0.10497665405273438, 0.29776570200920105, -0.14827203750610352, 0.3071560561656952, -0.523766279220581, 0.03637244179844856, -0.004483453929424286, 0.35067063570022583, 0.4910378158092499, 0.3025485873222351, 0.32807859778404236, -0.16859406232833862, 0.06175749748945236, 0.19034533202648163, 0.32351192831993103, -0.0516866073012352, 0.0623050294816494, -0.28773626685142517, 0.10950460284948349, 0.14507406949996948, -0.31215935945510864, 0.017556771636009216, -0.00523599237203598, -0.13128210604190826, 0.010776735842227936, -0.07140655070543289, -0.11198792606592178, -0.09892956912517548, -0.36668533086776733, 0.06940234452486038, -0.04073741286993027, -0.10077667981386185, 0.2079564779996872, -0.3201748728752136, -0.09479425847530365, 0.20508205890655518, -0.14812283217906952, 0.02089834399521351, -0.2919878363609314, -0.6061382293701172, -0.16365623474121094, -0.06343856453895569, 0.12491492927074432, 0.2275637984275818, 0.3607698976993561, -0.005030942615121603, -0.02836146205663681, -0.17140212655067444, -0.009397830814123154, 0.11250690370798111, 0.3421369194984436, -0.14967812597751617, -0.24154193699359894, 0.13224652409553528, -0.3545883297920227, 0.09114063531160355, -0.07851311564445496, -0.009775333106517792, 0.03444886952638626, -0.3157886862754822, 0.3412793278694153, -0.0440533384680748, -0.12080161273479462, -0.11415097117424011, 0.24151715636253357, 0.0959513783454895, -0.17473319172859192, -0.20392119884490967, -0.2074061930179596, 0.26019150018692017, -0.2408308982849121, 0.3018658459186554, 0.1300133764743805, 0.10263761878013611, -0.14118100702762604, -0.036453600972890854, -0.025096537545323372, 0.36193642020225525, 0.23630475997924805, -0.08991732448339462, -0.05915883928537369, 0.16876070201396942, -0.04906287416815758, 0.20357096195220947, 0.22469490766525269, 0.42524170875549316, 0.37361544370651245, -0.10268162190914154, 0.0626007467508316, -0.09179316461086273, -0.07872460037469864, 0.02459406852722168, -0.3291269838809967, 0.32803720235824585, 0.07369399070739746, -0.1394648551940918, -0.17403195798397064, -0.10333307087421417, -0.17407432198524475, -0.22026950120925903, -0.17077213525772095, -0.012950584292411804, -0.16909818351268768, 0.1943647712469101, -0.336591511964798, 0.22236944735050201, -0.2772085666656494, 0.14857842028141022, 0.01505228504538536, -0.2516065239906311, -0.10240078717470169, 0.06829813867807388, -0.0059668272733688354, -0.13271473348140717, 0.12417054921388626, 0.3773832321166992, 0.12787435948848724, 0.17009972035884857, 0.004273947328329086, 0.020151596516370773, 0.25728312134742737, -0.11643563210964203, 0.35332560539245605, 0.14430686831474304, -0.10544468462467194, 0.05406457930803299, 0.3364555835723877, 0.1812187135219574, 0.06433234363794327, 0.3469198942184448, -0.003324562683701515, 0.03525850921869278, -0.20840699970722198, -0.04598452150821686, -0.26021039485931396, -0.5283412933349609, 0.21923714876174927, -0.11063773185014725, -0.3552158772945404, -0.008503539487719536, -0.045366354286670685, 0.04741793870925903, -0.524871826171875, 0.13602985441684723, 0.18358109891414642, 0.2905265688896179, -0.31780317425727844, -0.11997737735509872, 0.12631559371948242, -0.022595219314098358, 0.012344226241111755, 0.1285599321126938, 0.3631601631641388, -0.22668015956878662, 0.45945149660110474, 0.2389804869890213, -0.16955673694610596, -0.4726405143737793, -0.34341275691986084, 0.019129972904920578, -0.20393547415733337, -0.11797492206096649, 0.009818919003009796, -0.09893058240413666, 0.09215272963047028, -0.35854071378707886, -0.32571226358413696, -0.018773561343550682, -0.37300437688827515, -0.16009604930877686, 0.06959538161754608, 0.06288556009531021, -0.23461700975894928, -0.114040307700634, -0.3865901827812195, -0.2821526527404785, 0.4793556332588196, -0.016433335840702057, 0.1156594306230545, -0.043173544108867645, -0.29237738251686096, -0.04591793194413185, 0.08748229593038559, 0.13663941621780396, -0.000044732820242643356, -0.36093276739120483, 0.03256664425134659, -0.040660008788108826, -0.029347021132707596, 0.352609783411026, 0.185491144657135, -0.43024036288261414, 0.07125099003314972, -0.3217610716819763, -0.15581855177879333, -0.05208447575569153, 0.48644453287124634, 0.31411951780319214, -0.09737364947795868, 0.07108013331890106, 0.10355065762996674, -0.19190005958080292, 0.055089302361011505, -0.18161140382289886, 0.1472240537405014, 0.3454881012439728, 0.2857186794281006, 0.03790006786584854, 0.14586713910102844, 0.025497179478406906, 0.7140874862670898, 0.37785014510154724, -0.05965739116072655, 0.21033772826194763, 0.3106972575187683, -0.027718398720026016, 0.003990799188613892, -0.2601567208766937, 0.06504680961370468, -0.10124298930168152, -0.000020891427993774414, 0.08670371025800705, -0.12957841157913208, -0.12296503037214279, -0.011211153119802475, -0.47771474719047546, 0.00915539264678955, -0.4146764278411865, -0.23966337740421295, -0.3181837499141693, 0.1842499077320099, -0.022526197135448456, -0.4854891896247864, 0.1313808411359787, 0.053771283477544785, 0.23057617247104645, 0.21597151458263397, 0.21420590579509735, 0.18121570348739624, -0.02025902271270752, -0.0510849729180336, -0.12007338553667068, -0.06772583723068237, -0.0043314117938280106, 0.14525093138217926, 0.09058025479316711, -0.1670401692390442, 0.03180579096078873, 0.06955048441886902, 0.3299906849861145, -0.014868119731545448, 0.14029152691364288, -0.1708069145679474, -0.5094844102859497, 0.6086313724517822, -0.31859374046325684, 0.13940243422985077, 0.29909852147102356, 0.511225700378418, 0.4397636353969574, -0.295454204082489, -0.19531667232513428, 0.2071230709552765, 0.03255590423941612, 0.1978360414505005, 0.17734965682029724, 0.14497703313827515, 0.2783072888851166, -0.49038165807724, 0.28877443075180054, 0.1548328995704651, -0.2504824697971344, -0.15517577528953552, -0.003905750811100006, -0.027050653472542763, 0.12646320462226868, -0.026304736733436584, -0.24539846181869507, 0.009127533063292503, -0.10943800210952759, 0.1734457015991211, 0.13292016088962555, 0.0698280856013298, 0.41521936655044556, 0.594658613204956, 0.13493412733078003, -0.38919797539711, -0.04820176959037781, -0.175073504447937, -0.07428347319364548, 0.3271433413028717, 0.19835063815116882, 0.24822810292243958, 0.020348815247416496, 0.177686870098114, -0.12347238510847092, -0.2662383019924164, -0.20336651802062988, -0.038491103798151016, -0.07674254477024078, 0.007589764893054962, 0.0873296707868576, -0.04589767009019852, -0.0909920260310173, 0.013048216700553894, 0.1399984359741211, -0.366100013256073, 0.16378472745418549, 0.6180501580238342, 0.9825448989868164, 0.3975675106048584, 0.08903336524963379, -0.25465720891952515, -0.3273831009864807, 0.32599058747291565, -0.340107798576355, -0.16645145416259766, -0.24701717495918274, -0.12358804047107697, -0.18424606323242188, -0.3403114974498749, -0.03869441896677017, -0.48984766006469727, -0.35285624861717224, 0.13511325418949127, -0.21805503964424133, 0.5279181599617004, 0.008177720010280609, 0.12338632345199585, 0.19101889431476593, -0.12231411039829254, 0.25515127182006836, 0.1982704997062683, 0.06181075796484947, 0.10409577190876007, -0.00402781181037426, -0.4687901735305786, -0.002232056111097336, 0.020538557320833206, -0.377269446849823, 0.08914704620838165, -0.34377798438072205, 0.03884657472372055, -0.20635315775871277, -0.31605178117752075, 0.11582718789577484, -0.08704768121242523, 0.6059408187866211, 0.16663071513175964, -0.07945175468921661, -0.044620681554079056, 0.29138895869255066, 0.4645244777202606, -0.2288517951965332, -0.21953073143959045, 0.5223724246025085, -0.21336409449577332, -0.1302180290222168, -0.20476195216178894, -0.08033479750156403, -0.23709243535995483, -0.26094669103622437, -0.1280432492494583, -0.3282320499420166, 0.07950221747159958, 0.04171382263302803, 0.2636536955833435, -0.09107047319412231, -0.16760630905628204, 0.18599317967891693, 0.1154860109090805, -0.10757318884134293, -0.11858441680669785, -0.16952016949653625, -0.2610401511192322, -0.0678161233663559, 0.2016008496284485, 0.1616058051586151, -0.12060702592134476, -0.07676410675048828, 0.09965769946575165, -0.24433693289756775, -0.22078973054885864, -0.2072920799255371, 0.10598742216825485, -0.13946887850761414, 0.09298096597194672, -0.5486779808998108, -0.32993391156196594, 0.051746368408203125, 0.24619311094284058, 0.27941563725471497, 0.3304987847805023, 0.11800003051757812, -0.09977070987224579, -0.2244497388601303, 0.2186433970928192, -0.32792574167251587, 0.16864940524101257, 0.0235847607254982, 0.15881147980690002, -0.026009775698184967, 0.040430840104818344, -0.3905956447124481, 0.16031549870967865, -0.1254814714193344, -0.02112668752670288, -0.2255210429430008, -0.10175298899412155, -0.0006310837343335152, -0.30818644165992737, 0.03248739242553711, 0.023433592170476913, -0.19575649499893188, -0.28301528096199036, 0.09266887605190277, 0.06569582223892212, 0.06478913128376007, -0.05701387673616409, -0.05746075510978699, -0.10815784335136414, 0.08275303989648819, 0.2720326781272888, 0.23969241976737976, -0.15849140286445618, 0.10971303284168243, -0.0322246216237545, 0.17108863592147827, 0.11058498173952103, -0.02477351762354374, 0.08924205601215363, 0.014632649719715118, -0.2658020853996277, -0.035375308245420456, 0.2671601176261902, -0.18174590170383453, -0.21714402735233307, -0.2685391306877136, 0.1888347566127777, 0.1056341901421547, 0.5840901732444763, 0.2028803825378418, 0.14421670138835907, -0.40508270263671875, 0.17540867626667023, -0.053198251873254776, -0.0036357268691062927, -0.16923534870147705, -0.0969405248761177, -0.08496207743883133, 0.27936026453971863, -0.08671969920396805, -0.3035971224308014, 0.2713831961154938, 0.18818144500255585, 0.0007483474910259247, 0.10497083514928818, 0.528075098991394, 0.12962056696414948, -0.18965323269367218, 0.4221358895301819, 0.2712429463863373, -0.08767566829919815, 0.49489980936050415, 0.47023293375968933, -0.11318211257457733, -0.02032490447163582, -0.08273614197969437, 0.11661489307880402, 0.2306870073080063, -0.25409644842147827, 0.12847208976745605, 0.29621919989585876, 0.6462965607643127, -0.16888390481472015, 0.3935551941394806, -0.03309616073966026, 0.34373971819877625, 0.19799339771270752, 0.058740079402923584, -0.24604946374893188, 0.39270907640457153, 0.2117074728012085, 0.330151230096817, -0.6189894080162048, 0.13637332618236542, 0.49140363931655884, 0.04928272217512131, 0.19958184659481049, -0.4001062512397766, -0.04923272505402565, -0.05847582221031189, -0.0483139306306839, -0.07818284630775452, 0.1634962260723114, 0.12373705208301544, 0.28296682238578796, 0.006584443151950836, -0.08837804943323135, -0.04344063997268677, 0.18504858016967773, 0.2415619194507599, -0.11699788272380829, -0.18117256462574005, 0.35775548219680786, -0.2761981785297394, 0.0664932131767273, 0.2154608517885208, 0.1350686252117157, -0.0747159793972969, -0.06863388419151306, 0.18023492395877838, 0.45039471983909607, -0.16993381083011627, 0.02251214161515236, 0.05574929714202881, -0.16256774961948395, 0.15771660208702087, 0.08014677464962006, 0.2580326497554779, -0.053340841084718704, 0.11280304193496704, 0.03542676568031311, -0.41529735922813416, -0.02532232366502285, 0.4330810606479645, 0.5564640760421753, -0.33773133158683777, 0.46013858914375305, 0.11926848441362381, 0.28470075130462646, -0.032683830708265305, 0.4374355673789978, -0.047126404941082, 0.11639227718114853, -0.005153832025825977, 0.1430787295103073, 0.028089283034205437, 0.2575884461402893, 0.1414998173713684, -0.03334501385688782, -0.15928909182548523, 0.03010638803243637, -0.12154112756252289, 0.12743553519248962, 0.2968399226665497, 0.17307059466838837, 0.419888973236084, -0.2947142422199249, 0.12756827473640442, 0.1282345950603485, -0.08756890892982483, -0.3413960635662079, 0.009522133506834507, 0.09408511221408844, -0.3605291247367859, 0.004247438162565231, 0.22248142957687378, -0.0694396123290062, -0.02419467642903328, 0.11893334239721298, 0.409478098154068, 0.19279026985168457, 0.1120925024151802, 0.10513070225715637, -0.049347855150699615, 0.32094356417655945, -0.39184531569480896, 0.22496101260185242, 0.18922272324562073, -0.10292953252792358, -0.221888929605484, -0.051098473370075226, 0.00736699253320694, 0.021280620247125626, -0.4355085492134094, -0.14018112421035767, -0.1622259020805359, 0.42098376154899597, -0.13559670746326447, 0.06829800456762314, -0.3722181022167206, 0.06876710057258606, -0.037134602665901184, 0.2683558464050293, -0.3000990152359009, 0.08640830963850021, 0.052547894418239594, 0.017337849363684654, 0.08837077021598816, 0.13057975471019745, 0.06843435764312744, 0.2528505325317383, -0.35231637954711914, -0.12488970905542374, 0.3586624264717102, -0.01946943625807762, 0.09103637933731079, -0.21726980805397034, 0.41820472478866577, 0.4654460847377777, -0.14808106422424316, -0.3321141302585602, -0.2635180950164795, -0.01115646492689848, -0.2798342704772949, -0.5420887470245361, 0.2986377775669098, 0.13786809146404266, 0.19743876159191132, -0.10587093234062195, 0.03660712391138077, -0.0743267834186554, -0.15276281535625458, 0.06117141619324684, -0.19878648221492767 ]
https://github.com/huggingface/datasets/issues/2943
Backwards compatibility broken for cached datasets that use `.filter()`
Hi ! I guess the caching mechanism should have considered the new `filter` to be different from the old one, and don't use cached results from the old `filter`. To avoid other users from having this issue we could make the caching differentiate the two, what do you think ?
## Describe the bug After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with `ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}` Related feature: https://github.com/huggingface/datasets/pull/2836 :question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :) ## Workaround Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`. ## Steps to reproduce the bug 1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists. 2. `pip install datasets==1.11.0` and run the following snippet: ```python from datasets import load_dataset ids = ["1272-141231-0000"] ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.filter(lambda x: x["id"] in ids) ``` 3. `pip install datasets==1.12.1` and re-run the code again ## Expected results Same result as with the previous `datasets` version. ## Actual results ```bash Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1) Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow Traceback (most recent call last): File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module> ds = ds.filter(lambda x: x["id"] in ids) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter indices = self.map( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map return self._map_single( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single return Dataset.from_file(cache_file_name, info=info, split=self.split) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file return cls( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__ self.info.features = self.info.features.reorder_fields_as(inferred_features) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as return Features(recursive_reorder(self, other)) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position) ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)} Process finished with exit code 1 ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 5.0.0
50
Backwards compatibility broken for cached datasets that use `.filter()` ## Describe the bug After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with `ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}` Related feature: https://github.com/huggingface/datasets/pull/2836 :question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :) ## Workaround Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`. ## Steps to reproduce the bug 1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists. 2. `pip install datasets==1.11.0` and run the following snippet: ```python from datasets import load_dataset ids = ["1272-141231-0000"] ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.filter(lambda x: x["id"] in ids) ``` 3. `pip install datasets==1.12.1` and re-run the code again ## Expected results Same result as with the previous `datasets` version. ## Actual results ```bash Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1) Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow Traceback (most recent call last): File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module> ds = ds.filter(lambda x: x["id"] in ids) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter indices = self.map( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map return self._map_single( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single return Dataset.from_file(cache_file_name, info=info, split=self.split) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file return cls( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__ self.info.features = self.info.features.reorder_fields_as(inferred_features) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as return Features(recursive_reorder(self, other)) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position) ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)} Process finished with exit code 1 ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 5.0.0 Hi ! I guess the caching mechanism should have considered the new `filter` to be different from the old one, and don't use cached results from the old `filter`. To avoid other users from having this issue we could make the caching differentiate the two, what do you think ?
[ -0.30499589443206787, 0.12438860535621643, -0.04655841737985611, 0.23689737915992737, 0.15172843635082245, -0.0666598454117775, -0.0069412775337696075, 0.32853978872299194, 0.17373839020729065, 0.02938103675842285, -0.2313872128725052, 0.3581932783126831, -0.15033014118671417, 0.25273653864860535, -0.29778623580932617, -0.13781173527240753, 0.0444694459438324, 0.03212467581033707, -0.06149601936340332, 0.16641293466091156, -0.12391772121191025, 0.4988587498664856, -0.19577628374099731, 0.007079474627971649, 0.22216473519802094, 0.05132158100605011, 0.10912355780601501, 0.1385663002729416, 0.07986205071210861, -0.3392689526081085, 0.5981169939041138, 0.10640649497509003, -0.03486925736069679, 0.49809545278549194, -0.00012130981485825032, 0.09986761212348938, 0.4398064613342285, -0.10739780217409134, -0.45794877409935, -0.36868858337402344, -0.19285297393798828, 0.131994366645813, 0.213113471865654, 0.08116324990987778, -0.07151231169700623, 0.11434200406074524, -0.30349382758140564, -0.3460473120212555, 0.24887673556804657, 0.1989334374666214, 0.22672885656356812, 0.21361520886421204, 0.265742689371109, 0.06658700853586197, 0.17017972469329834, 0.08265241235494614, 0.025971753522753716, -0.0490865595638752, 0.29402822256088257, 0.014262193813920021, 0.043685317039489746, 0.4806101620197296, -0.32835254073143005, -0.21464639902114868, 0.3046182096004486, -0.2982528507709503, 0.10307049006223679, -0.39570382237434387, 0.2999306917190552, 0.07813695073127747, 0.14626362919807434, -0.25551873445510864, -0.5773359537124634, -0.34832534193992615, -0.5121467709541321, -0.28682899475097656, 0.4164738655090332, -0.21635796129703522, -0.20099635422229767, 0.22008347511291504, -0.33426421880722046, -0.027003563940525055, 0.09349846839904785, 0.05351008102297783, -0.058481309562921524, 0.29418468475341797, -0.13183197379112244, -0.0048623159527778625, 0.014983128756284714, -0.13290096819400787, 0.19240790605545044, -0.2750045657157898, -0.19687530398368835, 0.17258015275001526, -0.015560168772935867, -0.05461357161402702, 0.09542211145162582, 0.332328200340271, 0.14057108759880066, 0.03562841936945915, 0.019208921119570732, 0.08454029262065887, -0.040963515639305115, 0.05367744341492653, 0.13732722401618958, 0.4753788411617279, 0.4901203513145447, 0.24679051339626312, 0.2727872431278229, 0.2854887843132019, -0.007885545492172241, -0.0013801641762256622, 0.5281851291656494, -0.16664184629917145, 0.07470692694187164, 0.1517305076122284, 0.19669552147388458, -0.40486907958984375, -0.36021289229393005, 0.1689625382423401, -0.07699987292289734, -0.1250399798154831, 0.22072617709636688, 0.05349492281675339, 0.10056478530168533, 0.21423357725143433, 0.13208158314228058, 0.03385720029473305, -0.19647246599197388, 0.06123437359929085, -0.17251001298427582, -0.17394547164440155, 0.0011620037257671356, -0.1112990751862526, -0.0473051592707634, -0.8997764587402344, 0.17477014660835266, 0.04826036095619202, 0.006349015980958939, 0.10580876469612122, -0.06977400183677673, 0.20743507146835327, 0.17301523685455322, 0.522928774356842, -0.22135867178440094, 0.08390036225318909, 0.16719089448451996, -0.5483273267745972, -0.13868708908557892, 0.012528106570243835, -0.24153757095336914, -0.11120623350143433, 0.2085866630077362, 0.17358626425266266, -0.32967180013656616, 0.012651439756155014, -0.17029926180839539, 0.45154204964637756, 0.2592141032218933, -0.5466864705085754, -0.07795769721269608, -0.21337991952896118, -0.4382350444793701, -0.19971425831317902, 0.09719057381153107, 0.41313689947128296, -0.5942533016204834, -0.32166755199432373, 0.02168734185397625, 0.03190663829445839, 0.03991724178195, -0.1229340136051178, -0.0634385347366333, -0.24447286128997803, -0.10776916146278381, -0.1384173482656479, 0.3606545925140381, -0.3195544481277466, -0.7338929772377014, 0.15372587740421295, 0.23602114617824554, 0.5342658758163452, -0.07095835357904434, -0.13748373091220856, 0.28139427304267883, -0.2578292191028595, 0.14599117636680603, 0.08484457433223724, -0.16490314900875092, -0.007993858307600021, -0.3409697413444519, -0.2346952259540558, 0.22386938333511353, -0.15029074251651764, 0.09041670709848404, 0.33485856652259827, 0.07900666445493698, -0.2542209327220917, 0.050292447209358215, 0.03505011275410652, 0.1049240231513977, 0.19909262657165527, 0.24532361328601837, 0.22376537322998047, 0.28630587458610535, -0.43651869893074036, -0.28014084696769714, 0.2506178319454193, 0.214129239320755, -0.06000049412250519, -0.15240754187107086, -0.19822725653648376, -0.2678273320198059, -0.08841829746961594, -0.15897807478904724, -0.30440953373908997, 0.07887379825115204, 0.02257702499628067, 0.3843640685081482, -0.038502734154462814, -0.11452515423297882, 0.6218647360801697, 0.30845361948013306, 0.09448058158159256, -0.5049416422843933, 0.22964130342006683, -0.05485289543867111, 0.00516843656077981, -0.05918468162417412, 0.037782128900289536, 0.29395923018455505, -0.06852554529905319, -0.2895762026309967, 0.4078751504421234, 0.03925902768969536, 0.08416818827390671, -0.027634337544441223, 0.19374600052833557, 0.1773466020822525, 0.21058306097984314, 0.06393347680568695, 0.27418211102485657, -0.01488402672111988, 0.2087216079235077, -0.19545626640319824, 0.5572488903999329, 0.029374804347753525, 0.3240499794483185, 0.12083446979522705, 0.148756206035614, 0.3702499270439148, 0.13056349754333496, -0.2189950942993164, -0.1370789110660553, 0.3204496204853058, -0.4587228000164032, 0.0626671314239502, 0.012339839711785316, -0.1297929883003235, 0.3776250183582306, 0.07168322056531906, 0.07551193237304688, -0.03345181792974472, 0.31192174553871155, -0.159365713596344, -0.042190395295619965, 0.1813623309135437, 0.4024861454963684, 0.40145087242126465, 0.2088317722082138, 0.05071691796183586, 0.07588188350200653, -0.16153964400291443, -0.024877138435840607, 0.20824959874153137, 0.12934613227844238, -0.16963990032672882, 0.153575599193573, 0.30342090129852295, 0.27320393919944763, -0.306198388338089, 0.09339344501495361, -0.23562407493591309, 0.11953283846378326, -0.2705809772014618, 0.36163705587387085, -0.2810101807117462, -0.22808605432510376, 0.07614190876483917, -0.16783268749713898, -0.26151368021965027, -0.3875217139720917, 0.08989894390106201, 0.39343997836112976, -0.08621860295534134, 0.2567754089832306, 0.01471695676445961, 0.24453997611999512, 0.13616758584976196, -0.19968156516551971, -0.40057170391082764, -0.20788155496120453, -0.3476487100124359, 0.00539754331111908, 0.20513279736042023, -0.15684905648231506, 0.29703599214553833, -0.07631023973226547, -0.20662462711334229, -0.3902946710586548, -0.9079107642173767, -0.04862856864929199, -0.12396524846553802, 0.6180300116539001, 0.3176230192184448, -0.09162616729736328, -0.1352725625038147, -0.23275721073150635, 0.1665801703929901, -0.041315481066703796, -0.4310832917690277, 0.15683919191360474, 0.06662295013666153, 0.1682216078042984, -0.20038539171218872, -0.2270289659500122, -0.11354095488786697, -0.14581939578056335, 0.007939975708723068, -0.12768948078155518, 0.08496592938899994, 0.30940425395965576, 0.11235392838716507, -0.3165164291858673, -0.08720140904188156, 0.13308614492416382, -0.3335404694080353, -0.07733772695064545, 0.07394217699766159, -0.05416269600391388, -0.2302437275648117, -0.03413986414670944, -0.03198046609759331, 0.0831894725561142, 0.37366241216659546, -0.40695953369140625, -0.37917667627334595, -0.2713732123374939, -0.00487377867102623, 0.23117747902870178, 0.0683605819940567, 0.2319665253162384, 0.1899951547384262, 0.039103589951992035, -0.27946871519088745, -0.4342850148677826, -0.08862071484327316, -0.23659583926200867, 0.10954910516738892, 0.1482250988483429, 0.6309944987297058, 0.034562986344099045, 0.47642630338668823, 0.2947264313697815, 0.04896113649010658, 0.13982713222503662, 0.18155482411384583, 0.4972684979438782, -0.32584714889526367, -0.4095647633075714, -0.04670892283320427, -0.046194568276405334, 0.050513237714767456, -0.1531909853219986, 0.17958202958106995, -0.11206088215112686, -0.3487887978553772, 0.00008856877684593201, -0.2515634298324585, -0.24981102347373962, -0.23862777650356293, -0.013643786311149597, 0.26900485157966614, 0.3906218409538269, 0.14076998829841614, -0.3225950002670288, -0.17638498544692993, -0.008136813528835773, 0.4007485508918762, 0.10357676446437836, 0.25022032856941223, -0.18154177069664001, -0.04714185744524002, -0.4509265422821045, 0.49255937337875366, 0.21514518558979034, 0.264892041683197, -0.11775384843349457, -0.1629658341407776, -0.32944756746292114, -0.04924078658223152, 0.592811644077301, -0.363176167011261, 0.04434875398874283, 0.10195447504520416, -0.20818309485912323, -0.382881760597229, 0.05112947151064873, 0.007662627846002579, 0.3649105131626129, 0.05435469001531601, 0.3508074879646301, -0.08211499452590942, -0.073015496134758, -0.08691577613353729, 0.2223743498325348, -0.12459439039230347, 0.019601501524448395, -0.27436235547065735, -0.2049432396888733, -0.1433095633983612, 0.0314197763800621, -0.1528894156217575, 0.16506798565387726, -0.1800081580877304, -0.06853723526000977, -0.11314351856708527, -0.0563928484916687, 0.11538052558898926, 0.13470332324504852, 0.29450294375419617, -0.10000676661729813, 0.11873957514762878, 0.14418062567710876, 0.24052928388118744, 0.04237004369497299, 0.4583910405635834, -0.27559831738471985, -0.27809619903564453, -0.0670713558793068, 0.1208035945892334, -0.11464083939790726, 0.3437366485595703, -0.20401640236377716, -0.017340369522571564, -0.044456906616687775, -0.10204271972179413, -0.02124001830816269, -0.14110244810581207, -0.0019387109205126762, 0.37030303478240967, -0.20492413640022278, -0.28893688321113586, 0.23296445608139038, 0.23905159533023834, -0.20434916019439697, 0.4367760717868805, 0.34225577116012573, -0.28093525767326355, 0.16878968477249146, -0.19995886087417603, 0.7136853337287903, 0.1521686166524887, -0.02985379472374916, 0.08779972791671753, -0.16951783001422882, 0.45245498418807983, 0.31254637241363525, 0.1559777408838272, -0.06676805764436722, -0.2370488941669464, -0.0655059814453125, -0.03474707901477814, 0.15802299976348877, -0.11106160283088684, -0.2036348283290863, 0.5631487369537354, -0.05921915918588638, -0.03538796678185463, 0.1755862534046173, -0.11732907593250275, -0.20230765640735626, 0.019088424742221832, -0.4372626543045044, 0.09912529587745667, -0.021323680877685547, 0.25216639041900635, 0.0010582944378256798, -0.07672212272882462, 0.055220913141965866, -0.3087660074234009, -0.2637815475463867, -0.05239212512969971, -0.39920690655708313, -0.06592722982168198, 0.20812346041202545, -0.43327969312667847, 0.008973371237516403, 0.05262744799256325, 0.2566775679588318, -0.008180331438779831, -0.037300750613212585, -0.0075370147824287415, 0.07026883214712143, 0.49777132272720337, 0.23459263145923615, 0.025033168494701385, 0.28633007407188416, 0.08909415453672409, 0.186784029006958, 0.019597593694925308, -0.14201122522354126, -0.36083900928497314, -0.018652871251106262, 0.0038100332021713257, 0.11803290247917175, -0.15886607766151428, 0.028823044151067734, -0.2428554892539978, 0.021306436508893967, -0.3648621141910553, 0.0650937557220459, -0.0898350328207016, -0.00983914639800787, 0.09432125836610794, -0.016562480479478836, -0.22681789100170135, -0.005353085696697235, 0.6357892155647278, -0.14381468296051025, -0.4367527663707733, 0.12772074341773987, -0.00556609034538269, -0.22358423471450806, 0.035358674824237823, -0.20444118976593018, 0.027419164776802063, -0.2750847637653351, 0.2978781461715698, -0.25112488865852356, -0.10712830722332001, 0.26912951469421387, 0.32279300689697266, 0.18860851228237152, 0.214613139629364, -0.15166646242141724, -0.3945677876472473, -0.13708268105983734, 0.285457581281662, 0.04427365958690643, 0.05498090013861656, -0.031148791313171387, -0.32367050647735596, -0.14442208409309387, -0.20666389167308807, -0.22578871250152588, 0.008752115070819855, 0.33131393790245056, 0.07120858132839203, 0.19048745930194855, 0.22056341171264648, 0.1548963338136673, -0.19956424832344055, -0.013411498628556728, 0.07258662581443787, -0.20382021367549896, -0.10209281742572784, -0.09334567189216614, 0.09354174882173538, -0.09116014093160629, -0.2648991346359253, -0.15461929142475128, -0.0057536158710718155, 0.061403289437294006, -0.16469275951385498, 0.41826775670051575, 0.32141587138175964, -0.11824969947338104, -0.0536908321082592, -0.0327778123319149, 0.04722478240728378, 0.3035393953323364, 0.1383112072944641, 0.01856522262096405, 0.032671451568603516, 0.04270423948764801, 0.19944806396961212, -0.1875811666250229, 0.014096155762672424, 0.0820164754986763, 0.042396180331707, -0.2510473132133484, 0.027089882642030716, 0.3569346070289612, -0.2952960729598999, -0.02164008840918541, 0.5987738966941833, 0.35626745223999023, 0.24375972151756287, -0.13980628550052643, 0.11382973194122314, -0.07773864269256592, 0.15335774421691895, -0.27390503883361816, -0.33267828822135925, 0.20577828586101532, 0.2732258141040802, 0.06095707789063454, 0.18608182668685913, -0.0021066665649414062, 0.029159627854824066, 0.6171150803565979, 0.2176479995250702, 0.4478175938129425, -0.1253162920475006, 0.3508078157901764, 0.5271660089492798, 0.23262836039066315, 0.18437623977661133, 0.24172061681747437, 0.07372477650642395, 0.016092881560325623, 0.5080393552780151, -0.06601006537675858, 0.2586887776851654, 0.21974709630012512, 0.12877090275287628, -0.03551819920539856, -0.4662739038467407, -0.16567467153072357, 0.028322510421276093, -0.07974916696548462, 0.2506764531135559, 0.16615724563598633, 0.08566081523895264, -0.22328396141529083, -0.3345978558063507, 0.011488063260912895, 0.024898622184991837, -0.19362616539001465, -0.21611030399799347, 0.14463897049427032, -0.36391741037368774, -0.057149190455675125, 0.013486314564943314, -0.12084436416625977, 0.07040049880743027, 0.4529310464859009, -0.24694864451885223, -0.12836304306983948, -0.4731905162334442, -0.3793768286705017, 0.05004565790295601, 0.17476409673690796, -0.014010284096002579, 0.4047639071941376, 0.258781373500824, -0.22985482215881348, 0.22198832035064697, 0.25034376978874207, 0.48565059900283813, 0.2468242347240448, 0.027692187577486038, 0.01334693655371666, -0.14204943180084229, -0.05400650203227997, -0.09072275459766388, 0.33564189076423645, -0.08708329498767853, 0.030568327754735947, 0.1879347413778305, 0.11341014504432678, 0.000733465887606144, 0.2053901106119156, -0.040854621678590775, 0.39893990755081177, -0.4661810100078583, 0.08953436464071274, -0.23695385456085205, 0.28487932682037354, 0.015014959499239922, 0.10001436620950699, -0.24902543425559998, -0.11811482906341553, 0.17121459543704987, 0.23181088268756866, 0.2039029598236084, -0.10648466646671295, 0.07481089979410172, 0.1348544955253601, 0.07390917837619781, 0.4687880873680115, -0.09301317483186722, -0.0892462283372879, -0.14648915827274323, -0.653510332107544, -0.05586252361536026, 0.1423015147447586, 0.12806753814220428, -0.06351551413536072, 0.03753000497817993, 0.04901442304253578, 0.18468567728996277, 0.04347316920757294, -0.1836017370223999, 0.1054590716958046, -0.25151437520980835, -0.20000138878822327, -0.1759463995695114, 0.2301202267408371, -0.24214795231819153, 0.05484858900308609, -0.26591041684150696, 0.06277246028184891, -0.04169316962361336, 0.026953235268592834, -0.0059282053261995316, -0.06288377940654755, 0.06751438975334167, 0.3473338782787323, -0.13707388937473297, 0.34939005970954895, 0.2663174867630005, 0.03349287807941437, -0.0034478772431612015, -0.278297483921051, -0.19313564896583557, -0.2683139741420746, 0.07008456438779831, -0.29212450981140137, 0.49186089634895325, -0.40185970067977905, -0.30196312069892883, -0.18042156100273132, 0.27247440814971924, 0.1233787089586258, -0.12682853639125824, -0.47677913308143616, 0.16585826873779297, -0.05875708907842636, 0.08381269127130508, 0.00443768035620451, 0.5087336301803589, 0.05998682230710983, 0.3379512429237366, -0.22663088142871857, -0.3412230908870697, 0.53581702709198, -0.4137616455554962, -0.2617650628089905, -0.13192811608314514, -0.06397368013858795, 0.6073148846626282, -0.4836443364620209, -0.30437353253364563, -0.20376679301261902, 0.27199095487594604, -0.12000533193349838, -0.14902496337890625, 0.15557251870632172, -0.26529785990715027, 0.1745559126138687, -0.18920165300369263, -0.08706063032150269, 0.43938252329826355, -0.08826790004968643, 0.2773542106151581, -0.12994170188903809 ]
https://github.com/huggingface/datasets/issues/2943
Backwards compatibility broken for cached datasets that use `.filter()`
If it's easy enough to implement, then yes please 😄 But this issue can be low-priority, since I've only encountered it in a couple of `transformers` CI tests.
## Describe the bug After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with `ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}` Related feature: https://github.com/huggingface/datasets/pull/2836 :question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :) ## Workaround Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`. ## Steps to reproduce the bug 1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists. 2. `pip install datasets==1.11.0` and run the following snippet: ```python from datasets import load_dataset ids = ["1272-141231-0000"] ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.filter(lambda x: x["id"] in ids) ``` 3. `pip install datasets==1.12.1` and re-run the code again ## Expected results Same result as with the previous `datasets` version. ## Actual results ```bash Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1) Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow Traceback (most recent call last): File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module> ds = ds.filter(lambda x: x["id"] in ids) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter indices = self.map( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map return self._map_single( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single return Dataset.from_file(cache_file_name, info=info, split=self.split) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file return cls( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__ self.info.features = self.info.features.reorder_fields_as(inferred_features) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as return Features(recursive_reorder(self, other)) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position) ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)} Process finished with exit code 1 ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 5.0.0
28
Backwards compatibility broken for cached datasets that use `.filter()` ## Describe the bug After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with `ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}` Related feature: https://github.com/huggingface/datasets/pull/2836 :question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :) ## Workaround Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`. ## Steps to reproduce the bug 1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists. 2. `pip install datasets==1.11.0` and run the following snippet: ```python from datasets import load_dataset ids = ["1272-141231-0000"] ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.filter(lambda x: x["id"] in ids) ``` 3. `pip install datasets==1.12.1` and re-run the code again ## Expected results Same result as with the previous `datasets` version. ## Actual results ```bash Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1) Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow Traceback (most recent call last): File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module> ds = ds.filter(lambda x: x["id"] in ids) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter indices = self.map( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map return self._map_single( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single return Dataset.from_file(cache_file_name, info=info, split=self.split) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file return cls( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__ self.info.features = self.info.features.reorder_fields_as(inferred_features) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as return Features(recursive_reorder(self, other)) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position) ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)} Process finished with exit code 1 ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 5.0.0 If it's easy enough to implement, then yes please 😄 But this issue can be low-priority, since I've only encountered it in a couple of `transformers` CI tests.
[ -0.30499589443206787, 0.12438860535621643, -0.04655841737985611, 0.23689737915992737, 0.15172843635082245, -0.0666598454117775, -0.0069412775337696075, 0.32853978872299194, 0.17373839020729065, 0.02938103675842285, -0.2313872128725052, 0.3581932783126831, -0.15033014118671417, 0.25273653864860535, -0.29778623580932617, -0.13781173527240753, 0.0444694459438324, 0.03212467581033707, -0.06149601936340332, 0.16641293466091156, -0.12391772121191025, 0.4988587498664856, -0.19577628374099731, 0.007079474627971649, 0.22216473519802094, 0.05132158100605011, 0.10912355780601501, 0.1385663002729416, 0.07986205071210861, -0.3392689526081085, 0.5981169939041138, 0.10640649497509003, -0.03486925736069679, 0.49809545278549194, -0.00012130981485825032, 0.09986761212348938, 0.4398064613342285, -0.10739780217409134, -0.45794877409935, -0.36868858337402344, -0.19285297393798828, 0.131994366645813, 0.213113471865654, 0.08116324990987778, -0.07151231169700623, 0.11434200406074524, -0.30349382758140564, -0.3460473120212555, 0.24887673556804657, 0.1989334374666214, 0.22672885656356812, 0.21361520886421204, 0.265742689371109, 0.06658700853586197, 0.17017972469329834, 0.08265241235494614, 0.025971753522753716, -0.0490865595638752, 0.29402822256088257, 0.014262193813920021, 0.043685317039489746, 0.4806101620197296, -0.32835254073143005, -0.21464639902114868, 0.3046182096004486, -0.2982528507709503, 0.10307049006223679, -0.39570382237434387, 0.2999306917190552, 0.07813695073127747, 0.14626362919807434, -0.25551873445510864, -0.5773359537124634, -0.34832534193992615, -0.5121467709541321, -0.28682899475097656, 0.4164738655090332, -0.21635796129703522, -0.20099635422229767, 0.22008347511291504, -0.33426421880722046, -0.027003563940525055, 0.09349846839904785, 0.05351008102297783, -0.058481309562921524, 0.29418468475341797, -0.13183197379112244, -0.0048623159527778625, 0.014983128756284714, -0.13290096819400787, 0.19240790605545044, -0.2750045657157898, -0.19687530398368835, 0.17258015275001526, -0.015560168772935867, -0.05461357161402702, 0.09542211145162582, 0.332328200340271, 0.14057108759880066, 0.03562841936945915, 0.019208921119570732, 0.08454029262065887, -0.040963515639305115, 0.05367744341492653, 0.13732722401618958, 0.4753788411617279, 0.4901203513145447, 0.24679051339626312, 0.2727872431278229, 0.2854887843132019, -0.007885545492172241, -0.0013801641762256622, 0.5281851291656494, -0.16664184629917145, 0.07470692694187164, 0.1517305076122284, 0.19669552147388458, -0.40486907958984375, -0.36021289229393005, 0.1689625382423401, -0.07699987292289734, -0.1250399798154831, 0.22072617709636688, 0.05349492281675339, 0.10056478530168533, 0.21423357725143433, 0.13208158314228058, 0.03385720029473305, -0.19647246599197388, 0.06123437359929085, -0.17251001298427582, -0.17394547164440155, 0.0011620037257671356, -0.1112990751862526, -0.0473051592707634, -0.8997764587402344, 0.17477014660835266, 0.04826036095619202, 0.006349015980958939, 0.10580876469612122, -0.06977400183677673, 0.20743507146835327, 0.17301523685455322, 0.522928774356842, -0.22135867178440094, 0.08390036225318909, 0.16719089448451996, -0.5483273267745972, -0.13868708908557892, 0.012528106570243835, -0.24153757095336914, -0.11120623350143433, 0.2085866630077362, 0.17358626425266266, -0.32967180013656616, 0.012651439756155014, -0.17029926180839539, 0.45154204964637756, 0.2592141032218933, -0.5466864705085754, -0.07795769721269608, -0.21337991952896118, -0.4382350444793701, -0.19971425831317902, 0.09719057381153107, 0.41313689947128296, -0.5942533016204834, -0.32166755199432373, 0.02168734185397625, 0.03190663829445839, 0.03991724178195, -0.1229340136051178, -0.0634385347366333, -0.24447286128997803, -0.10776916146278381, -0.1384173482656479, 0.3606545925140381, -0.3195544481277466, -0.7338929772377014, 0.15372587740421295, 0.23602114617824554, 0.5342658758163452, -0.07095835357904434, -0.13748373091220856, 0.28139427304267883, -0.2578292191028595, 0.14599117636680603, 0.08484457433223724, -0.16490314900875092, -0.007993858307600021, -0.3409697413444519, -0.2346952259540558, 0.22386938333511353, -0.15029074251651764, 0.09041670709848404, 0.33485856652259827, 0.07900666445493698, -0.2542209327220917, 0.050292447209358215, 0.03505011275410652, 0.1049240231513977, 0.19909262657165527, 0.24532361328601837, 0.22376537322998047, 0.28630587458610535, -0.43651869893074036, -0.28014084696769714, 0.2506178319454193, 0.214129239320755, -0.06000049412250519, -0.15240754187107086, -0.19822725653648376, -0.2678273320198059, -0.08841829746961594, -0.15897807478904724, -0.30440953373908997, 0.07887379825115204, 0.02257702499628067, 0.3843640685081482, -0.038502734154462814, -0.11452515423297882, 0.6218647360801697, 0.30845361948013306, 0.09448058158159256, -0.5049416422843933, 0.22964130342006683, -0.05485289543867111, 0.00516843656077981, -0.05918468162417412, 0.037782128900289536, 0.29395923018455505, -0.06852554529905319, -0.2895762026309967, 0.4078751504421234, 0.03925902768969536, 0.08416818827390671, -0.027634337544441223, 0.19374600052833557, 0.1773466020822525, 0.21058306097984314, 0.06393347680568695, 0.27418211102485657, -0.01488402672111988, 0.2087216079235077, -0.19545626640319824, 0.5572488903999329, 0.029374804347753525, 0.3240499794483185, 0.12083446979522705, 0.148756206035614, 0.3702499270439148, 0.13056349754333496, -0.2189950942993164, -0.1370789110660553, 0.3204496204853058, -0.4587228000164032, 0.0626671314239502, 0.012339839711785316, -0.1297929883003235, 0.3776250183582306, 0.07168322056531906, 0.07551193237304688, -0.03345181792974472, 0.31192174553871155, -0.159365713596344, -0.042190395295619965, 0.1813623309135437, 0.4024861454963684, 0.40145087242126465, 0.2088317722082138, 0.05071691796183586, 0.07588188350200653, -0.16153964400291443, -0.024877138435840607, 0.20824959874153137, 0.12934613227844238, -0.16963990032672882, 0.153575599193573, 0.30342090129852295, 0.27320393919944763, -0.306198388338089, 0.09339344501495361, -0.23562407493591309, 0.11953283846378326, -0.2705809772014618, 0.36163705587387085, -0.2810101807117462, -0.22808605432510376, 0.07614190876483917, -0.16783268749713898, -0.26151368021965027, -0.3875217139720917, 0.08989894390106201, 0.39343997836112976, -0.08621860295534134, 0.2567754089832306, 0.01471695676445961, 0.24453997611999512, 0.13616758584976196, -0.19968156516551971, -0.40057170391082764, -0.20788155496120453, -0.3476487100124359, 0.00539754331111908, 0.20513279736042023, -0.15684905648231506, 0.29703599214553833, -0.07631023973226547, -0.20662462711334229, -0.3902946710586548, -0.9079107642173767, -0.04862856864929199, -0.12396524846553802, 0.6180300116539001, 0.3176230192184448, -0.09162616729736328, -0.1352725625038147, -0.23275721073150635, 0.1665801703929901, -0.041315481066703796, -0.4310832917690277, 0.15683919191360474, 0.06662295013666153, 0.1682216078042984, -0.20038539171218872, -0.2270289659500122, -0.11354095488786697, -0.14581939578056335, 0.007939975708723068, -0.12768948078155518, 0.08496592938899994, 0.30940425395965576, 0.11235392838716507, -0.3165164291858673, -0.08720140904188156, 0.13308614492416382, -0.3335404694080353, -0.07733772695064545, 0.07394217699766159, -0.05416269600391388, -0.2302437275648117, -0.03413986414670944, -0.03198046609759331, 0.0831894725561142, 0.37366241216659546, -0.40695953369140625, -0.37917667627334595, -0.2713732123374939, -0.00487377867102623, 0.23117747902870178, 0.0683605819940567, 0.2319665253162384, 0.1899951547384262, 0.039103589951992035, -0.27946871519088745, -0.4342850148677826, -0.08862071484327316, -0.23659583926200867, 0.10954910516738892, 0.1482250988483429, 0.6309944987297058, 0.034562986344099045, 0.47642630338668823, 0.2947264313697815, 0.04896113649010658, 0.13982713222503662, 0.18155482411384583, 0.4972684979438782, -0.32584714889526367, -0.4095647633075714, -0.04670892283320427, -0.046194568276405334, 0.050513237714767456, -0.1531909853219986, 0.17958202958106995, -0.11206088215112686, -0.3487887978553772, 0.00008856877684593201, -0.2515634298324585, -0.24981102347373962, -0.23862777650356293, -0.013643786311149597, 0.26900485157966614, 0.3906218409538269, 0.14076998829841614, -0.3225950002670288, -0.17638498544692993, -0.008136813528835773, 0.4007485508918762, 0.10357676446437836, 0.25022032856941223, -0.18154177069664001, -0.04714185744524002, -0.4509265422821045, 0.49255937337875366, 0.21514518558979034, 0.264892041683197, -0.11775384843349457, -0.1629658341407776, -0.32944756746292114, -0.04924078658223152, 0.592811644077301, -0.363176167011261, 0.04434875398874283, 0.10195447504520416, -0.20818309485912323, -0.382881760597229, 0.05112947151064873, 0.007662627846002579, 0.3649105131626129, 0.05435469001531601, 0.3508074879646301, -0.08211499452590942, -0.073015496134758, -0.08691577613353729, 0.2223743498325348, -0.12459439039230347, 0.019601501524448395, -0.27436235547065735, -0.2049432396888733, -0.1433095633983612, 0.0314197763800621, -0.1528894156217575, 0.16506798565387726, -0.1800081580877304, -0.06853723526000977, -0.11314351856708527, -0.0563928484916687, 0.11538052558898926, 0.13470332324504852, 0.29450294375419617, -0.10000676661729813, 0.11873957514762878, 0.14418062567710876, 0.24052928388118744, 0.04237004369497299, 0.4583910405635834, -0.27559831738471985, -0.27809619903564453, -0.0670713558793068, 0.1208035945892334, -0.11464083939790726, 0.3437366485595703, -0.20401640236377716, -0.017340369522571564, -0.044456906616687775, -0.10204271972179413, -0.02124001830816269, -0.14110244810581207, -0.0019387109205126762, 0.37030303478240967, -0.20492413640022278, -0.28893688321113586, 0.23296445608139038, 0.23905159533023834, -0.20434916019439697, 0.4367760717868805, 0.34225577116012573, -0.28093525767326355, 0.16878968477249146, -0.19995886087417603, 0.7136853337287903, 0.1521686166524887, -0.02985379472374916, 0.08779972791671753, -0.16951783001422882, 0.45245498418807983, 0.31254637241363525, 0.1559777408838272, -0.06676805764436722, -0.2370488941669464, -0.0655059814453125, -0.03474707901477814, 0.15802299976348877, -0.11106160283088684, -0.2036348283290863, 0.5631487369537354, -0.05921915918588638, -0.03538796678185463, 0.1755862534046173, -0.11732907593250275, -0.20230765640735626, 0.019088424742221832, -0.4372626543045044, 0.09912529587745667, -0.021323680877685547, 0.25216639041900635, 0.0010582944378256798, -0.07672212272882462, 0.055220913141965866, -0.3087660074234009, -0.2637815475463867, -0.05239212512969971, -0.39920690655708313, -0.06592722982168198, 0.20812346041202545, -0.43327969312667847, 0.008973371237516403, 0.05262744799256325, 0.2566775679588318, -0.008180331438779831, -0.037300750613212585, -0.0075370147824287415, 0.07026883214712143, 0.49777132272720337, 0.23459263145923615, 0.025033168494701385, 0.28633007407188416, 0.08909415453672409, 0.186784029006958, 0.019597593694925308, -0.14201122522354126, -0.36083900928497314, -0.018652871251106262, 0.0038100332021713257, 0.11803290247917175, -0.15886607766151428, 0.028823044151067734, -0.2428554892539978, 0.021306436508893967, -0.3648621141910553, 0.0650937557220459, -0.0898350328207016, -0.00983914639800787, 0.09432125836610794, -0.016562480479478836, -0.22681789100170135, -0.005353085696697235, 0.6357892155647278, -0.14381468296051025, -0.4367527663707733, 0.12772074341773987, -0.00556609034538269, -0.22358423471450806, 0.035358674824237823, -0.20444118976593018, 0.027419164776802063, -0.2750847637653351, 0.2978781461715698, -0.25112488865852356, -0.10712830722332001, 0.26912951469421387, 0.32279300689697266, 0.18860851228237152, 0.214613139629364, -0.15166646242141724, -0.3945677876472473, -0.13708268105983734, 0.285457581281662, 0.04427365958690643, 0.05498090013861656, -0.031148791313171387, -0.32367050647735596, -0.14442208409309387, -0.20666389167308807, -0.22578871250152588, 0.008752115070819855, 0.33131393790245056, 0.07120858132839203, 0.19048745930194855, 0.22056341171264648, 0.1548963338136673, -0.19956424832344055, -0.013411498628556728, 0.07258662581443787, -0.20382021367549896, -0.10209281742572784, -0.09334567189216614, 0.09354174882173538, -0.09116014093160629, -0.2648991346359253, -0.15461929142475128, -0.0057536158710718155, 0.061403289437294006, -0.16469275951385498, 0.41826775670051575, 0.32141587138175964, -0.11824969947338104, -0.0536908321082592, -0.0327778123319149, 0.04722478240728378, 0.3035393953323364, 0.1383112072944641, 0.01856522262096405, 0.032671451568603516, 0.04270423948764801, 0.19944806396961212, -0.1875811666250229, 0.014096155762672424, 0.0820164754986763, 0.042396180331707, -0.2510473132133484, 0.027089882642030716, 0.3569346070289612, -0.2952960729598999, -0.02164008840918541, 0.5987738966941833, 0.35626745223999023, 0.24375972151756287, -0.13980628550052643, 0.11382973194122314, -0.07773864269256592, 0.15335774421691895, -0.27390503883361816, -0.33267828822135925, 0.20577828586101532, 0.2732258141040802, 0.06095707789063454, 0.18608182668685913, -0.0021066665649414062, 0.029159627854824066, 0.6171150803565979, 0.2176479995250702, 0.4478175938129425, -0.1253162920475006, 0.3508078157901764, 0.5271660089492798, 0.23262836039066315, 0.18437623977661133, 0.24172061681747437, 0.07372477650642395, 0.016092881560325623, 0.5080393552780151, -0.06601006537675858, 0.2586887776851654, 0.21974709630012512, 0.12877090275287628, -0.03551819920539856, -0.4662739038467407, -0.16567467153072357, 0.028322510421276093, -0.07974916696548462, 0.2506764531135559, 0.16615724563598633, 0.08566081523895264, -0.22328396141529083, -0.3345978558063507, 0.011488063260912895, 0.024898622184991837, -0.19362616539001465, -0.21611030399799347, 0.14463897049427032, -0.36391741037368774, -0.057149190455675125, 0.013486314564943314, -0.12084436416625977, 0.07040049880743027, 0.4529310464859009, -0.24694864451885223, -0.12836304306983948, -0.4731905162334442, -0.3793768286705017, 0.05004565790295601, 0.17476409673690796, -0.014010284096002579, 0.4047639071941376, 0.258781373500824, -0.22985482215881348, 0.22198832035064697, 0.25034376978874207, 0.48565059900283813, 0.2468242347240448, 0.027692187577486038, 0.01334693655371666, -0.14204943180084229, -0.05400650203227997, -0.09072275459766388, 0.33564189076423645, -0.08708329498767853, 0.030568327754735947, 0.1879347413778305, 0.11341014504432678, 0.000733465887606144, 0.2053901106119156, -0.040854621678590775, 0.39893990755081177, -0.4661810100078583, 0.08953436464071274, -0.23695385456085205, 0.28487932682037354, 0.015014959499239922, 0.10001436620950699, -0.24902543425559998, -0.11811482906341553, 0.17121459543704987, 0.23181088268756866, 0.2039029598236084, -0.10648466646671295, 0.07481089979410172, 0.1348544955253601, 0.07390917837619781, 0.4687880873680115, -0.09301317483186722, -0.0892462283372879, -0.14648915827274323, -0.653510332107544, -0.05586252361536026, 0.1423015147447586, 0.12806753814220428, -0.06351551413536072, 0.03753000497817993, 0.04901442304253578, 0.18468567728996277, 0.04347316920757294, -0.1836017370223999, 0.1054590716958046, -0.25151437520980835, -0.20000138878822327, -0.1759463995695114, 0.2301202267408371, -0.24214795231819153, 0.05484858900308609, -0.26591041684150696, 0.06277246028184891, -0.04169316962361336, 0.026953235268592834, -0.0059282053261995316, -0.06288377940654755, 0.06751438975334167, 0.3473338782787323, -0.13707388937473297, 0.34939005970954895, 0.2663174867630005, 0.03349287807941437, -0.0034478772431612015, -0.278297483921051, -0.19313564896583557, -0.2683139741420746, 0.07008456438779831, -0.29212450981140137, 0.49186089634895325, -0.40185970067977905, -0.30196312069892883, -0.18042156100273132, 0.27247440814971924, 0.1233787089586258, -0.12682853639125824, -0.47677913308143616, 0.16585826873779297, -0.05875708907842636, 0.08381269127130508, 0.00443768035620451, 0.5087336301803589, 0.05998682230710983, 0.3379512429237366, -0.22663088142871857, -0.3412230908870697, 0.53581702709198, -0.4137616455554962, -0.2617650628089905, -0.13192811608314514, -0.06397368013858795, 0.6073148846626282, -0.4836443364620209, -0.30437353253364563, -0.20376679301261902, 0.27199095487594604, -0.12000533193349838, -0.14902496337890625, 0.15557251870632172, -0.26529785990715027, 0.1745559126138687, -0.18920165300369263, -0.08706063032150269, 0.43938252329826355, -0.08826790004968643, 0.2773542106151581, -0.12994170188903809 ]
https://github.com/huggingface/datasets/issues/2943
Backwards compatibility broken for cached datasets that use `.filter()`
Well it can cause issue with anyone that updates `datasets` and re-run some code that uses filter, so I'm creating a PR
## Describe the bug After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with `ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}` Related feature: https://github.com/huggingface/datasets/pull/2836 :question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :) ## Workaround Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`. ## Steps to reproduce the bug 1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists. 2. `pip install datasets==1.11.0` and run the following snippet: ```python from datasets import load_dataset ids = ["1272-141231-0000"] ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.filter(lambda x: x["id"] in ids) ``` 3. `pip install datasets==1.12.1` and re-run the code again ## Expected results Same result as with the previous `datasets` version. ## Actual results ```bash Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1) Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow Traceback (most recent call last): File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module> ds = ds.filter(lambda x: x["id"] in ids) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter indices = self.map( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map return self._map_single( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single return Dataset.from_file(cache_file_name, info=info, split=self.split) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file return cls( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__ self.info.features = self.info.features.reorder_fields_as(inferred_features) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as return Features(recursive_reorder(self, other)) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position) ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)} Process finished with exit code 1 ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 5.0.0
22
Backwards compatibility broken for cached datasets that use `.filter()` ## Describe the bug After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with `ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}` Related feature: https://github.com/huggingface/datasets/pull/2836 :question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :) ## Workaround Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`. ## Steps to reproduce the bug 1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists. 2. `pip install datasets==1.11.0` and run the following snippet: ```python from datasets import load_dataset ids = ["1272-141231-0000"] ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.filter(lambda x: x["id"] in ids) ``` 3. `pip install datasets==1.12.1` and re-run the code again ## Expected results Same result as with the previous `datasets` version. ## Actual results ```bash Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1) Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow Traceback (most recent call last): File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module> ds = ds.filter(lambda x: x["id"] in ids) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter indices = self.map( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map return self._map_single( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single return Dataset.from_file(cache_file_name, info=info, split=self.split) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file return cls( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__ self.info.features = self.info.features.reorder_fields_as(inferred_features) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as return Features(recursive_reorder(self, other)) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position) ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)} Process finished with exit code 1 ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 5.0.0 Well it can cause issue with anyone that updates `datasets` and re-run some code that uses filter, so I'm creating a PR
[ -0.30499589443206787, 0.12438860535621643, -0.04655841737985611, 0.23689737915992737, 0.15172843635082245, -0.0666598454117775, -0.0069412775337696075, 0.32853978872299194, 0.17373839020729065, 0.02938103675842285, -0.2313872128725052, 0.3581932783126831, -0.15033014118671417, 0.25273653864860535, -0.29778623580932617, -0.13781173527240753, 0.0444694459438324, 0.03212467581033707, -0.06149601936340332, 0.16641293466091156, -0.12391772121191025, 0.4988587498664856, -0.19577628374099731, 0.007079474627971649, 0.22216473519802094, 0.05132158100605011, 0.10912355780601501, 0.1385663002729416, 0.07986205071210861, -0.3392689526081085, 0.5981169939041138, 0.10640649497509003, -0.03486925736069679, 0.49809545278549194, -0.00012130981485825032, 0.09986761212348938, 0.4398064613342285, -0.10739780217409134, -0.45794877409935, -0.36868858337402344, -0.19285297393798828, 0.131994366645813, 0.213113471865654, 0.08116324990987778, -0.07151231169700623, 0.11434200406074524, -0.30349382758140564, -0.3460473120212555, 0.24887673556804657, 0.1989334374666214, 0.22672885656356812, 0.21361520886421204, 0.265742689371109, 0.06658700853586197, 0.17017972469329834, 0.08265241235494614, 0.025971753522753716, -0.0490865595638752, 0.29402822256088257, 0.014262193813920021, 0.043685317039489746, 0.4806101620197296, -0.32835254073143005, -0.21464639902114868, 0.3046182096004486, -0.2982528507709503, 0.10307049006223679, -0.39570382237434387, 0.2999306917190552, 0.07813695073127747, 0.14626362919807434, -0.25551873445510864, -0.5773359537124634, -0.34832534193992615, -0.5121467709541321, -0.28682899475097656, 0.4164738655090332, -0.21635796129703522, -0.20099635422229767, 0.22008347511291504, -0.33426421880722046, -0.027003563940525055, 0.09349846839904785, 0.05351008102297783, -0.058481309562921524, 0.29418468475341797, -0.13183197379112244, -0.0048623159527778625, 0.014983128756284714, -0.13290096819400787, 0.19240790605545044, -0.2750045657157898, -0.19687530398368835, 0.17258015275001526, -0.015560168772935867, -0.05461357161402702, 0.09542211145162582, 0.332328200340271, 0.14057108759880066, 0.03562841936945915, 0.019208921119570732, 0.08454029262065887, -0.040963515639305115, 0.05367744341492653, 0.13732722401618958, 0.4753788411617279, 0.4901203513145447, 0.24679051339626312, 0.2727872431278229, 0.2854887843132019, -0.007885545492172241, -0.0013801641762256622, 0.5281851291656494, -0.16664184629917145, 0.07470692694187164, 0.1517305076122284, 0.19669552147388458, -0.40486907958984375, -0.36021289229393005, 0.1689625382423401, -0.07699987292289734, -0.1250399798154831, 0.22072617709636688, 0.05349492281675339, 0.10056478530168533, 0.21423357725143433, 0.13208158314228058, 0.03385720029473305, -0.19647246599197388, 0.06123437359929085, -0.17251001298427582, -0.17394547164440155, 0.0011620037257671356, -0.1112990751862526, -0.0473051592707634, -0.8997764587402344, 0.17477014660835266, 0.04826036095619202, 0.006349015980958939, 0.10580876469612122, -0.06977400183677673, 0.20743507146835327, 0.17301523685455322, 0.522928774356842, -0.22135867178440094, 0.08390036225318909, 0.16719089448451996, -0.5483273267745972, -0.13868708908557892, 0.012528106570243835, -0.24153757095336914, -0.11120623350143433, 0.2085866630077362, 0.17358626425266266, -0.32967180013656616, 0.012651439756155014, -0.17029926180839539, 0.45154204964637756, 0.2592141032218933, -0.5466864705085754, -0.07795769721269608, -0.21337991952896118, -0.4382350444793701, -0.19971425831317902, 0.09719057381153107, 0.41313689947128296, -0.5942533016204834, -0.32166755199432373, 0.02168734185397625, 0.03190663829445839, 0.03991724178195, -0.1229340136051178, -0.0634385347366333, -0.24447286128997803, -0.10776916146278381, -0.1384173482656479, 0.3606545925140381, -0.3195544481277466, -0.7338929772377014, 0.15372587740421295, 0.23602114617824554, 0.5342658758163452, -0.07095835357904434, -0.13748373091220856, 0.28139427304267883, -0.2578292191028595, 0.14599117636680603, 0.08484457433223724, -0.16490314900875092, -0.007993858307600021, -0.3409697413444519, -0.2346952259540558, 0.22386938333511353, -0.15029074251651764, 0.09041670709848404, 0.33485856652259827, 0.07900666445493698, -0.2542209327220917, 0.050292447209358215, 0.03505011275410652, 0.1049240231513977, 0.19909262657165527, 0.24532361328601837, 0.22376537322998047, 0.28630587458610535, -0.43651869893074036, -0.28014084696769714, 0.2506178319454193, 0.214129239320755, -0.06000049412250519, -0.15240754187107086, -0.19822725653648376, -0.2678273320198059, -0.08841829746961594, -0.15897807478904724, -0.30440953373908997, 0.07887379825115204, 0.02257702499628067, 0.3843640685081482, -0.038502734154462814, -0.11452515423297882, 0.6218647360801697, 0.30845361948013306, 0.09448058158159256, -0.5049416422843933, 0.22964130342006683, -0.05485289543867111, 0.00516843656077981, -0.05918468162417412, 0.037782128900289536, 0.29395923018455505, -0.06852554529905319, -0.2895762026309967, 0.4078751504421234, 0.03925902768969536, 0.08416818827390671, -0.027634337544441223, 0.19374600052833557, 0.1773466020822525, 0.21058306097984314, 0.06393347680568695, 0.27418211102485657, -0.01488402672111988, 0.2087216079235077, -0.19545626640319824, 0.5572488903999329, 0.029374804347753525, 0.3240499794483185, 0.12083446979522705, 0.148756206035614, 0.3702499270439148, 0.13056349754333496, -0.2189950942993164, -0.1370789110660553, 0.3204496204853058, -0.4587228000164032, 0.0626671314239502, 0.012339839711785316, -0.1297929883003235, 0.3776250183582306, 0.07168322056531906, 0.07551193237304688, -0.03345181792974472, 0.31192174553871155, -0.159365713596344, -0.042190395295619965, 0.1813623309135437, 0.4024861454963684, 0.40145087242126465, 0.2088317722082138, 0.05071691796183586, 0.07588188350200653, -0.16153964400291443, -0.024877138435840607, 0.20824959874153137, 0.12934613227844238, -0.16963990032672882, 0.153575599193573, 0.30342090129852295, 0.27320393919944763, -0.306198388338089, 0.09339344501495361, -0.23562407493591309, 0.11953283846378326, -0.2705809772014618, 0.36163705587387085, -0.2810101807117462, -0.22808605432510376, 0.07614190876483917, -0.16783268749713898, -0.26151368021965027, -0.3875217139720917, 0.08989894390106201, 0.39343997836112976, -0.08621860295534134, 0.2567754089832306, 0.01471695676445961, 0.24453997611999512, 0.13616758584976196, -0.19968156516551971, -0.40057170391082764, -0.20788155496120453, -0.3476487100124359, 0.00539754331111908, 0.20513279736042023, -0.15684905648231506, 0.29703599214553833, -0.07631023973226547, -0.20662462711334229, -0.3902946710586548, -0.9079107642173767, -0.04862856864929199, -0.12396524846553802, 0.6180300116539001, 0.3176230192184448, -0.09162616729736328, -0.1352725625038147, -0.23275721073150635, 0.1665801703929901, -0.041315481066703796, -0.4310832917690277, 0.15683919191360474, 0.06662295013666153, 0.1682216078042984, -0.20038539171218872, -0.2270289659500122, -0.11354095488786697, -0.14581939578056335, 0.007939975708723068, -0.12768948078155518, 0.08496592938899994, 0.30940425395965576, 0.11235392838716507, -0.3165164291858673, -0.08720140904188156, 0.13308614492416382, -0.3335404694080353, -0.07733772695064545, 0.07394217699766159, -0.05416269600391388, -0.2302437275648117, -0.03413986414670944, -0.03198046609759331, 0.0831894725561142, 0.37366241216659546, -0.40695953369140625, -0.37917667627334595, -0.2713732123374939, -0.00487377867102623, 0.23117747902870178, 0.0683605819940567, 0.2319665253162384, 0.1899951547384262, 0.039103589951992035, -0.27946871519088745, -0.4342850148677826, -0.08862071484327316, -0.23659583926200867, 0.10954910516738892, 0.1482250988483429, 0.6309944987297058, 0.034562986344099045, 0.47642630338668823, 0.2947264313697815, 0.04896113649010658, 0.13982713222503662, 0.18155482411384583, 0.4972684979438782, -0.32584714889526367, -0.4095647633075714, -0.04670892283320427, -0.046194568276405334, 0.050513237714767456, -0.1531909853219986, 0.17958202958106995, -0.11206088215112686, -0.3487887978553772, 0.00008856877684593201, -0.2515634298324585, -0.24981102347373962, -0.23862777650356293, -0.013643786311149597, 0.26900485157966614, 0.3906218409538269, 0.14076998829841614, -0.3225950002670288, -0.17638498544692993, -0.008136813528835773, 0.4007485508918762, 0.10357676446437836, 0.25022032856941223, -0.18154177069664001, -0.04714185744524002, -0.4509265422821045, 0.49255937337875366, 0.21514518558979034, 0.264892041683197, -0.11775384843349457, -0.1629658341407776, -0.32944756746292114, -0.04924078658223152, 0.592811644077301, -0.363176167011261, 0.04434875398874283, 0.10195447504520416, -0.20818309485912323, -0.382881760597229, 0.05112947151064873, 0.007662627846002579, 0.3649105131626129, 0.05435469001531601, 0.3508074879646301, -0.08211499452590942, -0.073015496134758, -0.08691577613353729, 0.2223743498325348, -0.12459439039230347, 0.019601501524448395, -0.27436235547065735, -0.2049432396888733, -0.1433095633983612, 0.0314197763800621, -0.1528894156217575, 0.16506798565387726, -0.1800081580877304, -0.06853723526000977, -0.11314351856708527, -0.0563928484916687, 0.11538052558898926, 0.13470332324504852, 0.29450294375419617, -0.10000676661729813, 0.11873957514762878, 0.14418062567710876, 0.24052928388118744, 0.04237004369497299, 0.4583910405635834, -0.27559831738471985, -0.27809619903564453, -0.0670713558793068, 0.1208035945892334, -0.11464083939790726, 0.3437366485595703, -0.20401640236377716, -0.017340369522571564, -0.044456906616687775, -0.10204271972179413, -0.02124001830816269, -0.14110244810581207, -0.0019387109205126762, 0.37030303478240967, -0.20492413640022278, -0.28893688321113586, 0.23296445608139038, 0.23905159533023834, -0.20434916019439697, 0.4367760717868805, 0.34225577116012573, -0.28093525767326355, 0.16878968477249146, -0.19995886087417603, 0.7136853337287903, 0.1521686166524887, -0.02985379472374916, 0.08779972791671753, -0.16951783001422882, 0.45245498418807983, 0.31254637241363525, 0.1559777408838272, -0.06676805764436722, -0.2370488941669464, -0.0655059814453125, -0.03474707901477814, 0.15802299976348877, -0.11106160283088684, -0.2036348283290863, 0.5631487369537354, -0.05921915918588638, -0.03538796678185463, 0.1755862534046173, -0.11732907593250275, -0.20230765640735626, 0.019088424742221832, -0.4372626543045044, 0.09912529587745667, -0.021323680877685547, 0.25216639041900635, 0.0010582944378256798, -0.07672212272882462, 0.055220913141965866, -0.3087660074234009, -0.2637815475463867, -0.05239212512969971, -0.39920690655708313, -0.06592722982168198, 0.20812346041202545, -0.43327969312667847, 0.008973371237516403, 0.05262744799256325, 0.2566775679588318, -0.008180331438779831, -0.037300750613212585, -0.0075370147824287415, 0.07026883214712143, 0.49777132272720337, 0.23459263145923615, 0.025033168494701385, 0.28633007407188416, 0.08909415453672409, 0.186784029006958, 0.019597593694925308, -0.14201122522354126, -0.36083900928497314, -0.018652871251106262, 0.0038100332021713257, 0.11803290247917175, -0.15886607766151428, 0.028823044151067734, -0.2428554892539978, 0.021306436508893967, -0.3648621141910553, 0.0650937557220459, -0.0898350328207016, -0.00983914639800787, 0.09432125836610794, -0.016562480479478836, -0.22681789100170135, -0.005353085696697235, 0.6357892155647278, -0.14381468296051025, -0.4367527663707733, 0.12772074341773987, -0.00556609034538269, -0.22358423471450806, 0.035358674824237823, -0.20444118976593018, 0.027419164776802063, -0.2750847637653351, 0.2978781461715698, -0.25112488865852356, -0.10712830722332001, 0.26912951469421387, 0.32279300689697266, 0.18860851228237152, 0.214613139629364, -0.15166646242141724, -0.3945677876472473, -0.13708268105983734, 0.285457581281662, 0.04427365958690643, 0.05498090013861656, -0.031148791313171387, -0.32367050647735596, -0.14442208409309387, -0.20666389167308807, -0.22578871250152588, 0.008752115070819855, 0.33131393790245056, 0.07120858132839203, 0.19048745930194855, 0.22056341171264648, 0.1548963338136673, -0.19956424832344055, -0.013411498628556728, 0.07258662581443787, -0.20382021367549896, -0.10209281742572784, -0.09334567189216614, 0.09354174882173538, -0.09116014093160629, -0.2648991346359253, -0.15461929142475128, -0.0057536158710718155, 0.061403289437294006, -0.16469275951385498, 0.41826775670051575, 0.32141587138175964, -0.11824969947338104, -0.0536908321082592, -0.0327778123319149, 0.04722478240728378, 0.3035393953323364, 0.1383112072944641, 0.01856522262096405, 0.032671451568603516, 0.04270423948764801, 0.19944806396961212, -0.1875811666250229, 0.014096155762672424, 0.0820164754986763, 0.042396180331707, -0.2510473132133484, 0.027089882642030716, 0.3569346070289612, -0.2952960729598999, -0.02164008840918541, 0.5987738966941833, 0.35626745223999023, 0.24375972151756287, -0.13980628550052643, 0.11382973194122314, -0.07773864269256592, 0.15335774421691895, -0.27390503883361816, -0.33267828822135925, 0.20577828586101532, 0.2732258141040802, 0.06095707789063454, 0.18608182668685913, -0.0021066665649414062, 0.029159627854824066, 0.6171150803565979, 0.2176479995250702, 0.4478175938129425, -0.1253162920475006, 0.3508078157901764, 0.5271660089492798, 0.23262836039066315, 0.18437623977661133, 0.24172061681747437, 0.07372477650642395, 0.016092881560325623, 0.5080393552780151, -0.06601006537675858, 0.2586887776851654, 0.21974709630012512, 0.12877090275287628, -0.03551819920539856, -0.4662739038467407, -0.16567467153072357, 0.028322510421276093, -0.07974916696548462, 0.2506764531135559, 0.16615724563598633, 0.08566081523895264, -0.22328396141529083, -0.3345978558063507, 0.011488063260912895, 0.024898622184991837, -0.19362616539001465, -0.21611030399799347, 0.14463897049427032, -0.36391741037368774, -0.057149190455675125, 0.013486314564943314, -0.12084436416625977, 0.07040049880743027, 0.4529310464859009, -0.24694864451885223, -0.12836304306983948, -0.4731905162334442, -0.3793768286705017, 0.05004565790295601, 0.17476409673690796, -0.014010284096002579, 0.4047639071941376, 0.258781373500824, -0.22985482215881348, 0.22198832035064697, 0.25034376978874207, 0.48565059900283813, 0.2468242347240448, 0.027692187577486038, 0.01334693655371666, -0.14204943180084229, -0.05400650203227997, -0.09072275459766388, 0.33564189076423645, -0.08708329498767853, 0.030568327754735947, 0.1879347413778305, 0.11341014504432678, 0.000733465887606144, 0.2053901106119156, -0.040854621678590775, 0.39893990755081177, -0.4661810100078583, 0.08953436464071274, -0.23695385456085205, 0.28487932682037354, 0.015014959499239922, 0.10001436620950699, -0.24902543425559998, -0.11811482906341553, 0.17121459543704987, 0.23181088268756866, 0.2039029598236084, -0.10648466646671295, 0.07481089979410172, 0.1348544955253601, 0.07390917837619781, 0.4687880873680115, -0.09301317483186722, -0.0892462283372879, -0.14648915827274323, -0.653510332107544, -0.05586252361536026, 0.1423015147447586, 0.12806753814220428, -0.06351551413536072, 0.03753000497817993, 0.04901442304253578, 0.18468567728996277, 0.04347316920757294, -0.1836017370223999, 0.1054590716958046, -0.25151437520980835, -0.20000138878822327, -0.1759463995695114, 0.2301202267408371, -0.24214795231819153, 0.05484858900308609, -0.26591041684150696, 0.06277246028184891, -0.04169316962361336, 0.026953235268592834, -0.0059282053261995316, -0.06288377940654755, 0.06751438975334167, 0.3473338782787323, -0.13707388937473297, 0.34939005970954895, 0.2663174867630005, 0.03349287807941437, -0.0034478772431612015, -0.278297483921051, -0.19313564896583557, -0.2683139741420746, 0.07008456438779831, -0.29212450981140137, 0.49186089634895325, -0.40185970067977905, -0.30196312069892883, -0.18042156100273132, 0.27247440814971924, 0.1233787089586258, -0.12682853639125824, -0.47677913308143616, 0.16585826873779297, -0.05875708907842636, 0.08381269127130508, 0.00443768035620451, 0.5087336301803589, 0.05998682230710983, 0.3379512429237366, -0.22663088142871857, -0.3412230908870697, 0.53581702709198, -0.4137616455554962, -0.2617650628089905, -0.13192811608314514, -0.06397368013858795, 0.6073148846626282, -0.4836443364620209, -0.30437353253364563, -0.20376679301261902, 0.27199095487594604, -0.12000533193349838, -0.14902496337890625, 0.15557251870632172, -0.26529785990715027, 0.1745559126138687, -0.18920165300369263, -0.08706063032150269, 0.43938252329826355, -0.08826790004968643, 0.2773542106151581, -0.12994170188903809 ]
https://github.com/huggingface/datasets/issues/2943
Backwards compatibility broken for cached datasets that use `.filter()`
I just merged a fix, let me know if you're still having this kind of issues :) We'll do a release soon to make this fix available
## Describe the bug After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with `ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}` Related feature: https://github.com/huggingface/datasets/pull/2836 :question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :) ## Workaround Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`. ## Steps to reproduce the bug 1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists. 2. `pip install datasets==1.11.0` and run the following snippet: ```python from datasets import load_dataset ids = ["1272-141231-0000"] ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.filter(lambda x: x["id"] in ids) ``` 3. `pip install datasets==1.12.1` and re-run the code again ## Expected results Same result as with the previous `datasets` version. ## Actual results ```bash Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1) Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow Traceback (most recent call last): File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module> ds = ds.filter(lambda x: x["id"] in ids) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter indices = self.map( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map return self._map_single( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single return Dataset.from_file(cache_file_name, info=info, split=self.split) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file return cls( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__ self.info.features = self.info.features.reorder_fields_as(inferred_features) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as return Features(recursive_reorder(self, other)) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position) ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)} Process finished with exit code 1 ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 5.0.0
27
Backwards compatibility broken for cached datasets that use `.filter()` ## Describe the bug After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with `ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}` Related feature: https://github.com/huggingface/datasets/pull/2836 :question: This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :) ## Workaround Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`. ## Steps to reproduce the bug 1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists. 2. `pip install datasets==1.11.0` and run the following snippet: ```python from datasets import load_dataset ids = ["1272-141231-0000"] ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.filter(lambda x: x["id"] in ids) ``` 3. `pip install datasets==1.12.1` and re-run the code again ## Expected results Same result as with the previous `datasets` version. ## Actual results ```bash Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1) Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow Traceback (most recent call last): File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module> ds = ds.filter(lambda x: x["id"] in ids) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter indices = self.map( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map return self._map_single( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper out = func(self, *args, **kwargs) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single return Dataset.from_file(cache_file_name, info=info, split=self.split) File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file return cls( File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__ self.info.features = self.info.features.reorder_fields_as(inferred_features) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as return Features(recursive_reorder(self, other)) File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position) ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)} Process finished with exit code 1 ``` ## Environment info - `datasets` version: 1.12.1 - Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 5.0.0 I just merged a fix, let me know if you're still having this kind of issues :) We'll do a release soon to make this fix available
[ -0.30499589443206787, 0.12438860535621643, -0.04655841737985611, 0.23689737915992737, 0.15172843635082245, -0.0666598454117775, -0.0069412775337696075, 0.32853978872299194, 0.17373839020729065, 0.02938103675842285, -0.2313872128725052, 0.3581932783126831, -0.15033014118671417, 0.25273653864860535, -0.29778623580932617, -0.13781173527240753, 0.0444694459438324, 0.03212467581033707, -0.06149601936340332, 0.16641293466091156, -0.12391772121191025, 0.4988587498664856, -0.19577628374099731, 0.007079474627971649, 0.22216473519802094, 0.05132158100605011, 0.10912355780601501, 0.1385663002729416, 0.07986205071210861, -0.3392689526081085, 0.5981169939041138, 0.10640649497509003, -0.03486925736069679, 0.49809545278549194, -0.00012130981485825032, 0.09986761212348938, 0.4398064613342285, -0.10739780217409134, -0.45794877409935, -0.36868858337402344, -0.19285297393798828, 0.131994366645813, 0.213113471865654, 0.08116324990987778, -0.07151231169700623, 0.11434200406074524, -0.30349382758140564, -0.3460473120212555, 0.24887673556804657, 0.1989334374666214, 0.22672885656356812, 0.21361520886421204, 0.265742689371109, 0.06658700853586197, 0.17017972469329834, 0.08265241235494614, 0.025971753522753716, -0.0490865595638752, 0.29402822256088257, 0.014262193813920021, 0.043685317039489746, 0.4806101620197296, -0.32835254073143005, -0.21464639902114868, 0.3046182096004486, -0.2982528507709503, 0.10307049006223679, -0.39570382237434387, 0.2999306917190552, 0.07813695073127747, 0.14626362919807434, -0.25551873445510864, -0.5773359537124634, -0.34832534193992615, -0.5121467709541321, -0.28682899475097656, 0.4164738655090332, -0.21635796129703522, -0.20099635422229767, 0.22008347511291504, -0.33426421880722046, -0.027003563940525055, 0.09349846839904785, 0.05351008102297783, -0.058481309562921524, 0.29418468475341797, -0.13183197379112244, -0.0048623159527778625, 0.014983128756284714, -0.13290096819400787, 0.19240790605545044, -0.2750045657157898, -0.19687530398368835, 0.17258015275001526, -0.015560168772935867, -0.05461357161402702, 0.09542211145162582, 0.332328200340271, 0.14057108759880066, 0.03562841936945915, 0.019208921119570732, 0.08454029262065887, -0.040963515639305115, 0.05367744341492653, 0.13732722401618958, 0.4753788411617279, 0.4901203513145447, 0.24679051339626312, 0.2727872431278229, 0.2854887843132019, -0.007885545492172241, -0.0013801641762256622, 0.5281851291656494, -0.16664184629917145, 0.07470692694187164, 0.1517305076122284, 0.19669552147388458, -0.40486907958984375, -0.36021289229393005, 0.1689625382423401, -0.07699987292289734, -0.1250399798154831, 0.22072617709636688, 0.05349492281675339, 0.10056478530168533, 0.21423357725143433, 0.13208158314228058, 0.03385720029473305, -0.19647246599197388, 0.06123437359929085, -0.17251001298427582, -0.17394547164440155, 0.0011620037257671356, -0.1112990751862526, -0.0473051592707634, -0.8997764587402344, 0.17477014660835266, 0.04826036095619202, 0.006349015980958939, 0.10580876469612122, -0.06977400183677673, 0.20743507146835327, 0.17301523685455322, 0.522928774356842, -0.22135867178440094, 0.08390036225318909, 0.16719089448451996, -0.5483273267745972, -0.13868708908557892, 0.012528106570243835, -0.24153757095336914, -0.11120623350143433, 0.2085866630077362, 0.17358626425266266, -0.32967180013656616, 0.012651439756155014, -0.17029926180839539, 0.45154204964637756, 0.2592141032218933, -0.5466864705085754, -0.07795769721269608, -0.21337991952896118, -0.4382350444793701, -0.19971425831317902, 0.09719057381153107, 0.41313689947128296, -0.5942533016204834, -0.32166755199432373, 0.02168734185397625, 0.03190663829445839, 0.03991724178195, -0.1229340136051178, -0.0634385347366333, -0.24447286128997803, -0.10776916146278381, -0.1384173482656479, 0.3606545925140381, -0.3195544481277466, -0.7338929772377014, 0.15372587740421295, 0.23602114617824554, 0.5342658758163452, -0.07095835357904434, -0.13748373091220856, 0.28139427304267883, -0.2578292191028595, 0.14599117636680603, 0.08484457433223724, -0.16490314900875092, -0.007993858307600021, -0.3409697413444519, -0.2346952259540558, 0.22386938333511353, -0.15029074251651764, 0.09041670709848404, 0.33485856652259827, 0.07900666445493698, -0.2542209327220917, 0.050292447209358215, 0.03505011275410652, 0.1049240231513977, 0.19909262657165527, 0.24532361328601837, 0.22376537322998047, 0.28630587458610535, -0.43651869893074036, -0.28014084696769714, 0.2506178319454193, 0.214129239320755, -0.06000049412250519, -0.15240754187107086, -0.19822725653648376, -0.2678273320198059, -0.08841829746961594, -0.15897807478904724, -0.30440953373908997, 0.07887379825115204, 0.02257702499628067, 0.3843640685081482, -0.038502734154462814, -0.11452515423297882, 0.6218647360801697, 0.30845361948013306, 0.09448058158159256, -0.5049416422843933, 0.22964130342006683, -0.05485289543867111, 0.00516843656077981, -0.05918468162417412, 0.037782128900289536, 0.29395923018455505, -0.06852554529905319, -0.2895762026309967, 0.4078751504421234, 0.03925902768969536, 0.08416818827390671, -0.027634337544441223, 0.19374600052833557, 0.1773466020822525, 0.21058306097984314, 0.06393347680568695, 0.27418211102485657, -0.01488402672111988, 0.2087216079235077, -0.19545626640319824, 0.5572488903999329, 0.029374804347753525, 0.3240499794483185, 0.12083446979522705, 0.148756206035614, 0.3702499270439148, 0.13056349754333496, -0.2189950942993164, -0.1370789110660553, 0.3204496204853058, -0.4587228000164032, 0.0626671314239502, 0.012339839711785316, -0.1297929883003235, 0.3776250183582306, 0.07168322056531906, 0.07551193237304688, -0.03345181792974472, 0.31192174553871155, -0.159365713596344, -0.042190395295619965, 0.1813623309135437, 0.4024861454963684, 0.40145087242126465, 0.2088317722082138, 0.05071691796183586, 0.07588188350200653, -0.16153964400291443, -0.024877138435840607, 0.20824959874153137, 0.12934613227844238, -0.16963990032672882, 0.153575599193573, 0.30342090129852295, 0.27320393919944763, -0.306198388338089, 0.09339344501495361, -0.23562407493591309, 0.11953283846378326, -0.2705809772014618, 0.36163705587387085, -0.2810101807117462, -0.22808605432510376, 0.07614190876483917, -0.16783268749713898, -0.26151368021965027, -0.3875217139720917, 0.08989894390106201, 0.39343997836112976, -0.08621860295534134, 0.2567754089832306, 0.01471695676445961, 0.24453997611999512, 0.13616758584976196, -0.19968156516551971, -0.40057170391082764, -0.20788155496120453, -0.3476487100124359, 0.00539754331111908, 0.20513279736042023, -0.15684905648231506, 0.29703599214553833, -0.07631023973226547, -0.20662462711334229, -0.3902946710586548, -0.9079107642173767, -0.04862856864929199, -0.12396524846553802, 0.6180300116539001, 0.3176230192184448, -0.09162616729736328, -0.1352725625038147, -0.23275721073150635, 0.1665801703929901, -0.041315481066703796, -0.4310832917690277, 0.15683919191360474, 0.06662295013666153, 0.1682216078042984, -0.20038539171218872, -0.2270289659500122, -0.11354095488786697, -0.14581939578056335, 0.007939975708723068, -0.12768948078155518, 0.08496592938899994, 0.30940425395965576, 0.11235392838716507, -0.3165164291858673, -0.08720140904188156, 0.13308614492416382, -0.3335404694080353, -0.07733772695064545, 0.07394217699766159, -0.05416269600391388, -0.2302437275648117, -0.03413986414670944, -0.03198046609759331, 0.0831894725561142, 0.37366241216659546, -0.40695953369140625, -0.37917667627334595, -0.2713732123374939, -0.00487377867102623, 0.23117747902870178, 0.0683605819940567, 0.2319665253162384, 0.1899951547384262, 0.039103589951992035, -0.27946871519088745, -0.4342850148677826, -0.08862071484327316, -0.23659583926200867, 0.10954910516738892, 0.1482250988483429, 0.6309944987297058, 0.034562986344099045, 0.47642630338668823, 0.2947264313697815, 0.04896113649010658, 0.13982713222503662, 0.18155482411384583, 0.4972684979438782, -0.32584714889526367, -0.4095647633075714, -0.04670892283320427, -0.046194568276405334, 0.050513237714767456, -0.1531909853219986, 0.17958202958106995, -0.11206088215112686, -0.3487887978553772, 0.00008856877684593201, -0.2515634298324585, -0.24981102347373962, -0.23862777650356293, -0.013643786311149597, 0.26900485157966614, 0.3906218409538269, 0.14076998829841614, -0.3225950002670288, -0.17638498544692993, -0.008136813528835773, 0.4007485508918762, 0.10357676446437836, 0.25022032856941223, -0.18154177069664001, -0.04714185744524002, -0.4509265422821045, 0.49255937337875366, 0.21514518558979034, 0.264892041683197, -0.11775384843349457, -0.1629658341407776, -0.32944756746292114, -0.04924078658223152, 0.592811644077301, -0.363176167011261, 0.04434875398874283, 0.10195447504520416, -0.20818309485912323, -0.382881760597229, 0.05112947151064873, 0.007662627846002579, 0.3649105131626129, 0.05435469001531601, 0.3508074879646301, -0.08211499452590942, -0.073015496134758, -0.08691577613353729, 0.2223743498325348, -0.12459439039230347, 0.019601501524448395, -0.27436235547065735, -0.2049432396888733, -0.1433095633983612, 0.0314197763800621, -0.1528894156217575, 0.16506798565387726, -0.1800081580877304, -0.06853723526000977, -0.11314351856708527, -0.0563928484916687, 0.11538052558898926, 0.13470332324504852, 0.29450294375419617, -0.10000676661729813, 0.11873957514762878, 0.14418062567710876, 0.24052928388118744, 0.04237004369497299, 0.4583910405635834, -0.27559831738471985, -0.27809619903564453, -0.0670713558793068, 0.1208035945892334, -0.11464083939790726, 0.3437366485595703, -0.20401640236377716, -0.017340369522571564, -0.044456906616687775, -0.10204271972179413, -0.02124001830816269, -0.14110244810581207, -0.0019387109205126762, 0.37030303478240967, -0.20492413640022278, -0.28893688321113586, 0.23296445608139038, 0.23905159533023834, -0.20434916019439697, 0.4367760717868805, 0.34225577116012573, -0.28093525767326355, 0.16878968477249146, -0.19995886087417603, 0.7136853337287903, 0.1521686166524887, -0.02985379472374916, 0.08779972791671753, -0.16951783001422882, 0.45245498418807983, 0.31254637241363525, 0.1559777408838272, -0.06676805764436722, -0.2370488941669464, -0.0655059814453125, -0.03474707901477814, 0.15802299976348877, -0.11106160283088684, -0.2036348283290863, 0.5631487369537354, -0.05921915918588638, -0.03538796678185463, 0.1755862534046173, -0.11732907593250275, -0.20230765640735626, 0.019088424742221832, -0.4372626543045044, 0.09912529587745667, -0.021323680877685547, 0.25216639041900635, 0.0010582944378256798, -0.07672212272882462, 0.055220913141965866, -0.3087660074234009, -0.2637815475463867, -0.05239212512969971, -0.39920690655708313, -0.06592722982168198, 0.20812346041202545, -0.43327969312667847, 0.008973371237516403, 0.05262744799256325, 0.2566775679588318, -0.008180331438779831, -0.037300750613212585, -0.0075370147824287415, 0.07026883214712143, 0.49777132272720337, 0.23459263145923615, 0.025033168494701385, 0.28633007407188416, 0.08909415453672409, 0.186784029006958, 0.019597593694925308, -0.14201122522354126, -0.36083900928497314, -0.018652871251106262, 0.0038100332021713257, 0.11803290247917175, -0.15886607766151428, 0.028823044151067734, -0.2428554892539978, 0.021306436508893967, -0.3648621141910553, 0.0650937557220459, -0.0898350328207016, -0.00983914639800787, 0.09432125836610794, -0.016562480479478836, -0.22681789100170135, -0.005353085696697235, 0.6357892155647278, -0.14381468296051025, -0.4367527663707733, 0.12772074341773987, -0.00556609034538269, -0.22358423471450806, 0.035358674824237823, -0.20444118976593018, 0.027419164776802063, -0.2750847637653351, 0.2978781461715698, -0.25112488865852356, -0.10712830722332001, 0.26912951469421387, 0.32279300689697266, 0.18860851228237152, 0.214613139629364, -0.15166646242141724, -0.3945677876472473, -0.13708268105983734, 0.285457581281662, 0.04427365958690643, 0.05498090013861656, -0.031148791313171387, -0.32367050647735596, -0.14442208409309387, -0.20666389167308807, -0.22578871250152588, 0.008752115070819855, 0.33131393790245056, 0.07120858132839203, 0.19048745930194855, 0.22056341171264648, 0.1548963338136673, -0.19956424832344055, -0.013411498628556728, 0.07258662581443787, -0.20382021367549896, -0.10209281742572784, -0.09334567189216614, 0.09354174882173538, -0.09116014093160629, -0.2648991346359253, -0.15461929142475128, -0.0057536158710718155, 0.061403289437294006, -0.16469275951385498, 0.41826775670051575, 0.32141587138175964, -0.11824969947338104, -0.0536908321082592, -0.0327778123319149, 0.04722478240728378, 0.3035393953323364, 0.1383112072944641, 0.01856522262096405, 0.032671451568603516, 0.04270423948764801, 0.19944806396961212, -0.1875811666250229, 0.014096155762672424, 0.0820164754986763, 0.042396180331707, -0.2510473132133484, 0.027089882642030716, 0.3569346070289612, -0.2952960729598999, -0.02164008840918541, 0.5987738966941833, 0.35626745223999023, 0.24375972151756287, -0.13980628550052643, 0.11382973194122314, -0.07773864269256592, 0.15335774421691895, -0.27390503883361816, -0.33267828822135925, 0.20577828586101532, 0.2732258141040802, 0.06095707789063454, 0.18608182668685913, -0.0021066665649414062, 0.029159627854824066, 0.6171150803565979, 0.2176479995250702, 0.4478175938129425, -0.1253162920475006, 0.3508078157901764, 0.5271660089492798, 0.23262836039066315, 0.18437623977661133, 0.24172061681747437, 0.07372477650642395, 0.016092881560325623, 0.5080393552780151, -0.06601006537675858, 0.2586887776851654, 0.21974709630012512, 0.12877090275287628, -0.03551819920539856, -0.4662739038467407, -0.16567467153072357, 0.028322510421276093, -0.07974916696548462, 0.2506764531135559, 0.16615724563598633, 0.08566081523895264, -0.22328396141529083, -0.3345978558063507, 0.011488063260912895, 0.024898622184991837, -0.19362616539001465, -0.21611030399799347, 0.14463897049427032, -0.36391741037368774, -0.057149190455675125, 0.013486314564943314, -0.12084436416625977, 0.07040049880743027, 0.4529310464859009, -0.24694864451885223, -0.12836304306983948, -0.4731905162334442, -0.3793768286705017, 0.05004565790295601, 0.17476409673690796, -0.014010284096002579, 0.4047639071941376, 0.258781373500824, -0.22985482215881348, 0.22198832035064697, 0.25034376978874207, 0.48565059900283813, 0.2468242347240448, 0.027692187577486038, 0.01334693655371666, -0.14204943180084229, -0.05400650203227997, -0.09072275459766388, 0.33564189076423645, -0.08708329498767853, 0.030568327754735947, 0.1879347413778305, 0.11341014504432678, 0.000733465887606144, 0.2053901106119156, -0.040854621678590775, 0.39893990755081177, -0.4661810100078583, 0.08953436464071274, -0.23695385456085205, 0.28487932682037354, 0.015014959499239922, 0.10001436620950699, -0.24902543425559998, -0.11811482906341553, 0.17121459543704987, 0.23181088268756866, 0.2039029598236084, -0.10648466646671295, 0.07481089979410172, 0.1348544955253601, 0.07390917837619781, 0.4687880873680115, -0.09301317483186722, -0.0892462283372879, -0.14648915827274323, -0.653510332107544, -0.05586252361536026, 0.1423015147447586, 0.12806753814220428, -0.06351551413536072, 0.03753000497817993, 0.04901442304253578, 0.18468567728996277, 0.04347316920757294, -0.1836017370223999, 0.1054590716958046, -0.25151437520980835, -0.20000138878822327, -0.1759463995695114, 0.2301202267408371, -0.24214795231819153, 0.05484858900308609, -0.26591041684150696, 0.06277246028184891, -0.04169316962361336, 0.026953235268592834, -0.0059282053261995316, -0.06288377940654755, 0.06751438975334167, 0.3473338782787323, -0.13707388937473297, 0.34939005970954895, 0.2663174867630005, 0.03349287807941437, -0.0034478772431612015, -0.278297483921051, -0.19313564896583557, -0.2683139741420746, 0.07008456438779831, -0.29212450981140137, 0.49186089634895325, -0.40185970067977905, -0.30196312069892883, -0.18042156100273132, 0.27247440814971924, 0.1233787089586258, -0.12682853639125824, -0.47677913308143616, 0.16585826873779297, -0.05875708907842636, 0.08381269127130508, 0.00443768035620451, 0.5087336301803589, 0.05998682230710983, 0.3379512429237366, -0.22663088142871857, -0.3412230908870697, 0.53581702709198, -0.4137616455554962, -0.2617650628089905, -0.13192811608314514, -0.06397368013858795, 0.6073148846626282, -0.4836443364620209, -0.30437353253364563, -0.20376679301261902, 0.27199095487594604, -0.12000533193349838, -0.14902496337890625, 0.15557251870632172, -0.26529785990715027, 0.1745559126138687, -0.18920165300369263, -0.08706063032150269, 0.43938252329826355, -0.08826790004968643, 0.2773542106151581, -0.12994170188903809 ]
https://github.com/huggingface/datasets/issues/2937
load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied
Hi @daqieq, thanks for reporting. Unfortunately, I was not able to reproduce this bug: ```ipython In [1]: from datasets import load_dataset ...: ds = load_dataset('wiki_bio') Downloading: 7.58kB [00:00, 26.3kB/s] Downloading: 2.71kB [00:00, ?B/s] Using custom data configuration default Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\ 1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9... Downloading: 334MB [01:17, 4.32MB/s] Dataset wiki_bio downloaded and prepared to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9. Subsequent calls will reuse thi s data. ``` This kind of error messages usually happen because: - Your running Python script hasn't write access to that directory - You have another program (the File Explorer?) already browsing inside that directory
## Describe the bug Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11. ## Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('wiki_bio') ``` ## Expected results It is expected that the dataset downloads without any errors. ## Actual results PermissionError see trace below: ``` Using custom data configuration default Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset builder_instance.download_and_prepare( File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare self._save_info() File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__ next(self.gen) File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir os.rename(tmp_dir, dirname) PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9' ``` By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed. It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue. ## Environment info - `datasets` version: 1.12.1 - Platform: Windows-10-10.0.22449-SP0 - Python version: 3.8.12 - PyArrow version: 5.0.0
109
load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied ## Describe the bug Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11. ## Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('wiki_bio') ``` ## Expected results It is expected that the dataset downloads without any errors. ## Actual results PermissionError see trace below: ``` Using custom data configuration default Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset builder_instance.download_and_prepare( File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare self._save_info() File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__ next(self.gen) File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir os.rename(tmp_dir, dirname) PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9' ``` By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed. It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue. ## Environment info - `datasets` version: 1.12.1 - Platform: Windows-10-10.0.22449-SP0 - Python version: 3.8.12 - PyArrow version: 5.0.0 Hi @daqieq, thanks for reporting. Unfortunately, I was not able to reproduce this bug: ```ipython In [1]: from datasets import load_dataset ...: ds = load_dataset('wiki_bio') Downloading: 7.58kB [00:00, 26.3kB/s] Downloading: 2.71kB [00:00, ?B/s] Using custom data configuration default Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\ 1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9... Downloading: 334MB [01:17, 4.32MB/s] Dataset wiki_bio downloaded and prepared to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9. Subsequent calls will reuse thi s data. ``` This kind of error messages usually happen because: - Your running Python script hasn't write access to that directory - You have another program (the File Explorer?) already browsing inside that directory
[ -0.22893105447292328, 0.38345402479171753, 0.040345486253499985, 0.2550400197505951, -0.012111496180295944, 0.26225730776786804, 0.5036689639091492, 0.13295315206050873, 0.3442804515361786, 0.1357182413339615, -0.10897494852542877, 0.0772843211889267, 0.07315035164356232, -0.005698667839169502, -0.12562327086925507, 0.07892754673957825, 0.036445073783397675, -0.005388155579566956, 0.21494904160499573, 0.10395503044128418, -0.4238828718662262, 0.10729576647281647, -0.1728546917438507, 0.18611589074134827, 0.02609490044414997, -0.13634225726127625, 0.12125995755195618, 0.36072954535484314, -0.030788736417889595, -0.3922068774700165, 0.3530234694480896, 0.0634533241391182, 0.4639188349246979, 0.2582458257675171, -0.00011924598948098719, -0.013706348836421967, 0.23068425059318542, 0.1244996041059494, -0.0737270712852478, 0.08709956705570221, -0.18398481607437134, -0.14096809923648834, 0.16522926092147827, -0.09768719971179962, 0.17674356698989868, 0.36349114775657654, -0.1021372526884079, -0.20092961192131042, -0.013041839003562927, 0.37903404235839844, 0.15730063617229462, -0.038184791803359985, -0.118678018450737, -0.07520421594381332, 0.4933357536792755, -0.15929795801639557, -0.13317999243736267, 0.2798379361629486, 0.07902481406927109, -0.1145690307021141, -0.09899056702852249, 0.1995733678340912, -0.16214890778064728, 0.14715716242790222, 0.018658027052879333, 0.031129758805036545, 0.21623119711875916, -0.45810946822166443, 0.35214123129844666, 0.15125836431980133, 0.9656504988670349, -0.195573091506958, -0.1914043426513672, -0.08874819427728653, 0.013304111547768116, -0.03300251066684723, 0.4326036274433136, 0.42862406373023987, -0.32456856966018677, 0.25237080454826355, 0.06596970558166504, 0.08356554806232452, -0.08255104720592499, -0.001908905804157257, 0.07128584384918213, 0.1486530900001526, -0.05047055333852768, 0.11955634504556656, -0.1147308200597763, -0.0834009125828743, 0.3863350450992584, -0.21382763981819153, -0.2546023428440094, 0.19166730344295502, -0.33943650126457214, 0.28986987471580505, 0.05345261096954346, 0.7778055667877197, 0.15787765383720398, 0.31552964448928833, 0.12502345442771912, -0.05405201017856598, 0.21362465620040894, 0.0651903972029686, 0.008592668920755386, 0.3214899003505707, -0.11223883181810379, -0.016922790557146072, 0.42710626125335693, 0.11744193732738495, -0.08161693811416626, -0.008990537375211716, -0.02004595845937729, -0.42947396636009216, 0.3538796007633209, 0.10540708899497986, 0.40811824798583984, -0.28564128279685974, -0.12170109897851944, -0.00029508769512176514, 0.1581321358680725, -0.023971011862158775, 0.05888309329748154, 0.5011533498764038, -0.2717721462249756, 0.04268316924571991, 0.06825161725282669, 0.17944453656673431, 0.018610646948218346, 0.09776216745376587, -0.08779989182949066, -0.08900260925292969, -0.2667176425457001, -0.05143895745277405, 0.40864670276641846, -0.322576105594635, 0.09556524455547333, 0.256676584482193, 0.02704732120037079, -0.17929454147815704, 0.19183221459388733, -0.04149750620126724, -0.03285706788301468, 0.35768699645996094, 0.39729636907577515, 0.33763349056243896, 0.17493215203285217, -0.2122965008020401, -0.03499526530504227, 0.18631160259246826, -0.48729026317596436, -0.40250417590141296, -0.033664800226688385, 0.12132809311151505, -0.08332373201847076, 0.06320543587207794, -0.19803687930107117, -0.04825789853930473, 0.38231295347213745, -0.3008548319339752, -0.06183617562055588, -0.013725530356168747, -0.220620259642601, -0.5042762160301208, 0.04070822894573212, 0.40128839015960693, -0.35969823598861694, 0.1303667575120926, -0.0915532335639, -0.2640872299671173, 0.15043291449546814, 0.005637733265757561, 0.005634448956698179, 0.36168229579925537, -0.28122052550315857, 0.015607401728630066, 0.277459055185318, -0.3938949704170227, -1.0015968084335327, -0.021003341302275658, 0.07310013473033905, 0.1660415381193161, 0.24440604448318481, 0.11913758516311646, 0.3659377694129944, -0.030345479026436806, 0.17047597467899323, 0.31871259212493896, 0.1300753355026245, 0.11197447031736374, -0.06299630552530289, -0.20385552942752838, 0.279660701751709, 0.1339261829853058, 0.08833898603916168, 0.30090340971946716, 0.31260010600090027, -0.05693402886390686, 0.25109589099884033, -0.1872611790895462, 0.1168045699596405, 0.19251582026481628, 0.011496078222990036, -0.03513577580451965, 0.1375143975019455, -0.1277380883693695, -0.4204089641571045, 0.35144808888435364, -0.008118340745568275, 0.08516696840524673, 0.07597886770963669, -0.20274308323860168, -0.3184642195701599, 0.09134078025817871, -0.5447553992271423, -0.28899648785591125, 0.08510653674602509, 0.29389894008636475, 0.21242570877075195, 0.02368234470486641, 0.18916404247283936, 0.3374142050743103, -0.20822711288928986, 0.1271960586309433, -0.18114104866981506, 0.038606904447078705, -0.18833814561367035, -0.13644914329051971, -0.21224789321422577, 0.04691571742296219, 0.2001282274723053, 0.25274816155433655, -0.21343320608139038, 0.19610103964805603, 0.15121357142925262, 0.03749885410070419, -0.37855762243270874, -0.059557005763053894, -0.022377656772732735, 0.12172956764698029, 0.15684814751148224, 0.13817834854125977, 0.14832349121570587, -0.044394154101610184, -0.19221922755241394, 0.1377543956041336, -0.15963472425937653, 0.14373135566711426, -0.3266507387161255, 0.24303588271141052, 0.24470657110214233, 0.09005042910575867, 0.08569688349962234, 0.03445235639810562, 0.30547037720680237, 0.02411862276494503, 0.07459601759910583, -0.2858038544654846, 0.1012619137763977, -0.07780914753675461, 0.05930323526263237, 0.022547908127307892, 0.08128238469362259, 0.24975329637527466, -0.17460155487060547, 0.0168861523270607, 0.28699350357055664, 0.3496789336204529, 0.5377135872840881, -0.04098674654960632, 0.05155012756586075, 0.06679752469062805, 0.047912269830703735, 0.08966917544603348, 0.11925183981657028, 0.08577112853527069, -0.0702270045876503, 0.26344922184944153, 0.12843413650989532, 0.22416624426841736, -0.06479806452989578, -0.1138603538274765, -0.10754140466451645, 0.4194294214248657, -0.48751336336135864, -0.08438761532306671, 0.10005459189414978, 0.07484018057584763, 0.18120110034942627, -0.24284698069095612, -0.08878137171268463, -0.14609836041927338, -0.24304606020450592, 0.31163668632507324, 0.0940709263086319, 0.08353795111179352, -0.5119563341140747, 0.16444027423858643, 0.007537784054875374, -0.20180559158325195, -0.11375711858272552, 0.12387923151254654, -0.16583377122879028, -0.014107219874858856, 0.18624506890773773, -0.17993929982185364, 0.18738843500614166, -0.29515889286994934, 0.24375136196613312, -0.39017677307128906, -0.19543327391147614, 0.015109807252883911, 0.057886600494384766, 0.409841924905777, 0.12543129920959473, 0.1551070511341095, 0.18641042709350586, -0.3417653739452362, 0.05660320818424225, -0.10751954466104507, -0.15106140077114105, 0.23337113857269287, -0.055027563124895096, 0.09385494142770767, 0.034196507185697556, -0.24937549233436584, -0.5408254265785217, -0.2501787543296814, -0.009575776755809784, 0.38589024543762207, 0.09830191731452942, -0.002851073630154133, -0.11265332996845245, 0.00334379356354475, 0.26702892780303955, 0.3937676250934601, -0.21082812547683716, -0.2492024451494217, 0.21024949848651886, -0.20926876366138458, -0.33469969034194946, 0.08194918930530548, -0.10423030704259872, 0.04457155987620354, 0.2523822784423828, -0.4788484573364258, -0.09063425660133362, -0.36006608605384827, 0.4096080958843231, -0.23261573910713196, 0.09382889419794083, 0.34630483388900757, 0.08929312974214554, 0.14639870822429657, -0.04174847900867462, -0.2757156491279602, -0.06513554602861404, -0.294641375541687, -0.06823261827230453, 0.338198184967041, 0.4274495840072632, -0.05757026746869087, 0.3770318031311035, 0.30022844672203064, 0.3604489862918854, 0.33447161316871643, 0.045840829610824585, 0.3711133301258087, 0.05426084250211716, -0.2594742178916931, 0.10877581685781479, -0.19434574246406555, -0.14016005396842957, 0.3007435202598572, 0.08898176997900009, -0.19526353478431702, -0.052531737834215164, -0.38045358657836914, -0.2807893455028534, -0.28528618812561035, -0.09924308955669403, -0.2463313639163971, 0.25375664234161377, 0.11914049088954926, 0.11004225164651871, -0.44624456763267517, -0.36911436915397644, 0.0288442000746727, 0.5546335577964783, -0.3098396956920624, 0.11157587170600891, -0.35080355405807495, 0.1366976648569107, -0.6549718379974365, 0.2522450089454651, 0.03402533754706383, 0.4958058297634125, -0.17412368953227997, 0.12669822573661804, -0.001507483422756195, -0.10742941498756409, 0.5570668578147888, -0.6522977948188782, 0.4618297815322876, 0.05812269076704979, 0.11573196947574615, 0.010196911171078682, -0.22434526681900024, -0.09225606918334961, 0.2416793406009674, 0.13694222271442413, 0.21455557644367218, 0.1639215052127838, 0.04404149949550629, 0.07620953768491745, 0.1665930151939392, -0.20013268291950226, -0.27905774116516113, -0.22713546454906464, -0.3418883681297302, -0.39038607478141785, 0.12800632417201996, 0.04219867289066315, 0.18547098338603973, -0.15174342691898346, 0.11716079711914062, -0.4046885371208191, 0.23697802424430847, 0.13017883896827698, 0.16028201580047607, 0.18779224157333374, 0.06457553803920746, 0.2181592434644699, -0.04804571717977524, 0.07534874230623245, -0.12915588915348053, 0.524086594581604, -0.280476838350296, -0.32837823033332825, -0.05249052494764328, -0.19998617470264435, -0.11711714416742325, 0.11224104464054108, -0.32655784487724304, -0.050091199576854706, -0.13848155736923218, -0.13273650407791138, -0.31433025002479553, 0.11707472056150436, 0.04260404780507088, -0.13543389737606049, -0.37768280506134033, -0.3201932907104492, 0.3641441762447357, 0.2117007076740265, -0.44672733545303345, 0.34047406911849976, 0.119847871363163, -0.42806297540664673, 0.1824691742658615, 0.051760539412498474, 0.7466560006141663, 0.07989033311605453, 0.27802082896232605, 0.0972772017121315, -0.11229567229747772, 0.2001180499792099, 0.11617879569530487, 0.05655685067176819, -0.37288698554039, -0.4541013538837433, -0.09887155890464783, -0.22054263949394226, -0.13453662395477295, -0.024941042065620422, -0.2337944060564041, 0.2817450761795044, -0.11297871917486191, 0.31880494952201843, 0.27430960536003113, 0.04803814738988876, -0.3741960823535919, -0.3764992952346802, -0.12099462747573853, 0.12518657743930817, -0.19382379949092865, 0.13586898148059845, -0.22749045491218567, 0.09111583977937698, 0.08490483462810516, -0.1673942655324936, -0.43912166357040405, 0.1967896819114685, -0.4114464521408081, 0.1381179690361023, -0.29741811752319336, -0.38368284702301025, 0.08779963850975037, 0.5960646867752075, 0.284967839717865, 0.3604602515697479, -0.1543024629354477, 0.06006704270839691, 0.0793890729546547, 0.11794424057006836, 0.02495737001299858, 0.0074557894840836525, 0.19626401364803314, -0.08069460093975067, -0.29818886518478394, -0.015169307589530945, -0.27812710404396057, -0.3215295076370239, -0.105553038418293, 0.28626760840415955, 0.40390515327453613, -0.320111483335495, -0.20768886804580688, -0.31064632534980774, 0.08497351408004761, -0.2798957824707031, 0.09370319545269012, 0.047042153775691986, -0.07560183852910995, 0.37954121828079224, -0.3368881046772003, -0.42571231722831726, -0.14751766622066498, 0.524276077747345, -0.07907655835151672, -0.13375595211982727, 0.5711392164230347, -0.048503048717975616, -0.17853936553001404, -0.01303231529891491, 0.14549288153648376, -0.10098472237586975, -0.46245837211608887, -0.10034400224685669, -0.12253542989492416, 0.10782840847969055, -0.02910695970058441, 0.16985073685646057, 0.27879685163497925, -0.09631005674600601, 0.053403567522764206, -0.75813889503479, -0.2621009051799774, -0.11298516392707825, -0.231143519282341, 0.17163561284542084, 0.18311110138893127, -0.44054079055786133, -0.13530538976192474, -0.28408050537109375, -0.20300325751304626, 0.04410110414028168, -0.21473431587219238, -0.1294415444135666, 0.27790114283561707, 0.15455769002437592, -0.0013412097468972206, 0.12451329827308655, -0.0026244893670082092, 0.09265878796577454, 0.12275488674640656, -0.17137017846107483, -0.12370964884757996, 0.1475239396095276, 0.10378225147724152, -0.0918002501130104, 0.026753831654787064, -0.3284255862236023, -0.07359741628170013, -0.0984257385134697, 0.3940446376800537, 0.2593081593513489, -0.028157226741313934, 0.06791762262582779, -0.12768340110778809, 0.28947070240974426, -0.28270506858825684, 0.4151187539100647, -0.34728410840034485, -0.025130480527877808, -0.013373443856835365, 0.3347688317298889, -0.141316756606102, 0.05412669479846954, -0.11745326966047287, -0.08249495178461075, 0.1532546579837799, 0.06789711862802505, 0.06460647284984589, -0.3769117593765259, 0.0850258320569992, 0.17875710129737854, 0.05933326482772827, 0.06236382573843002, -0.23318256437778473, 0.014841282740235329, 0.24505004286766052, 0.15899252891540527, -0.09227059781551361, -0.12948787212371826, -0.012007571756839752, -0.3234775960445404, -0.17904454469680786, 0.3004147410392761, 0.1639574021100998, -0.38362520933151245, 0.1359911561012268, -0.032405201345682144, 0.5581635236740112, -0.22469530999660492, -0.05772074684500694, 0.4813494384288788, -0.21740023791790009, 0.27380892634391785, 0.21858616173267365, 0.25964298844337463, -0.08437993377447128, 0.551478385925293, 0.1820426881313324, 0.13673906028270721, -0.005867946892976761, -0.17204800248146057, -0.10305257886648178, -0.6628068089485168, 0.2800285220146179, 0.06525275856256485, -0.07369078695774078, 0.05094320327043533, -0.02961721271276474, -0.00863552838563919, -0.3041154742240906, -0.0021536657586693764, -0.43828171491622925, -0.21689368784427643, -0.18088364601135254, -0.2836601138114929, 0.0684342309832573, -0.23384305834770203, 0.17253975570201874, 0.09277597069740295, -0.17077626287937164, -0.14519624412059784, -0.0699784904718399, -0.042751505970954895, -0.303575336933136, -0.2684680223464966, 0.11163219809532166, 0.41336801648139954, -0.2662926912307739, -0.19269151985645294, 0.08904927968978882, 0.0064429715275764465, 0.23958076536655426, 0.08864153921604156, 0.09613712131977081, 0.7200039029121399, 0.36966079473495483, -0.18670602142810822, -0.08271224796772003, 0.20437930524349213, 0.08497972041368484, -0.1013353168964386, 0.30956217646598816, 0.1992662250995636, 0.17723071575164795, 0.3453558683395386, 0.11968505382537842, -0.12446681410074234, 0.03745853155851364, 0.03806000202894211, -0.008947545662522316, -0.08347918093204498, 0.18735942244529724, -0.17643530666828156, -0.1684236377477646, 0.1405666172504425, 0.19802328944206238, -0.07277756184339523, 0.17002755403518677, 0.23236899077892303, 0.06273753196001053, 0.19450896978378296, -0.19005410373210907, 0.02006204053759575, 0.14877964556217194, 0.31554609537124634, 0.35036221146583557, 0.09806947410106659, -0.23355334997177124, -0.06835935264825821, -0.5775805711746216, 0.25459524989128113, -0.01822478696703911, -0.38001489639282227, -0.032235048711299896, -0.1324881762266159, -0.33680179715156555, 0.10613509267568588, 0.16192322969436646, -0.10909673571586609, 0.0555582270026207, 0.2668955326080322, -0.15676136314868927, -0.2936108410358429, 0.38943731784820557, -0.037769339978694916, -0.07810090482234955, -0.6786638498306274, 0.03660114109516144, -0.08876019716262817, 0.032007843255996704, -0.1506994068622589, -0.16663798689842224, 0.03415028750896454, -0.02607458084821701, 0.5437768697738647, 0.26441267132759094, 0.45556047558784485, 0.007837601006031036, 0.09181345254182816, -0.5622044801712036, -0.0687977597117424, -0.14528989791870117, -0.033695004880428314, -0.07782581448554993, 0.2713488042354584, -0.22750388085842133, 0.04143596440553665, -0.12419243156909943, 0.16709394752979279, 0.2662992477416992, 0.3795423209667206, -0.005456246435642242, 0.22790509462356567, 0.18094375729560852, 0.15718919038772583, 0.3478449583053589, 0.06997201591730118, -0.09617958962917328, 0.44603660702705383, -0.24093419313430786, -0.34204840660095215, 0.21094822883605957, -0.39415040612220764, -0.3340475857257843, -0.019208623096346855, 0.32515692710876465, -0.2549190819263458, -0.1531335711479187, -0.2379634976387024, 0.2061091661453247, 0.24783967435359955, -0.14348047971725464, -0.3868970572948456, 0.14134523272514343, -0.15703512728214264, 0.1402919888496399, -0.022752363234758377, 0.03422372043132782, 0.010135134682059288, -0.2253900170326233, 0.1708669513463974, -0.23743672668933868 ]
https://github.com/huggingface/datasets/issues/2937
load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied
Thanks @albertvillanova for looking at it! I tried on my personal Windows machine and it downloaded just fine. Running on my work machine and on a colleague's machine it is consistently hitting this error. It's not a write access issue because the `.incomplete` directory is written just fine. It just won't rename and then it deletes the directory in the `finally` step. Also the zip file is written and extracted fine in the downloads directory. That leaves another program that might be interfering, and there are plenty of those in my work machine ... (full antivirus, data loss prevention, etc.). So the question remains, why not extend the `try` block to allow catching the error and circle back to the rename after the unknown program is finished doing its 'stuff'. This is the approach that I read about in the linked repo (see my comments above). If it's not high priority, that's fine. However, if someone were to write an PR that solved this issue in our environment in an `except` clause, would it be reviewed for inclusion in a future release? Just wondering whether I should spend any more time on this issue.
## Describe the bug Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11. ## Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('wiki_bio') ``` ## Expected results It is expected that the dataset downloads without any errors. ## Actual results PermissionError see trace below: ``` Using custom data configuration default Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset builder_instance.download_and_prepare( File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare self._save_info() File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__ next(self.gen) File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir os.rename(tmp_dir, dirname) PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9' ``` By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed. It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue. ## Environment info - `datasets` version: 1.12.1 - Platform: Windows-10-10.0.22449-SP0 - Python version: 3.8.12 - PyArrow version: 5.0.0
194
load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied ## Describe the bug Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11. ## Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('wiki_bio') ``` ## Expected results It is expected that the dataset downloads without any errors. ## Actual results PermissionError see trace below: ``` Using custom data configuration default Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset builder_instance.download_and_prepare( File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare self._save_info() File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__ next(self.gen) File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir os.rename(tmp_dir, dirname) PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9' ``` By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed. It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue. ## Environment info - `datasets` version: 1.12.1 - Platform: Windows-10-10.0.22449-SP0 - Python version: 3.8.12 - PyArrow version: 5.0.0 Thanks @albertvillanova for looking at it! I tried on my personal Windows machine and it downloaded just fine. Running on my work machine and on a colleague's machine it is consistently hitting this error. It's not a write access issue because the `.incomplete` directory is written just fine. It just won't rename and then it deletes the directory in the `finally` step. Also the zip file is written and extracted fine in the downloads directory. That leaves another program that might be interfering, and there are plenty of those in my work machine ... (full antivirus, data loss prevention, etc.). So the question remains, why not extend the `try` block to allow catching the error and circle back to the rename after the unknown program is finished doing its 'stuff'. This is the approach that I read about in the linked repo (see my comments above). If it's not high priority, that's fine. However, if someone were to write an PR that solved this issue in our environment in an `except` clause, would it be reviewed for inclusion in a future release? Just wondering whether I should spend any more time on this issue.
[ -0.22893105447292328, 0.38345402479171753, 0.040345486253499985, 0.2550400197505951, -0.012111496180295944, 0.26225730776786804, 0.5036689639091492, 0.13295315206050873, 0.3442804515361786, 0.1357182413339615, -0.10897494852542877, 0.0772843211889267, 0.07315035164356232, -0.005698667839169502, -0.12562327086925507, 0.07892754673957825, 0.036445073783397675, -0.005388155579566956, 0.21494904160499573, 0.10395503044128418, -0.4238828718662262, 0.10729576647281647, -0.1728546917438507, 0.18611589074134827, 0.02609490044414997, -0.13634225726127625, 0.12125995755195618, 0.36072954535484314, -0.030788736417889595, -0.3922068774700165, 0.3530234694480896, 0.0634533241391182, 0.4639188349246979, 0.2582458257675171, -0.00011924598948098719, -0.013706348836421967, 0.23068425059318542, 0.1244996041059494, -0.0737270712852478, 0.08709956705570221, -0.18398481607437134, -0.14096809923648834, 0.16522926092147827, -0.09768719971179962, 0.17674356698989868, 0.36349114775657654, -0.1021372526884079, -0.20092961192131042, -0.013041839003562927, 0.37903404235839844, 0.15730063617229462, -0.038184791803359985, -0.118678018450737, -0.07520421594381332, 0.4933357536792755, -0.15929795801639557, -0.13317999243736267, 0.2798379361629486, 0.07902481406927109, -0.1145690307021141, -0.09899056702852249, 0.1995733678340912, -0.16214890778064728, 0.14715716242790222, 0.018658027052879333, 0.031129758805036545, 0.21623119711875916, -0.45810946822166443, 0.35214123129844666, 0.15125836431980133, 0.9656504988670349, -0.195573091506958, -0.1914043426513672, -0.08874819427728653, 0.013304111547768116, -0.03300251066684723, 0.4326036274433136, 0.42862406373023987, -0.32456856966018677, 0.25237080454826355, 0.06596970558166504, 0.08356554806232452, -0.08255104720592499, -0.001908905804157257, 0.07128584384918213, 0.1486530900001526, -0.05047055333852768, 0.11955634504556656, -0.1147308200597763, -0.0834009125828743, 0.3863350450992584, -0.21382763981819153, -0.2546023428440094, 0.19166730344295502, -0.33943650126457214, 0.28986987471580505, 0.05345261096954346, 0.7778055667877197, 0.15787765383720398, 0.31552964448928833, 0.12502345442771912, -0.05405201017856598, 0.21362465620040894, 0.0651903972029686, 0.008592668920755386, 0.3214899003505707, -0.11223883181810379, -0.016922790557146072, 0.42710626125335693, 0.11744193732738495, -0.08161693811416626, -0.008990537375211716, -0.02004595845937729, -0.42947396636009216, 0.3538796007633209, 0.10540708899497986, 0.40811824798583984, -0.28564128279685974, -0.12170109897851944, -0.00029508769512176514, 0.1581321358680725, -0.023971011862158775, 0.05888309329748154, 0.5011533498764038, -0.2717721462249756, 0.04268316924571991, 0.06825161725282669, 0.17944453656673431, 0.018610646948218346, 0.09776216745376587, -0.08779989182949066, -0.08900260925292969, -0.2667176425457001, -0.05143895745277405, 0.40864670276641846, -0.322576105594635, 0.09556524455547333, 0.256676584482193, 0.02704732120037079, -0.17929454147815704, 0.19183221459388733, -0.04149750620126724, -0.03285706788301468, 0.35768699645996094, 0.39729636907577515, 0.33763349056243896, 0.17493215203285217, -0.2122965008020401, -0.03499526530504227, 0.18631160259246826, -0.48729026317596436, -0.40250417590141296, -0.033664800226688385, 0.12132809311151505, -0.08332373201847076, 0.06320543587207794, -0.19803687930107117, -0.04825789853930473, 0.38231295347213745, -0.3008548319339752, -0.06183617562055588, -0.013725530356168747, -0.220620259642601, -0.5042762160301208, 0.04070822894573212, 0.40128839015960693, -0.35969823598861694, 0.1303667575120926, -0.0915532335639, -0.2640872299671173, 0.15043291449546814, 0.005637733265757561, 0.005634448956698179, 0.36168229579925537, -0.28122052550315857, 0.015607401728630066, 0.277459055185318, -0.3938949704170227, -1.0015968084335327, -0.021003341302275658, 0.07310013473033905, 0.1660415381193161, 0.24440604448318481, 0.11913758516311646, 0.3659377694129944, -0.030345479026436806, 0.17047597467899323, 0.31871259212493896, 0.1300753355026245, 0.11197447031736374, -0.06299630552530289, -0.20385552942752838, 0.279660701751709, 0.1339261829853058, 0.08833898603916168, 0.30090340971946716, 0.31260010600090027, -0.05693402886390686, 0.25109589099884033, -0.1872611790895462, 0.1168045699596405, 0.19251582026481628, 0.011496078222990036, -0.03513577580451965, 0.1375143975019455, -0.1277380883693695, -0.4204089641571045, 0.35144808888435364, -0.008118340745568275, 0.08516696840524673, 0.07597886770963669, -0.20274308323860168, -0.3184642195701599, 0.09134078025817871, -0.5447553992271423, -0.28899648785591125, 0.08510653674602509, 0.29389894008636475, 0.21242570877075195, 0.02368234470486641, 0.18916404247283936, 0.3374142050743103, -0.20822711288928986, 0.1271960586309433, -0.18114104866981506, 0.038606904447078705, -0.18833814561367035, -0.13644914329051971, -0.21224789321422577, 0.04691571742296219, 0.2001282274723053, 0.25274816155433655, -0.21343320608139038, 0.19610103964805603, 0.15121357142925262, 0.03749885410070419, -0.37855762243270874, -0.059557005763053894, -0.022377656772732735, 0.12172956764698029, 0.15684814751148224, 0.13817834854125977, 0.14832349121570587, -0.044394154101610184, -0.19221922755241394, 0.1377543956041336, -0.15963472425937653, 0.14373135566711426, -0.3266507387161255, 0.24303588271141052, 0.24470657110214233, 0.09005042910575867, 0.08569688349962234, 0.03445235639810562, 0.30547037720680237, 0.02411862276494503, 0.07459601759910583, -0.2858038544654846, 0.1012619137763977, -0.07780914753675461, 0.05930323526263237, 0.022547908127307892, 0.08128238469362259, 0.24975329637527466, -0.17460155487060547, 0.0168861523270607, 0.28699350357055664, 0.3496789336204529, 0.5377135872840881, -0.04098674654960632, 0.05155012756586075, 0.06679752469062805, 0.047912269830703735, 0.08966917544603348, 0.11925183981657028, 0.08577112853527069, -0.0702270045876503, 0.26344922184944153, 0.12843413650989532, 0.22416624426841736, -0.06479806452989578, -0.1138603538274765, -0.10754140466451645, 0.4194294214248657, -0.48751336336135864, -0.08438761532306671, 0.10005459189414978, 0.07484018057584763, 0.18120110034942627, -0.24284698069095612, -0.08878137171268463, -0.14609836041927338, -0.24304606020450592, 0.31163668632507324, 0.0940709263086319, 0.08353795111179352, -0.5119563341140747, 0.16444027423858643, 0.007537784054875374, -0.20180559158325195, -0.11375711858272552, 0.12387923151254654, -0.16583377122879028, -0.014107219874858856, 0.18624506890773773, -0.17993929982185364, 0.18738843500614166, -0.29515889286994934, 0.24375136196613312, -0.39017677307128906, -0.19543327391147614, 0.015109807252883911, 0.057886600494384766, 0.409841924905777, 0.12543129920959473, 0.1551070511341095, 0.18641042709350586, -0.3417653739452362, 0.05660320818424225, -0.10751954466104507, -0.15106140077114105, 0.23337113857269287, -0.055027563124895096, 0.09385494142770767, 0.034196507185697556, -0.24937549233436584, -0.5408254265785217, -0.2501787543296814, -0.009575776755809784, 0.38589024543762207, 0.09830191731452942, -0.002851073630154133, -0.11265332996845245, 0.00334379356354475, 0.26702892780303955, 0.3937676250934601, -0.21082812547683716, -0.2492024451494217, 0.21024949848651886, -0.20926876366138458, -0.33469969034194946, 0.08194918930530548, -0.10423030704259872, 0.04457155987620354, 0.2523822784423828, -0.4788484573364258, -0.09063425660133362, -0.36006608605384827, 0.4096080958843231, -0.23261573910713196, 0.09382889419794083, 0.34630483388900757, 0.08929312974214554, 0.14639870822429657, -0.04174847900867462, -0.2757156491279602, -0.06513554602861404, -0.294641375541687, -0.06823261827230453, 0.338198184967041, 0.4274495840072632, -0.05757026746869087, 0.3770318031311035, 0.30022844672203064, 0.3604489862918854, 0.33447161316871643, 0.045840829610824585, 0.3711133301258087, 0.05426084250211716, -0.2594742178916931, 0.10877581685781479, -0.19434574246406555, -0.14016005396842957, 0.3007435202598572, 0.08898176997900009, -0.19526353478431702, -0.052531737834215164, -0.38045358657836914, -0.2807893455028534, -0.28528618812561035, -0.09924308955669403, -0.2463313639163971, 0.25375664234161377, 0.11914049088954926, 0.11004225164651871, -0.44624456763267517, -0.36911436915397644, 0.0288442000746727, 0.5546335577964783, -0.3098396956920624, 0.11157587170600891, -0.35080355405807495, 0.1366976648569107, -0.6549718379974365, 0.2522450089454651, 0.03402533754706383, 0.4958058297634125, -0.17412368953227997, 0.12669822573661804, -0.001507483422756195, -0.10742941498756409, 0.5570668578147888, -0.6522977948188782, 0.4618297815322876, 0.05812269076704979, 0.11573196947574615, 0.010196911171078682, -0.22434526681900024, -0.09225606918334961, 0.2416793406009674, 0.13694222271442413, 0.21455557644367218, 0.1639215052127838, 0.04404149949550629, 0.07620953768491745, 0.1665930151939392, -0.20013268291950226, -0.27905774116516113, -0.22713546454906464, -0.3418883681297302, -0.39038607478141785, 0.12800632417201996, 0.04219867289066315, 0.18547098338603973, -0.15174342691898346, 0.11716079711914062, -0.4046885371208191, 0.23697802424430847, 0.13017883896827698, 0.16028201580047607, 0.18779224157333374, 0.06457553803920746, 0.2181592434644699, -0.04804571717977524, 0.07534874230623245, -0.12915588915348053, 0.524086594581604, -0.280476838350296, -0.32837823033332825, -0.05249052494764328, -0.19998617470264435, -0.11711714416742325, 0.11224104464054108, -0.32655784487724304, -0.050091199576854706, -0.13848155736923218, -0.13273650407791138, -0.31433025002479553, 0.11707472056150436, 0.04260404780507088, -0.13543389737606049, -0.37768280506134033, -0.3201932907104492, 0.3641441762447357, 0.2117007076740265, -0.44672733545303345, 0.34047406911849976, 0.119847871363163, -0.42806297540664673, 0.1824691742658615, 0.051760539412498474, 0.7466560006141663, 0.07989033311605453, 0.27802082896232605, 0.0972772017121315, -0.11229567229747772, 0.2001180499792099, 0.11617879569530487, 0.05655685067176819, -0.37288698554039, -0.4541013538837433, -0.09887155890464783, -0.22054263949394226, -0.13453662395477295, -0.024941042065620422, -0.2337944060564041, 0.2817450761795044, -0.11297871917486191, 0.31880494952201843, 0.27430960536003113, 0.04803814738988876, -0.3741960823535919, -0.3764992952346802, -0.12099462747573853, 0.12518657743930817, -0.19382379949092865, 0.13586898148059845, -0.22749045491218567, 0.09111583977937698, 0.08490483462810516, -0.1673942655324936, -0.43912166357040405, 0.1967896819114685, -0.4114464521408081, 0.1381179690361023, -0.29741811752319336, -0.38368284702301025, 0.08779963850975037, 0.5960646867752075, 0.284967839717865, 0.3604602515697479, -0.1543024629354477, 0.06006704270839691, 0.0793890729546547, 0.11794424057006836, 0.02495737001299858, 0.0074557894840836525, 0.19626401364803314, -0.08069460093975067, -0.29818886518478394, -0.015169307589530945, -0.27812710404396057, -0.3215295076370239, -0.105553038418293, 0.28626760840415955, 0.40390515327453613, -0.320111483335495, -0.20768886804580688, -0.31064632534980774, 0.08497351408004761, -0.2798957824707031, 0.09370319545269012, 0.047042153775691986, -0.07560183852910995, 0.37954121828079224, -0.3368881046772003, -0.42571231722831726, -0.14751766622066498, 0.524276077747345, -0.07907655835151672, -0.13375595211982727, 0.5711392164230347, -0.048503048717975616, -0.17853936553001404, -0.01303231529891491, 0.14549288153648376, -0.10098472237586975, -0.46245837211608887, -0.10034400224685669, -0.12253542989492416, 0.10782840847969055, -0.02910695970058441, 0.16985073685646057, 0.27879685163497925, -0.09631005674600601, 0.053403567522764206, -0.75813889503479, -0.2621009051799774, -0.11298516392707825, -0.231143519282341, 0.17163561284542084, 0.18311110138893127, -0.44054079055786133, -0.13530538976192474, -0.28408050537109375, -0.20300325751304626, 0.04410110414028168, -0.21473431587219238, -0.1294415444135666, 0.27790114283561707, 0.15455769002437592, -0.0013412097468972206, 0.12451329827308655, -0.0026244893670082092, 0.09265878796577454, 0.12275488674640656, -0.17137017846107483, -0.12370964884757996, 0.1475239396095276, 0.10378225147724152, -0.0918002501130104, 0.026753831654787064, -0.3284255862236023, -0.07359741628170013, -0.0984257385134697, 0.3940446376800537, 0.2593081593513489, -0.028157226741313934, 0.06791762262582779, -0.12768340110778809, 0.28947070240974426, -0.28270506858825684, 0.4151187539100647, -0.34728410840034485, -0.025130480527877808, -0.013373443856835365, 0.3347688317298889, -0.141316756606102, 0.05412669479846954, -0.11745326966047287, -0.08249495178461075, 0.1532546579837799, 0.06789711862802505, 0.06460647284984589, -0.3769117593765259, 0.0850258320569992, 0.17875710129737854, 0.05933326482772827, 0.06236382573843002, -0.23318256437778473, 0.014841282740235329, 0.24505004286766052, 0.15899252891540527, -0.09227059781551361, -0.12948787212371826, -0.012007571756839752, -0.3234775960445404, -0.17904454469680786, 0.3004147410392761, 0.1639574021100998, -0.38362520933151245, 0.1359911561012268, -0.032405201345682144, 0.5581635236740112, -0.22469530999660492, -0.05772074684500694, 0.4813494384288788, -0.21740023791790009, 0.27380892634391785, 0.21858616173267365, 0.25964298844337463, -0.08437993377447128, 0.551478385925293, 0.1820426881313324, 0.13673906028270721, -0.005867946892976761, -0.17204800248146057, -0.10305257886648178, -0.6628068089485168, 0.2800285220146179, 0.06525275856256485, -0.07369078695774078, 0.05094320327043533, -0.02961721271276474, -0.00863552838563919, -0.3041154742240906, -0.0021536657586693764, -0.43828171491622925, -0.21689368784427643, -0.18088364601135254, -0.2836601138114929, 0.0684342309832573, -0.23384305834770203, 0.17253975570201874, 0.09277597069740295, -0.17077626287937164, -0.14519624412059784, -0.0699784904718399, -0.042751505970954895, -0.303575336933136, -0.2684680223464966, 0.11163219809532166, 0.41336801648139954, -0.2662926912307739, -0.19269151985645294, 0.08904927968978882, 0.0064429715275764465, 0.23958076536655426, 0.08864153921604156, 0.09613712131977081, 0.7200039029121399, 0.36966079473495483, -0.18670602142810822, -0.08271224796772003, 0.20437930524349213, 0.08497972041368484, -0.1013353168964386, 0.30956217646598816, 0.1992662250995636, 0.17723071575164795, 0.3453558683395386, 0.11968505382537842, -0.12446681410074234, 0.03745853155851364, 0.03806000202894211, -0.008947545662522316, -0.08347918093204498, 0.18735942244529724, -0.17643530666828156, -0.1684236377477646, 0.1405666172504425, 0.19802328944206238, -0.07277756184339523, 0.17002755403518677, 0.23236899077892303, 0.06273753196001053, 0.19450896978378296, -0.19005410373210907, 0.02006204053759575, 0.14877964556217194, 0.31554609537124634, 0.35036221146583557, 0.09806947410106659, -0.23355334997177124, -0.06835935264825821, -0.5775805711746216, 0.25459524989128113, -0.01822478696703911, -0.38001489639282227, -0.032235048711299896, -0.1324881762266159, -0.33680179715156555, 0.10613509267568588, 0.16192322969436646, -0.10909673571586609, 0.0555582270026207, 0.2668955326080322, -0.15676136314868927, -0.2936108410358429, 0.38943731784820557, -0.037769339978694916, -0.07810090482234955, -0.6786638498306274, 0.03660114109516144, -0.08876019716262817, 0.032007843255996704, -0.1506994068622589, -0.16663798689842224, 0.03415028750896454, -0.02607458084821701, 0.5437768697738647, 0.26441267132759094, 0.45556047558784485, 0.007837601006031036, 0.09181345254182816, -0.5622044801712036, -0.0687977597117424, -0.14528989791870117, -0.033695004880428314, -0.07782581448554993, 0.2713488042354584, -0.22750388085842133, 0.04143596440553665, -0.12419243156909943, 0.16709394752979279, 0.2662992477416992, 0.3795423209667206, -0.005456246435642242, 0.22790509462356567, 0.18094375729560852, 0.15718919038772583, 0.3478449583053589, 0.06997201591730118, -0.09617958962917328, 0.44603660702705383, -0.24093419313430786, -0.34204840660095215, 0.21094822883605957, -0.39415040612220764, -0.3340475857257843, -0.019208623096346855, 0.32515692710876465, -0.2549190819263458, -0.1531335711479187, -0.2379634976387024, 0.2061091661453247, 0.24783967435359955, -0.14348047971725464, -0.3868970572948456, 0.14134523272514343, -0.15703512728214264, 0.1402919888496399, -0.022752363234758377, 0.03422372043132782, 0.010135134682059288, -0.2253900170326233, 0.1708669513463974, -0.23743672668933868 ]
https://github.com/huggingface/datasets/issues/2934
to_tf_dataset keeps a reference to the open data somewhere, causing issues on windows
I did some investigation and, as it seems, the bug stems from [this line](https://github.com/huggingface/datasets/blob/8004d7c3e1d74b29c3e5b0d1660331cd26758363/src/datasets/arrow_dataset.py#L325). The lifecycle of the dataset from the linked line is bound to one of the returned `tf.data.Dataset`. So my (hacky) solution involves wrapping the linked dataset with `weakref.proxy` and adding a custom `__del__` to `tf.python.data.ops.dataset_ops.TensorSliceDataset` (this is the type of a dataset that is returned by `tf.data.Dataset.from_tensor_slices`; this works for TF 2.x, but I'm not sure `tf.python.data.ops.dataset_ops` is a valid path for TF 1.x) that deletes the linked dataset, which is assigned to the dataset object as a property. Will open a draft PR soon!
To reproduce: ```python import datasets as ds import weakref import gc d = ds.load_dataset("mnist", split="train") ref = weakref.ref(d._data.table) tfd = d.to_tf_dataset("image", batch_size=1, shuffle=False, label_cols="label") del tfd, d gc.collect() assert ref() is None, "Error: there is at least one reference left" ``` This causes issues because the table holds a reference to an open arrow file that should be closed. So on windows it's not possible to delete or move the arrow file afterwards. Moreover the CI test of the `to_tf_dataset` method isn't able to clean up the temporary arrow files because of this. cc @Rocketknight1
99
to_tf_dataset keeps a reference to the open data somewhere, causing issues on windows To reproduce: ```python import datasets as ds import weakref import gc d = ds.load_dataset("mnist", split="train") ref = weakref.ref(d._data.table) tfd = d.to_tf_dataset("image", batch_size=1, shuffle=False, label_cols="label") del tfd, d gc.collect() assert ref() is None, "Error: there is at least one reference left" ``` This causes issues because the table holds a reference to an open arrow file that should be closed. So on windows it's not possible to delete or move the arrow file afterwards. Moreover the CI test of the `to_tf_dataset` method isn't able to clean up the temporary arrow files because of this. cc @Rocketknight1 I did some investigation and, as it seems, the bug stems from [this line](https://github.com/huggingface/datasets/blob/8004d7c3e1d74b29c3e5b0d1660331cd26758363/src/datasets/arrow_dataset.py#L325). The lifecycle of the dataset from the linked line is bound to one of the returned `tf.data.Dataset`. So my (hacky) solution involves wrapping the linked dataset with `weakref.proxy` and adding a custom `__del__` to `tf.python.data.ops.dataset_ops.TensorSliceDataset` (this is the type of a dataset that is returned by `tf.data.Dataset.from_tensor_slices`; this works for TF 2.x, but I'm not sure `tf.python.data.ops.dataset_ops` is a valid path for TF 1.x) that deletes the linked dataset, which is assigned to the dataset object as a property. Will open a draft PR soon!
[ 0.04569007828831673, 0.33450788259506226, 0.11488880217075348, 0.08045118302106857, 0.2304304838180542, 0.1188877746462822, 0.3988851010799408, 0.2548750042915344, -0.10991644859313965, 0.26743894815444946, -0.33538562059402466, 0.4040720462799072, -0.16448089480400085, -0.10746215283870697, -0.03426686301827431, -0.1066436618566513, 0.051110800355672836, 0.1451645791530609, -0.16666440665721893, -0.12261220067739487, -0.21033646166324615, 0.03519109636545181, -0.12747591733932495, 0.07211615890264511, -0.13876396417617798, -0.28114503622055054, 0.01058872975409031, 0.1006443202495575, 0.2441079467535019, -0.01835494115948677, 0.06827961653470993, 0.021176977083086967, -0.17779594659805298, 0.4797627925872803, -0.00011666516365949064, 0.4142075777053833, -0.006127521395683289, 0.1301538199186325, -0.23558081686496735, 0.05651070177555084, -0.06903086602687836, 0.17604999244213104, 0.1245584636926651, -0.05997370183467865, 0.13496798276901245, -0.21777625381946564, -0.025572726503014565, 0.08327299356460571, 0.28249549865722656, 0.4290584623813629, 0.17387717962265015, 0.6678123474121094, 0.049049388617277145, -0.007073971442878246, 0.38278523087501526, 0.06389778107404709, -0.27425894141197205, 0.11617060005664825, -0.23700949549674988, -0.1935144066810608, 0.06556092947721481, 0.5781881809234619, 0.017382437363266945, -0.07479844987392426, -0.13468730449676514, 0.07937832921743393, -0.24748435616493225, -0.21320980787277222, 0.09915623813867569, 0.3864620625972748, 0.29421448707580566, -0.3177286684513092, -0.07044240832328796, -0.1286831498146057, -0.06478439271450043, -0.1454344093799591, 0.19134795665740967, -0.04620642215013504, 0.017386678606271744, 0.13485005497932434, 0.058215219527482986, -0.1622665673494339, -0.261507511138916, -0.0061732083559036255, -0.2810881435871124, -0.10721860826015472, 0.08574363589286804, 0.08013858646154404, 0.4141070544719696, -0.027151543647050858, -0.06863751262426376, 0.04162948578596115, 0.02016325294971466, 0.13079169392585754, -0.20230157673358917, -0.18202082812786102, -0.0392589271068573, -0.17703023552894592, -0.028179513290524483, -0.07086215913295746, 0.23925118148326874, -0.15704479813575745, -0.2443435788154602, 0.06774026155471802, 0.16441909968852997, -0.07058843970298767, -0.6655332446098328, 0.14519941806793213, 0.2680507302284241, -0.1933342069387436, -0.11191998422145844, -0.02867107093334198, 0.0027094860561192036, -0.49814373254776, 0.28611671924591064, -0.21079176664352417, 0.4638057351112366, 0.017413798719644547, -0.5834482908248901, 0.17033584415912628, -0.19436031579971313, 0.4077930152416229, -0.03926560655236244, 0.3421231508255005, -0.00972457230091095, 0.27936795353889465, 0.3236468434333801, -0.003611154854297638, -0.49707069993019104, -0.016200359910726547, -0.05466807261109352, -0.03966240957379341, -0.2995603084564209, -0.33192333579063416, 0.1675925999879837, 0.04395293444395065, -0.04784907400608063, 0.17280714213848114, 0.06108277291059494, 0.10257628560066223, 0.2539462447166443, -0.2808159291744232, 0.5246315598487854, 0.4812730550765991, -0.07509739696979523, 0.24509452283382416, 0.09495806694030762, -0.25070250034332275, -0.12922218441963196, 0.35341814160346985, -0.2710708677768707, -0.15856508910655975, -0.26036524772644043, 0.12456434220075607, -0.12023323774337769, -0.15524691343307495, -0.22380205988883972, 0.04500386118888855, 0.034312859177589417, -0.05954702943563461, 0.08629176020622253, -0.13709141314029694, -0.5523480176925659, -0.26465556025505066, 0.010904328897595406, 0.36509090662002563, -0.19915199279785156, 0.17955124378204346, -0.02543806843459606, -0.3931921124458313, -0.15941062569618225, 0.2656007409095764, 0.06460507214069366, 0.31538328528404236, -0.4097917079925537, -0.1304861456155777, 0.48381954431533813, -0.2320680171251297, -0.451283723115921, 0.23500563204288483, -0.2089938223361969, 0.2142520546913147, -0.3518174886703491, 0.13031741976737976, 0.2125164419412613, -0.20666542649269104, 0.012362159788608551, -0.007045207545161247, -0.06230967491865158, -0.009127004072070122, -0.32360905408859253, -0.010815280489623547, -0.06801830977201462, -0.19527065753936768, -0.015727762132883072, -0.012415856122970581, 0.13186506927013397, -0.04939540848135948, 0.3902638852596283, 0.21969185769557953, 0.19332583248615265, 0.14174765348434448, 0.3756611943244934, -0.17291395366191864, -0.07908884435892105, 0.04328874498605728, -0.37751755118370056, 0.13952457904815674, 0.405678391456604, 0.07770296931266785, -0.12490475177764893, -0.14793625473976135, -0.014970021322369576, 0.19853703677654266, -0.19195027649402618, 0.020079970359802246, 0.07844395190477371, -0.11942455172538757, -0.3427833616733551, 0.2097567766904831, -0.00877343863248825, -0.1780354380607605, -0.2768910825252533, 0.08200826495885849, 0.10280223190784454, 0.4687255620956421, 0.2687627077102661, -0.005573452450335026, -0.2448139637708664, 0.19433826208114624, -0.14946532249450684, -0.030063075944781303, -0.27190208435058594, 0.426939457654953, 0.1747722625732422, 0.3178136348724365, -0.15419718623161316, 0.5814430713653564, 0.10668500512838364, -0.5981355309486389, -0.2948668599128723, 0.3456805348396301, 0.13194774091243744, -0.028623301535844803, -0.017955489456653595, 0.14569851756095886, -0.20072336494922638, 0.1713244616985321, 0.053768835961818695, 0.23926398158073425, 0.04082748293876648, 0.021464083343744278, -0.03639737516641617, -0.34101608395576477, -0.04838133230805397, 0.3614161014556885, -0.3146299123764038, 0.29861462116241455, -0.6084025502204895, 0.19652915000915527, 0.3866647481918335, 0.03110693395137787, -0.16892477869987488, 0.23582980036735535, -0.16949427127838135, 0.061729900538921356, 0.07153797149658203, 0.3181355595588684, 0.4760550856590271, 0.022361338138580322, 0.17279092967510223, 0.13679923117160797, -0.19374001026153564, -0.09025267511606216, 0.23736470937728882, 0.08871420472860336, 0.31243181228637695, 0.20392078161239624, 0.2570452094078064, 0.19310399889945984, -0.30240383744239807, 0.03301859274506569, 0.13020411133766174, 0.172896146774292, -0.45257875323295593, 0.17472262680530548, -0.18073821067810059, -0.03884684666991234, -0.30748987197875977, 0.011746305041015148, 0.03772226721048355, -0.134799987077713, 0.31545960903167725, 0.3967655897140503, -0.4561236798763275, 0.15392330288887024, -0.3289412558078766, 0.12903311848640442, 0.02276877872645855, -0.29593169689178467, 0.18030208349227905, -0.16917894780635834, -0.2714839577674866, 0.03444306179881096, 0.36438706517219543, -0.24427668750286102, 0.41803431510925293, -0.001358548179268837, -0.07474908232688904, -0.1528538316488266, -0.2631639242172241, 0.08977952599525452, -0.09495307505130768, 0.1932285726070404, 0.29371607303619385, 0.33681103587150574, -0.12326736003160477, -0.13017724454402924, 0.14623378217220306, -0.4851285219192505, -0.17861421406269073, 0.13726705312728882, -0.12271815538406372, 0.2090100795030594, 0.020397700369358063, -0.15208956599235535, 0.07417669147253036, -0.3432304263114929, 0.06708268076181412, -0.19137915968894958, 0.12772853672504425, 0.6203327775001526, 0.15204104781150818, -0.08000215888023376, 0.37897077202796936, 0.10768022388219833, -0.17360027134418488, -0.1127353310585022, 0.2009134441614151, -0.20372341573238373, -0.4296337366104126, 0.29090508818626404, 0.03388958051800728, 0.13257908821105957, 0.29555845260620117, -0.6434154510498047, -0.16894198954105377, -0.04373548924922943, 0.17766393721103668, -0.10888655483722687, -0.047006942331790924, 0.1665741503238678, 0.11643645167350769, -0.11971431225538254, -0.34324708580970764, 0.08278648555278778, 0.3821261525154114, -0.22708043456077576, -0.04858043044805527, 0.042270563542842865, 0.08824551105499268, 0.313571035861969, 0.6243579983711243, 0.05083296075463295, -0.34294334053993225, 0.02080368995666504, -0.2982524037361145, 0.5073609352111816, -0.1590907871723175, -0.27957507967948914, 0.015801163390278816, 0.042031459510326385, -0.13273629546165466, 0.24627383053302765, -0.07957783341407776, -0.21037985384464264, 0.057861872017383575, 0.21673274040222168, -0.03759188950061798, -0.5290265083312988, 0.13690240681171417, -0.3965076506137848, 0.19836536049842834, 0.1509983390569687, -0.04255444556474686, -0.15817765891551971, -0.4451104998588562, 0.22895978391170502, 0.20402178168296814, 0.09302552044391632, -0.13661588728427887, -0.19879016280174255, -0.28238850831985474, -0.34255358576774597, 0.06804676353931427, 0.1306476891040802, 0.5035341382026672, 0.09213535487651825, -0.29871997237205505, 0.13605089485645294, 0.27989622950553894, 0.7769170999526978, -0.030116183683276176, -0.0992756187915802, 0.27733340859413147, 0.3224099278450012, -0.40419548749923706, 0.05556335672736168, -0.10501700639724731, -0.004628117196261883, 0.02816341444849968, 0.2416951060295105, 0.07723621279001236, -0.38879379630088806, 0.21295033395290375, 0.17669107019901276, -0.2477182000875473, 0.2110394686460495, -0.3918568789958954, -0.39860302209854126, 0.10136713087558746, 0.08784735202789307, 0.26049408316612244, 0.049756430089473724, -0.10872063040733337, -0.11151230335235596, -0.30123674869537354, -0.24823307991027832, 0.08814430236816406, -0.015626907348632812, 0.3283711075782776, 0.37087175250053406, 0.3975335955619812, 0.05334067717194557, 0.5702842473983765, 0.39386942982673645, 0.4075016379356384, -0.5431126952171326, 0.02142839878797531, 0.07550637423992157, 0.19113285839557648, 0.1251915842294693, 0.44203856587409973, -0.18668581545352936, 0.053141627460718155, -0.41518718004226685, 0.0002787560224533081, -0.3923724293708801, 0.530259370803833, 0.1395118236541748, -0.20313389599323273, -0.0013094479218125343, -0.09222970902919769, 0.13336913287639618, -0.010361379012465477, -0.1489025205373764, 0.6897447109222412, 0.21658258140087128, -0.1877490133047104, 0.2651529312133789, 0.1582140028476715, 1.1080399751663208, -0.0935678631067276, 0.2334684282541275, 0.5235838294029236, -0.26436951756477356, 0.212654247879982, -0.05537976324558258, 0.1353132426738739, -0.06322572380304337, -0.5360189080238342, 0.020139330998063087, -0.012507617473602295, -0.3608238697052002, -0.2005617469549179, 0.18932686746120453, 0.002370519330725074, 0.15720659494400024, 0.41068485379219055, 0.22914598882198334, 0.0776233822107315, 0.2959437072277069, -0.21861931681632996, 0.039656877517700195, 0.022472038865089417, 0.446658730506897, -0.12662005424499512, -0.2026073932647705, -0.12232185900211334, 0.1659473478794098, 0.027122534811496735, -0.03446495160460472, -0.009640885517001152, -0.7225639820098877, 0.27561646699905396, 0.04224846512079239, -0.09043862670660019, -0.02405969612300396, 0.401231586933136, 0.3712243437767029, -0.09887658059597015, -0.15234696865081787, 0.2883429527282715, 0.377362459897995, 0.29301220178604126, 0.09380700439214706, -0.016785889863967896, 0.47509506344795227, 0.03830232471227646, -0.08036363124847412, 0.1676330864429474, -0.05447189509868622, -0.05252288281917572, -0.0370938703417778, -0.1225818544626236, 0.03829426318407059, -0.12055530399084091, 0.04458474740386009, -0.09958517551422119, -0.24590620398521423, -0.057958267629146576, 0.10357752442359924, -0.18048782646656036, -0.10702705383300781, 0.23447361588478088, -0.1927340179681778, -0.4316699802875519, 0.23925673961639404, 0.3922545611858368, -0.12051223963499069, 0.17103491723537445, 0.3036816716194153, -0.07610423117876053, -0.07312791049480438, -0.25623899698257446, 0.34453433752059937, 0.0378299318253994, -0.5670921206474304, 0.2645977735519409, -0.18107597529888153, 0.3202277421951294, -0.10798830538988113, 0.5147191286087036, -0.19703039526939392, 0.02094128727912903, 0.02216009423136711, -0.13972286880016327, -0.39777180552482605, 0.23617467284202576, 0.0018211044371128082, 0.4124113619327545, -0.2537190914154053, 0.4747990071773529, -0.12875348329544067, -0.25279274582862854, -0.29979801177978516, 0.23436705768108368, -0.028114844113588333, 0.07878991961479187, -0.10588608682155609, 0.05765082314610481, 0.3181118965148926, -0.277951717376709, 0.05769581347703934, 0.10732091963291168, -0.13811095058918, -0.13849101960659027, -0.16371415555477142, 0.16327708959579468, 0.028017954900860786, -0.32340100407600403, -0.012979627586901188, -0.17387187480926514, 0.07629115879535675, -0.1113801822066307, 0.3281945288181305, 0.07005293667316437, -0.3296968936920166, 0.027097847312688828, -0.2136472910642624, 0.13094106316566467, 0.1392463892698288, 0.007743675261735916, -0.030591897666454315, 0.37586766481399536, 0.08969546109437943, 0.09814869612455368, -0.23660928010940552, -0.23252610862255096, -0.0303853377699852, 0.28426629304885864, -0.03563772141933441, -0.3600643277168274, 0.037712398916482925, -0.05584821105003357, -0.29388776421546936, -0.059905339032411575, 0.37662944197654724, 0.17997586727142334, -0.463461309671402, -0.13622412085533142, 0.2592979669570923, 0.22421713173389435, -0.24042116105556488, 0.16245035827159882, -0.12176796793937683, 0.019864235073328018, 0.03851151838898659, 0.16629649698734283, 0.18402771651744843, -0.14655476808547974, -0.1428782343864441, 0.17723166942596436, -0.20080335438251495, -0.20362457633018494, 0.031016169115900993, 0.5156283378601074, -0.032535944133996964, 0.23732346296310425, -0.14765354990959167, 0.10366436839103699, 0.12641778588294983, 0.2481575459241867, -0.0781785324215889, 0.4826439619064331, 0.19811072945594788, -0.06543825566768646, -0.03546874225139618, -0.31345221400260925, -0.05552196130156517, 0.16418908536434174, -0.1238175630569458, 0.24218717217445374, -0.036149606108665466, 0.22170990705490112, 0.15493112802505493, -0.42458295822143555, -0.011749574914574623, 0.2324928641319275, -0.08597955852746964, -0.36718884110450745, -0.39003151655197144, -0.20805487036705017, -0.2723340392112732, 0.031124267727136612, -0.00552750751376152, -0.08657306432723999, 0.009404286742210388, 0.10601386427879333, -0.06628252565860748, -0.28257760405540466, -0.11982179433107376, 0.3330775797367096, 0.27780595421791077, -0.23256680369377136, 0.06561335176229477, -0.024808019399642944, -0.06567806005477905, -0.002108696848154068, 0.20820142328739166, 0.08352921903133392, 0.02842143550515175, -0.1759401112794876, 0.011499438434839249, -0.034654274582862854, 0.09226343035697937, -0.04009256139397621, 0.2144378125667572, -0.048917144536972046, -0.1405205875635147, 0.2157972753047943, -0.04918326437473297, -0.07002480328083038, 0.1828450709581375, 0.05197182297706604, 0.0976676344871521, -0.41822460293769836, 0.14988884329795837, -0.0033798739314079285, -0.10168039798736572, -0.22876274585723877, -0.005118027329444885, 0.050867289304733276, -0.10867883265018463, 0.48080024123191833, -0.4602070152759552, 0.3644782602787018, -0.08739127963781357, 0.06821887195110321, -0.009531546384096146, 0.22197946906089783, 0.12710900604724884, 0.3292389214038849, -0.2891255021095276, -0.38428187370300293, -0.5309662818908691, 0.26259845495224, -0.04950680956244469, -0.050644464790821075, 0.21181733906269073, 0.031771816313266754, -0.08889951556921005, -0.06646031141281128, 0.027405336499214172, -0.18654648959636688, 0.11332380026578903, 0.2672543525695801, -0.2658282518386841, -0.03609572723507881, -0.4830031991004944, 0.09843248873949051, 0.019902944564819336, -0.5478622913360596, -0.18008093535900116, -0.17627134919166565, 0.037510037422180176, -0.08184590190649033, -0.02155197784304619, -0.016611484810709953, 0.546023964881897, 0.5247307419776917, 0.12545707821846008, 0.07549706101417542, 0.1195664033293724, -0.1025606319308281, -0.2674235701560974, -0.1794997602701187, -0.3766331970691681, -0.18374773859977722, 0.0070540402084589005, -0.02379615232348442, -0.052943989634513855, 0.19713805615901947, 0.013704986311495304, -0.2977713942527771, 0.18019510805606842, 0.3653971552848816, -0.44008249044418335, 0.19560539722442627, -0.20590299367904663, 0.3725329041481018, 0.26284611225128174, 0.4234927296638489, -0.12966130673885345, 0.21667814254760742, -0.3998854160308838, -0.3820694386959076, 0.4928813874721527, -0.5328615307807922, -0.09300722181797028, -0.024598270654678345, 0.38428547978401184, -0.09380307048559189, 0.03628789633512497, -0.5819952487945557, -0.17655472457408905, 0.3898147940635681, -0.08349338173866272, -0.5030676126480103, 0.17061178386211395, 0.13014698028564453, 0.1384350061416626, 0.11816711723804474, 0.5913188457489014, 0.1401757448911667, -0.19336318969726562, 0.036497678607702255, -0.2862134575843811 ]
https://github.com/huggingface/datasets/issues/2924
"File name too long" error for file locks
"Hi, the filename here is less than 255\r\n```python\r\n>>> len(\"_home_garrett_.cache_huggingface_d(...TRUNCATED)
"## Describe the bug\r\n\r\nGetting the following error when calling `load_dataset(\"gar1t/test\")`:(...TRUNCATED)
39
"\"File name too long\" error for file locks \n ## Describe the bug\r\n\r\nGetting the following err(...TRUNCATED)
[0.049338411539793015,0.09200134873390198,-0.07149402797222137,0.40184879302978516,0.415167033672332(...TRUNCATED)
https://github.com/huggingface/datasets/issues/2924
"File name too long" error for file locks
"Yes, you're right! I need to get you more info here. Either there's something going with the name i(...TRUNCATED)
"## Describe the bug\r\n\r\nGetting the following error when calling `load_dataset(\"gar1t/test\")`:(...TRUNCATED)
67
"\"File name too long\" error for file locks \n ## Describe the bug\r\n\r\nGetting the following err(...TRUNCATED)
[0.049338411539793015,0.09200134873390198,-0.07149402797222137,0.40184879302978516,0.415167033672332(...TRUNCATED)

Dataset Card for "another_dummy_dataset"

More Information needed

Downloads last month
33
Edit dataset card