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
sequencelengths
768
768
https://github.com/huggingface/datasets/issues/2644
Batched `map` not allowed to return 0 items
Sorry to ping you, @lhoestq, did you have a chance to take a look at the proposed PR? Thank you!
## Describe the bug I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`. However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case. For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs. ## Steps to reproduce the bug ```python def select_rows(examples): # `key` is a column name that exists in the original dataset # The following line simulates no matches found, so we return an empty batch result = {'key': []} return result filtered_dataset = dataset.map( select_rows, remove_columns = dataset.column_names, batched = True, num_proc = 1, desc = "Selecting rows with images that exist" ) ``` The code above immediately triggers the exception. If we use the following instead: ```python def select_rows(examples): # `key` is a column name that exists in the original dataset result = {'key': []} # or defaultdict or whatever # code to check for condition and append elements to result # some_items_found will be set to True if there were any matching elements in the batch return result if some_items_found else {} ``` Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it. In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items. ## Expected results The dataset would be filtered and only the matching fields would be returned. ## Actual results An exception is encountered, as described. Using a workaround makes it fail further along the line. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 4.0.1
20
Batched `map` not allowed to return 0 items ## Describe the bug I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`. However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case. For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs. ## Steps to reproduce the bug ```python def select_rows(examples): # `key` is a column name that exists in the original dataset # The following line simulates no matches found, so we return an empty batch result = {'key': []} return result filtered_dataset = dataset.map( select_rows, remove_columns = dataset.column_names, batched = True, num_proc = 1, desc = "Selecting rows with images that exist" ) ``` The code above immediately triggers the exception. If we use the following instead: ```python def select_rows(examples): # `key` is a column name that exists in the original dataset result = {'key': []} # or defaultdict or whatever # code to check for condition and append elements to result # some_items_found will be set to True if there were any matching elements in the batch return result if some_items_found else {} ``` Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it. In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items. ## Expected results The dataset would be filtered and only the matching fields would be returned. ## Actual results An exception is encountered, as described. Using a workaround makes it fail further along the line. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 4.0.1 Sorry to ping you, @lhoestq, did you have a chance to take a look at the proposed PR? Thank you!
[ -0.23283597826957703, -0.39038851857185364, -0.044456783682107925, 0.1644899994134903, -0.10854469239711761, -0.06876874715089798, 0.1163392886519432, 0.4056323170661926, 0.6400412917137146, 0.11788103729486465, -0.05657173693180084, 0.24608521163463593, -0.39544159173965454, 0.10435476154088974, -0.16292142868041992, 0.16080263257026672, -0.04493316262960434, 0.1405794322490692, -0.169117271900177, -0.19149209558963776, -0.33629316091537476, 0.1631997674703598, -0.3979262709617615, -0.05010485276579857, -0.14877130091190338, -0.2919760048389435, 0.28648003935813904, -0.036210428923368454, -0.16281436383724213, -0.2454048991203308, 0.20609140396118164, -0.2328297644853592, -0.20913547277450562, 0.5783206224441528, -0.00012992756091989577, -0.0231366865336895, 0.15059389173984528, -0.18518862128257751, -0.08976132422685623, -0.30296096205711365, -0.19081804156303406, -0.17153042554855347, -0.11571866273880005, -0.2824649512767792, 0.18194611370563507, -0.2716504633426666, -0.1956348866224289, -0.4482399523258209, 0.10719629377126694, 0.2587008774280548, 0.04332179203629494, 0.41881757974624634, 0.0030658117029815912, 0.1764480173587799, 0.33124831318855286, 0.2664010226726532, -0.07535190135240555, 0.12881065905094147, 0.7205765843391418, -0.28810131549835205, 0.022627277299761772, 0.3385903835296631, -0.39218366146087646, 0.07090646773576736, 0.13675545156002045, -0.030903520062565804, 0.23016871511936188, -0.5515583157539368, 0.26975107192993164, 0.36756742000579834, -0.08999979496002197, 0.06078554317355156, -0.43333759903907776, -0.6687819361686707, -0.04030377045273781, -0.09549863636493683, -0.03889784961938858, 0.2810004949569702, -0.4210391640663147, -0.056459516286849976, -0.4846191704273224, 0.12179484218358994, 0.007894966751337051, 0.1618543118238449, 0.030675478279590607, 0.458953857421875, -0.09304078668355942, 0.20032405853271484, 0.34510961174964905, -0.16183270514011383, -0.09940209984779358, -0.167270690202713, -0.2236279994249344, 0.5847225785255432, -0.036699045449495316, -0.14598773419857025, 0.3893202841281891, 0.21976807713508606, 0.2230357527732849, -0.3132420480251312, -0.050306182354688644, -0.0742756575345993, 0.26467981934547424, -0.023432038724422455, 0.4159455895423889, 0.0793759822845459, 0.2686936557292938, 0.34932011365890503, -0.0050523169338703156, -0.059094078838825226, 0.06769024580717087, 0.11316929757595062, 0.11344229429960251, -0.08908410370349884, -0.009651708416640759, -0.07640824466943741, 0.25678548216819763, -0.0787527859210968, -0.12189867347478867, 0.23410041630268097, -0.41001707315444946, 0.13690710067749023, 0.06204786151647568, 0.12508265674114227, 0.17005783319473267, -0.1776704341173172, 0.1202128604054451, 0.11262885481119156, -0.1570281684398651, 0.18971119821071625, -0.07724679261445999, -0.1316175013780594, -0.1925022453069687, -0.3208245635032654, 0.19647884368896484, -0.33428606390953064, 0.24181634187698364, -0.15858295559883118, 0.01982787251472473, -0.06153290346264839, 0.09574022144079208, -0.2645619809627533, 0.7512268424034119, 0.4937877953052521, -0.1195114403963089, 0.2913582921028137, 0.39662373065948486, -0.2185574769973755, -0.1752832680940628, 0.4062904715538025, -0.3826131224632263, -0.27773505449295044, 0.210041806101799, -0.04018622636795044, -0.23807594180107117, 0.3465701937675476, -0.5073060393333435, 0.2185847908258438, 0.17824581265449524, 0.08225078135728836, 0.291472464799881, -0.2697470784187317, -0.10539443790912628, -0.23601171374320984, 0.04256228357553482, 0.6938401460647583, -0.6387726664543152, -0.049924593418836594, 0.11018934845924377, 0.10137918591499329, -0.061366111040115356, 0.347880095243454, -0.04546063020825386, 0.34810999035835266, -0.41073542833328247, 0.3059868812561035, 0.0873119905591011, -0.12647084891796112, -0.32756325602531433, 0.31341999769210815, -0.03581523150205612, 0.23563958704471588, -0.021055109798908234, -0.06424815207719803, 0.5519378185272217, -0.18738889694213867, 0.3676522374153137, -0.1700584441423416, -0.27995744347572327, 0.10416289418935776, -0.05038169398903847, -0.03984377905726433, 0.06038003787398338, -0.24208202958106995, 0.1949242502450943, 0.01658741943538189, 0.039078135043382645, -0.5488615036010742, 0.12863896787166595, -0.1508789211511612, 0.3383629024028778, 0.24017028510570526, 0.2621084451675415, 0.12333148717880249, 0.018251709640026093, -0.25635212659835815, -0.4713619351387024, 0.3001762330532074, -0.4880331754684448, 0.02124893292784691, -0.4338341951370239, -0.10330409556627274, 0.030964938923716545, 0.18347400426864624, -0.03502006456255913, 0.0330955944955349, -0.07492069900035858, -0.4975805878639221, 0.17657095193862915, -0.021343884989619255, -0.2262367159128189, -0.23706987500190735, -0.13586461544036865, -0.008438926190137863, -0.3567229211330414, 0.07136016339063644, 0.2501082420349121, -0.2921575903892517, -0.25420457124710083, 0.24663028120994568, 0.11493192613124847, -0.11761078983545303, 0.11735449731349945, 0.1758529394865036, -0.03481614217162132, -0.1673574596643448, -0.1400129348039627, 0.1312534660100937, 0.011728363111615181, -0.04580065980553627, 0.10183721035718918, 0.14501351118087769, 0.3444770872592926, -0.23784340918064117, -0.06940686702728271, 0.5054207444190979, -0.18761460483074188, 0.535930335521698, -0.17968632280826569, 0.051238417625427246, -0.19963201880455017, 0.04260646551847458, -0.2059214562177658, -0.3850511908531189, 0.07628374546766281, -0.15773700177669525, 0.05133737996220589, 0.03191465511918068, 0.0012567437952384353, -0.198919415473938, 0.08561693131923676, -0.04696207866072655, 0.1647791564464569, 0.014488167129456997, -0.063052237033844, 0.22668950259685516, 0.044692669063806534, -0.014277230948209763, 0.3432696759700775, 0.2191428393125534, -0.08872583508491516, -0.15218238532543182, 0.2504402697086334, 0.00012215517926961184, 0.413918137550354, 0.1816675066947937, 0.026053156703710556, 0.15500938892364502, -0.0036409473977983, -0.06571999937295914, -0.25283360481262207, -0.18143075704574585, 0.005715363193303347, 0.14953412115573883, -0.3952978551387787, -0.0354202575981617, 0.11011457443237305, -0.15850429236888885, 0.06897620111703873, -0.076503224670887, -0.2908565104007721, -0.3032287359237671, -0.045333728194236755, 0.260157972574234, -0.27227142453193665, -0.024007774889469147, -0.40131354331970215, 0.011653460562229156, 0.1975092887878418, -0.27472010254859924, -0.28129974007606506, -0.1685466468334198, -0.07561113685369492, -0.07415890693664551, 0.07311375439167023, -0.1339879333972931, 0.361563116312027, 0.2521374523639679, -0.26128196716308594, -0.24377140402793884, -0.09511370211839676, 0.0065135350450873375, -0.537039577960968, 0.20540335774421692, 0.41009271144866943, 0.39817070960998535, -0.29238462448120117, 0.1470613330602646, 0.2793859541416168, -0.107142873108387, -0.24806787073612213, -0.007905746810138226, 0.022333964705467224, 0.15326277911663055, -0.17921525239944458, 0.14743168652057648, 0.06446149945259094, -0.320930153131485, 0.1781851202249527, -0.1891590654850006, 0.2615511119365692, 0.21945330500602722, 0.2780078053474426, 0.15385735034942627, -0.3693771958351135, -0.4285494387149811, 0.12235145270824432, -0.14167656004428864, 0.4460209906101227, 0.039022888988256454, -0.14693079888820648, 0.1844053715467453, 0.026218721643090248, -0.18531933426856995, 0.2405572384595871, -0.09668570011854172, 0.0939638614654541, -0.05627404898405075, 0.12348305433988571, 0.19000624120235443, 0.36680012941360474, 0.4985278844833374, 0.0864882543683052, 0.04604468494653702, -0.2846720814704895, -0.10895585268735886, 0.08126389235258102, 0.022276844829320908, -0.06451409310102463, 0.4225294888019562, 0.32178956270217896, 0.028700489550828934, 0.7504062056541443, 0.36547672748565674, 0.12721356749534607, 0.09464516490697861, 0.07253672182559967, 0.38223639130592346, -0.11400629580020905, -0.3796921968460083, -0.208224818110466, 0.15388476848602295, -0.08407841622829437, 0.03251299634575844, 0.05505530908703804, -0.06203438714146614, -0.0012851920910179615, 0.061900340020656586, -0.4879450500011444, -0.18903687596321106, 0.4240105450153351, -0.30936333537101746, 0.07615630328655243, -0.07491468638181686, 0.09561686217784882, -0.27881020307540894, -0.18202699720859528, -0.16371484100818634, -0.30362457036972046, 0.6426758766174316, -0.08232482522726059, -0.07537891715765, -0.1154969334602356, -0.6797443628311157, 0.33253392577171326, 0.22117996215820312, -0.08481092751026154, 0.10671643912792206, -0.1852942705154419, 0.06875630468130112, 0.3100571036338806, 0.9494888186454773, -0.19327247142791748, 0.15665532648563385, 0.08142618089914322, -0.02484363317489624, -0.44353482127189636, 0.09980637580156326, -0.32794150710105896, 0.25508707761764526, 0.2495422065258026, 0.5071648955345154, -0.3575255572795868, -0.0723436251282692, -0.04205319657921791, -0.027732960879802704, 0.03472249209880829, -0.026486486196517944, -0.1733802706003189, -0.149541974067688, -0.1380317658185959, 0.3645794987678528, 0.44694605469703674, 0.07268571853637695, 0.13567028939723969, -0.20947113633155823, -0.09888684749603271, 0.04817071929574013, 0.01759950816631317, -0.13403019309043884, 0.4707484245300293, 0.01583368144929409, 0.05059855058789253, 0.27013731002807617, 0.11173496395349503, 0.22063037753105164, 0.4900631308555603, -0.15343059599399567, 0.20740757882595062, -0.18158678710460663, 0.030591165646910667, 0.3123360276222229, 0.43981632590293884, 0.00996522605419159, 0.057914700359106064, 0.3812752962112427, 0.35221725702285767, -0.05150436982512474, -0.2942023277282715, 0.1262357383966446, 0.046404145658016205, -0.5417701601982117, 0.003656748915091157, 0.11587844043970108, -0.09958216547966003, 0.08497065305709839, 0.6082314252853394, 0.5790844559669495, -0.3638048470020294, 0.36096635460853577, 0.04329182207584381, 0.8923070430755615, -0.01489314902573824, 0.10762739926576614, 0.14868082106113434, 0.07094895094633102, 0.24982883036136627, 0.5552585124969482, 0.0943637490272522, 0.008422152139246464, 0.09743867814540863, -0.040766362100839615, -0.008215597830712795, 0.16687442362308502, 0.3400381803512573, 0.10278644412755966, 0.27085936069488525, 0.08195740729570389, 0.12089386582374573, -0.15034633874893188, -0.2895897626876831, 0.28774577379226685, -0.3301817774772644, -0.3449304699897766, -0.07553864270448685, 0.07857118546962738, 0.2657669484615326, -0.057930149137973785, -0.10584910213947296, -0.030924204736948013, -0.403766930103302, -0.19284598529338837, -0.18520252406597137, -0.44499003887176514, 0.021173939108848572, 0.26389291882514954, -0.2862427532672882, -0.032858699560165405, 0.051584962755441666, -0.4806172251701355, 0.1447318196296692, -0.11111192405223846, -0.1330835521221161, 0.3892787992954254, 0.17192380130290985, 0.02182278223335743, -0.15219275653362274, 0.1726178526878357, 0.19981709122657776, -0.1803181916475296, 0.05755346268415451, -0.4518599808216095, -0.17299474775791168, 0.06446658819913864, 0.40836581587791443, -0.20234113931655884, -0.22290021181106567, -0.39682045578956604, -0.19215919077396393, 0.10154248774051666, 0.0394880548119545, -0.08833836019039154, 0.2670641541481018, -0.07576559484004974, 0.39075037837028503, -0.19200913608074188, -0.45341864228248596, -0.04374232143163681, 0.5255671739578247, 0.0346294529736042, -0.19231894612312317, 0.4125707149505615, 0.15918537974357605, -0.1644420474767685, -0.06954287737607956, 0.13838936388492584, 0.3426441550254822, -0.6278498768806458, 0.5433273315429688, 0.24986937642097473, 0.03698979318141937, 0.1378326714038849, 0.4185105562210083, 0.1368645280599594, 0.2798646092414856, -0.3155888020992279, -0.1867186278104782, -0.2580823302268982, 0.40863800048828125, 0.10354253649711609, 0.03598066791892052, -0.14204637706279755, -0.2367398589849472, 0.3288380205631256, -0.1956319808959961, -0.15207555890083313, 0.06600501388311386, -0.08657663315534592, 0.3288321793079376, 0.21843352913856506, 0.2640419900417328, 0.35698387026786804, -0.08181171119213104, -0.10281669348478317, 0.13153116405010223, -0.2793508768081665, -0.07360569387674332, -0.04670882225036621, 0.17635488510131836, 0.10426028072834015, -0.22039884328842163, 0.16272296011447906, -0.4074193835258484, -0.046006862074136734, -0.406266450881958, 0.2619495093822479, 0.4909597635269165, -0.004014009144157171, -0.2378339320421219, 0.3719465136528015, 0.060078416019678116, -0.029745949432253838, 0.20644626021385193, -0.17768742144107819, -0.07059662789106369, -0.06777848303318024, 0.3043539524078369, 0.16345907747745514, 0.03375052288174629, 0.08297407627105713, 0.07204835116863251, 0.014262212440371513, 0.003094608196988702, 0.4227866530418396, -0.2046114057302475, -0.21244634687900543, 0.3322145938873291, 0.2543899714946747, 0.018418841063976288, -0.020860841497778893, -0.15182912349700928, 0.2098124772310257, 0.006032036617398262, -0.1523621529340744, 0.028843628242611885, 0.15505161881446838, 0.34181076288223267, 0.26052606105804443, 0.36461421847343445, -0.16854210197925568, -0.2591930329799652, 0.017468314617872238, 0.18861569464206696, 0.02110378071665764, 0.0309399776160717, 0.188058540225029, 0.39068499207496643, 0.3334284722805023, -0.09894293546676636, 0.3222147822380066, 0.07886946946382523, 0.2825945019721985, 0.2901286482810974, 0.23771046102046967, 0.2660045325756073, 0.013971048407256603, 0.08644552528858185, -0.2048540860414505, -0.5083087086677551, 0.03778552636504173, 0.08903414756059647, -0.0027336226776242256, 0.33608415722846985, 0.1234637051820755, 0.15381141006946564, -0.1924225389957428, -0.27505746483802795, 0.04185962677001953, 0.0021715464536100626, -0.3454616665840149, -0.061833810061216354, -0.31367549300193787, -0.2561423182487488, 0.4150928556919098, -0.16091634333133698, 0.06273652613162994, -0.34548667073249817, 0.3650221824645996, -0.07760758697986603, -0.0953703299164772, -0.14416512846946716, -0.36772558093070984, 0.024002935737371445, 0.229259192943573, -0.11037924885749817, 0.1378631889820099, -0.09132414311170578, -0.04632900282740593, 0.05049232766032219, 0.5798315405845642, 0.5111634731292725, 0.39856860041618347, -0.024610500782728195, 0.40082505345344543, 0.13015758991241455, -0.24362564086914062, -0.286192923784256, 0.36318957805633545, -0.059528857469558716, -0.025094231590628624, 0.2001093029975891, -0.0104518448933959, -0.04692601412534714, -0.06305475533008575, -0.0026363388169556856, 0.10762563347816467, 0.16351501643657684, -0.19085542857646942, -0.19742171466350555, -0.23625369369983673, -0.26874735951423645, -0.04919450357556343, -0.08179503679275513, 0.01605328731238842, 0.29386427998542786, -0.09964156895875931, 0.046356238424777985, 0.07786119729280472, -0.0013327529886737466, -0.04151930287480354, 0.2583118677139282, 0.45365965366363525, 0.003588515566661954, -0.4841512441635132, 0.17722256481647491, -0.3718905448913574, -0.030173378065228462, -0.4928690195083618, 0.2783646881580353, 0.03891861066222191, 0.19725842773914337, 0.11981739103794098, -0.12264230102300644, 0.31830719113349915, -0.050173211842775345, -0.04383484274148941, 0.354549765586853, 0.06481387466192245, -0.2790631055831909, -0.1928180605173111, -0.013535566627979279, 0.010154712945222855, -0.38427072763442993, 0.10624606907367706, -0.11351074278354645, -0.07535988837480545, -0.10560964792966843, 0.169926717877388, -0.15767186880111694, 0.0275924913585186, 0.1774147003889084, 0.33601659536361694, -0.04189559072256088, 0.029431622475385666, -0.017705515027046204, -0.35040387511253357, 0.1464197188615799, -0.12648999691009521, 0.13943694531917572, 0.35960039496421814, 0.4612444341182709, -0.3284623622894287, -0.20270587503910065, -0.02407541126012802, 0.0423462800681591, 0.004644832108169794, 0.036162253469228745, -0.18189294636249542, 0.14358484745025635, -0.3938451409339905, -0.03584033623337746, -0.12207399308681488, 0.022270813584327698, 0.08602324873209, 0.02708587236702442, -0.2525871992111206, -0.35494333505630493, 0.3827643394470215, -0.6531072854995728, -0.26200708746910095, -0.06931859999895096, 0.3420596122741699, 0.21151070296764374, -0.22564071416854858, -0.3928543031215668, -0.17192047834396362, 0.2626016438007355, -0.06935819238424301, -0.06165432557463646, -0.18479108810424805, -0.503738522529602, -0.03442920744419098, -0.15762393176555634, 0.1152828261256218, 0.03572043403983116, 0.006658793427050114, 0.23119652271270752, -0.3098658621311188 ]
https://github.com/huggingface/datasets/issues/2644
Batched `map` not allowed to return 0 items
Yes and it's all good, thank you :) Feel free to close this issue if it's good for you
## Describe the bug I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`. However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case. For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs. ## Steps to reproduce the bug ```python def select_rows(examples): # `key` is a column name that exists in the original dataset # The following line simulates no matches found, so we return an empty batch result = {'key': []} return result filtered_dataset = dataset.map( select_rows, remove_columns = dataset.column_names, batched = True, num_proc = 1, desc = "Selecting rows with images that exist" ) ``` The code above immediately triggers the exception. If we use the following instead: ```python def select_rows(examples): # `key` is a column name that exists in the original dataset result = {'key': []} # or defaultdict or whatever # code to check for condition and append elements to result # some_items_found will be set to True if there were any matching elements in the batch return result if some_items_found else {} ``` Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it. In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items. ## Expected results The dataset would be filtered and only the matching fields would be returned. ## Actual results An exception is encountered, as described. Using a workaround makes it fail further along the line. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 4.0.1
19
Batched `map` not allowed to return 0 items ## Describe the bug I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`. However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case. For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs. ## Steps to reproduce the bug ```python def select_rows(examples): # `key` is a column name that exists in the original dataset # The following line simulates no matches found, so we return an empty batch result = {'key': []} return result filtered_dataset = dataset.map( select_rows, remove_columns = dataset.column_names, batched = True, num_proc = 1, desc = "Selecting rows with images that exist" ) ``` The code above immediately triggers the exception. If we use the following instead: ```python def select_rows(examples): # `key` is a column name that exists in the original dataset result = {'key': []} # or defaultdict or whatever # code to check for condition and append elements to result # some_items_found will be set to True if there were any matching elements in the batch return result if some_items_found else {} ``` Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it. In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items. ## Expected results The dataset would be filtered and only the matching fields would be returned. ## Actual results An exception is encountered, as described. Using a workaround makes it fail further along the line. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17 - Python version: 3.8.10 - PyArrow version: 4.0.1 Yes and it's all good, thank you :) Feel free to close this issue if it's good for you
[ -0.23283597826957703, -0.39038851857185364, -0.044456783682107925, 0.1644899994134903, -0.10854469239711761, -0.06876874715089798, 0.1163392886519432, 0.4056323170661926, 0.6400412917137146, 0.11788103729486465, -0.05657173693180084, 0.24608521163463593, -0.39544159173965454, 0.10435476154088974, -0.16292142868041992, 0.16080263257026672, -0.04493316262960434, 0.1405794322490692, -0.169117271900177, -0.19149209558963776, -0.33629316091537476, 0.1631997674703598, -0.3979262709617615, -0.05010485276579857, -0.14877130091190338, -0.2919760048389435, 0.28648003935813904, -0.036210428923368454, -0.16281436383724213, -0.2454048991203308, 0.20609140396118164, -0.2328297644853592, -0.20913547277450562, 0.5783206224441528, -0.00012992756091989577, -0.0231366865336895, 0.15059389173984528, -0.18518862128257751, -0.08976132422685623, -0.30296096205711365, -0.19081804156303406, -0.17153042554855347, -0.11571866273880005, -0.2824649512767792, 0.18194611370563507, -0.2716504633426666, -0.1956348866224289, -0.4482399523258209, 0.10719629377126694, 0.2587008774280548, 0.04332179203629494, 0.41881757974624634, 0.0030658117029815912, 0.1764480173587799, 0.33124831318855286, 0.2664010226726532, -0.07535190135240555, 0.12881065905094147, 0.7205765843391418, -0.28810131549835205, 0.022627277299761772, 0.3385903835296631, -0.39218366146087646, 0.07090646773576736, 0.13675545156002045, -0.030903520062565804, 0.23016871511936188, -0.5515583157539368, 0.26975107192993164, 0.36756742000579834, -0.08999979496002197, 0.06078554317355156, -0.43333759903907776, -0.6687819361686707, -0.04030377045273781, -0.09549863636493683, -0.03889784961938858, 0.2810004949569702, -0.4210391640663147, -0.056459516286849976, -0.4846191704273224, 0.12179484218358994, 0.007894966751337051, 0.1618543118238449, 0.030675478279590607, 0.458953857421875, -0.09304078668355942, 0.20032405853271484, 0.34510961174964905, -0.16183270514011383, -0.09940209984779358, -0.167270690202713, -0.2236279994249344, 0.5847225785255432, -0.036699045449495316, -0.14598773419857025, 0.3893202841281891, 0.21976807713508606, 0.2230357527732849, -0.3132420480251312, -0.050306182354688644, -0.0742756575345993, 0.26467981934547424, -0.023432038724422455, 0.4159455895423889, 0.0793759822845459, 0.2686936557292938, 0.34932011365890503, -0.0050523169338703156, -0.059094078838825226, 0.06769024580717087, 0.11316929757595062, 0.11344229429960251, -0.08908410370349884, -0.009651708416640759, -0.07640824466943741, 0.25678548216819763, -0.0787527859210968, -0.12189867347478867, 0.23410041630268097, -0.41001707315444946, 0.13690710067749023, 0.06204786151647568, 0.12508265674114227, 0.17005783319473267, -0.1776704341173172, 0.1202128604054451, 0.11262885481119156, -0.1570281684398651, 0.18971119821071625, -0.07724679261445999, -0.1316175013780594, -0.1925022453069687, -0.3208245635032654, 0.19647884368896484, -0.33428606390953064, 0.24181634187698364, -0.15858295559883118, 0.01982787251472473, -0.06153290346264839, 0.09574022144079208, -0.2645619809627533, 0.7512268424034119, 0.4937877953052521, -0.1195114403963089, 0.2913582921028137, 0.39662373065948486, -0.2185574769973755, -0.1752832680940628, 0.4062904715538025, -0.3826131224632263, -0.27773505449295044, 0.210041806101799, -0.04018622636795044, -0.23807594180107117, 0.3465701937675476, -0.5073060393333435, 0.2185847908258438, 0.17824581265449524, 0.08225078135728836, 0.291472464799881, -0.2697470784187317, -0.10539443790912628, -0.23601171374320984, 0.04256228357553482, 0.6938401460647583, -0.6387726664543152, -0.049924593418836594, 0.11018934845924377, 0.10137918591499329, -0.061366111040115356, 0.347880095243454, -0.04546063020825386, 0.34810999035835266, -0.41073542833328247, 0.3059868812561035, 0.0873119905591011, -0.12647084891796112, -0.32756325602531433, 0.31341999769210815, -0.03581523150205612, 0.23563958704471588, -0.021055109798908234, -0.06424815207719803, 0.5519378185272217, -0.18738889694213867, 0.3676522374153137, -0.1700584441423416, -0.27995744347572327, 0.10416289418935776, -0.05038169398903847, -0.03984377905726433, 0.06038003787398338, -0.24208202958106995, 0.1949242502450943, 0.01658741943538189, 0.039078135043382645, -0.5488615036010742, 0.12863896787166595, -0.1508789211511612, 0.3383629024028778, 0.24017028510570526, 0.2621084451675415, 0.12333148717880249, 0.018251709640026093, -0.25635212659835815, -0.4713619351387024, 0.3001762330532074, -0.4880331754684448, 0.02124893292784691, -0.4338341951370239, -0.10330409556627274, 0.030964938923716545, 0.18347400426864624, -0.03502006456255913, 0.0330955944955349, -0.07492069900035858, -0.4975805878639221, 0.17657095193862915, -0.021343884989619255, -0.2262367159128189, -0.23706987500190735, -0.13586461544036865, -0.008438926190137863, -0.3567229211330414, 0.07136016339063644, 0.2501082420349121, -0.2921575903892517, -0.25420457124710083, 0.24663028120994568, 0.11493192613124847, -0.11761078983545303, 0.11735449731349945, 0.1758529394865036, -0.03481614217162132, -0.1673574596643448, -0.1400129348039627, 0.1312534660100937, 0.011728363111615181, -0.04580065980553627, 0.10183721035718918, 0.14501351118087769, 0.3444770872592926, -0.23784340918064117, -0.06940686702728271, 0.5054207444190979, -0.18761460483074188, 0.535930335521698, -0.17968632280826569, 0.051238417625427246, -0.19963201880455017, 0.04260646551847458, -0.2059214562177658, -0.3850511908531189, 0.07628374546766281, -0.15773700177669525, 0.05133737996220589, 0.03191465511918068, 0.0012567437952384353, -0.198919415473938, 0.08561693131923676, -0.04696207866072655, 0.1647791564464569, 0.014488167129456997, -0.063052237033844, 0.22668950259685516, 0.044692669063806534, -0.014277230948209763, 0.3432696759700775, 0.2191428393125534, -0.08872583508491516, -0.15218238532543182, 0.2504402697086334, 0.00012215517926961184, 0.413918137550354, 0.1816675066947937, 0.026053156703710556, 0.15500938892364502, -0.0036409473977983, -0.06571999937295914, -0.25283360481262207, -0.18143075704574585, 0.005715363193303347, 0.14953412115573883, -0.3952978551387787, -0.0354202575981617, 0.11011457443237305, -0.15850429236888885, 0.06897620111703873, -0.076503224670887, -0.2908565104007721, -0.3032287359237671, -0.045333728194236755, 0.260157972574234, -0.27227142453193665, -0.024007774889469147, -0.40131354331970215, 0.011653460562229156, 0.1975092887878418, -0.27472010254859924, -0.28129974007606506, -0.1685466468334198, -0.07561113685369492, -0.07415890693664551, 0.07311375439167023, -0.1339879333972931, 0.361563116312027, 0.2521374523639679, -0.26128196716308594, -0.24377140402793884, -0.09511370211839676, 0.0065135350450873375, -0.537039577960968, 0.20540335774421692, 0.41009271144866943, 0.39817070960998535, -0.29238462448120117, 0.1470613330602646, 0.2793859541416168, -0.107142873108387, -0.24806787073612213, -0.007905746810138226, 0.022333964705467224, 0.15326277911663055, -0.17921525239944458, 0.14743168652057648, 0.06446149945259094, -0.320930153131485, 0.1781851202249527, -0.1891590654850006, 0.2615511119365692, 0.21945330500602722, 0.2780078053474426, 0.15385735034942627, -0.3693771958351135, -0.4285494387149811, 0.12235145270824432, -0.14167656004428864, 0.4460209906101227, 0.039022888988256454, -0.14693079888820648, 0.1844053715467453, 0.026218721643090248, -0.18531933426856995, 0.2405572384595871, -0.09668570011854172, 0.0939638614654541, -0.05627404898405075, 0.12348305433988571, 0.19000624120235443, 0.36680012941360474, 0.4985278844833374, 0.0864882543683052, 0.04604468494653702, -0.2846720814704895, -0.10895585268735886, 0.08126389235258102, 0.022276844829320908, -0.06451409310102463, 0.4225294888019562, 0.32178956270217896, 0.028700489550828934, 0.7504062056541443, 0.36547672748565674, 0.12721356749534607, 0.09464516490697861, 0.07253672182559967, 0.38223639130592346, -0.11400629580020905, -0.3796921968460083, -0.208224818110466, 0.15388476848602295, -0.08407841622829437, 0.03251299634575844, 0.05505530908703804, -0.06203438714146614, -0.0012851920910179615, 0.061900340020656586, -0.4879450500011444, -0.18903687596321106, 0.4240105450153351, -0.30936333537101746, 0.07615630328655243, -0.07491468638181686, 0.09561686217784882, -0.27881020307540894, -0.18202699720859528, -0.16371484100818634, -0.30362457036972046, 0.6426758766174316, -0.08232482522726059, -0.07537891715765, -0.1154969334602356, -0.6797443628311157, 0.33253392577171326, 0.22117996215820312, -0.08481092751026154, 0.10671643912792206, -0.1852942705154419, 0.06875630468130112, 0.3100571036338806, 0.9494888186454773, -0.19327247142791748, 0.15665532648563385, 0.08142618089914322, -0.02484363317489624, -0.44353482127189636, 0.09980637580156326, -0.32794150710105896, 0.25508707761764526, 0.2495422065258026, 0.5071648955345154, -0.3575255572795868, -0.0723436251282692, -0.04205319657921791, -0.027732960879802704, 0.03472249209880829, -0.026486486196517944, -0.1733802706003189, -0.149541974067688, -0.1380317658185959, 0.3645794987678528, 0.44694605469703674, 0.07268571853637695, 0.13567028939723969, -0.20947113633155823, -0.09888684749603271, 0.04817071929574013, 0.01759950816631317, -0.13403019309043884, 0.4707484245300293, 0.01583368144929409, 0.05059855058789253, 0.27013731002807617, 0.11173496395349503, 0.22063037753105164, 0.4900631308555603, -0.15343059599399567, 0.20740757882595062, -0.18158678710460663, 0.030591165646910667, 0.3123360276222229, 0.43981632590293884, 0.00996522605419159, 0.057914700359106064, 0.3812752962112427, 0.35221725702285767, -0.05150436982512474, -0.2942023277282715, 0.1262357383966446, 0.046404145658016205, -0.5417701601982117, 0.003656748915091157, 0.11587844043970108, -0.09958216547966003, 0.08497065305709839, 0.6082314252853394, 0.5790844559669495, -0.3638048470020294, 0.36096635460853577, 0.04329182207584381, 0.8923070430755615, -0.01489314902573824, 0.10762739926576614, 0.14868082106113434, 0.07094895094633102, 0.24982883036136627, 0.5552585124969482, 0.0943637490272522, 0.008422152139246464, 0.09743867814540863, -0.040766362100839615, -0.008215597830712795, 0.16687442362308502, 0.3400381803512573, 0.10278644412755966, 0.27085936069488525, 0.08195740729570389, 0.12089386582374573, -0.15034633874893188, -0.2895897626876831, 0.28774577379226685, -0.3301817774772644, -0.3449304699897766, -0.07553864270448685, 0.07857118546962738, 0.2657669484615326, -0.057930149137973785, -0.10584910213947296, -0.030924204736948013, -0.403766930103302, -0.19284598529338837, -0.18520252406597137, -0.44499003887176514, 0.021173939108848572, 0.26389291882514954, -0.2862427532672882, -0.032858699560165405, 0.051584962755441666, -0.4806172251701355, 0.1447318196296692, -0.11111192405223846, -0.1330835521221161, 0.3892787992954254, 0.17192380130290985, 0.02182278223335743, -0.15219275653362274, 0.1726178526878357, 0.19981709122657776, -0.1803181916475296, 0.05755346268415451, -0.4518599808216095, -0.17299474775791168, 0.06446658819913864, 0.40836581587791443, -0.20234113931655884, -0.22290021181106567, -0.39682045578956604, -0.19215919077396393, 0.10154248774051666, 0.0394880548119545, -0.08833836019039154, 0.2670641541481018, -0.07576559484004974, 0.39075037837028503, -0.19200913608074188, -0.45341864228248596, -0.04374232143163681, 0.5255671739578247, 0.0346294529736042, -0.19231894612312317, 0.4125707149505615, 0.15918537974357605, -0.1644420474767685, -0.06954287737607956, 0.13838936388492584, 0.3426441550254822, -0.6278498768806458, 0.5433273315429688, 0.24986937642097473, 0.03698979318141937, 0.1378326714038849, 0.4185105562210083, 0.1368645280599594, 0.2798646092414856, -0.3155888020992279, -0.1867186278104782, -0.2580823302268982, 0.40863800048828125, 0.10354253649711609, 0.03598066791892052, -0.14204637706279755, -0.2367398589849472, 0.3288380205631256, -0.1956319808959961, -0.15207555890083313, 0.06600501388311386, -0.08657663315534592, 0.3288321793079376, 0.21843352913856506, 0.2640419900417328, 0.35698387026786804, -0.08181171119213104, -0.10281669348478317, 0.13153116405010223, -0.2793508768081665, -0.07360569387674332, -0.04670882225036621, 0.17635488510131836, 0.10426028072834015, -0.22039884328842163, 0.16272296011447906, -0.4074193835258484, -0.046006862074136734, -0.406266450881958, 0.2619495093822479, 0.4909597635269165, -0.004014009144157171, -0.2378339320421219, 0.3719465136528015, 0.060078416019678116, -0.029745949432253838, 0.20644626021385193, -0.17768742144107819, -0.07059662789106369, -0.06777848303318024, 0.3043539524078369, 0.16345907747745514, 0.03375052288174629, 0.08297407627105713, 0.07204835116863251, 0.014262212440371513, 0.003094608196988702, 0.4227866530418396, -0.2046114057302475, -0.21244634687900543, 0.3322145938873291, 0.2543899714946747, 0.018418841063976288, -0.020860841497778893, -0.15182912349700928, 0.2098124772310257, 0.006032036617398262, -0.1523621529340744, 0.028843628242611885, 0.15505161881446838, 0.34181076288223267, 0.26052606105804443, 0.36461421847343445, -0.16854210197925568, -0.2591930329799652, 0.017468314617872238, 0.18861569464206696, 0.02110378071665764, 0.0309399776160717, 0.188058540225029, 0.39068499207496643, 0.3334284722805023, -0.09894293546676636, 0.3222147822380066, 0.07886946946382523, 0.2825945019721985, 0.2901286482810974, 0.23771046102046967, 0.2660045325756073, 0.013971048407256603, 0.08644552528858185, -0.2048540860414505, -0.5083087086677551, 0.03778552636504173, 0.08903414756059647, -0.0027336226776242256, 0.33608415722846985, 0.1234637051820755, 0.15381141006946564, -0.1924225389957428, -0.27505746483802795, 0.04185962677001953, 0.0021715464536100626, -0.3454616665840149, -0.061833810061216354, -0.31367549300193787, -0.2561423182487488, 0.4150928556919098, -0.16091634333133698, 0.06273652613162994, -0.34548667073249817, 0.3650221824645996, -0.07760758697986603, -0.0953703299164772, -0.14416512846946716, -0.36772558093070984, 0.024002935737371445, 0.229259192943573, -0.11037924885749817, 0.1378631889820099, -0.09132414311170578, -0.04632900282740593, 0.05049232766032219, 0.5798315405845642, 0.5111634731292725, 0.39856860041618347, -0.024610500782728195, 0.40082505345344543, 0.13015758991241455, -0.24362564086914062, -0.286192923784256, 0.36318957805633545, -0.059528857469558716, -0.025094231590628624, 0.2001093029975891, -0.0104518448933959, -0.04692601412534714, -0.06305475533008575, -0.0026363388169556856, 0.10762563347816467, 0.16351501643657684, -0.19085542857646942, -0.19742171466350555, -0.23625369369983673, -0.26874735951423645, -0.04919450357556343, -0.08179503679275513, 0.01605328731238842, 0.29386427998542786, -0.09964156895875931, 0.046356238424777985, 0.07786119729280472, -0.0013327529886737466, -0.04151930287480354, 0.2583118677139282, 0.45365965366363525, 0.003588515566661954, -0.4841512441635132, 0.17722256481647491, -0.3718905448913574, -0.030173378065228462, -0.4928690195083618, 0.2783646881580353, 0.03891861066222191, 0.19725842773914337, 0.11981739103794098, -0.12264230102300644, 0.31830719113349915, -0.050173211842775345, -0.04383484274148941, 0.354549765586853, 0.06481387466192245, -0.2790631055831909, -0.1928180605173111, -0.013535566627979279, 0.010154712945222855, -0.38427072763442993, 0.10624606907367706, -0.11351074278354645, -0.07535988837480545, -0.10560964792966843, 0.169926717877388, -0.15767186880111694, 0.0275924913585186, 0.1774147003889084, 0.33601659536361694, -0.04189559072256088, 0.029431622475385666, -0.017705515027046204, -0.35040387511253357, 0.1464197188615799, -0.12648999691009521, 0.13943694531917572, 0.35960039496421814, 0.4612444341182709, -0.3284623622894287, -0.20270587503910065, -0.02407541126012802, 0.0423462800681591, 0.004644832108169794, 0.036162253469228745, -0.18189294636249542, 0.14358484745025635, -0.3938451409339905, -0.03584033623337746, -0.12207399308681488, 0.022270813584327698, 0.08602324873209, 0.02708587236702442, -0.2525871992111206, -0.35494333505630493, 0.3827643394470215, -0.6531072854995728, -0.26200708746910095, -0.06931859999895096, 0.3420596122741699, 0.21151070296764374, -0.22564071416854858, -0.3928543031215668, -0.17192047834396362, 0.2626016438007355, -0.06935819238424301, -0.06165432557463646, -0.18479108810424805, -0.503738522529602, -0.03442920744419098, -0.15762393176555634, 0.1152828261256218, 0.03572043403983116, 0.006658793427050114, 0.23119652271270752, -0.3098658621311188 ]
https://github.com/huggingface/datasets/issues/2643
Enum used in map functions will raise a RecursionError with dill.
I'm running into this as well. (Thank you so much for reporting @jorgeecardona — was staring at this massive stack trace and unsure what exactly was wrong!)
## Describe the bug Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284 In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above. ## Steps to reproduce the bug ```python from datasets import load_dataset from enum import Enum class A(Enum): a = 'a' def main(): a = A.a def f(x): return {} if a == a.a else x ds = load_dataset('cnn_dailymail', '3.0.0')['test'] ds = ds.map(f, num_proc=15) if __name__ == "__main__": main() ``` ## Expected results The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood. ## Actual results ```python File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type pickler.save_reduce(_create_type, (type(obj), obj.__name__, File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce save(args) File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save f(self, obj) # Call unbound method with explicit self File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple save(element) File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save self.framer.commit_frame() File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame if f.tell() >= self._FRAME_SIZE_TARGET or force: RecursionError: maximum recursion depth exceeded while calling a Python object ``` ## Environment info - `datasets` version: 1.8.0 - Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10 - Python version: 3.8.5 - PyArrow version: 3.0.0
27
Enum used in map functions will raise a RecursionError with dill. ## Describe the bug Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284 In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above. ## Steps to reproduce the bug ```python from datasets import load_dataset from enum import Enum class A(Enum): a = 'a' def main(): a = A.a def f(x): return {} if a == a.a else x ds = load_dataset('cnn_dailymail', '3.0.0')['test'] ds = ds.map(f, num_proc=15) if __name__ == "__main__": main() ``` ## Expected results The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood. ## Actual results ```python File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type pickler.save_reduce(_create_type, (type(obj), obj.__name__, File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce save(args) File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save f(self, obj) # Call unbound method with explicit self File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple save(element) File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save self.framer.commit_frame() File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame if f.tell() >= self._FRAME_SIZE_TARGET or force: RecursionError: maximum recursion depth exceeded while calling a Python object ``` ## Environment info - `datasets` version: 1.8.0 - Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10 - Python version: 3.8.5 - PyArrow version: 3.0.0 I'm running into this as well. (Thank you so much for reporting @jorgeecardona — was staring at this massive stack trace and unsure what exactly was wrong!)
[ 0.10536061972379684, 0.1992543488740921, 0.04053209349513054, 0.14069916307926178, -0.07437153905630112, -0.07834332436323166, 0.14776058495044708, 0.233779639005661, 0.12631773948669434, 0.1690645068883896, 0.14533288776874542, 0.933216392993927, -0.29086965322494507, -0.3072982728481293, -0.07833772152662277, 0.0934457778930664, 0.022367402911186218, 0.04552267864346504, -0.61811363697052, -0.24567867815494537, -0.3375144600868225, -0.005242367275059223, -0.10244680196046829, -0.010089034214615822, -0.21160171926021576, 0.22399939596652985, 0.0477667897939682, 0.4010351002216339, 0.08411388844251633, -0.22006723284721375, 0.3333720564842224, -0.07344956696033478, 0.19746245443820953, 0.31421783566474915, -0.00011139165872009471, 0.08502478152513504, 0.1187557727098465, -0.22744105756282806, -0.36546483635902405, -0.2395341843366623, 0.14749085903167725, 0.12261877954006195, 0.07264378666877747, -0.4154759347438812, 0.22263561189174652, 0.3753211796283722, -0.0025734712835401297, -0.2636498510837555, -0.06216208636760712, 0.05436846613883972, 0.1718367040157318, -0.13968119025230408, 0.21704047918319702, 0.07615984231233597, 0.4435095191001892, -0.01828686334192753, 0.04481557756662369, 0.520654559135437, 0.16536034643650055, -0.30559614300727844, -0.16434840857982635, 0.1722366213798523, -0.09769595414400101, -0.025411220267415047, 0.38833513855934143, -0.1136087104678154, 0.6294152736663818, -0.028846068307757378, -0.1640147566795349, 0.22220318019390106, -0.12903176248073578, -0.28409579396247864, -0.22954708337783813, 0.040170975029468536, -0.07943800836801529, -0.10172297805547714, 0.30878642201423645, -0.01802825555205345, -0.013356588780879974, -0.07756048440933228, 0.12406976521015167, -0.21598955988883972, 0.005678035318851471, 0.4278801679611206, -0.1641048789024353, 0.5943014621734619, 0.1378127634525299, 0.1661038100719452, 0.27806898951530457, -0.16848163306713104, -0.19653785228729248, 0.117851622402668, 0.10200659930706024, 0.09503299742937088, -0.22087286412715912, -0.09397929906845093, 0.28465861082077026, -0.36015376448631287, 0.33536139130592346, -0.15426066517829895, 0.014316706918179989, 0.10366415977478027, -0.06858810782432556, 0.33369097113609314, 0.38991227746009827, -0.14183393120765686, -0.05165669322013855, 0.5599201321601868, 0.21554261445999146, -0.1122441217303276, 0.03070293553173542, 0.36070385575294495, 0.060012418776750565, 0.09190687537193298, -0.00836204644292593, -0.11108742654323578, 0.011287728324532509, -0.09541116654872894, -0.10620451718568802, 0.41727879643440247, -0.47471266984939575, -0.11361320316791534, 0.13495534658432007, 0.12400214374065399, -0.10585033893585205, 0.02118714340031147, 0.13413582742214203, 0.08970104902982712, -0.05256449058651924, 0.4216715693473816, -0.21100714802742004, -0.006029495038092136, 0.023419173434376717, -0.21311497688293457, -0.1768057495355606, 0.05482643470168114, 0.2632887661457062, 0.07132712006568909, 0.13229982554912567, -0.02237318642437458, 0.08259157836437225, -0.22468462586402893, 0.1783076524734497, 0.10253135859966278, -0.5080522298812866, -0.08321280777454376, 0.2530026137828827, -0.26041242480278015, -0.2579997479915619, 0.25153103470802307, -0.4531782865524292, -0.0923265665769577, -0.37195247411727905, 0.2141513228416443, 0.15125878155231476, 0.1420760452747345, 0.14658404886722565, -0.1181594580411911, 0.30299022793769836, -0.13724574446678162, 0.1552293598651886, -0.4185497760772705, -0.31117182970046997, -0.2451113760471344, 0.0752648115158081, -0.03098410554230213, -0.0723973959684372, -0.20129212737083435, -0.2666211426258087, 0.15930350124835968, 0.1756729930639267, -0.04904090240597725, -0.18482020497322083, -0.14143890142440796, -0.24045436084270477, 0.2867940366268158, -0.10299088805913925, -0.12635205686092377, -0.364634245634079, -0.06305709481239319, -0.05214684456586838, 0.16916580498218536, -0.2541857361793518, -0.1637442708015442, 0.2021379917860031, -0.27363714575767517, 0.5204456448554993, 0.17516867816448212, 0.11386426538228989, -0.014207596890628338, -0.32020303606987, -0.11339553445577621, 0.32788795232772827, 0.12095283716917038, -0.17150114476680756, -0.09261628985404968, -0.26537856459617615, -0.19638174772262573, 0.3977229595184326, -0.2698432505130768, 0.040584396570920944, 0.13115787506103516, 0.10833690315485, 0.08826544880867004, 0.06282951682806015, -0.15359538793563843, -0.34346699714660645, 0.19829000532627106, -0.25587546825408936, -0.02150711417198181, 0.016487909480929375, -0.1004742830991745, 0.0963975042104721, 0.2580533027648926, -0.0351010337471962, -0.0973074659705162, 0.18913774192333221, 0.09944064915180206, -0.10807321965694427, -0.021638037636876106, -0.00038672337541356683, -0.3291851282119751, -0.4009250998497009, -0.029438763856887817, 0.052463289350271225, 0.3023035526275635, -0.23050817847251892, -0.23220615088939667, -0.20589078962802887, 0.16535846889019012, -0.09190044552087784, 0.00356776244007051, -0.2516869604587555, 0.029069988057017326, 0.3874913454055786, -0.5933537483215332, -0.28054073452949524, -0.05451727658510208, -0.11675280332565308, -0.27488505840301514, 0.03684249520301819, 0.46847274899482727, 0.14549176394939423, -0.2771623432636261, 0.24590031802654266, 0.17548507452011108, 0.1758498251438141, 0.12285953015089035, 0.06971710175275803, 0.22729696333408356, -0.19982574880123138, -0.11351677030324936, -0.029024481773376465, -0.3736834228038788, -0.1019667237997055, 0.09346919506788254, 0.03451050817966461, 0.11486124247312546, -0.03885055333375931, -0.25294429063796997, 0.16791529953479767, 0.2472827434539795, 0.28723639249801636, 0.268038272857666, -0.14141109585762024, 0.08006977289915085, 0.16837328672409058, 0.05610964819788933, 0.1142272800207138, -0.08797623217105865, 0.09766984730958939, 0.14238812029361725, -0.11716895550489426, 0.11365201324224472, -0.07366777956485748, 0.07546129822731018, 0.3981696367263794, 0.14574074745178223, -0.06001182273030281, 0.04964768886566162, -0.041255805641412735, -0.28833457827568054, -0.05368692800402641, 0.10213012248277664, -0.06844031065702438, 0.07459051162004471, -0.4567011892795563, 0.47471025586128235, 0.1333310306072235, -0.5235564708709717, -0.24588817358016968, -0.21182921528816223, -0.17015455663204193, 0.12948112189769745, -0.5239449739456177, 0.21116283535957336, -0.17912030220031738, -0.4466721713542938, 0.19966532289981842, -0.34406304359436035, 0.28589922189712524, -0.321058988571167, -0.29670286178588867, -0.023546429350972176, 0.15815438330173492, -0.17906059324741364, 0.03748946636915207, 0.2627147138118744, -0.3319721817970276, 0.035578660666942596, -0.20127010345458984, 0.14697587490081787, 0.03246137127280235, 0.17112651467323303, 0.2742403745651245, 0.0931568443775177, -0.43868064880371094, -0.4228980839252472, 0.1325160413980484, 0.1339353621006012, -0.05866558104753494, 0.06010378152132034, 0.2963470220565796, 0.2722683846950531, -0.2222013622522354, -0.306588739156723, -0.1973070204257965, -0.38459891080856323, -0.20849940180778503, 0.07037957012653351, 0.4546930491924286, 0.2742166221141815, -0.016064029186964035, 0.4758414328098297, 0.3324287533760071, 0.31274908781051636, -0.32347971200942993, 0.3757663071155548, 0.20174865424633026, -0.16260941326618195, -0.20931558310985565, -0.163718119263649, -0.5420066714286804, 0.08442622423171997, 0.11821520328521729, -0.5454442501068115, -0.20521071553230286, 0.18917416036128998, 0.07230892032384872, -0.24910074472427368, -0.1957811564207077, 0.11900518089532852, 0.22331906855106354, 0.06280925869941711, -0.021954288706183434, -0.27260223031044006, 0.22372236847877502, 0.2733667194843292, 0.1518392115831375, 0.1783870905637741, -0.0109514519572258, -0.043243758380413055, 0.36848780512809753, 0.3489729166030884, -0.025331223383545876, 0.41160061955451965, 0.3529875874519348, -0.0865497961640358, 0.04252200573682785, 0.03632643446326256, 0.11211954057216644, 0.03950592875480652, -0.08969468623399734, 0.13299429416656494, -0.14528757333755493, -0.6623030304908752, 0.03204917162656784, 0.14800967276096344, 0.30373066663742065, -0.49230214953422546, 0.2677828073501587, -0.393976628780365, 0.05314460024237633, -0.3042106032371521, 0.23575454950332642, 0.12423428148031235, 0.22633673250675201, 0.10904484242200851, -0.09142577648162842, 0.19035746157169342, -0.11923734098672867, -0.09248732030391693, -0.16503703594207764, -0.006723163183778524, 0.11854080855846405, 0.335376501083374, 0.37176573276519775, -0.04535916820168495, -0.3760145604610443, -0.12439632415771484, -0.10633159428834915, 0.40100976824760437, -0.34819838404655457, 0.07695746421813965, 0.41222652792930603, -0.2628345787525177, -0.289960652589798, -0.13580554723739624, 0.07485596835613251, 0.04181540012359619, 0.3262103199958801, -0.1238103061914444, -0.4923030436038971, 0.1185787171125412, 0.4219980537891388, 0.008125700056552887, 0.11812538653612137, -0.0038843629881739616, -0.05889839306473732, -0.1878027468919754, -0.29514947533607483, -0.011558623053133488, -0.14582782983779907, 0.12250441312789917, 0.21502861380577087, -0.01800069585442543, -0.1149308979511261, 0.10041696578264236, -0.08380261808633804, -0.16687676310539246, 0.28626126050949097, -0.12395070493221283, 0.15847153961658478, 0.14502950012683868, 0.3025130033493042, 0.27380648255348206, 0.32763493061065674, -0.3374814987182617, 0.19927191734313965, 0.29324695467948914, 0.225600004196167, 0.1761760264635086, 0.05524758994579315, 0.20080280303955078, 0.15379266440868378, 0.010554987005889416, -0.1905161738395691, -0.17882530391216278, -0.3223813772201538, 0.08727782964706421, 0.05002845451235771, -0.12192830443382263, -0.3815683126449585, 0.06622274219989777, 0.16936981678009033, -0.011047063395380974, 0.06162644177675247, -0.3657359778881073, -0.010244583711028099, 0.4981333017349243, 0.35206732153892517, 0.8710964918136597, 0.219619020819664, -0.04610620439052582, 0.09723080694675446, -0.026317443698644638, -0.2297057956457138, 0.3024888038635254, -0.18043182790279388, -0.29866108298301697, 0.004067310597747564, -0.07449710369110107, -0.12460886687040329, -0.021566303446888924, -0.01525510847568512, -0.3948970437049866, 0.023443542420864105, -0.19974908232688904, 0.041967373341321945, 0.028236646205186844, -0.052602529525756836, -0.060700297355651855, -0.10948328673839569, 0.2939585745334625, 0.16086912155151367, 0.09298739582300186, 0.07982412725687027, -0.06561356782913208, -0.09195242077112198, -0.24051231145858765, -0.38050973415374756, -0.15403644740581512, 0.1441754251718521, -0.11376609653234482, 0.4462919235229492, 0.35436639189720154, -0.28590458631515503, 0.13251611590385437, 0.362555593252182, -0.26756730675697327, 0.12171022593975067, -0.06499631702899933, -0.02340839058160782, 0.04192608967423439, 0.19903498888015747, 0.25699174404144287, -0.06536490470170975, 0.532714307308197, -0.008403768762946129, -0.2321222722530365, 0.14574363827705383, -0.09407754987478256, -0.2741779088973999, -0.08680346608161926, 0.3060581684112549, 0.3108740746974945, -0.018217895179986954, 0.05569574609398842, -0.05704941973090172, -0.17519398033618927, -0.17226190865039825, 0.1487811803817749, 0.19785115122795105, -0.17348094284534454, 0.25131574273109436, 0.0907398983836174, -0.21897026896476746, -0.08010619133710861, 0.4010269343852997, 0.4048633873462677, 0.5142771601676941, 0.3133552670478821, -0.06605421751737595, -0.11954411119222641, -0.15255053341388702, -0.35217851400375366, -0.3539164960384369, 0.23963922262191772, 0.2017318606376648, 0.018483037129044533, -0.14710915088653564, -0.3326055109500885, -0.09506764262914658, 0.08194214105606079, 0.2781379520893097, -0.408523827791214, -0.27973824739456177, -0.335723340511322, 0.09742660820484161, -0.12044733762741089, 0.2147095948457718, -0.25884678959846497, -0.037536364048719406, -0.31563660502433777, 0.20425477623939514, -0.32190626859664917, 0.03818473964929581, -0.39978647232055664, 0.17228101193904877, -0.14830629527568817, -0.2481522262096405, 0.018231727182865143, 0.030765222385525703, 0.16738742589950562, 0.23041824996471405, -0.2873900234699249, -0.11219989508390427, -0.24056416749954224, 0.0865456685423851, 0.1410396844148636, -0.1369151622056961, 0.13077473640441895, -0.16638192534446716, 0.07748985290527344, -0.18978779017925262, 0.032598190009593964, -0.15484671294689178, -0.118571437895298, 0.364176481962204, 0.19780738651752472, 0.15579959750175476, 0.18834470212459564, 0.26567545533180237, -0.14319512248039246, 0.283956915140152, -0.15872064232826233, 0.013291507959365845, -0.22597022354602814, -0.08386299014091492, -0.0842176154255867, 0.0726766586303711, -0.21821194887161255, -0.23917829990386963, 0.26393336057662964, -0.015073984861373901, -0.19120073318481445, -0.08650537580251694, 0.17252609133720398, 0.20492760837078094, -0.37964725494384766, -0.1530585139989853, 0.540761411190033, 0.20504361391067505, -0.004619411658495665, -0.03410479798913002, 0.5727977752685547, -0.09246084094047546, 0.23166096210479736, 0.3061140179634094, -0.15375709533691406, -0.18797601759433746, -0.1503075659275055, -0.011798819527029991, -0.34741249680519104, 0.05281361937522888, 0.2156011313199997, 0.4500202238559723, -0.19075976312160492, 0.15370352566242218, 0.15344233810901642, -0.1342351883649826, 0.5434713363647461, 0.014411293901503086, 0.13494537770748138, 0.1574079692363739, -0.001568170846439898, 0.044437725096940994, 0.3795166313648224, -0.48997068405151367, 0.4982147216796875, 0.6172640919685364, 0.23855949938297272, 0.3534960448741913, 0.1136450543999672, 0.17976759374141693, -0.18039937317371368, 0.03109269216656685, -0.1614091545343399, 0.20594175159931183, -0.3470534682273865, -0.018273454159498215, -0.017569780349731445, -0.1287972629070282, 0.0025711366906762123, 0.03179915249347687, -0.03310771286487579, -0.14632852375507355, 0.22259272634983063, 0.10307358205318451, -0.2522371709346771, -0.3613152503967285, -0.029379291459918022, -0.19579356908798218, 0.019742459058761597, -0.22029881179332733, -0.05942946672439575, 0.1275479644536972, 0.13945767283439636, -0.3628341257572174, 0.12339942157268524, 0.20217785239219666, 0.5606961846351624, -0.45155778527259827, -0.25359389185905457, 0.2951529920101166, 0.08716575801372528, -0.2988334596157074, 0.16974785923957825, -0.23222580552101135, -0.17149370908737183, 0.44228723645210266, 0.07521633058786392, -0.24496349692344666, -0.1833672821521759, 0.13426122069358826, 0.4924425780773163, 0.2643302381038666, 0.09721343219280243, 0.2130136638879776, 0.2047801911830902, 0.16330766677856445, -0.20802755653858185, -0.2605632543563843, -0.15556761622428894, 0.1988859623670578, -0.006320766173303127, 0.31956788897514343, 0.07287765294313431, 0.09287787228822708, -0.04253548011183739, 0.23829542100429535, 0.21525636315345764, 0.17456884682178497, -0.046424902975559235, -0.08781646192073822, -0.26926106214523315, 0.35070258378982544, -0.13880158960819244, -0.208133727312088, 0.3059596121311188, -0.011172648519277573, 0.06573651731014252, 0.1503104716539383, -0.11548607051372528, -0.20898765325546265, 0.16076233983039856, 0.4486095905303955, -0.29060930013656616, -0.1849915087223053, -0.10596222430467606, -0.15106752514839172, 0.26875218749046326, -0.5409831404685974, 0.1342630386352539, 0.1473645120859146, 0.07054402679204941, -0.23181705176830292, 0.014069309458136559, -0.011605984531342983, 0.3986549973487854, 0.4254050850868225, 0.11474426835775375, 0.46392667293548584, -0.1939549595117569, -0.10574546456336975, 0.20565851032733917, 0.0157292690128088, -0.021350745111703873, -0.169184610247612, -0.11767887324094772, 0.3652637004852295, -0.08497022837400436, -0.23371335864067078, -0.12840323150157928, 0.532108724117279, -0.10693199932575226, -0.18596838414669037, -0.16029828786849976, 0.31231534481048584, -0.013214459642767906, 0.023958396166563034, -0.4056389629840851, 0.20579726994037628, 0.16618354618549347, 0.2969306707382202, -0.06534343957901001, -0.23560677468776703, 0.7419952154159546, 0.062122538685798645, -0.054097823798656464, -0.12703508138656616, 0.020278317853808403, -0.5549435019493103, -0.16971226036548615, -0.24630767107009888, -0.126868337392807, 0.21109358966350555, 0.19473761320114136, -0.5221104621887207, -0.15029233694076538, 0.14504463970661163, 0.07150246948003769, -0.2004755437374115, 0.6373546719551086, -0.2366664558649063, -0.33415478467941284, 0.28381139039993286, -0.09788396209478378 ]
https://github.com/huggingface/datasets/issues/2643
Enum used in map functions will raise a RecursionError with dill.
Hi ! Thanks for reporting :) Until this is fixed on `dill`'s side, we could implement a custom saving in our Pickler indefined in utils.py_utils.py There is already a suggestion in this message about how to do it: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284 Let me know if such a workaround could help, and feel free to open a PR if you want to contribute !
## Describe the bug Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284 In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above. ## Steps to reproduce the bug ```python from datasets import load_dataset from enum import Enum class A(Enum): a = 'a' def main(): a = A.a def f(x): return {} if a == a.a else x ds = load_dataset('cnn_dailymail', '3.0.0')['test'] ds = ds.map(f, num_proc=15) if __name__ == "__main__": main() ``` ## Expected results The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood. ## Actual results ```python File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type pickler.save_reduce(_create_type, (type(obj), obj.__name__, File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce save(args) File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save f(self, obj) # Call unbound method with explicit self File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple save(element) File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save self.framer.commit_frame() File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame if f.tell() >= self._FRAME_SIZE_TARGET or force: RecursionError: maximum recursion depth exceeded while calling a Python object ``` ## Environment info - `datasets` version: 1.8.0 - Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10 - Python version: 3.8.5 - PyArrow version: 3.0.0
61
Enum used in map functions will raise a RecursionError with dill. ## Describe the bug Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284 In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above. ## Steps to reproduce the bug ```python from datasets import load_dataset from enum import Enum class A(Enum): a = 'a' def main(): a = A.a def f(x): return {} if a == a.a else x ds = load_dataset('cnn_dailymail', '3.0.0')['test'] ds = ds.map(f, num_proc=15) if __name__ == "__main__": main() ``` ## Expected results The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood. ## Actual results ```python File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type pickler.save_reduce(_create_type, (type(obj), obj.__name__, File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce save(args) File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save f(self, obj) # Call unbound method with explicit self File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple save(element) File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save self.framer.commit_frame() File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame if f.tell() >= self._FRAME_SIZE_TARGET or force: RecursionError: maximum recursion depth exceeded while calling a Python object ``` ## Environment info - `datasets` version: 1.8.0 - Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10 - Python version: 3.8.5 - PyArrow version: 3.0.0 Hi ! Thanks for reporting :) Until this is fixed on `dill`'s side, we could implement a custom saving in our Pickler indefined in utils.py_utils.py There is already a suggestion in this message about how to do it: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284 Let me know if such a workaround could help, and feel free to open a PR if you want to contribute !
[ 0.10536061972379684, 0.1992543488740921, 0.04053209349513054, 0.14069916307926178, -0.07437153905630112, -0.07834332436323166, 0.14776058495044708, 0.233779639005661, 0.12631773948669434, 0.1690645068883896, 0.14533288776874542, 0.933216392993927, -0.29086965322494507, -0.3072982728481293, -0.07833772152662277, 0.0934457778930664, 0.022367402911186218, 0.04552267864346504, -0.61811363697052, -0.24567867815494537, -0.3375144600868225, -0.005242367275059223, -0.10244680196046829, -0.010089034214615822, -0.21160171926021576, 0.22399939596652985, 0.0477667897939682, 0.4010351002216339, 0.08411388844251633, -0.22006723284721375, 0.3333720564842224, -0.07344956696033478, 0.19746245443820953, 0.31421783566474915, -0.00011139165872009471, 0.08502478152513504, 0.1187557727098465, -0.22744105756282806, -0.36546483635902405, -0.2395341843366623, 0.14749085903167725, 0.12261877954006195, 0.07264378666877747, -0.4154759347438812, 0.22263561189174652, 0.3753211796283722, -0.0025734712835401297, -0.2636498510837555, -0.06216208636760712, 0.05436846613883972, 0.1718367040157318, -0.13968119025230408, 0.21704047918319702, 0.07615984231233597, 0.4435095191001892, -0.01828686334192753, 0.04481557756662369, 0.520654559135437, 0.16536034643650055, -0.30559614300727844, -0.16434840857982635, 0.1722366213798523, -0.09769595414400101, -0.025411220267415047, 0.38833513855934143, -0.1136087104678154, 0.6294152736663818, -0.028846068307757378, -0.1640147566795349, 0.22220318019390106, -0.12903176248073578, -0.28409579396247864, -0.22954708337783813, 0.040170975029468536, -0.07943800836801529, -0.10172297805547714, 0.30878642201423645, -0.01802825555205345, -0.013356588780879974, -0.07756048440933228, 0.12406976521015167, -0.21598955988883972, 0.005678035318851471, 0.4278801679611206, -0.1641048789024353, 0.5943014621734619, 0.1378127634525299, 0.1661038100719452, 0.27806898951530457, -0.16848163306713104, -0.19653785228729248, 0.117851622402668, 0.10200659930706024, 0.09503299742937088, -0.22087286412715912, -0.09397929906845093, 0.28465861082077026, -0.36015376448631287, 0.33536139130592346, -0.15426066517829895, 0.014316706918179989, 0.10366415977478027, -0.06858810782432556, 0.33369097113609314, 0.38991227746009827, -0.14183393120765686, -0.05165669322013855, 0.5599201321601868, 0.21554261445999146, -0.1122441217303276, 0.03070293553173542, 0.36070385575294495, 0.060012418776750565, 0.09190687537193298, -0.00836204644292593, -0.11108742654323578, 0.011287728324532509, -0.09541116654872894, -0.10620451718568802, 0.41727879643440247, -0.47471266984939575, -0.11361320316791534, 0.13495534658432007, 0.12400214374065399, -0.10585033893585205, 0.02118714340031147, 0.13413582742214203, 0.08970104902982712, -0.05256449058651924, 0.4216715693473816, -0.21100714802742004, -0.006029495038092136, 0.023419173434376717, -0.21311497688293457, -0.1768057495355606, 0.05482643470168114, 0.2632887661457062, 0.07132712006568909, 0.13229982554912567, -0.02237318642437458, 0.08259157836437225, -0.22468462586402893, 0.1783076524734497, 0.10253135859966278, -0.5080522298812866, -0.08321280777454376, 0.2530026137828827, -0.26041242480278015, -0.2579997479915619, 0.25153103470802307, -0.4531782865524292, -0.0923265665769577, -0.37195247411727905, 0.2141513228416443, 0.15125878155231476, 0.1420760452747345, 0.14658404886722565, -0.1181594580411911, 0.30299022793769836, -0.13724574446678162, 0.1552293598651886, -0.4185497760772705, -0.31117182970046997, -0.2451113760471344, 0.0752648115158081, -0.03098410554230213, -0.0723973959684372, -0.20129212737083435, -0.2666211426258087, 0.15930350124835968, 0.1756729930639267, -0.04904090240597725, -0.18482020497322083, -0.14143890142440796, -0.24045436084270477, 0.2867940366268158, -0.10299088805913925, -0.12635205686092377, -0.364634245634079, -0.06305709481239319, -0.05214684456586838, 0.16916580498218536, -0.2541857361793518, -0.1637442708015442, 0.2021379917860031, -0.27363714575767517, 0.5204456448554993, 0.17516867816448212, 0.11386426538228989, -0.014207596890628338, -0.32020303606987, -0.11339553445577621, 0.32788795232772827, 0.12095283716917038, -0.17150114476680756, -0.09261628985404968, -0.26537856459617615, -0.19638174772262573, 0.3977229595184326, -0.2698432505130768, 0.040584396570920944, 0.13115787506103516, 0.10833690315485, 0.08826544880867004, 0.06282951682806015, -0.15359538793563843, -0.34346699714660645, 0.19829000532627106, -0.25587546825408936, -0.02150711417198181, 0.016487909480929375, -0.1004742830991745, 0.0963975042104721, 0.2580533027648926, -0.0351010337471962, -0.0973074659705162, 0.18913774192333221, 0.09944064915180206, -0.10807321965694427, -0.021638037636876106, -0.00038672337541356683, -0.3291851282119751, -0.4009250998497009, -0.029438763856887817, 0.052463289350271225, 0.3023035526275635, -0.23050817847251892, -0.23220615088939667, -0.20589078962802887, 0.16535846889019012, -0.09190044552087784, 0.00356776244007051, -0.2516869604587555, 0.029069988057017326, 0.3874913454055786, -0.5933537483215332, -0.28054073452949524, -0.05451727658510208, -0.11675280332565308, -0.27488505840301514, 0.03684249520301819, 0.46847274899482727, 0.14549176394939423, -0.2771623432636261, 0.24590031802654266, 0.17548507452011108, 0.1758498251438141, 0.12285953015089035, 0.06971710175275803, 0.22729696333408356, -0.19982574880123138, -0.11351677030324936, -0.029024481773376465, -0.3736834228038788, -0.1019667237997055, 0.09346919506788254, 0.03451050817966461, 0.11486124247312546, -0.03885055333375931, -0.25294429063796997, 0.16791529953479767, 0.2472827434539795, 0.28723639249801636, 0.268038272857666, -0.14141109585762024, 0.08006977289915085, 0.16837328672409058, 0.05610964819788933, 0.1142272800207138, -0.08797623217105865, 0.09766984730958939, 0.14238812029361725, -0.11716895550489426, 0.11365201324224472, -0.07366777956485748, 0.07546129822731018, 0.3981696367263794, 0.14574074745178223, -0.06001182273030281, 0.04964768886566162, -0.041255805641412735, -0.28833457827568054, -0.05368692800402641, 0.10213012248277664, -0.06844031065702438, 0.07459051162004471, -0.4567011892795563, 0.47471025586128235, 0.1333310306072235, -0.5235564708709717, -0.24588817358016968, -0.21182921528816223, -0.17015455663204193, 0.12948112189769745, -0.5239449739456177, 0.21116283535957336, -0.17912030220031738, -0.4466721713542938, 0.19966532289981842, -0.34406304359436035, 0.28589922189712524, -0.321058988571167, -0.29670286178588867, -0.023546429350972176, 0.15815438330173492, -0.17906059324741364, 0.03748946636915207, 0.2627147138118744, -0.3319721817970276, 0.035578660666942596, -0.20127010345458984, 0.14697587490081787, 0.03246137127280235, 0.17112651467323303, 0.2742403745651245, 0.0931568443775177, -0.43868064880371094, -0.4228980839252472, 0.1325160413980484, 0.1339353621006012, -0.05866558104753494, 0.06010378152132034, 0.2963470220565796, 0.2722683846950531, -0.2222013622522354, -0.306588739156723, -0.1973070204257965, -0.38459891080856323, -0.20849940180778503, 0.07037957012653351, 0.4546930491924286, 0.2742166221141815, -0.016064029186964035, 0.4758414328098297, 0.3324287533760071, 0.31274908781051636, -0.32347971200942993, 0.3757663071155548, 0.20174865424633026, -0.16260941326618195, -0.20931558310985565, -0.163718119263649, -0.5420066714286804, 0.08442622423171997, 0.11821520328521729, -0.5454442501068115, -0.20521071553230286, 0.18917416036128998, 0.07230892032384872, -0.24910074472427368, -0.1957811564207077, 0.11900518089532852, 0.22331906855106354, 0.06280925869941711, -0.021954288706183434, -0.27260223031044006, 0.22372236847877502, 0.2733667194843292, 0.1518392115831375, 0.1783870905637741, -0.0109514519572258, -0.043243758380413055, 0.36848780512809753, 0.3489729166030884, -0.025331223383545876, 0.41160061955451965, 0.3529875874519348, -0.0865497961640358, 0.04252200573682785, 0.03632643446326256, 0.11211954057216644, 0.03950592875480652, -0.08969468623399734, 0.13299429416656494, -0.14528757333755493, -0.6623030304908752, 0.03204917162656784, 0.14800967276096344, 0.30373066663742065, -0.49230214953422546, 0.2677828073501587, -0.393976628780365, 0.05314460024237633, -0.3042106032371521, 0.23575454950332642, 0.12423428148031235, 0.22633673250675201, 0.10904484242200851, -0.09142577648162842, 0.19035746157169342, -0.11923734098672867, -0.09248732030391693, -0.16503703594207764, -0.006723163183778524, 0.11854080855846405, 0.335376501083374, 0.37176573276519775, -0.04535916820168495, -0.3760145604610443, -0.12439632415771484, -0.10633159428834915, 0.40100976824760437, -0.34819838404655457, 0.07695746421813965, 0.41222652792930603, -0.2628345787525177, -0.289960652589798, -0.13580554723739624, 0.07485596835613251, 0.04181540012359619, 0.3262103199958801, -0.1238103061914444, -0.4923030436038971, 0.1185787171125412, 0.4219980537891388, 0.008125700056552887, 0.11812538653612137, -0.0038843629881739616, -0.05889839306473732, -0.1878027468919754, -0.29514947533607483, -0.011558623053133488, -0.14582782983779907, 0.12250441312789917, 0.21502861380577087, -0.01800069585442543, -0.1149308979511261, 0.10041696578264236, -0.08380261808633804, -0.16687676310539246, 0.28626126050949097, -0.12395070493221283, 0.15847153961658478, 0.14502950012683868, 0.3025130033493042, 0.27380648255348206, 0.32763493061065674, -0.3374814987182617, 0.19927191734313965, 0.29324695467948914, 0.225600004196167, 0.1761760264635086, 0.05524758994579315, 0.20080280303955078, 0.15379266440868378, 0.010554987005889416, -0.1905161738395691, -0.17882530391216278, -0.3223813772201538, 0.08727782964706421, 0.05002845451235771, -0.12192830443382263, -0.3815683126449585, 0.06622274219989777, 0.16936981678009033, -0.011047063395380974, 0.06162644177675247, -0.3657359778881073, -0.010244583711028099, 0.4981333017349243, 0.35206732153892517, 0.8710964918136597, 0.219619020819664, -0.04610620439052582, 0.09723080694675446, -0.026317443698644638, -0.2297057956457138, 0.3024888038635254, -0.18043182790279388, -0.29866108298301697, 0.004067310597747564, -0.07449710369110107, -0.12460886687040329, -0.021566303446888924, -0.01525510847568512, -0.3948970437049866, 0.023443542420864105, -0.19974908232688904, 0.041967373341321945, 0.028236646205186844, -0.052602529525756836, -0.060700297355651855, -0.10948328673839569, 0.2939585745334625, 0.16086912155151367, 0.09298739582300186, 0.07982412725687027, -0.06561356782913208, -0.09195242077112198, -0.24051231145858765, -0.38050973415374756, -0.15403644740581512, 0.1441754251718521, -0.11376609653234482, 0.4462919235229492, 0.35436639189720154, -0.28590458631515503, 0.13251611590385437, 0.362555593252182, -0.26756730675697327, 0.12171022593975067, -0.06499631702899933, -0.02340839058160782, 0.04192608967423439, 0.19903498888015747, 0.25699174404144287, -0.06536490470170975, 0.532714307308197, -0.008403768762946129, -0.2321222722530365, 0.14574363827705383, -0.09407754987478256, -0.2741779088973999, -0.08680346608161926, 0.3060581684112549, 0.3108740746974945, -0.018217895179986954, 0.05569574609398842, -0.05704941973090172, -0.17519398033618927, -0.17226190865039825, 0.1487811803817749, 0.19785115122795105, -0.17348094284534454, 0.25131574273109436, 0.0907398983836174, -0.21897026896476746, -0.08010619133710861, 0.4010269343852997, 0.4048633873462677, 0.5142771601676941, 0.3133552670478821, -0.06605421751737595, -0.11954411119222641, -0.15255053341388702, -0.35217851400375366, -0.3539164960384369, 0.23963922262191772, 0.2017318606376648, 0.018483037129044533, -0.14710915088653564, -0.3326055109500885, -0.09506764262914658, 0.08194214105606079, 0.2781379520893097, -0.408523827791214, -0.27973824739456177, -0.335723340511322, 0.09742660820484161, -0.12044733762741089, 0.2147095948457718, -0.25884678959846497, -0.037536364048719406, -0.31563660502433777, 0.20425477623939514, -0.32190626859664917, 0.03818473964929581, -0.39978647232055664, 0.17228101193904877, -0.14830629527568817, -0.2481522262096405, 0.018231727182865143, 0.030765222385525703, 0.16738742589950562, 0.23041824996471405, -0.2873900234699249, -0.11219989508390427, -0.24056416749954224, 0.0865456685423851, 0.1410396844148636, -0.1369151622056961, 0.13077473640441895, -0.16638192534446716, 0.07748985290527344, -0.18978779017925262, 0.032598190009593964, -0.15484671294689178, -0.118571437895298, 0.364176481962204, 0.19780738651752472, 0.15579959750175476, 0.18834470212459564, 0.26567545533180237, -0.14319512248039246, 0.283956915140152, -0.15872064232826233, 0.013291507959365845, -0.22597022354602814, -0.08386299014091492, -0.0842176154255867, 0.0726766586303711, -0.21821194887161255, -0.23917829990386963, 0.26393336057662964, -0.015073984861373901, -0.19120073318481445, -0.08650537580251694, 0.17252609133720398, 0.20492760837078094, -0.37964725494384766, -0.1530585139989853, 0.540761411190033, 0.20504361391067505, -0.004619411658495665, -0.03410479798913002, 0.5727977752685547, -0.09246084094047546, 0.23166096210479736, 0.3061140179634094, -0.15375709533691406, -0.18797601759433746, -0.1503075659275055, -0.011798819527029991, -0.34741249680519104, 0.05281361937522888, 0.2156011313199997, 0.4500202238559723, -0.19075976312160492, 0.15370352566242218, 0.15344233810901642, -0.1342351883649826, 0.5434713363647461, 0.014411293901503086, 0.13494537770748138, 0.1574079692363739, -0.001568170846439898, 0.044437725096940994, 0.3795166313648224, -0.48997068405151367, 0.4982147216796875, 0.6172640919685364, 0.23855949938297272, 0.3534960448741913, 0.1136450543999672, 0.17976759374141693, -0.18039937317371368, 0.03109269216656685, -0.1614091545343399, 0.20594175159931183, -0.3470534682273865, -0.018273454159498215, -0.017569780349731445, -0.1287972629070282, 0.0025711366906762123, 0.03179915249347687, -0.03310771286487579, -0.14632852375507355, 0.22259272634983063, 0.10307358205318451, -0.2522371709346771, -0.3613152503967285, -0.029379291459918022, -0.19579356908798218, 0.019742459058761597, -0.22029881179332733, -0.05942946672439575, 0.1275479644536972, 0.13945767283439636, -0.3628341257572174, 0.12339942157268524, 0.20217785239219666, 0.5606961846351624, -0.45155778527259827, -0.25359389185905457, 0.2951529920101166, 0.08716575801372528, -0.2988334596157074, 0.16974785923957825, -0.23222580552101135, -0.17149370908737183, 0.44228723645210266, 0.07521633058786392, -0.24496349692344666, -0.1833672821521759, 0.13426122069358826, 0.4924425780773163, 0.2643302381038666, 0.09721343219280243, 0.2130136638879776, 0.2047801911830902, 0.16330766677856445, -0.20802755653858185, -0.2605632543563843, -0.15556761622428894, 0.1988859623670578, -0.006320766173303127, 0.31956788897514343, 0.07287765294313431, 0.09287787228822708, -0.04253548011183739, 0.23829542100429535, 0.21525636315345764, 0.17456884682178497, -0.046424902975559235, -0.08781646192073822, -0.26926106214523315, 0.35070258378982544, -0.13880158960819244, -0.208133727312088, 0.3059596121311188, -0.011172648519277573, 0.06573651731014252, 0.1503104716539383, -0.11548607051372528, -0.20898765325546265, 0.16076233983039856, 0.4486095905303955, -0.29060930013656616, -0.1849915087223053, -0.10596222430467606, -0.15106752514839172, 0.26875218749046326, -0.5409831404685974, 0.1342630386352539, 0.1473645120859146, 0.07054402679204941, -0.23181705176830292, 0.014069309458136559, -0.011605984531342983, 0.3986549973487854, 0.4254050850868225, 0.11474426835775375, 0.46392667293548584, -0.1939549595117569, -0.10574546456336975, 0.20565851032733917, 0.0157292690128088, -0.021350745111703873, -0.169184610247612, -0.11767887324094772, 0.3652637004852295, -0.08497022837400436, -0.23371335864067078, -0.12840323150157928, 0.532108724117279, -0.10693199932575226, -0.18596838414669037, -0.16029828786849976, 0.31231534481048584, -0.013214459642767906, 0.023958396166563034, -0.4056389629840851, 0.20579726994037628, 0.16618354618549347, 0.2969306707382202, -0.06534343957901001, -0.23560677468776703, 0.7419952154159546, 0.062122538685798645, -0.054097823798656464, -0.12703508138656616, 0.020278317853808403, -0.5549435019493103, -0.16971226036548615, -0.24630767107009888, -0.126868337392807, 0.21109358966350555, 0.19473761320114136, -0.5221104621887207, -0.15029233694076538, 0.14504463970661163, 0.07150246948003769, -0.2004755437374115, 0.6373546719551086, -0.2366664558649063, -0.33415478467941284, 0.28381139039993286, -0.09788396209478378 ]
https://github.com/huggingface/datasets/issues/2642
Support multi-worker with streaming dataset (IterableDataset).
Hi ! This is a great idea :) I think we could have something similar to what we have in `datasets.Dataset.map`, i.e. a `num_proc` parameter that tells how many processes to spawn to parallelize the data processing. Regarding AUTOTUNE, this could be a nice feature as well, we could see how to add it in a second step
**Is your feature request related to a problem? Please describe.** The current `.map` does not support multi-process, CPU can become bottleneck if the pre-processing is complex (e.g. t5 span masking). **Describe the solution you'd like** Ideally `.map` should support multi-worker like tfds, with `AUTOTUNE`. **Describe alternatives you've considered** A simpler solution is to shard the dataset and process it in parallel with pytorch dataloader. The shard does not need to be of equal size. * https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset **Additional context**
58
Support multi-worker with streaming dataset (IterableDataset). **Is your feature request related to a problem? Please describe.** The current `.map` does not support multi-process, CPU can become bottleneck if the pre-processing is complex (e.g. t5 span masking). **Describe the solution you'd like** Ideally `.map` should support multi-worker like tfds, with `AUTOTUNE`. **Describe alternatives you've considered** A simpler solution is to shard the dataset and process it in parallel with pytorch dataloader. The shard does not need to be of equal size. * https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset **Additional context** Hi ! This is a great idea :) I think we could have something similar to what we have in `datasets.Dataset.map`, i.e. a `num_proc` parameter that tells how many processes to spawn to parallelize the data processing. Regarding AUTOTUNE, this could be a nice feature as well, we could see how to add it in a second step
[ -0.6293720602989197, -0.5262188911437988, -0.14244061708450317, -0.0420491099357605, -0.19271785020828247, -0.010430209338665009, 0.5165581703186035, 0.17827998101711273, 0.08271829783916473, 0.14804649353027344, -0.08475559949874878, 0.302012175321579, -0.26877012848854065, 0.2669048309326172, -0.08264783769845963, -0.2372146099805832, -0.12502840161323547, 0.06431961804628372, -0.008234470151364803, 0.23084662854671478, -0.12495693564414978, 0.00464027002453804, -0.13399820029735565, -0.20448222756385803, -0.3420328199863434, -0.09328708052635193, -0.01881520077586174, 0.037900183349847794, 0.31724849343299866, -0.2443896234035492, 0.060374666005373, 0.43439507484436035, 0.13053429126739502, 0.5852190256118774, -0.00010765408660518005, -0.09300301223993301, 0.17982983589172363, -0.0003879399155266583, -0.08988068997859955, 0.05900072306394577, -0.07781307399272919, -0.10355193167924881, 0.06305774301290512, -0.3442632257938385, -0.059642817825078964, -0.26670417189598083, 0.1754978597164154, -0.404260516166687, 0.2037627100944519, -0.16770552098751068, 0.16247622668743134, 0.37573403120040894, -0.1846000999212265, 0.1089051142334938, -0.31346678733825684, -0.001608928432688117, -0.12126168608665466, 0.06943829357624054, 0.6291935443878174, 0.037588704377412796, -0.37667447328567505, 0.3427780568599701, -0.2514379918575287, 0.3703422546386719, 0.241978257894516, -0.18485307693481445, -0.34779196977615356, -0.48358646035194397, 0.08801982551813126, 0.3975021541118622, 0.2647565007209778, -0.24325303733348846, -0.17544934153556824, -0.4112394154071808, -0.13136997818946838, -0.06726103276014328, -0.05690157040953636, 0.1599917858839035, -0.2204435020685196, -0.07610774040222168, -0.3439474105834961, -0.08794932067394257, -0.21086454391479492, 0.10953649878501892, 0.15640386939048767, 0.31575825810432434, 0.08343639969825745, 0.27586376667022705, 0.26057618856430054, 0.11593374609947205, 0.3285745084285736, -0.10678073018789291, 0.3322063684463501, 0.137299045920372, -0.48305171728134155, -0.2322726845741272, -0.09320785850286484, -0.45949482917785645, 0.17240847647190094, -0.03727215528488159, 0.23544351756572723, 0.3031926155090332, -0.14673689007759094, 0.3102489113807678, 0.3134966194629669, -0.27398186922073364, -0.27895721793174744, -0.11715523153543472, 0.4016439914703369, -0.1800673007965088, -0.1007043868303299, 0.0791768878698349, 0.1089923232793808, -0.3574826121330261, 0.33227232098579407, 0.21112534403800964, 0.12560342252254486, 0.3532760441303253, 0.1471809297800064, -0.3941155970096588, -0.1462438553571701, -0.29771706461906433, -0.06369441002607346, 0.10531221330165863, -0.06475228071212769, 0.36143749952316284, -0.11024824529886246, -0.1895645260810852, -0.0609050914645195, -0.269420862197876, -0.01081713754683733, -0.2652401030063629, -0.03063972294330597, 0.13681863248348236, 0.2078421413898468, -0.5171918869018555, 0.21128295361995697, -0.018869342282414436, 0.31914612650871277, 0.23083393275737762, 0.38759341835975647, -0.2626327872276306, 0.22419226169586182, 0.033689577132463455, 0.026763439178466797, -0.0016432767733931541, -0.18489103019237518, 0.5143524408340454, -0.1868380457162857, 0.3826097548007965, -0.24189713597297668, -0.5341447591781616, -0.0030776949133723974, 0.12602606415748596, 0.042639221996068954, -0.02611496113240719, -0.1706097573041916, 0.3209349513053894, 0.2911282181739807, -0.23228760063648224, -0.04504913091659546, -0.08294470608234406, -0.37042000889778137, -0.2616882920265198, 0.10993670672178268, 0.1438870131969452, 0.09000398963689804, -0.014194171875715256, -0.017615217715501785, 0.05208462476730347, 0.060434143990278244, 0.2784424424171448, -0.2516744136810303, -0.11488021910190582, -0.12092571705579758, 0.25658711791038513, 0.2521808445453644, -0.06233283877372742, -0.12814673781394958, 0.5759641528129578, -0.10128629207611084, 0.06707101315259933, 0.22913838922977448, 0.4602634310722351, 0.4873197376728058, -0.1004529520869255, 0.049988336861133575, 0.43205827474594116, -0.36817610263824463, 0.32796964049339294, -0.13287104666233063, -0.23497140407562256, 0.2222042828798294, 0.4411793351173401, 0.21412308514118195, -0.12051979452371597, -0.033990927040576935, -0.32427045702934265, 0.3923347294330597, -0.17285501956939697, 0.282270222902298, 0.007750446908175945, -0.018366213887929916, 0.04280299320816994, 0.10390903800725937, -0.49529701471328735, -0.43260058760643005, 0.17709216475486755, 0.1475958675146103, -0.13157473504543304, 0.30824387073516846, -0.1840863972902298, 0.2749665379524231, -0.125186488032341, -0.12111548334360123, -0.16848638653755188, 0.05965441092848778, 0.16396121680736542, -0.23236839473247528, -0.4080907106399536, -0.5029203295707703, 0.20636969804763794, -0.08608893305063248, -0.2651178538799286, -0.18243329226970673, 0.18717773258686066, 0.14421124756336212, -0.08662106841802597, -0.13989636301994324, -0.014000547118484974, -0.06669187545776367, -0.16114188730716705, -0.0031098355539143085, 0.27863097190856934, -0.1334877908229828, 0.2993048131465912, 0.08580591529607773, 0.5260651707649231, 0.45188233256340027, -0.15627339482307434, 0.045842889696359634, 0.24269317090511322, -0.13487303256988525, -0.20620174705982208, -0.009011705406010151, 0.18455465137958527, -0.3368796706199646, 0.21941249072551727, 0.04171277582645416, -0.011358621530234814, 0.20308098196983337, 0.06691870093345642, -0.1730811595916748, 0.1992408186197281, -0.05255553871393204, -0.3027153015136719, 0.0736507922410965, -0.0028764742892235518, -0.5791730880737305, 0.25165867805480957, 0.3946075737476349, 0.106545589864254, -0.012772712856531143, 0.08873671293258667, -0.11181102693080902, 0.010601750575006008, 0.18349125981330872, 0.10432934761047363, 0.35386157035827637, 0.262437105178833, 0.1418781578540802, -0.10684838891029358, 0.19296425580978394, -0.09492240101099014, -0.005133583210408688, 0.024186713621020317, 0.34795454144477844, 0.2728954255580902, 0.09870778769254684, -0.012377445586025715, -0.04142790660262108, -0.4256393015384674, 0.24876730144023895, -0.016484292224049568, 0.039293743669986725, -0.015385911799967289, 0.08690612763166428, -0.017311960458755493, -0.08037977665662766, -0.16489003598690033, -0.03413895145058632, -0.020999474450945854, 0.16126659512519836, 0.7649841904640198, -0.10869301855564117, 0.3368279039859772, 0.18699704110622406, 0.18992654979228973, 0.0012892375234514475, -0.20533403754234314, -0.1098528578877449, -0.20620034635066986, 0.2713899612426758, 0.10821501910686493, 0.1666262000799179, -0.23586595058441162, 0.43592122197151184, 0.3054797649383545, -0.044554684311151505, -0.4260462820529938, -0.048270486295223236, -0.0027316934429109097, 0.07704070210456848, -0.2029365599155426, 0.027796156704425812, 0.12102049589157104, 0.20248988270759583, -0.20307984948158264, 0.05917001888155937, -0.32402458786964417, 0.04673267900943756, -0.10959512740373611, 0.014464810490608215, 0.010242735035717487, -0.05335603654384613, -0.21542446315288544, -0.27461951971054077, -0.4614112377166748, 0.30685073137283325, -0.19972670078277588, 0.34954172372817993, -0.1097627654671669, 0.08055159449577332, -0.13137462735176086, 0.3815684914588928, -0.1566506028175354, -0.018726056441664696, -0.44051453471183777, 0.21834823489189148, -0.3194653391838074, -0.1749507039785385, -0.06871981173753738, 0.06931040436029434, 0.10514256358146667, 0.495021790266037, -0.15729594230651855, -0.146473228931427, -0.1428733468055725, 0.22850680351257324, -0.15507511794567108, -0.014803978614509106, 0.47001102566719055, 0.22092905640602112, -0.0559556744992733, 0.033037010580301285, 0.036232974380254745, -0.03365641459822655, 0.22122500836849213, -0.17672884464263916, 0.36868348717689514, 0.19567839801311493, 0.22417932748794556, 0.9834296703338623, 0.273043155670166, -0.19336917996406555, 0.17263349890708923, -0.09705541282892227, -0.2342124581336975, -0.021330172196030617, -0.43079885840415955, 0.11778893321752548, -0.3169781565666199, 0.12755225598812103, 0.2472836822271347, -0.1683027595281601, -0.4030025601387024, -0.06692159920930862, -0.1508389413356781, -0.09752079844474792, -0.09799453616142273, 0.45192837715148926, -0.25209954380989075, 0.5229318737983704, -0.2508046329021454, -0.23539486527442932, -0.2905541956424713, -0.08542893081903458, -0.0017173553351312876, -0.05914280563592911, 0.5325174927711487, -0.21697983145713806, 0.18759363889694214, 0.2896519899368286, -0.3857785165309906, 0.21801109611988068, 0.27008867263793945, 0.11157297343015671, 0.02113468199968338, -0.03080008551478386, 0.18015682697296143, -0.022209404036402702, 0.5902082324028015, -0.18095943331718445, -0.00851109903305769, -0.11729496717453003, -0.4298485815525055, -0.17853610217571259, 0.12087717652320862, -0.02199997939169407, 0.5310913324356079, 0.18811261653900146, 0.3519924581050873, -0.3006889820098877, -0.3387383222579956, 0.16811363399028778, -0.04917226359248161, -0.20684394240379333, -0.5010207295417786, -0.14665041863918304, 0.09972845017910004, -0.3303319215774536, 0.057571012526750565, 0.287967711687088, -0.010108182206749916, -0.0430898480117321, -0.3219868838787079, 0.02666175551712513, -0.07254122942686081, -0.09720788151025772, 0.08933864533901215, -0.15734224021434784, 0.03914014250040054, 0.25164568424224854, 0.2952629625797272, 0.09983667731285095, -0.010231354273855686, 0.1687060296535492, -0.039413049817085266, -0.2995239198207855, 0.19234347343444824, 0.021537182852625847, 0.339583158493042, 0.14120708405971527, 0.07330124080181122, 0.12171436846256256, 0.30946388840675354, 0.3474087417125702, -0.358064204454422, -0.0697832703590393, 0.1916179209947586, 0.16636905074119568, -0.2413712590932846, -0.5865664482116699, 0.1394338756799698, -0.061425622552633286, 0.02125467173755169, 0.7402992844581604, -0.6871578693389893, -0.009741362184286118, 0.030658964067697525, 0.21263866126537323, 0.7318968772888184, -0.1772029548883438, -0.007323374506086111, -0.2439950406551361, -0.10935515910387039, -0.028422990813851357, -0.6782631874084473, 0.29529717564582825, -0.3901476263999939, -0.3920980393886566, 0.012379562482237816, -0.011121507734060287, -0.049386173486709595, 0.3122454285621643, -0.17223156988620758, 0.08357440680265427, 0.4423428475856781, 0.13142475485801697, -0.028304941952228546, 0.5326046943664551, -0.18275989592075348, -0.47841206192970276, 0.1902931183576584, 0.10071507096290588, -0.18420901894569397, -0.06905984878540039, -0.05006854236125946, -0.23474155366420746, 0.47873833775520325, 0.1893511712551117, -0.3163776099681854, -0.18002121150493622, -0.3334515392780304, 0.20924599468708038, -0.17881198227405548, -0.15912656486034393, 0.17559975385665894, 0.3089120090007782, -0.035332076251506805, -0.24074304103851318, -0.17260099947452545, -0.03635100647807121, 0.10602904856204987, 0.19970642030239105, -0.21263305842876434, -0.20049495995044708, 0.20528343319892883, -0.18765173852443695, -0.3720925450325012, 0.18470630049705505, 0.07952328771352768, -0.7108383774757385, -0.11374647170305252, 0.18628355860710144, 0.24199886620044708, -0.05306275933980942, 0.002489478560164571, 0.14667761325836182, -0.32837021350860596, -0.08689747005701065, 0.08642862737178802, 0.14776834845542908, -0.2835683226585388, 0.3946526050567627, -0.1098797470331192, -0.014618458226323128, 0.019464492797851562, 0.22223299741744995, 0.2573189437389374, 0.1654966175556183, 0.10476250946521759, 0.1918555051088333, -0.11484670639038086, -0.1579134464263916, -0.07952644675970078, -0.06923655420541763, -0.23918873071670532, 0.13504289090633392, 0.04124889150261879, -0.069752536714077, -0.013754228129982948, 0.02602195180952549, -0.1451541632413864, 0.3203093707561493, -0.4574451148509979, -0.18129882216453552, -0.3838825523853302, -0.049250952899456024, -0.12821821868419647, 0.24074910581111908, 0.1523818075656891, 0.1835392564535141, 0.2417333573102951, 0.27741095423698425, -0.36760732531547546, 0.003395137144252658, 0.03038301318883896, 0.11781591922044754, 0.31576088070869446, 0.007740853354334831, 0.032888881862163544, 0.11788725852966309, -0.01207380834966898, 0.14006145298480988, -0.2202543020248413, -0.20530621707439423, 0.00542813865467906, 0.13103561103343964, -0.0028321801219135523, -0.1303899586200714, -0.13972482085227966, -0.30365368723869324, -0.42151767015457153, -0.2941892445087433, 0.38740724325180054, 0.007346341386437416, -0.18538732826709747, 0.15048599243164062, 0.3489682674407959, -0.17146629095077515, -0.3820737898349762, 0.12575653195381165, 0.012715057469904423, -0.011070321314036846, -0.1302940845489502, 0.18070244789123535, 0.1936529129743576, -0.07856443524360657, 0.11382941901683807, -0.006094573065638542, 0.48774081468582153, 0.07901468127965927, 0.2957892119884491, -0.09312039613723755, -0.008384917862713337, -0.026429949328303337, 0.5431426167488098, 0.08525872230529785, 0.011399814859032631, 0.057285141199827194, 0.1059926301240921, 0.23800943791866302, -0.22438308596611023, -0.09632951021194458, 0.2588999569416046, -0.013398459181189537, 0.35970962047576904, 0.04779328405857086, 0.11115096509456635, 0.27325960993766785, 0.27167120575904846, 0.08935614675283432, 0.06527245789766312, -0.6158900856971741, 0.10825575888156891, 0.0534311980009079, 0.03127136453986168, -0.007179123815149069, 0.1999310851097107, -0.010748193599283695, 0.10785835981369019, 0.11450150609016418, -0.0024113357067108154, 0.4664045572280884, 0.3444429039955139, -0.02910955622792244, 0.4277682900428772, -0.1750669926404953, -0.14977417886257172, -0.2447570413351059, 0.05442221462726593, 0.20614607632160187, 0.13182838261127472, 0.3818690776824951, -0.13287116587162018, -0.31230923533439636, -0.13521789014339447, 0.2957095205783844, -0.08329595625400543, 0.08016014844179153, 0.14021922647953033, -0.09164424985647202, 0.0491214357316494, 0.11678217351436615, 0.0031896671280264854, 0.15273530781269073, 0.5788415670394897, 0.14173540472984314, 0.02992076240479946, -0.11544967442750931, -0.11525674164295197, 0.16182321310043335, 0.4018127918243408, -0.1014019250869751, 0.03524794802069664, 0.26051557064056396, -0.08764494955539703, -0.186558797955513, 0.37382060289382935, -0.011405685916543007, 0.22883440554141998, -0.28903478384017944, 0.30834081768989563, -0.19425146281719208, 0.04930628091096878, -0.06168755143880844, 0.13052475452423096, 0.03100612573325634, -0.18489225208759308, 0.2718440890312195, 0.0862405002117157, -0.13598912954330444, 0.14005298912525177, 0.07788398861885071, -0.05332283675670624, -0.1775750368833542, -0.05225713551044464, 0.161980539560318, -0.3829640746116638, 0.09483899176120758, -0.13587874174118042, -0.30948927998542786, -0.19898201525211334, 0.39705178141593933, -0.5590795874595642, -0.017253877595067024, -0.06779351085424423, 0.09711846709251404, -0.03623500466346741, 0.5721184015274048, -0.04646577313542366, 0.1212591826915741, -0.16247247159481049, -0.08920177817344666, -0.43621376156806946, 0.14046670496463776, 0.05101754888892174, 0.16982071101665497, 0.04845922067761421, 0.16332611441612244, 0.09679139405488968, 0.24675339460372925, 0.17762762308120728, -0.232139453291893, 0.22961880266666412, 0.5826243758201599, -0.2657504677772522, 0.008240570314228535, -0.1866101175546646, 0.1839832365512848, 0.2505391240119934, -0.23514127731323242, 0.17524002492427826, -0.00011586467735469341, 0.07796762883663177, -0.1394910216331482, -0.19771307706832886, 0.23929758369922638, -0.11817627400159836, 0.3051760196685791, -0.03235907852649689, 0.15048722922801971, -0.19561025500297546, 0.1657874584197998, 0.018893642351031303, 0.13869860768318176, -0.25869467854499817, 0.15839727222919464, 0.4099116623401642, 0.21719633042812347, -0.14109808206558228, -0.22944846749305725, -0.46576860547065735, 0.18760675191879272, -0.24572500586509705, -0.06983359903097153, -0.04270251467823982, -0.08915877342224121, -0.11891722679138184, 0.15199829638004303, -0.08278722316026688, 0.41818761825561523, -0.0050672427751123905, -0.17244304716587067, -0.36209404468536377, -0.14713150262832642, 0.2909374535083771, -0.39711058139801025, -0.3432902693748474, -0.21648645401000977, 0.12056516110897064, 0.2122366726398468, 0.30545249581336975, -0.32818403840065, -0.09522885084152222, 0.2278413027524948, 0.09350825101137161, -0.06815971434116364, 0.29933083057403564, -0.003404411720111966, -0.15404941141605377, -0.05746098980307579, 0.020473573356866837, 0.14080829918384552, -0.18393361568450928, -0.18610204756259918, -0.3761650323867798 ]
https://github.com/huggingface/datasets/issues/2641
load_dataset("financial_phrasebank") NonMatchingChecksumError
Hi! It's probably because this dataset is stored on google drive and it has a per day quota limit. It should work if you retry, I was able to initiate the download. Similar issue [here](https://github.com/huggingface/datasets/issues/2646)
## Describe the bug Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("financial_phrasebank", 'sentences_allagree') ``` ## Expected results I expect to see the financial_phrasebank dataset downloaded successfully ## Actual results NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip'] ## Environment info - `datasets` version: 1.9.0 - Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6 - Python version: 3.7.10 - PyArrow version: 4.0.1
35
load_dataset("financial_phrasebank") NonMatchingChecksumError ## Describe the bug Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("financial_phrasebank", 'sentences_allagree') ``` ## Expected results I expect to see the financial_phrasebank dataset downloaded successfully ## Actual results NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip'] ## Environment info - `datasets` version: 1.9.0 - Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6 - Python version: 3.7.10 - PyArrow version: 4.0.1 Hi! It's probably because this dataset is stored on google drive and it has a per day quota limit. It should work if you retry, I was able to initiate the download. Similar issue [here](https://github.com/huggingface/datasets/issues/2646)
[ -0.12216169387102127, 0.2191510796546936, -0.07840734720230103, 0.2884526550769806, 0.22036103904247284, 0.13471724092960358, 0.06588906049728394, 0.3310612142086029, 0.20957423746585846, 0.18217237293720245, -0.14143840968608856, 0.05338772013783455, 0.16741584241390228, 0.07501523196697235, -0.1415330022573471, 0.0439130961894989, 0.0427032932639122, -0.028759310021996498, 0.030453234910964966, -0.10899070650339127, -0.10355708003044128, 0.3996219336986542, -0.21437004208564758, -0.20487359166145325, -0.05717460438609123, 0.027173783630132675, 0.1256502866744995, 0.1493474245071411, -0.35550937056541443, -0.10624320805072784, 0.31730085611343384, 0.2356400042772293, -0.03640606999397278, 0.40885698795318604, -0.00011659786832751706, -0.15704670548439026, 0.29543599486351013, -0.0023203061427921057, -0.30877313017845154, -0.41172394156455994, -0.3101620376110077, -0.5327081680297852, -0.0006328128511086106, -0.15623708069324493, 0.14720961451530457, 0.22938847541809082, 0.11874181032180786, -0.04043973982334137, 0.18392565846443176, 0.2563112676143646, 0.19764444231987, 0.17663127183914185, 0.15440993010997772, -0.06725728511810303, 0.2356061339378357, -0.3061353862285614, -0.0442655049264431, 0.2061336487531662, 0.133927121758461, 0.13966329395771027, -0.11160934716463089, 0.09866385906934738, -0.24097853899002075, 0.3398788571357727, -0.024823229759931564, -0.05693300813436508, -0.10548681765794754, -0.4350314140319824, 0.30718740820884705, 0.4293162524700165, 0.5019190907478333, -0.13831770420074463, -0.3338046967983246, -0.2137773334980011, -0.13144652545452118, -0.005059964954853058, 0.41336798667907715, 0.2254236787557602, -0.2224520891904831, -0.04874926805496216, -0.402690052986145, 0.21270273625850677, 0.05220770835876465, 0.17423264682292938, 0.0008496800437569618, -0.07864901423454285, -0.14659495651721954, -0.09588448703289032, 0.2525239586830139, -0.09324855357408524, 0.07781414687633514, -0.31025511026382446, -0.07113297283649445, 0.27962636947631836, -0.3990391492843628, -0.07567529380321503, 0.044616587460041046, 0.5124952793121338, 0.5575390458106995, 0.3724071681499481, 0.1555420458316803, 0.22752414643764496, -0.29165956377983093, 0.019775278866291046, 0.12109300494194031, 0.248697429895401, 0.014607500284910202, -0.1616901308298111, 0.21061456203460693, 0.4556141793727875, -0.059055786579847336, 0.13106942176818848, -0.0883605033159256, -0.0742754116654396, 0.5709367394447327, -0.05590005964040756, 0.06539306044578552, -0.534138560295105, -0.3482500910758972, 0.4446011483669281, -0.12517985701560974, -0.1410444974899292, -0.04376843199133873, 0.26912450790405273, -0.25135529041290283, 0.11096195876598358, -0.06691090762615204, 0.14728526771068573, -0.03764370456337929, -0.1506909430027008, -0.26718446612358093, -0.05509546771645546, -0.1249774619936943, -0.03890576213598251, 0.2755371630191803, -0.4455493986606598, 0.33067503571510315, -0.08118030428886414, 0.22233232855796814, -0.20229101181030273, 0.043921224772930145, -0.15927110612392426, -0.2756521999835968, 0.28256845474243164, 0.1362629234790802, 0.22327621281147003, 0.038225140422582626, 0.08375530689954758, 0.007771346718072891, 0.019863879308104515, -0.23611395061016083, -0.11986266076564789, 0.09560254216194153, 0.21206095814704895, -0.5457581281661987, -0.42643600702285767, -0.09183253347873688, -0.20048674941062927, 0.15698277950286865, -0.06462810188531876, -0.042972538620233536, -0.09886335581541061, -0.21709094941616058, -0.23307852447032928, -0.012897738255560398, 0.2208421528339386, -0.13609175384044647, -0.01968378573656082, -0.11425594985485077, -0.08467940241098404, 0.42032718658447266, 0.3317059874534607, -0.07461248338222504, 0.046775802969932556, -0.1993376463651657, 0.3415531814098358, 0.287654846906662, -0.04025059938430786, -0.8489012718200684, 0.27362409234046936, -0.046151984483003616, 0.3179982900619507, 0.11358170211315155, 0.09368501603603363, -0.01209765113890171, 0.09861477464437485, 0.05960237234830856, 0.21109041571617126, 0.07241156697273254, 0.16988526284694672, -0.19966207444667816, -0.3329528868198395, -0.02838880941271782, 0.15905071794986725, 0.05410509184002876, 0.13594664633274078, 0.1838504821062088, -0.04453377425670624, 0.28916263580322266, -0.026276811957359314, 0.01800449937582016, 0.23368586599826813, 0.27275383472442627, 0.20902583003044128, 0.10214610397815704, -0.2314193993806839, -0.3615790605545044, 0.3223058581352234, -0.2195713222026825, 0.10022110491991043, -0.01584756001830101, -0.14869719743728638, -0.3613629639148712, -0.28247418999671936, -0.14902201294898987, 0.13008227944374084, 0.08987980335950851, 0.3411882817745209, 0.399215966463089, 0.04050513356924057, -0.045983921736478806, 0.3040062487125397, -0.129001647233963, 0.075118787586689, -0.14075897634029388, 0.2749921977519989, -0.03420683369040489, -0.015984751284122467, 0.03012656606733799, -0.01776854135096073, 0.1630052924156189, 0.03627893701195717, -0.18745185434818268, 0.2895476818084717, 0.20951221883296967, 0.1428241729736328, -0.08752021193504333, 0.2737727761268616, -0.15950024127960205, -0.07256464660167694, 0.028992164880037308, 0.4911873936653137, 0.142854705452919, -0.01634865067899227, -0.16326111555099487, 0.3131428062915802, 0.0755077451467514, 0.006095558404922485, 0.037729412317276, 0.1592748612165451, 0.37337052822113037, -0.13453270494937897, -0.08254509419202805, -0.15182095766067505, 0.5095818042755127, -0.34095102548599243, 0.20428627729415894, 0.01172706764191389, -0.27683547139167786, -0.06286051869392395, 0.24348177015781403, -0.12033381313085556, 0.13074298202991486, 0.18533003330230713, 0.04703250899910927, -0.07596798986196518, -0.15245187282562256, 0.5569285154342651, 0.27062827348709106, 0.22486749291419983, 0.1861109882593155, 0.030360696837306023, -0.0696508064866066, -0.21904118359088898, -0.04961828142404556, 0.22690363228321075, 0.1424940973520279, 0.5023207068443298, 0.2711748778820038, 0.04495987296104431, -0.43564480543136597, -0.06091046705842018, 0.042099710553884506, 0.32749873399734497, -0.32108840346336365, -0.1184832751750946, -0.07401983439922333, -0.31581825017929077, -0.22192345559597015, -0.12681257724761963, -0.14411768317222595, -0.4463297128677368, -0.10088028758764267, 0.34657788276672363, 0.01658567227423191, 0.06583765894174576, -0.24684612452983856, 0.056430574506521225, -0.04252205044031143, -0.23943641781806946, -0.13592275977134705, 0.2502993643283844, -0.19677269458770752, 0.01087474450469017, 0.2604632079601288, -0.03293324261903763, 0.31964120268821716, -0.39174437522888184, -0.03261731192469597, -0.7137258648872375, -0.2451632171869278, 0.06358035653829575, -0.22306358814239502, 0.2376655638217926, 0.28625088930130005, 0.2511950731277466, -0.2726147472858429, 0.012700224295258522, 0.12770041823387146, -0.06589454412460327, -0.3835560381412506, 0.2892594635486603, -0.12026801705360413, 0.004103636369109154, 0.07608696818351746, 0.00913164857774973, -0.2212633341550827, -0.33927205204963684, 0.10557848960161209, 0.1535755842924118, 0.174302339553833, 0.3875112533569336, -0.13699539005756378, 0.09829413890838623, -0.014452803879976273, 0.4250251054763794, -0.2899431586265564, -0.5708982944488525, 0.5505205392837524, 0.1047239601612091, -0.4363675117492676, 0.06504324823617935, -0.006889317650347948, 0.040306802839040756, 0.2376914769411087, -0.5485625267028809, -0.17575955390930176, -0.475002259016037, -0.01979285106062889, 0.2069166749715805, 0.08637700229883194, 0.24515551328659058, -0.11927829682826996, -0.07313484698534012, -0.14276735484600067, -0.20405349135398865, 0.16441896557807922, 0.045721136033535004, 0.24326957762241364, -0.21868401765823364, 0.3314569890499115, 0.03009869158267975, 0.24555908143520355, 0.4993491470813751, 0.22588112950325012, 0.36203935742378235, -0.01570439152419567, 0.10154395550489426, -0.12468695640563965, -0.2068130373954773, -0.22093909978866577, -0.14490744471549988, -0.19079944491386414, 0.2884584963321686, 0.09232186526060104, -0.025849513709545135, -0.17140966653823853, -0.20881478488445282, -0.3271816372871399, -0.0996694415807724, -0.08357307314872742, 0.03743530809879303, 0.2761642038822174, 0.2141869217157364, 0.17351476848125458, 0.02331872284412384, -0.41179755330085754, -0.035950396209955215, 0.19156132638454437, -0.14322401583194733, -0.08619819581508636, -0.1249312236905098, 0.06699896603822708, -0.19411711394786835, 0.30623695254325867, 0.2048943191766739, 0.3132774233818054, 0.09187822043895721, -0.05676066502928734, 0.08086270093917847, -0.13700295984745026, 0.23501713573932648, -0.3195801377296448, 0.24178457260131836, -0.11738666146993637, -0.09755301475524902, -0.04004939645528793, -0.13467983901500702, -0.18394190073013306, -0.006651841104030609, 0.17813345789909363, 0.2111276090145111, -0.33311766386032104, 0.18027263879776, 0.1622030884027481, 0.3555176258087158, -0.07344474643468857, -0.2499941885471344, -0.3602522313594818, -0.39733728766441345, -0.47306808829307556, -0.04655297100543976, -0.07807323336601257, 0.2964988946914673, 0.0057761394418776035, 0.008306826464831829, 0.12369130551815033, -0.06090516597032547, 0.3348437249660492, -0.11783506721258163, 0.2964918315410614, 0.1444339156150818, 0.43108856678009033, 0.02080366387963295, -0.2529493272304535, 0.24282461404800415, 0.8506201505661011, -0.11155898869037628, -0.3002640902996063, -0.020823858678340912, -0.25967633724212646, -0.182789608836174, 0.2945634126663208, -0.06982513517141342, -0.15803611278533936, 0.5602298378944397, -0.04595380648970604, 0.029552781954407692, -0.18414358794689178, 0.21516159176826477, 0.15455180406570435, -0.3614543676376343, -0.38297152519226074, 0.23042301833629608, 0.19757914543151855, -0.0046774172224104404, -0.0037395223043859005, 0.07192247360944748, 0.016911203041672707, 0.27248862385749817, -0.09370459616184235, 0.8974528908729553, -0.055245932191610336, 0.11758952587842941, 0.1804942488670349, -0.0326111875474453, 0.29299187660217285, -0.12151830643415451, 0.006958333775401115, -0.31332525610923767, -0.32223260402679443, -0.13472804427146912, -0.16037175059318542, -0.029078220948576927, 0.07323922216892242, -0.08669769018888474, 0.4799545705318451, -0.07983444631099701, 0.1357247531414032, 0.183929443359375, 0.2583577334880829, -0.37996363639831543, 0.014993027783930302, -0.08801449835300446, 0.1443733125925064, -0.15403640270233154, 0.4836386740207672, -0.014065862633287907, -0.035243261605501175, -0.19933626055717468, -0.0697435736656189, -0.49311622977256775, 0.19233311712741852, -0.10092102736234665, -0.030927665531635284, 0.12582021951675415, -0.04681002348661423, -0.0820196345448494, 0.14171646535396576, 0.36092543601989746, 0.21720387041568756, -0.3999876081943512, 0.09116552770137787, 0.4621312916278839, -0.11979986727237701, 0.16167794167995453, -0.1688745617866516, 0.398261159658432, -0.08860323578119278, -0.08835121244192123, 0.020361796021461487, 0.03017355687916279, -0.27822890877723694, -0.10406849533319473, -0.16732196509838104, -0.22086089849472046, -0.43740975856781006, -0.31199488043785095, -0.22061502933502197, -0.022059276700019836, -0.33845406770706177, 0.14843067526817322, 0.3153916597366333, -0.11709858477115631, 0.04522118344902992, 0.135639950633049, -0.3526618480682373, -0.2894953787326813, 0.5082674622535706, 0.06656838953495026, -0.21722930669784546, 0.40012872219085693, 0.21372556686401367, -0.3720187544822693, -0.20602959394454956, -0.2480863481760025, 0.015485617332160473, -0.5568867325782776, 0.10284751653671265, -0.14609330892562866, 0.14394056797027588, -0.19288063049316406, 0.6873801350593567, 0.36619889736175537, 0.06979915499687195, 0.047850601375103, -0.5624491572380066, -0.08625495433807373, 0.007836982607841492, 0.19249501824378967, 0.2684268355369568, -0.11066530644893646, -0.19400572776794434, 0.11822864413261414, -0.30498242378234863, -0.30845266580581665, 0.09513355791568756, -0.3677181899547577, -0.23623012006282806, 0.025771038606762886, 0.04568880796432495, 0.21575599908828735, -0.02526773512363434, 0.15246815979480743, 0.12209925800561905, -0.13023480772972107, -0.22903920710086823, -0.09524434804916382, 0.12706021964550018, 0.10714702308177948, -0.13452446460723877, 0.19265849888324738, -0.2410959005355835, -0.2747994661331177, -0.08600383251905441, -0.1077166199684143, 0.2322985678911209, -0.006430911365896463, -0.002066523302346468, 0.40337416529655457, -0.08528026938438416, -0.0753919780254364, -0.010309676639735699, -0.30132073163986206, 0.14770640432834625, 0.049876514822244644, 0.04649747163057327, 0.10966730862855911, 0.0157169196754694, 0.01900736428797245, 0.10128645598888397, 0.29766273498535156, -0.12611690163612366, 0.28562700748443604, -0.49334970116615295, 0.03499920293688774, 0.37914955615997314, 0.4438382089138031, 0.34681496024131775, -0.3567604720592499, -0.12225396186113358, 0.21931318938732147, 0.24582509696483612, -0.30807051062583923, -0.04019193351268768, 0.1209116205573082, -0.15546466410160065, 0.0858021080493927, 0.18313616514205933, 0.2804104685783386, -0.2571417987346649, 0.3184909522533417, 0.09237774461507797, 0.300926148891449, -0.13819535076618195, -0.05756886675953865, 0.276933878660202, 0.04870152473449707, -0.04066545143723488, 0.15096436440944672, -0.08801082521677017, -0.23645804822444916, -0.061255622655153275, -0.0018632683204486966, 0.15621653199195862, -0.1395241618156433, 0.2553447186946869, -0.3627967834472656, -0.43434494733810425, 0.58340984582901, 0.28078436851501465, -0.10729072988033295, 0.010827794671058655, 0.09341056644916534, 0.404989629983902, 0.0636729970574379, 0.4803867042064667, -0.4838215410709381, 0.12429513782262802, -0.14191263914108276, -0.048192478716373444, 0.08562605828046799, -0.34572550654411316, -0.033667705953121185, 0.25997400283813477, -0.12453221529722214, -0.05381442978978157, 0.17619387805461884, 0.026040079072117805, -0.0661998763680458, -0.5886384844779968, -0.2144329994916916, 0.05566621571779251, 0.0368921272456646, -0.3682449162006378, 0.32804226875305176, 0.006831254810094833, -0.10714790225028992, 0.15430977940559387, 0.5266042947769165, 0.40514811873435974, 0.26894235610961914, 0.04975033923983574, -0.04606132209300995, -0.10302127152681351, -0.06396681815385818, -0.10547685623168945, 0.7308725118637085, 0.06666693091392517, 0.18393300473690033, 0.4525197744369507, 0.12511274218559265, -0.23850463330745697, -0.11845025420188904, -0.1909356713294983, -0.16591505706310272, -0.20354779064655304, 0.5051550269126892, -0.054607994854450226, 0.34099847078323364, -0.23270092904567719, 0.030385559424757957, -0.5357775688171387, -0.20074720680713654, 0.14764393866062164, 0.04563397541642189, 0.14323218166828156, 0.010059409774839878, 0.09482833743095398, -0.15580196678638458, 0.29765304923057556, 0.4738084077835083, 0.3946791887283325, -0.23820696771144867, -0.17043331265449524, -0.7519152164459229, 0.24899761378765106, -0.22980593144893646, 0.017411014065146446, 0.011271764524281025, 0.2548757493495941, 0.006331929471343756, 0.14319393038749695, 0.22653843462467194, 0.14724384248256683, -0.28960806131362915, 0.09639306366443634, -0.09630005061626434, -0.15392275154590607, 0.1487320363521576, -0.06579072773456573, -0.14170734584331512, -0.2585192322731018, 0.22924014925956726, 0.01122757513076067, 0.06664261966943741, -0.09979625791311264, -0.09539545327425003, -0.13192307949066162, -0.06980773061513901, 0.17151719331741333, 0.07039985060691833, 0.7023629546165466, -0.10016493499279022, -0.19500058889389038, -0.13632234930992126, -0.06155417487025261, -0.19642044603824615, 0.2539494037628174, -0.035317182540893555, 0.3724662959575653, 0.02761586382985115, -0.10689351707696915, -0.20799744129180908, 0.1193821057677269, 0.21415719389915466, -0.3031129240989685, -0.24129633605480194, 0.08206437528133392, -0.2160595953464508, 0.18233565986156464, -0.17762649059295654, 0.07504091411828995, 0.1989731341600418, 0.22106574475765228, -0.17981062829494476, -0.41483914852142334, 0.5957767963409424, -0.10847517102956772, -0.19664697349071503, -0.03641386702656746, 0.1348128318786621, 0.06607833504676819, -0.3253694176673889, -0.7558817267417908, 0.17230701446533203, 0.29222187399864197, 0.04330114647746086, -0.3046838939189911, 0.21042221784591675, -0.2924988865852356, 0.14489296078681946, 0.004821608308702707, 0.3195835053920746, 0.1815311312675476, -0.21716609597206116, 0.06463967263698578, -0.13977783918380737 ]
https://github.com/huggingface/datasets/issues/2641
load_dataset("financial_phrasebank") NonMatchingChecksumError
Hi ! Loading the dataset works on my side as well. Feel free to try again and let us know if it works for you know
## Describe the bug Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("financial_phrasebank", 'sentences_allagree') ``` ## Expected results I expect to see the financial_phrasebank dataset downloaded successfully ## Actual results NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip'] ## Environment info - `datasets` version: 1.9.0 - Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6 - Python version: 3.7.10 - PyArrow version: 4.0.1
26
load_dataset("financial_phrasebank") NonMatchingChecksumError ## Describe the bug Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("financial_phrasebank", 'sentences_allagree') ``` ## Expected results I expect to see the financial_phrasebank dataset downloaded successfully ## Actual results NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip'] ## Environment info - `datasets` version: 1.9.0 - Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6 - Python version: 3.7.10 - PyArrow version: 4.0.1 Hi ! Loading the dataset works on my side as well. Feel free to try again and let us know if it works for you know
[ -0.11983358860015869, 0.17941008508205414, -0.08838161081075668, 0.3396991491317749, 0.18796873092651367, 0.1173863410949707, 0.006067337468266487, 0.3996657133102417, 0.14194689691066742, 0.19768892228603363, -0.16138429939746857, 0.24372711777687073, 0.23040372133255005, -0.1089785173535347, -0.09277421981096268, 0.1406145840883255, 0.13382232189178467, 0.029889509081840515, 0.03455456346273422, -0.16684219241142273, -0.1839316040277481, 0.34926462173461914, -0.19688892364501953, -0.15310432016849518, -0.02556428499519825, 0.12776823341846466, 0.11051683872938156, 0.16471648216247559, -0.24969708919525146, -0.11283455789089203, 0.37320250272750854, 0.16077598929405212, -0.07798521220684052, 0.4326270818710327, -0.00011980133422184736, -0.10419662296772003, 0.234977126121521, -0.01701972633600235, -0.2702704668045044, -0.37711772322654724, -0.4048723876476288, -0.5063532590866089, 0.014782077632844448, -0.17797242105007172, 0.10074923932552338, 0.26715728640556335, 0.11917434632778168, -0.07231086492538452, 0.09381494671106339, 0.18569159507751465, 0.19363541901111603, 0.1554289013147354, 0.048635464161634445, -0.04125988483428955, 0.3124479353427887, -0.2526998817920685, -0.06519116461277008, 0.16221998631954193, 0.18733149766921997, 0.12674027681350708, -0.22276729345321655, 0.11867253482341766, -0.3079535961151123, 0.30044111609458923, -0.034496188163757324, 0.010813452303409576, 0.04673922061920166, -0.3264700174331665, 0.2752400040626526, 0.40790238976478577, 0.43255406618118286, -0.18715086579322815, -0.29448601603507996, -0.17384830117225647, -0.15330100059509277, -0.002367687877267599, 0.40014851093292236, 0.16290877759456635, -0.2278739959001541, -0.04638790339231491, -0.39225804805755615, 0.2648799419403076, 0.05286117643117905, 0.21533596515655518, 0.05902932211756706, 0.04839177429676056, -0.06097238138318062, -0.119107186794281, 0.13704723119735718, -0.07547525316476822, 0.22535556554794312, -0.37408867478370667, -0.10977046191692352, 0.2610441744327545, -0.4206714630126953, -0.061445772647857666, -0.030305838212370872, 0.5376827120780945, 0.5291842818260193, 0.3535025417804718, 0.15220817923545837, 0.2514330744743347, -0.2445680797100067, 0.046146176755428314, 0.02047850750386715, 0.20932278037071228, 0.06558538973331451, -0.09437835961580276, 0.1245097815990448, 0.38729119300842285, -0.13913847506046295, 0.18053708970546722, -0.03683158755302429, -0.04564523696899414, 0.6784490942955017, 0.018159793689846992, 0.14395686984062195, -0.5884662866592407, -0.3368147015571594, 0.45496585965156555, -0.15174195170402527, -0.11990748345851898, -0.006246201228350401, 0.30786702036857605, -0.2831113338470459, 0.168554425239563, -0.10505969822406769, 0.1378825157880783, -0.08046051114797592, -0.15398423373699188, -0.2957543730735779, -0.1397239863872528, -0.15047162771224976, -0.06328368932008743, 0.2246822863817215, -0.356553852558136, 0.3352397680282593, -0.05157298594713211, 0.2992822229862213, -0.19677802920341492, 0.015907462686300278, -0.1158532127737999, -0.19210845232009888, 0.20232616364955902, 0.02985687367618084, 0.2005930244922638, 0.1549966186285019, 0.05972736328840256, 0.01335192285478115, 0.08792320638895035, -0.2705896198749542, -0.132460817694664, 0.11088432371616364, 0.20539981126785278, -0.5836597084999084, -0.393779456615448, 0.04517779499292374, -0.267280638217926, 0.24978280067443848, -0.14112816751003265, 0.054454609751701355, -0.10931209474802017, -0.21546509861946106, -0.2687777876853943, -0.019984440878033638, 0.13693109154701233, -0.16751833260059357, -0.00776664586737752, -0.09424496442079544, -0.10261662304401398, 0.5374265909194946, 0.20149938762187958, -0.04169825464487076, 0.02853229083120823, -0.20541460812091827, 0.28339579701423645, 0.39067068696022034, -0.16737593710422516, -0.8798965811729431, 0.25976330041885376, -0.02731970325112343, 0.4781274199485779, 0.13993537425994873, 0.16004477441310883, -0.052117131650447845, 0.06582117080688477, 0.10364250093698502, 0.11953286081552505, 0.07776854187250137, 0.1902891844511032, -0.2474450021982193, -0.3442920446395874, 0.039446763694286346, 0.15396061539649963, 0.044324975460767746, 0.14070047438144684, 0.18513309955596924, -0.021083738654851913, 0.3947173058986664, -0.04583016037940979, -0.03270721808075905, 0.09459476917982101, 0.3341778814792633, 0.23005254566669464, 0.1512165665626526, -0.3137422204017639, -0.3739698529243469, 0.31899186968803406, -0.2645704448223114, 0.06818577647209167, 0.014974098652601242, -0.17033106088638306, -0.3815482258796692, -0.2504173219203949, -0.27979186177253723, 0.12390917539596558, 0.07687509804964066, 0.3769245147705078, 0.3604219853878021, -0.011744940653443336, -0.04197145253419876, 0.3240385353565216, -0.09330843389034271, 0.11794321238994598, -0.18032796680927277, 0.28040361404418945, 0.03200986981391907, -0.05064006522297859, -0.1284961849451065, 0.0905667319893837, 0.19223451614379883, 0.11005211621522903, -0.24739918112754822, 0.3598938584327698, 0.24147555232048035, 0.0673891082406044, -0.16808681190013885, 0.2145637422800064, -0.17359495162963867, -0.15606741607189178, -0.030369900166988373, 0.5238757729530334, 0.1082736998796463, -0.0023805019445717335, -0.014832084998488426, 0.2883144021034241, 0.07230101525783539, 0.03804614767432213, -0.04398951306939125, 0.08570145070552826, 0.32627153396606445, -0.16129721701145172, -0.09348675608634949, -0.2017482966184616, 0.4962558448314667, -0.407331258058548, 0.19810901582241058, 0.037977736443281174, -0.2952640950679779, -0.0991545245051384, 0.18289725482463837, -0.11328098922967911, 0.16031062602996826, 0.1191873624920845, 0.024936215952038765, -0.05444718152284622, -0.10001692920923233, 0.5423449873924255, 0.3044377565383911, 0.2119983583688736, 0.1004113033413887, 0.10593978315591812, -0.12250087410211563, -0.17140869796276093, -0.00727583933621645, 0.22831635177135468, 0.2661943733692169, 0.5490407347679138, 0.24145972728729248, 0.0022516644094139338, -0.4095117747783661, -0.030140001326799393, -0.055283065885305405, 0.24403925240039825, -0.4301234781742096, -0.09970783442258835, -0.16958212852478027, -0.37298426032066345, -0.2735747992992401, -0.2497568279504776, -0.1284104436635971, -0.45852604508399963, -0.08365201950073242, 0.2773180902004242, 0.05466685816645622, 0.1180558055639267, -0.37742310762405396, -0.012009023688733578, -0.09482964128255844, -0.22511348128318787, -0.15111704170703888, 0.2100321501493454, -0.19577999413013458, -0.01542328204959631, 0.1645875722169876, -0.042726777493953705, 0.2526285946369171, -0.41173428297042847, 0.016524415463209152, -0.6264843940734863, -0.24933308362960815, 0.07065339386463165, -0.15808111429214478, 0.20787109434604645, 0.3840278089046478, 0.13923165202140808, -0.26323965191841125, -0.074471615254879, 0.22094030678272247, -0.03933737426996231, -0.37205755710601807, 0.34365811944007874, -0.0934949591755867, 0.014834359288215637, 0.12870308756828308, -0.004066023509949446, -0.2322087585926056, -0.290813684463501, -0.018598847091197968, 0.10105518251657486, 0.22702933847904205, 0.36532503366470337, -0.18206052482128143, 0.09776077419519424, -0.11691237986087799, 0.49779006838798523, -0.27114006876945496, -0.5762330293655396, 0.5287802815437317, 0.13195733726024628, -0.31897953152656555, 0.012340228073298931, -0.017896851524710655, 0.06062494218349457, 0.2794051766395569, -0.5194584131240845, -0.10234988480806351, -0.3720168173313141, -0.029239501804113388, 0.19330894947052002, 0.06930553168058395, 0.18192024528980255, 0.003462117863819003, -0.05452151969075203, -0.21126620471477509, -0.14101794362068176, 0.13839147984981537, -0.08308231830596924, 0.3895276188850403, -0.28221017122268677, 0.2959482967853546, 0.019822556525468826, 0.22909891605377197, 0.5105571150779724, 0.2102244794368744, 0.27906569838523865, -0.022137630730867386, 0.07863354682922363, -0.13570420444011688, -0.25301510095596313, -0.35911622643470764, -0.09603903442621231, -0.20276029407978058, 0.26131170988082886, 0.06720690429210663, -0.042602092027664185, -0.13468439877033234, -0.1588936746120453, -0.36204811930656433, -0.10073090344667435, -0.1116909310221672, -0.10788938403129578, 0.22178113460540771, 0.22864298522472382, 0.1920686513185501, -0.007441333960741758, -0.4660685062408447, -0.05608806386590004, 0.19574348628520966, -0.22194205224514008, -0.11901754140853882, -0.18783074617385864, 0.052746836096048355, -0.05192015320062637, 0.3516175448894501, 0.23111003637313843, 0.3435097336769104, 0.14574655890464783, -0.1631281077861786, 0.0708225667476654, -0.12495242804288864, 0.2933346927165985, -0.339978963136673, 0.26452723145484924, -0.09139330685138702, -0.13607105612754822, -0.08742831647396088, -0.16899287700653076, -0.1418352574110031, 0.006642142776399851, 0.19799472391605377, 0.27096202969551086, -0.20726312696933746, 0.15207409858703613, 0.1595967561006546, 0.35257241129875183, -0.1252574622631073, -0.3678176999092102, -0.4135628938674927, -0.2623334228992462, -0.3545673191547394, -0.11335667967796326, -0.24033603072166443, 0.3150264322757721, 0.060345374047756195, -0.041384756565093994, 0.10935614258050919, -0.0521598681807518, 0.41513416171073914, -0.06014076620340347, 0.32452547550201416, 0.04940652847290039, 0.4183499217033386, -0.023410208523273468, -0.10064908862113953, 0.24927721917629242, 0.7642991542816162, -0.14911004900932312, -0.42216596007347107, -0.1268506944179535, -0.2571388781070709, -0.03647013008594513, 0.24822524189949036, -0.11500822752714157, -0.12688732147216797, 0.5341655611991882, -0.16083022952079773, 0.06935407966375351, -0.23412099480628967, 0.12690269947052002, 0.19645845890045166, -0.36611509323120117, -0.36860546469688416, 0.19636425375938416, 0.18175891041755676, -0.054232269525527954, -0.03330465406179428, -0.017497055232524872, -0.06651102006435394, 0.3405209481716156, -0.05974572151899338, 0.9199493527412415, 0.042416512966156006, 0.12593182921409607, 0.1951046735048294, -0.0516662560403347, 0.3047740161418915, -0.1051318496465683, 0.020301327109336853, -0.38458162546157837, -0.3679979145526886, -0.13370360434055328, -0.23278643190860748, 0.01542122196406126, 0.07597852498292923, -0.06337779015302658, 0.4916330575942993, -0.13822828233242035, 0.0897129699587822, 0.1643398255109787, 0.07082050293684006, -0.274776816368103, 0.04892168566584587, -0.0806937962770462, 0.11888958513736725, -0.20446068048477173, 0.4700171947479248, -0.0599914975464344, 0.03785271197557449, -0.25234827399253845, -0.03251451253890991, -0.3882634937763214, 0.3136291801929474, -0.09004127979278564, 0.006834650412201881, 0.18107779324054718, -0.05990193039178848, -0.11713758111000061, 0.2041875123977661, 0.34893283247947693, 0.21619752049446106, -0.33887699246406555, 0.03610653430223465, 0.6333320140838623, 0.028818726539611816, 0.2552765905857086, -0.13955771923065186, 0.3817412853240967, -0.031974125653505325, -0.1542731523513794, 0.037016671150922775, 0.03703032061457634, -0.3310628831386566, -0.02665156126022339, -0.2256551831960678, -0.05559760332107544, -0.44163674116134644, -0.3367227017879486, -0.23617377877235413, 0.08366204053163528, -0.3581354022026062, 0.14542348682880402, 0.2794806957244873, -0.1910572052001953, 0.10480330884456635, 0.0902281105518341, -0.4249242842197418, -0.19864153861999512, 0.5109450817108154, 0.1301187425851822, -0.2581571340560913, 0.38981351256370544, 0.12990893423557281, -0.37236160039901733, -0.18001079559326172, -0.18823915719985962, -0.0007798188016749918, -0.5864364504814148, 0.005313137546181679, -0.16096541285514832, 0.13228321075439453, -0.15496820211410522, 0.6723009347915649, 0.44066736102104187, 0.07527731359004974, 0.03220166265964508, -0.5120890140533447, -0.1179986447095871, 0.04609016329050064, 0.2858418822288513, 0.280904084444046, -0.09239546954631805, -0.23692314326763153, 0.0420578308403492, -0.3204147517681122, -0.28944629430770874, 0.02795274183154106, -0.3091942369937897, -0.19011417031288147, -0.12755610048770905, 0.13896453380584717, 0.15910662710666656, -0.023569149896502495, 0.16289904713630676, 0.10893434286117554, -0.11835794895887375, -0.22951415181159973, -0.05526868253946304, 0.14344638586044312, 0.1118169054389, -0.15792216360569, 0.16409675776958466, -0.15748971700668335, -0.1348264068365097, -0.1007239818572998, -0.13539910316467285, 0.2522687315940857, 0.020983923226594925, 0.12650659680366516, 0.43979859352111816, -0.0466281920671463, -0.10417681187391281, 0.004941346123814583, -0.33452028036117554, 0.12648414075374603, 0.009674466215074062, -0.009627386927604675, -0.01940801553428173, -0.025675691664218903, 0.09814442694187164, 0.12027033418416977, 0.299276739358902, -0.0745699480175972, 0.3204856514930725, -0.5192992687225342, 0.04082619771361351, 0.44135782122612, 0.32207605242729187, 0.3290511667728424, -0.35979127883911133, -0.16258971393108368, 0.18905167281627655, 0.24222274124622345, -0.33308133482933044, -0.02666313387453556, 0.1844204217195511, -0.11384018510580063, 0.04578123614192009, 0.2178560346364975, 0.2019946277141571, -0.3238895535469055, 0.3665145933628082, 0.05213465914130211, 0.3090810477733612, -0.1789856106042862, 0.037673719227313995, 0.4241369366645813, 0.026364626362919807, 0.011182858608663082, 0.080649234354496, -0.12899325788021088, -0.2466050237417221, -0.010965004563331604, 0.065630704164505, 0.23676420748233795, -0.08834170550107956, 0.21062469482421875, -0.32466667890548706, -0.36851921677589417, 0.5605859756469727, 0.2961849868297577, -0.11805973201990128, 0.00864555686712265, 0.16438345611095428, 0.41162988543510437, 0.12240386009216309, 0.4931635856628418, -0.4444054067134857, 0.055332329124212265, -0.17627471685409546, -0.06258220970630646, -0.02439534105360508, -0.3048771023750305, 0.014393515884876251, 0.14185485243797302, -0.21413196623325348, 0.06969939917325974, 0.16987673938274384, 0.018070034682750702, -0.029124626889824867, -0.5382282137870789, -0.1806327998638153, 0.07538952678442001, 0.0018890846986323595, -0.36477965116500854, 0.34377560019493103, 0.047611676156520844, -0.07407581806182861, 0.18847790360450745, 0.5166016817092896, 0.3630855679512024, 0.3304818868637085, 0.05722242593765259, -0.14685729146003723, -0.10634510219097137, -0.04530835524201393, -0.10671517252922058, 0.7710256576538086, 0.08929011225700378, 0.19642017781734467, 0.4270024299621582, 0.12177229672670364, -0.20610849559307098, -0.0785391703248024, -0.07459226250648499, -0.13731235265731812, -0.09800811856985092, 0.6256078481674194, -0.028387337923049927, 0.3117578625679016, -0.12542450428009033, 0.08713901042938232, -0.5139369368553162, -0.17036288976669312, 0.22158174216747284, 0.1166299358010292, 0.14531520009040833, 0.07133013755083084, 0.08242838084697723, -0.11989620327949524, 0.2320907711982727, 0.4119340479373932, 0.30598586797714233, -0.2828148603439331, -0.18406806886196136, -0.7421239614486694, 0.3818671405315399, -0.14600114524364471, 0.04604720324277878, 0.03201601654291153, 0.21921445429325104, 0.05515603348612785, 0.13895179331302643, 0.256992369890213, 0.05523224174976349, -0.3129650950431824, 0.12267809361219406, -0.08734894543886185, -0.1740030199289322, 0.14115950465202332, -0.07592618465423584, -0.1713542342185974, -0.2909752428531647, 0.20075207948684692, 0.10117816925048828, 0.07879310101270676, -0.08704286813735962, -0.1461333930492401, -0.07502904534339905, -0.042587172240018845, 0.15973208844661713, 0.020474674180150032, 0.691318690776825, -0.08525581657886505, -0.18431073427200317, -0.08076158165931702, -0.13667556643486023, -0.14035342633724213, 0.3539608120918274, -0.06891202926635742, 0.33791714906692505, 0.006235284730792046, -0.030394872650504112, -0.16037219762802124, 0.006934488657861948, 0.20290791988372803, -0.40472111105918884, -0.29472240805625916, 0.10815346240997314, -0.18635042011737823, 0.11586909741163254, -0.19770213961601257, 0.06922094523906708, 0.1868559867143631, 0.32723644375801086, -0.1260378658771515, -0.3980071246623993, 0.6327148675918579, -0.10716424882411957, -0.22570526599884033, -0.0875336155295372, 0.18512766063213348, -0.06244146451354027, -0.28968191146850586, -0.7371846437454224, 0.05270882695913315, 0.38873088359832764, 0.05588129907846451, -0.2227691113948822, 0.1716943234205246, -0.2935406267642975, 0.1815584897994995, -0.019017256796360016, 0.2885158658027649, 0.17677129805088043, -0.18691670894622803, 0.04732345789670944, -0.24154551327228546 ]
https://github.com/huggingface/datasets/issues/2641
load_dataset("financial_phrasebank") NonMatchingChecksumError
Thank you! I've been trying periodically for the past month, and no luck yet with this particular dataset. Just tried again and still hitting the checksum error. Code: `dataset = load_dataset("financial_phrasebank", "sentences_allagree") ` Traceback: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-2-55cc2144f31e> in <module> ----> 1 dataset = load_dataset("financial_phrasebank", "sentences_allagree") /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs) 859 ignore_verifications=ignore_verifications, 860 try_from_hf_gcs=try_from_hf_gcs, --> 861 use_auth_token=use_auth_token, 862 ) 863 /opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 582 if not downloaded_from_gcs: 583 self._download_and_prepare( --> 584 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 585 ) 586 # Sync info /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 642 if verify_infos: 643 verify_checksums( --> 644 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 645 ) 646 /opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 38 if len(bad_urls) > 0: 39 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 41 logger.info("All the checksums matched successfully" + for_verification_name) 42 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip'] ```
## Describe the bug Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("financial_phrasebank", 'sentences_allagree') ``` ## Expected results I expect to see the financial_phrasebank dataset downloaded successfully ## Actual results NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip'] ## Environment info - `datasets` version: 1.9.0 - Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6 - Python version: 3.7.10 - PyArrow version: 4.0.1
174
load_dataset("financial_phrasebank") NonMatchingChecksumError ## Describe the bug Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("financial_phrasebank", 'sentences_allagree') ``` ## Expected results I expect to see the financial_phrasebank dataset downloaded successfully ## Actual results NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip'] ## Environment info - `datasets` version: 1.9.0 - Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6 - Python version: 3.7.10 - PyArrow version: 4.0.1 Thank you! I've been trying periodically for the past month, and no luck yet with this particular dataset. Just tried again and still hitting the checksum error. Code: `dataset = load_dataset("financial_phrasebank", "sentences_allagree") ` Traceback: ``` --------------------------------------------------------------------------- NonMatchingChecksumError Traceback (most recent call last) <ipython-input-2-55cc2144f31e> in <module> ----> 1 dataset = load_dataset("financial_phrasebank", "sentences_allagree") /opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs) 859 ignore_verifications=ignore_verifications, 860 try_from_hf_gcs=try_from_hf_gcs, --> 861 use_auth_token=use_auth_token, 862 ) 863 /opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 582 if not downloaded_from_gcs: 583 self._download_and_prepare( --> 584 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 585 ) 586 # Sync info /opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 642 if verify_infos: 643 verify_checksums( --> 644 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files" 645 ) 646 /opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name) 38 if len(bad_urls) > 0: 39 error_msg = "Checksums didn't match" + for_verification_name + ":\n" ---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls)) 41 logger.info("All the checksums matched successfully" + for_verification_name) 42 NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip'] ```
[ -0.12190382182598114, 0.25043556094169617, -0.06328260153532028, 0.329198956489563, 0.16332073509693146, 0.13060161471366882, 0.029430221766233444, 0.39818495512008667, 0.10427402704954147, 0.10010836273431778, -0.23702996969223022, 0.2519070506095886, 0.2408212274312973, -0.18088668584823608, -0.13947154581546783, 0.14047762751579285, 0.10747326910495758, 0.04317532107234001, -0.01381843164563179, -0.09089075028896332, -0.10740121454000473, 0.28121548891067505, -0.21454711258411407, -0.20221135020256042, -0.02568657509982586, 0.0863928347826004, 0.11048999428749084, 0.0720110684633255, -0.26582685112953186, -0.13488879799842834, 0.4920259118080139, 0.1678607314825058, -0.07267449051141739, 0.4778309762477875, -0.0001244328304892406, -0.05199456959962845, 0.2715742588043213, -0.048634205013513565, -0.3567807078361511, -0.37078678607940674, -0.4534247815608978, -0.4662197232246399, -0.04337187856435776, -0.20148444175720215, 0.1378684937953949, 0.3529547154903412, 0.14451515674591064, -0.12618795037269592, 0.05450937896966934, 0.17452962696552277, 0.1397491693496704, 0.2478654682636261, 0.14677566289901733, 0.034986384212970734, 0.29983508586883545, -0.1909594088792801, -0.11348942667245865, 0.2703517973423004, 0.14605815708637238, 0.051155928522348404, -0.20772279798984528, 0.1088072657585144, -0.3613061308860779, 0.37073850631713867, -0.0008348681149072945, 0.06891610473394394, 0.058834258466959, -0.2889934778213501, 0.2137652337551117, 0.3574342429637909, 0.43515533208847046, -0.21873311698436737, -0.3650905191898346, -0.1239958107471466, -0.2084687203168869, -0.04632176086306572, 0.41735392808914185, 0.1647840440273285, -0.28311532735824585, -0.0629982128739357, -0.46839120984077454, 0.2776022255420685, -0.009277415461838245, 0.23450326919555664, 0.03264943137764931, 0.062033798545598984, -0.018513407558202744, -0.0787273496389389, 0.19150327146053314, -0.06187344714999199, 0.2658657729625702, -0.3590574264526367, -0.03918591886758804, 0.2633776366710663, -0.416085422039032, -0.10001570731401443, -0.07440528273582458, 0.44214341044425964, 0.4887326657772064, 0.41905391216278076, 0.18087999522686005, 0.1608913689851761, -0.18233981728553772, 0.09546168148517609, 0.05090083181858063, 0.1860753297805786, 0.04306028410792351, 0.019263608381152153, 0.17986410856246948, 0.41344961524009705, -0.10694326460361481, 0.16260190308094025, -0.06926478445529938, -0.031608786433935165, 0.7316471338272095, 0.009484222158789635, 0.22045095264911652, -0.6202273368835449, -0.37894541025161743, 0.4553825259208679, -0.16313739120960236, -0.1740153729915619, 0.04855738580226898, 0.2002505511045456, -0.3129516839981079, 0.19979412853717804, -0.060188401490449905, 0.08355481922626495, -0.07940832525491714, -0.17340601980686188, -0.22657041251659393, -0.05891084298491478, -0.12272300571203232, 0.03202478215098381, 0.31397420167922974, -0.32501354813575745, 0.3017096519470215, -0.058597199618816376, 0.3189173638820648, -0.13492152094841003, 0.12941484153270721, -0.1472213715314865, -0.1777922511100769, 0.32437968254089355, -0.06084061786532402, 0.19005322456359863, 0.17798413336277008, 0.06997203081846237, -0.11060245335102081, 0.15080063045024872, -0.21572516858577728, -0.14491023123264313, 0.00848617497831583, 0.12882965803146362, -0.6136753559112549, -0.38363948464393616, 0.07472778111696243, -0.41715794801712036, 0.33014681935310364, -0.2364792376756668, 0.05976785719394684, -0.13555702567100525, -0.20996932685375214, -0.2326623499393463, 0.02240183763206005, 0.1867605447769165, -0.11508308351039886, 0.06421075761318207, -0.12378937751054764, -0.08153623342514038, 0.5374076962471008, 0.2021663784980774, -0.011569041758775711, 0.019831549376249313, -0.19813752174377441, 0.1501949280500412, 0.2272738516330719, -0.15796498954296112, -0.8371686935424805, 0.20420169830322266, 0.04380263760685921, 0.5060794353485107, 0.11317280679941177, 0.19068343937397003, -0.05193931609392166, 0.09216964989900589, 0.16588419675827026, 0.08204136043787003, -0.02658863365650177, 0.08485841006040573, -0.23684526979923248, -0.33268818259239197, 0.14462661743164062, 0.20961332321166992, 0.05113877356052399, 0.14553743600845337, 0.14114943146705627, 0.03215546905994415, 0.2999110519886017, -0.03403140977025032, -0.011776257306337357, 0.053230416029691696, 0.45308566093444824, 0.172077938914299, 0.09318498522043228, -0.3631531596183777, -0.4774758517742157, 0.28873878717422485, -0.16490988433361053, 0.07056257873773575, -0.09167714416980743, -0.0877334326505661, -0.38568079471588135, -0.2757386863231659, -0.2165607362985611, 0.17427274584770203, 0.01956106908619404, 0.3824875056743622, 0.3753989636898041, -0.06750483065843582, -0.04576520621776581, 0.4224553108215332, -0.14184270799160004, 0.11075905710458755, -0.2753639221191406, 0.34112387895584106, -0.008214970119297504, -0.053448017686605453, -0.08309229463338852, 0.051411326974630356, 0.14452636241912842, 0.06041368469595909, -0.21133002638816833, 0.35040879249572754, 0.2670074999332428, -0.05311841145157814, -0.1756029576063156, 0.28463414311408997, -0.14557690918445587, -0.1669672280550003, -0.04297894611954689, 0.5265862941741943, 0.0918031558394432, -0.017936786636710167, -0.05864463746547699, 0.3515951931476593, -0.024047860875725746, 0.04812286049127579, -0.06882217526435852, 0.14170266687870026, 0.3558284044265747, -0.17178146541118622, -0.18143390119075775, -0.15696340799331665, 0.5086337327957153, -0.25327691435813904, 0.13408608734607697, 0.042463917285203934, -0.21523325145244598, -0.13378432393074036, 0.10590039938688278, -0.1258067488670349, 0.10818010568618774, 0.1274551898241043, 0.11383282393217087, -0.026364948600530624, -0.044638343155384064, 0.4975661635398865, 0.3507779538631439, 0.152630016207695, 0.14896610379219055, 0.1117480993270874, -0.21532747149467468, -0.06402184814214706, -0.045385945588350296, 0.1830277293920517, 0.28112298250198364, 0.5960557460784912, 0.2287653386592865, 0.022712234407663345, -0.38970455527305603, -0.1636652797460556, -0.04854928329586983, 0.3402167558670044, -0.4080112874507904, -0.05833708494901657, -0.24779962003231049, -0.20786739885807037, -0.2976735830307007, -0.34452274441719055, -0.23605209589004517, -0.46606218814849854, -0.11717277020215988, 0.45180585980415344, 0.0896141454577446, 0.19472548365592957, -0.5383245944976807, 0.019481470808386803, -0.049649935215711594, -0.31435081362724304, -0.16389206051826477, 0.13016358017921448, -0.13653327524662018, -0.05996188148856163, 0.3283935487270355, -0.03349447250366211, 0.2559366226196289, -0.4378317594528198, 0.0011318376054987311, -0.5693755745887756, -0.3058415353298187, -0.011247516609728336, -0.09501834213733673, 0.2326524257659912, 0.30625033378601074, 0.19372402131557465, -0.23374539613723755, -0.21114113926887512, 0.18957962095737457, -0.003603382036089897, -0.397253155708313, 0.34699341654777527, -0.16436272859573364, 0.03636660426855087, 0.1348142772912979, -0.039087485522031784, -0.19306764006614685, -0.2375827431678772, -0.02097431756556034, 0.1128813698887825, 0.2617201507091522, 0.3831791281700134, -0.1477782428264618, 0.11827868223190308, -0.12504975497722626, 0.5495763421058655, -0.22251544892787933, -0.6153051257133484, 0.6148751378059387, 0.15102505683898926, -0.2769507169723511, 0.060051076114177704, -0.04394073784351349, 0.11416032910346985, 0.32572874426841736, -0.5195679664611816, -0.11781380325555801, -0.3152972459793091, -0.0033042707946151495, 0.18808932602405548, 0.03362913429737091, 0.18436144292354584, -0.022102097049355507, 0.0029329489916563034, -0.16384758055210114, -0.22385041415691376, 0.1285650134086609, -0.0007638812530785799, 0.4240904152393341, -0.27059459686279297, 0.2751893401145935, 0.012868525460362434, 0.23596659302711487, 0.5632449984550476, 0.1702878177165985, 0.1899767369031906, 0.011249302886426449, 0.12867452204227448, -0.1215767115354538, -0.2859446108341217, -0.3453659415245056, -0.134868785738945, -0.2140856832265854, 0.11198899894952774, 0.024002615362405777, -0.09198082238435745, -0.1786995381116867, -0.11642961204051971, -0.2810485064983368, -0.12575554847717285, -0.07352577894926071, -0.12981650233268738, 0.27138590812683105, 0.1732882559299469, 0.12041100114583969, -0.08613616228103638, -0.4792514145374298, -0.08387567847967148, 0.27067098021507263, -0.2183160036802292, -0.07338394969701767, -0.18700149655342102, 0.03893900290131569, -0.022825302556157112, 0.3018490672111511, 0.24468882381916046, 0.5021724700927734, 0.13920900225639343, -0.1495165228843689, 0.004542866256088018, -0.141941100358963, 0.2533040940761566, -0.2825845181941986, 0.2747725546360016, 0.0071258521638810635, -0.1487608402967453, -0.02938937395811081, -0.18783704936504364, -0.1596640795469284, 0.006762695498764515, 0.23660412430763245, 0.3087526857852936, -0.26371046900749207, 0.1630427986383438, 0.2867015600204468, 0.3816694915294647, -0.07852140814065933, -0.35038164258003235, -0.4151211678981781, -0.2587953209877014, -0.3248909115791321, -0.04348457604646683, -0.18860499560832977, 0.3431871235370636, 0.10906050354242325, 0.006323601584881544, 0.08529966324567795, -0.018555834889411926, 0.40095677971839905, -0.00534862233325839, 0.23462368547916412, 0.08730735629796982, 0.473359614610672, 0.0183096993714571, -0.10448872298002243, 0.26219674944877625, 0.746316134929657, -0.1263427436351776, -0.390500545501709, -0.06016945466399193, -0.21824496984481812, -0.08930284529924393, 0.15728150308132172, -0.024759313091635704, -0.19627785682678223, 0.5755332112312317, -0.20400412380695343, 0.09693562984466553, -0.2935260832309723, 0.06068585813045502, 0.18350671231746674, -0.4045855402946472, -0.31513920426368713, 0.174652561545372, 0.1504543125629425, -0.0043041701428592205, 0.11257340013980865, -0.03746232017874718, 0.018513454124331474, 0.1966504007577896, 0.04529639706015587, 0.931977391242981, 0.05433269217610359, 0.08527863770723343, 0.15116600692272186, -0.12259554117918015, 0.1917186826467514, -0.03832770138978958, 0.03851420804858208, -0.32485777139663696, -0.3994271755218506, -0.14228840172290802, -0.28688114881515503, 0.15568283200263977, 0.041933152824640274, -0.06734664738178253, 0.4279148280620575, -0.0480773001909256, 0.17228737473487854, 0.153115376830101, -0.000400039367377758, -0.2481519877910614, 0.06846451759338379, -0.0544431172311306, 0.09035124629735947, -0.23296064138412476, 0.4803931415081024, -0.03460502624511719, 0.03291122987866402, -0.2976823151111603, -0.05504784733057022, -0.4033450484275818, 0.26588279008865356, -0.012809792533516884, 0.046414464712142944, 0.304930716753006, -0.0883251279592514, -0.09860751032829285, 0.06679847836494446, 0.3115848898887634, 0.09231918305158615, -0.337829053401947, -0.04973670095205307, 0.5200310945510864, 0.01602328009903431, 0.2511177659034729, -0.18076162040233612, 0.3796578645706177, -0.03394540026783943, -0.12295739352703094, 0.05333345755934715, 0.054515428841114044, -0.41569897532463074, 0.1536206752061844, -0.2063109427690506, -0.07173674553632736, -0.375657320022583, -0.2514219880104065, -0.19476322829723358, 0.10447707027196884, -0.3385733664035797, 0.1092134565114975, 0.29386577010154724, -0.1672353744506836, 0.13149039447307587, 0.03177277371287346, -0.35526204109191895, -0.16967588663101196, 0.5675473809242249, 0.17598284780979156, -0.3029547333717346, 0.3590071201324463, 0.060670237988233566, -0.4059324860572815, -0.14378446340560913, -0.15191346406936646, -0.1260749101638794, -0.5568310022354126, 0.003630382940173149, -0.2260167896747589, 0.20845326781272888, -0.16190776228904724, 0.5562606453895569, 0.42310354113578796, 0.06054611876606941, 0.09637124091386795, -0.5787785053253174, -0.18463295698165894, 0.052153829485177994, 0.29027971625328064, 0.32823997735977173, -0.20144341886043549, -0.16807998716831207, 0.036143746227025986, -0.2816247045993805, -0.2290261834859848, 0.016598403453826904, -0.32285404205322266, -0.14374606311321259, -0.10013717412948608, 0.08945707976818085, 0.1147095113992691, 0.010799148119986057, 0.12131093442440033, 0.0876617506146431, -0.14289376139640808, -0.15187227725982666, -0.10980793833732605, 0.16906753182411194, 0.11867915093898773, -0.15693865716457367, 0.2470407336950302, -0.13364526629447937, -0.1350230723619461, -0.09562099725008011, -0.23086927831172943, 0.26562678813934326, 0.003949029371142387, 0.1658153086900711, 0.40672600269317627, -0.06676126271486282, -0.10096234083175659, -0.017544426023960114, -0.3136410117149353, 0.0998435989022255, 0.08515049517154694, 0.0601072758436203, -0.02411605976521969, 0.0018698155181482434, 0.10257813334465027, 0.10029292851686478, 0.13743695616722107, -0.1723906546831131, 0.3762357532978058, -0.48068010807037354, 0.039581798017024994, 0.4147231876850128, 0.31396257877349854, 0.41340839862823486, -0.2964339554309845, -0.14438170194625854, 0.2171412855386734, 0.18169145286083221, -0.3661002218723297, -0.020808760076761246, 0.3057404160499573, -0.08868702501058578, 0.045972567051649094, 0.21803848445415497, 0.09813293069601059, -0.40272805094718933, 0.5062952637672424, 0.07321031391620636, 0.27392688393592834, -0.25431251525878906, 0.0885758027434349, 0.451622873544693, 0.05087584629654884, -0.028851594775915146, 0.1816987544298172, -0.13745364546775818, -0.13855721056461334, -0.0538744293153286, 0.0023306673392653465, 0.1581178605556488, -0.17491339147090912, 0.2445431500673294, -0.37382572889328003, -0.3313356637954712, 0.43535280227661133, 0.3104015290737152, -0.02273564040660858, 0.018237680196762085, 0.14799240231513977, 0.3204093873500824, 0.03827367722988129, 0.48046645522117615, -0.4871770143508911, 0.020896894857287407, -0.1371545046567917, -0.003138611325994134, -0.12643495202064514, -0.30616211891174316, -0.012793795205652714, 0.18619784712791443, -0.15697477757930756, 0.05001991242170334, 0.3224605321884155, 0.06318235397338867, -0.09631296247243881, -0.5983767509460449, -0.1321248710155487, 0.08315940201282501, -0.029667427763342857, -0.36438289284706116, 0.3487517535686493, 0.0935669094324112, -0.13446317613124847, 0.1059626042842865, 0.4878089427947998, 0.38323676586151123, 0.3555282950401306, 0.12306983768939972, -0.05824334919452667, -0.12594425678253174, -0.05715232342481613, -0.044297073036432266, 0.8251377940177917, 0.06317873299121857, 0.11446482688188553, 0.3569466769695282, 0.0808132216334343, -0.14708350598812103, -0.00949939712882042, -0.13336846232414246, -0.22025346755981445, -0.06710779666900635, 0.6605430245399475, 0.01786648854613304, 0.27884000539779663, -0.05256505310535431, 0.0635826587677002, -0.39883023500442505, -0.22116532921791077, 0.17044784128665924, 0.12115779519081116, 0.09412380307912827, 0.15477247536182404, 0.0418643094599247, -0.17780759930610657, 0.2235858291387558, 0.3849759101867676, 0.2284826934337616, -0.3141387403011322, -0.2495042085647583, -0.8176963329315186, 0.31308528780937195, -0.21408730745315552, -0.013297860510647297, 0.10578767955303192, 0.21921321749687195, 0.03268221393227577, 0.2004251778125763, 0.22103512287139893, -0.08317934721708298, -0.2814389765262604, 0.11789410561323166, -0.10387710481882095, -0.18483823537826538, 0.17554573714733124, -0.08947190642356873, -0.17638225853443146, -0.30683568120002747, 0.18460261821746826, 0.17328013479709625, 0.032821279019117355, -0.03668319433927536, -0.12157361954450607, -0.01295425184071064, 0.10752914100885391, 0.09821494668722153, 0.005804166197776794, 0.7441563606262207, 0.00300672953017056, -0.20145276188850403, -0.11333741992712021, -0.11369121074676514, -0.10945573449134827, 0.3623209297657013, -0.06145757436752319, 0.37280744314193726, -0.00012623894144780934, -0.0332113616168499, -0.19792422652244568, 0.18345138430595398, 0.12079660594463348, -0.4166775047779083, -0.24543176591396332, 0.14119775593280792, -0.20585216581821442, 0.180093452334404, -0.26658180356025696, 0.03229530155658722, 0.19596150517463684, 0.40072351694107056, -0.2157139778137207, -0.32440468668937683, 0.6163961887359619, -0.1873248815536499, -0.233450248837471, -0.08662091940641403, 0.1230187937617302, -0.223328098654747, -0.26451563835144043, -0.7100594639778137, 0.08795085549354553, 0.4004310667514801, 0.014068147167563438, -0.22925014793872833, 0.24373766779899597, -0.28314682841300964, 0.19639278948307037, -0.02415025234222412, 0.4023306667804718, 0.10485468059778214, -0.21672523021697998, 0.0047477176412940025, -0.2092563509941101 ]
https://github.com/huggingface/datasets/issues/2630
Progress bars are not properly rendered in Jupyter notebook
To add my experience when trying to debug this issue: Seems like previously the workaround given [here](https://github.com/tqdm/tqdm/issues/485#issuecomment-473338308) worked around this issue. But with the latest version of jupyter/tqdm I still get terminal warnings that IPython tried to send a message from a forked process.
## Describe the bug The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal). ## Steps to reproduce the bug ```python ds.map(tokenize, num_proc=10) ``` ## Expected results Jupyter widgets displaying the progress bars. ## Actual results Simple plane progress bars. cc: Reported by @thomwolf
44
Progress bars are not properly rendered in Jupyter notebook ## Describe the bug The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal). ## Steps to reproduce the bug ```python ds.map(tokenize, num_proc=10) ``` ## Expected results Jupyter widgets displaying the progress bars. ## Actual results Simple plane progress bars. cc: Reported by @thomwolf To add my experience when trying to debug this issue: Seems like previously the workaround given [here](https://github.com/tqdm/tqdm/issues/485#issuecomment-473338308) worked around this issue. But with the latest version of jupyter/tqdm I still get terminal warnings that IPython tried to send a message from a forked process.
[ 0.18173721432685852, 0.026652369648218155, -0.00488420482724905, 0.05655066296458244, 0.11842598021030426, -0.34836241602897644, 0.5567898750305176, 0.4173838794231415, -0.259396493434906, 0.002457247581332922, -0.21256695687770844, 0.6025976538658142, 0.2658940255641937, 0.1672157347202301, 0.0038401528727263212, -0.23792266845703125, -0.15845276415348053, 0.10350026935338974, -0.3469714820384979, 0.002484117168933153, -0.2896270751953125, 0.19180278480052948, -0.2716618478298187, 0.363505482673645, -0.40412890911102295, 0.0030341511592268944, 0.07437282055616379, 0.07676154375076294, 0.1247890442609787, -0.48778554797172546, 0.10105116665363312, -0.07118616253137589, 0.03666205331683159, 0.33720454573631287, -0.00011567030742298812, -0.028591902926564217, 0.5814054012298584, 0.0483197346329689, -0.05340320244431496, 0.3121865391731262, 0.4811501204967499, -0.49621978402137756, 0.2921685576438904, -0.2768397033214569, 0.029793618246912956, -0.16369926929473877, -0.3128533363342285, 0.10143911093473434, 0.5365034937858582, -0.11443118005990982, 0.1887732744216919, 0.5778616666793823, 0.07240063697099686, 0.201487198472023, 0.062327295541763306, -0.09679123014211655, -0.23233073949813843, 0.08268175274133682, 0.4364381432533264, -0.17051899433135986, -0.4072228670120239, 0.08625007420778275, -0.08278787136077881, 0.3567175567150116, -0.04892110452055931, 0.1682756543159485, 0.8467935919761658, -0.09504333883523941, -0.30108433961868286, 0.17561346292495728, 0.15708734095096588, -0.22179143130779266, -0.21387533843517303, -0.19088125228881836, -0.27208754420280457, -0.12417873740196228, -0.02478940039873123, -0.21172776818275452, -0.1801391839981079, 0.06307477504014969, -0.30829817056655884, 0.18768282234668732, -0.075209841132164, 0.061160095036029816, -0.2718210816383362, 0.052235476672649384, 0.01627402938902378, 0.022246139124035835, -0.42516806721687317, 0.04470735043287277, 0.21431593596935272, -0.08994338661432266, 0.09525057673454285, 0.03198590502142906, 0.010343842208385468, -0.10967408865690231, 0.1929793357849121, -0.22121669352054596, -0.1708805412054062, 0.06298135966062546, -0.1323726773262024, 0.08013175427913666, -0.19846230745315552, 0.13801100850105286, 0.22727899253368378, -0.024272922426462173, 0.272226482629776, 0.031876444816589355, 0.40797486901283264, 0.11217306554317474, 0.07710067927837372, 0.02039833553135395, 0.16397814452648163, -0.19723545014858246, 0.12641584873199463, 0.2029946893453598, -0.012148695066571236, -0.011551390402019024, -0.16465957462787628, 0.3339942693710327, 0.35378187894821167, 0.08275710046291351, 0.13006602227687836, -0.059897638857364655, -0.1128530502319336, -0.09856954216957092, 0.1420910805463791, 0.21145939826965332, -0.16501393914222717, -0.3398204743862152, -0.045571111142635345, -0.31569594144821167, -0.1131620854139328, -0.032612185925245285, -0.08190267533063889, 0.5226356387138367, 0.20157186686992645, 0.11674806475639343, -0.013367459177970886, -0.06084491312503815, -0.003956940956413746, -0.045456741005182266, 0.1604146957397461, 0.27361735701560974, -0.18018531799316406, 0.06456424295902252, 0.3331305980682373, -0.21472644805908203, 0.10041873902082443, 0.40171149373054504, 0.001966585638001561, 0.014730825088918209, -0.3248886168003082, 0.027135059237480164, -0.34490707516670227, 0.29252010583877563, -0.34823906421661377, -0.2347097098827362, 0.31206104159355164, 0.019108830019831657, 0.09110800921916962, -0.499365895986557, 0.07046499848365784, -0.04171957075595856, 0.2428242415189743, 0.2687729299068451, -0.5468888282775879, -0.366172730922699, -0.27299773693084717, -0.11320602893829346, 0.5822646021842957, 0.4652714431285858, 0.09132084250450134, 0.3527901768684387, -0.05164589732885361, 0.07999402284622192, -0.07150745391845703, 0.004079875536262989, -0.32400962710380554, -0.05068052560091019, 0.034234970808029175, 0.359809011220932, -0.22170251607894897, -0.13915781676769257, 0.5451210737228394, 0.026842204853892326, 0.22252164781093597, 0.1077180877327919, 0.22015178203582764, 0.00506725674495101, -0.5182207226753235, 0.11981429159641266, 0.14246807992458344, 0.05395225062966347, 0.22645114362239838, -0.04139697551727295, -0.07606349140405655, -0.3514196276664734, 0.3787595331668854, 0.4695475399494171, 0.061398472636938095, -0.1032748743891716, -0.12358976155519485, 0.03793254867196083, 0.2085111439228058, 0.22916246950626373, 0.11621035635471344, 0.22494439780712128, -0.20894935727119446, -0.03434033319354057, 0.07958703488111496, 0.13174572587013245, -0.44236430525779724, 0.09883229434490204, -0.30593976378440857, -0.14150509238243103, 0.17492516338825226, -0.17712783813476562, -0.08690261095762253, 0.250320166349411, 0.1665763258934021, -0.15933287143707275, -0.08787018805742264, 0.0841875821352005, 0.24464473128318787, 0.6247320771217346, 0.22989535331726074, -0.6264795660972595, 0.07589934766292572, 0.15468432009220123, -0.04753578081727028, 0.10620913654565811, -0.09966489672660828, 0.025580020621418953, 0.41093215346336365, -0.07424197345972061, -0.2628404200077057, -0.2066325545310974, 0.24791625142097473, 0.09211291372776031, -0.05275838449597359, 0.6166585087776184, -0.16699735820293427, -0.0735861137509346, 0.2651449739933014, 0.10807749629020691, -0.15079288184642792, 0.2166772335767746, -0.1668829470872879, 0.3541097939014435, -0.04775108024477959, 0.004200213588774204, -0.1646631509065628, -0.0965929850935936, 0.08652845770120621, 0.05198126286268234, 0.10383819043636322, -0.2703278958797455, 0.2899267375469208, 0.24557724595069885, 0.2856425642967224, 0.05972801893949509, 0.12611737847328186, -0.10842650383710861, -0.44260546565055847, 0.391929030418396, 0.35090821981430054, -0.12448526173830032, -0.06417504698038101, -0.005991969257593155, -0.09250820428133011, 0.10715648531913757, -0.10561271011829376, -0.1911780834197998, -0.24193958938121796, 0.2931978106498718, 0.07175808399915695, 0.2813778519630432, -0.0015516423154622316, -0.09768453985452652, -0.18781723082065582, 0.17447687685489655, -0.24198433756828308, 0.041607145220041275, -0.25969985127449036, -0.17730741202831268, -0.2635088860988617, -0.07081679254770279, 0.057466354221105576, -0.3950709402561188, -0.12415715306997299, -0.2460375279188156, 0.06400761008262634, 0.27768436074256897, -0.04571793973445892, 0.40097686648368835, 0.4703308939933777, -0.12691351771354675, 0.2192726880311966, 0.3190121650695801, -0.2036362886428833, -0.2075868546962738, -0.12638993561267853, 0.059733543545007706, -0.003454688936471939, -0.08284685760736465, -0.07269401848316193, -0.45866504311561584, 0.2137557566165924, -0.281690776348114, -0.0525500662624836, 0.07435981929302216, -0.03552199900150299, 0.5063039064407349, -0.26176247000694275, 0.25293391942977905, -0.11073929071426392, 0.41060692071914673, 0.4045543968677521, -0.20052720606327057, -0.12895958125591278, 0.01994660682976246, 0.07788906991481781, -0.2607972323894501, -0.03935857489705086, 0.33441027998924255, -0.26080551743507385, -0.14244498312473297, 0.27833622694015503, 0.05029657855629921, 0.16949278116226196, -0.5509199500083923, -0.31590744853019714, 0.05164024233818054, 0.2530951201915741, -0.15645578503608704, -0.028212567791342735, -0.22231118381023407, 0.28578412532806396, -0.2854258716106415, -0.20397880673408508, -0.13331519067287445, -0.032973602414131165, 0.021691694855690002, -0.699567973613739, -0.391333669424057, -0.01666734740138054, -0.15150931477546692, 0.5323095917701721, 0.08804898709058762, 0.025373956188559532, 0.027831822633743286, 0.0030352845788002014, -0.004420423414558172, -0.06637486070394516, -0.29886576533317566, 0.01681351102888584, 0.0403066910803318, 0.3351401388645172, -0.07346543669700623, 0.041379913687705994, -0.1678370237350464, 0.2677578032016754, 0.19053849577903748, 0.09431861340999603, 0.03248783200979233, -0.09370403736829758, 0.07331900298595428, 0.012670516967773438, -0.09742726385593414, -0.11528291553258896, -0.18589043617248535, -0.07310409098863602, 0.06310521811246872, 0.10631813108921051, 0.15936532616615295, 0.19336789846420288, 0.03479867801070213, -0.19471541047096252, -0.28610169887542725, -0.11827599257230759, -0.22992265224456787, -0.1167774572968483, 0.03353555127978325, 0.3312154710292816, -0.07197751849889755, -0.22324366867542267, -0.12265464663505554, 0.18327148258686066, 0.46867701411247253, 0.048677682876586914, 0.38242873549461365, -0.16219335794448853, -0.2085377424955368, -0.0009655270841903985, 0.14338333904743195, 0.030380088835954666, -0.06371958553791046, 0.010240854695439339, 0.21037541329860687, 0.19039711356163025, 0.18648599088191986, 0.03762741759419441, -0.13159509003162384, 0.48686206340789795, -0.1329537183046341, -0.5907802581787109, -0.4485071897506714, -0.0838370993733406, -0.0461810864508152, 0.4464481472969055, 0.20259329676628113, 0.12144603580236435, 0.1832033097743988, -0.16295963525772095, 0.16133858263492584, -0.4406794309616089, -0.40850135684013367, -0.5296401381492615, -0.07720793038606644, -0.12080959230661392, 0.10129337757825851, 0.022048672661185265, -0.28231021761894226, -0.3443129360675812, -0.443945050239563, 0.15103204548358917, -0.23436790704727173, -0.20386424660682678, 0.4826023578643799, 0.16186383366584778, -0.3691054880619049, 0.2843443751335144, 0.1946534514427185, 0.07034814357757568, 0.2092737853527069, -0.12134208530187607, 0.19559691846370697, 0.1174236312508583, 0.2129203826189041, -0.4535713791847229, -0.054235029965639114, -0.03272959217429161, -0.05404733866453171, 0.26967552304267883, -0.3494567573070526, 0.11181679368019104, -0.07139712572097778, -0.21714065968990326, 0.3293793499469757, -0.10247419774532318, 0.10406997054815292, 0.2512627840042114, 0.0664818063378334, -0.13879187405109406, -0.039267294108867645, 0.06480585783720016, -0.2958228290081024, 0.25026294589042664, -0.3924266993999481, 0.2538975477218628, 0.4127404987812042, -0.3073873519897461, -0.19855289161205292, 0.11352670937776566, -0.10084063559770584, 0.06740518659353256, 0.3842746615409851, 0.07691152393817902, -0.457905650138855, -0.13557523488998413, 0.08969846367835999, -0.19706469774246216, -0.07434628903865814, 0.014376062899827957, -0.26431804895401, 0.09203696995973587, -0.3580285608768463, -0.00035359576577320695, 0.14225710928440094, -0.18661187589168549, 0.4732816517353058, -0.09451908618211746, -0.2393086850643158, 0.16985972225666046, -0.17928898334503174, 0.31003713607788086, -0.07784216105937958, 0.032334938645362854, -0.2217235416173935, 0.25930604338645935, -0.32424506545066833, 0.194267138838768, 0.08688536286354065, 0.30652356147766113, 0.677950382232666, -0.2582504451274872, -0.4780561029911041, -0.13056965172290802, 0.09575438499450684, -0.029839174821972847, 0.04109217971563339, 0.10047847777605057, 0.2653997242450714, 0.12242832034826279, 0.04196440801024437, 0.23409602046012878, 0.11695186048746109, -0.26593005657196045, -0.32178130745887756, 0.23032443225383759, 0.016510574147105217, -0.400885671377182, -0.1908879578113556, 0.2124532163143158, 0.5923561453819275, 0.07727723568677902, 0.6071116328239441, -0.17086870968341827, 0.09386982023715973, -0.20454911887645721, 0.1392642855644226, 0.20389272272586823, -0.10192672908306122, 0.6167325973510742, -0.22411534190177917, -0.010504361242055893, -0.0011596459662541747, 0.015534436330199242, -0.10594286024570465, 0.24638791382312775, 0.13463914394378662, 0.25717514753341675, -0.27079030871391296, -0.04004444554448128, 0.39044511318206787, 0.02534232847392559, -0.036900270730257034, 0.4749499559402466, -0.22611159086227417, 0.28439635038375854, -0.30629822611808777, 0.20494741201400757, 0.3042430281639099, -0.15158605575561523, -0.4816412031650543, -0.1707334816455841, -0.5891591906547546, 0.08618087321519852, -0.051125865429639816, -0.17541563510894775, -0.06312253326177597, 0.5393027663230896, -0.034393951296806335, -0.11661192774772644, -0.22600774466991425, -0.0027781478129327297, -0.19653986394405365, 0.158802792429924, 0.3093070089817047, -0.1977652758359909, -0.3245774209499359, -0.17858409881591797, -0.0507262758910656, 0.07640164345502853, 0.05612754821777344, -0.1820082664489746, -0.2545240521430969, 0.08415006101131439, -0.007867802865803242, -0.2569124400615692, -0.04232712835073471, 0.18701475858688354, -0.01939293183386326, -0.06057069078087807, 0.17046602070331573, 0.010139450430870056, 0.09255313873291016, 0.2859082818031311, 0.07863909006118774, 0.1287001222372055, -0.13408105075359344, -0.08959431946277618, 0.10999404639005661, 0.5431040525436401, -0.03638302534818649, 0.1304314136505127, 0.21002764999866486, 0.20702692866325378, -0.009353697299957275, -0.0843576192855835, -0.3582529127597809, 0.2575761675834656, 0.3693300783634186, -0.27557599544525146, 0.19901317358016968, -0.34487584233283997, 0.279168963432312, 0.2967945635318756, -0.038264885544776917, -0.4296243190765381, 0.12471406906843185, 0.16032624244689941, -0.0035059319343417883, -0.14564768970012665, 0.15967358648777008, 0.3591037392616272, -0.06596817821264267, 0.23620881140232086, -0.1499636471271515, 0.052392322570085526, 0.14450448751449585, 0.06496723741292953, 0.004103598650544882, -0.15380795300006866, -0.2074182778596878, 0.3424954414367676, -0.03875688090920448, 0.2916080057621002, 0.2955342233181, -0.17970240116119385, -0.24894048273563385, -0.22901099920272827, 0.08828546851873398, -0.14182789623737335, 0.16462349891662598, -0.09159503132104874, 0.08868611603975296, 0.20833559334278107, -0.36145541071891785, -0.25039437413215637, -0.0059379455633461475, 0.011077817529439926, 0.0686565712094307, 0.1550806164741516, -0.16485190391540527, -0.22167593240737915, -0.378872811794281, 0.07779887318611145, -0.09324458241462708, 0.087435781955719, -0.17690740525722504, -0.020431073382496834, -0.09728061407804489, 0.06880753487348557, -0.1281936764717102, 0.397224485874176, 0.2002469152212143, -0.015865270048379898, 0.0069483364932239056, -0.34643736481666565, -0.20097161829471588, 0.10603851079940796, 0.2996792495250702, -0.0015274496981874108, -0.10863804072141647, 0.3010879158973694, 0.24251636862754822, -0.26983997225761414, 0.18075193464756012, 0.20704561471939087, 0.33082765340805054, -0.1841491162776947, -0.5122315883636475, -0.08719446510076523, 0.014796963892877102, 0.07656055688858032, 0.3983008563518524, 0.01044677384197712, -0.2393779754638672, 0.037204526364803314, 0.07162348926067352, -0.13995733857154846, 0.19813857972621918, 0.032379839569330215, 0.23989112675189972, 0.14454548060894012, 0.5007634162902832, -0.23234638571739197, -0.21111467480659485, 0.10010991245508194, -0.3531177341938019, -0.1419484168291092, 0.007519539445638657, 0.23857922852039337, -0.08022764325141907, -0.023847924545407295, -0.1415870040655136, 0.07907507568597794, -0.4065198600292206, 0.3623473048210144, 0.34102511405944824, 0.31756171584129333, -0.025495653972029686, -0.0492037758231163, -0.38452863693237305, 0.3794110417366028, -0.17815335094928741, -0.30135276913642883, 0.2541190981864929, 0.04331564903259277, -0.2651921212673187, 0.3701043426990509, 0.7036455869674683, -0.2908416986465454, -0.5082321166992188, -0.3333396911621094, -0.27697765827178955, 0.008610519580543041, 0.3501792550086975, -0.2469128519296646, -0.08904503285884857, -0.0982789471745491, 0.2765982747077942, -0.07497649639844894, 0.13203765451908112, 0.15401682257652283, -0.12428931146860123, 0.06883494555950165, 0.5911546349525452, 0.0691593810915947, 0.20646168291568756, 0.12132293730974197, 0.044296905398368835, -0.1319379359483719, 0.15083439648151398, -0.3454101085662842, -0.021868446841835976, 0.3271326422691345, -0.3355368971824646, 0.46079346537590027, 0.2721305787563324, -0.07497988641262054, -0.37106117606163025, 0.41329026222229004, 0.22086676955223083, -0.00489055598154664, -0.09036830812692642, -0.09348294138908386, 0.05116203427314758, -0.0792127326130867, -0.06527873128652573, 0.11650863289833069, -0.05069328099489212, 0.48007214069366455, -0.07640042155981064, -0.1664084792137146, 0.2783629596233368, -0.18382872641086578, -0.379891037940979, -0.12455853819847107, -0.021779345348477364, 0.07253627479076385, -0.009623677469789982, -0.044175900518894196, -0.3208204507827759, 0.22673185169696808, -0.14200706779956818, -0.2845942974090576, 0.12167702615261078, -0.15356367826461792, 0.07170531898736954, 0.04702802002429962, 0.13287262618541718, 0.11031155288219452, 0.014505644328892231, -0.1096889078617096, -0.09730951488018036 ]
https://github.com/huggingface/datasets/issues/2630
Progress bars are not properly rendered in Jupyter notebook
Hi @mludv, thanks for the hint!!! :) We will definitely take it into account to try to fix this issue... It seems somehow related to `multiprocessing` and `tqdm`...
## Describe the bug The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal). ## Steps to reproduce the bug ```python ds.map(tokenize, num_proc=10) ``` ## Expected results Jupyter widgets displaying the progress bars. ## Actual results Simple plane progress bars. cc: Reported by @thomwolf
28
Progress bars are not properly rendered in Jupyter notebook ## Describe the bug The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal). ## Steps to reproduce the bug ```python ds.map(tokenize, num_proc=10) ``` ## Expected results Jupyter widgets displaying the progress bars. ## Actual results Simple plane progress bars. cc: Reported by @thomwolf Hi @mludv, thanks for the hint!!! :) We will definitely take it into account to try to fix this issue... It seems somehow related to `multiprocessing` and `tqdm`...
[ 0.08407517522573471, -0.017447425052523613, -0.055343180894851685, 0.1467486023902893, 0.14180544018745422, -0.2826744616031647, 0.43655160069465637, 0.3081710934638977, -0.2813870906829834, 0.133517786860466, -0.1734684258699417, 0.495898574590683, 0.30211323499679565, 0.36064350605010986, -0.0934586226940155, -0.2819550633430481, -0.0838802307844162, 0.16409452259540558, -0.3097080588340759, -0.0013432380510494113, -0.3553541600704193, 0.22891131043434143, -0.3600176274776459, 0.27489811182022095, -0.3260473906993866, -0.01576915569603443, 0.006736823357641697, -0.03397630527615547, 0.20255418121814728, -0.3707713484764099, 0.06032117083668709, -0.08699747174978256, 0.1291181892156601, 0.4368247985839844, -0.00011342284415150061, -0.10874798148870468, 0.487566739320755, 0.041340071707963943, 0.03290089592337608, 0.28789806365966797, 0.4559457004070282, -0.4877922534942627, 0.28293490409851074, -0.285002201795578, 0.07106005400419235, -0.17946887016296387, -0.395491361618042, -0.04206109046936035, 0.40650707483291626, -0.15674066543579102, 0.247364342212677, 0.4405183494091034, -0.018232397735118866, 0.20767827332019806, 0.039110034704208374, -0.14612221717834473, -0.2083892673254013, -0.028221800923347473, 0.46539196372032166, -0.30636194348335266, -0.3879885971546173, 0.10639674961566925, -0.04864303022623062, 0.4187019169330597, -0.03938034549355507, 0.21330580115318298, 0.9913769364356995, -0.08786524832248688, -0.29442253708839417, 0.21150995790958405, 0.2394179105758667, -0.1059776321053505, -0.15123708546161652, -0.1202547624707222, -0.2735104560852051, -0.11603900790214539, -0.1966736763715744, -0.08610761910676956, -0.21048955619335175, 0.021473020315170288, -0.32548609375953674, 0.1474570780992508, 0.023079903796315193, 0.003932112827897072, -0.22272220253944397, 0.06387489289045334, -0.01642640493810177, -0.02541578933596611, -0.41520920395851135, 0.11075981706380844, 0.16869719326496124, -0.16471104323863983, 0.16627159714698792, -0.017423832789063454, -0.06687620282173157, 0.05144664645195007, 0.17058685421943665, -0.03947743773460388, -0.19512544572353363, -0.08938712626695633, -0.09344383329153061, 0.10656644403934479, -0.11095861345529556, 0.11761099100112915, 0.13802310824394226, 0.03638271242380142, 0.2670515179634094, -0.07379846274852753, 0.41574791073799133, 0.02656605653464794, 0.02622879110276699, 0.05105577036738396, 0.28245455026626587, -0.2843368649482727, 0.11908330768346786, 0.26966211199760437, -0.16990266740322113, -0.024019770324230194, -0.13256537914276123, 0.2839514911174774, 0.3845818340778351, -0.11722364276647568, 0.05010160803794861, -0.021200528368353844, -0.16043782234191895, 0.04589494317770004, 0.09822345525026321, 0.20161497592926025, -0.09388644248247147, -0.26942604780197144, -0.12792512774467468, -0.2795525789260864, -0.25952136516571045, 0.006324660032987595, -0.1258070170879364, 0.36092254519462585, 0.22342436015605927, 0.1400429904460907, -0.055691398680210114, -0.195827454328537, -0.041063275188207626, -0.05041031539440155, 0.10325370728969574, 0.24662405252456665, -0.0829610526561737, 0.1367761790752411, 0.2960919737815857, -0.29108723998069763, 0.12651659548282623, 0.4259045124053955, -0.03934408724308014, 0.03939320147037506, -0.3534792959690094, 0.08327910304069519, -0.31911495327949524, 0.3744325339794159, -0.45552822947502136, -0.22639824450016022, 0.39377400279045105, 0.07767263054847717, 0.09674569219350815, -0.41631314158439636, -0.017841042950749397, -0.178581103682518, 0.17323708534240723, 0.14559806883335114, -0.540677011013031, -0.3143545687198639, -0.09990977495908737, -0.14384157955646515, 0.6745647192001343, 0.33117547631263733, 0.06163860484957695, 0.31110069155693054, -0.03555194288492203, 0.180380180478096, -0.02994346432387829, -0.09980764240026474, -0.27030137181282043, -0.04463353380560875, 0.06868105381727219, 0.34340569376945496, -0.11681059002876282, -0.1047256588935852, 0.38793322443962097, 0.057167716324329376, 0.16054190695285797, 0.1995612531900406, 0.22495000064373016, -0.00405080197378993, -0.5000808238983154, 0.14725467562675476, 0.26135534048080444, 0.13687559962272644, 0.2515563666820526, -0.10519112646579742, -0.1100688949227333, -0.4471715986728668, 0.45485642552375793, 0.3896094858646393, 0.07356537133455276, -0.10861589014530182, -0.20651912689208984, 0.04866858944296837, 0.20959708094596863, 0.20037426054477692, 0.05015317350625992, 0.2725410759449005, -0.22282662987709045, -0.1505787968635559, 0.10816342383623123, 0.08416740596294403, -0.2802225947380066, 0.05745338648557663, -0.3637308180332184, -0.21233880519866943, 0.23035231232643127, -0.021492717787623405, -0.032437607645988464, 0.16090518236160278, 0.19288934767246246, -0.03816307708621025, 0.04494836553931236, -0.02412387542426586, 0.21771343052387238, 0.6586596369743347, 0.22010086476802826, -0.5620323419570923, 0.10056941956281662, 0.10981006175279617, -0.010012520477175713, 0.059966105967760086, -0.11675625294446945, 0.10554636269807816, 0.37067732214927673, -0.012616045773029327, -0.2862399220466614, -0.2531234323978424, 0.194124236702919, 0.1476227343082428, -0.11425415426492691, 0.5261477828025818, -0.058353766798973083, -0.12186504900455475, 0.3449290692806244, 0.08726175874471664, -0.1932428926229477, 0.35059699416160583, -0.13360874354839325, 0.2573172152042389, -0.014807294122874737, 0.01654629409313202, -0.054239001125097275, -0.14585214853286743, 0.13753391802310944, 0.03434785082936287, 0.055680762976408005, -0.26512596011161804, 0.33746203780174255, 0.2101249396800995, 0.271861732006073, 0.09492510557174683, 0.1694934368133545, -0.17086005210876465, -0.45238080620765686, 0.38700634241104126, 0.32884281873703003, -0.12609538435935974, 0.10764703899621964, 0.08871947973966599, -0.05569049343466759, 0.03883979469537735, 0.03462443873286247, -0.2729833126068115, -0.2650907039642334, 0.269073486328125, 0.28521281480789185, 0.34152188897132874, -0.05539536103606224, -0.1524229794740677, -0.08432268351316452, 0.1791529804468155, -0.26766371726989746, 0.06212218850851059, -0.15036450326442719, -0.2169017493724823, -0.28021040558815, -0.08143292367458344, 0.10667455941438675, -0.27983561158180237, -0.0973200872540474, -0.2014979124069214, -0.029456330463290215, 0.13565313816070557, 0.05480972304940224, 0.36021697521209717, 0.5633694529533386, -0.1225379928946495, 0.14015263319015503, 0.36741793155670166, -0.18481293320655823, -0.23125627636909485, -0.20940300822257996, 0.07960761338472366, 0.02186904288828373, -0.027025239542126656, -0.14524602890014648, -0.506624162197113, 0.26959893107414246, -0.29066962003707886, 0.04244549944996834, 0.05529696121811867, 0.0010296348482370377, 0.4239056706428528, -0.3118073642253876, 0.19143369793891907, -0.04860416427254677, 0.46846041083335876, 0.37796247005462646, -0.1273927390575409, -0.1681382805109024, 0.08221914619207382, 0.08497142791748047, -0.21326927840709686, -0.050414543598890305, 0.389836847782135, -0.3317185640335083, -0.10926513373851776, 0.23912319540977478, -0.029565751552581787, 0.19687645137310028, -0.7200559973716736, -0.2799723148345947, -0.02381826750934124, 0.29326868057250977, -0.06939591467380524, -0.10436204075813293, -0.13135874271392822, 0.2333751916885376, -0.28601372241973877, -0.2543163299560547, -0.23627813160419464, -0.05905590578913689, 0.031198637560009956, -0.6471827626228333, -0.412087082862854, -0.08593249320983887, -0.200436532497406, 0.3781543970108032, 0.03820537403225899, 0.17491450905799866, 0.1584654450416565, 0.0033086822368204594, -0.05387118086218834, -0.08494444191455841, -0.4036504030227661, 0.052433375269174576, -0.01696470007300377, 0.30148401856422424, -0.023009110242128372, -0.027072185650467873, -0.17107081413269043, 0.1382596343755722, 0.29923349618911743, 0.07538469135761261, 0.15747664868831635, -0.05222112685441971, -0.014151740819215775, 0.10126983374357224, -0.07672807574272156, -0.1693759262561798, -0.19423165917396545, 0.0478082112967968, 0.12274286895990372, 0.08464717864990234, 0.06527592241764069, 0.138936847448349, -0.013385345228016376, -0.3803446292877197, -0.17876197397708893, -0.15538562834262848, -0.1738337129354477, -0.084816113114357, 0.006455885712057352, 0.28199025988578796, -0.01142031792551279, -0.20941628515720367, -0.10500198602676392, 0.18780121207237244, 0.34503373503685, -0.02185557410120964, 0.43832871317863464, -0.22924019396305084, -0.1616394966840744, 0.16739755868911743, 0.17129144072532654, -0.0219537653028965, 0.053442686796188354, 0.07230418175458908, 0.16861288249492645, 0.11266706883907318, 0.3454289138317108, -0.13131599128246307, -0.10814157128334045, 0.4399823248386383, -0.19327673316001892, -0.5599927306175232, -0.5287843346595764, -0.13888145983219147, -0.027113817632198334, 0.30232077836990356, 0.32387596368789673, 0.17046275734901428, 0.1294383853673935, -0.3058634400367737, 0.13421912491321564, -0.4507175087928772, -0.5005689859390259, -0.5428310632705688, -0.03203776106238365, -0.009937375783920288, -0.027590228244662285, -0.09849686920642853, -0.10001075267791748, -0.30135926604270935, -0.46530500054359436, 0.1186719760298729, -0.2689270079135895, -0.14942891895771027, 0.4330701231956482, 0.15918497741222382, -0.22847266495227814, 0.17996187508106232, 0.15873156487941742, 0.22333866357803345, 0.13992451131343842, -0.1881381869316101, 0.001787938759662211, 0.21733301877975464, 0.25869321823120117, -0.47339797019958496, 0.04239870235323906, -0.08063698559999466, -0.11619539558887482, 0.27046310901641846, -0.46032199263572693, 0.2149655520915985, -0.15701742470264435, -0.26892390847206116, 0.3414733111858368, -0.04832139611244202, 0.013210752047598362, 0.20803362131118774, 0.12329421937465668, 0.005004660692065954, -0.11371836811304092, -0.06892089545726776, -0.2857617735862732, 0.2130228728055954, -0.3701867163181305, 0.22927141189575195, 0.33129027485847473, -0.38058707118034363, -0.17504142224788666, -0.068091481924057, -0.22689050436019897, 0.11773844808340073, 0.3030438721179962, 0.062466856092214584, -0.3827464282512665, -0.2603965401649475, 0.08250349014997482, -0.2630773186683655, -0.025888392701745033, -0.0040114447474479675, -0.27647948265075684, 0.20610158145427704, -0.42027953267097473, -0.04117205739021301, 0.13082578778266907, -0.13842415809631348, 0.6062145829200745, -0.1045558974146843, -0.13994956016540527, 0.16358371078968048, -0.27625399827957153, 0.33117666840553284, -0.12989118695259094, 0.06651098281145096, -0.15402783453464508, 0.25299951434135437, -0.33406582474708557, 0.16219930350780487, 0.04697107896208763, 0.3277939558029175, 0.5213470458984375, -0.24674353003501892, -0.4642070531845093, 0.1279604583978653, 0.1828424036502838, -0.0753350555896759, 0.08023148775100708, 0.02823241800069809, 0.10759922116994858, 0.15364325046539307, -0.015218950808048248, 0.20356251299381256, 0.06593745201826096, -0.3426288664340973, -0.36088827252388, 0.2768600881099701, 0.05447394400835037, -0.33982372283935547, -0.15800823271274567, 0.2512803375720978, 0.5153221487998962, 0.16597607731819153, 0.5921127796173096, -0.0823669284582138, 0.22006401419639587, -0.23100750148296356, 0.16854850947856903, 0.21387481689453125, -0.21187818050384521, 0.750804603099823, -0.20676857233047485, -0.021772339940071106, 0.04264508932828903, 0.02634969912469387, 0.07040726393461227, 0.12680232524871826, 0.06716248393058777, 0.341251403093338, -0.25475791096687317, -0.09635449200868607, 0.2661043107509613, 0.12765640020370483, 0.011672657914459705, 0.4833356440067291, -0.22200430929660797, 0.2646156847476959, -0.22588837146759033, 0.3405119776725769, 0.29064956307411194, -0.009998953901231289, -0.42938387393951416, -0.24618321657180786, -0.5078001022338867, 0.05476602911949158, 0.0729145035147667, -0.19931942224502563, -0.10203867405653, 0.4341854751110077, 0.00943213514983654, 0.1235911175608635, -0.2600489556789398, 0.048248324543237686, -0.2103755623102188, 0.14167064428329468, 0.2156025618314743, -0.12739591300487518, -0.387432724237442, -0.10207362473011017, 0.011141742579638958, 0.02948826551437378, -0.02499261125922203, -0.2505483329296112, -0.23735816776752472, 0.059054747223854065, -0.06183875724673271, -0.11896467208862305, 0.08297547698020935, 0.1766028255224228, -0.013700523413717747, -0.050327785313129425, 0.18991848826408386, 0.007065972313284874, 0.042771752923727036, 0.34889930486679077, 0.13461142778396606, 0.11654166132211685, -0.15153342485427856, -0.06056889891624451, -0.005983027163892984, 0.5434561371803284, -0.0660189613699913, 0.10436465591192245, 0.3075921833515167, 0.16127978265285492, 0.04893459379673004, -0.23278023302555084, -0.31881076097488403, 0.27742332220077515, 0.2623285949230194, -0.3050256371498108, 0.23511703312397003, -0.3422240614891052, 0.33263900876045227, 0.1437486857175827, -0.033861517906188965, -0.27242258191108704, 0.13753782212734222, 0.20360444486141205, -0.06833570450544357, -0.20919862389564514, 0.20824474096298218, 0.346147358417511, -0.008188094012439251, 0.31943562626838684, -0.1421831101179123, 0.04629073292016983, 0.10240841656923294, 0.02409457042813301, -0.06754403561353683, 0.009102166630327702, -0.2059788852930069, 0.3505125045776367, 0.06566379219293594, 0.2744106948375702, 0.2748161852359772, -0.05932098254561424, -0.3289279341697693, -0.17680203914642334, 0.11064191162586212, -0.043498747050762177, 0.07476606220006943, -0.09425129741430283, 0.03316285461187363, 0.15543323755264282, -0.17413374781608582, -0.12453415244817734, -0.07198280096054077, -0.01839507184922695, -0.06288975477218628, 0.22632554173469543, -0.16796715557575226, -0.26154258847236633, -0.32795363664627075, 0.0831792801618576, -0.0947098657488823, -0.021625986322760582, -0.076775923371315, -0.09712156653404236, -0.08497476577758789, 0.07932139188051224, -0.10627911984920502, 0.3211347460746765, 0.31224244832992554, -0.02797052450478077, -0.009963572025299072, -0.1597609519958496, -0.26347893476486206, 0.1258372664451599, 0.31412795186042786, 0.0011355092283338308, -0.1765209585428238, 0.2330845594406128, 0.23905082046985626, -0.3890819847583771, 0.2103191465139389, 0.15970057249069214, 0.3547722399234772, -0.2991584241390228, -0.5115679502487183, 0.0465826615691185, 0.043171342462301254, 0.074561707675457, 0.35777202248573303, 0.14260409772396088, -0.2597830295562744, 0.052216216921806335, 0.07832460850477219, -0.1751222163438797, 0.28208205103874207, 0.07682410627603531, 0.3440590798854828, 0.12528978288173676, 0.44952425360679626, -0.2704700231552124, -0.15200726687908173, 0.10305474698543549, -0.25616487860679626, -0.2923440635204315, 0.04721592366695404, 0.20220282673835754, -0.14733752608299255, -0.03489798679947853, -0.1349247843027115, 0.10294200479984283, -0.3961712121963501, 0.3771844506263733, 0.2636163830757141, 0.41156649589538574, -0.1070389598608017, -0.19586129486560822, -0.3908257484436035, 0.338875412940979, -0.13048560917377472, -0.24756717681884766, 0.12631407380104065, 0.13020914793014526, -0.22924989461898804, 0.3551635444164276, 0.770339846611023, -0.18490184843540192, -0.42582109570503235, -0.14957080781459808, -0.4036410450935364, 0.033561624586582184, 0.31737807393074036, -0.2314186841249466, -0.043362099677324295, -0.07006971538066864, 0.24275438487529755, -0.053934935480356216, 0.21548046171665192, 0.053141865879297256, -0.005942231975495815, 0.05825928598642349, 0.3602851331233978, 0.18918216228485107, 0.11749842017889023, 0.026010999456048012, 0.014779679477214813, -0.08302745968103409, 0.3153703510761261, -0.11409445106983185, 0.14646413922309875, 0.25889158248901367, -0.2921167314052582, 0.35840126872062683, 0.13578617572784424, 0.13040615618228912, -0.3719019889831543, 0.3412763476371765, 0.27343830466270447, 0.10593577474355698, -0.12067584693431854, -0.06708285212516785, 0.23115821182727814, -0.19749529659748077, 0.03510509803891182, 0.10295277833938599, -0.12112446874380112, 0.34088563919067383, -0.11126399040222168, -0.09854082018136978, 0.26667872071266174, -0.17123106122016907, -0.41608190536499023, -0.15713538229465485, -0.042910635471343994, 0.0663784071803093, 0.04792041331529617, -0.06479440629482269, -0.30531248450279236, 0.23956240713596344, -0.05822513997554779, -0.3515852391719818, 0.14495927095413208, -0.3256435692310333, 0.026567136868834496, 0.06825271993875504, -0.035690054297447205, 0.13990913331508636, -0.0035143098793923855, -0.18547604978084564, -0.18223513662815094 ]
https://github.com/huggingface/datasets/issues/2629
Load datasets from the Hub without requiring a dataset script
This is so cool, let us know if we can help with anything on the hub side (@Pierrci @elishowk) 🎉
As a user I would like to be able to upload my csv/json/text/parquet/etc. files in a dataset repository on the Hugging Face Hub and be able to load this dataset with `load_dataset` without having to implement a dataset script. Moreover I would like to be able to specify which file goes into which split using the `data_files` argument. This feature should be compatible with private repositories and dataset streaming. This can be implemented by checking the extension of the files in the dataset repository and then by using the right dataset builder that is already packaged in the library (csv/json/text/parquet/etc.)
20
Load datasets from the Hub without requiring a dataset script As a user I would like to be able to upload my csv/json/text/parquet/etc. files in a dataset repository on the Hugging Face Hub and be able to load this dataset with `load_dataset` without having to implement a dataset script. Moreover I would like to be able to specify which file goes into which split using the `data_files` argument. This feature should be compatible with private repositories and dataset streaming. This can be implemented by checking the extension of the files in the dataset repository and then by using the right dataset builder that is already packaged in the library (csv/json/text/parquet/etc.) This is so cool, let us know if we can help with anything on the hub side (@Pierrci @elishowk) 🎉
[ -0.45757561922073364, -0.04470089450478554, -0.04213665425777435, 0.1991642862558365, -0.12621942162513733, 0.16351664066314697, 0.37726446986198425, 0.17870429158210754, 0.413285493850708, 0.13889150321483612, -0.23918093740940094, 0.3387719392776489, -0.0637953132390976, 0.5494143962860107, 0.2678030729293823, 0.17318828403949738, 0.13554005324840546, 0.3373374342918396, 0.01566777005791664, 0.1087152287364006, -0.14726687967777252, -0.028141435235738754, 0.05096590146422386, -0.3055994510650635, -0.4166122078895569, 0.13375316560268402, -0.05747557431459427, 0.5216121077537537, -0.2011023461818695, -0.21193677186965942, 0.40056312084198, 0.5012661218643188, 0.250264436006546, 0.18418225646018982, -0.00012120539031457156, 0.04340927302837372, 0.19280706346035004, -0.14684955775737762, -0.30164629220962524, -0.15394611656665802, -0.29934635758399963, 0.023187628015875816, 0.285573810338974, -0.10106346011161804, -0.08238060772418976, 0.20935986936092377, 0.15716281533241272, -0.12919513881206512, 0.36773979663848877, 0.09762228280305862, 0.016619374975562096, 0.29998186230659485, -0.2592339813709259, -0.33838778734207153, 0.10609643906354904, 0.5227715969085693, -0.0501803494989872, 0.07536577433347702, 0.44667109847068787, 0.1501268595457077, -0.2684880197048187, -0.06160113960504532, -0.051112301647663116, -0.13064095377922058, 0.6978548765182495, 0.0141169847920537, -0.41393837332725525, -0.33698800206184387, -0.05588553473353386, 0.2696106433868408, 0.4849347770214081, -0.2226598560810089, -0.18848223984241486, -0.5040723085403442, -0.10108975321054459, -0.02311152033507824, 0.11610855162143707, 0.3829919993877411, -0.07452342659235, 0.3300856649875641, -0.19432467222213745, -0.4995049834251404, -0.2894495725631714, -0.03941620513796806, 0.08703380078077316, 0.051034484058618546, 0.08335420489311218, -0.1139841377735138, 0.20593015849590302, 0.0716911032795906, 0.3125399351119995, -0.1525992453098297, -0.19977031648159027, 0.18415874242782593, -0.2591176927089691, -0.15117110311985016, -0.19092898070812225, 0.35444188117980957, 0.2726558446884155, 0.47769656777381897, 0.03135035187005997, 0.2450515776872635, -0.4523226320743561, 0.05961189046502113, 0.3471123278141022, -0.0049100895412266254, 0.12107297778129578, 0.054896529763936996, 0.31359463930130005, 0.2362888604402542, 0.3534661531448364, -0.019690316170454025, -0.19496595859527588, 0.080654077231884, -0.4910585284233093, -0.17289018630981445, 0.17837220430374146, -0.08503604680299759, -0.0836666002869606, -0.3461418151855469, 0.539661705493927, 0.05282094329595566, 0.22990365326404572, 0.2829741835594177, 0.13641750812530518, 0.12909989058971405, -0.261796236038208, 0.18942469358444214, -0.11748956888914108, -0.29593804478645325, -0.10570520907640457, 0.13449744880199432, 0.10334012657403946, 0.26941633224487305, 0.3688506484031677, -0.3593105375766754, 0.1102583259344101, 0.006927717477083206, 0.44229328632354736, 0.04374824836850166, -0.0864407941699028, -0.013061714358627796, 0.016318000853061676, 0.1432938128709793, 0.374880313873291, -0.053597863763570786, -0.02281600795686245, -0.2377946376800537, -0.3192484676837921, 0.06258803606033325, -0.4418228566646576, -0.5183888077735901, -0.05697479471564293, 0.012152517214417458, -0.4268386662006378, 0.028067082166671753, -0.6266533732414246, 0.06050065532326698, -0.39988070726394653, -0.041664570569992065, -0.07952415943145752, 0.21163111925125122, -0.01238444447517395, -0.03998763859272003, 0.13209329545497894, 0.5962693691253662, -0.2625654935836792, -0.11461834609508514, -0.05672554299235344, -0.2146860510110855, -0.328630268573761, -0.044976767152547836, -0.17426352202892303, 0.1860436052083969, -0.22782336175441742, 0.30332186818122864, 0.44986218214035034, -0.5796933770179749, -0.2853993773460388, 0.0064893425442278385, -0.1179378405213356, 0.07326487451791763, 0.1743251383304596, 0.37714630365371704, 0.39571309089660645, -0.12965452671051025, -0.13182777166366577, 0.5260868072509766, 0.0008256399887613952, 0.09094011783599854, 0.1459447741508484, -0.5183839797973633, -0.15791603922843933, 0.4319949448108673, 0.12436467409133911, 0.030488064512610435, 0.311540812253952, 0.201321542263031, 0.13874877989292145, -0.2980286777019501, 0.1430208534002304, -0.10111639648675919, 0.025428904220461845, 0.04013260453939438, -0.06843305379152298, -0.054852548986673355, -0.6891094446182251, 0.31631436944007874, 0.09649671614170074, -0.002036670921370387, -0.024445367977023125, -0.37102678418159485, -0.11712248623371124, -0.18989717960357666, -0.2818382978439331, 0.06346459686756134, -0.09096136689186096, -0.08301490545272827, 0.03504288196563721, -0.1356612741947174, -0.5921105742454529, 0.6018565893173218, -0.014923950657248497, 0.19606155157089233, -0.653113067150116, 0.4063933789730072, 0.3386700451374054, -0.015375888906419277, 0.21685345470905304, -0.02859005145728588, 0.12458254396915436, -0.12215165793895721, 0.11262600123882294, 0.2599676549434662, 0.12577350437641144, 0.6147466897964478, 0.2605297863483429, 0.17029571533203125, 0.1483873724937439, -0.05835208669304848, 0.21409326791763306, -0.34898239374160767, 0.012365498580038548, -0.13904942572116852, -0.37196749448776245, 0.3414108455181122, -0.4983014762401581, 0.11907688528299332, 0.07015787810087204, -0.020437564700841904, 0.005231119692325592, -0.04684792831540108, -0.18611174821853638, -0.1877375841140747, -0.04552078992128372, 0.10429488867521286, 0.1593877673149109, 0.043911971151828766, 0.021955005824565887, 0.021888479590415955, 0.40208733081817627, -0.08207762241363525, 0.051095765084028244, 0.17456912994384766, -0.15870827436447144, -0.03679121658205986, 0.18825480341911316, 0.060035720467567444, 0.2340116798877716, 0.15282052755355835, -0.0666547641158104, 0.2553102374076843, 0.391765832901001, -0.2559645473957062, -0.006317461375147104, -0.03884271904826164, 0.004693750757724047, 0.11488797515630722, -0.11439065635204315, -0.14909067749977112, -0.3427887260913849, -0.0038195045199245214, -0.056647323071956635, -0.11972381174564362, -0.20247507095336914, -0.19745509326457977, -0.18856236338615417, 0.04416679963469505, 0.10861380398273468, -0.13905072212219238, -0.22801175713539124, -0.04748991131782532, 0.11320599913597107, 0.2926144301891327, 0.13568264245986938, -0.18085172772407532, 0.10218740254640579, 0.8752858638763428, -0.2077581286430359, -0.42603787779808044, -0.2744225263595581, -0.005218026228249073, 0.21125835180282593, -0.035764873027801514, 0.2536875307559967, 0.39428848028182983, 0.21860650181770325, -0.27567440271377563, 0.20061969757080078, -0.3470381200313568, 0.17975184321403503, 0.19693942368030548, 0.0370653010904789, 0.028682328760623932, 0.11388550698757172, 0.07888682186603546, 0.22085215151309967, -0.0224464051425457, -0.13174915313720703, -0.09864463657140732, -0.060006190091371536, -0.19490449130535126, 0.08396383374929428, -0.0586363784968853, -0.14587299525737762, -0.12070613354444504, -0.3679882287979126, -0.45633307099342346, 0.3621259927749634, 0.3808915615081787, 0.027583898976445198, -0.2261141538619995, -0.09481953829526901, -0.012829005718231201, -0.16839316487312317, -0.29920971393585205, 0.04538923501968384, -0.5231454968452454, 0.40552958846092224, -0.34157076478004456, -0.21065571904182434, 0.2707831859588623, 0.06096610054373741, 0.1544737070798874, 0.053941722959280014, -0.3392733335494995, -0.24300403892993927, 0.053230732679367065, 0.08949287980794907, 0.03982752189040184, 0.06509078294038773, 0.28320473432540894, -0.11025690287351608, 0.22099493443965912, -0.062017958611249924, -0.07308194041252136, 0.088278628885746, 0.29285505414009094, -0.35064831376075745, 0.18580381572246552, -0.12052467465400696, -0.11982942372560501, 0.5136723518371582, 0.27915990352630615, 0.25122618675231934, 0.19403217732906342, -0.01873798854649067, 0.38763558864593506, -0.3456958532333374, 0.0017482390394434333, -0.18304474651813507, 0.038366202265024185, -0.045129820704460144, 0.4778504967689514, 0.2628040611743927, 0.12167396396398544, -0.35915201902389526, -0.43063780665397644, 0.028819888830184937, -0.19772976636886597, 0.07834130525588989, -0.011111384257674217, -0.010418279096484184, -0.16705822944641113, 0.020523367449641228, -0.1251320093870163, -0.28141260147094727, 0.03260219842195511, 0.38200902938842773, 0.3374103903770447, 0.1487734019756317, -0.19223807752132416, 0.09197299927473068, -0.2916882038116455, 0.22298021614551544, -0.02347642555832863, -0.32739782333374023, 0.014420966617763042, 0.02606048248708248, 0.04344380274415016, -0.07840588688850403, 0.5525977611541748, -0.07682311534881592, -0.025626255199313164, -0.2390153557062149, -0.22094419598579407, -0.1558263897895813, 0.09949970245361328, 0.13804957270622253, 0.013220486231148243, -0.4880357086658478, 0.7941616773605347, -0.09951566159725189, -0.3218314051628113, 0.05241744965314865, -0.08582810312509537, -0.1860133707523346, -0.10606836527585983, 0.11036605387926102, -0.07856312394142151, -0.464136004447937, -0.262374609708786, 0.09455905109643936, -0.10300647467374802, -0.2374693900346756, -0.13504859805107117, -0.06299052387475967, 0.13107803463935852, 0.19001999497413635, 0.17378629744052887, 0.25422272086143494, 0.05782848969101906, -0.13125193119049072, 0.4289524257183075, 0.05919957906007767, 0.2980826199054718, 0.678212583065033, 0.13967393338680267, -0.4402041435241699, 0.01349569484591484, -0.20106378197669983, 0.2921779155731201, 0.5223492383956909, 0.0938643366098404, 0.05640769749879837, 0.05856773257255554, 0.03623790293931961, -0.5819573998451233, 0.14771197736263275, -0.03819512948393822, -0.2752722203731537, -0.4304090440273285, -0.45107799768447876, 0.62265545129776, -0.06891853362321854, 0.06402603536844254, -0.1069796159863472, 0.40301835536956787, -0.3770483136177063, 0.12314289808273315, 0.0702424943447113, 0.898232638835907, -0.0711546540260315, 0.297628253698349, 0.036032065749168396, -0.06406240910291672, 0.3835209608078003, -0.6910938024520874, -0.005356162320822477, -0.3164271414279938, -0.18754291534423828, -0.35198208689689636, -0.024089397862553596, 0.16820108890533447, 0.22230477631092072, -0.21350674331188202, 0.3743102252483368, 0.05772075802087784, 0.4703814387321472, -0.044575631618499756, 0.4272410273551941, -0.3970296382904053, -0.5239440202713013, -0.1813056915998459, 0.021659888327121735, 0.026245471090078354, -0.021381720900535583, -0.0455973856151104, -0.14370284974575043, 0.002061068546026945, -0.10980150103569031, -0.007788406684994698, 0.14023788273334503, 0.21435612440109253, -0.21979832649230957, 0.00663631409406662, -0.014439753256738186, 0.3113357722759247, 0.35827019810676575, 0.2158791869878769, 0.030009057372808456, -0.3226814866065979, 0.23041431605815887, -0.21720252931118011, -0.015741538256406784, -0.13946518301963806, -0.02728741243481636, 0.2691299319267273, 0.05466236546635628, -0.11568286269903183, -0.04985449090600014, -0.04645857214927673, -0.39974135160446167, -0.19418218731880188, 0.11445466428995132, 0.1813284307718277, -0.2519477605819702, -0.13601036369800568, 0.012785512953996658, 0.06616385281085968, 0.05368143692612648, -0.030336802825331688, 0.03368591144680977, 0.031387876719236374, -0.00999110471457243, 0.1384609490633011, -0.10356546193361282, -0.08631757646799088, 0.13031917810440063, -0.2854100465774536, -0.3250836431980133, 0.08191689848899841, -0.06309329718351364, -0.094814732670784, -0.16717174649238586, 0.19665679335594177, 0.43027475476264954, -0.39182963967323303, 0.114845871925354, 0.037011515349149704, -0.039054132997989655, 0.003885097336024046, 0.032310836017131805, -0.03909771516919136, -0.1722213178873062, -0.1630106121301651, -0.2594659924507141, -0.05826311931014061, 0.24057124555110931, 0.024961212649941444, 0.31251147389411926, 0.2753748297691345, -0.3476412296295166, -0.21384523808956146, -0.08161169290542603, -0.16379068791866302, 0.16816839575767517, -0.06791719794273376, 0.03381471335887909, -0.026005981490015984, 0.16277863085269928, 0.03510480374097824, -0.2060481458902359, -0.10871816426515579, -0.004719310440123081, -0.3626045882701874, -0.027424195781350136, -0.08532107621431351, 0.23919105529785156, 0.0578092522919178, 0.12776480615139008, -0.16292491555213928, -0.1107509583234787, -0.21453334391117096, -0.3260589838027954, 0.5787269473075867, 0.046480730175971985, -0.009024019353091717, -0.1731228232383728, 0.579799234867096, 0.06452289968729019, -0.3917689919471741, 0.36771562695503235, 0.2882388234138489, 0.4936090111732483, -0.18939468264579773, 0.1349031776189804, -0.3057219088077545, 0.060380060225725174, 0.3331649601459503, 0.6284928917884827, 0.9139981865882874, 0.12127956002950668, 0.25866907835006714, -0.1242346242070198, 0.12032737582921982, -0.028456062078475952, 0.26342132687568665, 0.11792393773794174, -0.14737005531787872, 0.14693444967269897, 0.13268619775772095, -0.0013377288123592734, 0.003538103774189949, -0.10916632413864136, 0.4651370942592621, -0.21636392176151276, 0.08972726762294769, 0.4169335663318634, 0.35716885328292847, 0.10197203606367111, -0.22885893285274506, 0.04790446162223816, 0.616888165473938, 0.17624402046203613, 0.33694466948509216, 0.4259215295314789, -0.18104234337806702, 0.09982490539550781, -0.0017924719722941518, 0.22263981401920319, 0.05346479266881943, 0.4730299711227417, -0.3988973796367645, 0.36296120285987854, 0.22247469425201416, 0.13492938876152039, 0.3365786373615265, -0.3683716356754303, -0.2057875245809555, -0.017030484974384308, 0.23256854712963104, 0.09599518030881882, -0.07590559124946594, 0.34783676266670227, -0.17018215358257294, -0.04748157411813736, -0.4018285870552063, 0.0004569093871396035, 0.06256868690252304, 0.13173604011535645, 0.013912184163928032, -0.21970655024051666, -0.28365978598594666, 0.2622634470462799, -0.08788957446813583, -0.3314152956008911, -0.1918560117483139, 0.16858458518981934, 0.264477401971817, 0.23472222685813904, 0.37269872426986694, -0.010806773789227009, 0.03640340268611908, -0.07333144545555115, 0.0056838090531528, -0.07891695946455002, 0.12618903815746307, 0.47383949160575867, 0.06578083336353302, -0.09595165401697159, 0.1417226642370224, 0.020356686785817146, 0.20796364545822144, 0.10001995414495468, -0.0975630134344101, 0.10166739672422409, -0.07910832017660141, -0.1497848778963089, 0.3356241285800934, 0.01418209820985794, 0.08485680818557739, -0.030818097293376923, -0.025423377752304077, -0.16912595927715302, 0.06878039985895157, -0.39324063062667847, 0.3734215199947357, 0.1371650993824005, -0.025304703041911125, -0.0013592728646472096, -0.03185532987117767, -0.1749776303768158, -0.28128549456596375, 0.4291781187057495, -0.07159817963838577, 0.11567287892103195, 0.127126544713974, -0.0008259365567937493, -0.023229651153087616, 0.45806312561035156, 0.10401016473770142, -0.06655372679233551, 0.02904018945991993, -0.15844674408435822, -0.3442610800266266, -0.04805871471762657, 0.15532588958740234, -0.062034234404563904, 0.01657264120876789, -0.08754682540893555, 0.1618356704711914, 0.24785475432872772, 0.01798068732023239, -0.2271556854248047, 0.22940364480018616, 0.027110591530799866, -0.06810910999774933, -0.04274533689022064, 0.12311302870512009, 0.11129013448953629, -0.12107338011264801, -0.27701181173324585, 0.03647985681891441, 0.19023673236370087, -0.269802451133728, 0.2569992244243622, 0.2185705155134201, 0.20786650478839874, -0.47659701108932495, 0.2123613804578781, -0.2095571756362915, 0.21986420452594757, -0.031543929129838943, 0.18969285488128662, -0.29961851239204407, -0.04613656550645828, -0.3355700671672821, -0.07559338212013245, -0.17488594353199005, 0.21646857261657715, -0.24238833785057068, -0.013368691317737103, -0.30652979016304016, -0.030206117779016495, -0.03573864698410034, 0.13948732614517212, -0.20004278421401978, -0.08810006082057953, -0.39696204662323, 0.16549821197986603, 0.26738855242729187, 0.10681243240833282, -0.1092737689614296, -0.17768719792366028, -0.08374180644750595, 0.048965632915496826, 0.4212641417980194, -0.22802051901817322, -0.24503321945667267, 0.0018892934313043952, -0.05273975431919098, 0.18599258363246918, -0.10280594974756241, -0.1450480818748474, 0.1127401739358902, 0.06363601237535477, -0.17261457443237305, 0.16220568120479584, 0.24996595084667206, 0.1666973978281021, -0.15021434426307678, -0.20822958648204803, -0.2506300210952759, 0.3272823691368103, -0.1672692745923996, -0.10961063206195831, -0.43482810258865356 ]
https://github.com/huggingface/datasets/issues/2622
Integration with AugLy
Hi, you can define your own custom formatting with `Dataset.set_transform()` and then run the tokenizer with the batches of augmented data as follows: ```python dset = load_dataset("imdb", split="train") # Let's say we are working with the IMDB dataset dset.set_transform(lambda ex: {"text": augly_text_augmentation(ex["text"])}, columns="text", output_all_columns=True) dataloader = torch.utils.data.DataLoader(dset, batch_size=32) for epoch in range(5): for batch in dataloader: tokenizer_output = tokenizer(batch.pop("text"), padding=True, truncation=True, return_tensors="pt") batch.update(tokenizer_output) output = model(**batch) ... ```
**Is your feature request related to a problem? Please describe.** Facebook recently launched a library, [AugLy](https://github.com/facebookresearch/AugLy) , that has a unified API for augmentations for image, video and text. It would be pretty exciting to have it hooked up to HF libraries so that we can make NLP models robust to misspellings or to punctuation, or emojis etc. Plus, with Transformers supporting more CV use cases, having augmentations support becomes crucial. **Describe the solution you'd like** The biggest difference between augmentations and preprocessing is that preprocessing happens only once, but you are running augmentations once per epoch. AugLy operates on text directly, so this breaks the typical workflow where we would run the tokenizer once, set format to pt tensors and be ready for the Dataloader. **Describe alternatives you've considered** One possible way of implementing these is to make a custom Dataset class where getitem(i) runs the augmentation and the tokenizer every time, though this would slow training down considerably given we wouldn't even run the tokenizer in batches.
68
Integration with AugLy **Is your feature request related to a problem? Please describe.** Facebook recently launched a library, [AugLy](https://github.com/facebookresearch/AugLy) , that has a unified API for augmentations for image, video and text. It would be pretty exciting to have it hooked up to HF libraries so that we can make NLP models robust to misspellings or to punctuation, or emojis etc. Plus, with Transformers supporting more CV use cases, having augmentations support becomes crucial. **Describe the solution you'd like** The biggest difference between augmentations and preprocessing is that preprocessing happens only once, but you are running augmentations once per epoch. AugLy operates on text directly, so this breaks the typical workflow where we would run the tokenizer once, set format to pt tensors and be ready for the Dataloader. **Describe alternatives you've considered** One possible way of implementing these is to make a custom Dataset class where getitem(i) runs the augmentation and the tokenizer every time, though this would slow training down considerably given we wouldn't even run the tokenizer in batches. Hi, you can define your own custom formatting with `Dataset.set_transform()` and then run the tokenizer with the batches of augmented data as follows: ```python dset = load_dataset("imdb", split="train") # Let's say we are working with the IMDB dataset dset.set_transform(lambda ex: {"text": augly_text_augmentation(ex["text"])}, columns="text", output_all_columns=True) dataloader = torch.utils.data.DataLoader(dset, batch_size=32) for epoch in range(5): for batch in dataloader: tokenizer_output = tokenizer(batch.pop("text"), padding=True, truncation=True, return_tensors="pt") batch.update(tokenizer_output) output = model(**batch) ... ```
[ -0.1749233603477478, -0.19208082556724548, -0.1434520184993744, -0.23967842757701874, 0.19126343727111816, 0.026355573907494545, 0.16739149391651154, 0.3273123502731323, -0.3234902620315552, 0.016006890684366226, 0.04472559690475464, -0.017034923657774925, -0.26089558005332947, 0.11050020158290863, -0.0723290741443634, -0.12908244132995605, 0.16238585114479065, 0.1287829726934433, 0.08359586447477341, -0.06145158037543297, 0.24582426249980927, -0.08019420504570007, -0.12166842818260193, 0.0804530531167984, -0.43312084674835205, -0.20052942633628845, -0.018463440239429474, -0.11914179474115372, 0.03238729014992714, -0.05491906404495239, -0.2768344581127167, 0.29288211464881897, 0.13945354521274567, 0.28613170981407166, -0.00010948608542094007, -0.22785800695419312, -0.045783963054418564, -0.13730274140834808, -0.3240188956260681, -0.03704705461859703, 0.8906265497207642, -0.42605453729629517, 0.018437419086694717, -0.19566717743873596, -0.2086929827928543, -0.24436143040657043, 0.22595526278018951, -0.10258474946022034, 0.7065519094467163, -0.1400633454322815, 0.17467951774597168, 0.1642664521932602, -0.1695447862148285, 0.17488950490951538, 0.08123742789030075, 0.6041793823242188, -0.09989742934703827, -0.12481207400560379, 0.3372097909450531, -0.28763818740844727, -0.1602470874786377, 0.5248730778694153, 0.08380945026874542, -0.08503639698028564, 0.35826337337493896, 0.07865028083324432, 0.05024915933609009, -0.524031400680542, -0.22245189547538757, 0.16179446876049042, 0.06442603468894958, -0.18447144329547882, -0.5932483673095703, -0.37264201045036316, 0.2279144674539566, -0.016429414972662926, -0.23478713631629944, 0.10636135190725327, -0.18184050917625427, 0.04038214311003685, -0.19040901958942413, -0.17694221436977386, -0.05903216823935509, 0.21147498488426208, 0.2574062943458557, 0.2118017077445984, 0.2327120304107666, -0.10308316349983215, -0.31521183252334595, -0.19014990329742432, -0.0175505168735981, 0.10926337540149689, 0.21676750481128693, 0.3279651403427124, -0.016492722555994987, -0.16861170530319214, -0.24434714019298553, -0.3988581597805023, -0.0008844572002999485, 0.1280759572982788, 0.030747849494218826, 0.42078736424446106, -0.47623464465141296, 0.03917756304144859, 0.005794421769678593, 0.02828056365251541, 0.0076811485923826694, 0.16383595764636993, 0.31968173384666443, 0.054072774946689606, 0.003982733003795147, -0.02326769381761551, 0.010846576653420925, 0.1630418449640274, 0.03016415797173977, -0.1091245636343956, -0.31270915269851685, 0.22830183804035187, -0.26280730962753296, 0.009847105480730534, -0.16757600009441376, 0.1402466893196106, 0.07051913440227509, 0.2345559000968933, -0.22743350267410278, 0.281438946723938, 0.2564772665500641, 0.19679223001003265, 0.0014195574913173914, 0.03552208095788956, -0.04339946061372757, 0.17431579530239105, -0.3539295792579651, 0.1625114381313324, 0.28042399883270264, 0.5648201704025269, 0.1444968581199646, 0.07089056819677353, 0.3205164074897766, 0.009568646550178528, 0.2328445017337799, -0.1425877809524536, 0.4217465817928314, -0.04783311486244202, -0.11463978886604309, 0.22019131481647491, -0.06575358659029007, 0.0721534937620163, -0.11961887776851654, -0.17513857781887054, -0.152817964553833, 0.14199067652225494, -0.21869294345378876, 0.2464308887720108, 0.35510000586509705, -0.015116817317903042, -0.20945686101913452, 0.3241277039051056, 0.021042324602603912, -0.32049864530563354, 0.1727178692817688, -0.13759556412696838, 0.01153545267879963, -0.05997378006577492, 0.22750592231750488, 0.0374387763440609, -0.04129970073699951, -0.25403550267219543, 0.4374251663684845, 0.2148568332195282, 0.11356163024902344, 0.3173482120037079, -0.26806002855300903, 0.07125895470380783, -0.047738511115312576, 0.0781116932630539, 0.5492458939552307, -0.40709418058395386, 0.05106649547815323, 0.20317018032073975, 0.01568908989429474, 0.06391119956970215, -0.1526075303554535, 0.3913736045360565, 0.24380932748317719, 0.0073967003263533115, 0.14716164767742157, 0.5788078904151917, -0.04629114270210266, 0.07291098684072495, -0.07357427477836609, -0.3104631304740906, 0.2083488553762436, 0.09252043813467026, 0.0948227271437645, -0.35735222697257996, -0.20487534999847412, 0.09997349232435226, 0.3083711266517639, -0.27003002166748047, 0.35838234424591064, -0.009558546356856823, -0.21258363127708435, 0.3153029680252075, -0.03424396365880966, -0.15589375793933868, 0.008180966600775719, 0.01510701235383749, -0.08702805638313293, 0.30452871322631836, -0.19638967514038086, -0.3819638192653656, 0.22948375344276428, -0.0637035146355629, 0.06825175136327744, -0.3417002260684967, 0.18840308487415314, 0.061183586716651917, -0.0851467177271843, -0.055109549313783646, -0.3363083600997925, 0.11033385246992111, -0.11352985352277756, 0.10987847298383713, 0.05173889920115471, 0.040687743574380875, -0.03455391898751259, -0.14306244254112244, -0.3016890585422516, 0.3711784780025482, -0.08353167027235031, -0.019919125363230705, -0.010554931126534939, 0.29129210114479065, -0.05409746989607811, 0.12017681449651718, -0.05367978289723396, 0.24017424881458282, 0.35652053356170654, -0.09624338895082474, 0.1682848036289215, 0.13726815581321716, -0.01075179222971201, -0.28925174474716187, -0.003915410954505205, 0.5061604976654053, 0.22247280180454254, 0.20472095906734467, 0.30282455682754517, -0.08440812677145004, 0.08724053204059601, 0.043729618191719055, -0.2721039950847626, -0.3616887927055359, -0.16090957820415497, -0.09398559480905533, 0.13427618145942688, -0.336635947227478, -0.5899161100387573, -0.011484413407742977, 0.2806822955608368, 0.25578388571739197, -0.014595557935535908, 0.13992398977279663, -0.18369060754776, -0.13974852859973907, 0.07565665245056152, -0.5855827927589417, -0.0750119686126709, 0.20240727066993713, -0.016865311190485954, 0.14358387887477875, -0.08547495305538177, -0.005228554364293814, 0.03526826202869415, 0.2353796362876892, -0.025514373555779457, 0.09510678797960281, 0.40831494331359863, 0.3604508638381958, -0.13965387642383575, -0.3078117072582245, -0.15908662974834442, -0.4041631519794464, -0.0580308772623539, 0.24767576158046722, -0.1718837469816208, -0.49563294649124146, -0.1368498057126999, -0.4858057498931885, -0.23158560693264008, 0.09462271630764008, 0.39383745193481445, -0.033978089690208435, -0.12132607400417328, 0.30899643898010254, -0.05525212362408638, 0.3120442032814026, -0.014854115433990955, -0.10320036113262177, -0.029511375352740288, 0.1958804577589035, -0.20429955422878265, 0.027239974588155746, 0.003990487195551395, 0.04789802432060242, 0.41439002752304077, 0.23677034676074982, -0.06132173165678978, -0.3688528537750244, -0.5738263130187988, 0.19891542196273804, -0.043573666363954544, -0.07544146478176117, 0.15359430015087128, -0.2465476095676422, 0.03781968727707863, -0.5249401926994324, 0.08292590081691742, -0.2365260124206543, -0.08772286772727966, -0.3229260742664337, 0.08983158320188522, -0.12273803353309631, -0.2532223165035248, 0.0823827013373375, -0.32091856002807617, -0.3508952260017395, -0.06733275949954987, 0.2139362245798111, 0.03583391010761261, -0.1540176123380661, -0.26023057103157043, -0.10371693968772888, 0.15820419788360596, 0.24899698793888092, 0.027655743062496185, 0.036008838564157486, 0.2866537272930145, -0.30430495738983154, -0.14367403090000153, -0.19873981177806854, -0.31533166766166687, 0.10663460940122604, 0.22379431128501892, -0.1450604498386383, -0.2972120940685272, 0.07444289326667786, 0.0842168927192688, -0.2484321892261505, -0.12398359179496765, 0.08421264588832855, -0.056964222341775894, -0.1526045948266983, 0.049006134271621704, -0.018392404541373253, 0.17895293235778809, -0.1769569218158722, 0.16233332455158234, -0.3505837917327881, 0.29983556270599365, 0.20657819509506226, 0.41561704874038696, -0.10095926374197006, -0.18605747818946838, 0.4628736078739166, -0.1015675812959671, -0.054713573306798935, -0.03370429202914238, -0.06935611367225647, -0.01456022821366787, -0.2122713029384613, -0.027137773111462593, 0.23040401935577393, -0.008917543105781078, -0.23648051917552948, -0.15787367522716522, 0.20579150319099426, -0.35136276483535767, -0.159403458237648, 0.33360350131988525, -0.5718930959701538, 0.23963221907615662, -0.2130248099565506, 0.1591392457485199, -0.159755140542984, -0.26818200945854187, 0.3210596442222595, -0.1664438545703888, 0.26738089323043823, -0.08260446041822433, -0.05138818547129631, 0.04708298295736313, -0.14047333598136902, 0.27975890040397644, 0.20648829638957977, 0.1528768688440323, 0.12105048447847366, -0.17610317468643188, 0.11294408142566681, -0.13835488259792328, 0.4136570692062378, 0.010340995155274868, -0.3415989875793457, -0.035695839673280716, -0.11379464715719223, -0.12278725206851959, -0.17809131741523743, -0.18779857456684113, -0.02662482112646103, 0.5311675071716309, 0.5997406840324402, -0.29976335167884827, -0.27210715413093567, 0.3077867329120636, -0.1064925417304039, -0.158956378698349, 0.13468340039253235, 0.1879265010356903, 0.21513411402702332, -0.4126153886318207, 0.12117645889520645, 0.05508912354707718, 0.005766848102211952, 0.13236315548419952, -0.10527846217155457, -0.07042109221220016, 0.1855517476797104, 0.26770150661468506, 0.16768310964107513, -0.03990274667739868, -0.03502287715673447, -0.05750399827957153, -0.022307701408863068, 0.09607566148042679, 0.3651774823665619, -0.026444222778081894, 0.07045447826385498, -0.2445630431175232, -0.04471822828054428, 0.15620602667331696, 0.4355126917362213, 0.4480150043964386, 0.2516475021839142, 0.30362653732299805, 0.025630155578255653, 0.10535206645727158, -0.3496856093406677, 0.30982500314712524, 0.4465024471282959, -0.015354685485363007, -0.49742889404296875, -0.4103820025920868, 0.1762537658214569, -0.09635724872350693, -0.015520280227065086, -0.25995251536369324, 0.08112648874521255, -0.3926425576210022, 0.6640621423721313, 0.44333767890930176, 1.1297671794891357, 0.3573448657989502, 0.45860403776168823, -0.04235348477959633, 0.11525055021047592, 0.3830607831478119, -0.673458993434906, 0.06602899730205536, -0.3117775321006775, 0.04252622649073601, -0.031441837549209595, 0.04843294993042946, 0.010546415112912655, 0.23686116933822632, -0.06575080007314682, 0.2240264117717743, 0.05880764499306679, 0.011048602871596813, -0.10850843042135239, 0.4447457492351532, 0.005106894299387932, -0.6270375847816467, -0.1310867816209793, 0.1267709881067276, 0.042310554534196854, -0.022392038255929947, -0.08845318853855133, -0.16451051831245422, 0.14446182548999786, 0.006541823502629995, -0.13513389229774475, 0.0482107512652874, -0.26968544721603394, 0.16328424215316772, 0.07335428893566132, -0.07795187085866928, 0.23921805620193481, -0.2708640992641449, 0.3563738167285919, 0.19401609897613525, 0.1004139706492424, 0.17636404931545258, 0.11717624217271805, 0.2489153891801834, -0.05422494560480118, -0.3167652487754822, 0.8901435136795044, -0.0371694415807724, 0.20003090798854828, 0.0912044420838356, 0.24089369177818298, -0.1644592583179474, -0.022564800456166267, -0.1324385702610016, 0.3902788758277893, -0.17365971207618713, -0.07812391221523285, 0.18459905683994293, -0.21834410727024078, -0.12470944225788116, 0.13353432714939117, -0.031187629327178, -0.1671604961156845, 0.21956872940063477, 0.3298570513725281, -0.026112150400877, -0.17155225574970245, 0.10394471138715744, -0.21595405042171478, -0.4586631953716278, 0.5600895881652832, 0.10689336061477661, -0.2220667600631714, -0.1168675571680069, -0.2498064488172531, 0.2313772439956665, -0.07322351634502411, -0.024741817265748978, 0.1908101588487625, -0.18326590955257416, 0.0654037669301033, 0.24950577318668365, 0.13217417895793915, 0.018896179273724556, -0.3815692365169525, -0.07892908155918121, -0.2347983568906784, 0.24783535301685333, 0.20007623732089996, 0.23172695934772491, 0.015279783867299557, 0.38590359687805176, -0.08332113176584244, 0.40193092823028564, -0.38871487975120544, -0.07362469285726547, 0.060384105890989304, 0.32455435395240784, -0.47592276334762573, -0.12366386502981186, -0.06353015452623367, 0.2932156026363373, 0.09521971642971039, 0.2746930718421936, -0.07042765617370605, -0.17638035118579865, -0.3155699372291565, 0.10930380970239639, 0.008839119225740433, -0.030079524964094162, -0.0055694798938930035, 0.09157625585794449, -0.15527206659317017, -0.39599183201789856, 0.046936728060245514, -0.05759883299469948, -0.0003968289529439062, 0.04935131594538689, -0.007732631638646126, 0.03372332453727722, 0.05843118205666542, -0.18134671449661255, 0.16355451941490173, 0.23116981983184814, 0.2100101262331009, 0.19165468215942383, -0.023031173273921013, -0.1339605301618576, -0.16000522673130035, 0.2594054639339447, 0.3972218632698059, -0.1446176916360855, 0.03271377086639404, 0.06406725198030472, -0.2973065674304962, 0.01518317312002182, 0.3159184157848358, 0.14793096482753754, -0.07138018310070038, -0.2626301348209381, 0.32405155897140503, 0.2630266845226288, -0.22607183456420898, 0.13833685219287872, -0.034775689244270325, -0.5336185097694397, 0.09461382776498795, 0.258998841047287, 0.3436366021633148, 0.44693872332572937, -0.1533932089805603, -0.003376435488462448, -0.03965039923787117, -0.49224862456321716, -0.02603161893785, -0.10514377057552338, -0.1139657199382782, 0.08256621658802032, 0.26470130681991577, 0.12361748516559601, 0.2827007472515106, -0.03346383571624756, 0.04620811715722084, 0.29883912205696106, 0.3937668204307556, 0.02455505169928074, 0.15599894523620605, -0.08951133489608765, -0.17812760174274445, -0.16767114400863647, 0.35149940848350525, 0.3922956883907318, -0.015484382398426533, 0.010654536075890064, 0.1252191662788391, -0.3595491349697113, -0.09105784446001053, 0.4749237895011902, -0.15800164639949799, -0.03693905845284462, 0.09388922899961472, 0.01664353720843792, -0.5320451855659485, -0.06064407899975777, -0.02812221460044384, -0.08474311977624893, -0.3039166033267975, 0.23173673450946808, -0.012170805595815182, -0.09179836511611938, 0.10230186581611633, -0.2134155035018921, 0.5871029496192932, -0.24508653581142426, 0.007228263188153505, 0.16291555762290955, 0.15804870426654816, -0.014439549297094345, 0.1343713104724884, 0.35953670740127563, 0.348340779542923, -0.2469235360622406, 0.09211818128824234, -0.31066593527793884, -0.023059098049998283, -0.14571285247802734, 0.2029488980770111, 0.31866714358329773, 0.17782528698444366, 0.06842955946922302, 0.16334494948387146, -0.28827089071273804, -0.046792518347501755, -0.11429500579833984, 0.3790619969367981, -0.24996696412563324, 0.17228001356124878, 0.2577950954437256, -0.19165778160095215, -0.44913989305496216, 0.012258906848728657, -0.24131758511066437, -0.02361934632062912, 0.30173105001449585, -0.2390323281288147, -0.033083949238061905, -0.20297867059707642, 0.10858191549777985, 0.024044446647167206, 0.46028006076812744, 0.5174255967140198, 0.3198365569114685, -0.0012375244405120611, -0.046065591275691986, -0.16398188471794128, -0.032061684876680374, 0.30651742219924927, -0.06327302008867264, -0.07436173409223557, 0.3361043632030487, 0.21541576087474823, 0.005399512592703104, -0.004030585289001465, -0.23701739311218262, -0.2534398138523102, 0.2219523787498474, -0.1255364865064621, 0.46528154611587524, -0.2609790563583374, 0.22665449976921082, 0.18697035312652588, -0.16299358010292053, -0.039931345731019974, -0.2518545389175415, 0.05419830605387688, 0.09493196755647659, -0.0672333836555481, 0.11916787922382355, 0.000280015985481441, 0.5229855179786682, 0.08704236149787903, 0.12298566102981567, -0.3334084153175354, -0.13739213347434998, -0.17196327447891235, -0.17227040231227875, -0.5522135496139526, 0.0878213495016098, 0.08752330392599106, 0.6268982291221619, 0.09718019515275955, -0.12026605755090714, -0.12412846088409424, 0.08815296739339828, 0.01313912495970726, -0.5722594857215881, -0.14993195235729218, 0.0011817351914942265, -0.08785070478916168, -0.01497284322977066, -0.06615043431520462, 0.47200658917427063, 0.05170684680342674, -0.0070289624854922295, -0.33242085576057434, -0.4548496901988983, 0.3370198607444763, -0.05355291813611984, -0.27091649174690247, -0.3991357386112213, 0.15169665217399597, 0.32905009388923645, 0.11891797930002213, -0.6594871282577515, -0.15592257678508759, 0.2090785801410675, 0.07949722558259964, -0.01446461584419012, 0.320515513420105, 0.09034504741430283, -0.18939824402332306, -0.2628100514411926, 0.025503413751721382, -0.19812414050102234, 0.031560931354761124, -0.3176021873950958, -0.29445457458496094 ]
https://github.com/huggingface/datasets/issues/2618
`filelock.py` Error
Hi @liyucheng09, thanks for reporting. Apparently this issue has to do with your environment setup. One question: is your data in an NFS share? Some people have reported this error when using `fcntl` to write to an NFS share... If this is the case, then it might be that your NFS just may not be set up to provide file locks. You should ask your system administrator, or try these commands in the terminal: ```shell sudo systemctl enable rpc-statd sudo systemctl start rpc-statd ```
## Describe the bug It seems that the `filelock.py` went error. ``` >>> ds=load_dataset('xsum') ^CTraceback (most recent call last): File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) OSError: [Errno 37] No locks available ``` According to error log, it is OSError, but there is an `except` in the `_acquire` function. ``` def _acquire(self): open_mode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC try: fd = os.open(self._lock_file, open_mode) except (IOError, OSError): pass else: self._lock_file_fd = fd return None ``` I don't know why it stucked rather than `pass` directly. I am not quite familiar with filelock operation, so any help is highly appriciated. ## Steps to reproduce the bug ```python ds = load_dataset('xsum') ``` ## Expected results A clear and concise description of the expected results. ## Actual results ``` >>> ds=load_dataset('xsum') ^CTraceback (most recent call last): File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) OSError: [Errno 37] No locks available During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 818, in load_dataset use_auth_token=use_auth_token, File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 470, in prepare_module with FileLock(lock_path): File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 323, in __enter__ self.acquire() File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 272, in acquire self._acquire() File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) KeyboardInterrupt ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.0 - Platform: Linux-4.15.0-135-generic-x86_64-with-debian-buster-sid - Python version: 3.6.13 - PyArrow version: 4.0.1
84
`filelock.py` Error ## Describe the bug It seems that the `filelock.py` went error. ``` >>> ds=load_dataset('xsum') ^CTraceback (most recent call last): File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) OSError: [Errno 37] No locks available ``` According to error log, it is OSError, but there is an `except` in the `_acquire` function. ``` def _acquire(self): open_mode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC try: fd = os.open(self._lock_file, open_mode) except (IOError, OSError): pass else: self._lock_file_fd = fd return None ``` I don't know why it stucked rather than `pass` directly. I am not quite familiar with filelock operation, so any help is highly appriciated. ## Steps to reproduce the bug ```python ds = load_dataset('xsum') ``` ## Expected results A clear and concise description of the expected results. ## Actual results ``` >>> ds=load_dataset('xsum') ^CTraceback (most recent call last): File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) OSError: [Errno 37] No locks available During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 818, in load_dataset use_auth_token=use_auth_token, File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 470, in prepare_module with FileLock(lock_path): File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 323, in __enter__ self.acquire() File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 272, in acquire self._acquire() File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) KeyboardInterrupt ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.0 - Platform: Linux-4.15.0-135-generic-x86_64-with-debian-buster-sid - Python version: 3.6.13 - PyArrow version: 4.0.1 Hi @liyucheng09, thanks for reporting. Apparently this issue has to do with your environment setup. One question: is your data in an NFS share? Some people have reported this error when using `fcntl` to write to an NFS share... If this is the case, then it might be that your NFS just may not be set up to provide file locks. You should ask your system administrator, or try these commands in the terminal: ```shell sudo systemctl enable rpc-statd sudo systemctl start rpc-statd ```
[ 0.13904431462287903, -0.3473012149333954, 0.015147035010159016, 0.041861023753881454, 0.030276546254754066, 0.09070464223623276, 0.16235928237438202, 0.13566692173480988, 0.059238236397504807, 0.09362246841192245, -0.10108538717031479, 0.3403194844722748, -0.03296109661459923, -0.4240654706954956, -0.45925167202949524, 0.11418267339468002, 0.006927399896085262, -0.06985843926668167, -0.11495698243379593, -0.013815626502037048, -0.35955703258514404, 0.39683425426483154, -0.4249512553215027, 0.06983724981546402, -0.27931809425354004, -0.04803510382771492, -0.13662512600421906, 0.3886513411998749, -0.16889940202236176, -0.13956333696842194, -0.05172472819685936, 0.08670657873153687, 0.04804077371954918, 0.5414586663246155, -0.0001142322871601209, -0.11047050356864929, 0.0751492902636528, -0.05661541968584061, -0.37209320068359375, -0.042281102389097214, 0.14076055586338043, -0.09100878983736038, -0.08224853873252869, -0.3874730169773102, 0.23739857971668243, -0.34642085433006287, 0.14347846806049347, -0.2871147692203522, 0.40223875641822815, 0.2639314830303192, 0.14412634074687958, 0.14820276200771332, 0.4175287187099457, -0.17800939083099365, 0.10951291024684906, -0.42019519209861755, -0.05971850827336311, 0.6798742413520813, 0.7193901538848877, -0.16136029362678528, 0.01719602569937706, 0.08550573140382767, -0.14824995398521423, -0.20494040846824646, 0.23206306993961334, 0.019350137561559677, 0.38151976466178894, -0.4401882290840149, -0.21677730977535248, -0.06764300167560577, 0.047656260430812836, -0.033116165548563004, -0.4759557247161865, -0.16181114315986633, 0.42750558257102966, -0.07761940360069275, 0.06741698831319809, 0.1474142074584961, -0.31597423553466797, 0.3756868839263916, 0.35569292306900024, -0.11536015570163727, -0.014597837813198566, 0.07217644155025482, -0.06326157599687576, 0.30863508582115173, 0.02813398279249668, 0.13706599175930023, 0.26272475719451904, -0.03087598644196987, -0.08056997507810593, -0.02262117899954319, -0.07862390577793121, 0.17913812398910522, -0.37501081824302673, 0.05320316553115845, 0.13465425372123718, 0.057686951011419296, 0.04918922483921051, -0.23617768287658691, -0.34432777762413025, -0.24687524139881134, -0.2653759717941284, 0.23430652916431427, -0.10378829389810562, 0.03913426399230957, 0.056430134922266006, 0.17573584616184235, 0.3515811562538147, 0.1015717163681984, -0.1955176740884781, 0.013868932612240314, -0.06824756413698196, -0.2627127766609192, 0.13233405351638794, 0.29164162278175354, 0.4077894985675812, -0.15220016241073608, -0.03986866772174835, 0.23378048837184906, -0.32369616627693176, 0.01810741238296032, 0.13108523190021515, 0.2916451096534729, 0.1106775775551796, -0.08094922453165054, 0.44701898097991943, 0.1683359593153, -0.14556719362735748, 0.0815063938498497, -0.0896994099020958, 0.20967444777488708, -0.0342743955552578, -0.0005646706558763981, -0.17086297273635864, -0.36302173137664795, 0.07559629529714584, 0.3683517575263977, 0.23842211067676544, -0.3314392566680908, 0.20222635567188263, -0.11281299591064453, -0.14929957687854767, 0.11939655244350433, -0.1394650638103485, -0.0028865132480859756, 0.33682379126548767, -0.24561463296413422, 0.1286298781633377, 0.17143870890140533, -0.3326621353626251, -0.17021730542182922, -0.24440717697143555, 0.14466845989227295, -0.0669415220618248, 0.0573141947388649, 0.19824784994125366, -0.3010267913341522, 0.04589838534593582, -0.3152231276035309, 0.15902303159236908, -0.33976951241493225, 0.10846985131502151, -0.15303774178028107, 0.04826020821928978, 0.40749967098236084, -0.12052437663078308, 0.2917504608631134, 0.1815028190612793, -0.19200558960437775, 0.1625550389289856, 0.0901745855808258, -0.021339328959584236, 0.11091361939907074, -0.44441038370132446, 0.019757691770792007, 0.10673849284648895, -0.5011025667190552, -0.5333334803581238, 0.056169282644987106, -0.4790899455547333, 0.053788263350725174, 0.1695951223373413, 0.4211777150630951, -0.017367767170071602, -0.16417045891284943, 0.2718978822231293, 0.03714108094573021, -0.013501225970685482, -0.14509713649749756, -0.1528097689151764, 0.03754008188843727, -0.04408186301589012, 0.14069224894046783, -0.0029505433049052954, 0.15863777697086334, 0.1399628221988678, 0.007128591649234295, 0.5296826958656311, -0.1462133526802063, -0.2674139142036438, 0.16283303499221802, 0.47947943210601807, 0.1399136781692505, 0.0850244015455246, -0.15911759436130524, -0.18927180767059326, 0.25222814083099365, -0.19898276031017303, -0.0743362084031105, -0.07250648736953735, -0.07643163204193115, -0.04376892372965813, -0.04353456199169159, -0.04201487451791763, -0.08136491477489471, 0.11759769171476364, -0.014888382516801357, -0.17996278405189514, 0.049714595079422, -0.12948811054229736, 0.4790838956832886, -0.4433472454547882, 0.20137913525104523, -0.14359831809997559, 0.07251699268817902, -0.10640234500169754, -0.23213304579257965, -0.2575787603855133, -0.007140523754060268, 0.2843228578567505, -0.19003579020500183, -0.2792271077632904, 0.4126046597957611, 0.2959447205066681, -0.11242713034152985, -0.21720191836357117, -0.2112119048833847, 0.17446021735668182, 0.3583768904209137, -0.23047634959220886, 0.014889564365148544, 0.08370683342218399, -0.06126192584633827, 0.12024097144603729, 0.1285027265548706, 0.07460980862379074, -0.03979349508881569, -0.08322647213935852, 0.21097996830940247, -0.025182103738188744, 0.0652942955493927, 0.02042911946773529, 0.01948055811226368, 0.4611053764820099, 0.00801058392971754, 0.06243867427110672, -0.10792200267314911, -0.05187835171818733, -0.07636972516775131, 0.19074027240276337, 0.05701983720064163, 0.27934643626213074, 0.18843412399291992, 0.3128789961338043, 0.36727017164230347, -0.19311128556728363, 0.5885145664215088, 0.7208219170570374, 0.10168501734733582, -0.28756067156791687, 0.019920242950320244, 0.302702397108078, -0.21049615740776062, -0.04690095782279968, -0.0330832377076149, -0.041875459253787994, 0.2120729684829712, 0.05869441479444504, 0.23114900290966034, 0.2032686322927475, -0.8740938305854797, -0.01259693130850792, 0.23404821753501892, -0.00490283127874136, -0.04891957715153694, -0.16946126520633698, 0.13532160222530365, 0.06018727272748947, 0.33123573660850525, -0.031748753041028976, -0.3138143718242645, 0.13448552787303925, 0.46495312452316284, -0.0744783952832222, 0.003971173893660307, -0.3631457984447479, 0.06436077505350113, 0.19804677367210388, 0.131660595536232, 0.11120609194040298, 0.03675168380141258, -0.09585621953010559, -0.06642432510852814, 0.13150781393051147, -0.09807430952787399, 0.20801417529582977, -0.00032015086617320776, -0.0812264159321785, -0.4246043562889099, -0.18296806514263153, -0.031467363238334656, -0.17350159585475922, 0.45975589752197266, 0.05671534687280655, 0.30354878306388855, -0.02334594540297985, 0.024947963654994965, 0.138303741812706, -0.09793013334274292, -0.07827764749526978, 0.07984098047018051, 0.014958123676478863, -0.0715150237083435, -0.38446924090385437, -0.03470825031399727, -0.3898952305316925, -0.5175120234489441, 0.1433667540550232, -0.1855088174343109, 0.06644187867641449, 0.3325221538543701, -0.1523124873638153, 0.4005433917045593, 0.10167048126459122, 0.18093416094779968, 0.14396017789840698, -0.2926708161830902, 0.29690438508987427, -0.08584236353635788, -0.4228857159614563, -0.3153536021709442, 0.08550264686346054, -0.47378289699554443, -0.1134321317076683, -0.2983640432357788, -0.5243874192237854, -0.3494298458099365, 0.09394698590040207, -0.5529791712760925, 0.019617831334471703, 0.16180843114852905, -0.24515019357204437, -0.06537912040948868, -0.23333849012851715, 0.17943154275417328, 0.1334124207496643, 0.08641135692596436, 0.12635456025600433, 0.06550419330596924, 0.05867673456668854, -0.006703068036586046, 0.3639447093009949, 0.10855171084403992, 0.22693979740142822, 0.29798799753189087, -0.09206191450357437, 0.26848936080932617, 0.023914707824587822, -0.2958974838256836, -0.2039775401353836, 0.26492342352867126, -0.2320869117975235, -0.18439464271068573, -0.014858376234769821, 0.29027804732322693, -0.147825226187706, -0.35333073139190674, -0.2893274128437042, -0.3504852056503296, -0.08503168821334839, 0.4227713346481323, -0.09890212118625641, -0.12464886903762817, 0.12015077471733093, 0.1084766536951065, 0.1586567908525467, 0.0896877571940422, 0.5906792879104614, 0.41215625405311584, -0.10582159459590912, -0.0802929624915123, -0.1968012899160385, 0.03265360742807388, 0.32548385858535767, -0.03533301502466202, 0.25913071632385254, -0.08967333287000656, 0.02708369679749012, 0.10452234745025635, -0.1417986899614334, 0.4386398196220398, 0.3848527669906616, 0.13846172392368317, 0.04644053801894188, 0.11602042615413666, -0.025785338133573532, -0.1277819275856018, -0.29224535822868347, 0.24068833887577057, 0.45883825421333313, 0.3851800262928009, -0.03474662825465202, -0.0558454766869545, -0.26600757241249084, 0.170241117477417, -0.21928103268146515, -0.6137133836746216, -0.027882523834705353, -0.10194367170333862, -0.43936434388160706, 0.11961201578378677, 0.09540249407291412, 0.1485133171081543, -0.017836427316069603, -0.07586807757616043, 0.2558479607105255, -0.203892320394516, 0.023045290261507034, -0.09569689631462097, 0.06682484596967697, -0.11880124360322952, 0.12911206483840942, -0.005665891338139772, -0.3534395098686218, 0.33840563893318176, 0.22878815233707428, 0.27276304364204407, 0.05998722091317177, 0.2580750584602356, -0.23948000371456146, -0.009457574225962162, 0.27253785729408264, -0.2674664258956909, 0.14914043247699738, -0.03856869786977768, 0.23627521097660065, 0.17786280810832977, -0.250050812959671, 0.24824708700180054, 0.041069723665714264, 0.038538336753845215, 0.04581449553370476, 0.05939443036913872, 0.11779417097568512, -0.07418136298656464, 0.7165991067886353, 0.414391428232193, 0.08225942403078079, 0.31432265043258667, 0.01007545180618763, 0.7889763116836548, 0.01154744066298008, -0.05758237838745117, 0.2241940051317215, -0.0027722639497369528, 0.3785952627658844, -0.1774415522813797, 0.11317041516304016, -0.3271002471446991, -0.5434802174568176, 0.11708883941173553, -0.28657427430152893, 0.4315253496170044, -0.46608906984329224, -0.07265777885913849, -0.02966965176165104, -0.3799649178981781, -0.42239245772361755, 0.022712718695402145, 0.010389645583927631, -0.8001112937927246, -0.0394977368414402, -0.16886943578720093, 0.11110105365514755, 0.1646428108215332, 0.3454257547855377, -0.10815085470676422, -0.11124737560749054, -0.34645718336105347, -0.16939282417297363, -0.3626004159450531, 0.12797559797763824, 0.029659364372491837, 0.2635754942893982, -0.08925138413906097, 0.09733869135379791, -0.054437581449747086, 0.4668438136577606, -0.06601627916097641, 0.2516549825668335, 0.09808643162250519, -0.0213679950684309, 0.032290659844875336, 0.052495576441287994, 0.2574523985385895, -0.05813881382346153, 0.50525963306427, -0.039530955255031586, -0.1861053854227066, 0.22421026229858398, -0.11820948123931885, -0.22628992795944214, 0.019778234884142876, 0.16499465703964233, 0.053558699786663055, 0.02076420933008194, -0.3287978768348694, -0.32344767451286316, -0.24973993003368378, -0.11839401721954346, 0.07017576694488525, 0.26457148790359497, -0.2806159257888794, 0.041296686977148056, -0.25725245475769043, -0.24725529551506042, 0.07781180739402771, 0.23694683611392975, -0.13549691438674927, -0.15625040233135223, 0.7352301478385925, 0.3345286250114441, 0.07651547342538834, -0.09322330355644226, 0.16827385127544403, -0.18576909601688385, -0.3107033967971802, 0.12187422811985016, -0.11818791180849075, 0.2336875945329666, 0.1547020524740219, 0.13541126251220703, 0.18550746142864227, -0.16562949120998383, -0.0478425994515419, -0.8504985570907593, -0.3750930428504944, -0.10207913815975189, -0.21874704957008362, 0.04181668162345886, -0.19383084774017334, -0.05386732146143913, -0.12492568790912628, -0.18794801831245422, -0.267663836479187, 0.0953269824385643, -0.33771467208862305, -0.11402495950460434, 0.27874231338500977, 0.13261093199253082, -0.03538094460964203, 0.06692520529031754, 0.14833402633666992, 0.4477183520793915, 0.037708669900894165, -0.11066390573978424, -0.2386959195137024, 0.18022958934307098, -0.0075025963596999645, 0.05982542037963867, 0.16730748116970062, -0.4267774522304535, -0.015984756872057915, 0.1985916644334793, -0.18044596910476685, 0.16996194422245026, 0.049913424998521805, 0.13163502514362335, 0.4090229868888855, 0.3865378499031067, -0.03126716986298561, 0.24747775495052338, -0.1597062349319458, -0.05310460552573204, -0.011753177270293236, -0.03756960481405258, -0.32584255933761597, 0.08146756142377853, -0.6099708676338196, -0.21357083320617676, -0.03528593108057976, 0.2961658239364624, 0.22895494103431702, -0.05265495181083679, 0.23114348948001862, 0.37490248680114746, 0.38370853662490845, 0.19086605310440063, -0.14633554220199585, 0.17294789850711823, 0.1554068922996521, 0.1978396475315094, -0.02823381870985031, 0.0028659089002758265, 0.2605311870574951, 0.116846464574337, -0.24268607795238495, 0.13616491854190826, -0.5636627674102783, -0.03446747362613678, 0.008577416650950909, 0.055047981441020966, -0.053448956459760666, 0.13514535129070282, -0.05059771612286568, 0.02788016013801098, -0.0216867383569479, 0.002691080328077078, 0.22837474942207336, -0.11277183890342712, 0.11676967144012451, 0.2027149796485901, -0.3984925448894501, -0.044369932264089584, 0.03878756985068321, 0.024671990424394608, 0.27283352613449097, -0.39692002534866333, 0.31708917021751404, 0.006524532567709684, 0.18354246020317078, -0.14220944046974182, -0.1942426711320877, 0.12809094786643982, -0.23842909932136536, 0.19145438075065613, 0.2233331948518753, 0.3583885729312897, -0.17988912761211395, 0.3329329788684845, 0.3796784579753876, -0.05581558123230934, 0.07675620168447495, -0.21982629597187042, 0.06609104573726654, 0.08640904724597931, -0.2148161232471466, 0.3427780866622925, 0.0418098010122776, -0.3922557830810547, -0.4485306739807129, 0.20994935929775238, 0.36796385049819946, -0.3328229784965515, -0.20377551019191742, 0.5172691941261292, 0.11834204941987991, 0.30159029364585876, -0.04628470540046692, 0.3640757203102112, 0.5558552742004395, 0.08136632293462753, 0.31799840927124023, -0.13069367408752441, -0.004329841583967209, 0.06706396490335464, 0.3741815686225891, 0.1950092911720276, 0.076507069170475, 0.2795681953430176, 0.15572211146354675, -0.24709731340408325, 0.10125226527452469, 0.09901569783687592, 0.2535736560821533, -0.27105796337127686, 0.23635859787464142, 0.15872441232204437, -0.12887243926525116, -0.10933881998062134, 0.03506595268845558, -0.29956597089767456, -0.027763670310378075, -0.0843697190284729, 0.21661706268787384, 0.03195304051041603, -0.013926751911640167, 0.09887200593948364, -0.003107554977759719, -0.3188241720199585, 0.5872222781181335, 0.22566621005535126, -0.32831019163131714, 0.17957329750061035, -0.5215358138084412, 0.33253613114356995, 0.15871083736419678, -0.4344836175441742, -0.10756853222846985, -0.03550245240330696, -0.08127833157777786, -0.034281909465789795, 0.5500481724739075, -0.18955007195472717, 0.18381430208683014, 0.47698482871055603, -0.20527641475200653, -0.20118030905723572, 0.15575195848941803, -0.19881832599639893, -0.059537023305892944, -0.1038195863366127, 0.009543427266180515, -0.4522991180419922, 0.12382654845714569, -0.08144575357437134, -0.5590343475341797, -0.02296309918165207, -0.06028493121266365, 0.2571268081665039, 0.10171627998352051, 0.3643156886100769, -0.10407837480306625, -0.37731215357780457, -0.1476343274116516, -0.11325196921825409, 0.04849495366215706, -0.31113871932029724, 0.028666922822594643, 0.3408142924308777, -0.35222432017326355, -0.4135695695877075, -0.402769535779953, 0.4307857155799866, -0.47070977091789246, -0.40591171383857727, -0.509232223033905, 0.3551386594772339, -0.05866144970059395, 0.034745048731565475, 0.28444403409957886, 0.32307058572769165, 0.20757226645946503, 0.31688666343688965, -0.4063813090324402, -0.14963272213935852, 0.6324788331985474, -0.5143604874610901, -0.0433194525539875, 0.14104698598384857, 0.4048151671886444, -0.03848496824502945, -0.14385737478733063, -0.050286583602428436, 0.008028930053114891, 0.3262679874897003, 0.035298652946949005, -0.11909563839435577, 0.017380747944116592, 0.04601680114865303, -0.02755219303071499, 0.08915436267852783, 0.12601882219314575, 0.06519564241170883, 0.1504262536764145, 0.32259076833724976, 0.038834068924188614 ]
https://github.com/huggingface/datasets/issues/2615
Jsonlines export error
For some reason this happens (both `datasets` version are on master) only on Python 3.6 and not Python 3.8.
## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1
19
Jsonlines export error ## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1 For some reason this happens (both `datasets` version are on master) only on Python 3.6 and not Python 3.8.
[ -0.35041284561157227, 0.13335852324962616, -0.006901639513671398, 0.3097095191478729, 0.03890353813767433, 0.08054833114147186, 0.2188645452260971, 0.3883451819419861, 0.0006040323642082512, -0.040230438113212585, 0.32310038805007935, 0.03459472954273224, 0.0673164650797844, 0.04469806328415871, -0.16802412271499634, -0.16740669310092926, 0.21948274970054626, -0.03084993176162243, 0.03366834670305252, 0.22254201769828796, -0.2770715653896332, 0.3025197386741638, -0.19216014444828033, -0.2260362207889557, -0.39885926246643066, -0.2168709933757782, 0.147418811917305, 0.014026442542672157, -0.026365799829363823, -0.5282495617866516, -0.03911510854959488, -0.23884356021881104, 0.4440397024154663, 0.5343335270881653, -0.00012084820627933368, -0.15447063744068146, 0.33359864354133606, 0.00613027811050415, -0.2074822038412094, 0.026441894471645355, -0.43909841775894165, -0.32505232095718384, 0.06267698109149933, -0.3321589529514313, 0.42548906803131104, -0.04332565888762474, -0.35616204142570496, -0.465217262506485, 0.6484056711196899, 0.44555944204330444, 0.12725971639156342, 0.04884480684995651, 0.09546893835067749, -0.01340707391500473, -0.030333785340189934, 0.13981489837169647, -0.027030790224671364, 0.14632157981395721, -0.1673423796892166, 0.2741564214229584, 0.26423269510269165, -0.057152651250362396, -0.15867136418819427, -0.2541062533855438, -0.1199236810207367, -0.08541065454483032, -0.05930538848042488, -0.2858145534992218, 0.18332558870315552, 0.40008530020713806, 0.11885779350996017, -0.19417671859264374, -0.21227578818798065, -0.35446029901504517, 0.1109929084777832, -0.5715144872665405, 0.059300921857357025, 0.5090205073356628, -0.0011915926588699222, 0.10803695023059845, -0.26376795768737793, -0.11441017687320709, -0.21542534232139587, -0.044466421008110046, 0.003329814411699772, -0.18538126349449158, -0.1245926022529602, 0.023659808561205864, -0.1236831471323967, -0.09167537838220596, -0.0017677971627563238, -0.27920377254486084, -0.548095166683197, -0.048375893384218216, -0.15314213931560516, 0.07192586362361908, 0.1683177798986435, -0.410276859998703, 0.0765407383441925, -0.1706935614347458, 0.2756137251853943, -0.3768743872642517, 0.2522151470184326, 0.039943378418684006, 0.5629563927650452, 0.12413489073514938, 0.3155885636806488, -0.011655543930828571, 0.23482953011989594, 0.01344306766986847, 0.06303735822439194, -0.05122735723853111, 0.018254892900586128, -0.1685529500246048, 0.13086305558681488, 0.052718933671712875, 0.015617835335433483, -0.08819220960140228, -0.05242281034588814, 0.17997854948043823, -0.3575300872325897, -0.1791660189628601, -0.2505485415458679, -0.1906236857175827, -0.09928060322999954, 0.2618556320667267, 0.163503959774971, 0.29563429951667786, -0.1717631071805954, 0.006307969801127911, -0.020448902621865273, -0.11028621345758438, -0.08971865475177765, -0.023623233661055565, -0.07319475710391998, -0.23371420800685883, -0.012697286903858185, 0.26072928309440613, -0.0713079571723938, -0.2439551055431366, -0.09356649965047836, -0.04294240102171898, -0.11929211765527725, 0.20152059197425842, 0.3051169216632843, 0.14322122931480408, -0.13218075037002563, -0.1420603096485138, -0.05511854961514473, 0.18369287252426147, -0.44878026843070984, -0.050972238183021545, -0.3994896411895752, 0.13035845756530762, -0.18312157690525055, 0.13224218785762787, -0.45310351252555847, -0.07572796195745468, 0.1063629686832428, 0.1056370884180069, 0.37759897112846375, -0.3547276556491852, 0.5717496275901794, -0.28042080998420715, 0.022484222427010536, 0.2825925648212433, -0.7132421135902405, 0.0905747339129448, 0.07878559082746506, -0.018038488924503326, 0.4428821802139282, 0.3599768877029419, -0.053361378610134125, 0.32682934403419495, -0.11791806668043137, 0.250777006149292, 0.1492941677570343, 0.1822727769613266, 0.0733189508318901, 0.4902762472629547, -0.0750967487692833, 0.008265363052487373, -0.017880983650684357, -0.34517768025398254, 0.6365368366241455, 0.1081680878996849, 0.5238192677497864, 0.37895506620407104, 0.05674014613032341, 0.24714291095733643, -0.17493538558483124, -0.19341745972633362, -0.05823001638054848, -0.19986243546009064, -0.3382234275341034, -0.047783732414245605, 0.1436716765165329, -0.204327791929245, 0.31365805864334106, -0.24686983227729797, 0.11876362562179565, 0.4237183928489685, 0.13869443535804749, 0.12137822806835175, 0.0007524488028138876, 0.22975094616413116, -0.4470793902873993, -0.1484592705965042, -0.10313247889280319, -0.15825603902339935, -0.14089463651180267, -0.026228005066514015, 0.20962950587272644, 0.22289356589317322, -0.061890654265880585, 0.14834408462047577, 0.020685620605945587, -0.11799314618110657, -0.08283260464668274, 0.208854541182518, -0.04392050951719284, 0.10726584494113922, 0.18921491503715515, 0.04681702330708504, -0.2518901526927948, 0.3014494776725769, 0.24207976460456848, -0.2325034886598587, 0.20497605204582214, 0.12091939151287079, 0.15981994569301605, -0.30478668212890625, -0.13924537599086761, 0.20688842236995697, 0.05533463507890701, -0.04376206547021866, -0.21176375448703766, 0.05000121518969536, 0.12288698554039001, 0.1427302211523056, -0.1562667042016983, 0.2958240211009979, -0.06006001681089401, 0.09399974346160889, -0.06637367606163025, 0.6036192178726196, -0.16806729137897491, 0.3515251874923706, -0.04448264092206955, -0.00933310016989708, 0.20487052202224731, -0.10043276846408844, -0.04897962883114815, -0.23922254145145416, 0.2890397012233734, 0.21994945406913757, -0.11893855035305023, 0.03502245992422104, -0.2944985032081604, 0.04337044060230255, 0.6203615069389343, 0.028687823563814163, 0.07492984086275101, 0.24497759342193604, -0.02792823314666748, -0.010685808025300503, 0.0029468396678566933, 0.11934751272201538, 0.34180518984794617, 0.10028339922428131, 0.006234744098037481, 0.1227354034781456, 0.2248276025056839, -0.08212830871343613, 0.2882923185825348, 0.15306533873081207, 0.3440401256084442, 0.2973322570323944, 0.18988095223903656, 0.18004292249679565, -0.14058373868465424, -0.3945007920265198, -0.2151731699705124, 0.07262596487998962, -0.3205602169036865, 0.35708189010620117, -0.18105268478393555, -0.007561247795820236, -0.4912698268890381, -0.4257618188858032, -0.28522995114326477, -0.322109580039978, -0.18691618740558624, -0.11772017180919647, -0.47566333413124084, -0.16669756174087524, -0.16257710754871368, 0.0679478868842125, 0.10909624397754669, -0.062014855444431305, 0.08074554800987244, 0.007107418961822987, -0.1285310685634613, -0.1226082295179367, -0.03143038600683212, -0.2198488563299179, 0.028181469067931175, 0.09626282006502151, 0.09539085626602173, -0.07991744577884674, 0.12639020383358002, 0.14857196807861328, 0.022512203082442284, -0.09865681827068329, 0.17728130519390106, 0.1919337958097458, 0.03792620822787285, -0.5070134997367859, 0.04411432519555092, 0.13461168110370636, 0.004804630763828754, 0.17157605290412903, -0.06951563060283661, -0.16232629120349884, -0.09681158512830734, -0.053037334233522415, -0.02326776273548603, -0.36814364790916443, 0.4280725419521332, -0.10500232875347137, 0.07836510241031647, -0.09275861829519272, 0.12514501810073853, -0.052053794264793396, -0.05367600545287132, -0.28797927498817444, 0.2134600281715393, -0.4409472346305847, 0.007613032590597868, -0.2837550640106201, -0.25924861431121826, 0.11729734390974045, 0.1513836681842804, -0.029277639463543892, 0.0501040555536747, -0.39405134320259094, 0.5075176954269409, -0.10015666484832764, 0.3795504570007324, -0.12314452230930328, 0.19707244634628296, 0.12103062868118286, -0.0695037916302681, -0.016999173909425735, -0.04078054055571556, 0.11084457486867905, 0.1125226765871048, 0.05565139651298523, 0.4821351170539856, -0.08725389838218689, 0.7164242267608643, -0.2381190061569214, -0.12439790368080139, 0.8051133155822754, 0.16235415637493134, 0.20871321856975555, 0.0996946394443512, 0.17027315497398376, -0.14298804104328156, -0.027412792667746544, 0.03071693889796734, -0.12323834002017975, -0.1478361040353775, 0.17173661291599274, 0.03456034138798714, -0.15304186940193176, 0.037861719727516174, -0.010810504667460918, -0.38519051671028137, -0.37628576159477234, 0.23838385939598083, -0.10052262246608734, 0.3272310495376587, -0.31066662073135376, 0.018065370619297028, -0.026073571294546127, 0.08669787645339966, -0.2485886514186859, -0.03918594866991043, 0.22624467313289642, 0.12180722504854202, -0.501797616481781, -0.37468403577804565, -0.49013063311576843, 0.21432262659072876, 0.06045742332935333, 0.6483103632926941, 0.14180901646614075, 0.06546956300735474, -0.06857125461101532, -0.07539229840040207, 0.6379685401916504, -0.018766487017273903, -0.22477158904075623, 0.24507689476013184, 0.3232688009738922, -0.2799646556377411, -0.13157065212726593, 0.15154559910297394, 0.21558047831058502, 0.8975405693054199, 0.059787530452013016, -0.2848915755748749, -0.0003903064352925867, 0.22211335599422455, 0.3107580244541168, -0.10430051386356354, -0.26524776220321655, -0.1747553050518036, -0.1859595775604248, -0.07460104674100876, -0.2814919650554657, 0.1014091819524765, 0.41379696130752563, -0.15763452649116516, -0.14877547323703766, 0.06871107220649719, -0.3437816798686981, -0.041204363107681274, 0.008478207513689995, 0.22329579293727875, -0.08426540344953537, 0.13859105110168457, -0.02464674413204193, 0.25639277696609497, 0.452125608921051, 0.3058807849884033, 0.03567136079072952, -0.4467421770095825, -0.08229413628578186, -0.2442295402288437, 0.37712952494621277, -0.08253435045480728, -0.21510954201221466, 0.10141411423683167, -0.09078244864940643, 0.38349905610084534, 0.12199971824884415, -0.3035014867782593, 0.31498757004737854, 0.051351889967918396, -0.8291917443275452, 0.02235329896211624, 0.32814809679985046, 0.054703112691640854, 0.2725345492362976, 0.1803310364484787, -0.2888332009315491, -0.3916206359863281, 0.17537112534046173, -0.18076816201210022, 0.5057500600814819, 0.44220972061157227, 0.19948627054691315, 0.08180712163448334, -0.46185243129730225, 0.6346322298049927, 0.11708889901638031, 0.05739222466945648, -0.24336299300193787, 0.45917582511901855, 0.13322196900844574, -0.17513969540596008, 0.10180559754371643, 0.00692261615768075, -0.10190130770206451, 0.02772769331932068, -0.5292728543281555, -0.29043513536453247, -0.2342902421951294, -0.01979203335940838, 0.16610348224639893, -0.21770067512989044, -0.5199826955795288, -0.011451431550085545, -0.03642347827553749, -0.22290226817131042, -0.06159646064043045, -0.21488894522190094, 0.08854291588068008, -0.169039785861969, -0.4068053066730499, 0.1753612458705902, 0.042762480676174164, 0.13834679126739502, 0.3813123106956482, -0.23227256536483765, 0.1784355193376541, -0.18819619715213776, 0.23853962123394012, 0.12398340553045273, 0.04107644781470299, -0.055925462394952774, -0.07377524673938751, -0.08621366322040558, 0.1032484695315361, -0.020339174196124077, 0.1611795425415039, -0.0562099926173687, -0.15634770691394806, 0.16221949458122253, 0.04254225641489029, -0.2514262795448303, -0.06245889887213707, 0.2822570502758026, -0.23848772048950195, -0.3111315071582794, -0.12317125499248505, 0.08429109305143356, 0.24334900081157684, -0.12550859153270721, 0.023761572316288948, 0.21974603831768036, 0.017951494082808495, 0.30154091119766235, -0.39906957745552063, -0.20240743458271027, -0.2789299786090851, 0.12374383956193924, 0.028622379526495934, -0.2644253075122833, 0.25477561354637146, 0.552282989025116, -0.17249324917793274, -0.05485283210873604, 0.46135807037353516, 0.2994171380996704, -0.4373067021369934, 0.5468573570251465, -0.11619392782449722, 0.25728318095207214, -0.06473830342292786, 0.43937423825263977, 0.024630798026919365, -0.003930460661649704, 0.1056317389011383, -0.4127843677997589, -0.15964172780513763, -0.056124623864889145, 0.15598681569099426, -0.015146235935389996, 0.050272464752197266, 0.4513690769672394, 0.0733482614159584, -0.2226615995168686, -0.12542356550693512, -0.0003818983386736363, -0.15583385527133942, 0.02746916562318802, -0.09106197208166122, -0.05169231444597244, 0.07027050107717514, -0.07889226824045181, 0.023713041096925735, 0.0943356454372406, -0.04273627698421478, -0.0913175716996193, -0.38596928119659424, 0.15112082660198212, 0.15769904851913452, -0.23846325278282166, 0.18402059376239777, -0.02805417776107788, -0.21688072383403778, -0.01949755847454071, 0.2399764209985733, 0.008456889539957047, -0.10936447978019714, -0.03482874110341072, 0.0417550764977932, -0.13956902921199799, -0.045016322284936905, 0.0915864035487175, 0.24780631065368652, 0.6310984492301941, -0.003961931448429823, 0.46173223853111267, -0.08375266939401627, -0.08179853856563568, -0.4447192847728729, 0.03652990236878395, -0.18443764746189117, 0.3684317171573639, 0.12581652402877808, -0.7131573557853699, -0.03339236229658127, 0.31533142924308777, 0.17132331430912018, 0.3518640100955963, -0.25617513060569763, 0.09288149327039719, 0.060929618775844574, 0.14939551055431366, 0.04891343414783478, -0.18384242057800293, -0.014872098341584206, 0.1542605757713318, -0.20738032460212708, 0.02705143578350544, -0.10553669929504395, -0.37536928057670593, -0.21849669516086578, -0.0562070831656456, 0.3148273825645447, 0.19694077968597412, 0.30100762844085693, 0.3379617929458618, 0.11700695753097534, 0.17157039046287537, -0.09538722783327103, 0.23530319333076477, 0.18741868436336517, 0.08522538840770721, 0.2191600501537323, -0.05308360233902931, 0.509736955165863, -0.16366234421730042, -0.13277533650398254, -0.5077127814292908, -0.06292250007390976, -0.02432323805987835, -0.1108371689915657, 0.2969661056995392, 0.17315362393856049, 0.12956304848194122, -0.2328273355960846, -0.05467944219708443, -0.13174377381801605, 0.13548220694065094, -0.11460226029157639, 0.02711739018559456, -0.19798047840595245, 0.030039215460419655, 0.21398350596427917, 0.14034584164619446, 0.02507101558148861, 0.2218133956193924, -0.16148455440998077, 0.25669988989830017, -0.014826501719653606, -0.46431398391723633, 0.1446288824081421, -0.09628202766180038, 0.20306794345378876, -0.3048175871372223, 0.06988073140382767, 0.17472346127033234, -0.0594312883913517, -0.11744207888841629, 0.127009317278862, 0.6228166222572327, 0.3317955434322357, 0.22543880343437195, -0.15236762166023254, -0.18559934198856354, 0.119391530752182, 0.08821745961904526, 0.1380414515733719, 0.23200102150440216, 0.07387690991163254, 0.1868019998073578, 0.027762535959482193, -0.05973763391375542, 0.37795552611351013, 0.12569919228553772, 0.10867749154567719, 0.06752981245517731, 0.21369102597236633, -0.1539224088191986, -0.17201952636241913, -0.4478200078010559, -0.14316514134407043, -0.260318785905838, -0.039032094180583954, 0.41557082533836365, -0.07769051939249039, -0.10891887545585632, -0.11100534349679947, 0.021132372319698334, -0.23128065466880798, 0.425466388463974, 0.31639373302459717, 0.3585675358772278, -0.08461298048496246, -0.15979228913784027, 0.12364901602268219, -0.03327908739447594, -0.3323063850402832, 0.3897256851196289, 0.37163427472114563, 0.28890955448150635, -0.2752663791179657, 0.04168218746781349, 0.2435314655303955, 0.6358330845832825, -0.5123928189277649, -0.01149769127368927, -0.40142956376075745, 0.041429948061704636, 0.42351481318473816, 0.05217313766479492, -0.13592831790447235, -0.17397081851959229, 0.4652431011199951, -0.1783280074596405, -0.07558348774909973, -0.19210028648376465, 0.10290907323360443, -0.030434884130954742, 0.011667340993881226, 0.06972483545541763, 0.42691540718078613, 0.08409832417964935, -0.022989580407738686, -0.2913000285625458, -0.3464735746383667, -0.19187216460704803, 0.04324536770582199, 0.27325841784477234, 0.24712717533111572, 0.5369346737861633, -0.14441260695457458, -0.06542761623859406, -0.2570610046386719, 0.20391452312469482, -0.03455369174480438, -0.3771500885486603, -0.09034378081560135, 0.04677042365074158, -0.09816329181194305, 0.05405094102025032, 0.27091941237449646, 0.23687425255775452, -0.06991565227508545, 0.21320706605911255, -0.001953891944140196, -0.22780871391296387, 0.09395739436149597, -0.4700146019458771, -0.3610375225543976, -0.04716905578970909, 0.2895599901676178, 0.19705188274383545, -0.08777479827404022, -0.14675885438919067, 0.16326454281806946, 0.37989097833633423, -0.1767864227294922, -0.38568753004074097, 0.21378663182258606, -0.15098147094249725, -0.07103753834962845, 0.20524734258651733, 0.3572629988193512, 0.2654607892036438, -0.4532504081726074, 0.25724348425865173, -0.09538324922323227 ]
https://github.com/huggingface/datasets/issues/2615
Jsonlines export error
@TevenLeScao we are using `pandas` to serialize the dataset to JSON Lines. So it must be due to pandas. Could you please check the pandas version causing the issue?
## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1
29
Jsonlines export error ## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1 @TevenLeScao we are using `pandas` to serialize the dataset to JSON Lines. So it must be due to pandas. Could you please check the pandas version causing the issue?
[ -0.3529365062713623, 0.13444532454013824, -0.013970937579870224, 0.2699108421802521, 0.09136582911014557, 0.08057711273431778, 0.2758992910385132, 0.42092111706733704, -0.0012248815037310123, -0.05468733608722687, 0.343974232673645, 0.01683129370212555, 0.10500957816839218, 0.16637849807739258, -0.2123272567987442, -0.21984562277793884, 0.23667268455028534, 0.0008693753625266254, -0.004698797594755888, 0.2111838310956955, -0.29907509684562683, 0.26034170389175415, -0.17275656759738922, -0.15274322032928467, -0.43175825476646423, -0.32987308502197266, 0.09384191781282425, -0.0441342256963253, 0.005859701428562403, -0.4725070893764496, -0.04233348369598389, -0.26304131746292114, 0.46765583753585815, 0.526177167892456, -0.00011956583330174908, -0.19447633624076843, 0.3220653831958771, 0.013589172624051571, -0.18676336109638214, 0.05446162447333336, -0.4758792221546173, -0.3755786418914795, 0.026410343125462532, -0.3169335424900055, 0.4677456021308899, -0.13668319582939148, -0.3192306458950043, -0.3943058252334595, 0.6600258350372314, 0.37505030632019043, 0.1458732783794403, -0.011616711504757404, 0.12283723056316376, 0.002756464993581176, -0.18551720678806305, 0.1420012265443802, 0.012075933627784252, 0.14037476480007172, -0.19491995871067047, 0.2560221254825592, 0.2439374029636383, -0.04059271886944771, -0.12992799282073975, -0.2738688886165619, -0.16510409116744995, -0.10337180644273758, 0.010668564587831497, -0.26501983404159546, 0.22221189737319946, 0.3889644145965576, 0.2334919571876526, -0.17788174748420715, -0.2301107496023178, -0.34139251708984375, 0.08765532076358795, -0.5814916491508484, 0.052242401987314224, 0.4974864423274994, 0.034825097769498825, 0.10731466114521027, -0.1599738448858261, -0.09862050414085388, -0.26804664731025696, -0.05711567401885986, -0.012814033776521683, -0.2351781278848648, -0.13531631231307983, 0.002288736402988434, -0.21643802523612976, -0.1658332198858261, -0.049383893609046936, -0.2810889184474945, -0.4807429611682892, -0.0021585619542747736, -0.200921431183815, 0.06759382039308548, 0.12323763966560364, -0.5326530933380127, 0.060998182743787766, -0.057052284479141235, 0.3082895278930664, -0.3318079710006714, 0.18427832424640656, 0.04805774614214897, 0.5355822443962097, 0.20272156596183777, 0.2703157365322113, -0.053625915199518204, 0.2857009172439575, 0.00648507010191679, 0.09284466505050659, -0.07490285485982895, -0.008574132807552814, -0.218867227435112, 0.08253999799489975, 0.014951547607779503, 0.03338204696774483, -0.08841019868850708, -0.04579345881938934, 0.2381834089756012, -0.3975784480571747, -0.15027008950710297, -0.2566152811050415, -0.15650592744350433, -0.10368480533361435, 0.30454984307289124, 0.14409564435482025, 0.24826133251190186, -0.099979929625988, 0.043245937675237656, -0.04050643369555473, -0.09615416824817657, -0.05104363337159157, -0.04171564057469368, -0.059888213872909546, -0.19353161752223969, -0.022359292954206467, 0.22952762246131897, -0.1399097442626953, -0.25455546379089355, -0.11934801936149597, -0.09584568440914154, -0.13041648268699646, 0.19195203483104706, 0.2618643045425415, 0.1400866061449051, -0.1878332793712616, -0.16362443566322327, -0.01124719437211752, 0.18538908660411835, -0.41964125633239746, -0.006601163186132908, -0.42531701922416687, 0.13835254311561584, -0.1044837087392807, 0.13674724102020264, -0.46791884303092957, -0.031234271824359894, 0.10295358300209045, 0.1681157946586609, 0.4023902714252472, -0.28434714674949646, 0.5852194428443909, -0.2737247943878174, -0.013412251137197018, 0.2795955538749695, -0.7273977994918823, 0.07802937924861908, 0.1663559377193451, -0.006693722680211067, 0.47355639934539795, 0.42285436391830444, -0.008797137066721916, 0.31834790110588074, -0.0838811919093132, 0.24509650468826294, 0.09562769532203674, 0.1964690387248993, 0.07900355011224747, 0.5843228101730347, -0.05012740194797516, 0.005099525675177574, 0.08080445975065231, -0.32141873240470886, 0.5988569855690002, 0.11403575539588928, 0.46223366260528564, 0.39239293336868286, 0.06146817281842232, 0.21833732724189758, -0.18167737126350403, -0.23739802837371826, 0.026463331654667854, -0.23568008840084076, -0.28849852085113525, 0.00586059270426631, 0.14680829644203186, -0.19645656645298004, 0.30137941241264343, -0.24606125056743622, 0.10709382593631744, 0.42183223366737366, 0.13881856203079224, 0.17138324677944183, 0.04041580855846405, 0.2613673508167267, -0.39963749051094055, -0.2026008516550064, -0.1755855828523636, -0.17055673897266388, -0.1746133267879486, -0.06112959235906601, 0.1994912177324295, 0.21028555929660797, 0.03375071659684181, 0.18469007313251495, 0.04340057820081711, -0.15289315581321716, -0.10800724476575851, 0.2392735779285431, -0.020254401490092278, 0.2720688581466675, 0.12153631448745728, 0.07032115012407303, -0.28772032260894775, 0.28941410779953003, 0.19511893391609192, -0.20477241277694702, 0.289050817489624, 0.10895076394081116, 0.1802472621202469, -0.3298683166503906, -0.12435644865036011, 0.2506781220436096, -0.02377445437014103, -0.029840420931577682, -0.11056379228830338, 0.09192073345184326, 0.15119515359401703, 0.1865123063325882, -0.18519650399684906, 0.28002840280532837, -0.021161247044801712, 0.07372632622718811, -0.11322178691625595, 0.5642180442810059, -0.24571286141872406, 0.28290823101997375, -0.0625574141740799, -0.012816466391086578, 0.30056989192962646, -0.062531478703022, -0.08799725770950317, -0.17144665122032166, 0.26607999205589294, 0.16319426894187927, -0.11388422548770905, 0.056223396211862564, -0.4401578903198242, -0.05164876952767372, 0.5020250678062439, -0.03905153647065163, 0.1236080676317215, 0.2182702273130417, 0.023058734834194183, -0.032823894172906876, 0.08202306926250458, 0.09209717065095901, 0.2714563012123108, 0.12381835281848907, -0.08929764479398727, 0.04322098195552826, 0.15454569458961487, -0.07743926346302032, 0.2806868851184845, 0.17417271435260773, 0.2688156068325043, 0.2540609836578369, 0.1505659520626068, 0.17752109467983246, -0.14117413759231567, -0.33142954111099243, -0.18644973635673523, 0.11156833171844482, -0.3104499280452728, 0.33212074637413025, -0.20764029026031494, -0.09999916702508926, -0.44916674494743347, -0.3982090950012207, -0.2386237382888794, -0.23002709448337555, -0.23674628138542175, -0.11908311396837234, -0.43339353799819946, -0.07528786361217499, -0.14493955671787262, 0.09910333901643753, 0.16978983581066132, -0.00457338010892272, 0.029529284685850143, 0.006193776149302721, -0.08695749938488007, -0.07575202733278275, 0.025316329672932625, -0.15593205392360687, 0.015303072519600391, 0.11565078794956207, 0.17039859294891357, -0.06139136850833893, 0.16796591877937317, 0.06882701069116592, -0.02360915206372738, -0.10930904000997543, 0.14025263488292694, 0.26711347699165344, -0.055195752531290054, -0.5096026062965393, -0.01152680441737175, 0.16024833917617798, 0.028143608942627907, 0.13682405650615692, -0.10921019315719604, -0.21881747245788574, -0.07029558718204498, -0.03415728360414505, -0.001832945505157113, -0.3069935441017151, 0.4799242317676544, -0.08552584797143936, 0.0724557638168335, -0.052704617381095886, 0.1263265162706375, -0.0759279876947403, 0.04029392823576927, -0.2723291218280792, 0.1749476194381714, -0.4066644310951233, 0.037872761487960815, -0.2577098309993744, -0.2774896025657654, 0.11501210182905197, 0.14480310678482056, -0.047312308102846146, -0.0669015645980835, -0.36179307103157043, 0.5396344065666199, -0.13072235882282257, 0.3153798282146454, -0.15099428594112396, 0.14081639051437378, 0.10639142245054245, -0.05154407024383545, -0.048192333430051804, -0.009552272036671638, 0.12017779797315598, 0.187593474984169, 0.044818464666604996, 0.4433206617832184, -0.04138106852769852, 0.7773232460021973, -0.19269783794879913, -0.24449944496154785, 0.7898445129394531, 0.1316351741552353, 0.21158932149410248, 0.11514561623334885, 0.13901743292808533, -0.13535936176776886, -0.027930352836847305, 0.04556483402848244, -0.1468818485736847, -0.07662025094032288, 0.18344874680042267, -0.014941087923943996, -0.11806080490350723, 0.06473462283611298, -0.04257836937904358, -0.3984568119049072, -0.3288906514644623, 0.1766890585422516, -0.09409233182668686, 0.305763304233551, -0.2974819540977478, -0.021245699375867844, -0.06645605713129044, 0.08713071048259735, -0.19681890308856964, 0.004139088559895754, 0.2274210900068283, 0.10770594328641891, -0.4807263910770416, -0.4307634234428406, -0.5369927287101746, 0.21023011207580566, 0.041018955409526825, 0.7110477685928345, 0.13480998575687408, 0.12581200897693634, -0.04932715743780136, -0.06794506311416626, 0.7193495631217957, 0.037715375423431396, -0.25523659586906433, 0.18222148716449738, 0.3052653968334198, -0.22057048976421356, -0.07528393715620041, 0.16747230291366577, 0.22765600681304932, 0.7511647939682007, 0.025430310517549515, -0.27797800302505493, -0.017720168456435204, 0.2570812702178955, 0.26925402879714966, -0.13744030892848969, -0.26427528262138367, -0.17530839145183563, -0.145565003156662, -0.0927022397518158, -0.20501907169818878, 0.07761133462190628, 0.4493768513202667, -0.15859906375408173, -0.14479777216911316, 0.016642123460769653, -0.41100993752479553, 0.023444196209311485, 0.03326612338423729, 0.22651644051074982, -0.033993903547525406, 0.12269758433103561, -0.09172281622886658, 0.3180519938468933, 0.5115267038345337, 0.1914927065372467, 0.03663238137960434, -0.37832218408584595, -0.05974786728620529, -0.3364688456058502, 0.37302058935165405, -0.09453918039798737, -0.2697616219520569, 0.08902433514595032, -0.12257163226604462, 0.3454495966434479, 0.09784626960754395, -0.31965896487236023, 0.34487295150756836, 0.1271500289440155, -0.8693086504936218, 0.040329184383153915, 0.3497121036052704, 0.07549186795949936, 0.2559957206249237, 0.16324660181999207, -0.29136452078819275, -0.4001288115978241, 0.1954014152288437, -0.22158962488174438, 0.5349743962287903, 0.400005042552948, 0.12563882768154144, 0.07806051522493362, -0.4380120635032654, 0.6267950534820557, 0.10976024717092514, 0.06205189973115921, -0.20522455871105194, 0.3821626603603363, 0.08683480322360992, -0.14589343965053558, 0.19961674511432648, 0.010887857526540756, -0.09757325798273087, 0.062053434550762177, -0.5207388997077942, -0.2721307873725891, -0.21038925647735596, 0.06331939995288849, 0.2039901167154312, -0.21075527369976044, -0.5702716708183289, -0.0021739378571510315, -0.060788001865148544, -0.25334563851356506, -0.06705543398857117, -0.20457664132118225, 0.059033941477537155, -0.12512809038162231, -0.3649454414844513, 0.0907054916024208, 0.1318024843931198, 0.20618316531181335, 0.3368249535560608, -0.19523245096206665, 0.14475351572036743, -0.1788710206747055, 0.2955818772315979, 0.10777044296264648, 0.004501646384596825, -0.06743846088647842, -0.11309002339839935, -0.10784029215574265, 0.05716784670948982, 0.038885485380887985, 0.1876399964094162, -0.015558157116174698, -0.12591896951198578, 0.19381478428840637, 0.0704369768500328, -0.19352930784225464, -0.09629347920417786, 0.20299018919467926, -0.2946878969669342, -0.3295081555843353, -0.16238786280155182, 0.03291592746973038, 0.2324553281068802, -0.1372099071741104, 0.03906723111867905, 0.19242677092552185, 0.02804100513458252, 0.32966288924217224, -0.3757058084011078, -0.1614169031381607, -0.33908888697624207, 0.11047632992267609, 0.0222628116607666, -0.1946793645620346, 0.27510160207748413, 0.5374062657356262, -0.24167343974113464, -0.04294547811150551, 0.46251800656318665, 0.32019954919815063, -0.4603797197341919, 0.534143328666687, -0.0770808756351471, 0.24495229125022888, -0.120336152613163, 0.4825567603111267, 0.07726526260375977, 0.0012956038117408752, 0.12111817300319672, -0.3984120190143585, -0.22245699167251587, 0.0035764039494097233, 0.18035253882408142, 0.0048175654374063015, 0.07670684903860092, 0.5469903945922852, 0.09695128351449966, -0.22412438690662384, -0.14053261280059814, -0.013053406961262226, -0.2337542027235031, 0.033345699310302734, -0.09655307978391647, -0.032213471829891205, 0.03569907322525978, -0.07310087233781815, 0.03665361925959587, 0.11454230546951294, 0.016435718163847923, -0.12364878505468369, -0.3727947771549225, 0.1271933615207672, 0.15571412444114685, -0.21100164949893951, 0.14340631663799286, -0.003373382380232215, -0.2501892149448395, 0.010250052437186241, 0.1792968362569809, 0.06191256269812584, -0.09441930055618286, -0.04588296264410019, 0.1153452917933464, -0.16106368601322174, -0.0681878924369812, 0.10865765810012817, 0.20254652202129364, 0.548892617225647, 0.011907513253390789, 0.4053369164466858, -0.07165804505348206, -0.07321461290121078, -0.4471324384212494, 0.027735143899917603, -0.20394137501716614, 0.30017125606536865, 0.14361810684204102, -0.7271794080734253, -0.09986764192581177, 0.36713457107543945, 0.16161558032035828, 0.29150694608688354, -0.24271222949028015, 0.07722146809101105, 0.04694158211350441, 0.1624557077884674, -0.015732306987047195, -0.180233433842659, -0.008785401470959187, 0.08276308327913284, -0.19238562881946564, 0.02706865966320038, -0.03086036816239357, -0.41434770822525024, -0.17525288462638855, -0.04088987037539482, 0.3402949571609497, 0.15338248014450073, 0.2932591736316681, 0.38383281230926514, 0.18604716658592224, 0.16127949953079224, -0.08301310986280441, 0.30843913555145264, 0.1719074249267578, 0.041355691850185394, 0.2358129620552063, -0.15187089145183563, 0.549908459186554, -0.07974924147129059, -0.21099108457565308, -0.48420166969299316, -0.10135551542043686, 0.038555849343538284, -0.21277926862239838, 0.28789639472961426, 0.17867633700370789, 0.14122620224952698, -0.20532219111919403, -0.05851096659898758, -0.13162456452846527, 0.14698250591754913, -0.15497565269470215, -0.019158070906996727, -0.21657046675682068, 0.04539390653371811, 0.21189020574092865, 0.09916713833808899, 0.04389844834804535, 0.22560101747512817, -0.2876899540424347, 0.21127717196941376, -0.021982703357934952, -0.4377118647098541, 0.11448325216770172, -0.11127490550279617, 0.21589750051498413, -0.27425017952919006, 0.04280795902013779, 0.14317291975021362, -0.06423058360815048, -0.083195760846138, 0.1545313596725464, 0.5885651111602783, 0.26976996660232544, 0.26488253474235535, -0.12080015987157822, -0.17063583433628082, 0.10733509063720703, 0.1742764711380005, 0.16861018538475037, 0.23148520290851593, -0.01364557072520256, 0.17520245909690857, 0.039228059351444244, -0.06720901280641556, 0.38386106491088867, 0.18975786864757538, 0.11000563949346542, 0.0028360849246382713, 0.17690201103687286, -0.19848069548606873, -0.19822938740253448, -0.4200228750705719, -0.17106595635414124, -0.25587689876556396, -0.0049825990572571754, 0.3394447863101959, -0.1537775695323944, -0.1319400519132614, -0.09986083209514618, 0.029187142848968506, -0.27284228801727295, 0.4100101590156555, 0.3090417981147766, 0.3422875702381134, -0.03625453636050224, -0.13756294548511505, 0.10790295153856277, -0.11085298657417297, -0.27091652154922485, 0.38404446840286255, 0.3714984953403473, 0.2755204439163208, -0.2814261317253113, -0.05659535527229309, 0.2465706169605255, 0.6157266497612, -0.5056517124176025, 0.012001738883554935, -0.3906678557395935, 0.11916252970695496, 0.36681437492370605, 0.08031557500362396, -0.1651151329278946, -0.12296294420957565, 0.49000489711761475, -0.12068183720111847, -0.0789341926574707, -0.11988779902458191, 0.09806369990110397, -0.10925263911485672, 0.076708123087883, 0.015267317183315754, 0.4078817665576935, 0.025043034926056862, -0.029551107436418533, -0.20831696689128876, -0.294170081615448, -0.192832350730896, 0.061478860676288605, 0.3428517282009125, 0.25533702969551086, 0.5357608199119568, -0.1673204004764557, -0.03850830718874931, -0.1830640733242035, 0.2234831154346466, -0.032889917492866516, -0.3865862786769867, -0.1538769006729126, 0.06417611241340637, -0.1441626399755478, 0.01285733561962843, 0.28595787286758423, 0.22450441122055054, -0.08729543536901474, 0.2617088258266449, 0.05295205116271973, -0.26854878664016724, 0.061697326600551605, -0.4994949996471405, -0.3638347387313843, -0.04777432978153229, 0.23986537754535675, 0.2502557039260864, -0.04802871495485306, -0.046989038586616516, 0.16219423711299896, 0.35885414481163025, -0.15037445724010468, -0.35271120071411133, 0.18693524599075317, -0.19289211928844452, -0.05971409007906914, 0.17860527336597443, 0.2957511246204376, 0.2869985103607178, -0.4042107164859772, 0.25421613454818726, -0.12487974762916565 ]
https://github.com/huggingface/datasets/issues/2615
Jsonlines export error
@TevenLeScao I have just checked it: this was a bug in `pandas` and it was fixed in version 1.2: https://github.com/pandas-dev/pandas/pull/36898
## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1
20
Jsonlines export error ## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1 @TevenLeScao I have just checked it: this was a bug in `pandas` and it was fixed in version 1.2: https://github.com/pandas-dev/pandas/pull/36898
[ -0.3412722945213318, 0.12403075397014618, -0.005501963198184967, 0.25801771879196167, 0.10834053158760071, 0.07570438086986542, 0.30358684062957764, 0.40695032477378845, 0.026413382962346077, -0.04118327796459198, 0.27453967928886414, 0.006749006453901529, 0.13871614634990692, 0.17417891323566437, -0.20554938912391663, -0.24398623406887054, 0.20179006457328796, -0.02124672755599022, 0.008457661606371403, 0.22758851945400238, -0.31021520495414734, 0.22211161255836487, -0.16968189179897308, -0.14789320528507233, -0.46801212430000305, -0.32303914427757263, 0.06546533107757568, -0.04150151461362839, 0.046014707535505295, -0.42860808968544006, -0.03551756963133812, -0.2563440501689911, 0.44138777256011963, 0.5364949703216553, -0.00011903702397830784, -0.2155592441558838, 0.33192744851112366, 0.01826937310397625, -0.20523908734321594, 0.06863518059253693, -0.4720399081707001, -0.39540931582450867, 0.021964645013213158, -0.3430720269680023, 0.4541320502758026, -0.17430640757083893, -0.33281800150871277, -0.4177090525627136, 0.6475176215171814, 0.37079495191574097, 0.14861105382442474, -0.032841846346855164, 0.1063491478562355, -0.03713352233171463, -0.20363368093967438, 0.08379634469747543, 0.020011132583022118, 0.11599358916282654, -0.23790186643600464, 0.20983628928661346, 0.23007532954216003, -0.07169763743877411, -0.12556619942188263, -0.23419445753097534, -0.17675095796585083, -0.06569614261388779, -0.022257395088672638, -0.299270898103714, 0.1961590200662613, 0.44493433833122253, 0.20297032594680786, -0.1828809231519699, -0.2681330740451813, -0.4125078618526459, 0.11130529642105103, -0.5898330807685852, 0.052937235683202744, 0.4741688072681427, 0.034709468483924866, 0.08704721927642822, -0.11217739433050156, -0.08080539852380753, -0.21300576627254486, -0.05697470158338547, -0.05033853277564049, -0.2372407615184784, -0.15188157558441162, -0.018115341663360596, -0.20366045832633972, -0.14652101695537567, 0.002788291312754154, -0.2815827429294586, -0.4799128472805023, 0.02456602267920971, -0.1968795508146286, 0.07400868833065033, 0.15187443792819977, -0.5287784337997437, 0.052220821380615234, -0.07783516496419907, 0.3272016644477844, -0.3820249140262604, 0.12911251187324524, 0.07608558237552643, 0.5744823217391968, 0.21209357678890228, 0.18299376964569092, -0.07161986082792282, 0.3002837896347046, 0.03136220946907997, 0.09648863226175308, -0.08939453214406967, 0.06885141134262085, -0.23532402515411377, 0.068399578332901, 0.0023817268665879965, 0.03288886696100235, -0.05248875543475151, -0.0941910371184349, 0.22880080342292786, -0.3604731261730194, -0.15770983695983887, -0.27643218636512756, -0.18580251932144165, -0.12722180783748627, 0.32874205708503723, 0.13087035715579987, 0.2427654266357422, -0.08450643718242645, 0.04720096290111542, -0.06987588107585907, -0.03750373423099518, -0.0055309198796749115, -0.05350581184029579, -0.05424915999174118, -0.17534150183200836, 0.010775694623589516, 0.24156993627548218, -0.08612892776727676, -0.28998008370399475, -0.15351250767707825, -0.11275438219308853, -0.1566496044397354, 0.24032028019428253, 0.3214481770992279, 0.14449845254421234, -0.14729884266853333, -0.17948637902736664, -0.015587829984724522, 0.1483362466096878, -0.41300880908966064, -0.015012258663773537, -0.3744749128818512, 0.13524754345417023, -0.14235539734363556, 0.14807021617889404, -0.5019348859786987, -0.03146931901574135, 0.07775330543518066, 0.19644290208816528, 0.4208013713359833, -0.25308412313461304, 0.6042641401290894, -0.28486332297325134, 0.014876079745590687, 0.2816116213798523, -0.7312352061271667, 0.10305903851985931, 0.1470305472612381, 0.03616563230752945, 0.48975634574890137, 0.4170343279838562, -0.024581316858530045, 0.3368767201900482, -0.11289950460195541, 0.2621539831161499, 0.07115840166807175, 0.20940345525741577, 0.09824726730585098, 0.5672949552536011, -0.07086382061243057, 0.018282713368535042, 0.02979867160320282, -0.30012860894203186, 0.5715805292129517, 0.1137629821896553, 0.4756498634815216, 0.4330528974533081, 0.03842579200863838, 0.22938485443592072, -0.16469430923461914, -0.19791147112846375, 0.03481538966298103, -0.24833643436431885, -0.2546769976615906, 0.002669197041541338, 0.15434600412845612, -0.19281628727912903, 0.26443636417388916, -0.24100716412067413, 0.12512105703353882, 0.42681175470352173, 0.13288499414920807, 0.14179831743240356, 0.02186708338558674, 0.24896670877933502, -0.38055017590522766, -0.19011670351028442, -0.15666735172271729, -0.1665303260087967, -0.16085252165794373, -0.07391437143087387, 0.17346498370170593, 0.18610502779483795, 0.03880959004163742, 0.15548624098300934, 0.05027003213763237, -0.1581519991159439, -0.13645094633102417, 0.27177563309669495, -0.053062260150909424, 0.3020297586917877, 0.13651350140571594, 0.057023510336875916, -0.26733139157295227, 0.2672393321990967, 0.23919448256492615, -0.17067041993141174, 0.3222699761390686, 0.11060287803411484, 0.18305976688861847, -0.2960667014122009, -0.15149512887001038, 0.2638213634490967, -0.03771446645259857, 0.02161773480474949, -0.1175803393125534, 0.06696576625108719, 0.1620994210243225, 0.19487106800079346, -0.2273026406764984, 0.25844791531562805, -0.012185251340270042, 0.061359405517578125, -0.14027732610702515, 0.6026521325111389, -0.26411351561546326, 0.27334097027778625, -0.036850519478321075, 0.027414066717028618, 0.33734267950057983, -0.10238178819417953, -0.10842079669237137, -0.15803410112857819, 0.23595140874385834, 0.14346301555633545, -0.12257172167301178, 0.05400600656867027, -0.4003918170928955, -0.03036520816385746, 0.5197224020957947, 0.0007628131425008178, 0.11705674231052399, 0.18443043529987335, 0.03392082080245018, -0.015437987633049488, 0.07595162838697433, 0.12546558678150177, 0.2930735945701599, 0.12649808824062347, -0.039446670562028885, 0.052566248923540115, 0.11511701345443726, -0.08624275028705597, 0.28487202525138855, 0.17118096351623535, 0.26938396692276, 0.24856920540332794, 0.14662328362464905, 0.19778211414813995, -0.13943448662757874, -0.33734238147735596, -0.175552099943161, 0.1275867372751236, -0.3030412793159485, 0.3055092990398407, -0.1936161369085312, -0.1043047234416008, -0.3914400637149811, -0.4014573097229004, -0.20602470636367798, -0.29551810026168823, -0.24153415858745575, -0.09551133960485458, -0.46586692333221436, -0.08531267195940018, -0.16178108751773834, 0.09635841101408005, 0.15710100531578064, -0.00043579001794569194, 0.019278401508927345, 0.0009034342365339398, -0.043102432042360306, -0.05494698882102966, -0.004951634909957647, -0.12387268245220184, 0.027097860351204872, 0.16012172400951385, 0.1456882208585739, -0.09701238572597504, 0.1815309077501297, 0.04111113026738167, -0.018820131197571754, -0.08321402966976166, 0.14754487574100494, 0.2630807161331177, -0.07275045663118362, -0.5481503009796143, -0.018291207030415535, 0.16640450060367584, 0.038401614874601364, 0.14124968647956848, -0.12064662575721741, -0.18627141416072845, -0.09327518194913864, -0.06034841015934944, 0.019440891221165657, -0.3349900245666504, 0.4810390770435333, -0.10552826523780823, 0.02690117247402668, -0.08642223477363586, 0.147610142827034, -0.06420283019542694, 0.07812358438968658, -0.26733192801475525, 0.15394563972949982, -0.4169495105743408, 0.030544742941856384, -0.2566613554954529, -0.2721676528453827, 0.12775535881519318, 0.09632086008787155, 0.009676956571638584, -0.07825863361358643, -0.3716351389884949, 0.521165668964386, -0.14658795297145844, 0.31202414631843567, -0.11969636380672455, 0.19106142222881317, 0.07264307886362076, -0.0763164833188057, -0.0702415257692337, 0.026829581707715988, 0.151651993393898, 0.1500845104455948, 0.06341760605573654, 0.4252825379371643, -0.06817826628684998, 0.7963741421699524, -0.20709198713302612, -0.24280214309692383, 0.7851778864860535, 0.1798444390296936, 0.21473726630210876, 0.11149760335683823, 0.17719820141792297, -0.13248851895332336, -0.051630210131406784, 0.05629856884479523, -0.1535123884677887, -0.08478175848722458, 0.13839037716388702, -0.03342069685459137, -0.09914781153202057, 0.034630317240953445, -0.03831138089299202, -0.39570507407188416, -0.33720776438713074, 0.16532248258590698, -0.12995877861976624, 0.2785851061344147, -0.27963608503341675, -0.056924108415842056, -0.0546334832906723, 0.11190314590930939, -0.22682467103004456, -0.025355709716677666, 0.2500806152820587, 0.09088607877492905, -0.41925740242004395, -0.4416009485721588, -0.5331692695617676, 0.16814382374286652, 0.026706712320446968, 0.6945689916610718, 0.15230205655097961, 0.12404972314834595, -0.06367482244968414, -0.055426836013793945, 0.6983473300933838, 0.02643153816461563, -0.29249194264411926, 0.16996119916439056, 0.2758515775203705, -0.22671346366405487, -0.06627927720546722, 0.1623205542564392, 0.1873941868543625, 0.7814658284187317, -0.004075450822710991, -0.28578320145606995, -0.0204493198543787, 0.26294517517089844, 0.27128487825393677, -0.15387026965618134, -0.2529328465461731, -0.1603032350540161, -0.19973765313625336, -0.08141501247882843, -0.17845946550369263, 0.15627926588058472, 0.4531792104244232, -0.20902399718761444, -0.15922334790229797, -0.007168871350586414, -0.4004323184490204, 0.03992454707622528, 0.03999246656894684, 0.19509118795394897, -0.01080477423965931, 0.15040774643421173, -0.12283424288034439, 0.26946258544921875, 0.47117549180984497, 0.229025200009346, 0.009292544797062874, -0.3669431805610657, -0.07097751647233963, -0.3196600377559662, 0.38022381067276, -0.0930674821138382, -0.28097835183143616, 0.08544936776161194, -0.15418824553489685, 0.36330848932266235, 0.12155928462743759, -0.2874756157398224, 0.3155454099178314, 0.15527504682540894, -0.8324906229972839, 0.026684222742915154, 0.36578866839408875, 0.11177811026573181, 0.2571146786212921, 0.19805476069450378, -0.2689133286476135, -0.37629878520965576, 0.17021019756793976, -0.2446853369474411, 0.4795724153518677, 0.38245531916618347, 0.1580193042755127, 0.11303454637527466, -0.4080253839492798, 0.6761995553970337, 0.08912885934114456, 0.045614805072546005, -0.18873727321624756, 0.34552428126335144, 0.09429280459880829, -0.1524703949689865, 0.17187075316905975, 0.0052317362278699875, -0.08847615122795105, 0.07359812408685684, -0.5113873481750488, -0.24493719637393951, -0.19313962757587433, 0.047589004039764404, 0.20214588940143585, -0.23214071989059448, -0.6011218428611755, -0.0003101041365880519, -0.03181062638759613, -0.26168006658554077, -0.045188236981630325, -0.18009167909622192, 0.05360622704029083, -0.09577314555644989, -0.36106881499290466, 0.08353421837091446, 0.14783449470996857, 0.18613624572753906, 0.3207150101661682, -0.16696587204933167, 0.15205509960651398, -0.1513991355895996, 0.3327764868736267, 0.11784256994724274, 0.007848302833735943, -0.07549085468053818, -0.09934982657432556, -0.08848202973604202, 0.05147308483719826, 0.050672437995672226, 0.21071837842464447, 0.006188308820128441, -0.09544721245765686, 0.253842294216156, 0.07022088766098022, -0.1800709068775177, -0.07872649282217026, 0.2651980221271515, -0.3444177806377411, -0.3410686254501343, -0.1577455699443817, 0.023549651727080345, 0.23345032334327698, -0.16997595131397247, 0.051646988838911057, 0.20958897471427917, 0.014996332116425037, 0.34835273027420044, -0.3776894509792328, -0.17215129733085632, -0.34805646538734436, 0.100250244140625, 0.04550525173544884, -0.1881161481142044, 0.24463073909282684, 0.48354652523994446, -0.24977964162826538, -0.02742793783545494, 0.42381784319877625, 0.34465086460113525, -0.4265531599521637, 0.5984868407249451, -0.10052070766687393, 0.22189505398273468, -0.14154745638370514, 0.4189104735851288, 0.06582710146903992, 0.02647012285888195, 0.11265193670988083, -0.3906412720680237, -0.243843212723732, -0.011030073277652264, 0.19854387640953064, 0.03168872743844986, 0.08003827929496765, 0.5649987459182739, 0.0825439840555191, -0.19616498053073883, -0.14319661259651184, -0.004007586743682623, -0.26326483488082886, 0.020001066848635674, -0.09764963388442993, 0.005412235856056213, 0.030438467860221863, -0.05904605612158775, 0.04677389934659004, 0.1368299275636673, 0.030649462714791298, -0.1308160424232483, -0.403076171875, 0.11219647526741028, 0.18126177787780762, -0.21315017342567444, 0.15760913491249084, -0.025361916050314903, -0.2624445855617523, -0.012082903645932674, 0.17904643714427948, 0.09029333293437958, -0.1016898974776268, -0.046446532011032104, 0.1531551629304886, -0.15982335805892944, -0.056273963302373886, 0.11641134321689606, 0.21096420288085938, 0.5365225076675415, 0.03063417226076126, 0.3913276791572571, -0.08806539326906204, -0.055530209094285965, -0.4043062925338745, -0.017954563722014427, -0.23436497151851654, 0.2840465307235718, 0.15192574262619019, -0.696672260761261, -0.10602850466966629, 0.3511359691619873, 0.17171962559223175, 0.28472253680229187, -0.25997820496559143, 0.11797547340393066, 0.06566082686185837, 0.15840977430343628, -0.057225871831178665, -0.15186913311481476, -0.0016453926218673587, 0.1128949522972107, -0.13792388141155243, 0.04017520695924759, -0.00580366887152195, -0.43508148193359375, -0.15296120941638947, -0.05427525192499161, 0.3313520550727844, 0.13988561928272247, 0.2754511833190918, 0.3992125689983368, 0.17215831577777863, 0.17697438597679138, -0.05640293285250664, 0.2889544367790222, 0.17739549279212952, 0.0684141293168068, 0.20140577852725983, -0.16212712228298187, 0.4717501401901245, -0.09537514299154282, -0.20968268811702728, -0.48198631405830383, -0.07465889304876328, 0.007944746874272823, -0.2684752643108368, 0.26579180359840393, 0.16357079148292542, 0.11677651852369308, -0.2271026372909546, -0.01011524349451065, -0.07705716043710709, 0.17644383013248444, -0.17316363751888275, 0.00391338812187314, -0.15827223658561707, 0.0181202944368124, 0.2310754954814911, 0.10336201637983322, 0.09146019071340561, 0.19709445536136627, -0.25585126876831055, 0.19263505935668945, -0.01599074900150299, -0.39487960934638977, 0.13563400506973267, -0.11074554920196533, 0.22688743472099304, -0.27257564663887024, -0.00007609482418047264, 0.16755086183547974, -0.09849479794502258, -0.1251690685749054, 0.16203491389751434, 0.5886417627334595, 0.2581673562526703, 0.28168603777885437, -0.11514414101839066, -0.13930748403072357, 0.09206431359052658, 0.1447826623916626, 0.1526225209236145, 0.23008881509304047, -0.012619590386748314, 0.1981307715177536, 0.057374972850084305, -0.08566755801439285, 0.3561897277832031, 0.18137969076633453, 0.12666454911231995, -0.03047449328005314, 0.21053731441497803, -0.17604175209999084, -0.19700029492378235, -0.43459364771842957, -0.15644755959510803, -0.20984189212322235, -0.039111632853746414, 0.32377466559410095, -0.18789249658584595, -0.11117834597826004, -0.10994017124176025, 0.0362066887319088, -0.2735573351383209, 0.393552303314209, 0.3105427622795105, 0.34715279936790466, -0.05775599926710129, -0.1337614357471466, 0.0504734180867672, -0.09896816313266754, -0.3138725161552429, 0.3750603199005127, 0.36298686265945435, 0.27409595251083374, -0.3101060390472412, -0.06367121636867523, 0.24083198606967926, 0.6288330554962158, -0.47640305757522583, -0.015228718519210815, -0.39451467990875244, 0.017096715047955513, 0.29933997988700867, 0.07333023101091385, -0.16313348710536957, -0.11501836776733398, 0.4784141778945923, -0.09131763875484467, -0.06442150473594666, -0.10116066783666611, 0.12137828022241592, -0.08693451434373856, 0.1177806407213211, -0.02370450459420681, 0.4274005591869354, 0.004520086105912924, -0.04165100306272507, -0.1996573656797409, -0.30477625131607056, -0.16739754378795624, 0.04482435807585716, 0.29766055941581726, 0.264057993888855, 0.5109524726867676, -0.14673715829849243, -0.11967979371547699, -0.20361016690731049, 0.23331625759601593, 0.0009663106757216156, -0.3993261158466339, -0.15931423008441925, 0.06733766198158264, -0.12506003677845, 0.05300264060497284, 0.29794633388519287, 0.26033324003219604, -0.10928798466920853, 0.27850431203842163, 0.0814720168709755, -0.2846652567386627, 0.09906458854675293, -0.4734436869621277, -0.36315956711769104, -0.07001452893018723, 0.23074503242969513, 0.24492822587490082, -0.03573331609368324, -0.0005882987170480192, 0.15984830260276794, 0.33970537781715393, -0.15277011692523956, -0.373535692691803, 0.16939407587051392, -0.20994539558887482, -0.037030983716249466, 0.18277806043624878, 0.24769821763038635, 0.3111516535282135, -0.36870232224464417, 0.2597651481628418, -0.1153496578335762 ]
https://github.com/huggingface/datasets/issues/2615
Jsonlines export error
Sorry, I was also talking to teven offline so I already had the PR ready before noticing x)
## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1
18
Jsonlines export error ## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1 Sorry, I was also talking to teven offline so I already had the PR ready before noticing x)
[ -0.37644094228744507, 0.062102582305669785, -0.024925492703914642, 0.286175400018692, 0.04461922496557236, 0.08094958961009979, 0.15584604442119598, 0.397174209356308, 0.051058780401945114, -0.04763747751712799, 0.3336995542049408, 0.004116065334528685, 0.08341795951128006, 0.158275306224823, -0.13219307363033295, -0.1995779573917389, 0.19296015799045563, -0.07226331532001495, 0.08719753473997116, 0.2302476316690445, -0.23156537115573883, 0.2663528323173523, -0.18390710651874542, -0.20316316187381744, -0.4015367925167084, -0.27350661158561707, 0.15770186483860016, -0.005098668858408928, 0.043692056089639664, -0.4615623652935028, -0.09915022552013397, -0.2882114350795746, 0.49962544441223145, 0.49229487776756287, -0.00011962991993641481, -0.17145106196403503, 0.28764140605926514, -0.03895734250545502, -0.20020346343517303, 0.08754244446754456, -0.4354243874549866, -0.39700618386268616, -0.0468420535326004, -0.35968494415283203, 0.3823303282260895, -0.10171359032392502, -0.3481951355934143, -0.4584701657295227, 0.655817985534668, 0.4028024971485138, 0.14248992502689362, 0.016279742121696472, 0.13830965757369995, 0.01707863248884678, -0.07578975707292557, 0.06951194256544113, -0.004296510946005583, 0.10235773772001266, -0.1442514955997467, 0.3273943066596985, 0.24776826798915863, -0.0633082166314125, -0.16424338519573212, -0.27507561445236206, -0.12257517129182816, -0.08651957660913467, -0.09251514822244644, -0.251667857170105, 0.1980655938386917, 0.3637441098690033, 0.18418730795383453, -0.20282672345638275, -0.14577548205852509, -0.32029128074645996, 0.07138460874557495, -0.6242572069168091, 0.05028577148914337, 0.517745316028595, -0.0037661271635442972, 0.11183987557888031, -0.22351279854774475, -0.09080866724252701, -0.2312038391828537, -0.029723048210144043, 0.0023634193930774927, -0.22776442766189575, -0.11781861633062363, 0.00402857456356287, -0.16745369136333466, -0.09842490404844284, -0.11116689443588257, -0.22272418439388275, -0.5720722079277039, -0.014036539942026138, -0.17840956151485443, 0.04437362775206566, 0.13686567544937134, -0.4408858120441437, 0.10792191326618195, -0.04604026675224304, 0.33374395966529846, -0.38531383872032166, 0.20835965871810913, 0.05007537081837654, 0.5481045842170715, 0.19067098200321198, 0.28014668822288513, -0.11003673076629639, 0.25983572006225586, -0.021328063681721687, 0.08850124478340149, -0.07924269139766693, 0.04713838919997215, -0.20015032589435577, 0.09543220698833466, 0.03854683041572571, -0.027139626443386078, -0.0987015813589096, -0.05992726609110832, 0.2017267495393753, -0.407875120639801, -0.1518075168132782, -0.28079143166542053, -0.18515299260616302, -0.09836744517087936, 0.22934894263744354, 0.16236913204193115, 0.272074818611145, -0.16856810450553894, -0.10858607292175293, -0.04240023344755173, -0.08287587016820908, -0.07478892803192139, -0.04330472648143768, -0.03373148664832115, -0.15753020346164703, -0.020363692194223404, 0.2245580554008484, -0.0742419958114624, -0.2805359959602356, -0.10958724468946457, -0.03569021448493004, -0.1673438549041748, 0.17966821789741516, 0.28526440262794495, 0.12752525508403778, -0.16396202147006989, -0.21394000947475433, -0.015400846488773823, 0.19687151908874512, -0.4836388826370239, -0.07495421916246414, -0.36041757464408875, 0.14187519252300262, -0.17853128910064697, 0.11251474171876907, -0.4827483892440796, -0.08809682726860046, 0.10055331140756607, 0.17400355637073517, 0.35339847207069397, -0.27883175015449524, 0.6303637027740479, -0.2761407494544983, 0.02790301851928234, 0.23053492605686188, -0.74881911277771, 0.0958138033747673, 0.18259833753108978, 0.015945034101605415, 0.4496084749698639, 0.3953610956668854, -0.02373485453426838, 0.3770439624786377, -0.08816590160131454, 0.28357696533203125, 0.10067084431648254, 0.19749794900417328, 0.11717784404754639, 0.49387943744659424, -0.07221788913011551, -0.006322309374809265, 0.01841694302856922, -0.2992613613605499, 0.6212949752807617, 0.10847495496273041, 0.5063623189926147, 0.40432628989219666, 0.03775264322757721, 0.235362246632576, -0.21436719596385956, -0.16883915662765503, -0.055902786552906036, -0.18442943692207336, -0.3852594792842865, -0.05564349517226219, 0.15880967676639557, -0.17462584376335144, 0.2962254583835602, -0.24518761038780212, 0.11858267337083817, 0.46603095531463623, 0.08287562429904938, 0.148881196975708, 0.007621299009770155, 0.3006695508956909, -0.43986818194389343, -0.19850751757621765, -0.08823660016059875, -0.16344280540943146, -0.126803919672966, -0.03372280299663544, 0.19733379781246185, 0.2187892496585846, -0.03818938508629799, 0.13924601674079895, 0.051201749593019485, -0.1272219866514206, -0.1436673104763031, 0.17980438470840454, -0.0061849309131503105, 0.23887181282043457, 0.18224939703941345, 0.02512540854513645, -0.3140972852706909, 0.28531721234321594, 0.23682628571987152, -0.20688675343990326, 0.18413975834846497, 0.12206365168094635, 0.16750803589820862, -0.34015214443206787, -0.15554341673851013, 0.22376173734664917, 0.025792965665459633, -0.08694492280483246, -0.130589097738266, 0.12461549043655396, 0.12810832262039185, 0.0885501354932785, -0.1277748942375183, 0.29191458225250244, -0.0615546889603138, 0.05734153091907501, -0.1319107711315155, 0.5513094663619995, -0.26944300532341003, 0.3201516568660736, -0.06762867420911789, -0.025417519733309746, 0.22795264422893524, -0.11077804118394852, -0.04424083232879639, -0.12894108891487122, 0.28775641322135925, 0.15129581093788147, -0.188039630651474, -0.028311748057603836, -0.3569781184196472, 0.003125240094959736, 0.5258996486663818, 0.022396797314286232, 0.03008284978568554, 0.18466930091381073, -0.021222475916147232, 0.00989894662052393, 0.0738687515258789, 0.06190888583660126, 0.26875966787338257, 0.13875573873519897, -0.06137991324067116, 0.07108467817306519, 0.2284821718931198, -0.06771394610404968, 0.2718977928161621, 0.12099277228116989, 0.22851574420928955, 0.3146283030509949, 0.19395175576210022, 0.1624785214662552, -0.11812523007392883, -0.43557846546173096, -0.23856428265571594, 0.11198998987674713, -0.3184938132762909, 0.29018157720565796, -0.14276030659675598, -0.04820556193590164, -0.47054627537727356, -0.3678218126296997, -0.2575353980064392, -0.3024017810821533, -0.16738581657409668, -0.0986446812748909, -0.4747139513492584, -0.14060264825820923, -0.11370524019002914, 0.08236132562160492, 0.09370359778404236, -0.11059123277664185, 0.038836315274238586, -0.0006975003052502871, -0.13761553168296814, -0.089718297123909, 0.01832292042672634, -0.19322557747364044, 0.10842222720384598, 0.09787710011005402, 0.10402453690767288, -0.11545974016189575, 0.12399469316005707, 0.1251719743013382, -0.015025091357529163, -0.04350079968571663, 0.12024612724781036, 0.28388074040412903, -0.036731671541929245, -0.5128857493400574, 0.033721089363098145, 0.19289173185825348, 0.03331587091088295, 0.18269072473049164, -0.0985662043094635, -0.1741504669189453, -0.09308018535375595, -0.11911360174417496, -0.0344737283885479, -0.35509371757507324, 0.44202253222465515, -0.0710536539554596, 0.030206860974431038, -0.03390937298536301, 0.12593021988868713, -0.11035428941249847, 0.06718806177377701, -0.28472262620925903, 0.23164622485637665, -0.4047395884990692, -0.010936062783002853, -0.27762290835380554, -0.22218498587608337, 0.13450786471366882, 0.17797860503196716, -0.005669638980180025, 0.013606585562229156, -0.3946295380592346, 0.6360443234443665, -0.09919599443674088, 0.4422532916069031, -0.19708585739135742, 0.15475676953792572, 0.10136360675096512, -0.05050402879714966, -0.025711866095662117, -0.023835748434066772, 0.15369196236133575, 0.153025284409523, 0.02602008730173111, 0.48948535323143005, -0.07192815840244293, 0.6651269197463989, -0.2164900004863739, -0.19084443151950836, 0.7653546929359436, 0.12346590310335159, 0.2171907126903534, 0.10957646369934082, 0.08394353091716766, -0.15813571214675903, 0.015622572042047977, 0.08679116517305374, -0.12681357562541962, -0.16432033479213715, 0.14840750396251678, 0.04009526968002319, -0.11230448633432388, 0.012048193253576756, 0.015458897687494755, -0.406456857919693, -0.3510843515396118, 0.24970278143882751, -0.01095421239733696, 0.2938515245914459, -0.3571610450744629, -0.06922154128551483, -0.05841553956270218, 0.01094930712133646, -0.23227941989898682, -0.017288103699684143, 0.22711651027202606, 0.1395559012889862, -0.5072894096374512, -0.4268556237220764, -0.4834100604057312, 0.2316376268863678, 0.0101298987865448, 0.5988483428955078, 0.13513004779815674, 0.07534179836511612, -0.08297080546617508, -0.09615329653024673, 0.6169039011001587, -0.027918456122279167, -0.18883894383907318, 0.25809675455093384, 0.38204771280288696, -0.16966082155704498, -0.11037357896566391, 0.10426323115825653, 0.16997405886650085, 0.8767217993736267, 0.0393480509519577, -0.3058122396469116, -0.031447313725948334, 0.25593873858451843, 0.3879097104072571, -0.12919053435325623, -0.2496608942747116, -0.1338587999343872, -0.18624505400657654, -0.08754251152276993, -0.2613998353481293, 0.12687627971172333, 0.4449922740459442, -0.16074056923389435, -0.15259811282157898, 0.07047563046216965, -0.30988049507141113, -0.010151447728276253, 0.003996450453996658, 0.2558419108390808, -0.10632811486721039, 0.1659553498029709, -0.12034124881029129, 0.3574884533882141, 0.4377621114253998, 0.1959051936864853, 0.06533490121364594, -0.3315354287624359, -0.0828118622303009, -0.2703198194503784, 0.4001968801021576, -0.14362938702106476, -0.2139934003353119, 0.06373684108257294, -0.192666158080101, 0.4227813482284546, 0.13682514429092407, -0.2731592059135437, 0.2954879105091095, 0.08491858094930649, -0.8648976683616638, 0.09164301306009293, 0.3287990093231201, 0.07985656708478928, 0.28319084644317627, 0.17337363958358765, -0.36568576097488403, -0.3700639009475708, 0.20085419714450836, -0.19248218834400177, 0.5724700689315796, 0.4445643723011017, 0.14518700540065765, 0.07289236038923264, -0.39680373668670654, 0.6061344742774963, -0.1380774825811386, 0.049990396946668625, -0.19445836544036865, 0.4044936001300812, 0.14807648956775665, -0.13637813925743103, 0.10135582089424133, 0.08131922036409378, -0.1146966740489006, 0.03746374696493149, -0.5104407072067261, -0.23553240299224854, -0.26618462800979614, 0.00680145900696516, 0.2548339068889618, -0.20457440614700317, -0.4993150234222412, 0.0002573989622760564, -0.09606599062681198, -0.23614004254341125, -0.07675108313560486, -0.21219468116760254, 0.09233198314905167, -0.1266331672668457, -0.3447321653366089, 0.12222045660018921, 0.06738224625587463, 0.1341661959886551, 0.35163775086402893, -0.16145873069763184, 0.14188477396965027, -0.17869247496128082, 0.26160189509391785, 0.16529975831508636, 0.030198805034160614, -0.049489349126815796, -0.04384101554751396, -0.0911644920706749, 0.10173877328634262, 0.030471209436655045, 0.09667501598596573, -0.06684906035661697, -0.1283184289932251, 0.17463083565235138, 0.040515799075365067, -0.21313171088695526, -0.13215744495391846, 0.2128763198852539, -0.22994792461395264, -0.3254310190677643, -0.08128952980041504, 0.15510599315166473, 0.22935527563095093, -0.12099754065275192, 0.043292563408613205, 0.15768474340438843, 0.0012237648479640484, 0.31726813316345215, -0.3695151209831238, -0.18020682036876678, -0.3000701367855072, 0.0828472152352333, 0.0605170801281929, -0.3104257583618164, 0.22041386365890503, 0.5383710265159607, -0.18880437314510345, -0.07554289698600769, 0.4676376283168793, 0.28994473814964294, -0.5295378565788269, 0.5389207601547241, -0.06842701137065887, 0.2785634994506836, -0.10150697827339172, 0.5041590929031372, 0.05234673246741295, 0.003596915863454342, 0.19552762806415558, -0.385360985994339, -0.19702528417110443, 0.019292430952191353, 0.2155110239982605, 0.033506158739328384, 0.04033184051513672, 0.5567014217376709, 0.04001679643988609, -0.1997789740562439, -0.14871299266815186, -0.03584107756614685, -0.1530415415763855, 0.044113319367170334, -0.06792037189006805, 0.005857901647686958, 0.04466346651315689, -0.03260137885808945, 0.06432925909757614, 0.1154637336730957, -0.020209921523928642, -0.12171593308448792, -0.3338361978530884, 0.13598905503749847, 0.13836748898029327, -0.2122688591480255, 0.15691733360290527, -0.026543065905570984, -0.21732844412326813, -0.010731738992035389, 0.24237681925296783, 0.004666495136916637, -0.08582033216953278, -0.07955402880907059, 0.11577136814594269, -0.09992943704128265, -0.08266056329011917, 0.10233724862337112, 0.3121548295021057, 0.6382737159729004, -0.02236923947930336, 0.4231957495212555, -0.0875723585486412, -0.12362584471702576, -0.48613402247428894, 0.03503024950623512, -0.16866828501224518, 0.39623525738716125, 0.0872168093919754, -0.7172760367393494, -0.09458475559949875, 0.2883250117301941, 0.11185003817081451, 0.3069838583469391, -0.24428744614124298, 0.07100427150726318, 0.0554242767393589, 0.1902158260345459, 0.031910490244627, -0.13023358583450317, 0.03345123305916786, 0.10647673904895782, -0.20015110075473785, 0.030841100960969925, -0.07134821265935898, -0.3822001516819, -0.14646129310131073, -0.1012205183506012, 0.31033793091773987, 0.15546898543834686, 0.26499736309051514, 0.34873488545417786, 0.1282588094472885, 0.14092350006103516, -0.19224172830581665, 0.19463562965393066, 0.1932113766670227, 0.0450020357966423, 0.18775169551372528, -0.10481154918670654, 0.6095269918441772, -0.15013977885246277, -0.18927794694900513, -0.5214868187904358, -0.11232339590787888, 0.04340624809265137, -0.10853849351406097, 0.2948245108127594, 0.15338493883609772, 0.14850075542926788, -0.10964544862508774, -0.10477907210588455, -0.13123993575572968, 0.17129909992218018, -0.13234636187553406, 0.07832667976617813, -0.23754775524139404, -0.031153874471783638, 0.151016965508461, 0.12559372186660767, 0.04706592857837677, 0.26658669114112854, -0.22358030080795288, 0.2642555236816406, -0.019816076382994652, -0.4577937722206116, 0.14665380120277405, -0.12411820143461227, 0.18416492640972137, -0.27219533920288086, 0.118065744638443, 0.2160520702600479, -0.06732641905546188, -0.12538151443004608, 0.0946730300784111, 0.5830351710319519, 0.27187004685401917, 0.2764337956905365, -0.11516662687063217, -0.20048412680625916, 0.11040890961885452, 0.09246170520782471, 0.1398359090089798, 0.21135377883911133, -0.05347706004977226, 0.2168440818786621, 0.03858259692788124, -0.06237981468439102, 0.3692181706428528, 0.15082931518554688, 0.04765920713543892, 0.06920420378446579, 0.12510836124420166, -0.09312015771865845, -0.2209441065788269, -0.44002416729927063, -0.21727272868156433, -0.2373041808605194, -0.02073218859732151, 0.3701358139514923, -0.0824689194560051, -0.10080404579639435, -0.07183007150888443, 0.031769681721925735, -0.2750129699707031, 0.40353402495384216, 0.23317962884902954, 0.36177730560302734, -0.12018381059169769, -0.19719815254211426, 0.1496267467737198, -0.04852467402815819, -0.3061573803424835, 0.3782445192337036, 0.30525028705596924, 0.25458571314811707, -0.2659117579460144, 0.028137248009443283, 0.24523018300533295, 0.6335810422897339, -0.4491252899169922, 0.08297134935855865, -0.41122281551361084, 0.055615074932575226, 0.4788254499435425, 0.08781225234270096, -0.13905850052833557, -0.1592511683702469, 0.42424553632736206, -0.045196693390607834, -0.06596782058477402, -0.1633174866437912, 0.11275916546583176, -0.01385738980025053, 0.07298839092254639, 0.050052087754011154, 0.3976197838783264, 0.09548350423574448, -0.048651378601789474, -0.26079925894737244, -0.2927934527397156, -0.21465878188610077, 0.05671502649784088, 0.2732061445713043, 0.3186675012111664, 0.5101502537727356, -0.10516186058521271, 0.007079560309648514, -0.261044442653656, 0.1790616363286972, -0.0048987772315740585, -0.35289403796195984, -0.10026147216558456, -0.00992423202842474, -0.10005902498960495, 0.058464884757995605, 0.26109787821769714, 0.24038748443126678, -0.08817900717258453, 0.28412288427352905, -0.0016547158593311906, -0.24503900110721588, 0.10228577256202698, -0.4079578220844269, -0.32936087250709534, -0.024253036826848984, 0.31055015325546265, 0.19074366986751556, -0.0387674905359745, -0.04044812172651291, 0.17132949829101562, 0.3940407335758209, -0.13533835113048553, -0.37087979912757874, 0.2906875014305115, -0.11571083962917328, -0.12219303101301193, 0.2361462116241455, 0.3582158088684082, 0.30314555764198303, -0.4336033761501312, 0.2544978857040405, -0.08951537311077118 ]
https://github.com/huggingface/datasets/issues/2615
Jsonlines export error
I was also already working in my PR... Nevermind. Next time we should pay attention if there is somebody (self-)assigned to an issue and if he/she is still working on it before overtaking it... 😄
## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1
35
Jsonlines export error ## Describe the bug When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default ## Steps to reproduce the bug This what I'm running: in python: ``` from datasets import load_dataset ptb = load_dataset("ptb_text_only") ptb["train"].to_json("ptb.jsonl") ``` then out of python: ``` head -10000 ptb.jsonl ``` ## Expected results Properly separated lines ## Actual results The last line is a concatenation of two lines ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.9.1.dev0 - Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.6.9 - PyArrow version: 4.0.1 I was also already working in my PR... Nevermind. Next time we should pay attention if there is somebody (self-)assigned to an issue and if he/she is still working on it before overtaking it... 😄
[ -0.3961874544620514, 0.14125007390975952, -0.04477722570300102, 0.26520514488220215, 0.05529014393687248, 0.06807655096054077, 0.15589264035224915, 0.3812045454978943, -0.01108888816088438, -0.03500496968626976, 0.3722906708717346, 0.011863995343446732, 0.0816400870680809, 0.17778830230236053, -0.14616699516773224, -0.1732497662305832, 0.17802724242210388, -0.04271663352847099, 0.03448609262704849, 0.24138016998767853, -0.23631763458251953, 0.26802778244018555, -0.1862007975578308, -0.19686907529830933, -0.40444934368133545, -0.2788297235965729, 0.14521993696689606, -0.021789753809571266, -0.02560858428478241, -0.4830840528011322, -0.09360457956790924, -0.23293539881706238, 0.457180917263031, 0.4846562147140503, -0.00011653533147182316, -0.1735851913690567, 0.32100924849510193, 0.0024077720008790493, -0.23531219363212585, 0.05304533988237381, -0.4531082510948181, -0.3837760090827942, -0.03856442868709564, -0.3636561930179596, 0.40633875131607056, -0.12237000465393066, -0.3413087725639343, -0.4172591269016266, 0.6630900502204895, 0.4112569987773895, 0.16936007142066956, -0.03377055004239082, 0.1536695957183838, -0.017252575606107712, -0.06961454451084137, 0.10264302790164948, 0.006590277887880802, 0.09388390183448792, -0.17908452451229095, 0.28807270526885986, 0.25536438822746277, -0.05842524394392967, -0.14248433709144592, -0.3091885447502136, -0.14239510893821716, -0.11779908835887909, -0.060458458960056305, -0.25529924035072327, 0.19986280798912048, 0.35945531725883484, 0.1978212594985962, -0.2259092479944229, -0.14749076962471008, -0.3116997182369232, 0.11333810538053513, -0.6214419603347778, 0.04877869039773941, 0.5457023978233337, -0.01932825706899166, 0.13052991032600403, -0.22660154104232788, -0.1034049391746521, -0.23982101678848267, -0.055933695286512375, 0.03249587118625641, -0.21104252338409424, -0.12725688517093658, -0.0004992251633666456, -0.1528136283159256, -0.11805478483438492, -0.057975560426712036, -0.2560562789440155, -0.5472075939178467, -0.01161985658109188, -0.17634078860282898, 0.06494954973459244, 0.15674738585948944, -0.4249262809753418, 0.14234137535095215, -0.0389581061899662, 0.3401733338832855, -0.35565871000289917, 0.2603926360607147, 0.058518197387456894, 0.5224490761756897, 0.16737933456897736, 0.2801501750946045, -0.06273524463176727, 0.2633460760116577, 0.02931068278849125, 0.07203839719295502, -0.07997824251651764, 0.012156910263001919, -0.20610207319259644, 0.06487145274877548, 0.08414506167173386, -0.021978706121444702, -0.07445503771305084, -0.03361048549413681, 0.20734935998916626, -0.34386828541755676, -0.17911304533481598, -0.25021272897720337, -0.1604059785604477, -0.08438828587532043, 0.23707203567028046, 0.1838049590587616, 0.2299661785364151, -0.13997431099414825, -0.056174613535404205, -0.05275755375623703, -0.07646962255239487, -0.09756048023700714, -0.02744261361658573, -0.04341012239456177, -0.15162470936775208, -0.02210392616689205, 0.24528206884860992, -0.09676321595907211, -0.28666332364082336, -0.11443489789962769, -0.05578853562474251, -0.1505906581878662, 0.17743118107318878, 0.27376118302345276, 0.0941285640001297, -0.18243560194969177, -0.1792258322238922, -0.029098812490701675, 0.1685350239276886, -0.4769115149974823, -0.04237028956413269, -0.3549829423427582, 0.18472272157669067, -0.15051740407943726, 0.15186451375484467, -0.4985494613647461, -0.04304059222340584, 0.08197347819805145, 0.13034504652023315, 0.3610822856426239, -0.2751137912273407, 0.6181920170783997, -0.27494409680366516, 0.05406146124005318, 0.23970043659210205, -0.7175136804580688, 0.08108411729335785, 0.13168708980083466, -0.044557031244039536, 0.44993239641189575, 0.35948264598846436, -0.047060444951057434, 0.3819954991340637, -0.12507373094558716, 0.286223828792572, 0.10258738696575165, 0.2136676162481308, 0.08589935302734375, 0.4878996014595032, -0.09101507067680359, -0.023389820009469986, 0.044554948806762695, -0.34762611985206604, 0.6521729826927185, 0.11511600017547607, 0.511198103427887, 0.39369815587997437, 0.0430697463452816, 0.2332155853509903, -0.20628191530704498, -0.19885899126529694, -0.0399719774723053, -0.198198139667511, -0.37634384632110596, -0.06517738103866577, 0.13632479310035706, -0.20178848505020142, 0.3150211572647095, -0.26564329862594604, 0.11128908395767212, 0.46081408858299255, 0.14559483528137207, 0.12427249550819397, 0.01685594581067562, 0.2683563828468323, -0.4331432282924652, -0.19373966753482819, -0.14755260944366455, -0.15639439225196838, -0.13995972275733948, -0.06078718975186348, 0.18789398670196533, 0.21765631437301636, -0.030970416963100433, 0.1624683141708374, 0.09083123505115509, -0.14384496212005615, -0.11942116916179657, 0.22005604207515717, -0.030387096107006073, 0.23140206933021545, 0.14009779691696167, 0.02960464544594288, -0.27822941541671753, 0.279717355966568, 0.19401301443576813, -0.20661863684654236, 0.22570863366127014, 0.11975117027759552, 0.16107602417469025, -0.33962327241897583, -0.14500904083251953, 0.20799854397773743, -0.022490598261356354, -0.04336106404662132, -0.1313810646533966, 0.11531498283147812, 0.13005974888801575, 0.07430583983659744, -0.18313220143318176, 0.2659928500652313, -0.041270237416028976, 0.0790855661034584, -0.1302528828382492, 0.5811470746994019, -0.22382183372974396, 0.31291741132736206, -0.03374422714114189, -0.035950928926467896, 0.24172250926494598, -0.1326751410961151, -0.05239588022232056, -0.14321041107177734, 0.2920069992542267, 0.15066835284233093, -0.10959596186876297, -0.003849925473332405, -0.29977384209632874, 0.013057585805654526, 0.5700360536575317, -0.0009291328024119139, 0.05438166484236717, 0.20030862092971802, -0.010424544103443623, -0.012889984995126724, 0.048196516931056976, 0.07339742034673691, 0.27014246582984924, 0.14349216222763062, -0.061088237911462784, 0.08177022635936737, 0.23918655514717102, -0.07930364459753036, 0.28661853075027466, 0.10854941606521606, 0.2617502212524414, 0.3045499920845032, 0.1869601458311081, 0.14856182038784027, -0.142788827419281, -0.39718908071517944, -0.192911759018898, 0.09804090857505798, -0.2990087866783142, 0.28128546476364136, -0.17970065772533417, -0.03177208825945854, -0.4606836438179016, -0.34267154335975647, -0.24311381578445435, -0.26586559414863586, -0.16170953214168549, -0.1251087486743927, -0.4919680953025818, -0.11036888509988785, -0.12331005185842514, 0.11657293885946274, 0.098399817943573, -0.0651700496673584, 0.04801717773079872, -0.025851722806692123, -0.07901670783758163, -0.0626123771071434, 0.048323117196559906, -0.18228355050086975, 0.08695346862077713, 0.11184332519769669, 0.11575722694396973, -0.11185682564973831, 0.12596753239631653, 0.12819288671016693, 0.013544335961341858, -0.07983934134244919, 0.11684036254882812, 0.2671390771865845, 0.004618329927325249, -0.5441418290138245, 0.00930485874414444, 0.15852783620357513, -0.0006536567234434187, 0.1666567027568817, -0.109491266310215, -0.19390590488910675, -0.10407200455665588, -0.11589440703392029, -0.04971330240368843, -0.3589128255844116, 0.4297667443752289, -0.11073970049619675, 0.06243861839175224, -0.05668264999985695, 0.14181986451148987, -0.08346586674451828, 0.026438890025019646, -0.27016082406044006, 0.20860977470874786, -0.39470914006233215, -0.038347821682691574, -0.28726181387901306, -0.23449181020259857, 0.11537059396505356, 0.13510648906230927, -0.041231829673051834, -0.014871196821331978, -0.39450767636299133, 0.5985487699508667, -0.09118050336837769, 0.4072627127170563, -0.15432588756084442, 0.1598561406135559, 0.10821342468261719, -0.060939185321331024, -0.06058848276734352, -0.01710345409810543, 0.1243252083659172, 0.14299048483371735, 0.04056292027235031, 0.4537537395954132, -0.07690983265638351, 0.6510971784591675, -0.217183455824852, -0.19337709248065948, 0.7931036353111267, 0.1460741013288498, 0.207493394613266, 0.10004005581140518, 0.0890258327126503, -0.1275721788406372, -0.014920187182724476, 0.12592563033103943, -0.11181040108203888, -0.1663994938135147, 0.17380210757255554, 0.014976860024034977, -0.15475919842720032, 0.032363858073949814, -0.01893119141459465, -0.43367505073547363, -0.3735409379005432, 0.24959921836853027, 0.01727878674864769, 0.3149970471858978, -0.3155672252178192, -0.08373705297708511, -0.04976941645145416, 0.08106959611177444, -0.2002609670162201, -0.03123169206082821, 0.20590774714946747, 0.10809080302715302, -0.5688768029212952, -0.43436580896377563, -0.4829705059528351, 0.20019489526748657, 0.00037572678411379457, 0.5802279114723206, 0.1253155618906021, 0.10263750702142715, -0.08849085122346878, -0.12085556238889694, 0.6239223480224609, 0.017961686477065086, -0.20773369073867798, 0.23253975808620453, 0.38049840927124023, -0.11947641521692276, -0.1136857122182846, 0.1311788707971573, 0.20407605171203613, 0.8154346942901611, 0.014413959346711636, -0.33628880977630615, -0.031519703567028046, 0.25106000900268555, 0.36901986598968506, -0.13677911460399628, -0.24732127785682678, -0.12215892970561981, -0.21055060625076294, -0.10639998316764832, -0.23941682279109955, 0.10652593523263931, 0.4578874409198761, -0.18457327783107758, -0.15015842020511627, 0.08302345126867294, -0.3093683421611786, -0.02382829785346985, -0.006198437884449959, 0.26893675327301025, -0.10252901166677475, 0.13195419311523438, -0.10675031691789627, 0.3046075403690338, 0.4929369390010834, 0.25554603338241577, 0.05917546525597572, -0.38187670707702637, -0.06486011296510696, -0.2778080105781555, 0.39060094952583313, -0.08639068156480789, -0.23039084672927856, 0.08983804285526276, -0.11477641016244888, 0.43109744787216187, 0.10552460700273514, -0.30602091550827026, 0.28390905261039734, 0.09387935698032379, -0.8680293560028076, 0.06726649403572083, 0.3517991304397583, 0.08513722568750381, 0.2663380205631256, 0.14252395927906036, -0.29936084151268005, -0.3890743553638458, 0.2268267273902893, -0.22128430008888245, 0.5617588758468628, 0.462230920791626, 0.13098232448101044, 0.05016931891441345, -0.3823637366294861, 0.6059625148773193, -0.07513651251792908, 0.04960622265934944, -0.19818511605262756, 0.4180101454257965, 0.1599106639623642, -0.14685416221618652, 0.13306406140327454, 0.0571737103164196, -0.12497884035110474, 0.04600716754794121, -0.5140424966812134, -0.26885178685188293, -0.22368642687797546, 0.04585634171962738, 0.2291855365037918, -0.1956327259540558, -0.47805702686309814, 0.02744664065539837, -0.07784827053546906, -0.25079604983329773, -0.07657904177904129, -0.22125256061553955, 0.08225226402282715, -0.13663357496261597, -0.36440637707710266, 0.13540537655353546, 0.013327098451554775, 0.1475529670715332, 0.32961079478263855, -0.17591866850852966, 0.16549041867256165, -0.2167603075504303, 0.26329609751701355, 0.17569883167743683, 0.040359076112508774, -0.03551517426967621, -0.04984821006655693, -0.0910550057888031, 0.05183354765176773, 0.01801333576440811, 0.13972488045692444, -0.07206281274557114, -0.1476307511329651, 0.16769491136074066, 0.05310647934675217, -0.1870754361152649, -0.09450124204158783, 0.2120669037103653, -0.22726655006408691, -0.3123401403427124, -0.13695256412029266, 0.13842499256134033, 0.23500007390975952, -0.12349939346313477, 0.06523599475622177, 0.154571995139122, -0.03456813842058182, 0.3239791989326477, -0.32690858840942383, -0.1750406175851822, -0.3134276568889618, 0.06735274940729141, 0.01975066587328911, -0.2836398482322693, 0.23683792352676392, 0.5338140726089478, -0.18514394760131836, -0.09182239323854446, 0.4540339410305023, 0.3182337284088135, -0.506389319896698, 0.5193544626235962, -0.03970612213015556, 0.2553127110004425, -0.092156782746315, 0.48930078744888306, 0.05319630354642868, 0.011074663139879704, 0.1609012931585312, -0.3807058334350586, -0.19384633004665375, 0.01689017005264759, 0.18402595818042755, -0.01620640605688095, 0.0661962479352951, 0.5399191379547119, 0.04049794748425484, -0.19532114267349243, -0.1874677538871765, -0.009231343865394592, -0.19971637427806854, 0.032576240599155426, -0.09072978794574738, -0.05426524579524994, 0.020311681553721428, -0.04538407176733017, 0.08947703242301941, 0.12455112487077713, -0.044469304382801056, -0.158092200756073, -0.34930869936943054, 0.11712224781513214, 0.12625761330127716, -0.20730939507484436, 0.14146755635738373, -0.029193462803959846, -0.21039417386054993, 0.0005523149156942964, 0.2124820053577423, -0.011709040962159634, -0.07638374716043472, -0.07668303698301315, 0.0884389728307724, -0.1290404200553894, -0.08349043130874634, 0.12048459053039551, 0.2823750376701355, 0.6134370565414429, -0.01711704395711422, 0.4254063367843628, -0.1109529361128807, -0.09252124279737473, -0.45309051871299744, 0.02776685357093811, -0.1683809459209442, 0.39541447162628174, 0.11079195141792297, -0.7080249190330505, -0.06729205697774887, 0.3276769816875458, 0.13210991024971008, 0.2972358763217926, -0.2673643231391907, 0.10470828413963318, 0.06984274834394455, 0.2139059603214264, 0.008948207832872868, -0.13692383468151093, 0.051610317081213, 0.08065079152584076, -0.16454152762889862, 0.009780791588127613, -0.031682249158620834, -0.36782214045524597, -0.16884665191173553, -0.07475180923938751, 0.34985998272895813, 0.18097175657749176, 0.27245429158210754, 0.2772692143917084, 0.15944606065750122, 0.13484831154346466, -0.1623571515083313, 0.2629075050354004, 0.20129112899303436, 0.03307229280471802, 0.16319245100021362, -0.12776346504688263, 0.5978221297264099, -0.12198067456483841, -0.16437532007694244, -0.5197517275810242, -0.06070580333471298, 0.05477726459503174, -0.13637717068195343, 0.2861793041229248, 0.13115565478801727, 0.14128223061561584, -0.14523980021476746, -0.08225733786821365, -0.11501564085483551, 0.1540476679801941, -0.11617127060890198, 0.06583105772733688, -0.24059347808361053, -0.011379561387002468, 0.15866495668888092, 0.10759535431861877, 0.05642203614115715, 0.23676584661006927, -0.2280270755290985, 0.2521001100540161, -0.029671669006347656, -0.44366687536239624, 0.12667086720466614, -0.07063602656126022, 0.20835372805595398, -0.2805277109146118, 0.10736066848039627, 0.20405767858028412, -0.059235453605651855, -0.13311927020549774, 0.15194016695022583, 0.6114039421081543, 0.29048672318458557, 0.24302512407302856, -0.11046229302883148, -0.18946154415607452, 0.10828850418329239, 0.08538644760847092, 0.12491127848625183, 0.24422380328178406, -0.025653641670942307, 0.18726064264774323, 0.07729052752256393, -0.09636597335338593, 0.34189900755882263, 0.17633028328418732, 0.039824727922677994, 0.060625653713941574, 0.09779771417379379, -0.13572411239147186, -0.19358216226100922, -0.46401339769363403, -0.1927347183227539, -0.2539292871952057, -0.027709024026989937, 0.4014791250228882, -0.11803505569696426, -0.09881144016981125, -0.0877251923084259, 0.054204195737838745, -0.285871297121048, 0.4002649784088135, 0.25228431820869446, 0.3638440668582916, -0.10633788257837296, -0.1944323182106018, 0.13509371876716614, -0.06894475966691971, -0.3103599548339844, 0.37894144654273987, 0.3164229691028595, 0.2905767560005188, -0.25515198707580566, 0.008613892830908298, 0.22561977803707123, 0.5962053537368774, -0.4504055380821228, 0.04813108593225479, -0.4447438418865204, 0.11197216063737869, 0.43549612164497375, 0.09938298910856247, -0.12633733451366425, -0.15380962193012238, 0.453510582447052, -0.09020209312438965, -0.047468654811382294, -0.1513187140226364, 0.1403331160545349, -0.0010735508985817432, 0.031115850433707237, 0.052958860993385315, 0.39204204082489014, 0.09075310826301575, -0.07320799678564072, -0.25000593066215515, -0.28596556186676025, -0.20422214269638062, 0.04797831177711487, 0.2739374339580536, 0.3353990912437439, 0.5070765614509583, -0.1164323091506958, -0.04981847479939461, -0.23814333975315094, 0.16757838428020477, -0.008768253959715366, -0.3936249911785126, -0.13753272593021393, 0.016431324183940887, -0.08683504164218903, 0.05253598839044571, 0.2316703349351883, 0.23373796045780182, -0.08835411071777344, 0.24967078864574432, 0.020740656182169914, -0.2763335704803467, 0.10884135961532593, -0.3965429663658142, -0.3167790472507477, -0.0161591824144125, 0.313569575548172, 0.20531339943408966, -0.036102328449487686, -0.04502705857157707, 0.1803871989250183, 0.3660029470920563, -0.16561584174633026, -0.3628181517124176, 0.2734830379486084, -0.16148267686367035, -0.08955191820859909, 0.2288847267627716, 0.3258039355278015, 0.28992828726768494, -0.43334758281707764, 0.22828920185565948, -0.08570710569620132 ]
https://github.com/huggingface/datasets/issues/2607
Streaming local gzip compressed JSON line files is not working
Hi @thomwolf, thanks for reporting. It seems this might be due to the fact that the JSON Dataset builder uses `pyarrow.json` (`paj.read_json`) to read the data without using the Python standard `open(file,...` (which is the one patched with `xopen` to work in streaming mode). This has to be fixed.
## Describe the bug Using streaming to iterate on local gzip compressed JSON files raise a file not exist error ## Steps to reproduce the bug ```python from datasets import load_dataset streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True) next(iter(streamed_dataset)) ``` ## Actual results ``` FileNotFoundError Traceback (most recent call last) <ipython-input-6-27a664e29784> in <module> ----> 1 next(iter(streamed_dataset)) ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 336 337 def __iter__(self): --> 338 for key, example in self._iter(): 339 if self.features: 340 # we encode the example for ClassLabel feature types for example ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self) 333 else: 334 ex_iterable = self._ex_iterable --> 335 yield from ex_iterable 336 337 def __iter__(self): ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 76 77 def __iter__(self): ---> 78 for key, example in self.generate_examples_fn(**self.kwargs): 79 yield key, example 80 ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs) 282 def wrapper(**kwargs): 283 python_formatter = PythonFormatter() --> 284 for key, table in generate_tables_fn(**kwargs): 285 batch = python_formatter.format_batch(table) 286 for i, example in enumerate(_batch_to_examples(batch)): ~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files) 85 file, 86 read_options=self.config.pa_read_options, ---> 87 parse_options=self.config.pa_parse_options, 88 ) 89 except pa.ArrowInvalid as err: ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory ``` ## Environment info - `datasets` version: 1.9.1.dev0 - Platform: Darwin-19.6.0-x86_64-i386-64bit - Python version: 3.7.7 - PyArrow version: 1.0.0
49
Streaming local gzip compressed JSON line files is not working ## Describe the bug Using streaming to iterate on local gzip compressed JSON files raise a file not exist error ## Steps to reproduce the bug ```python from datasets import load_dataset streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True) next(iter(streamed_dataset)) ``` ## Actual results ``` FileNotFoundError Traceback (most recent call last) <ipython-input-6-27a664e29784> in <module> ----> 1 next(iter(streamed_dataset)) ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 336 337 def __iter__(self): --> 338 for key, example in self._iter(): 339 if self.features: 340 # we encode the example for ClassLabel feature types for example ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self) 333 else: 334 ex_iterable = self._ex_iterable --> 335 yield from ex_iterable 336 337 def __iter__(self): ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 76 77 def __iter__(self): ---> 78 for key, example in self.generate_examples_fn(**self.kwargs): 79 yield key, example 80 ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs) 282 def wrapper(**kwargs): 283 python_formatter = PythonFormatter() --> 284 for key, table in generate_tables_fn(**kwargs): 285 batch = python_formatter.format_batch(table) 286 for i, example in enumerate(_batch_to_examples(batch)): ~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files) 85 file, 86 read_options=self.config.pa_read_options, ---> 87 parse_options=self.config.pa_parse_options, 88 ) 89 except pa.ArrowInvalid as err: ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory ``` ## Environment info - `datasets` version: 1.9.1.dev0 - Platform: Darwin-19.6.0-x86_64-i386-64bit - Python version: 3.7.7 - PyArrow version: 1.0.0 Hi @thomwolf, thanks for reporting. It seems this might be due to the fact that the JSON Dataset builder uses `pyarrow.json` (`paj.read_json`) to read the data without using the Python standard `open(file,...` (which is the one patched with `xopen` to work in streaming mode). This has to be fixed.
[ -0.19924888014793396, -0.13397808372974396, -0.009144364856183529, 0.23913481831550598, 0.07776414602994919, 0.016879990696907043, 0.3976743817329407, 0.5178916454315186, 0.19702094793319702, 0.07899829745292664, 0.10300148278474808, 0.3306828737258911, -0.08836667239665985, 0.02087412029504776, 0.22888697683811188, -0.18093447387218475, -0.04366183280944824, 0.3560611307621002, -0.025166667997837067, 0.0015848748153075576, -0.1305662840604782, 0.2937987744808197, -0.14045874774456024, -0.0185171477496624, -0.018798181787133217, -0.03955554589629173, -0.04715000465512276, 0.15009424090385437, -0.09395942091941833, -0.33263856172561646, 0.0627695769071579, -0.168414905667305, 0.18802285194396973, 0.44545504450798035, -0.00011453595652710646, 0.288641095161438, 0.29611077904701233, -0.1629139482975006, -0.38860681653022766, -0.4712480306625366, -0.22990114986896515, -0.149298757314682, -0.1307714581489563, -0.28584524989128113, -0.13781937956809998, -0.34743601083755493, -0.03375683352351189, -0.507199764251709, 0.5416869521141052, 0.2922609746456146, 0.1556636542081833, 0.041965220123529434, -0.0617719367146492, 0.09057901799678802, 0.03901597484946251, 0.15732352435588837, -0.08860812336206436, 0.315097451210022, 0.03278826177120209, 0.1149681955575943, 0.055284976959228516, 0.42864570021629333, -0.22549550235271454, -0.17477674782276154, 0.1473698914051056, -0.0008162494050338864, -0.08438283950090408, -0.12578707933425903, -0.16831550002098083, 0.08573482930660248, 0.18454509973526, -0.4122558534145355, -0.4398343563079834, -0.37610766291618347, 0.04667448624968529, -0.44880276918411255, 0.21185463666915894, 0.40928587317466736, -0.2503088414669037, 0.1969691962003708, -0.10066570341587067, -0.13053184747695923, -0.35456183552742004, 0.08545256406068802, 0.36184874176979065, 0.34808292984962463, -0.09467769414186478, 0.009128496050834656, -0.09198688715696335, 0.11937946826219559, -0.08398393541574478, -0.3859615623950958, -0.1857064813375473, 0.22775618731975555, -0.24214160442352295, -0.13492260873317719, 0.1443626433610916, -0.6062142252922058, 0.15114963054656982, 0.10122863203287125, 0.4615779221057892, -0.12574483454227448, 0.3588072955608368, 0.05460832267999649, 0.27286794781684875, 0.18704862892627716, 0.17696541547775269, 0.2638421058654785, 0.05665886774659157, 0.38988062739372253, -0.08656667172908783, -0.19807395339012146, -0.23633797466754913, -0.039404504001140594, -0.091529980301857, 0.13681069016456604, 0.48332664370536804, -0.15766555070877075, -0.0890936478972435, 0.08191072195768356, -0.5941806435585022, -0.13270017504692078, 0.15767234563827515, 0.09860946983098984, 0.06610202044248581, 0.2201749086380005, 0.026484787464141846, 0.16108396649360657, -0.002104650717228651, -0.06189470365643501, -0.09079564362764359, 0.023572133854031563, 0.07405869662761688, 0.13479875028133392, 0.25189709663391113, -0.5213882923126221, 0.2793642282485962, 0.008754638023674488, -0.04602963104844093, -0.15623365342617035, 0.005845748353749514, -0.12555648386478424, 0.1504519283771515, 0.14683939516544342, -0.025929594412446022, 0.0193638876080513, 0.20588454604148865, -0.11022713035345078, -0.17381969094276428, 0.11835368722677231, -0.27519553899765015, -0.2672136127948761, 0.03723617270588875, 0.20101666450500488, 0.03815862536430359, 0.009388755075633526, -0.008148947730660439, 0.005931410938501358, 0.05569886416196823, -0.35651278495788574, 0.02363627590239048, -0.00946472492069006, -0.05580149218440056, -0.08412909507751465, 0.27599242329597473, 0.43609619140625, -0.3608721196651459, -0.10359225422143936, 0.07156519591808319, 0.21758562326431274, 0.721655547618866, 0.34253817796707153, -0.23797181248664856, 0.12730765342712402, -0.36812013387680054, 0.3619050085544586, 0.6931348443031311, 0.016037965193390846, -0.36246511340141296, 0.8522370457649231, -0.10863468050956726, 0.3817507326602936, 0.4800846576690674, -0.20442916452884674, 0.1941486895084381, -0.010518240742385387, 0.3352075219154358, 0.2812868654727936, -0.04457281902432442, 0.038527462631464005, -0.4642711579799652, 0.13121463358402252, 0.04194966331124306, 0.03780548274517059, -0.25131770968437195, 0.29544103145599365, -0.043392449617385864, 0.01503361389040947, 0.3520894944667816, -0.18005642294883728, 0.1081845685839653, 0.2904556095600128, 0.23780660331249237, 0.019946198910474777, 0.20217356085777283, 0.00926429033279419, -0.21780289709568024, 0.032492753118276596, -0.3366103768348694, -0.2629365026950836, -0.28261682391166687, -0.062410399317741394, -0.14011318981647491, 0.1487002819776535, -0.18434782326221466, -0.3533782362937927, 0.1464819461107254, 0.41115084290504456, 0.38089853525161743, 0.022436998784542084, -0.46233075857162476, 0.3006555438041687, -0.29872554540634155, -0.1048562079668045, -0.2611706256866455, 0.4293636083602905, 0.07213553041219711, -0.2631469666957855, 0.17588450014591217, -0.05898888781666756, 0.17178912460803986, -0.24163490533828735, -0.2221168428659439, 0.2450815588235855, -0.12085548043251038, 0.17090673744678497, 0.11697501689195633, -0.2226252257823944, 0.29577508568763733, -0.0062116640619933605, -0.07205654680728912, 0.34458717703819275, 0.2193281352519989, 0.20412081480026245, -0.22399112582206726, 0.4739871025085449, -0.030565738677978516, 0.30299776792526245, 0.020911265164613724, -0.20583592355251312, 0.19243372976779938, -0.008431654423475266, -0.34215247631073, 0.06537134945392609, 0.33458495140075684, -0.1258889138698578, 0.09460526704788208, -0.06129598617553711, -0.3791346549987793, -0.06355652213096619, 0.5271067023277283, -0.08305830508470535, -0.1615021526813507, 0.19268785417079926, -0.1803126335144043, -0.055544331669807434, 0.29656389355659485, -0.006715948227792978, 0.3335770070552826, 0.15754523873329163, 0.10460268706083298, 0.01661323942244053, -0.11111678928136826, -0.2565549612045288, 0.2091604322195053, -0.09003429114818573, 0.11462616920471191, 0.5449168086051941, 0.035636574029922485, 0.04491729661822319, -0.39953985810279846, -0.24281516671180725, -0.12888243794441223, 0.14558058977127075, -0.09908850491046906, 0.3841339647769928, -0.3911353647708893, -0.3713184595108032, -0.12017018347978592, -0.11286964267492294, -0.06306426227092743, -0.08577302098274231, -0.02696532942354679, 0.2985590994358063, -0.2004605531692505, 0.2329237014055252, 0.0005522901774384081, 0.03940192610025406, 0.2519485354423523, -0.4227377474308014, -0.4818941354751587, -0.16303850710391998, -0.1911565065383911, -0.010402805171906948, 0.2656034827232361, -0.28788891434669495, 0.30171629786491394, -0.0459042564034462, -0.3699752390384674, -0.27079975605010986, 0.11940658837556839, 0.14356078207492828, 0.0721820816397667, -0.022700296714901924, -0.09128014743328094, 0.22808434069156647, -0.07968748360872269, -0.33243557810783386, 0.2870095372200012, -0.21745267510414124, -0.14865553379058838, 0.19485162198543549, -0.031184468418359756, -0.0018441491993144155, -0.2352982610464096, -0.26552078127861023, -0.14724449813365936, -0.4852221608161926, 0.289681613445282, -0.04036929830908775, 0.3086782395839691, 0.24291008710861206, 0.14409837126731873, 0.17795969545841217, 0.15565818548202515, -0.05469261482357979, -0.15096262097358704, -0.6362748146057129, 0.391745388507843, -0.11013589054346085, -0.23037828505039215, -0.029500754550099373, -0.1555967926979065, -0.05509719252586365, 0.3612910211086273, -0.4562183916568756, 0.23791278898715973, 0.07027309387922287, 0.08341820538043976, -0.09506741166114807, -0.13405703008174896, 0.19144611060619354, -0.10754648596048355, -0.06036072224378586, -0.25900939106941223, 0.07594393938779831, -0.012235171161592007, 0.2527312934398651, 0.18331071734428406, 0.4013440012931824, 0.7469971776008606, -0.039161670953035355, 0.2865433990955353, 0.35339224338531494, 0.14586865901947021, 0.5503769516944885, -0.13009272515773773, 0.16025090217590332, -0.24258330464363098, -0.21884095668792725, 0.05964690446853638, 0.10508406907320023, -0.3196413815021515, 0.027433320879936218, 0.0012184479273855686, -0.3406587541103363, -0.3240848183631897, 0.1244039386510849, -0.30620133876800537, -0.18829454481601715, 0.20148435235023499, -0.09639352560043335, 0.19641192257404327, -0.039423178881406784, -0.029639704152941704, -0.003231726586818695, 0.11535095423460007, -0.0483287014067173, 0.2654098868370056, 0.4285130202770233, 0.12893341481685638, -0.05432375520467758, -0.18306681513786316, -0.34849369525909424, 0.07876402139663696, 0.274304062128067, 0.6020609140396118, -0.16699986159801483, -0.16875538229942322, 0.07984783500432968, -0.16841286420822144, 0.4636301100254059, -0.12588061392307281, -0.03415439650416374, 0.34727707505226135, -0.12427937984466553, -0.02665332332253456, -0.11905418336391449, -0.04316969960927963, 0.35300955176353455, 0.19594894349575043, 0.6723818778991699, -0.17720657587051392, -0.22020044922828674, 0.11325682699680328, 0.02156510204076767, 0.09070324152708054, -0.15626788139343262, -0.29280713200569153, -0.13581222295761108, -0.20193278789520264, -0.0655042976140976, -0.07177631556987762, 0.24107839167118073, 0.01995612494647503, -0.13128165900707245, 0.053600650280714035, -0.07305435836315155, -0.11266575753688812, 0.0078038908541202545, 0.2940388321876526, -0.03253113478422165, 0.15934212505817413, 0.05702269449830055, 0.5039328932762146, 0.2327844649553299, 0.5136663317680359, 0.5314756631851196, -0.4147782027721405, 0.13258492946624756, 0.07024522870779037, 0.13299407064914703, 0.16498833894729614, -0.13509339094161987, -0.15138906240463257, 0.13810420036315918, 0.2574625015258789, -0.03558160737156868, -0.08321397006511688, 0.23381944000720978, -0.1555822789669037, -0.35673731565475464, -0.46065202355384827, 0.24326127767562866, -0.03920342028141022, 0.19205337762832642, 0.7787454128265381, -0.6046568155288696, -0.16807055473327637, 0.12870416045188904, -0.32743939757347107, 0.6506020426750183, 0.3056919574737549, -0.01261223666369915, 0.4230313003063202, -0.15300701558589935, 0.4291079044342041, -0.4506244957447052, 0.3880237936973572, -0.10754487663507462, -0.18950898945331573, 0.013624980114400387, -0.15217815339565277, 0.3272457420825958, 0.17365042865276337, -0.33012452721595764, 0.15608102083206177, 0.0949871763586998, -0.026111682876944542, 0.056402649730443954, 0.08446604013442993, -0.3410910964012146, -0.14785520732402802, -0.605639636516571, 0.082272469997406, -0.16434246301651, 0.35915955901145935, 0.11986488103866577, -0.3871605396270752, 0.010002903640270233, -0.21891902387142181, -0.16404372453689575, 0.48730704188346863, -0.22052358090877533, -0.043798815459012985, -0.12016496062278748, -0.6457439064979553, -0.323177695274353, -0.16653503477573395, -0.36958083510398865, -0.1014874055981636, -0.09688054770231247, -0.01401581522077322, -0.15600289404392242, 0.0815749242901802, -0.4244859218597412, 0.24423187971115112, 0.18791110813617706, -0.14475750923156738, -0.0854344591498375, 0.17301899194717407, -0.27939414978027344, -0.5516794919967651, 0.2067955881357193, -0.09458183497190475, 0.24433709681034088, 0.1387687474489212, -0.01427964773029089, 0.018898306414484978, -0.19521255791187286, -0.2021060436964035, 0.13159576058387756, -0.14081443846225739, -0.34052911400794983, -0.26670122146606445, -0.15190207958221436, -0.2008611410856247, -0.10448196530342102, 0.2798333466053009, 0.07013795524835587, 0.30247923731803894, 0.39666157960891724, -0.017607953399419785, -0.06330156326293945, -0.2849562168121338, 0.0822029709815979, -0.19944483041763306, -0.06271826475858688, 0.14586104452610016, -0.02385852113366127, 0.1735639125108719, -0.2250165194272995, -0.010574759915471077, 0.15743325650691986, 0.0527799166738987, 0.031123729422688484, -0.4647313058376312, -0.13592912256717682, -0.10715018957853317, -0.005500741768628359, 0.11171876639127731, 0.10440340638160706, 0.20525553822517395, 0.15069445967674255, -0.18481335043907166, -0.2874046266078949, -0.14904487133026123, -0.17983229458332062, 0.038877904415130615, 0.0197014007717371, 0.14451363682746887, 0.30589908361434937, 0.04177616536617279, 0.17262406647205353, 0.18458129465579987, 0.11455286294221878, -0.2760639488697052, -0.12947505712509155, 0.10174425691366196, 0.14755044877529144, -0.1066456064581871, -0.25680676102638245, -0.07840254157781601, -0.23974493145942688, -0.09031287580728531, 0.10302001237869263, -0.08908607065677643, -0.07141606509685516, 0.22048313915729523, 0.3504035770893097, -0.04147942364215851, -0.16511622071266174, -0.06969296932220459, -0.20297081768512726, 0.32461658120155334, -0.14919251203536987, 0.09574572741985321, 0.04793326556682587, 0.0756746307015419, -0.5871012210845947, -0.08130371570587158, -0.09646077454090118, 0.15437820553779602, 0.5952439308166504, -0.45514795184135437, 0.031125590205192566, 0.045569390058517456, 0.16995343565940857, 0.47890153527259827, -0.1304558366537094, 0.03901312127709389, 0.17295101284980774, 0.1876670867204666, -0.048499010503292084, -0.07027356326580048, 0.13779574632644653, 0.10602910816669464, -0.06373286247253418, -0.07113215327262878, -0.15258373320102692, -0.150220587849617, 0.0998600497841835, 0.014319159090518951, 0.33302441239356995, 0.04588882997632027, 0.21135494112968445, 0.40808483958244324, 0.20176036655902863, 0.0718020349740982, -0.38099250197410583, 0.02005464769899845, 0.07189996540546417, -0.18873043358325958, -0.15243852138519287, -0.12570391595363617, 0.08139864355325699, 0.12150508165359497, -0.3927778899669647, -0.31883493065834045, -0.35021424293518066, 0.08560167998075485, -0.11790632456541061, 0.4086129367351532, -0.00591192115098238, 0.2030266672372818, -0.2063986361026764, 0.03384683281183243, 0.0438847541809082, 0.16065940260887146, 0.018573928624391556, 0.11596203595399857, -0.5277096033096313, -0.0310805793851614, -0.05830606445670128, 0.03896535560488701, 0.35443711280822754, 0.5155143141746521, -0.03619877249002457, 0.22145408391952515, -0.10615184158086777, -0.13591232895851135, 0.08837783336639404, 0.1771475076675415, 0.34257474541664124, -0.3739396631717682, 0.28764697909355164, 0.2135392427444458, 0.08201008290052414, -0.07543788105249405, 0.00995432585477829, 0.37296003103256226, 0.36083123087882996, 0.06650175899267197, 0.02780899405479431, 0.03634865954518318, -0.09334030002355576, 0.02666115202009678, 0.33547839522361755, 0.1904854029417038, -0.18797843158245087, 0.22218935191631317, 0.11016619950532913, -0.08871223777532578, 0.39441734552383423, 0.09830266237258911, 0.11966071277856827, -0.11526420712471008, 0.194305419921875, -0.24773810803890228, -0.10861086845397949, 0.06404580175876617, -0.35414454340934753, -0.3587692081928253, -0.06347721070051193, 0.23324859142303467, 0.1124904528260231, 0.04407887905836105, -0.025076933205127716, 0.0849539190530777, -0.12893234193325043, 0.2790074646472931, 0.2456028312444687, -0.08000000566244125, -0.16684448719024658, -0.1844666749238968, -0.20152652263641357, 0.15805566310882568, -0.04040978103876114, -0.1079193651676178, 0.2371380776166916, 0.3279329538345337, -0.06824513524770737, 0.20604518055915833, -0.09007184952497482, -0.18220099806785583, -0.29460176825523376, 0.28071361780166626, -0.35465171933174133, -0.23699714243412018, 0.1787971407175064, 0.23359733819961548, 0.09106533229351044, -0.45439696311950684, 0.20507270097732544, -0.33120283484458923, 0.11783606559038162, 0.05539232864975929, -0.030520927160978317, 0.0156792551279068, 0.06685055047273636, 0.23565326631069183, 0.16210749745368958, 0.11554688215255737, -0.1349952667951584, -0.19207116961479187, -0.07282059639692307, -0.17684759199619293, -0.018311526626348495, 0.14588327705860138, -0.05825034901499748, 0.5028752088546753, -0.04843560978770256, -0.40142470598220825, -0.437139093875885, 0.4285811483860016, -0.04396246373653412, -0.4439987540245056, 0.01039360836148262, 0.014010834507644176, -0.17603705823421478, 0.18188337981700897, 0.012476544827222824, 0.17777271568775177, -0.05060447007417679, 0.06168258935213089, -0.30855193734169006, -0.10215893387794495, 0.5942246317863464, -0.4224972724914551, -0.3192536532878876, 0.3241405487060547, 0.12668755650520325, 0.11907033622264862, 0.1298956274986267, -0.19659116864204407, 0.13247598707675934, 0.4372046887874603, -0.028387805446982384, 0.12153837084770203, 0.1597636342048645, 0.11520256847143173, 0.18512967228889465, 0.11781825125217438, 0.07764856517314911, 0.17259681224822998, -0.25976040959358215, 0.13292770087718964, -0.21405066549777985 ]
https://github.com/huggingface/datasets/issues/2607
Streaming local gzip compressed JSON line files is not working
Sorry for reopening this, but I'm having the same issue as @thomwolf when streaming a gzipped JSON Lines file from the hub. Or is that just not possible by definition? I installed `datasets`in editable mode from source (so probably includes the fix from #2608 ?): ``` >>> datasets.__version__ '1.9.1.dev0' ``` ``` >>> msmarco = datasets.load_dataset("webis/msmarco", "corpus", streaming=True) Using custom data configuration corpus-174d3b7155eb68db >>> msmarco_iter = iter(msmarco['train']) >>> print(next(msmarco_iter)) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 338, in __iter__ for key, example in self._iter(): File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 335, in _iter yield from ex_iterable File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 78, in __iter__ for key, example in self.generate_examples_fn(**self.kwargs): File "/home/christopher/.cache/huggingface/modules/datasets_modules/datasets/msmarco/eb63dff8d83107168e973c7a655a6082d37e08d71b4ac39a0afada479c138745/msmarco.py", line 96, in _generate_examples with gzip.open(file, "rt", encoding="utf-8") as f: File "/usr/lib/python3.6/gzip.py", line 53, in open binary_file = GzipFile(filename, gz_mode, compresslevel) File "/usr/lib/python3.6/gzip.py", line 163, in __init__ fileobj = self.myfileobj = builtins.open(filename, mode or 'rb') FileNotFoundError: [Errno 2] No such file or directory: 'https://huggingface.co/datasets/webis/msmarco/resolve/main/msmarco_doc_00.gz' ``` Loading the dataset without streaming set to True, works fine.
## Describe the bug Using streaming to iterate on local gzip compressed JSON files raise a file not exist error ## Steps to reproduce the bug ```python from datasets import load_dataset streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True) next(iter(streamed_dataset)) ``` ## Actual results ``` FileNotFoundError Traceback (most recent call last) <ipython-input-6-27a664e29784> in <module> ----> 1 next(iter(streamed_dataset)) ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 336 337 def __iter__(self): --> 338 for key, example in self._iter(): 339 if self.features: 340 # we encode the example for ClassLabel feature types for example ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self) 333 else: 334 ex_iterable = self._ex_iterable --> 335 yield from ex_iterable 336 337 def __iter__(self): ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 76 77 def __iter__(self): ---> 78 for key, example in self.generate_examples_fn(**self.kwargs): 79 yield key, example 80 ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs) 282 def wrapper(**kwargs): 283 python_formatter = PythonFormatter() --> 284 for key, table in generate_tables_fn(**kwargs): 285 batch = python_formatter.format_batch(table) 286 for i, example in enumerate(_batch_to_examples(batch)): ~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files) 85 file, 86 read_options=self.config.pa_read_options, ---> 87 parse_options=self.config.pa_parse_options, 88 ) 89 except pa.ArrowInvalid as err: ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory ``` ## Environment info - `datasets` version: 1.9.1.dev0 - Platform: Darwin-19.6.0-x86_64-i386-64bit - Python version: 3.7.7 - PyArrow version: 1.0.0
167
Streaming local gzip compressed JSON line files is not working ## Describe the bug Using streaming to iterate on local gzip compressed JSON files raise a file not exist error ## Steps to reproduce the bug ```python from datasets import load_dataset streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True) next(iter(streamed_dataset)) ``` ## Actual results ``` FileNotFoundError Traceback (most recent call last) <ipython-input-6-27a664e29784> in <module> ----> 1 next(iter(streamed_dataset)) ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 336 337 def __iter__(self): --> 338 for key, example in self._iter(): 339 if self.features: 340 # we encode the example for ClassLabel feature types for example ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self) 333 else: 334 ex_iterable = self._ex_iterable --> 335 yield from ex_iterable 336 337 def __iter__(self): ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 76 77 def __iter__(self): ---> 78 for key, example in self.generate_examples_fn(**self.kwargs): 79 yield key, example 80 ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs) 282 def wrapper(**kwargs): 283 python_formatter = PythonFormatter() --> 284 for key, table in generate_tables_fn(**kwargs): 285 batch = python_formatter.format_batch(table) 286 for i, example in enumerate(_batch_to_examples(batch)): ~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files) 85 file, 86 read_options=self.config.pa_read_options, ---> 87 parse_options=self.config.pa_parse_options, 88 ) 89 except pa.ArrowInvalid as err: ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory ``` ## Environment info - `datasets` version: 1.9.1.dev0 - Platform: Darwin-19.6.0-x86_64-i386-64bit - Python version: 3.7.7 - PyArrow version: 1.0.0 Sorry for reopening this, but I'm having the same issue as @thomwolf when streaming a gzipped JSON Lines file from the hub. Or is that just not possible by definition? I installed `datasets`in editable mode from source (so probably includes the fix from #2608 ?): ``` >>> datasets.__version__ '1.9.1.dev0' ``` ``` >>> msmarco = datasets.load_dataset("webis/msmarco", "corpus", streaming=True) Using custom data configuration corpus-174d3b7155eb68db >>> msmarco_iter = iter(msmarco['train']) >>> print(next(msmarco_iter)) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 338, in __iter__ for key, example in self._iter(): File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 335, in _iter yield from ex_iterable File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 78, in __iter__ for key, example in self.generate_examples_fn(**self.kwargs): File "/home/christopher/.cache/huggingface/modules/datasets_modules/datasets/msmarco/eb63dff8d83107168e973c7a655a6082d37e08d71b4ac39a0afada479c138745/msmarco.py", line 96, in _generate_examples with gzip.open(file, "rt", encoding="utf-8") as f: File "/usr/lib/python3.6/gzip.py", line 53, in open binary_file = GzipFile(filename, gz_mode, compresslevel) File "/usr/lib/python3.6/gzip.py", line 163, in __init__ fileobj = self.myfileobj = builtins.open(filename, mode or 'rb') FileNotFoundError: [Errno 2] No such file or directory: 'https://huggingface.co/datasets/webis/msmarco/resolve/main/msmarco_doc_00.gz' ``` Loading the dataset without streaming set to True, works fine.
[ -0.19924888014793396, -0.13397808372974396, -0.009144364856183529, 0.23913481831550598, 0.07776414602994919, 0.016879990696907043, 0.3976743817329407, 0.5178916454315186, 0.19702094793319702, 0.07899829745292664, 0.10300148278474808, 0.3306828737258911, -0.08836667239665985, 0.02087412029504776, 0.22888697683811188, -0.18093447387218475, -0.04366183280944824, 0.3560611307621002, -0.025166667997837067, 0.0015848748153075576, -0.1305662840604782, 0.2937987744808197, -0.14045874774456024, -0.0185171477496624, -0.018798181787133217, -0.03955554589629173, -0.04715000465512276, 0.15009424090385437, -0.09395942091941833, -0.33263856172561646, 0.0627695769071579, -0.168414905667305, 0.18802285194396973, 0.44545504450798035, -0.00011453595652710646, 0.288641095161438, 0.29611077904701233, -0.1629139482975006, -0.38860681653022766, -0.4712480306625366, -0.22990114986896515, -0.149298757314682, -0.1307714581489563, -0.28584524989128113, -0.13781937956809998, -0.34743601083755493, -0.03375683352351189, -0.507199764251709, 0.5416869521141052, 0.2922609746456146, 0.1556636542081833, 0.041965220123529434, -0.0617719367146492, 0.09057901799678802, 0.03901597484946251, 0.15732352435588837, -0.08860812336206436, 0.315097451210022, 0.03278826177120209, 0.1149681955575943, 0.055284976959228516, 0.42864570021629333, -0.22549550235271454, -0.17477674782276154, 0.1473698914051056, -0.0008162494050338864, -0.08438283950090408, -0.12578707933425903, -0.16831550002098083, 0.08573482930660248, 0.18454509973526, -0.4122558534145355, -0.4398343563079834, -0.37610766291618347, 0.04667448624968529, -0.44880276918411255, 0.21185463666915894, 0.40928587317466736, -0.2503088414669037, 0.1969691962003708, -0.10066570341587067, -0.13053184747695923, -0.35456183552742004, 0.08545256406068802, 0.36184874176979065, 0.34808292984962463, -0.09467769414186478, 0.009128496050834656, -0.09198688715696335, 0.11937946826219559, -0.08398393541574478, -0.3859615623950958, -0.1857064813375473, 0.22775618731975555, -0.24214160442352295, -0.13492260873317719, 0.1443626433610916, -0.6062142252922058, 0.15114963054656982, 0.10122863203287125, 0.4615779221057892, -0.12574483454227448, 0.3588072955608368, 0.05460832267999649, 0.27286794781684875, 0.18704862892627716, 0.17696541547775269, 0.2638421058654785, 0.05665886774659157, 0.38988062739372253, -0.08656667172908783, -0.19807395339012146, -0.23633797466754913, -0.039404504001140594, -0.091529980301857, 0.13681069016456604, 0.48332664370536804, -0.15766555070877075, -0.0890936478972435, 0.08191072195768356, -0.5941806435585022, -0.13270017504692078, 0.15767234563827515, 0.09860946983098984, 0.06610202044248581, 0.2201749086380005, 0.026484787464141846, 0.16108396649360657, -0.002104650717228651, -0.06189470365643501, -0.09079564362764359, 0.023572133854031563, 0.07405869662761688, 0.13479875028133392, 0.25189709663391113, -0.5213882923126221, 0.2793642282485962, 0.008754638023674488, -0.04602963104844093, -0.15623365342617035, 0.005845748353749514, -0.12555648386478424, 0.1504519283771515, 0.14683939516544342, -0.025929594412446022, 0.0193638876080513, 0.20588454604148865, -0.11022713035345078, -0.17381969094276428, 0.11835368722677231, -0.27519553899765015, -0.2672136127948761, 0.03723617270588875, 0.20101666450500488, 0.03815862536430359, 0.009388755075633526, -0.008148947730660439, 0.005931410938501358, 0.05569886416196823, -0.35651278495788574, 0.02363627590239048, -0.00946472492069006, -0.05580149218440056, -0.08412909507751465, 0.27599242329597473, 0.43609619140625, -0.3608721196651459, -0.10359225422143936, 0.07156519591808319, 0.21758562326431274, 0.721655547618866, 0.34253817796707153, -0.23797181248664856, 0.12730765342712402, -0.36812013387680054, 0.3619050085544586, 0.6931348443031311, 0.016037965193390846, -0.36246511340141296, 0.8522370457649231, -0.10863468050956726, 0.3817507326602936, 0.4800846576690674, -0.20442916452884674, 0.1941486895084381, -0.010518240742385387, 0.3352075219154358, 0.2812868654727936, -0.04457281902432442, 0.038527462631464005, -0.4642711579799652, 0.13121463358402252, 0.04194966331124306, 0.03780548274517059, -0.25131770968437195, 0.29544103145599365, -0.043392449617385864, 0.01503361389040947, 0.3520894944667816, -0.18005642294883728, 0.1081845685839653, 0.2904556095600128, 0.23780660331249237, 0.019946198910474777, 0.20217356085777283, 0.00926429033279419, -0.21780289709568024, 0.032492753118276596, -0.3366103768348694, -0.2629365026950836, -0.28261682391166687, -0.062410399317741394, -0.14011318981647491, 0.1487002819776535, -0.18434782326221466, -0.3533782362937927, 0.1464819461107254, 0.41115084290504456, 0.38089853525161743, 0.022436998784542084, -0.46233075857162476, 0.3006555438041687, -0.29872554540634155, -0.1048562079668045, -0.2611706256866455, 0.4293636083602905, 0.07213553041219711, -0.2631469666957855, 0.17588450014591217, -0.05898888781666756, 0.17178912460803986, -0.24163490533828735, -0.2221168428659439, 0.2450815588235855, -0.12085548043251038, 0.17090673744678497, 0.11697501689195633, -0.2226252257823944, 0.29577508568763733, -0.0062116640619933605, -0.07205654680728912, 0.34458717703819275, 0.2193281352519989, 0.20412081480026245, -0.22399112582206726, 0.4739871025085449, -0.030565738677978516, 0.30299776792526245, 0.020911265164613724, -0.20583592355251312, 0.19243372976779938, -0.008431654423475266, -0.34215247631073, 0.06537134945392609, 0.33458495140075684, -0.1258889138698578, 0.09460526704788208, -0.06129598617553711, -0.3791346549987793, -0.06355652213096619, 0.5271067023277283, -0.08305830508470535, -0.1615021526813507, 0.19268785417079926, -0.1803126335144043, -0.055544331669807434, 0.29656389355659485, -0.006715948227792978, 0.3335770070552826, 0.15754523873329163, 0.10460268706083298, 0.01661323942244053, -0.11111678928136826, -0.2565549612045288, 0.2091604322195053, -0.09003429114818573, 0.11462616920471191, 0.5449168086051941, 0.035636574029922485, 0.04491729661822319, -0.39953985810279846, -0.24281516671180725, -0.12888243794441223, 0.14558058977127075, -0.09908850491046906, 0.3841339647769928, -0.3911353647708893, -0.3713184595108032, -0.12017018347978592, -0.11286964267492294, -0.06306426227092743, -0.08577302098274231, -0.02696532942354679, 0.2985590994358063, -0.2004605531692505, 0.2329237014055252, 0.0005522901774384081, 0.03940192610025406, 0.2519485354423523, -0.4227377474308014, -0.4818941354751587, -0.16303850710391998, -0.1911565065383911, -0.010402805171906948, 0.2656034827232361, -0.28788891434669495, 0.30171629786491394, -0.0459042564034462, -0.3699752390384674, -0.27079975605010986, 0.11940658837556839, 0.14356078207492828, 0.0721820816397667, -0.022700296714901924, -0.09128014743328094, 0.22808434069156647, -0.07968748360872269, -0.33243557810783386, 0.2870095372200012, -0.21745267510414124, -0.14865553379058838, 0.19485162198543549, -0.031184468418359756, -0.0018441491993144155, -0.2352982610464096, -0.26552078127861023, -0.14724449813365936, -0.4852221608161926, 0.289681613445282, -0.04036929830908775, 0.3086782395839691, 0.24291008710861206, 0.14409837126731873, 0.17795969545841217, 0.15565818548202515, -0.05469261482357979, -0.15096262097358704, -0.6362748146057129, 0.391745388507843, -0.11013589054346085, -0.23037828505039215, -0.029500754550099373, -0.1555967926979065, -0.05509719252586365, 0.3612910211086273, -0.4562183916568756, 0.23791278898715973, 0.07027309387922287, 0.08341820538043976, -0.09506741166114807, -0.13405703008174896, 0.19144611060619354, -0.10754648596048355, -0.06036072224378586, -0.25900939106941223, 0.07594393938779831, -0.012235171161592007, 0.2527312934398651, 0.18331071734428406, 0.4013440012931824, 0.7469971776008606, -0.039161670953035355, 0.2865433990955353, 0.35339224338531494, 0.14586865901947021, 0.5503769516944885, -0.13009272515773773, 0.16025090217590332, -0.24258330464363098, -0.21884095668792725, 0.05964690446853638, 0.10508406907320023, -0.3196413815021515, 0.027433320879936218, 0.0012184479273855686, -0.3406587541103363, -0.3240848183631897, 0.1244039386510849, -0.30620133876800537, -0.18829454481601715, 0.20148435235023499, -0.09639352560043335, 0.19641192257404327, -0.039423178881406784, -0.029639704152941704, -0.003231726586818695, 0.11535095423460007, -0.0483287014067173, 0.2654098868370056, 0.4285130202770233, 0.12893341481685638, -0.05432375520467758, -0.18306681513786316, -0.34849369525909424, 0.07876402139663696, 0.274304062128067, 0.6020609140396118, -0.16699986159801483, -0.16875538229942322, 0.07984783500432968, -0.16841286420822144, 0.4636301100254059, -0.12588061392307281, -0.03415439650416374, 0.34727707505226135, -0.12427937984466553, -0.02665332332253456, -0.11905418336391449, -0.04316969960927963, 0.35300955176353455, 0.19594894349575043, 0.6723818778991699, -0.17720657587051392, -0.22020044922828674, 0.11325682699680328, 0.02156510204076767, 0.09070324152708054, -0.15626788139343262, -0.29280713200569153, -0.13581222295761108, -0.20193278789520264, -0.0655042976140976, -0.07177631556987762, 0.24107839167118073, 0.01995612494647503, -0.13128165900707245, 0.053600650280714035, -0.07305435836315155, -0.11266575753688812, 0.0078038908541202545, 0.2940388321876526, -0.03253113478422165, 0.15934212505817413, 0.05702269449830055, 0.5039328932762146, 0.2327844649553299, 0.5136663317680359, 0.5314756631851196, -0.4147782027721405, 0.13258492946624756, 0.07024522870779037, 0.13299407064914703, 0.16498833894729614, -0.13509339094161987, -0.15138906240463257, 0.13810420036315918, 0.2574625015258789, -0.03558160737156868, -0.08321397006511688, 0.23381944000720978, -0.1555822789669037, -0.35673731565475464, -0.46065202355384827, 0.24326127767562866, -0.03920342028141022, 0.19205337762832642, 0.7787454128265381, -0.6046568155288696, -0.16807055473327637, 0.12870416045188904, -0.32743939757347107, 0.6506020426750183, 0.3056919574737549, -0.01261223666369915, 0.4230313003063202, -0.15300701558589935, 0.4291079044342041, -0.4506244957447052, 0.3880237936973572, -0.10754487663507462, -0.18950898945331573, 0.013624980114400387, -0.15217815339565277, 0.3272457420825958, 0.17365042865276337, -0.33012452721595764, 0.15608102083206177, 0.0949871763586998, -0.026111682876944542, 0.056402649730443954, 0.08446604013442993, -0.3410910964012146, -0.14785520732402802, -0.605639636516571, 0.082272469997406, -0.16434246301651, 0.35915955901145935, 0.11986488103866577, -0.3871605396270752, 0.010002903640270233, -0.21891902387142181, -0.16404372453689575, 0.48730704188346863, -0.22052358090877533, -0.043798815459012985, -0.12016496062278748, -0.6457439064979553, -0.323177695274353, -0.16653503477573395, -0.36958083510398865, -0.1014874055981636, -0.09688054770231247, -0.01401581522077322, -0.15600289404392242, 0.0815749242901802, -0.4244859218597412, 0.24423187971115112, 0.18791110813617706, -0.14475750923156738, -0.0854344591498375, 0.17301899194717407, -0.27939414978027344, -0.5516794919967651, 0.2067955881357193, -0.09458183497190475, 0.24433709681034088, 0.1387687474489212, -0.01427964773029089, 0.018898306414484978, -0.19521255791187286, -0.2021060436964035, 0.13159576058387756, -0.14081443846225739, -0.34052911400794983, -0.26670122146606445, -0.15190207958221436, -0.2008611410856247, -0.10448196530342102, 0.2798333466053009, 0.07013795524835587, 0.30247923731803894, 0.39666157960891724, -0.017607953399419785, -0.06330156326293945, -0.2849562168121338, 0.0822029709815979, -0.19944483041763306, -0.06271826475858688, 0.14586104452610016, -0.02385852113366127, 0.1735639125108719, -0.2250165194272995, -0.010574759915471077, 0.15743325650691986, 0.0527799166738987, 0.031123729422688484, -0.4647313058376312, -0.13592912256717682, -0.10715018957853317, -0.005500741768628359, 0.11171876639127731, 0.10440340638160706, 0.20525553822517395, 0.15069445967674255, -0.18481335043907166, -0.2874046266078949, -0.14904487133026123, -0.17983229458332062, 0.038877904415130615, 0.0197014007717371, 0.14451363682746887, 0.30589908361434937, 0.04177616536617279, 0.17262406647205353, 0.18458129465579987, 0.11455286294221878, -0.2760639488697052, -0.12947505712509155, 0.10174425691366196, 0.14755044877529144, -0.1066456064581871, -0.25680676102638245, -0.07840254157781601, -0.23974493145942688, -0.09031287580728531, 0.10302001237869263, -0.08908607065677643, -0.07141606509685516, 0.22048313915729523, 0.3504035770893097, -0.04147942364215851, -0.16511622071266174, -0.06969296932220459, -0.20297081768512726, 0.32461658120155334, -0.14919251203536987, 0.09574572741985321, 0.04793326556682587, 0.0756746307015419, -0.5871012210845947, -0.08130371570587158, -0.09646077454090118, 0.15437820553779602, 0.5952439308166504, -0.45514795184135437, 0.031125590205192566, 0.045569390058517456, 0.16995343565940857, 0.47890153527259827, -0.1304558366537094, 0.03901312127709389, 0.17295101284980774, 0.1876670867204666, -0.048499010503292084, -0.07027356326580048, 0.13779574632644653, 0.10602910816669464, -0.06373286247253418, -0.07113215327262878, -0.15258373320102692, -0.150220587849617, 0.0998600497841835, 0.014319159090518951, 0.33302441239356995, 0.04588882997632027, 0.21135494112968445, 0.40808483958244324, 0.20176036655902863, 0.0718020349740982, -0.38099250197410583, 0.02005464769899845, 0.07189996540546417, -0.18873043358325958, -0.15243852138519287, -0.12570391595363617, 0.08139864355325699, 0.12150508165359497, -0.3927778899669647, -0.31883493065834045, -0.35021424293518066, 0.08560167998075485, -0.11790632456541061, 0.4086129367351532, -0.00591192115098238, 0.2030266672372818, -0.2063986361026764, 0.03384683281183243, 0.0438847541809082, 0.16065940260887146, 0.018573928624391556, 0.11596203595399857, -0.5277096033096313, -0.0310805793851614, -0.05830606445670128, 0.03896535560488701, 0.35443711280822754, 0.5155143141746521, -0.03619877249002457, 0.22145408391952515, -0.10615184158086777, -0.13591232895851135, 0.08837783336639404, 0.1771475076675415, 0.34257474541664124, -0.3739396631717682, 0.28764697909355164, 0.2135392427444458, 0.08201008290052414, -0.07543788105249405, 0.00995432585477829, 0.37296003103256226, 0.36083123087882996, 0.06650175899267197, 0.02780899405479431, 0.03634865954518318, -0.09334030002355576, 0.02666115202009678, 0.33547839522361755, 0.1904854029417038, -0.18797843158245087, 0.22218935191631317, 0.11016619950532913, -0.08871223777532578, 0.39441734552383423, 0.09830266237258911, 0.11966071277856827, -0.11526420712471008, 0.194305419921875, -0.24773810803890228, -0.10861086845397949, 0.06404580175876617, -0.35414454340934753, -0.3587692081928253, -0.06347721070051193, 0.23324859142303467, 0.1124904528260231, 0.04407887905836105, -0.025076933205127716, 0.0849539190530777, -0.12893234193325043, 0.2790074646472931, 0.2456028312444687, -0.08000000566244125, -0.16684448719024658, -0.1844666749238968, -0.20152652263641357, 0.15805566310882568, -0.04040978103876114, -0.1079193651676178, 0.2371380776166916, 0.3279329538345337, -0.06824513524770737, 0.20604518055915833, -0.09007184952497482, -0.18220099806785583, -0.29460176825523376, 0.28071361780166626, -0.35465171933174133, -0.23699714243412018, 0.1787971407175064, 0.23359733819961548, 0.09106533229351044, -0.45439696311950684, 0.20507270097732544, -0.33120283484458923, 0.11783606559038162, 0.05539232864975929, -0.030520927160978317, 0.0156792551279068, 0.06685055047273636, 0.23565326631069183, 0.16210749745368958, 0.11554688215255737, -0.1349952667951584, -0.19207116961479187, -0.07282059639692307, -0.17684759199619293, -0.018311526626348495, 0.14588327705860138, -0.05825034901499748, 0.5028752088546753, -0.04843560978770256, -0.40142470598220825, -0.437139093875885, 0.4285811483860016, -0.04396246373653412, -0.4439987540245056, 0.01039360836148262, 0.014010834507644176, -0.17603705823421478, 0.18188337981700897, 0.012476544827222824, 0.17777271568775177, -0.05060447007417679, 0.06168258935213089, -0.30855193734169006, -0.10215893387794495, 0.5942246317863464, -0.4224972724914551, -0.3192536532878876, 0.3241405487060547, 0.12668755650520325, 0.11907033622264862, 0.1298956274986267, -0.19659116864204407, 0.13247598707675934, 0.4372046887874603, -0.028387805446982384, 0.12153837084770203, 0.1597636342048645, 0.11520256847143173, 0.18512967228889465, 0.11781825125217438, 0.07764856517314911, 0.17259681224822998, -0.25976040959358215, 0.13292770087718964, -0.21405066549777985 ]
https://github.com/huggingface/datasets/issues/2607
Streaming local gzip compressed JSON line files is not working
Hi ! To make the streaming work, we extend `open` in the dataset builder to work with urls. Therefore you just need to use `open` before using `gzip.open`: ```diff - with gzip.open(file, "rt", encoding="utf-8") as f: + with gzip.open(open(file, "rb"), "rt", encoding="utf-8") as f: ``` You can see that it is the case for oscar.py and c4.py for example: https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/oscar/oscar.py#L358-L358 https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/c4/c4.py#L88-L88
## Describe the bug Using streaming to iterate on local gzip compressed JSON files raise a file not exist error ## Steps to reproduce the bug ```python from datasets import load_dataset streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True) next(iter(streamed_dataset)) ``` ## Actual results ``` FileNotFoundError Traceback (most recent call last) <ipython-input-6-27a664e29784> in <module> ----> 1 next(iter(streamed_dataset)) ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 336 337 def __iter__(self): --> 338 for key, example in self._iter(): 339 if self.features: 340 # we encode the example for ClassLabel feature types for example ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self) 333 else: 334 ex_iterable = self._ex_iterable --> 335 yield from ex_iterable 336 337 def __iter__(self): ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 76 77 def __iter__(self): ---> 78 for key, example in self.generate_examples_fn(**self.kwargs): 79 yield key, example 80 ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs) 282 def wrapper(**kwargs): 283 python_formatter = PythonFormatter() --> 284 for key, table in generate_tables_fn(**kwargs): 285 batch = python_formatter.format_batch(table) 286 for i, example in enumerate(_batch_to_examples(batch)): ~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files) 85 file, 86 read_options=self.config.pa_read_options, ---> 87 parse_options=self.config.pa_parse_options, 88 ) 89 except pa.ArrowInvalid as err: ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory ``` ## Environment info - `datasets` version: 1.9.1.dev0 - Platform: Darwin-19.6.0-x86_64-i386-64bit - Python version: 3.7.7 - PyArrow version: 1.0.0
61
Streaming local gzip compressed JSON line files is not working ## Describe the bug Using streaming to iterate on local gzip compressed JSON files raise a file not exist error ## Steps to reproduce the bug ```python from datasets import load_dataset streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True) next(iter(streamed_dataset)) ``` ## Actual results ``` FileNotFoundError Traceback (most recent call last) <ipython-input-6-27a664e29784> in <module> ----> 1 next(iter(streamed_dataset)) ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 336 337 def __iter__(self): --> 338 for key, example in self._iter(): 339 if self.features: 340 # we encode the example for ClassLabel feature types for example ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self) 333 else: 334 ex_iterable = self._ex_iterable --> 335 yield from ex_iterable 336 337 def __iter__(self): ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self) 76 77 def __iter__(self): ---> 78 for key, example in self.generate_examples_fn(**self.kwargs): 79 yield key, example 80 ~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs) 282 def wrapper(**kwargs): 283 python_formatter = PythonFormatter() --> 284 for key, table in generate_tables_fn(**kwargs): 285 batch = python_formatter.format_batch(table) 286 for i, example in enumerate(_batch_to_examples(batch)): ~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files) 85 file, 86 read_options=self.config.pa_read_options, ---> 87 parse_options=self.config.pa_parse_options, 88 ) 89 except pa.ArrowInvalid as err: ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory ``` ## Environment info - `datasets` version: 1.9.1.dev0 - Platform: Darwin-19.6.0-x86_64-i386-64bit - Python version: 3.7.7 - PyArrow version: 1.0.0 Hi ! To make the streaming work, we extend `open` in the dataset builder to work with urls. Therefore you just need to use `open` before using `gzip.open`: ```diff - with gzip.open(file, "rt", encoding="utf-8") as f: + with gzip.open(open(file, "rb"), "rt", encoding="utf-8") as f: ``` You can see that it is the case for oscar.py and c4.py for example: https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/oscar/oscar.py#L358-L358 https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/c4/c4.py#L88-L88
[ -0.19924888014793396, -0.13397808372974396, -0.009144364856183529, 0.23913481831550598, 0.07776414602994919, 0.016879990696907043, 0.3976743817329407, 0.5178916454315186, 0.19702094793319702, 0.07899829745292664, 0.10300148278474808, 0.3306828737258911, -0.08836667239665985, 0.02087412029504776, 0.22888697683811188, -0.18093447387218475, -0.04366183280944824, 0.3560611307621002, -0.025166667997837067, 0.0015848748153075576, -0.1305662840604782, 0.2937987744808197, -0.14045874774456024, -0.0185171477496624, -0.018798181787133217, -0.03955554589629173, -0.04715000465512276, 0.15009424090385437, -0.09395942091941833, -0.33263856172561646, 0.0627695769071579, -0.168414905667305, 0.18802285194396973, 0.44545504450798035, -0.00011453595652710646, 0.288641095161438, 0.29611077904701233, -0.1629139482975006, -0.38860681653022766, -0.4712480306625366, -0.22990114986896515, -0.149298757314682, -0.1307714581489563, -0.28584524989128113, -0.13781937956809998, -0.34743601083755493, -0.03375683352351189, -0.507199764251709, 0.5416869521141052, 0.2922609746456146, 0.1556636542081833, 0.041965220123529434, -0.0617719367146492, 0.09057901799678802, 0.03901597484946251, 0.15732352435588837, -0.08860812336206436, 0.315097451210022, 0.03278826177120209, 0.1149681955575943, 0.055284976959228516, 0.42864570021629333, -0.22549550235271454, -0.17477674782276154, 0.1473698914051056, -0.0008162494050338864, -0.08438283950090408, -0.12578707933425903, -0.16831550002098083, 0.08573482930660248, 0.18454509973526, -0.4122558534145355, -0.4398343563079834, -0.37610766291618347, 0.04667448624968529, -0.44880276918411255, 0.21185463666915894, 0.40928587317466736, -0.2503088414669037, 0.1969691962003708, -0.10066570341587067, -0.13053184747695923, -0.35456183552742004, 0.08545256406068802, 0.36184874176979065, 0.34808292984962463, -0.09467769414186478, 0.009128496050834656, -0.09198688715696335, 0.11937946826219559, -0.08398393541574478, -0.3859615623950958, -0.1857064813375473, 0.22775618731975555, -0.24214160442352295, -0.13492260873317719, 0.1443626433610916, -0.6062142252922058, 0.15114963054656982, 0.10122863203287125, 0.4615779221057892, -0.12574483454227448, 0.3588072955608368, 0.05460832267999649, 0.27286794781684875, 0.18704862892627716, 0.17696541547775269, 0.2638421058654785, 0.05665886774659157, 0.38988062739372253, -0.08656667172908783, -0.19807395339012146, -0.23633797466754913, -0.039404504001140594, -0.091529980301857, 0.13681069016456604, 0.48332664370536804, -0.15766555070877075, -0.0890936478972435, 0.08191072195768356, -0.5941806435585022, -0.13270017504692078, 0.15767234563827515, 0.09860946983098984, 0.06610202044248581, 0.2201749086380005, 0.026484787464141846, 0.16108396649360657, -0.002104650717228651, -0.06189470365643501, -0.09079564362764359, 0.023572133854031563, 0.07405869662761688, 0.13479875028133392, 0.25189709663391113, -0.5213882923126221, 0.2793642282485962, 0.008754638023674488, -0.04602963104844093, -0.15623365342617035, 0.005845748353749514, -0.12555648386478424, 0.1504519283771515, 0.14683939516544342, -0.025929594412446022, 0.0193638876080513, 0.20588454604148865, -0.11022713035345078, -0.17381969094276428, 0.11835368722677231, -0.27519553899765015, -0.2672136127948761, 0.03723617270588875, 0.20101666450500488, 0.03815862536430359, 0.009388755075633526, -0.008148947730660439, 0.005931410938501358, 0.05569886416196823, -0.35651278495788574, 0.02363627590239048, -0.00946472492069006, -0.05580149218440056, -0.08412909507751465, 0.27599242329597473, 0.43609619140625, -0.3608721196651459, -0.10359225422143936, 0.07156519591808319, 0.21758562326431274, 0.721655547618866, 0.34253817796707153, -0.23797181248664856, 0.12730765342712402, -0.36812013387680054, 0.3619050085544586, 0.6931348443031311, 0.016037965193390846, -0.36246511340141296, 0.8522370457649231, -0.10863468050956726, 0.3817507326602936, 0.4800846576690674, -0.20442916452884674, 0.1941486895084381, -0.010518240742385387, 0.3352075219154358, 0.2812868654727936, -0.04457281902432442, 0.038527462631464005, -0.4642711579799652, 0.13121463358402252, 0.04194966331124306, 0.03780548274517059, -0.25131770968437195, 0.29544103145599365, -0.043392449617385864, 0.01503361389040947, 0.3520894944667816, -0.18005642294883728, 0.1081845685839653, 0.2904556095600128, 0.23780660331249237, 0.019946198910474777, 0.20217356085777283, 0.00926429033279419, -0.21780289709568024, 0.032492753118276596, -0.3366103768348694, -0.2629365026950836, -0.28261682391166687, -0.062410399317741394, -0.14011318981647491, 0.1487002819776535, -0.18434782326221466, -0.3533782362937927, 0.1464819461107254, 0.41115084290504456, 0.38089853525161743, 0.022436998784542084, -0.46233075857162476, 0.3006555438041687, -0.29872554540634155, -0.1048562079668045, -0.2611706256866455, 0.4293636083602905, 0.07213553041219711, -0.2631469666957855, 0.17588450014591217, -0.05898888781666756, 0.17178912460803986, -0.24163490533828735, -0.2221168428659439, 0.2450815588235855, -0.12085548043251038, 0.17090673744678497, 0.11697501689195633, -0.2226252257823944, 0.29577508568763733, -0.0062116640619933605, -0.07205654680728912, 0.34458717703819275, 0.2193281352519989, 0.20412081480026245, -0.22399112582206726, 0.4739871025085449, -0.030565738677978516, 0.30299776792526245, 0.020911265164613724, -0.20583592355251312, 0.19243372976779938, -0.008431654423475266, -0.34215247631073, 0.06537134945392609, 0.33458495140075684, -0.1258889138698578, 0.09460526704788208, -0.06129598617553711, -0.3791346549987793, -0.06355652213096619, 0.5271067023277283, -0.08305830508470535, -0.1615021526813507, 0.19268785417079926, -0.1803126335144043, -0.055544331669807434, 0.29656389355659485, -0.006715948227792978, 0.3335770070552826, 0.15754523873329163, 0.10460268706083298, 0.01661323942244053, -0.11111678928136826, -0.2565549612045288, 0.2091604322195053, -0.09003429114818573, 0.11462616920471191, 0.5449168086051941, 0.035636574029922485, 0.04491729661822319, -0.39953985810279846, -0.24281516671180725, -0.12888243794441223, 0.14558058977127075, -0.09908850491046906, 0.3841339647769928, -0.3911353647708893, -0.3713184595108032, -0.12017018347978592, -0.11286964267492294, -0.06306426227092743, -0.08577302098274231, -0.02696532942354679, 0.2985590994358063, -0.2004605531692505, 0.2329237014055252, 0.0005522901774384081, 0.03940192610025406, 0.2519485354423523, -0.4227377474308014, -0.4818941354751587, -0.16303850710391998, -0.1911565065383911, -0.010402805171906948, 0.2656034827232361, -0.28788891434669495, 0.30171629786491394, -0.0459042564034462, -0.3699752390384674, -0.27079975605010986, 0.11940658837556839, 0.14356078207492828, 0.0721820816397667, -0.022700296714901924, -0.09128014743328094, 0.22808434069156647, -0.07968748360872269, -0.33243557810783386, 0.2870095372200012, -0.21745267510414124, -0.14865553379058838, 0.19485162198543549, -0.031184468418359756, -0.0018441491993144155, -0.2352982610464096, -0.26552078127861023, -0.14724449813365936, -0.4852221608161926, 0.289681613445282, -0.04036929830908775, 0.3086782395839691, 0.24291008710861206, 0.14409837126731873, 0.17795969545841217, 0.15565818548202515, -0.05469261482357979, -0.15096262097358704, -0.6362748146057129, 0.391745388507843, -0.11013589054346085, -0.23037828505039215, -0.029500754550099373, -0.1555967926979065, -0.05509719252586365, 0.3612910211086273, -0.4562183916568756, 0.23791278898715973, 0.07027309387922287, 0.08341820538043976, -0.09506741166114807, -0.13405703008174896, 0.19144611060619354, -0.10754648596048355, -0.06036072224378586, -0.25900939106941223, 0.07594393938779831, -0.012235171161592007, 0.2527312934398651, 0.18331071734428406, 0.4013440012931824, 0.7469971776008606, -0.039161670953035355, 0.2865433990955353, 0.35339224338531494, 0.14586865901947021, 0.5503769516944885, -0.13009272515773773, 0.16025090217590332, -0.24258330464363098, -0.21884095668792725, 0.05964690446853638, 0.10508406907320023, -0.3196413815021515, 0.027433320879936218, 0.0012184479273855686, -0.3406587541103363, -0.3240848183631897, 0.1244039386510849, -0.30620133876800537, -0.18829454481601715, 0.20148435235023499, -0.09639352560043335, 0.19641192257404327, -0.039423178881406784, -0.029639704152941704, -0.003231726586818695, 0.11535095423460007, -0.0483287014067173, 0.2654098868370056, 0.4285130202770233, 0.12893341481685638, -0.05432375520467758, -0.18306681513786316, -0.34849369525909424, 0.07876402139663696, 0.274304062128067, 0.6020609140396118, -0.16699986159801483, -0.16875538229942322, 0.07984783500432968, -0.16841286420822144, 0.4636301100254059, -0.12588061392307281, -0.03415439650416374, 0.34727707505226135, -0.12427937984466553, -0.02665332332253456, -0.11905418336391449, -0.04316969960927963, 0.35300955176353455, 0.19594894349575043, 0.6723818778991699, -0.17720657587051392, -0.22020044922828674, 0.11325682699680328, 0.02156510204076767, 0.09070324152708054, -0.15626788139343262, -0.29280713200569153, -0.13581222295761108, -0.20193278789520264, -0.0655042976140976, -0.07177631556987762, 0.24107839167118073, 0.01995612494647503, -0.13128165900707245, 0.053600650280714035, -0.07305435836315155, -0.11266575753688812, 0.0078038908541202545, 0.2940388321876526, -0.03253113478422165, 0.15934212505817413, 0.05702269449830055, 0.5039328932762146, 0.2327844649553299, 0.5136663317680359, 0.5314756631851196, -0.4147782027721405, 0.13258492946624756, 0.07024522870779037, 0.13299407064914703, 0.16498833894729614, -0.13509339094161987, -0.15138906240463257, 0.13810420036315918, 0.2574625015258789, -0.03558160737156868, -0.08321397006511688, 0.23381944000720978, -0.1555822789669037, -0.35673731565475464, -0.46065202355384827, 0.24326127767562866, -0.03920342028141022, 0.19205337762832642, 0.7787454128265381, -0.6046568155288696, -0.16807055473327637, 0.12870416045188904, -0.32743939757347107, 0.6506020426750183, 0.3056919574737549, -0.01261223666369915, 0.4230313003063202, -0.15300701558589935, 0.4291079044342041, -0.4506244957447052, 0.3880237936973572, -0.10754487663507462, -0.18950898945331573, 0.013624980114400387, -0.15217815339565277, 0.3272457420825958, 0.17365042865276337, -0.33012452721595764, 0.15608102083206177, 0.0949871763586998, -0.026111682876944542, 0.056402649730443954, 0.08446604013442993, -0.3410910964012146, -0.14785520732402802, -0.605639636516571, 0.082272469997406, -0.16434246301651, 0.35915955901145935, 0.11986488103866577, -0.3871605396270752, 0.010002903640270233, -0.21891902387142181, -0.16404372453689575, 0.48730704188346863, -0.22052358090877533, -0.043798815459012985, -0.12016496062278748, -0.6457439064979553, -0.323177695274353, -0.16653503477573395, -0.36958083510398865, -0.1014874055981636, -0.09688054770231247, -0.01401581522077322, -0.15600289404392242, 0.0815749242901802, -0.4244859218597412, 0.24423187971115112, 0.18791110813617706, -0.14475750923156738, -0.0854344591498375, 0.17301899194717407, -0.27939414978027344, -0.5516794919967651, 0.2067955881357193, -0.09458183497190475, 0.24433709681034088, 0.1387687474489212, -0.01427964773029089, 0.018898306414484978, -0.19521255791187286, -0.2021060436964035, 0.13159576058387756, -0.14081443846225739, -0.34052911400794983, -0.26670122146606445, -0.15190207958221436, -0.2008611410856247, -0.10448196530342102, 0.2798333466053009, 0.07013795524835587, 0.30247923731803894, 0.39666157960891724, -0.017607953399419785, -0.06330156326293945, -0.2849562168121338, 0.0822029709815979, -0.19944483041763306, -0.06271826475858688, 0.14586104452610016, -0.02385852113366127, 0.1735639125108719, -0.2250165194272995, -0.010574759915471077, 0.15743325650691986, 0.0527799166738987, 0.031123729422688484, -0.4647313058376312, -0.13592912256717682, -0.10715018957853317, -0.005500741768628359, 0.11171876639127731, 0.10440340638160706, 0.20525553822517395, 0.15069445967674255, -0.18481335043907166, -0.2874046266078949, -0.14904487133026123, -0.17983229458332062, 0.038877904415130615, 0.0197014007717371, 0.14451363682746887, 0.30589908361434937, 0.04177616536617279, 0.17262406647205353, 0.18458129465579987, 0.11455286294221878, -0.2760639488697052, -0.12947505712509155, 0.10174425691366196, 0.14755044877529144, -0.1066456064581871, -0.25680676102638245, -0.07840254157781601, -0.23974493145942688, -0.09031287580728531, 0.10302001237869263, -0.08908607065677643, -0.07141606509685516, 0.22048313915729523, 0.3504035770893097, -0.04147942364215851, -0.16511622071266174, -0.06969296932220459, -0.20297081768512726, 0.32461658120155334, -0.14919251203536987, 0.09574572741985321, 0.04793326556682587, 0.0756746307015419, -0.5871012210845947, -0.08130371570587158, -0.09646077454090118, 0.15437820553779602, 0.5952439308166504, -0.45514795184135437, 0.031125590205192566, 0.045569390058517456, 0.16995343565940857, 0.47890153527259827, -0.1304558366537094, 0.03901312127709389, 0.17295101284980774, 0.1876670867204666, -0.048499010503292084, -0.07027356326580048, 0.13779574632644653, 0.10602910816669464, -0.06373286247253418, -0.07113215327262878, -0.15258373320102692, -0.150220587849617, 0.0998600497841835, 0.014319159090518951, 0.33302441239356995, 0.04588882997632027, 0.21135494112968445, 0.40808483958244324, 0.20176036655902863, 0.0718020349740982, -0.38099250197410583, 0.02005464769899845, 0.07189996540546417, -0.18873043358325958, -0.15243852138519287, -0.12570391595363617, 0.08139864355325699, 0.12150508165359497, -0.3927778899669647, -0.31883493065834045, -0.35021424293518066, 0.08560167998075485, -0.11790632456541061, 0.4086129367351532, -0.00591192115098238, 0.2030266672372818, -0.2063986361026764, 0.03384683281183243, 0.0438847541809082, 0.16065940260887146, 0.018573928624391556, 0.11596203595399857, -0.5277096033096313, -0.0310805793851614, -0.05830606445670128, 0.03896535560488701, 0.35443711280822754, 0.5155143141746521, -0.03619877249002457, 0.22145408391952515, -0.10615184158086777, -0.13591232895851135, 0.08837783336639404, 0.1771475076675415, 0.34257474541664124, -0.3739396631717682, 0.28764697909355164, 0.2135392427444458, 0.08201008290052414, -0.07543788105249405, 0.00995432585477829, 0.37296003103256226, 0.36083123087882996, 0.06650175899267197, 0.02780899405479431, 0.03634865954518318, -0.09334030002355576, 0.02666115202009678, 0.33547839522361755, 0.1904854029417038, -0.18797843158245087, 0.22218935191631317, 0.11016619950532913, -0.08871223777532578, 0.39441734552383423, 0.09830266237258911, 0.11966071277856827, -0.11526420712471008, 0.194305419921875, -0.24773810803890228, -0.10861086845397949, 0.06404580175876617, -0.35414454340934753, -0.3587692081928253, -0.06347721070051193, 0.23324859142303467, 0.1124904528260231, 0.04407887905836105, -0.025076933205127716, 0.0849539190530777, -0.12893234193325043, 0.2790074646472931, 0.2456028312444687, -0.08000000566244125, -0.16684448719024658, -0.1844666749238968, -0.20152652263641357, 0.15805566310882568, -0.04040978103876114, -0.1079193651676178, 0.2371380776166916, 0.3279329538345337, -0.06824513524770737, 0.20604518055915833, -0.09007184952497482, -0.18220099806785583, -0.29460176825523376, 0.28071361780166626, -0.35465171933174133, -0.23699714243412018, 0.1787971407175064, 0.23359733819961548, 0.09106533229351044, -0.45439696311950684, 0.20507270097732544, -0.33120283484458923, 0.11783606559038162, 0.05539232864975929, -0.030520927160978317, 0.0156792551279068, 0.06685055047273636, 0.23565326631069183, 0.16210749745368958, 0.11554688215255737, -0.1349952667951584, -0.19207116961479187, -0.07282059639692307, -0.17684759199619293, -0.018311526626348495, 0.14588327705860138, -0.05825034901499748, 0.5028752088546753, -0.04843560978770256, -0.40142470598220825, -0.437139093875885, 0.4285811483860016, -0.04396246373653412, -0.4439987540245056, 0.01039360836148262, 0.014010834507644176, -0.17603705823421478, 0.18188337981700897, 0.012476544827222824, 0.17777271568775177, -0.05060447007417679, 0.06168258935213089, -0.30855193734169006, -0.10215893387794495, 0.5942246317863464, -0.4224972724914551, -0.3192536532878876, 0.3241405487060547, 0.12668755650520325, 0.11907033622264862, 0.1298956274986267, -0.19659116864204407, 0.13247598707675934, 0.4372046887874603, -0.028387805446982384, 0.12153837084770203, 0.1597636342048645, 0.11520256847143173, 0.18512967228889465, 0.11781825125217438, 0.07764856517314911, 0.17259681224822998, -0.25976040959358215, 0.13292770087718964, -0.21405066549777985 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
Hi ! If we want something more general, we could either 1. delete the extracted files after the arrow data generation automatically, or 2. delete each extracted file during the arrow generation right after it has been closed. Solution 2 is better to save disk space during the arrow generation. Is it what you had in mind ? The API could look like ```python load_dataset(..., delete_extracted_files_after_usage=True) ``` In terms of implementation, here are some directions we could take for each solution: 1. get the list of the extracted files from the DownloadManager and then delete them after the dataset is processed. This can be implemented in `download_and_prepare` I guess 2. maybe wrap and mock `open` in the builder to make it delete the file when the file is closed.
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
129
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. Hi ! If we want something more general, we could either 1. delete the extracted files after the arrow data generation automatically, or 2. delete each extracted file during the arrow generation right after it has been closed. Solution 2 is better to save disk space during the arrow generation. Is it what you had in mind ? The API could look like ```python load_dataset(..., delete_extracted_files_after_usage=True) ``` In terms of implementation, here are some directions we could take for each solution: 1. get the list of the extracted files from the DownloadManager and then delete them after the dataset is processed. This can be implemented in `download_and_prepare` I guess 2. maybe wrap and mock `open` in the builder to make it delete the file when the file is closed.
[ -0.04222412407398224, -0.052078187465667725, -0.1375647336244583, 0.2491360902786255, -0.08902016282081604, 0.1040986031293869, -0.11982809007167816, 0.1847195029258728, 0.23423108458518982, 0.2407584935426712, 0.15672893822193146, 0.5178811550140381, -0.34048914909362793, -0.05085218697786331, -0.13492853939533234, -0.02020053192973137, -0.19922538101673126, 0.3400242030620575, -0.004785167519003153, 0.23032978177070618, -0.22097879648208618, 0.026225382462143898, 0.023204149678349495, -0.10261794924736023, 0.08117920905351639, -0.3859206736087799, 0.13598710298538208, -0.18674656748771667, -0.16227573156356812, -0.5164054036140442, 0.05417510122060776, 0.5212087631225586, 0.23224946856498718, 0.09713230282068253, -0.00012233477900736034, 0.03224802389740944, 0.2591515779495239, 0.07995425164699554, -0.40756142139434814, 0.12440096586942673, -0.14612643420696259, -0.24530163407325745, 0.2597363591194153, -0.16711737215518951, 0.21014273166656494, -0.5648967027664185, -0.22389613091945648, -0.6139014363288879, 0.5910026431083679, -0.0977441668510437, 0.049843426793813705, 0.13846123218536377, -0.32603174448013306, 0.24526230990886688, 0.20042748749256134, 0.27703237533569336, -0.04240064322948456, 0.022367261350154877, 0.415189653635025, 0.09675445407629013, 0.16196702420711517, 0.38070395588874817, -0.05502406880259514, -0.16031967103481293, 0.44451606273651123, 0.06313201785087585, -0.03192407265305519, -0.4852728545665741, 0.13982512056827545, -0.006692962255328894, 0.7061523795127869, -0.4330635666847229, -0.26728886365890503, -0.45743894577026367, 0.02804737165570259, -0.5922437310218811, 0.03859216719865799, 0.29515644907951355, -0.1211811974644661, 0.2089286893606186, -0.11039554327726364, -0.4544367492198944, -0.3733914792537689, -0.08714091777801514, 0.60771644115448, -0.3243745267391205, -0.05686230584979057, -0.0656689926981926, 0.36974388360977173, 0.07367858290672302, 0.2949279248714447, -0.26989543437957764, -0.13990995287895203, 0.5059066414833069, -0.0271433237940073, -0.1845744401216507, -0.2607625424861908, -0.28971001505851746, 0.11943544447422028, 0.30298230051994324, 0.3516388237476349, -0.0070104594342410564, 0.19306185841560364, 0.11101508140563965, 0.18766993284225464, 0.3751327395439148, 0.00788786355406046, -0.0530540868639946, 0.1721748411655426, 0.20768050849437714, 0.06429824978113174, -0.0915423035621643, 0.0383334644138813, -0.12787829339504242, 0.3636782169342041, 0.015457435511052608, 0.0716332197189331, 0.026188280433416367, -0.16508187353610992, 0.078248992562294, 0.12913043797016144, -0.13516761362552643, 0.15134911239147186, 0.26704099774360657, 0.058730799704790115, 0.1620473712682724, 0.2158886194229126, 0.23504413664340973, -0.029941614717245102, -0.14658819139003754, 0.13762269914150238, 0.07318039238452911, -0.240181103348732, -0.18840906023979187, 0.3641347587108612, -0.008334607817232609, 0.041641414165496826, 0.0005884752608835697, -0.31387826800346375, -0.06418202817440033, 0.6676414012908936, -0.09938564151525497, 0.28070127964019775, 0.3421969413757324, -0.10934694111347198, -0.24361905455589294, -0.3248206079006195, -0.11986901611089706, -0.19655841588974, 0.5875694751739502, -0.15688742697238922, -0.3170168995857239, -0.13684365153312683, 0.12908996641635895, -0.027050931006669998, 0.2437290996313095, -0.5556283593177795, 0.11721152067184448, 0.16315266489982605, 0.06272990256547928, -0.022435326129198074, 0.2961556017398834, -0.05861037224531174, -0.17877741158008575, -0.18934781849384308, 0.36914417147636414, -0.5007239580154419, -0.12231052666902542, -0.3205632269382477, -0.17976754903793335, 0.1424596607685089, -0.0010879439068958163, -0.12397465854883194, 0.37910667061805725, -0.2620406448841095, 0.0915970727801323, 0.512464165687561, -0.1815718710422516, -0.4231870472431183, 0.14827562868595123, 0.11009837687015533, 0.2711139917373657, 0.3149678409099579, 0.25079628825187683, 0.27878883481025696, 0.0021172035485506058, -0.03848826885223389, 0.4016495645046234, 0.07365186512470245, 0.0040994673036038876, -0.22394655644893646, -0.41164591908454895, 0.05135578662157059, 0.2471984177827835, -0.020793559029698372, 0.03988355025649071, 0.06239660456776619, -0.10242891311645508, 0.30692315101623535, 0.09782592207193375, 0.1519835889339447, 0.13272178173065186, 0.14489252865314484, -0.24857211112976074, -0.20805887877941132, 0.06978016346693039, -0.5534024238586426, 0.1737687885761261, -0.5192010402679443, -0.2917678952217102, -0.4091200828552246, -0.3444461226463318, 0.0820593386888504, 0.19592547416687012, -0.2989017963409424, 0.19668181240558624, 0.03276409953832626, -0.18940414488315582, 0.28316834568977356, -0.006417279597371817, -0.4284307360649109, 0.019905855879187584, -0.14089980721473694, 0.1741945594549179, -0.45013168454170227, 0.10403716564178467, 0.2124265879392624, -0.1986985057592392, -0.1110474020242691, -0.009402459487318993, -0.29103755950927734, -0.34229183197021484, -0.09363898634910583, 0.2829711139202118, 0.36512064933776855, 0.2683429718017578, 0.10736408084630966, 0.22819769382476807, 0.2203880399465561, 0.2218506783246994, 0.08242973685264587, 0.25904878973960876, 0.08714091032743454, 0.18248619139194489, -0.22912602126598358, 0.5258798599243164, -0.07650987803936005, 0.024131160229444504, -0.128398135304451, -0.3022352159023285, 0.2240571826696396, -0.0017424634424969554, 0.012859460897743702, -0.47302424907684326, -0.05428733304142952, 0.36830639839172363, 0.12888827919960022, 0.091766357421875, 0.14760708808898926, -0.015086796134710312, 0.09251108020544052, -0.10315106064081192, -0.10267000645399094, 0.3242191672325134, -0.06961776316165924, -0.16131827235221863, 0.05733013525605202, 0.4151660203933716, 0.44812074303627014, 0.0921723023056984, -0.11546344310045242, -0.07876579463481903, 0.47028109431266785, 0.051421139389276505, 0.2684762179851532, 0.19535404443740845, 0.08138639479875565, 0.3618115782737732, 0.16824078559875488, -0.062261223793029785, -0.2748677134513855, -0.09148380160331726, 0.07154499739408493, 0.2726362347602844, 0.22083398699760437, -0.06113802269101143, -0.18393658101558685, -0.29298311471939087, 0.27599474787712097, 0.12522061169147491, 0.21729017794132233, -0.016195816919207573, 0.40935468673706055, 0.07793309539556503, -0.38933897018432617, 0.07481950521469116, 0.008211825974285603, 0.528410017490387, -0.08733656257390976, -0.267245352268219, -0.34041857719421387, -0.1312676966190338, 0.23669297993183136, -0.027529675513505936, 0.3818289637565613, -0.19845521450042725, 0.5107130408287048, 0.07859081029891968, 0.09597505629062653, -0.030271997675299644, -0.09184487164020538, 0.061533790081739426, 0.4084799885749817, 0.05227866396307945, 0.1331736296415329, 0.1684499830007553, 0.12487383186817169, 0.060920003801584244, -0.13083131611347198, -0.2205236405134201, -0.09630431234836578, 0.15619267523288727, 0.052433937788009644, 0.09632497280836105, -0.21652494370937347, -0.016315355896949768, -0.30719509720802307, -0.37771645188331604, 0.2557629346847534, 0.10729196667671204, 0.13723638653755188, 0.08451186120510101, 0.2943946421146393, -0.0587565153837204, 0.14127299189567566, 0.07038293778896332, 0.04538789018988609, -0.5879277586936951, 0.11898233741521835, -0.2073390930891037, 0.07256989926099777, 0.3074823319911957, -0.12210416048765182, 0.06042331084609032, 0.3388398289680481, -0.37634941935539246, -0.06939256191253662, -0.04157330468297005, 0.20565685629844666, -0.2972855269908905, -0.036534473299980164, 0.19676010310649872, 0.33206743001937866, -0.02174905687570572, 0.00545066874474287, 0.2608988583087921, 0.164894238114357, 0.2400369495153427, 0.0658642128109932, 0.22860166430473328, 0.2869086265563965, 0.05742710828781128, 0.47742199897766113, -0.12406916916370392, 0.021215740591287613, 0.33306246995925903, 0.32247838377952576, 0.3370010554790497, -0.222660630941391, 0.2584810256958008, -0.5167123675346375, -0.07041656970977783, -0.12297660112380981, 0.08866016566753387, 0.14520493149757385, -0.12835638225078583, 0.09056700766086578, -0.15577584505081177, -0.2041720598936081, -0.18588919937610626, 0.30370938777923584, -0.3123897612094879, 0.08660029619932175, -0.024936966598033905, -0.22530847787857056, -0.16899409890174866, -0.05793839320540428, 0.0685017928481102, 0.11713161319494247, 0.5481667518615723, -0.12295626848936081, -0.06193391606211662, -0.07531258463859558, -0.37171274423599243, 0.24668678641319275, -0.14434778690338135, -0.27008482813835144, 0.14419175684452057, 0.02280283346772194, 0.19016414880752563, 0.09201227873563766, 0.2852836847305298, -0.021463565528392792, -0.09214279055595398, -0.1937490552663803, -0.024102449417114258, -0.3323919475078583, 0.00909469649195671, 0.059958428144454956, 0.04491456598043442, -0.15822869539260864, 0.398544579744339, -0.30919110774993896, -0.1924603283405304, -0.3509971499443054, 0.640080451965332, -0.2645499110221863, -0.0694294422864914, -0.14402617514133453, -0.30620092153549194, -0.6328192949295044, 0.06679052859544754, 0.07988032698631287, -0.05907677859067917, 0.15394888818264008, -0.33153781294822693, -0.10191880166530609, -0.18061761558055878, 0.018712813034653664, 0.014303980395197868, 0.6302095651626587, -0.36308103799819946, 0.09315507858991623, -0.13072599470615387, 0.023438597097992897, 0.4154004454612732, 0.30958688259124756, -0.09043918550014496, -0.16624847054481506, -0.08794055134057999, -0.2519861161708832, 0.06396502256393433, 0.16846616566181183, -0.27059951424598694, 0.4433527886867523, -0.18180333077907562, 0.5496019721031189, -0.10453568398952484, -0.021343303844332695, -0.07653825730085373, -0.2536762058734894, 0.0044938065111637115, -0.45481613278388977, 0.22769111394882202, 0.04461601749062538, -0.17590633034706116, 0.5514418482780457, -0.08505985885858536, -0.26997441053390503, 0.5203487277030945, 0.06900773197412491, 1.097914695739746, -0.04841841012239456, 0.058754004538059235, -0.016736134886741638, -0.2775869071483612, 0.3807534873485565, -0.4976658821105957, 0.2090122103691101, -0.06454646587371826, -0.031050045043230057, 0.049186017364263535, -0.06229403614997864, 0.04272859916090965, 0.2365059107542038, -0.19303739070892334, 0.12303446978330612, -0.3904760181903839, -0.13137345016002655, -0.2855242192745209, 0.35038328170776367, -0.26335713267326355, -0.29374271631240845, -0.24290603399276733, -0.042314253747463226, 0.04378446191549301, 0.004602049943059683, -0.31257715821266174, -0.08231434971094131, 0.34019166231155396, -0.062388453632593155, 0.2848975360393524, -0.14018577337265015, -0.3396238684654236, 0.3695366382598877, -0.18373271822929382, -0.1763903945684433, -0.27781763672828674, 0.20903624594211578, -0.2893452048301697, -0.01327843964099884, 0.1523067206144333, 0.06730969995260239, 0.00642665009945631, 0.02335285395383835, -0.33204108476638794, -0.0007069581188261509, 0.0622994527220726, -0.16004154086112976, 0.0114370658993721, 0.20374968647956848, -0.3674547076225281, -0.336938738822937, 0.21514606475830078, 0.14481163024902344, -0.0885297954082489, 0.05723006650805473, -0.3552042245864868, -0.2007964551448822, -0.4958280324935913, 0.08581291884183884, 0.06282365322113037, 0.3129726052284241, -0.24828416109085083, 0.2814539074897766, -0.3506733179092407, -0.13248294591903687, -0.11042481660842896, -0.2255333513021469, 0.2954692840576172, -0.050076924264431, 0.3738798499107361, -0.16855581104755402, -0.21558170020580292, -0.33752918243408203, 0.020504992455244064, -0.017895950004458427, -0.4794526696205139, 0.46378934383392334, 0.15697304904460907, -0.07216237485408783, 0.03540181368589401, 0.008994614705443382, -0.09424485266208649, 0.049326445907354355, -0.15729866921901703, -0.17859026789665222, -0.5771639943122864, 0.23688749969005585, 0.265747606754303, 0.4896394908428192, 0.034576889127492905, -0.11167863756418228, -0.10581060498952866, 0.03295794874429703, -0.2004258781671524, 0.22640839219093323, 0.2059655338525772, 0.13561154901981354, -0.09614372253417969, 0.27472707629203796, 0.013817571103572845, -0.22921042144298553, -0.11262661218643188, 0.03344880789518356, -0.16565614938735962, -0.12691788375377655, -0.1983717978000641, 0.1402418613433838, -0.09141459316015244, -0.13503384590148926, -0.09112195670604706, -0.289968341588974, 0.08102523535490036, -0.1910168081521988, 0.26229289174079895, -0.27835872769355774, -0.13212744891643524, -0.12733066082000732, 0.37508726119995117, 0.03311667963862419, -0.25103598833084106, 0.22649896144866943, -0.1331770420074463, 0.4104573428630829, 0.02755688689649105, 0.027309918776154518, -0.09927647560834885, -0.05671299621462822, -0.24998866021633148, 0.0564192458987236, 0.25008782744407654, 0.02634243108332157, 0.15214771032333374, -0.07124579697847366, -0.09944340586662292, -0.0005778333288617432, 0.19166728854179382, 0.274194598197937, -0.06994964927434921, -0.0008063236018642783, -0.07769741117954254, 0.1756119281053543, -0.29820236563682556, -0.15867045521736145, -0.059192266315221786, -0.0076437946408987045, -0.161935955286026, 0.29615095257759094, 0.22564879059791565, 0.08999226987361908, -0.11989430338144302, 0.15137983858585358, 0.3126507103443146, -0.2347841113805771, 0.2393762767314911, 0.36986738443374634, 0.07807514071464539, -0.10592706501483917, -0.05458531156182289, 0.3103906810283661, 0.21099123358726501, -0.046723030507564545, -0.25925928354263306, 0.4465027451515198, 0.5072867274284363, 0.2389114946126938, -0.5002036094665527, -0.3075028657913208, -0.22326838970184326, 0.5195417404174805, -0.08148378133773804, 0.3681807219982147, 0.4082184433937073, 0.23829254508018494, 0.2595689296722412, -0.2480432391166687, -0.13587331771850586, 0.5102299451828003, 0.062181513756513596, -0.06766427308320999, 0.0678965374827385, -0.11460454016923904, 0.11578702926635742, 0.10465675592422485, 0.17962147295475006, 0.19210687279701233, -0.18540777266025543, 0.3415927290916443, 0.07326409965753555, 0.2138114869594574, 0.4533449709415436, 0.2281685471534729, 0.41403964161872864, -0.2492758184671402, -0.22960323095321655, 0.2814233601093292, 0.21103045344352722, -0.12151109427213669, -0.17472490668296814, 0.08497291058301926, 0.10954599827528, -0.46097707748413086, 0.08603791892528534, 0.07071587443351746, 0.07601119577884674, -0.2645118534564972, 0.3912462294101715, 0.23917709290981293, -0.0945051908493042, -0.07020040601491928, 0.025468023493885994, -0.1013297364115715, 0.08780385553836823, 0.16490869224071503, 0.23448850214481354, -0.18679997324943542, -0.03889540210366249, 0.29619547724723816, -0.4712987244129181, -0.020624658092856407, -0.11658085882663727, -0.15844081342220306, -0.0656106099486351, 0.29269784688949585, -0.1955600082874298, -0.021069148555397987, -0.1047486960887909, 0.05037811025977135, -0.2902584969997406, 0.24982571601867676, 0.18878458440303802, -0.18156105279922485, -0.3060780167579651, -0.27863797545433044, -0.3781636357307434, -0.2545594274997711, -0.19806435704231262, -0.03524467721581459, 0.2598961591720581, 0.13812710344791412, -0.03564188629388809, 0.1969049572944641, 0.032411109656095505, 0.029132578521966934, 0.07391993701457977, 0.10207337886095047, -0.49147382378578186, 0.07562391459941864, 0.1766170710325241, 0.13979385793209076, 0.0936073586344719, -0.509752631187439, -0.3088516592979431, -0.18155941367149353, -0.046721916645765305, -0.09110134094953537, 0.22096380591392517, 0.2755779027938843, 0.600380539894104, 0.7884604334831238, -0.10868127644062042, -0.26112982630729675, -0.024622401222586632, -0.20643001794815063, 0.0625542625784874, -0.05511651933193207, -0.0832701325416565, -0.21044878661632538, 0.30179500579833984, 0.3111482858657837, -0.28447937965393066, 0.3605867326259613, -0.3408159017562866, -0.24362443387508392, -0.14668980240821838, 0.040939293801784515, -0.26271331310272217, -0.033450063318014145, -0.048904094845056534, 0.4001445472240448, 0.01368616335093975, 0.2550775408744812, 0.029557758942246437, 0.05883396789431572, -0.3597674071788788, -0.025477323681116104, 0.38397493958473206, 0.19793683290481567, -0.29566988348960876, 0.40798714756965637, 0.10535527020692825, 0.04872006177902222, 0.030568229034543037, -0.35000601410865784, 0.2871955931186676, 0.14004677534103394, -0.3088754713535309, -0.06100621446967125, 0.27140167355537415, 0.010257141664624214, 0.006111986469477415, 0.1072329431772232, 0.43427398800849915, 0.26318010687828064, 0.09327231347560883, -0.47916093468666077, -0.2532898783683777 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
Also, if I delete the extracted files they need to be re-extracted again instead of loading from the Arrow cache files
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
21
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. Also, if I delete the extracted files they need to be re-extracted again instead of loading from the Arrow cache files
[ -0.028062475845217705, -0.12684546411037445, -0.14626386761665344, 0.15173640847206116, -0.17558768391609192, 0.19438324868679047, -0.2197524607181549, 0.25154927372932434, 0.17995022237300873, 0.16384993493556976, 0.10564211755990982, 0.48138663172721863, -0.24072237312793732, -0.10407443344593048, -0.18873964250087738, -0.003070223145186901, -0.23559977114200592, 0.2889699935913086, -0.007610342465341091, 0.1621086746454239, -0.13513104617595673, 0.015067518688738346, 0.046538326889276505, -0.15412147343158722, 0.05377667397260666, -0.4090360403060913, 0.20611217617988586, -0.2602272033691406, -0.11028623580932617, -0.352369099855423, -0.003076982917264104, 0.5342469215393066, 0.27660706639289856, 0.14195780456066132, -0.00012088693620171398, -0.014273402281105518, 0.28759875893592834, 0.07234368473291397, -0.4089965522289276, 0.22555817663669586, -0.24367676675319672, -0.10312826186418533, 0.2598848342895508, -0.12654273211956024, 0.294694721698761, -0.408439964056015, -0.20414568483829498, -0.6497343182563782, 0.5037790536880493, -0.2386166751384735, 0.09738239645957947, 0.009609747678041458, -0.5454072952270508, 0.10604371130466461, 0.3338087201118469, 0.34750643372535706, -0.131042018532753, -0.008145887404680252, 0.47744882106781006, 0.10099660605192184, 0.2767954170703888, 0.35426250100135803, -0.07383613288402557, -0.29292216897010803, 0.3386687934398651, -0.025792572647333145, -0.07459772378206253, -0.2595769464969635, 0.2915351986885071, 0.024684924632310867, 0.6543719172477722, -0.3459968566894531, -0.0916249006986618, -0.33271825313568115, 0.12472224235534668, -0.5869953632354736, 0.08348552137613297, 0.17490389943122864, 0.04703047499060631, 0.24708716571331024, -0.10422473400831223, -0.47914573550224304, -0.3593366742134094, -0.1478547900915146, 0.6762896776199341, -0.43064868450164795, -0.07512899488210678, -0.12687700986862183, 0.5420332551002502, 0.1520412266254425, 0.21741852164268494, -0.1760033667087555, -0.30393221974372864, 0.4096338450908661, -0.0656304880976677, -0.1792774200439453, -0.4102024435997009, -0.2998043894767761, 0.15669815242290497, 0.17528791725635529, 0.4254458248615265, -0.005214329343289137, 0.17472925782203674, 0.021220363676548004, 0.2458345890045166, 0.38672178983688354, 0.07013124972581863, -0.06183396279811859, 0.1884939968585968, 0.117256760597229, 0.13806508481502533, -0.04927949979901314, 0.02894212305545807, -0.03818482533097267, 0.25802847743034363, 0.0199357271194458, -0.03841220587491989, -0.1320510357618332, -0.07181067764759064, 0.0647789016366005, 0.20612014830112457, -0.19745948910713196, 0.08658872544765472, 0.19738328456878662, 0.2360135167837143, 0.034070730209350586, 0.061536725610494614, 0.2982643246650696, 0.012462999671697617, -0.36054641008377075, 0.12153283506631851, 0.12219129502773285, -0.3169591426849365, -0.2377639263868332, 0.4114535450935364, -0.005869834218174219, -0.041800327599048615, -0.1277220994234085, -0.3367883563041687, 0.06539784371852875, 0.5076659917831421, -0.11965574324131012, 0.2788883447647095, 0.27717462182044983, -0.19640204310417175, -0.2270885407924652, -0.28038862347602844, -0.01143235806375742, -0.13215230405330658, 0.5104102492332458, -0.12530072033405304, -0.21734069287776947, -0.06654811650514603, 0.11250375956296921, 0.15282882750034332, 0.2723376750946045, -0.5884195566177368, 0.11736956238746643, 0.10265028476715088, 0.04258229583501816, 0.04083975404500961, 0.3486086428165436, 0.018631132319569588, -0.08032339066267014, -0.3321528136730194, 0.2598172724246979, -0.6571019887924194, -0.0888555720448494, -0.35451120138168335, -0.25676628947257996, 0.21151533722877502, 0.11250682175159454, -0.11750773340463638, 0.23762236535549164, -0.157770037651062, 0.15940982103347778, 0.34214502573013306, -0.09356717765331268, -0.3924855589866638, 0.1546453833580017, 0.09582684189081192, 0.1922515630722046, 0.31760692596435547, 0.304580956697464, 0.38467341661453247, 0.038650911301374435, -0.06867051124572754, 0.2615581750869751, 0.08801553398370743, -0.10836997628211975, -0.32474571466445923, -0.4044741988182068, 0.034336626529693604, 0.22382748126983643, -0.003378867404535413, 0.055345047265291214, 0.22319121658802032, -0.03054872341454029, 0.17100398242473602, 0.14985211193561554, 0.166350856423378, 0.16068415343761444, 0.13902240991592407, -0.27145612239837646, -0.23641592264175415, 0.14077018201351166, -0.6055965423583984, -0.00889555737376213, -0.5798177719116211, -0.377763032913208, -0.18285204470157623, -0.351993590593338, 0.1315581202507019, 0.01310714054852724, -0.1980333775281906, 0.19892342388629913, 0.03461633250117302, -0.061622943729162216, 0.24890385568141937, -0.027793290093541145, -0.42329567670822144, -0.017146948724985123, -0.0940823182463646, -0.000020747267626575194, -0.44194453954696655, 0.12545686960220337, 0.15121935307979584, -0.2590888738632202, -0.01997295953333378, 0.014080521650612354, -0.28751140832901, -0.49138912558555603, -0.13185033202171326, 0.26473119854927063, 0.30569809675216675, 0.29123592376708984, 0.2880556881427765, 0.25147172808647156, 0.1814325898885727, 0.1652216613292694, 0.10452637821435928, 0.15996065735816956, -0.01762540079653263, 0.08846379071474075, -0.39331716299057007, 0.38876527547836304, -0.22427913546562195, -0.035211894661188126, -0.1823384314775467, -0.3922521770000458, 0.22075298428535461, -0.10205831378698349, 0.1129981279373169, -0.5385868549346924, 0.047297876328229904, 0.34360992908477783, -0.11630146950483322, 0.02871215157210827, 0.10376185923814774, -0.11539141833782196, -0.006208019331097603, -0.04499419778585434, -0.14715439081192017, 0.300624817609787, -0.014815322123467922, -0.16255295276641846, 0.07893627136945724, 0.3862738013267517, 0.35112032294273376, 0.1766190230846405, -0.18468555808067322, -0.16306477785110474, 0.4579218327999115, -0.00958484597504139, 0.13688410818576813, 0.03684675320982933, 0.018497606739401817, 0.36775633692741394, 0.060216743499040604, -0.006298798136413097, -0.24240939319133759, -0.059129003435373306, 0.11282575130462646, 0.21013177931308746, 0.2819329500198364, -0.26309287548065186, -0.27694132924079895, -0.4187944531440735, 0.4745364487171173, 0.32259419560432434, 0.25823959708213806, -0.01837148889899254, 0.5235859751701355, 0.06135311350226402, -0.4129449427127838, 0.0695447251200676, -0.01982688345015049, 0.6686823964118958, -0.12507925927639008, -0.21563777327537537, -0.404335618019104, -0.18864792585372925, 0.1578584909439087, 0.016733473166823387, 0.37310710549354553, -0.1012447327375412, 0.5151019096374512, 0.13038299977779388, 0.11426398158073425, -0.09011710435152054, -0.03235064819455147, 0.07831131666898727, 0.3688564598560333, -0.07538366317749023, 0.08123735338449478, 0.1757231503725052, -0.05268001928925514, 0.1216849759221077, -0.19331714510917664, -0.29806676506996155, -0.12483152002096176, 0.15777158737182617, 0.08859160542488098, -0.021348297595977783, -0.225702166557312, -0.032105110585689545, -0.16813306510448456, -0.39504560828208923, 0.22720855474472046, -0.02553923800587654, 0.00004773421824211255, 0.11413011699914932, 0.2313452512025833, 0.012226887047290802, 0.016425997018814087, 0.07076787203550339, -0.00958296749740839, -0.5886600017547607, 0.1329728066921234, -0.20801511406898499, 0.07411874830722809, 0.2229173481464386, 0.018606126308441162, -0.0014545690501108766, 0.3487141728401184, -0.39090898633003235, 0.04751508682966232, 0.017973611131310463, 0.11814996600151062, -0.33723968267440796, -0.07647394388914108, 0.2148706167936325, 0.23132073879241943, -0.08521730452775955, 0.031103067100048065, 0.14331448078155518, 0.24310128390789032, 0.39585214853286743, 0.11967272311449051, 0.0834098607301712, 0.21457521617412567, 0.11879292875528336, 0.38819363713264465, -0.25668707489967346, 0.038141585886478424, 0.31950435042381287, 0.3901723325252533, 0.4156241714954376, -0.19081534445285797, 0.27778908610343933, -0.41881656646728516, 0.055662062019109726, -0.08588606864213943, 0.11906448751688004, 0.02616167441010475, -0.14592614769935608, 0.16147936880588531, -0.223990336060524, -0.12839289009571075, -0.09236437827348709, 0.3123985230922699, -0.23370276391506195, 0.060383595526218414, -0.005724668502807617, -0.297309547662735, -0.01696602627635002, -0.023003632202744484, 0.16609284281730652, 0.17804348468780518, 0.4248473644256592, -0.10658008605241776, -0.24608370661735535, -0.07650388777256012, -0.17450633645057678, 0.3237023651599884, -0.23531435430049896, -0.207451730966568, -0.08010783046483994, 0.030073469504714012, 0.16102860867977142, 0.25126007199287415, 0.34167391061782837, -0.11187472194433212, -0.03614630550146103, -0.1675199568271637, 0.048943325877189636, -0.2440112680196762, -0.025270309299230576, -0.010316233150660992, 0.038194864988327026, -0.003887582803145051, 0.4042288064956665, -0.2591197192668915, -0.16070671379566193, -0.20550338923931122, 0.5759975910186768, -0.2591153681278229, -0.09164679050445557, -0.03293580561876297, -0.1711934208869934, -0.5231107473373413, 0.06662530452013016, 0.018275290727615356, -0.11666565388441086, 0.16972626745700836, -0.3050325810909271, -0.09726110100746155, -0.32481929659843445, 0.04770924150943756, 0.04382101446390152, 0.5563673377037048, -0.2645009458065033, 0.06221536174416542, -0.12865202128887177, 0.14830264449119568, 0.5444574952125549, 0.2043478935956955, -0.09195815026760101, 0.019247498363256454, 0.016274195164442062, -0.39697813987731934, 0.1736554354429245, 0.15995170176029205, -0.20136688649654388, 0.33979177474975586, -0.22125370800495148, 0.5212975144386292, 0.06998734921216965, -0.022643152624368668, -0.20586536824703217, -0.3038177788257599, -0.018576741218566895, -0.16657599806785583, 0.11500556766986847, 0.028012851253151894, -0.17568810284137726, 0.47092682123184204, -0.10545750707387924, -0.2438371479511261, 0.49040818214416504, 0.0997251495718956, 1.1869293451309204, -0.09772886335849762, -0.037799183279275894, -0.21283037960529327, -0.28209641575813293, 0.2717682421207428, -0.568489670753479, 0.13909511268138885, 0.02683497592806816, -0.07168011367321014, 0.10704337805509567, -0.05061253532767296, 0.036974161863327026, 0.2111319899559021, -0.24817442893981934, 0.05014237388968468, -0.3473036587238312, -0.15810440480709076, -0.2884770631790161, 0.3806913197040558, -0.08262647688388824, -0.21828877925872803, -0.04897213354706764, -0.023917505517601967, 0.033717960119247437, -0.08946754783391953, -0.2412535548210144, -0.07381541281938553, 0.370157390832901, -0.010271639563143253, 0.323047012090683, -0.13159050047397614, -0.26499971747398376, 0.3628644049167633, -0.18913045525550842, -0.12919162213802338, -0.22847995162010193, 0.04400442913174629, -0.23247410356998444, 0.031945619732141495, 0.13629956543445587, 0.012449719943106174, 0.09062660485506058, -0.06330319494009018, -0.42030319571495056, 0.06757017225027084, -0.10307620465755463, -0.12738128006458282, 0.033845141530036926, 0.15275608003139496, -0.2764270007610321, -0.36057570576667786, 0.15111391246318817, 0.14768198132514954, -0.11209182441234589, 0.0539427250623703, -0.2646902799606323, -0.12671777606010437, -0.5518767237663269, 0.09996137022972107, 0.0886898934841156, 0.2987126410007477, -0.17196796834468842, 0.2865864336490631, -0.16545724868774414, -0.14706440269947052, -0.20525473356246948, -0.1596972495317459, 0.2845776379108429, -0.15462249517440796, 0.24596118927001953, -0.24498125910758972, -0.22904019057750702, -0.4594865143299103, -0.016006004065275192, -0.06295059621334076, -0.3975653350353241, 0.4622119665145874, 0.02609984390437603, -0.1692354828119278, 0.07720499485731125, -0.09734614938497543, 0.043773964047431946, 0.030761834233999252, -0.14058755338191986, -0.10743521898984909, -0.47022974491119385, 0.2746436595916748, 0.2288830280303955, 0.5749302506446838, 0.035582318902015686, -0.014639649540185928, -0.12301088124513626, 0.10550897568464279, -0.2284841388463974, 0.25248536467552185, 0.2734743654727936, 0.1581345498561859, -0.045162733644247055, 0.2865179777145386, 0.05474653095006943, -0.237495556473732, -0.09784512221813202, 0.0568665936589241, -0.12066369503736496, -0.15867051482200623, -0.1071339100599289, 0.11260314285755157, -0.13982021808624268, -0.10548287630081177, -0.19010929763317108, -0.2603555917739868, 0.09114765375852585, -0.17662306129932404, 0.21074213087558746, -0.24861806631088257, -0.1409255564212799, -0.14723576605319977, 0.4561414420604706, -0.029298119246959686, -0.08774229139089584, 0.1730331927537918, -0.07146896421909332, 0.35031795501708984, -0.019552668556571007, -0.012225219048559666, -0.04354126378893852, -0.07487098127603531, -0.3222397565841675, 0.06770527362823486, 0.3231784403324127, 0.06817301362752914, -0.015576791018247604, -0.0005593552486971021, -0.0903894230723381, 0.06921279430389404, 0.04206053167581558, 0.25739598274230957, -0.06960209459066391, -0.11795917898416519, -0.051268089562654495, 0.18712148070335388, -0.2150455117225647, -0.15425685048103333, -0.0635145753622055, 0.01741492934525013, -0.22308708727359772, 0.2765960097312927, 0.36537179350852966, 0.06910979002714157, 0.06696806102991104, 0.08811606466770172, 0.26177656650543213, -0.22719800472259521, 0.339140921831131, 0.32069945335388184, 0.055332209914922714, -0.2411569356918335, -0.1346069723367691, 0.281980037689209, 0.12347794324159622, -0.16229131817817688, -0.1784495711326599, 0.39388927817344666, 0.5958598852157593, 0.3432154953479767, -0.5122554302215576, -0.22754044830799103, -0.2946733832359314, 0.606234073638916, -0.0741070955991745, 0.44445738196372986, 0.4342081546783447, 0.17581294476985931, 0.31897762417793274, -0.28833162784576416, -0.20417143404483795, 0.41290774941444397, 0.0876336470246315, 0.06665240228176117, 0.02879643812775612, -0.1246611550450325, 0.11173198372125626, 0.10138709098100662, 0.14493368566036224, 0.4016495943069458, -0.10802122205495834, 0.32951173186302185, 0.0834287777543068, 0.257852703332901, 0.5938124656677246, 0.18515871465206146, 0.4273989498615265, -0.143362894654274, -0.2068377137184143, 0.20079702138900757, 0.2718925178050995, 0.04930280148983002, -0.10121576488018036, -0.0775129422545433, 0.16235578060150146, -0.36429065465927124, -0.0038273946847766638, 0.09089885652065277, 0.06325684487819672, -0.2624426484107971, 0.47515764832496643, 0.25955963134765625, -0.24158364534378052, -0.035523198544979095, 0.05580417066812515, -0.08228542655706406, 0.1704407036304474, 0.09245999902486801, 0.20302827656269073, -0.0839185044169426, -0.23139193654060364, 0.3846430778503418, -0.47326719760894775, 0.03242650628089905, -0.14344297349452972, -0.09428795427083969, 0.01221410371363163, 0.27250435948371887, -0.28599658608436584, 0.0040992628782987595, -0.052631232887506485, 0.056673891842365265, -0.22327016294002533, 0.28032878041267395, 0.20435643196105957, -0.34209898114204407, -0.25898078083992004, -0.3161490261554718, -0.2175917625427246, -0.20545969903469086, -0.2143556773662567, 0.030852986499667168, 0.24433530867099762, 0.25614458322525024, -0.024251297116279602, 0.22624421119689941, 0.24554091691970825, -0.1379130482673645, -0.04179246351122856, 0.05559644103050232, -0.4732877314090729, 0.1433888077735901, 0.38388434052467346, 0.219665989279747, 0.14698804914951324, -0.4231846332550049, -0.26718926429748535, 0.041140809655189514, -0.013927137479186058, -0.19046638906002045, 0.21655264496803284, 0.12979356944561005, 0.7412774562835693, 0.6710227727890015, -0.14078232645988464, -0.3098008632659912, -0.08683454245328903, -0.18851923942565918, -0.01236669160425663, -0.1250133514404297, 0.030080005526542664, -0.1888546645641327, 0.4749763309955597, 0.20999304950237274, -0.28641819953918457, 0.2727656364440918, -0.2861824631690979, -0.21525505185127258, -0.17120914161205292, 0.23679548501968384, -0.22968463599681854, -0.0501834936439991, 0.023488231003284454, 0.42248228192329407, -0.038404855877161026, 0.19408266246318817, 0.06902977079153061, 0.08399759978055954, -0.3601064383983612, 0.03290392458438873, 0.3062990605831146, 0.39264345169067383, -0.30702152848243713, 0.5346335172653198, 0.1490330547094345, 0.08522072434425354, -0.0019342554733157158, -0.2796180546283722, 0.23970431089401245, 0.10163446515798569, -0.2820935547351837, 0.043675076216459274, 0.28979164361953735, -0.03108203411102295, -0.0459957979619503, 0.10218257457017899, 0.29897579550743103, 0.3729037642478943, 0.04052897170186043, -0.45894506573677063, -0.26432663202285767 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
I think we already opened an issue about this topic (suggested by @stas00): duplicated of #2481? This is in our TODO list... 😅
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
23
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. I think we already opened an issue about this topic (suggested by @stas00): duplicated of #2481? This is in our TODO list... 😅
[ -0.019210129976272583, -0.12697599828243256, -0.1481829136610031, 0.07984667271375656, -0.1321689933538437, 0.1765158623456955, -0.19870246946811676, 0.24316397309303284, 0.21240122616291046, 0.2022784799337387, 0.16154208779335022, 0.4751737117767334, -0.22158890962600708, -0.07033391296863556, -0.20461124181747437, 0.04022078961133957, -0.1827223300933838, 0.2646828889846802, 0.002185611054301262, 0.1824558973312378, -0.14065338671207428, 0.036273423582315445, 0.03948412463068962, -0.1689872294664383, 0.09755061566829681, -0.37678417563438416, 0.2147900015115738, -0.27440574765205383, -0.12017669528722763, -0.3621689975261688, 0.04290475323796272, 0.5484213829040527, 0.23813870549201965, 0.15253867208957672, -0.00012055243860231712, -0.0380503349006176, 0.29791268706321716, 0.10062462091445923, -0.40426692366600037, 0.17577926814556122, -0.2399449646472931, -0.10980753600597382, 0.2304791957139969, -0.14027036726474762, 0.2754366099834442, -0.32103487849235535, -0.16257596015930176, -0.6223292350769043, 0.4326828420162201, -0.2468687742948532, 0.09601351618766785, 0.016748003661632538, -0.531913697719574, 0.09543529152870178, 0.3050425946712494, 0.4185584783554077, -0.1824691891670227, -0.05739147588610649, 0.5388314723968506, 0.03415833041071892, 0.27265793085098267, 0.3712632954120636, -0.05881357565522194, -0.2781785726547241, 0.35215380787849426, -0.06666170060634613, -0.08703615516424179, -0.2991163730621338, 0.278079092502594, -0.021190810948610306, 0.680683434009552, -0.3543691337108612, -0.12488121539354324, -0.3069051206111908, 0.0766368955373764, -0.5461726188659668, 0.12643171846866608, 0.17991295456886292, -0.02150268852710724, 0.27232229709625244, -0.16785916686058044, -0.425777792930603, -0.36383193731307983, -0.1120300367474556, 0.6866945028305054, -0.3886208236217499, -0.05110062658786774, -0.1442258208990097, 0.5321465134620667, 0.17108701169490814, 0.2038840800523758, -0.08411092311143875, -0.27780023217201233, 0.4167858958244324, -0.030232207849621773, -0.19769152998924255, -0.3469560444355011, -0.3571132719516754, 0.2482500523328781, 0.17235778272151947, 0.42539724707603455, -0.03179532662034035, 0.17850615084171295, 0.06279333680868149, 0.2811262309551239, 0.3864463269710541, 0.061917707324028015, -0.10313486307859421, 0.21242499351501465, 0.10010085254907608, 0.15065214037895203, -0.04526769742369652, 0.11010797321796417, -0.010606378316879272, 0.25059744715690613, 0.03077184222638607, -0.03741040080785751, -0.14562232792377472, -0.05157539248466492, 0.07406384497880936, 0.2023872286081314, -0.19603435695171356, 0.0666680857539177, 0.17084574699401855, 0.23343665897846222, 0.053401362150907516, 0.0713055282831192, 0.3021496534347534, -0.0025234483182430267, -0.33679449558258057, 0.12562526762485504, 0.13417567312717438, -0.3137156665325165, -0.27575990557670593, 0.4017675220966339, -0.03297393396496773, -0.03757592290639877, -0.08564510941505432, -0.3078608810901642, 0.05091765522956848, 0.5031169652938843, -0.05533105134963989, 0.23666995763778687, 0.31520572304725647, -0.19297362864017487, -0.24961566925048828, -0.2744359076023102, -0.05153335630893707, -0.14778970181941986, 0.48949265480041504, -0.140050008893013, -0.2936852276325226, -0.11329035460948944, 0.1049484983086586, 0.15744245052337646, 0.23298372328281403, -0.5811311602592468, 0.15515662729740143, 0.07523998618125916, 0.0513775609433651, -0.029490238055586815, 0.41429832577705383, -0.013343606144189835, -0.07492800801992416, -0.3167106509208679, 0.269872784614563, -0.6963501572608948, -0.0778399184346199, -0.343683123588562, -0.251571387052536, 0.20948992669582367, 0.153328076004982, -0.11950582265853882, 0.18203729391098022, -0.17694492638111115, 0.1597190797328949, 0.2982478141784668, -0.103884756565094, -0.3767285943031311, 0.1588909924030304, 0.061830855906009674, 0.1861560195684433, 0.33816373348236084, 0.3027473986148834, 0.35100454092025757, 0.0028312369249761105, -0.07175882905721664, 0.33631432056427, 0.04287467151880264, -0.045902665704488754, -0.37719693779945374, -0.4258618950843811, 0.11388783901929855, 0.21614623069763184, 0.01869972050189972, 0.08357331901788712, 0.2645457684993744, 0.025289660319685936, 0.1387612670660019, 0.13089169561862946, 0.10844382643699646, 0.135911226272583, 0.1836431473493576, -0.2509691119194031, -0.23596225678920746, 0.16775135695934296, -0.5864216089248657, -0.03307316079735756, -0.5517913103103638, -0.2943544387817383, -0.14356498420238495, -0.36227500438690186, 0.13966795802116394, 0.05309860408306122, -0.14787966012954712, 0.1732766032218933, 0.038797494024038315, -0.08863161504268646, 0.2117041051387787, -0.026198066771030426, -0.4154307544231415, -0.0330972857773304, -0.11283756792545319, 0.0020008236169815063, -0.4649409353733063, 0.10396610200405121, 0.08355146646499634, -0.22564265131950378, -0.04976830258965492, 0.0020141336135566235, -0.2528688311576843, -0.5000708103179932, -0.15242059528827667, 0.29057931900024414, 0.28508079051971436, 0.2995110750198364, 0.2822105884552002, 0.26530367136001587, 0.21807131171226501, 0.18824023008346558, 0.04743465781211853, 0.1773792952299118, -0.04573362320661545, 0.07357650995254517, -0.4050092399120331, 0.3439507484436035, -0.24090200662612915, -0.08493021130561829, -0.20359165966510773, -0.38929057121276855, 0.2516007125377655, -0.10028902441263199, 0.08597312867641449, -0.49302759766578674, 0.0859951302409172, 0.37089577317237854, -0.19177184998989105, 0.019916368648409843, 0.12141324579715729, -0.10241701453924179, 0.003755801822990179, -0.07824564725160599, -0.16406618058681488, 0.361044704914093, 0.07680995017290115, -0.21984533965587616, 0.07044654339551926, 0.370292067527771, 0.33888253569602966, 0.19030039012432098, -0.22036324441432953, -0.16752862930297852, 0.4414021670818329, 0.017682820558547974, 0.16876205801963806, 0.04626396298408508, -0.0339808315038681, 0.3442345857620239, 0.10060064494609833, -0.0012358936946839094, -0.2634166479110718, -0.08329152315855026, 0.10247672349214554, 0.22081100940704346, 0.2615542411804199, -0.2776218056678772, -0.24318593740463257, -0.4085783362388611, 0.5601937174797058, 0.342713862657547, 0.23053495585918427, -0.06289616227149963, 0.5425231456756592, 0.08289700746536255, -0.469444215297699, 0.06873060017824173, 0.03268013522028923, 0.7095780372619629, -0.16345106065273285, -0.14679241180419922, -0.42665234208106995, -0.16525281965732574, 0.15742629766464233, -0.00021785857097711414, 0.3872477412223816, -0.1314135640859604, 0.5233254432678223, 0.10603814572095871, 0.0948028713464737, -0.09105171263217926, -0.12024413049221039, 0.07959380745887756, 0.37840536236763, 0.027168747037649155, 0.10427313297986984, 0.1606733351945877, -0.01953521929681301, 0.05859094485640526, -0.217452734708786, -0.27450695633888245, -0.11529097706079483, 0.16721822321414948, 0.12561944127082825, 0.002323063090443611, -0.2697548568248749, -0.05116681754589081, -0.18119090795516968, -0.4072161018848419, 0.26525288820266724, -0.09082996845245361, 0.04541616141796112, 0.10082167387008667, 0.20785203576087952, -0.08957734704017639, 0.018045304343104362, 0.08798161149024963, -0.0705334022641182, -0.7061076760292053, 0.11357016861438751, -0.19569678604602814, 0.02738126553595066, 0.24439430236816406, 0.03432665020227432, -0.032690681517124176, 0.3245288133621216, -0.4147772490978241, -0.05045011639595032, 0.08866661787033081, 0.1621685028076172, -0.31296664476394653, -0.10394233465194702, 0.16851800680160522, 0.22753901779651642, -0.0814686119556427, 0.057150181382894516, 0.04842766374349594, 0.19117815792560577, 0.38241517543792725, 0.13521352410316467, 0.11765099316835403, 0.2851806581020355, 0.2092827558517456, 0.3362179398536682, -0.2803317606449127, 0.08804075419902802, 0.3748086392879486, 0.39838963747024536, 0.41865432262420654, -0.22159923613071442, 0.18794609606266022, -0.39081859588623047, 0.019648021087050438, -0.16225910186767578, 0.12510335445404053, 0.05331651121377945, -0.2120588719844818, 0.15563420951366425, -0.23830127716064453, -0.11498694121837616, -0.08372131735086441, 0.297450989484787, -0.21942433714866638, 0.025799037888646126, 0.015226300805807114, -0.2889419496059418, -0.07832568883895874, -0.04410697519779205, 0.16524119675159454, 0.22617703676223755, 0.4313424229621887, -0.07598983496427536, -0.23365704715251923, -0.08161316066980362, -0.1685788333415985, 0.30737966299057007, -0.20654359459877014, -0.16192880272865295, -0.14566287398338318, 0.06824234127998352, 0.1803956925868988, 0.23532287776470184, 0.4696422219276428, -0.09612280875444412, -0.019715461879968643, -0.22198215126991272, 0.02410317212343216, -0.1631164699792862, 0.011967912316322327, 0.02078859880566597, 0.012108459137380123, 0.10475769639015198, 0.41727206110954285, -0.2507811486721039, -0.1821793019771576, -0.20675531029701233, 0.5407700538635254, -0.22915229201316833, -0.14520233869552612, -0.005722261033952236, -0.21236272156238556, -0.5202817916870117, 0.0625925362110138, 0.09475693106651306, -0.1236625462770462, 0.23448574542999268, -0.3365583121776581, -0.06005922332406044, -0.3407362401485443, 0.055932119488716125, 0.033382199704647064, 0.5054510831832886, -0.2519850432872772, 0.051289621740579605, -0.1779840588569641, 0.11412400007247925, 0.4623527526855469, 0.1752750277519226, -0.10099807381629944, 0.027455773204565048, 0.004470850806683302, -0.393412321805954, 0.14381134510040283, 0.15089622139930725, -0.14859060943126678, 0.29902851581573486, -0.2558404207229614, 0.5546308755874634, 0.02962586283683777, -0.06016398221254349, -0.18102063238620758, -0.3058013916015625, -0.01899496652185917, -0.16497428715229034, 0.12176762521266937, 0.026150643825531006, -0.18004371225833893, 0.4581396281719208, -0.13039329648017883, -0.21818366646766663, 0.5202697515487671, 0.06373538076877594, 1.1716755628585815, -0.07429678738117218, -0.06214391067624092, -0.23096534609794617, -0.25709694623947144, 0.3165607750415802, -0.6766653656959534, 0.12440232932567596, 0.07342079281806946, -0.12433292716741562, 0.10238724201917648, -0.016225187107920647, 0.019967127591371536, 0.22192759811878204, -0.24784190952777863, 0.06393000483512878, -0.3001568913459778, -0.176523819565773, -0.2858094274997711, 0.3896428644657135, -0.10068800300359726, -0.24904975295066833, -0.0716717466711998, -0.01734432764351368, 0.015346790663897991, -0.02139279432594776, -0.2215709686279297, -0.059590600430965424, 0.41318458318710327, -0.01722949557006359, 0.24687407910823822, -0.11212370544672012, -0.23601962625980377, 0.36482247710227966, -0.16479697823524475, -0.06896135210990906, -0.23242878913879395, 0.029913276433944702, -0.17332178354263306, 0.09428101778030396, 0.1340537965297699, -0.016353942453861237, 0.07486584782600403, -0.017267726361751556, -0.3920019567012787, 0.08182134479284286, -0.05494411662220955, -0.12539424002170563, 0.0464402437210083, 0.1012335792183876, -0.29798367619514465, -0.37127596139907837, 0.08311536908149719, 0.09878693521022797, -0.15171317756175995, 0.023012176156044006, -0.28440433740615845, -0.1307133287191391, -0.5083081126213074, 0.08351410180330276, 0.09186812490224838, 0.33764833211898804, -0.19567447900772095, 0.3320392370223999, -0.19394615292549133, -0.1492912918329239, -0.21794791519641876, -0.1215125098824501, 0.25115010142326355, -0.19148555397987366, 0.17884215712547302, -0.2094883918762207, -0.24187666177749634, -0.43166953325271606, -0.014951225370168686, -0.0827951580286026, -0.3865463435649872, 0.43023958802223206, 0.04940590262413025, -0.23306377232074738, 0.07522757351398468, -0.13678094744682312, 0.05797737464308739, 0.0033783616963773966, -0.10839168727397919, -0.15506991744041443, -0.4857672154903412, 0.22410182654857635, 0.21752651035785675, 0.5688449144363403, 0.07881345599889755, 0.04536427929997444, -0.11925242841243744, 0.06876300275325775, -0.23064404726028442, 0.25077131390571594, 0.23309074342250824, 0.16516554355621338, -0.01212929654866457, 0.28156527876853943, 0.033408161252737045, -0.2585386633872986, -0.0945775955915451, 0.078475221991539, -0.1148144006729126, -0.1441342979669571, -0.09732036292552948, 0.12153815478086472, -0.09912927448749542, -0.08082845062017441, -0.13448283076286316, -0.24194754660129547, 0.07781944423913956, -0.1644071489572525, 0.218253031373024, -0.1838771551847458, -0.12009549885988235, -0.11282778531312943, 0.40992271900177, -0.039490051567554474, -0.006142044439911842, 0.1524103879928589, -0.04289029911160469, 0.3734460771083832, -0.04460356757044792, 0.013397281058132648, -0.06459203362464905, -0.0591992549598217, -0.3752075135707855, 0.07337639480829239, 0.25887736678123474, 0.10901131480932236, -0.0003993350255768746, 0.02255094051361084, -0.08754930645227432, 0.09660729765892029, 0.039910707622766495, 0.18271365761756897, -0.11699211597442627, -0.06763957440853119, -0.023516006767749786, 0.19176442921161652, -0.19769401848316193, -0.19882693886756897, -0.06087273731827736, 0.0752243846654892, -0.21398837864398956, 0.24786050617694855, 0.40001893043518066, 0.07418698817491531, 0.13047680258750916, 0.1099633276462555, 0.3531489372253418, -0.27663654088974, 0.31930893659591675, 0.3104671835899353, -0.016634518280625343, -0.21001699566841125, -0.17697036266326904, 0.2833024561405182, 0.1194731816649437, -0.14271420240402222, -0.1698104739189148, 0.38632991909980774, 0.6007129549980164, 0.387336403131485, -0.48752763867378235, -0.18168450891971588, -0.26391980051994324, 0.6182788014411926, -0.051440946757793427, 0.4884515106678009, 0.4662979245185852, 0.18845432996749878, 0.29228106141090393, -0.2606741487979889, -0.20654195547103882, 0.4309626817703247, 0.0768074169754982, 0.037648141384124756, -0.000775775988586247, -0.13631905615329742, 0.11587071418762207, 0.08702100068330765, 0.14269304275512695, 0.384087473154068, -0.1165054589509964, 0.3271661400794983, 0.0655352920293808, 0.2888728678226471, 0.5928449630737305, 0.1578069031238556, 0.43719831109046936, -0.15944761037826538, -0.16556957364082336, 0.19451485574245453, 0.22015570104122162, 0.06932412087917328, -0.05799015611410141, -0.01562165841460228, 0.1615113914012909, -0.318879634141922, -0.021275658160448074, 0.05909694731235504, 0.05339027941226959, -0.27693626284599304, 0.47112777829170227, 0.2056370973587036, -0.22479325532913208, -0.05905424430966377, 0.04582108184695244, -0.08724677562713623, 0.17573069036006927, 0.12730689346790314, 0.20654939115047455, -0.07347144931554794, -0.22617359459400177, 0.3755023181438446, -0.43417665362358093, 0.029686953872442245, -0.1775698959827423, -0.10822500288486481, -0.01971789076924324, 0.2628770172595978, -0.25812894105911255, 0.05270223692059517, -0.06550536304712296, 0.06593210250139236, -0.18186379969120026, 0.2217468023300171, 0.18540126085281372, -0.4435361325740814, -0.2482801228761673, -0.2721307575702667, -0.26674482226371765, -0.18070532381534576, -0.19069436192512512, 0.051515962928533554, 0.3041934669017792, 0.21051348745822906, -0.02894538640975952, 0.2490503340959549, 0.19113130867481232, -0.13289515674114227, -0.05689464136958122, 0.10769276320934296, -0.4754076898097992, 0.10722605139017105, 0.38881537318229675, 0.2782551944255829, 0.1642228662967682, -0.378792941570282, -0.28443437814712524, 0.003773645730689168, -0.014565937221050262, -0.25151893496513367, 0.27655553817749023, 0.11542010307312012, 0.7933056950569153, 0.5852684378623962, -0.10993503034114838, -0.3783090114593506, -0.09885525703430176, -0.20238931477069855, 0.01573902554810047, -0.12932761013507843, 0.011677241884171963, -0.19712845981121063, 0.4506741464138031, 0.19108028709888458, -0.2832459807395935, 0.2106015384197235, -0.26320284605026245, -0.22452543675899506, -0.24308374524116516, 0.2408837527036667, -0.2843172252178192, 0.02772500179708004, 0.02193601429462433, 0.4092617630958557, -0.0663309320807457, 0.19950981438159943, 0.06343928724527359, 0.11378157138824463, -0.3624657392501831, -0.017779404297471046, 0.2839459478855133, 0.3558633327484131, -0.3132499158382416, 0.5239502191543579, 0.07520701736211777, 0.06318920105695724, -0.013141815550625324, -0.29039767384529114, 0.23104432225227356, 0.07785763591527939, -0.26765739917755127, 0.04249190911650658, 0.34270796179771423, -0.050371963530778885, -0.07368703186511993, 0.10609201341867447, 0.27188169956207275, 0.42965272068977356, 0.02026033215224743, -0.4044409990310669, -0.25529026985168457 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
I think the deletion of each extracted file could be implemented in our CacheManager and ExtractManager (once merged to master: #2295, #2277). 😉
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
23
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. I think the deletion of each extracted file could be implemented in our CacheManager and ExtractManager (once merged to master: #2295, #2277). 😉
[ -0.022601110860705376, -0.1121034249663353, -0.1641409993171692, 0.163986474275589, -0.1408299058675766, 0.15682125091552734, -0.19473403692245483, 0.28730660676956177, 0.2321142554283142, 0.17758804559707642, 0.09998287260532379, 0.4532558023929596, -0.23331499099731445, -0.10648301243782043, -0.22852447628974915, 0.06522166728973389, -0.2182045727968216, 0.2731807231903076, -0.02739744819700718, 0.2025793343782425, -0.08164047449827194, 0.08623787760734558, 0.0794721320271492, -0.14375069737434387, 0.05151216313242912, -0.41865313053131104, 0.21561773121356964, -0.25270476937294006, -0.09215368330478668, -0.3959027826786041, 0.001436552731320262, 0.5230809450149536, 0.22348228096961975, 0.18597634136676788, -0.00011581993021536618, -0.05534660443663597, 0.3054269850254059, 0.08451955765485764, -0.3473009169101715, 0.19303923845291138, -0.18833576142787933, -0.10024645924568176, 0.21812228858470917, -0.14174343645572662, 0.256610631942749, -0.30456873774528503, -0.19590967893600464, -0.6068359017372131, 0.45279091596603394, -0.23664402961730957, 0.14946791529655457, -0.014858881942927837, -0.5173231959342957, 0.13463430106639862, 0.30285102128982544, 0.31945136189460754, -0.11070969700813293, -0.04752398654818535, 0.4241873621940613, 0.07512716948986053, 0.2008989304304123, 0.3739817440509796, -0.11343878507614136, -0.25006383657455444, 0.3243032991886139, -0.00998448021709919, -0.14232191443443298, -0.24491162598133087, 0.31422123312950134, 0.015083069913089275, 0.5898218750953674, -0.39730772376060486, -0.07761822640895844, -0.28950509428977966, 0.05655963346362114, -0.5846495628356934, 0.11072256416082382, 0.1677323877811432, 0.005849641282111406, 0.24140918254852295, -0.1400054544210434, -0.4298630356788635, -0.34384816884994507, -0.1900559812784195, 0.6732533574104309, -0.3742927610874176, -0.09493467211723328, -0.14132803678512573, 0.45346799492836, 0.1464480757713318, 0.1862228959798813, -0.12596078217029572, -0.2888205051422119, 0.3707065284252167, -0.07129887491464615, -0.20187348127365112, -0.36891594529151917, -0.3332551419734955, 0.2370149791240692, 0.1708974987268448, 0.42382633686065674, 0.05188518017530441, 0.23517026007175446, 0.06339377909898758, 0.26377663016319275, 0.39542293548583984, 0.08836130052804947, -0.12768098711967468, 0.20075730979442596, 0.11122587323188782, 0.07688382267951965, -0.0542466938495636, 0.09289351850748062, 0.0000738602175260894, 0.30716633796691895, 0.020651966333389282, -0.07225645333528519, -0.1556968241930008, -0.04293625429272652, 0.07413534820079803, 0.256376713514328, -0.17253418266773224, 0.0869789719581604, 0.20197555422782898, 0.15323394536972046, 0.04648157209157944, 0.06329059600830078, 0.2291136085987091, 0.02408442087471485, -0.29613909125328064, 0.08566324412822723, 0.1718936562538147, -0.31007611751556396, -0.2661430239677429, 0.3942471444606781, -0.06005146726965904, -0.03532159700989723, -0.12831343710422516, -0.3043467402458191, 0.039079923182725906, 0.5187656879425049, -0.13173452019691467, 0.2679394781589508, 0.26269078254699707, -0.1665896326303482, -0.2599320709705353, -0.28569313883781433, -0.027482127770781517, -0.15682193636894226, 0.42219457030296326, -0.1159835234284401, -0.24324138462543488, -0.039098288863897324, 0.1673651933670044, 0.16550293564796448, 0.30483880639076233, -0.49495089054107666, 0.13256140053272247, 0.1554321050643921, 0.05270031839609146, -0.025445491075515747, 0.39150142669677734, -0.012170451693236828, -0.10844748467206955, -0.3085303008556366, 0.26028305292129517, -0.6160309314727783, -0.07654896378517151, -0.29436278343200684, -0.26512160897254944, 0.19346478581428528, 0.13791385293006897, -0.06257664412260056, 0.18025770783424377, -0.17585374414920807, 0.15688320994377136, 0.30477020144462585, -0.10473024845123291, -0.36682218313217163, 0.16302436590194702, 0.06689053773880005, 0.19863353669643402, 0.34750497341156006, 0.2767181396484375, 0.39869019389152527, -0.006051081698387861, -0.03150962293148041, 0.27651283144950867, 0.07729354500770569, -0.06928294897079468, -0.34654462337493896, -0.3954339623451233, 0.016698509454727173, 0.2093607485294342, 0.04111760854721069, 0.04863876476883888, 0.25716957449913025, 0.014543193392455578, 0.16152746975421906, 0.1562286764383316, 0.15401339530944824, 0.17702114582061768, 0.12924300134181976, -0.2629845440387726, -0.21787680685520172, 0.12992903590202332, -0.5425731539726257, 0.011116736568510532, -0.5635595321655273, -0.3578420579433441, -0.16811951994895935, -0.3451922535896301, 0.14465737342834473, 0.025972498580813408, -0.1506371647119522, 0.15255770087242126, 0.12016655504703522, -0.030617160722613335, 0.23218011856079102, -0.057633087038993835, -0.41415438055992126, 0.08212422579526901, -0.07872463017702103, 0.02141222544014454, -0.4709242582321167, 0.039849746972322464, 0.13046719133853912, -0.22291795909404755, -0.024754833430051804, 0.010905840434134007, -0.2736271619796753, -0.5044942498207092, -0.1394360214471817, 0.2698448896408081, 0.26593977212905884, 0.2694548964500427, 0.24031473696231842, 0.23477336764335632, 0.16865232586860657, 0.25293397903442383, 0.07809049636125565, 0.1655549556016922, -0.021997099742293358, 0.057389382272958755, -0.36924412846565247, 0.39418134093284607, -0.16292725503444672, -0.06804241240024567, -0.20915007591247559, -0.396308958530426, 0.24879401922225952, -0.11829200387001038, 0.14941495656967163, -0.5282135605812073, 0.07540135085582733, 0.32490766048431396, -0.09787522256374359, 0.012904474511742592, 0.12580788135528564, -0.08437667042016983, -0.002991361077874899, 0.003072669729590416, -0.08140770345926285, 0.3343490660190582, -0.0005703072529286146, -0.20647361874580383, 0.017973201349377632, 0.3947651982307434, 0.37319567799568176, 0.18632641434669495, -0.14431850612163544, -0.14308710396289825, 0.467477023601532, -0.007739912252873182, 0.155184805393219, 0.03569689393043518, 0.0012493206886574626, 0.3792584538459778, 0.08274189382791519, 0.009578796103596687, -0.2653329074382782, -0.09086229652166367, 0.1035449355840683, 0.18540139496326447, 0.3281435966491699, -0.2157002091407776, -0.26453256607055664, -0.35030850768089294, 0.4957948625087738, 0.34749892354011536, 0.22671253979206085, 0.0012918971478939056, 0.5297101736068726, 0.10805784910917282, -0.43761342763900757, 0.07942619919776917, 0.036006681621074677, 0.6342993974685669, -0.13388851284980774, -0.12763404846191406, -0.4051324427127838, -0.19303126633167267, 0.15631164610385895, 0.04133716970682144, 0.3700556755065918, -0.0946756899356842, 0.49196264147758484, 0.12803098559379578, 0.10748481005430222, -0.10135657340288162, -0.082896389067173, 0.09048864245414734, 0.3652786314487457, -0.042265430092811584, 0.12500832974910736, 0.15209397673606873, -0.019618140533566475, 0.12587033212184906, -0.21635884046554565, -0.3381374478340149, -0.13888733088970184, 0.20752492547035217, 0.08520576357841492, -0.01984359323978424, -0.28183215856552124, -0.021943047642707825, -0.19018131494522095, -0.42621278762817383, 0.2239808738231659, -0.06023310124874115, 0.0722542554140091, 0.05355602502822876, 0.15967340767383575, -0.030491188168525696, 0.030051784589886665, 0.08891154825687408, -0.07788342982530594, -0.6628458499908447, 0.09835109114646912, -0.18684197962284088, 0.037983737885951996, 0.24253638088703156, 0.04447310417890549, 0.0063197193667292595, 0.2807716429233551, -0.3876611888408661, -0.057344384491443634, 0.0818394124507904, 0.10494598746299744, -0.3130923807621002, -0.11844199895858765, 0.20262202620506287, 0.2476179152727127, -0.1233275979757309, -0.0007633338100276887, 0.10130693763494492, 0.2300356924533844, 0.3424205482006073, 0.10334000736474991, 0.12404271215200424, 0.30774539709091187, 0.22004368901252747, 0.30429789423942566, -0.28093644976615906, 0.04438494145870209, 0.33325859904289246, 0.40320587158203125, 0.3957526981830597, -0.19995920360088348, 0.23206670582294464, -0.3902227580547333, -0.010768448933959007, -0.12729163467884064, 0.15311594307422638, 0.01920810155570507, -0.23719832301139832, 0.16219016909599304, -0.23518340289592743, -0.10763375461101532, -0.09245727956295013, 0.31035399436950684, -0.18960310518741608, 0.013722456991672516, 0.033726032823324203, -0.2891179919242859, -0.04449399933218956, -0.02809290401637554, 0.14880569279193878, 0.16695097088813782, 0.35636621713638306, -0.08364244550466537, -0.2635134756565094, -0.08785966783761978, -0.26446354389190674, 0.3332785367965698, -0.22235453128814697, -0.18991097807884216, -0.10917501151561737, 0.058603085577487946, 0.13714514672756195, 0.19426071643829346, 0.398528516292572, -0.09872270375490189, -0.025950046256184578, -0.18945416808128357, -0.006675214506685734, -0.1578938364982605, 0.03472137078642845, 0.014704179018735886, 0.05538933351635933, 0.06255950778722763, 0.3513256311416626, -0.30229616165161133, -0.20039571821689606, -0.2519725561141968, 0.541575014591217, -0.2682742476463318, -0.14035743474960327, -0.053295720368623734, -0.23000334203243256, -0.5152531862258911, 0.07185117155313492, 0.024822445586323738, -0.12059428542852402, 0.19343529641628265, -0.31780293583869934, -0.09704829007387161, -0.31471171975135803, 0.03566242754459381, 0.013495695777237415, 0.5749185085296631, -0.308091402053833, 0.05295834690332413, -0.1670597940683365, 0.14604032039642334, 0.4614255428314209, 0.18314588069915771, -0.07405753433704376, 0.056741949170827866, 0.04555553197860718, -0.3605612516403198, 0.07472805678844452, 0.13285201787948608, -0.15213316679000854, 0.32343313097953796, -0.23785482347011566, 0.5641590356826782, 0.09268166124820709, -0.05503566563129425, -0.23530718684196472, -0.2607458233833313, -0.01914290338754654, -0.1411491483449936, 0.08383269608020782, 0.045327719300985336, -0.17575949430465698, 0.44834384322166443, -0.23646946251392365, -0.2719985544681549, 0.47846099734306335, 0.09388142079114914, 1.1523441076278687, -0.06309380382299423, -0.04436054080724716, -0.24818755686283112, -0.28774210810661316, 0.29684579372406006, -0.6555525660514832, 0.14335599541664124, -0.035474397242069244, -0.11665923148393631, 0.1045612245798111, 0.011456414125859737, 0.014400757849216461, 0.19934068620204926, -0.2524823844432831, 0.09566649049520493, -0.2879777252674103, -0.14062294363975525, -0.28222763538360596, 0.386904776096344, -0.11988896131515503, -0.2729755938053131, -0.05242849886417389, 0.03113277442753315, 0.0025454149581491947, -0.08387666195631027, -0.24106940627098083, -0.11412180215120316, 0.4444565773010254, -0.050053056329488754, 0.31522175669670105, -0.09987659752368927, -0.21775288879871368, 0.4091772437095642, -0.17414332926273346, -0.10874617844820023, -0.32270944118499756, -0.04315144941210747, -0.17693740129470825, 0.05093718320131302, 0.17138923704624176, -0.006380320060998201, 0.11495216190814972, -0.032729800790548325, -0.40300607681274414, 0.04160424321889877, -0.11487141996622086, -0.14889216423034668, 0.05880023166537285, 0.10789405554533005, -0.29504671692848206, -0.38561999797821045, 0.1859516054391861, 0.1410580426454544, -0.16114549338817596, 0.08118341863155365, -0.24838662147521973, -0.10649870336055756, -0.5253581404685974, 0.0941525399684906, 0.13362397253513336, 0.31764474511146545, -0.2119375318288803, 0.31058570742607117, -0.18474307656288147, -0.1575225442647934, -0.24238233268260956, -0.14056968688964844, 0.33649078011512756, -0.16293294727802277, 0.2128504067659378, -0.20560531318187714, -0.2502359449863434, -0.46905776858329773, -0.027792880311608315, -0.04766722768545151, -0.3634733557701111, 0.41304245591163635, 0.004933792166411877, -0.22474706172943115, 0.1111171543598175, -0.16200844943523407, 0.045986488461494446, 0.04976685345172882, -0.16964586079120636, -0.14169786870479584, -0.46953994035720825, 0.23926490545272827, 0.20842908322811127, 0.5362952351570129, 0.05319369584321976, -0.022217852994799614, -0.15061412751674652, 0.16034549474716187, -0.2843221426010132, 0.23701220750808716, 0.21973665058612823, 0.16887129843235016, -0.050639428198337555, 0.24017508327960968, 0.045584145933389664, -0.20881341397762299, -0.052052900195121765, 0.143140509724617, -0.14152073860168457, -0.20871062576770782, -0.07090038806200027, 0.08741647750139236, -0.15715329349040985, -0.023114537820219994, -0.22869791090488434, -0.12959924340248108, 0.09588318318128586, -0.17305687069892883, 0.2635292708873749, -0.1905887871980667, -0.12760092318058014, -0.1356274038553238, 0.4436526894569397, -0.0629727840423584, -0.08623327314853668, 0.1529291719198227, -0.03501221910119057, 0.3017439544200897, -0.043830886483192444, -0.022368965670466423, -0.08287373930215836, -0.06810640543699265, -0.30271705985069275, 0.04667848348617554, 0.2749306559562683, 0.06934387981891632, -0.01422487385571003, -0.012762830592691898, -0.08268730342388153, 0.13709022104740143, 0.04499177634716034, 0.20479716360569, -0.07489645481109619, -0.12294875830411911, -0.037907786667346954, 0.23747067153453827, -0.21281354129314423, -0.20705239474773407, -0.07186289131641388, 0.012748809531331062, -0.19172166287899017, 0.2789097726345062, 0.36263617873191833, 0.08865692466497421, 0.16993452608585358, 0.12532949447631836, 0.34716692566871643, -0.28704389929771423, 0.27395808696746826, 0.21543703973293304, 0.05464726313948631, -0.20921015739440918, -0.0646427795290947, 0.31445473432540894, 0.14342133700847626, -0.11452144384384155, -0.12922297418117523, 0.3905967175960541, 0.5757662653923035, 0.30907586216926575, -0.5367898941040039, -0.22238333523273468, -0.2938578128814697, 0.623404324054718, -0.13510864973068237, 0.4427971839904785, 0.40388309955596924, 0.15100836753845215, 0.2659570276737213, -0.3229813575744629, -0.2195301204919815, 0.4456716477870941, 0.04572734609246254, 0.06986896693706512, 0.07855748385190964, -0.07747575640678406, 0.14260157942771912, 0.09141659736633301, 0.1999514251947403, 0.4314357340335846, -0.0809788703918457, 0.313227117061615, 0.03188681975007057, 0.2796561121940613, 0.5481155514717102, 0.1850634217262268, 0.4165058732032776, -0.1622709482908249, -0.19293366372585297, 0.20233407616615295, 0.21203331649303436, 0.004021510947495699, -0.07101455330848694, -0.06563854217529297, 0.18741896748542786, -0.3410094976425171, -0.01581428200006485, 0.06780040264129639, 0.0633217841386795, -0.3073605000972748, 0.44823870062828064, 0.23076896369457245, -0.28878483176231384, -0.04153428226709366, 0.08832690864801407, -0.11801212280988693, 0.21898895502090454, 0.11878617852926254, 0.15066169202327728, -0.056057173758745193, -0.20429006218910217, 0.41454198956489563, -0.4256971478462219, 0.021681539714336395, -0.17773963510990143, -0.20820821821689606, -0.014102788642048836, 0.2535843253135681, -0.2977364957332611, 0.026771554723381996, -0.098316490650177, 0.09331608563661575, -0.1633647084236145, 0.2756979465484619, 0.15642178058624268, -0.41754233837127686, -0.2338576763868332, -0.28696098923683167, -0.2420893907546997, -0.1407167762517929, -0.23422294855117798, 0.04745498299598694, 0.2318332940340042, 0.23805159330368042, -0.05370805040001869, 0.23276230692863464, 0.17775358259677887, -0.1275855302810669, -0.10512681305408478, 0.034712281078100204, -0.552329421043396, 0.15175122022628784, 0.40120720863342285, 0.19706588983535767, 0.1963340938091278, -0.39993834495544434, -0.2417614907026291, -0.025516901165246964, 0.0489213727414608, -0.16196833550930023, 0.25410693883895874, 0.11399921774864197, 0.7210947871208191, 0.6302274465560913, -0.09510261565446854, -0.3539767861366272, -0.11521708965301514, -0.17464174330234528, -0.004684171173721552, -0.09540362656116486, 0.009421064518392086, -0.2118440866470337, 0.49121004343032837, 0.23967409133911133, -0.2630658447742462, 0.20589995384216309, -0.24400626122951508, -0.14438673853874207, -0.20593014359474182, 0.19791848957538605, -0.20805728435516357, 0.0010103050153702497, 0.047929733991622925, 0.4529615044593811, -0.028188087046146393, 0.23035122454166412, 0.08856795728206635, 0.08757816255092621, -0.4007247984409332, -0.01726544089615345, 0.2634523808956146, 0.3387116491794586, -0.34305766224861145, 0.4724927246570587, 0.12066084146499634, 0.11631543934345245, -0.05245281010866165, -0.22712565958499908, 0.25922393798828125, 0.050888530910015106, -0.22611300647258759, -0.0018727713031694293, 0.29627203941345215, -0.07650946825742722, -0.06469270586967468, 0.10924594849348068, 0.2242141216993332, 0.3844120502471924, 0.013439357280731201, -0.43181440234184265, -0.2402966320514679 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
Nevermind @thomwolf, I just mentioned the other issue so that both appear linked in GitHub and we do not forget to close both once we make the corresponding Pull Request... That was the main reason! 😄
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
36
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. Nevermind @thomwolf, I just mentioned the other issue so that both appear linked in GitHub and we do not forget to close both once we make the corresponding Pull Request... That was the main reason! 😄
[ -0.08552709221839905, -0.06718851625919342, -0.18447397649288177, 0.10478703677654266, -0.06817679107189178, 0.09409269690513611, -0.20691712200641632, 0.35798078775405884, 0.19299151003360748, 0.18033039569854736, 0.1256365329027176, 0.5178527235984802, -0.19906553626060486, -0.053291771560907364, -0.23030462861061096, 0.10034643113613129, -0.17107829451560974, 0.2507985830307007, -0.09663613140583038, 0.17212365567684174, -0.11822570115327835, 0.15862947702407837, 0.058424320071935654, -0.2147802710533142, 0.0472867414355278, -0.31169402599334717, 0.24701564013957977, -0.13067209720611572, -0.2001820206642151, -0.33354651927948, 0.049693722277879715, 0.4665739834308624, 0.15479402244091034, 0.1924552321434021, -0.00011205149348825216, -0.05884014815092087, 0.32634636759757996, 0.04196346551179886, -0.2812105119228363, 0.15788409113883972, -0.15463365614414215, -0.1296813040971756, 0.24625182151794434, -0.17160175740718842, 0.19415362179279327, -0.28602996468544006, -0.26198744773864746, -0.5600834488868713, 0.40462881326675415, -0.2074565887451172, 0.21848005056381226, 0.06591945886611938, -0.4778720736503601, 0.03866928443312645, 0.3469432592391968, 0.3130682110786438, -0.22080035507678986, -0.02414516545832157, 0.43409934639930725, 0.021029381081461906, 0.132823184132576, 0.420308917760849, -0.04279303923249245, -0.1682281345129013, 0.36603787541389465, -0.03185306489467621, -0.1320766657590866, -0.26599448919296265, 0.3651876151561737, -0.041888486593961716, 0.6081594824790955, -0.4039490222930908, -0.07049719989299774, -0.23322011530399323, -0.0010144157567992806, -0.510372519493103, 0.19648340344429016, 0.13087473809719086, -0.02942468225955963, 0.20578761398792267, -0.21564482152462006, -0.3320873975753784, -0.29868510365486145, -0.22750191390514374, 0.5624454617500305, -0.3171733319759369, -0.09318413585424423, -0.1442539244890213, 0.46278563141822815, 0.11779157817363739, 0.16542179882526398, -0.043840501457452774, -0.3093244433403015, 0.28318867087364197, -0.08998968452215195, -0.22045235335826874, -0.21628522872924805, -0.35024091601371765, 0.27510273456573486, 0.21590937674045563, 0.39166924357414246, 0.03507908061146736, 0.19524811208248138, -0.06963043659925461, 0.2703438103199005, 0.43230190873146057, 0.042220599949359894, -0.1306510865688324, 0.2671506702899933, 0.05668643116950989, 0.07128983736038208, 0.014363731257617474, 0.12461569160223007, -0.027785509824752808, 0.20985712110996246, -0.03530919924378395, -0.022360587492585182, -0.2735993266105652, -0.002761784242466092, 0.07690323889255524, 0.29915353655815125, -0.111663319170475, 0.04727549105882645, 0.2507169544696808, 0.21069088578224182, 0.10886078327894211, 0.05727784335613251, 0.2573496103286743, -0.00738240173086524, -0.25155434012413025, 0.038627203553915024, 0.15903078019618988, -0.34530505537986755, -0.20713530480861664, 0.3635474443435669, 0.016521388664841652, 0.04459678381681442, -0.08718333393335342, -0.23912926018238068, 0.0957721471786499, 0.4768104553222656, -0.052590761333703995, 0.19360126554965973, 0.3282553553581238, -0.1214083582162857, -0.19680975377559662, -0.24860931932926178, -0.03909901902079582, -0.1242087110877037, 0.3764863908290863, -0.14883965253829956, -0.27380332350730896, -0.07598168402910233, 0.21675075590610504, 0.10996953397989273, 0.24221591651439667, -0.5487085580825806, 0.11655808240175247, 0.13605131208896637, 0.042357053607702255, 0.0025537877809256315, 0.389115571975708, 0.007783044129610062, -0.15690778195858002, -0.27080902457237244, 0.18428410589694977, -0.6277389526367188, 0.01813453622162342, -0.24190814793109894, -0.18491850793361664, 0.22550086677074432, 0.24005167186260223, -0.15192550420761108, 0.1250220388174057, -0.13771119713783264, 0.19532741606235504, 0.2903510630130768, -0.1376112401485443, -0.4272356927394867, 0.16460782289505005, 0.011629968881607056, 0.12677496671676636, 0.30827200412750244, 0.19194398820400238, 0.3640699088573456, 0.01998117007315159, -0.005991304758936167, 0.27402111887931824, 0.04541623964905739, -0.008872549049556255, -0.4472190737724304, -0.4030653238296509, 0.01817130669951439, 0.20656998455524445, 0.043548375368118286, -0.004268868826329708, 0.22803732752799988, -0.04544564336538315, 0.14474210143089294, 0.025210034102201462, 0.11020020395517349, 0.19901005923748016, 0.16364344954490662, -0.3638181984424591, -0.16709394752979279, 0.10511704534292221, -0.5550244450569153, 0.026747459545731544, -0.5375997424125671, -0.2535656988620758, -0.1553027182817459, -0.3377282917499542, 0.11387944221496582, -0.01780601032078266, -0.1368131786584854, 0.09948748350143433, 0.16361697018146515, -0.050528284162282944, 0.21016612648963928, -0.11344340443611145, -0.36785897612571716, -0.04598655924201012, -0.05553446710109711, -0.017163163051009178, -0.4335534870624542, 0.06701971590518951, 0.07132448256015778, -0.25237157940864563, 0.07253530621528625, -0.011651960201561451, -0.18548843264579773, -0.4729955792427063, -0.15386299788951874, 0.26038387417793274, 0.24507838487625122, 0.29219678044319153, 0.28770551085472107, 0.26214033365249634, 0.21281372010707855, 0.20983023941516876, 0.1372448205947876, 0.1424441635608673, -0.015927104279398918, 0.059455376118421555, -0.4149571657180786, 0.3945380747318268, -0.15297064185142517, -0.05917190760374069, -0.15091489255428314, -0.3506002128124237, 0.2903299629688263, -0.14018453657627106, 0.04752649366855621, -0.4543599486351013, 0.1019948348402977, 0.3108375072479248, -0.11021474003791809, 0.015106391161680222, 0.07892662286758423, 0.04020719230175018, 0.10060682892799377, -0.04016387462615967, -0.13997085392475128, 0.3669392466545105, 0.05546232685446739, -0.2806324064731598, 0.06649605929851532, 0.356768935918808, 0.3791138529777527, 0.21070246398448944, -0.19492901861667633, -0.19077414274215698, 0.359758585691452, -0.018401486799120903, 0.20914411544799805, 0.022183900699019432, 0.02909962460398674, 0.34127968549728394, 0.12374929338693619, -0.026618244126439095, -0.29555487632751465, -0.10011620819568634, 0.07769361883401871, 0.2316412627696991, 0.24728652834892273, -0.28162968158721924, -0.24299436807632446, -0.30209851264953613, 0.564166784286499, 0.31441736221313477, 0.22227266430854797, -0.07187733054161072, 0.5412748456001282, 0.09349491447210312, -0.5482693910598755, 0.12951575219631195, 0.06196385622024536, 0.6242788434028625, -0.11756687611341476, -0.0005493233329616487, -0.3989092707633972, -0.2547472417354584, 0.13614563643932343, 0.08734260499477386, 0.31913283467292786, -0.08648673444986343, 0.4921013116836548, 0.03619017452001572, 0.08332372456789017, -0.14825716614723206, -0.1364150196313858, 0.09518949687480927, 0.2864723205566406, -0.035789430141448975, 0.11291338503360748, 0.12832890450954437, 0.0019893012940883636, 0.0689898207783699, -0.14435851573944092, -0.359082967042923, -0.15671402215957642, 0.17789043486118317, 0.05167635530233383, -0.14595302939414978, -0.34835508465766907, -0.13757850229740143, -0.11672887206077576, -0.4708237051963806, 0.2861890196800232, -0.004263395443558693, 0.058068618178367615, 0.10668085515499115, 0.18718880414962769, -0.01023702323436737, 0.10183834284543991, 0.05153007432818413, -0.13125233352184296, -0.6456323266029358, 0.16299989819526672, -0.2419220209121704, -0.10737799108028412, 0.2100316733121872, 0.08453907072544098, 0.06748563051223755, 0.24125710129737854, -0.4375690221786499, -0.04720334708690643, -0.014671512879431248, 0.16061937808990479, -0.20703288912773132, -0.11852696537971497, 0.19155754148960114, 0.2598814070224762, -0.2031119465827942, -0.033335745334625244, 0.030755162239074707, 0.21392469108104706, 0.3151898682117462, 0.1125565841794014, 0.059973616153001785, 0.28921160101890564, 0.16513347625732422, 0.3626136779785156, -0.3334110975265503, 0.0752132385969162, 0.37527212500572205, 0.3635934293270111, 0.4455353319644928, -0.2741262912750244, 0.20365573465824127, -0.34342843294143677, -0.01789604127407074, -0.09213156253099442, 0.1906604915857315, 0.06591639667749405, -0.27662938833236694, 0.14961086213588715, -0.2267407774925232, -0.04684632271528244, -0.0985540971159935, 0.32625502347946167, -0.20884904265403748, -0.09147724509239197, 0.06213465332984924, -0.2048478126525879, -0.06888429820537567, 0.006367616821080446, 0.18377283215522766, 0.10838764160871506, 0.2688840329647064, -0.13042955100536346, -0.26447445154190063, -0.0394006185233593, -0.25721243023872375, 0.285104900598526, -0.2718001902103424, -0.21928615868091583, -0.13193610310554504, -0.017210334539413452, 0.1451883763074875, 0.13105015456676483, 0.4179218113422394, -0.14094485342502594, -0.1006120964884758, -0.18828338384628296, 0.012589069083333015, -0.22018752992153168, 0.01893119141459465, -0.03635624051094055, 0.1079012006521225, 0.13140881061553955, 0.3927890658378601, -0.2881758213043213, -0.2088010013103485, -0.2204585075378418, 0.4583600163459778, -0.20307327806949615, -0.09956659376621246, -0.03567492216825485, -0.2675746977329254, -0.5211288332939148, 0.08275733888149261, 0.13852842152118683, -0.1120302602648735, 0.1495102494955063, -0.29888102412223816, -0.019606035202741623, -0.33072003722190857, 0.049219921231269836, 0.10103800892829895, 0.5875728726387024, -0.2887618839740753, 0.09519065171480179, -0.2015620470046997, 0.18223361670970917, 0.44745978713035583, 0.2902315855026245, -0.0935395210981369, 0.1095426082611084, 0.08886614441871643, -0.3233521282672882, 0.025891629979014397, 0.16844312846660614, -0.11674261093139648, 0.23019064962863922, -0.2475331872701645, 0.6316026449203491, 0.06192547082901001, -0.10115447640419006, -0.15819016098976135, -0.29539570212364197, 0.036827076226472855, -0.11686801165342331, 0.14419956505298615, 0.003870306070894003, -0.15173904597759247, 0.4974933862686157, -0.17422635853290558, -0.23690396547317505, 0.5581265687942505, 0.11188720166683197, 1.122302532196045, 0.06624532490968704, -0.008209869265556335, -0.11594072729349136, -0.35217902064323425, 0.25676149129867554, -0.6527990102767944, 0.091990627348423, 0.012415497563779354, -0.1366785615682602, 0.14952492713928223, -0.007631316781044006, -0.05051911994814873, 0.17213955521583557, -0.3216414451599121, 0.043433550745248795, -0.24369531869888306, -0.1264185756444931, -0.3005655109882355, 0.39729106426239014, -0.08812139928340912, -0.3036731481552124, -0.13684959709644318, 0.06959006190299988, 0.09616447240114212, -0.10275276005268097, -0.2141227424144745, -0.11295287311077118, 0.31579333543777466, -0.084218330681324, 0.20024830102920532, -0.05316504091024399, -0.17646028101444244, 0.3988558351993561, -0.17001961171627045, -0.07717317342758179, -0.26304224133491516, -0.08888275176286697, -0.12113302946090698, 0.08847363293170929, 0.015210169367492199, 0.05394826829433441, 0.11296027898788452, 0.09238394349813461, -0.3502329885959625, -0.02624746970832348, -0.06316238641738892, -0.19011083245277405, 0.04500971734523773, 0.03848513215780258, -0.3371967673301697, -0.27309471368789673, 0.12757745385169983, 0.13418184220790863, -0.16872894763946533, -0.00396393146365881, -0.20656616985797882, -0.07748892158269882, -0.5094297528266907, 0.013762685470283031, 0.18160554766654968, 0.285528302192688, -0.1449526697397232, 0.34956294298171997, -0.07684152573347092, -0.22273096442222595, -0.27390122413635254, -0.05616310238838196, 0.35478681325912476, -0.09188807010650635, 0.1497974544763565, -0.16595958173274994, -0.281550794839859, -0.49641647934913635, -0.0726444274187088, 0.022501366212964058, -0.43139904737472534, 0.45400118827819824, -0.00228127115406096, -0.3116537928581238, 0.11540845036506653, -0.06609124690294266, 0.13808687031269073, 0.03720616176724434, -0.1806195080280304, -0.0911826640367508, -0.47339463233947754, 0.25554797053337097, 0.15065686404705048, 0.5617164969444275, 0.0009443513699807227, -0.0016482941573485732, -0.07332868874073029, 0.1851305365562439, -0.3437162935733795, 0.18667133152484894, 0.14187712967395782, 0.1569523811340332, -0.07383927702903748, 0.15225474536418915, 0.08870380371809006, -0.17353229224681854, 0.0005618510185740888, 0.1184091866016388, -0.18257902562618256, -0.24245190620422363, -0.036061715334653854, 0.08901435136795044, -0.15983322262763977, -0.08232621848583221, -0.11708632111549377, -0.10314195603132248, -0.0009933131514117122, -0.1549750715494156, 0.3016618490219116, -0.19953568279743195, -0.06857014447450638, -0.2173980474472046, 0.45637500286102295, -0.09549573063850403, 0.017430618405342102, 0.16717815399169922, -0.03979025408625603, 0.3143795132637024, -0.05145641043782234, 0.014695721678435802, -0.09666070342063904, -0.10613247752189636, -0.21365997195243835, 0.07023200392723083, 0.21136201918125153, 0.11381400376558304, -0.00930349063128233, 0.00916591752320528, -0.11533883959054947, 0.1331101804971695, 0.11078588664531708, 0.2708095610141754, -0.08258858323097229, -0.15676657855510712, -0.03293941169977188, 0.30321234464645386, -0.2050682008266449, -0.19601300358772278, -0.10919928550720215, 0.008196396753191948, -0.16488958895206451, 0.1821451187133789, 0.3783392310142517, 0.011258442886173725, 0.20392659306526184, 0.1890285760164261, 0.37331441044807434, -0.29299649596214294, 0.2233547419309616, 0.09373930096626282, -0.05710764229297638, -0.23700764775276184, -0.08507779985666275, 0.24107474088668823, 0.14417169988155365, -0.05541132017970085, -0.15221606194972992, 0.31871509552001953, 0.5666555166244507, 0.33260390162467957, -0.4247448146343231, -0.09829466789960861, -0.19804365932941437, 0.5276716351509094, -0.12083913385868073, 0.4313078224658966, 0.419430673122406, 0.11996624618768692, 0.26244527101516724, -0.32678720355033875, -0.2990860939025879, 0.458426296710968, 0.0017612260999158025, 0.013882016763091087, 0.02789432927966118, -0.18516002595424652, 0.1503153294324875, 0.08225356042385101, 0.1463257223367691, 0.4236714243888855, 0.005089549347758293, 0.26983407139778137, 0.039510682225227356, 0.22514712810516357, 0.5589662194252014, 0.13035857677459717, 0.4065198302268982, -0.14258894324302673, -0.041980940848588943, 0.26129159331321716, 0.22205901145935059, 0.005022833589464426, 0.002629572059959173, 0.15770749747753143, 0.26277515292167664, -0.3247104287147522, -0.03007614240050316, 0.1915375143289566, 0.0047534191980957985, -0.34402069449424744, 0.4657171070575714, 0.2651114761829376, -0.22768184542655945, 0.024503406137228012, 0.1511320322751999, -0.20070995390415192, 0.19505369663238525, 0.09904900938272476, 0.13870640099048615, -0.014525079168379307, -0.2503454387187958, 0.35740822553634644, -0.471448689699173, 0.043349895626306534, -0.22809630632400513, -0.2472662627696991, -0.0754455178976059, 0.17681533098220825, -0.28443440794944763, 0.07250343263149261, -0.10673225671052933, 0.12585249543190002, -0.17533117532730103, 0.3727458119392395, 0.106431744992733, -0.4275982975959778, -0.24818465113639832, -0.3017345368862152, -0.25494226813316345, -0.09554865956306458, -0.20056544244289398, 0.04579286649823189, 0.20846328139305115, 0.34001609683036804, -0.045928966253995895, 0.15530633926391602, 0.28223398327827454, -0.12575969099998474, -0.11817660927772522, 0.045445822179317474, -0.6027136445045471, 0.26402899622917175, 0.3624565899372101, 0.21310429275035858, 0.2241930365562439, -0.38736456632614136, -0.21728698909282684, 0.03569311276078224, 0.0904211774468422, -0.23749159276485443, 0.2351774424314499, 0.13612787425518036, 0.6803238391876221, 0.5626972317695618, -0.079704150557518, -0.32143405079841614, -0.18048852682113647, -0.25064095854759216, -0.10273721069097519, -0.19035704433918, 0.01465427316725254, -0.16617819666862488, 0.5049534440040588, 0.23263691365718842, -0.19656258821487427, 0.09622073918581009, -0.2331666201353073, -0.12894216179847717, -0.1913464218378067, 0.26485034823417664, -0.17442673444747925, 0.08594707399606705, 0.057047825306653976, 0.38120970129966736, -0.11716356873512268, 0.1815216839313507, 0.07427295297384262, 0.10074259340763092, -0.3683783710002899, -0.12657146155834198, 0.3467055559158325, 0.27029311656951904, -0.34618064761161804, 0.5040485262870789, 0.10222369432449341, 0.06730344891548157, -0.09444490075111389, -0.3364172875881195, 0.21338008344173431, 0.02356583997607231, -0.17679698765277863, -0.00018706376431509852, 0.33565226197242737, -0.09552266448736191, -0.058727897703647614, 0.06713062524795532, 0.24931806325912476, 0.3315477669239044, -0.08112632483243942, -0.3822200894355774, -0.28657007217407227 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
Ok yes. I think this is an important feature to be able to use large datasets which are pretty much always compressed files. In particular now this requires to keep the extracted file on the drive if you want to avoid reprocessing the dataset so in my case, this require using always ~400GB of drive instead of just 200GB (which is already significant). Two nice features would be to: - allow to delete the extracted files without loosing the ability to load the dataset from the cached arrow-file - streamlined decompression when only the currently read file is extracted - this might require to read the list of files from the extracted archives before processing them?
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
116
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. Ok yes. I think this is an important feature to be able to use large datasets which are pretty much always compressed files. In particular now this requires to keep the extracted file on the drive if you want to avoid reprocessing the dataset so in my case, this require using always ~400GB of drive instead of just 200GB (which is already significant). Two nice features would be to: - allow to delete the extracted files without loosing the ability to load the dataset from the cached arrow-file - streamlined decompression when only the currently read file is extracted - this might require to read the list of files from the extracted archives before processing them?
[ -0.06597820669412613, -0.06750478595495224, -0.12144386768341064, 0.13619430363178253, -0.18816892802715302, 0.2371562123298645, -0.1601298451423645, 0.2473282366991043, 0.16247081756591797, 0.1584106832742691, 0.10431958734989166, 0.44837719202041626, -0.3028530776500702, -0.10580568015575409, -0.1939978301525116, -0.039112389087677, -0.18083587288856506, 0.3018626570701599, 0.06003066152334213, 0.19133152067661285, -0.14811520278453827, -0.05452176555991173, 0.021462788805365562, -0.12869027256965637, 0.11615577340126038, -0.4201308786869049, 0.20555534958839417, -0.23629575967788696, -0.09822387248277664, -0.32712322473526, -0.007774295751005411, 0.5414353013038635, 0.3300151228904724, 0.1635194569826126, -0.00012168644752819091, 0.052124109119176865, 0.2817979156970978, 0.06432460248470306, -0.44947198033332825, 0.1446414440870285, -0.3190244734287262, -0.18726326525211334, 0.14484019577503204, -0.1605795919895172, 0.27584293484687805, -0.5139069557189941, -0.15158039331436157, -0.754689633846283, 0.47626981139183044, -0.2039915919303894, 0.07530731707811356, -0.0049459547735750675, -0.5496516823768616, 0.15623556077480316, 0.31247174739837646, 0.3418075144290924, -0.13618873059749603, -0.04349515959620476, 0.496758371591568, 0.11903171986341476, 0.2489924132823944, 0.3314892053604126, -0.04649176076054573, -0.35072827339172363, 0.35942211747169495, -0.06955321878194809, -0.07357435673475266, -0.28073614835739136, 0.2501987814903259, 0.0622791051864624, 0.6185548901557922, -0.2949785590171814, -0.17888420820236206, -0.3965527415275574, 0.0939030721783638, -0.6207104921340942, -0.0016167047433555126, 0.24568702280521393, 0.01351578813046217, 0.3100339472293854, -0.0990564152598381, -0.4396597743034363, -0.3894588351249695, -0.1128680408000946, 0.632661759853363, -0.4742110073566437, -0.07410311698913574, -0.11111696809530258, 0.5121365785598755, 0.18672554194927216, 0.21985964477062225, -0.1967434138059616, -0.21677088737487793, 0.3942318558692932, -0.08308694511651993, -0.1818787008523941, -0.3705098628997803, -0.2833349108695984, 0.18886888027191162, 0.1414780616760254, 0.42014163732528687, -0.043493129312992096, 0.17956650257110596, 0.08539111167192459, 0.28400081396102905, 0.39246058464050293, -0.01701938733458519, -0.10819349437952042, 0.1641591340303421, 0.10968455672264099, 0.1837196797132492, -0.06346901506185532, 0.04517938941717148, -0.06222096085548401, 0.1686202734708786, 0.10199933499097824, -0.0905889943242073, -0.1100681871175766, -0.0399751178920269, 0.04463541507720947, 0.07130744308233261, -0.20954173803329468, 0.0990586206316948, 0.17989712953567505, 0.2338266223669052, 0.07128896564245224, 0.08952054381370544, 0.28983619809150696, 0.04636780545115471, -0.31516033411026, 0.1110786572098732, 0.07670394331216812, -0.30827751755714417, -0.2443213313817978, 0.4048587381839752, -0.11306662857532501, -0.05293592810630798, -0.17799925804138184, -0.2501620948314667, 0.08876363933086395, 0.5159016251564026, -0.155226930975914, 0.3246421813964844, 0.23602426052093506, -0.2288743406534195, -0.25145798921585083, -0.2872159481048584, -0.014499729499220848, -0.17151187360286713, 0.5403380990028381, -0.1308785229921341, -0.2736298739910126, -0.011903846636414528, 0.08275258541107178, 0.07786735892295837, 0.2827010750770569, -0.5317140817642212, 0.2350834608078003, 0.053989943116903305, -0.046818722039461136, -0.041092388331890106, 0.33516836166381836, -0.015607016161084175, -0.013569384813308716, -0.34760579466819763, 0.24689772725105286, -0.6518744230270386, -0.06022734194993973, -0.35700181126594543, -0.2370939403772354, 0.18242236971855164, 0.11429627239704132, -0.1536521017551422, 0.16755031049251556, -0.18183639645576477, 0.10571707040071487, 0.38229405879974365, -0.06416753679513931, -0.3867465555667877, 0.19539199769496918, 0.10777056217193604, 0.2615795433521271, 0.31337156891822815, 0.21503201127052307, 0.4147534668445587, -0.07295359671115875, -0.09576674550771713, 0.2799834609031677, 0.07718610763549805, -0.09694282710552216, -0.29890134930610657, -0.4622780382633209, 0.09867271035909653, 0.24797578155994415, 0.021134622395038605, 0.12906314432621002, 0.26146477460861206, -0.03573153167963028, 0.20370304584503174, 0.16515213251113892, 0.2209409922361374, 0.14003105461597443, 0.06426267325878143, -0.2695460319519043, -0.15031000971794128, 0.1737484335899353, -0.4975177049636841, 0.012630739249289036, -0.5214067101478577, -0.317244291305542, -0.2045377492904663, -0.28857043385505676, 0.13722732663154602, -0.033504668623209, -0.19882528483867645, 0.2015221118927002, 0.02378489263355732, -0.14128105342388153, 0.272455632686615, 0.06531944125890732, -0.4101708233356476, -0.06578142195940018, -0.06757808476686478, -0.05952170491218567, -0.46460896730422974, 0.12049217522144318, 0.15674681961536407, -0.14072686433792114, -0.12659059464931488, 0.05243673175573349, -0.3225053548812866, -0.44107258319854736, -0.15056920051574707, 0.1877082735300064, 0.20102505385875702, 0.26135313510894775, 0.16141866147518158, 0.3275245130062103, 0.2161504179239273, 0.14286282658576965, 0.17396044731140137, 0.13869333267211914, 0.029790664091706276, 0.09586486965417862, -0.3868565857410431, 0.4077584445476532, -0.32795578241348267, -0.025379866361618042, -0.19282066822052002, -0.41763561964035034, 0.2501659691333771, -0.10819607973098755, 0.030185770243406296, -0.5059496164321899, 0.0732090026140213, 0.34958362579345703, -0.09041760861873627, -0.02619200013577938, 0.1483161896467209, -0.20892973244190216, -0.018065832555294037, -0.07656577974557877, -0.25780725479125977, 0.313960462808609, -0.09848816692829132, -0.1204739362001419, 0.10992540419101715, 0.45663127303123474, 0.3945099413394928, 0.21345460414886475, -0.13387943804264069, -0.1825798749923706, 0.5015579462051392, 0.01698593981564045, 0.13197359442710876, 0.0567719042301178, 0.06116894260048866, 0.4169519543647766, 0.1301809400320053, 0.07144157588481903, -0.21482257544994354, -0.12605708837509155, 0.17610904574394226, 0.14703062176704407, 0.2887784540653229, -0.14003930985927582, -0.20875689387321472, -0.46249476075172424, 0.4350059926509857, 0.3845836818218231, 0.2519318461418152, -0.006583955604583025, 0.5214510560035706, 0.007744438014924526, -0.3969201445579529, 0.059996940195560455, -0.001994082937017083, 0.7599350810050964, -0.09310366213321686, -0.30559679865837097, -0.41877269744873047, -0.19771035015583038, 0.18832427263259888, 0.003835392417386174, 0.34939709305763245, -0.1790192872285843, 0.4796020984649658, 0.21437415480613708, 0.047968439757823944, -0.08091336488723755, -0.0552871972322464, 0.08498097956180573, 0.3521822392940521, -0.04784559831023216, 0.03502153977751732, 0.14568866789340973, 0.08630253374576569, 0.093790203332901, -0.1733705848455429, -0.21019089221954346, -0.125600665807724, 0.10749366134405136, 0.12088575959205627, 0.09522757679224014, -0.26980093121528625, 0.04262436926364899, -0.24682126939296722, -0.4235398769378662, 0.30913060903549194, -0.05132884159684181, -0.0689932256937027, 0.15832653641700745, 0.2341705709695816, -0.04457583278417587, 0.05758447200059891, 0.06800047308206558, -0.033619657158851624, -0.6436602473258972, 0.12693816423416138, -0.19446034729480743, 0.04361741989850998, 0.08085890859365463, -0.06316883862018585, -0.07405651360750198, 0.41981878876686096, -0.37694641947746277, 0.035168152302503586, 0.06432508677244186, 0.1337394416332245, -0.2988142669200897, -0.08062906563282013, 0.20376567542552948, 0.21216140687465668, -0.01761246845126152, -0.010586103424429893, 0.14545607566833496, 0.20495319366455078, 0.3793356716632843, 0.14576034247875214, 0.1917964220046997, 0.24672599136829376, 0.21695928275585175, 0.41579878330230713, -0.25783663988113403, -0.007682739291340113, 0.31500935554504395, 0.39198583364486694, 0.4485298991203308, -0.1432020664215088, 0.19770291447639465, -0.3346399664878845, -0.010161573998630047, -0.14898161590099335, 0.06697458028793335, 0.026199214160442352, -0.2776844799518585, 0.14526838064193726, -0.2031221091747284, -0.05048534274101257, -0.11471971124410629, 0.2853795886039734, -0.29610520601272583, 0.11132929474115372, 0.029748408123850822, -0.2856205999851227, -0.06092570349574089, -0.060432057827711105, 0.1740289330482483, 0.19015051424503326, 0.5275211334228516, -0.054911062121391296, -0.14520227909088135, -0.03287987783551216, -0.1676221489906311, 0.2732894718647003, -0.1726188212633133, -0.19989128410816193, 0.03566420450806618, -0.012008504942059517, 0.09214923530817032, 0.2388252168893814, 0.3515525758266449, -0.12521012127399445, -0.030796756967902184, -0.152073472738266, 0.043006159365177155, -0.21110525727272034, 0.013766109943389893, 0.0080306651070714, 0.020716823637485504, 0.00893993116915226, 0.44952794909477234, -0.26231521368026733, -0.14193570613861084, -0.2325689047574997, 0.5902496576309204, -0.23656029999256134, -0.18276536464691162, -0.0008260953472927213, -0.12954361736774445, -0.558510959148407, 0.00573931448161602, 0.043274346739053726, -0.10352899879217148, 0.09795895963907242, -0.26685360074043274, -0.19030709564685822, -0.24984118342399597, 0.08967320621013641, 0.02027346007525921, 0.4588964879512787, -0.27427229285240173, 0.0562029704451561, -0.03503283113241196, 0.23896682262420654, 0.5481043457984924, 0.21424336731433868, -0.14730247855186462, -0.05852241441607475, 0.02626722678542137, -0.3692212998867035, 0.16744782030582428, 0.16639713943004608, -0.24255719780921936, 0.3254415988922119, -0.22777709364891052, 0.46706289052963257, -0.06896834075450897, 0.06520423293113708, -0.25908681750297546, -0.2505386769771576, -0.057197827845811844, -0.20396600663661957, 0.1911698877811432, 0.05414031073451042, -0.20987246930599213, 0.4351098835468292, -0.12059152871370316, -0.2572706937789917, 0.5326522588729858, 0.05907797813415527, 1.1551048755645752, -0.11284001916646957, 0.014977492392063141, -0.26804056763648987, -0.17977669835090637, 0.3728267550468445, -0.6633318066596985, 0.18162783980369568, 0.01495764683932066, -0.13848797976970673, 0.0593060627579689, -0.03762853518128395, 0.03766843304038048, 0.28465956449508667, -0.22821876406669617, 0.059017445892095566, -0.2025691568851471, -0.28045985102653503, -0.2769896686077118, 0.39813560247421265, -0.07361738383769989, -0.2576678693294525, -0.05926896259188652, -0.03604414686560631, 0.05962095037102699, -0.05741060897707939, -0.2111501842737198, -0.1065165176987648, 0.3768344521522522, 0.028975503519177437, 0.27763453125953674, -0.1710880547761917, -0.320793092250824, 0.3730856478214264, -0.21182891726493835, -0.2551984190940857, -0.10242029279470444, 0.07188904285430908, -0.2685132920742035, 0.050333429127931595, 0.14716292917728424, -0.007066352758556604, 0.09035001695156097, -0.06277897208929062, -0.37012484669685364, 0.03449568897485733, -0.002410678891465068, -0.07829470187425613, 0.09779184311628342, 0.13365913927555084, -0.33973753452301025, -0.34654203057289124, 0.1758270114660263, 0.13666175305843353, -0.124431312084198, 0.05645698308944702, -0.2980700135231018, -0.09244637936353683, -0.48418277502059937, 0.1409902572631836, 0.058678776025772095, 0.30028119683265686, -0.14333531260490417, 0.2562081515789032, -0.19350077211856842, -0.11901752650737762, -0.14943429827690125, -0.15282031893730164, 0.14903168380260468, -0.20141269266605377, 0.23110729455947876, -0.2553104758262634, -0.24304571747779846, -0.3802861273288727, -0.0017059885431081057, -0.1441022753715515, -0.3890041410923004, 0.4247322976589203, 0.03931732475757599, -0.1646714210510254, 0.056664131581783295, -0.1659507006406784, 0.002175289671868086, 0.00563756562769413, -0.06999136507511139, -0.16726623475551605, -0.4592876732349396, 0.25871410965919495, 0.13622497022151947, 0.5790667533874512, 0.08899357169866562, 0.0018238031771034002, -0.1906796097755432, 0.030370883643627167, -0.21412284672260284, 0.31212231516838074, 0.33796048164367676, 0.17762497067451477, 0.026968494057655334, 0.2774658799171448, 0.040317829698324203, -0.2374206930398941, -0.11227697879076004, 0.10826916992664337, -0.04246196523308754, -0.12655381858348846, -0.13381056487560272, 0.12783239781856537, -0.10390860587358475, -0.11733219772577286, -0.15632741153240204, -0.2644056975841522, 0.02924509160220623, -0.2014668732881546, 0.2527792155742645, -0.2529952824115753, -0.12736739218235016, -0.13154087960720062, 0.3878418207168579, -0.05597815290093422, -0.1523718386888504, 0.19969484210014343, -0.03712393715977669, 0.4207262098789215, 0.012594727799296379, 0.10740319639444351, -0.07901445776224136, -0.05572978034615517, -0.3938586413860321, 0.08159922063350677, 0.33635595440864563, 0.0910329595208168, 0.14534646272659302, 0.009826673194766045, -0.03466149419546127, 0.11173254996538162, 0.057055119425058365, 0.2079504281282425, -0.10513784736394882, -0.05906233936548233, 0.023487236350774765, 0.1583217829465866, -0.21244600415229797, -0.10635706037282944, -0.04757745936512947, -0.007340204901993275, -0.16042988002300262, 0.25049251317977905, 0.3605210483074188, 0.08016524463891983, -0.017550485208630562, 0.041823770850896835, 0.30674803256988525, -0.1281602829694748, 0.30539947748184204, 0.35434067249298096, 0.11227221041917801, -0.19181345403194427, -0.16343867778778076, 0.3312186598777771, 0.18813279271125793, -0.15218928456306458, -0.1744489222764969, 0.4083157479763031, 0.6499541401863098, 0.34937065839767456, -0.5603497624397278, -0.2789340913295746, -0.23835496604442596, 0.6232473254203796, -0.05907786637544632, 0.42892175912857056, 0.3845163583755493, 0.21221059560775757, 0.3161063492298126, -0.13665170967578888, -0.14279842376708984, 0.3982590436935425, 0.0905594453215599, 0.03552165627479553, 0.08935678005218506, -0.1809118688106537, 0.10884520411491394, 0.06977695226669312, 0.13558700680732727, 0.3712623715400696, -0.1599111258983612, 0.3642849624156952, 0.16240954399108887, 0.2602543830871582, 0.5718256831169128, 0.2083936184644699, 0.466364324092865, -0.15894760191440582, -0.22220668196678162, 0.20365245640277863, 0.2428523451089859, 0.11754505336284637, -0.14864444732666016, -0.0576639398932457, 0.11165499687194824, -0.3451366126537323, -0.03975015878677368, 0.02430225908756256, 0.08403824269771576, -0.2572028338909149, 0.4885839819908142, 0.2748911678791046, -0.18983186781406403, 0.06644195318222046, 0.004417041782289743, -0.053142476826906204, 0.12791986763477325, 0.10668574273586273, 0.21259178221225739, -0.13473369181156158, -0.23573514819145203, 0.3795194625854492, -0.4040881097316742, 0.009247326292097569, -0.15636351704597473, -0.016411948949098587, 0.029393114149570465, 0.32022225856781006, -0.2720811069011688, 0.07905988395214081, -0.003983713686466217, 0.04658713936805725, -0.22350512444972992, 0.21134674549102783, 0.25014692544937134, -0.3231530487537384, -0.2714594304561615, -0.25969982147216797, -0.1967799961566925, -0.21272295713424683, -0.22712555527687073, 0.076329305768013, 0.16946245729923248, 0.25538718700408936, 0.06601310521364212, 0.25661253929138184, 0.06949282437562943, -0.10095718502998352, 0.06154318526387215, 0.0652921199798584, -0.44694268703460693, 0.04307005554437637, 0.3881984353065491, 0.24351198971271515, 0.13378264009952545, -0.4015810787677765, -0.3996724486351013, -0.00015432678628712893, -0.021937891840934753, -0.18887482583522797, 0.2017795592546463, 0.04502152279019356, 0.6890198588371277, 0.6287791728973389, -0.11400441825389862, -0.3001963794231415, -0.05391433835029602, -0.2284243255853653, -0.011899304576218128, -0.08300997316837311, 0.013651179149746895, -0.19529972970485687, 0.44236692786216736, 0.1934666484594345, -0.35213953256607056, 0.2612173557281494, -0.25669795274734497, -0.2904362976551056, -0.18764451146125793, 0.1607295423746109, -0.33350345492362976, -0.06644265353679657, 0.019096678122878075, 0.43395811319351196, -0.022912396118044853, 0.20966468751430511, 0.08175602555274963, 0.08185403794050217, -0.3381942808628082, 0.05306805297732353, 0.3016922175884247, 0.3127163350582123, -0.2746134102344513, 0.5506643056869507, 0.04935678094625473, 0.08168340474367142, 0.07999922335147858, -0.2568175792694092, 0.25034311413764954, 0.1334228217601776, -0.3104124963283539, 0.026902133598923683, 0.22445757687091827, 0.029676271602511406, -0.06045674532651901, 0.05018091946840286, 0.2297375649213791, 0.4168798625469208, 0.06957124173641205, -0.4529070556163788, -0.22046326100826263 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
Note that I'm confirming that with the current master branch of dataset, deleting extracted files (without deleting the arrow cache file) lead to **re-extracting** these files when reloading the dataset instead of directly loading the arrow cache file.
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
38
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. Note that I'm confirming that with the current master branch of dataset, deleting extracted files (without deleting the arrow cache file) lead to **re-extracting** these files when reloading the dataset instead of directly loading the arrow cache file.
[ -0.16383492946624756, 0.03803050518035889, -0.1447685807943344, 0.1780930459499359, -0.15926943719387054, 0.23571422696113586, -0.17465701699256897, 0.28733715415000916, 0.1265912652015686, 0.15852248668670654, 0.06744439899921417, 0.5160759687423706, -0.22754135727882385, -0.06908786296844482, -0.20187151432037354, 0.0688018649816513, -0.24983862042427063, 0.29927030205726624, -0.12158360332250595, 0.14755669236183167, -0.15092501044273376, 0.020951731130480766, 0.06885450333356857, -0.1775144338607788, -0.0016512938309460878, -0.3966260254383087, 0.22042596340179443, -0.2167358547449112, -0.13470052182674408, -0.4136336147785187, 0.06340036541223526, 0.5557299256324768, 0.265567809343338, 0.1864333301782608, -0.00011691272811731324, -0.011352765373885632, 0.297825425863266, 0.10522539913654327, -0.4620439112186432, 0.19280192255973816, -0.27152466773986816, -0.11854834109544754, 0.2721540033817291, -0.11764407902956009, 0.23779599368572235, -0.42014482617378235, -0.20901302993297577, -0.6489424109458923, 0.47929736971855164, -0.18982583284378052, 0.14784656465053558, 0.032926294952631, -0.5153906941413879, 0.061589084565639496, 0.25727689266204834, 0.33194467425346375, -0.0981929674744606, 0.003938810434192419, 0.36744850873947144, 0.08879120647907257, 0.17937317490577698, 0.37152087688446045, -0.034001365303993225, -0.2261725515127182, 0.36559170484542847, -0.016139201819896698, -0.17322658002376556, -0.23170092701911926, 0.3097931146621704, 0.044382207095623016, 0.6939406394958496, -0.43882280588150024, -0.15895351767539978, -0.3909532129764557, 0.14216555655002594, -0.505419135093689, 0.11756342649459839, 0.1817193478345871, 0.011459390632808208, 0.24223393201828003, -0.1476076990365982, -0.4430013597011566, -0.3262474536895752, -0.19662103056907654, 0.595367431640625, -0.42009785771369934, -0.08782044798135757, -0.1266939491033554, 0.4859718382358551, 0.0839419811964035, 0.2252025306224823, -0.17928573489189148, -0.3020442724227905, 0.3221307694911957, -0.10049431025981903, -0.19479066133499146, -0.3318038284778595, -0.28373926877975464, 0.163308247923851, 0.19714464247226715, 0.3921898901462555, 0.01557788997888565, 0.15899020433425903, -0.002458407776430249, 0.36501234769821167, 0.325318306684494, 0.05674891918897629, -0.015444953925907612, 0.1955091655254364, 0.12192867696285248, 0.09446670114994049, -0.06264059990644455, 0.05644167587161064, -0.03616935387253761, 0.30555757880210876, -0.022461868822574615, 0.0320759080350399, -0.164372518658638, -0.07733701169490814, 0.06615506112575531, 0.19198065996170044, -0.18180973827838898, 0.051408227533102036, 0.1919044554233551, 0.19456176459789276, 0.10841458290815353, 0.01202984619885683, 0.2396143078804016, 0.032586220651865005, -0.3729590177536011, 0.06241590902209282, 0.0842377170920372, -0.31524714827537537, -0.21676990389823914, 0.4251205027103424, -0.06925248354673386, -0.06774383783340454, -0.07764264196157455, -0.33259639143943787, 0.12386804819107056, 0.5096794366836548, -0.09293756633996964, 0.274929940700531, 0.30112671852111816, -0.19444866478443146, -0.2114197015762329, -0.2887328565120697, 0.011574424803256989, -0.1462053507566452, 0.47187235951423645, -0.08362643420696259, -0.2405281960964203, -0.07928823679685593, 0.1582888960838318, 0.09983402490615845, 0.25392988324165344, -0.6136034727096558, 0.10326474905014038, 0.10204200446605682, 0.06290680170059204, 0.006415714975446463, 0.2727429270744324, -0.010928468778729439, -0.07116548717021942, -0.25002846121788025, 0.2974754869937897, -0.7026979923248291, -0.01511458121240139, -0.3810780346393585, -0.2615412175655365, 0.14419828355312347, 0.13600194454193115, -0.11409980803728104, 0.2153518944978714, -0.19310958683490753, 0.15850993990898132, 0.28107187151908875, -0.12776385247707367, -0.44949641823768616, 0.1385640949010849, 0.031671192497015, 0.2216450721025467, 0.25270316004753113, 0.2599443197250366, 0.40642064809799194, -0.00534866051748395, -0.07470469921827316, 0.2618267834186554, 0.00722237816080451, -0.08188903331756592, -0.3101496398448944, -0.3716854751110077, 0.009132815524935722, 0.29029473662376404, -0.04642358794808388, 0.03339610621333122, 0.24577370285987854, -0.011613454669713974, 0.1760634183883667, 0.13778823614120483, 0.1765563040971756, 0.15648865699768066, 0.11293650418519974, -0.286982923746109, -0.24305711686611176, 0.1173630878329277, -0.6472291946411133, 0.05155722796916962, -0.43027764558792114, -0.33673152327537537, -0.2597641050815582, -0.4017221927642822, 0.10697975009679794, 0.0003135684528388083, -0.22545985877513885, 0.19226521253585815, 0.09042810648679733, -0.04586242139339447, 0.15824618935585022, -0.06656263023614883, -0.39130181074142456, 0.04698806256055832, -0.0650380551815033, 0.02074776217341423, -0.47979483008384705, 0.06953029334545135, 0.1714746206998825, -0.2255219966173172, 0.030006179586052895, 0.037717558443546295, -0.30663514137268066, -0.43731629848480225, -0.13676929473876953, 0.2760285437107086, 0.26771479845046997, 0.27727118134498596, 0.2583814263343811, 0.22322334349155426, 0.17235681414604187, 0.15177983045578003, 0.09930963814258575, 0.143917977809906, -0.019358044490218163, 0.10480678826570511, -0.4482201039791107, 0.3862941265106201, -0.18300800025463104, -0.028416499495506287, -0.16699466109275818, -0.3487370014190674, 0.2705667316913605, -0.0806846097111702, 0.09486531466245651, -0.6014314293861389, -0.03673620894551277, 0.33016878366470337, -0.05892515182495117, 0.07945656031370163, 0.09068286418914795, 0.026644933968782425, 0.06129046529531479, -0.04236641898751259, -0.1162155494093895, 0.34067589044570923, -0.06976142525672913, -0.2100413739681244, 0.11707635223865509, 0.49111056327819824, 0.3566940128803253, 0.22141362726688385, -0.0846717432141304, -0.13095766305923462, 0.4406020939350128, 0.004432533867657185, 0.1452680081129074, 0.04067490994930267, 0.08575776219367981, 0.30855312943458557, 0.09131446480751038, -0.011007837951183319, -0.2508098781108856, -0.06625591218471527, 0.10402102768421173, 0.2441476285457611, 0.23360256850719452, -0.2658805549144745, -0.3304501175880432, -0.3818598985671997, 0.48729076981544495, 0.3326804041862488, 0.2534179091453552, -0.0412212610244751, 0.453522264957428, 0.12117142230272293, -0.4766841232776642, 0.12499221414327621, -0.06676558405160904, 0.6247707009315491, -0.10102909058332443, -0.20495934784412384, -0.38212937116622925, -0.21684010326862335, 0.12663868069648743, 0.05643142759799957, 0.3907302916049957, -0.06460057199001312, 0.49733150005340576, 0.11805146932601929, 0.1314409375190735, -0.16481268405914307, -0.004127685446292162, 0.0818762481212616, 0.3110399544239044, -0.05710778757929802, 0.13391871750354767, 0.1453292965888977, -0.06765079498291016, 0.12356492877006531, -0.21366490423679352, -0.3039456605911255, -0.15679778158664703, 0.17793796956539154, 0.06375285238027573, -0.004493191838264465, -0.24458767473697662, -0.1115916296839714, -0.16384346783161163, -0.4349406361579895, 0.26743224263191223, -0.05109637975692749, 0.023928992450237274, 0.10862642526626587, 0.17426583170890808, -0.017503811046481133, -0.0008384821121580899, 0.00912502035498619, -0.07489165663719177, -0.5851699709892273, 0.16503998637199402, -0.21321889758110046, 0.023019082844257355, 0.2357923686504364, 0.037463463842868805, 0.02515820972621441, 0.30564358830451965, -0.4097907245159149, 0.027887729927897453, -0.06115784868597984, 0.1791488528251648, -0.2906416952610016, -0.11866714805364609, 0.20300573110580444, 0.2551262676715851, -0.12128262966871262, 0.03410816565155983, 0.12489461153745651, 0.2755826413631439, 0.3200293183326721, 0.03232717886567116, 0.0342407301068306, 0.2859160006046295, 0.16407793760299683, 0.35127323865890503, -0.1879606693983078, 0.0512157641351223, 0.2993656396865845, 0.3690425753593445, 0.48385778069496155, -0.2564121186733246, 0.2488674372434616, -0.38403069972991943, 0.01999688893556595, -0.04048992320895195, 0.1524166613817215, 0.0407852977514267, -0.14639252424240112, 0.2161569446325302, -0.23632806539535522, -0.08813980966806412, -0.17929664254188538, 0.2731654644012451, -0.28892871737480164, 0.04020806774497032, 0.08009641617536545, -0.26846590638160706, -0.01850343495607376, -0.023389574140310287, 0.15335142612457275, 0.07738319784402847, 0.3878052532672882, -0.09523387998342514, -0.275081068277359, -0.02678973786532879, -0.2655271291732788, 0.3023187220096588, -0.24603134393692017, -0.1332046389579773, -0.04756638780236244, 0.005438391584903002, 0.14726652204990387, 0.24686112999916077, 0.3770071864128113, -0.16159431636333466, 0.0034669849555939436, -0.13444948196411133, 0.049362555146217346, -0.3254891335964203, 0.03855445981025696, -0.011381187476217747, 0.06590545922517776, -0.02481829561293125, 0.3186225891113281, -0.2891428768634796, -0.20058174431324005, -0.13540731370449066, 0.5658418536186218, -0.24586954712867737, -0.0819147527217865, 0.004275834187865257, -0.2207072675228119, -0.4849289357662201, 0.07907695323228836, 0.026117803528904915, -0.11660323292016983, 0.1459045559167862, -0.28630465269088745, -0.1278497874736786, -0.29632773995399475, 0.08318568021059036, 0.09187017381191254, 0.5984148383140564, -0.20507141947746277, 0.1636434644460678, -0.061012499034404755, 0.14004836976528168, 0.6094434857368469, 0.316010445356369, -0.10910677164793015, -0.00883634015917778, 0.03451846167445183, -0.3696352541446686, 0.14171192049980164, 0.11273804306983948, -0.18668203055858612, 0.256352961063385, -0.199717715382576, 0.5040169954299927, 0.00939435139298439, 0.0027099987491965294, -0.24886783957481384, -0.28397253155708313, -0.06844059377908707, -0.22796140611171722, 0.10804977267980576, 0.042394865304231644, -0.1545616090297699, 0.4536227583885193, -0.10007297992706299, -0.23695290088653564, 0.47828271985054016, 0.11140156537294388, 1.049074649810791, -0.07758352160453796, 0.03561677411198616, -0.160967618227005, -0.2834870219230652, 0.32611966133117676, -0.5598512291908264, 0.08430346846580505, 0.0123192323371768, -0.12019189447164536, 0.1132015585899353, -0.034306615591049194, -0.0023789317347109318, 0.2772352397441864, -0.23475007712841034, 0.07955481857061386, -0.3114008903503418, -0.12003470957279205, -0.24714727699756622, 0.4306897521018982, -0.13019822537899017, -0.2882216274738312, -0.07623005658388138, 0.035022277384996414, 0.08731768280267715, -0.1888194978237152, -0.21895121037960052, -0.07814107835292816, 0.3835892677307129, -0.03891577199101448, 0.23994854092597961, -0.08207373321056366, -0.25561395287513733, 0.36344704031944275, -0.19746102392673492, -0.1324067860841751, -0.15016236901283264, 0.0025838064029812813, -0.16743673384189606, 0.048540521413087845, 0.12681762874126434, 0.07211741805076599, 0.07881329208612442, 0.010212302207946777, -0.32295459508895874, 0.01760799251496792, -0.08162356168031693, -0.12787117063999176, 0.005741562694311142, 0.0871286541223526, -0.26657986640930176, -0.37947404384613037, 0.22761479020118713, 0.14662215113639832, -0.15347716212272644, 0.0173724964261055, -0.2547754645347595, -0.12557615339756012, -0.4791091978549957, 0.04894106090068817, 0.12537118792533875, 0.26934441924095154, -0.12796363234519958, 0.28543615341186523, -0.17087948322296143, -0.20496152341365814, -0.22086317837238312, -0.11515636742115021, 0.28706106543540955, -0.10199761390686035, 0.3308943808078766, -0.1526322364807129, -0.1944945901632309, -0.4860873222351074, 0.006277631968259811, 0.08983734995126724, -0.4311339259147644, 0.4288218915462494, 0.008331513032317162, -0.1597495824098587, 0.13438746333122253, -0.07853395491838455, -0.004922186490148306, -0.0023803976364433765, -0.15508398413658142, -0.11795557290315628, -0.4771161675453186, 0.2584300935268402, 0.16686677932739258, 0.5414475202560425, 0.051760222762823105, -0.04771779105067253, -0.15015795826911926, 0.12489797919988632, -0.2867145538330078, 0.20424295961856842, 0.2524321377277374, 0.16709351539611816, -0.05628993734717369, 0.30519258975982666, 0.11983492970466614, -0.3132946789264679, -0.05178537592291832, 0.0629812702536583, -0.1310727447271347, -0.20620884001255035, -0.0797002911567688, 0.08791948109865189, -0.16306568682193756, -0.0899496078491211, -0.17486828565597534, -0.17788098752498627, 0.02886197343468666, -0.21043521165847778, 0.27034899592399597, -0.19277969002723694, -0.1530977189540863, -0.15478673577308655, 0.44222745299339294, -0.09786021709442139, -0.12741267681121826, 0.15008555352687836, -0.04653094708919525, 0.30003461241722107, -0.04469434544444084, 0.062178969383239746, -0.08254965394735336, -0.08361388742923737, -0.22505055367946625, 0.10149384289979935, 0.2650090456008911, 0.07711591571569443, -0.01954903081059456, -0.027510739862918854, -0.12506698071956635, 0.1517772376537323, 0.1358235776424408, 0.2690427601337433, -0.04627812281250954, -0.17909210920333862, -0.039174605160951614, 0.2356310337781906, -0.23411338031291962, -0.13926148414611816, -0.025732552632689476, 0.05467110872268677, -0.17031942307949066, 0.24598252773284912, 0.33859091997146606, 0.06348579376935959, 0.056709323078393936, 0.13113823533058167, 0.2675948739051819, -0.24231374263763428, 0.38431158661842346, 0.363472044467926, 0.07470300048589706, -0.2442731261253357, -0.06529887020587921, 0.31883639097213745, 0.1602812260389328, 0.03785901889204979, -0.10421519726514816, 0.41755247116088867, 0.6066233515739441, 0.30138543248176575, -0.48639029264450073, -0.30894115567207336, -0.2099137157201767, 0.579369068145752, -0.09454897791147232, 0.40085363388061523, 0.44044268131256104, 0.16705216467380524, 0.3227193355560303, -0.35641270875930786, -0.2688572108745575, 0.3678481876850128, 0.056799568235874176, 0.05695078521966934, 0.03248557448387146, -0.11354302614927292, 0.15987080335617065, 0.12404618412256241, 0.10776394605636597, 0.33576008677482605, -0.0621856227517128, 0.28759652376174927, 0.09811634570360184, 0.15082092583179474, 0.5759003758430481, 0.17380107939243317, 0.364143967628479, -0.13658125698566437, -0.15990257263183594, 0.1996973156929016, 0.21289858222007751, 0.08413882553577423, -0.03698508068919182, -0.015506384894251823, 0.15016190707683563, -0.3222709000110626, 0.060453079640865326, 0.06881368905305862, 0.03569522500038147, -0.28240966796875, 0.4310363531112671, 0.2198583036661148, -0.27900609374046326, 0.012440460734069347, 0.10588327050209045, -0.09512770920991898, 0.1621372401714325, 0.0995231419801712, 0.18848277628421783, -0.06826351583003998, -0.20394252240657806, 0.3901363015174866, -0.4440828859806061, 0.06192163750529289, -0.13760115206241608, -0.09181172400712967, -0.049572233110666275, 0.3588738739490509, -0.30270177125930786, 0.0067122215405106544, -0.1420394629240036, 0.09058668464422226, -0.19460946321487427, 0.34902408719062805, 0.1869712918996811, -0.3395479619503021, -0.2126796841621399, -0.3154653310775757, -0.3378933370113373, -0.18929168581962585, -0.2675839960575104, 0.013795077800750732, 0.26983144879341125, 0.2674233019351959, -0.019809259101748466, 0.22800372540950775, 0.2677685022354126, -0.048059895634651184, -0.10250747203826904, 0.025117333978414536, -0.5011221766471863, 0.12118236720561981, 0.32261982560157776, 0.2113984376192093, 0.1301867663860321, -0.4562162160873413, -0.21588267385959625, -0.013515952974557877, 0.0075380015186965466, -0.1407109797000885, 0.21233102679252625, 0.13694699108600616, 0.6466160416603088, 0.6635487675666809, -0.08399108052253723, -0.3119259774684906, -0.07297737896442413, -0.17536838352680206, -0.11988659203052521, -0.14712469279766083, -0.07379595935344696, -0.10963983088731766, 0.431780070066452, 0.29412326216697693, -0.296991765499115, 0.25748127698898315, -0.24065472185611725, -0.2088908553123474, -0.17870557308197021, 0.24331247806549072, -0.25136494636535645, 0.05997390300035477, 0.04696621745824814, 0.4676736295223236, -0.05154714360833168, 0.18821397423744202, 0.07399456948041916, 0.11811289191246033, -0.3579024076461792, -0.06016211211681366, 0.3388689458370209, 0.2894136309623718, -0.3498057723045349, 0.4524713456630707, 0.14525462687015533, 0.09759289026260376, -0.1375298947095871, -0.2947256565093994, 0.2565617263317108, 0.10068820416927338, -0.21679243445396423, -0.025970790535211563, 0.2420884668827057, -0.04881342127919197, -0.028711693361401558, 0.07572213560342789, 0.39282652735710144, 0.3239247798919678, -0.07213826477527618, -0.40511640906333923, -0.2832625210285187 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
Hi ! That's weird, it doesn't do that on my side (tested on master on my laptop by deleting the `extracted` folder in the download cache directory). You tested with one of the files at https://huggingface.co/datasets/thomwolf/github-python that you have locally ?
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
41
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. Hi ! That's weird, it doesn't do that on my side (tested on master on my laptop by deleting the `extracted` folder in the download cache directory). You tested with one of the files at https://huggingface.co/datasets/thomwolf/github-python that you have locally ?
[ -0.03325678035616875, -0.0617312528192997, -0.1518050581216812, 0.2321406900882721, -0.07944172620773315, 0.1899539679288864, -0.1519193798303604, 0.3226889669895172, 0.2679438591003418, 0.185911163687706, -0.00866090040653944, 0.4785899817943573, -0.20648188889026642, 0.01982061192393303, -0.12495564669370651, 0.019380034878849983, -0.261220246553421, 0.26731106638908386, -0.03528274968266487, 0.10239515453577042, -0.1649816632270813, 0.16154780983924866, 0.03071202151477337, -0.21431653201580048, -0.0014290236867964268, -0.280663400888443, 0.17738720774650574, -0.09008321911096573, -0.23682209849357605, -0.41202571988105774, 0.09119473397731781, 0.45860496163368225, 0.22785095870494843, 0.28420862555503845, -0.00011894123599631712, 0.020276391878724098, 0.3218187689781189, 0.0664270669221878, -0.34161096811294556, 0.09655597060918808, -0.10906340181827545, -0.25283411145210266, 0.33651748299598694, -0.23950718343257904, 0.11182370036840439, -0.2765812873840332, -0.2922464907169342, -0.5912129282951355, 0.5315220952033997, -0.09525714814662933, 0.12675832211971283, 0.1466713845729828, -0.3559589385986328, 0.2192574292421341, 0.2747634947299957, 0.2166803628206253, -0.09886466711759567, 0.05372755602002144, 0.3152773380279541, 0.06759928166866302, 0.28494900465011597, 0.3909696340560913, -0.12131698429584503, -0.10548674315214157, 0.3051479756832123, 0.05371451377868652, -0.16517750918865204, -0.44982731342315674, 0.26314234733581543, -0.031178386881947517, 0.5653122067451477, -0.49699124693870544, -0.21954266726970673, -0.39770936965942383, 0.020581096410751343, -0.6025555729866028, 0.07928985357284546, 0.35457366704940796, -0.08755392581224442, 0.2304886132478714, -0.2468707412481308, -0.3859896659851074, -0.30758965015411377, -0.08355250954627991, 0.47637939453125, -0.26208508014678955, -0.1824117749929428, -0.10666372627019882, 0.46774014830589294, 0.1795821189880371, 0.04245283454656601, -0.2289462834596634, -0.25212857127189636, 0.3555212616920471, -0.1274116039276123, -0.22249576449394226, -0.20886467397212982, -0.31370022892951965, 0.2307112216949463, 0.2699064016342163, 0.2709546685218811, 0.01572146639227867, 0.1045326218008995, -0.030552085489034653, 0.37593409419059753, 0.41529378294944763, -0.06111488118767738, 0.129747211933136, 0.3189988434314728, 0.10175906121730804, 0.04948403686285019, -0.07571490854024887, 0.10971630364656448, -0.024488374590873718, 0.3162863552570343, -0.17408905923366547, 0.17497555911540985, -0.15314961969852448, -0.09122399240732193, 0.16153815388679504, 0.13619884848594666, -0.1264772266149521, 0.0433213897049427, 0.2908787727355957, 0.03046608902513981, 0.0870591476559639, 0.06710794568061829, 0.320992648601532, -0.056101202964782715, -0.16051547229290009, 0.07706013321876526, 0.17351631820201874, -0.24922628700733185, -0.26932811737060547, 0.4215799570083618, -0.12490439414978027, 0.08871456980705261, -0.043572548776865005, -0.21626262366771698, -0.04131430760025978, 0.5175763964653015, -0.11957252025604248, 0.3411775231361389, 0.42104145884513855, -0.07458829879760742, -0.1149851530790329, -0.1722792237997055, -0.16577407717704773, -0.17437908053398132, 0.46092528104782104, -0.1498117744922638, -0.23878319561481476, -0.12822212278842926, 0.15674139559268951, -0.0032494268380105495, 0.24528701603412628, -0.6246502995491028, 0.0005455258651636541, 0.15193279087543488, 0.21350665390491486, 0.08486179262399673, 0.22636118531227112, 0.049661461263895035, -0.16972646117210388, -0.15711823105812073, 0.3347276449203491, -0.46681302785873413, -0.033385101705789566, -0.20987026393413544, -0.1474103182554245, 0.18472756445407867, 0.29464390873908997, -0.09122635424137115, 0.24073006212711334, -0.2020546942949295, 0.11876386404037476, 0.3351455628871918, -0.25053301453590393, -0.5275447368621826, 0.22019867599010468, 0.06431692838668823, 0.31036967039108276, 0.26306089758872986, 0.23854392766952515, 0.30522361397743225, 0.0946832224726677, 0.04003158584237099, 0.3342137932777405, 0.04026566818356514, 0.057985637336969376, -0.40342098474502563, -0.2949005961418152, 0.044560566544532776, 0.24695512652397156, -0.0413191057741642, 0.1011846661567688, 0.1281719207763672, -0.1058715209364891, 0.3076837956905365, 0.041146766394376755, 0.13623376190662384, 0.2670236825942993, 0.17707855999469757, -0.26037901639938354, -0.16238367557525635, 0.01835949718952179, -0.4770284593105316, 0.09452193230390549, -0.4080124795436859, -0.26341626048088074, -0.36836111545562744, -0.38692551851272583, 0.004312132019549608, 0.0810936912894249, -0.34231290221214294, 0.06193695217370987, 0.058709654957056046, -0.16310454905033112, 0.3893429636955261, 0.0027061377186328173, -0.3460024893283844, 0.15101593732833862, 0.020283134654164314, 0.10224413126707077, -0.49060410261154175, 0.19226782023906708, 0.18864305317401886, -0.25181740522384644, -0.04091283679008484, -0.01522805169224739, -0.24884262681007385, -0.4605019688606262, -0.15496812760829926, 0.2493540197610855, 0.29993754625320435, 0.12531588971614838, 0.20679812133312225, 0.2235669046640396, 0.167023167014122, 0.21811416745185852, 0.17721715569496155, 0.22225435078144073, 0.061759743839502335, 0.10059887170791626, -0.27818846702575684, 0.4478912055492401, -0.18853715062141418, -0.029126785695552826, -0.148832768201828, -0.37662065029144287, 0.3021799623966217, -0.07558269798755646, -0.05410728603601456, -0.4702613353729248, -0.030245982110500336, 0.3676837980747223, -0.0016348689096048474, -0.02021927200257778, -0.02539166435599327, -0.04728195443749428, 0.15453852713108063, -0.049939680844545364, -0.12531305849552155, 0.40555399656295776, -0.1499512940645218, -0.19621562957763672, -0.014080103486776352, 0.4155004024505615, 0.46062523126602173, 0.15917478501796722, -0.06780657917261124, -0.017317159101366997, 0.3735675513744354, 0.015571334399282932, 0.19843432307243347, 0.07100799679756165, -0.04625827446579933, 0.3129604756832123, 0.20864634215831757, -0.03255629912018776, -0.25692814588546753, 0.020821422338485718, -0.03008361905813217, 0.2917766273021698, 0.18798115849494934, -0.09842075407505035, -0.3195224404335022, -0.37653085589408875, 0.4093851149082184, 0.1857546865940094, 0.18454597890377045, -0.11933234333992004, 0.39865919947624207, 0.18073827028274536, -0.36741989850997925, 0.0814918726682663, 0.03442222252488136, 0.3880399465560913, -0.001693991245701909, -0.31067487597465515, -0.2539879083633423, -0.14662912487983704, 0.1887052208185196, -0.001991686411201954, 0.2663027346134186, -0.16141915321350098, 0.5131771564483643, -0.02225426957011223, -0.0057921819388866425, -0.17050495743751526, 0.020988918840885162, 0.0856400579214096, 0.24870960414409637, 0.06926609575748444, 0.11285604536533356, 0.24188797175884247, 0.019284959882497787, 0.16073694825172424, -0.09564759582281113, -0.2883740961551666, -0.13499042391777039, 0.19015328586101532, 0.13943253457546234, 0.025919966399669647, -0.2716073989868164, -0.10412482172250748, -0.27244046330451965, -0.44222235679626465, 0.3500594198703766, 0.15262021124362946, 0.09991206973791122, 0.17439723014831543, 0.2171635776758194, -0.02556195855140686, 0.1482316106557846, 0.08026596903800964, -0.12247976660728455, -0.6555260419845581, 0.22020290791988373, -0.23324666917324066, -0.04623968526721001, 0.31758275628089905, 0.038754671812057495, 0.0010777945863083005, 0.2596196234226227, -0.41038110852241516, -0.15558086335659027, -0.19320163130760193, 0.24532178044319153, -0.1802002638578415, 0.13677263259887695, 0.17678339779376984, 0.144815593957901, -0.07559166103601456, 0.03924454376101494, 0.046077750623226166, 0.10476284474134445, 0.3434067964553833, -0.00445745000615716, 0.10572566837072372, 0.320535808801651, 0.11073679476976395, 0.4776507019996643, -0.048631150275468826, 0.088338203728199, 0.407129168510437, 0.2520942986011505, 0.49202761054039, -0.3374050259590149, 0.12588302791118622, -0.4846442937850952, -0.09348602592945099, -0.08548834919929504, 0.130048468708992, 0.15596479177474976, -0.1521032750606537, 0.1395101547241211, -0.25210481882095337, -0.16738514602184296, -0.19344864785671234, 0.26682794094085693, -0.23442551493644714, -0.025991497561335564, 0.0939275398850441, -0.16950064897537231, -0.08371803909540176, -0.0794798880815506, 0.02418346516788006, 0.13828535377979279, 0.28045856952667236, -0.06284839659929276, -0.17513610422611237, -0.13190585374832153, -0.447925865650177, 0.31598812341690063, -0.2335045039653778, -0.2515757381916046, 0.1123897060751915, -0.01936366967856884, 0.2216552495956421, 0.1352764517068863, 0.4183785319328308, -0.14904922246932983, -0.09666338562965393, -0.075592041015625, -0.11375470459461212, -0.31812766194343567, 0.002689774613827467, -0.0213219802826643, 0.18507888913154602, 0.06184039264917374, 0.2871909737586975, -0.2788703143596649, -0.25357234477996826, -0.10043839365243912, 0.6766917705535889, -0.25565022230148315, -0.0628540962934494, -0.23580758273601532, -0.40805140137672424, -0.6040321588516235, 0.09706327319145203, 0.16389507055282593, -0.10489081591367722, 0.0750681683421135, -0.25104936957359314, -0.06948180496692657, -0.3054729998111725, 0.027176057919859886, 0.06159820780158043, 0.6772763729095459, -0.26999279856681824, 0.1834554523229599, -0.1231343224644661, 0.09921599924564362, 0.4116416275501251, 0.4825194478034973, -0.06741068512201309, -0.036738522350788116, -0.019238732755184174, -0.22858384251594543, 0.08782698959112167, 0.1801988184452057, -0.12166490405797958, 0.20070993900299072, -0.31594616174697876, 0.6137959361076355, -0.02556013874709606, -0.02783443219959736, -0.07387331873178482, -0.24621017277240753, -0.1315937489271164, -0.3758295476436615, 0.12421634048223495, 0.012427066452801228, -0.08102171123027802, 0.47366419434547424, -0.15424780547618866, -0.22749195992946625, 0.46165066957473755, -0.07324398308992386, 1.1378889083862305, -0.057313308119773865, 0.1218128576874733, -0.051742423325777054, -0.31844958662986755, 0.33690616488456726, -0.6598300933837891, 0.15848886966705322, -0.1112314909696579, -0.0681794211268425, 0.1269742101430893, -0.05537043511867523, -0.024061189964413643, 0.1334134042263031, -0.24228017032146454, 0.21287661790847778, -0.40904754400253296, -0.21524284780025482, -0.32385626435279846, 0.42935341596603394, -0.10488447546958923, -0.2767992317676544, -0.2988872230052948, 0.04711597040295601, 0.12152386456727982, 0.042870692908763885, -0.17238940298557281, -0.07762303203344345, 0.3175716698169708, -0.14178228378295898, 0.11994430422782898, -0.06929771602153778, -0.13890860974788666, 0.37158483266830444, -0.1808600276708603, -0.15897706151008606, -0.3154516816139221, 0.025391103699803352, -0.04091300442814827, 0.10761875659227371, 0.13791590929031372, -0.0042089479975402355, -0.019212109968066216, 0.020740417763590813, -0.33001700043678284, 0.006679590325802565, -0.062432460486888885, -0.14764271676540375, -0.037536296993494034, 0.158697247505188, -0.3073330223560333, -0.40901127457618713, 0.24643513560295105, 0.2679155766963959, -0.20212623476982117, -0.04825187101960182, -0.26961326599121094, -0.12425367534160614, -0.39612099528312683, 0.028508108109235764, 0.11120925098657608, 0.39537811279296875, -0.2896130084991455, 0.4057910740375519, -0.2678992748260498, -0.3382914662361145, -0.2832978069782257, -0.09366602450609207, 0.3441708981990814, -0.01863025687634945, 0.3068980574607849, -0.13570097088813782, -0.2476721554994583, -0.4111402630805969, -0.026592805981636047, -0.02542092837393284, -0.361484169960022, 0.5023361444473267, 0.07104366272687912, -0.05419996753334999, 0.035751890391111374, -0.04586087539792061, -0.07853575050830841, -0.0049887183122336864, -0.1925138235092163, -0.09155122935771942, -0.4491463303565979, 0.11110714077949524, 0.2908153235912323, 0.5239835381507874, 0.12693268060684204, 0.06260602921247482, -0.05238751322031021, 0.12280066311359406, -0.26100069284439087, 0.24964405596256256, 0.12280061841011047, 0.10145702213048935, -0.003810281166806817, 0.23377017676830292, 0.12164976447820663, -0.3009348213672638, -0.06060222536325455, 0.07559388130903244, -0.1573365330696106, -0.206339031457901, -0.09897118806838989, 0.1312091052532196, -0.144900381565094, -0.1276474893093109, -0.07396098226308823, -0.13663208484649658, 0.13127553462982178, -0.25270843505859375, 0.41089558601379395, -0.07778038829565048, -0.06810551881790161, -0.11617568880319595, 0.42911604046821594, -0.13653720915317535, -0.024872057139873505, 0.10991717129945755, -0.19124670326709747, 0.4337046444416046, 0.03220506012439728, -0.007711958140134811, -0.030895056203007698, -0.04355708509683609, -0.32072076201438904, -0.004677698947489262, 0.2004585713148117, 0.06980585306882858, 0.06874766200780869, -0.16169467568397522, -0.08159077912569046, 0.13989955186843872, 0.20403069257736206, 0.38968217372894287, -0.13757993280887604, -0.11160894483327866, 0.003681484144181013, 0.2207108438014984, -0.24801982939243317, -0.2681472897529602, 0.025924598798155785, 0.002277681604027748, -0.15715806186199188, 0.34770622849464417, 0.33851268887519836, 0.15678824484348297, 0.1067684218287468, 0.17926400899887085, 0.42436981201171875, -0.24841462075710297, 0.36612632870674133, 0.15656223893165588, 0.07318981736898422, -0.1989876627922058, -0.08611809462308884, 0.24347932636737823, 0.15557967126369476, -0.002066349843516946, -0.14343896508216858, 0.30632728338241577, 0.5199889540672302, 0.20461055636405945, -0.5770915746688843, -0.22838228940963745, -0.2111487239599228, 0.46674132347106934, -0.23423612117767334, 0.473568320274353, 0.43367448449134827, 0.14276239275932312, 0.12221086770296097, -0.275247186422348, -0.2910155951976776, 0.5431442856788635, 0.015019971877336502, -0.029163168743252754, 0.1798153668642044, -0.09651195257902145, 0.12398050725460052, 0.22515077888965607, 0.12460516393184662, 0.2634054720401764, -0.027209071442484856, 0.22852690517902374, 0.003736188868060708, 0.09112202376127243, 0.5725486874580383, 0.05084213986992836, 0.4281856119632721, -0.2018011510372162, -0.15888351202011108, 0.20874640345573425, 0.17495478689670563, -0.11982367932796478, -0.030880851671099663, 0.1743924915790558, 0.21221193671226501, -0.34904080629348755, 0.058714184910058975, 0.04263882711529732, -0.004761205054819584, -0.2958355247974396, 0.3895012140274048, 0.15211328864097595, -0.1610448807477951, -0.07685556262731552, 0.11173718422651291, -0.11847377568483353, 0.17021697759628296, 0.08844947814941406, 0.19124414026737213, -0.22710226476192474, -0.06561002880334854, 0.28605756163597107, -0.4047800600528717, -0.009062075987458229, -0.24572831392288208, -0.2952021360397339, -0.006770821753889322, 0.26617076992988586, -0.22242742776870728, 0.035519130527973175, -0.16564615070819855, 0.08896246552467346, -0.19935820996761322, 0.3422856628894806, 0.23505476117134094, -0.27209246158599854, -0.3159383237361908, -0.20595353841781616, -0.3135772943496704, -0.19191904366016388, -0.3323298692703247, -0.11632384359836578, 0.18170560896396637, 0.3304497003555298, -0.10603801161050797, 0.2373960316181183, 0.18711146712303162, -0.0952252745628357, -0.11681796610355377, 0.0020117545500397682, -0.46048739552497864, 0.13782672584056854, 0.17884616553783417, 0.2282203733921051, 0.208156555891037, -0.5176973342895508, -0.2647792100906372, -0.15276332199573517, 0.0007777615683153272, -0.13586921989917755, 0.30298107862472534, 0.1575912982225418, 0.5477011203765869, 0.6887500286102295, 0.0014798060292378068, -0.2566513121128082, -0.08706866204738617, -0.24218812584877014, -0.07385066896677017, -0.12916064262390137, -0.12208792567253113, -0.1594550460577011, 0.3465604782104492, 0.31438276171684265, -0.32936733961105347, 0.08468208461999893, -0.253224641084671, -0.0861109271645546, -0.06821775436401367, 0.14552292227745056, -0.08918196707963943, -0.01631813310086727, 0.07654808461666107, 0.4157758355140686, -0.07014620304107666, 0.32452237606048584, -0.021070342510938644, 0.1589498668909073, -0.34482070803642273, -0.118707574903965, 0.32934480905532837, 0.21860171854496002, -0.4817660450935364, 0.4003865420818329, 0.13537444174289703, 0.06570777297019958, -0.15056738257408142, -0.3618246018886566, 0.31321007013320923, 0.13255292177200317, -0.20167529582977295, -0.13047686219215393, 0.32267463207244873, -0.08665943145751953, -0.07669010758399963, 0.10986237972974777, 0.3308889865875244, 0.312446266412735, -0.07593352347612381, -0.3197581171989441, -0.26327890157699585 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
@thomwolf I'm sorry but I can't reproduce this problem. I'm also using: ```python ds = load_dataset("json", split="train", data_files=data_files, cache_dir=cache_dir) ``` after having removed the extracted files: ```python assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == [] ``` I get the logging message: ```shell WARNING datasets.builder:builder.py:531 Reusing dataset json ... ```
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
49
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. @thomwolf I'm sorry but I can't reproduce this problem. I'm also using: ```python ds = load_dataset("json", split="train", data_files=data_files, cache_dir=cache_dir) ``` after having removed the extracted files: ```python assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == [] ``` I get the logging message: ```shell WARNING datasets.builder:builder.py:531 Reusing dataset json ... ```
[ 0.038739703595638275, 0.0011508585885167122, -0.07317280769348145, 0.28882575035095215, -0.022597581148147583, 0.24423477053642273, 0.0043714321218431, 0.22520151734352112, 0.21111585199832916, 0.11122642457485199, 0.13000966608524323, 0.4447043836116791, -0.3149457275867462, -0.1522340625524521, -0.18791738152503967, 0.06854549050331116, -0.18226362764835358, 0.23035532236099243, 0.11799031496047974, 0.15388447046279907, -0.14851689338684082, 0.01671292446553707, 0.028160620480775833, -0.12772567570209503, -0.08119925856590271, -0.3685382604598999, 0.1793389916419983, -0.20019932091236115, -0.07094040513038635, -0.4755670130252838, 0.19351725280284882, 0.48728811740875244, 0.26346200704574585, 0.2937748432159424, -0.00012703206448350102, 0.140231192111969, 0.282435804605484, 0.17063985764980316, -0.4946141839027405, 0.07347129285335541, -0.21854829788208008, -0.13172340393066406, 0.27834299206733704, -0.12790869176387787, 0.23895694315433502, -0.5058014988899231, -0.287432461977005, -0.7039570808410645, 0.6001022458076477, -0.14448188245296478, 0.02261274866759777, 0.08817896246910095, -0.47526392340660095, 0.23534129559993744, 0.1795053333044052, 0.34325000643730164, 0.003217254998162389, -0.014561939053237438, 0.3974132239818573, 0.04100519418716431, 0.25307613611221313, 0.33234697580337524, -0.1500110775232315, -0.2315426468849182, 0.28203845024108887, -0.04123854637145996, -0.03080679476261139, -0.30380937457084656, 0.1847779005765915, -0.0036729066632688046, 0.6249611377716064, -0.39469245076179504, -0.2556181252002716, -0.5423306226730347, 0.06265450268983841, -0.6009433269500732, 0.02326084114611149, 0.27974870800971985, -0.08250287920236588, 0.2129976600408554, -0.18871286511421204, -0.38327568769454956, -0.32732173800468445, -0.1123422309756279, 0.5984612107276917, -0.3998061418533325, -0.03723890334367752, -0.04580676555633545, 0.4938414990901947, 0.14615067839622498, 0.23537258803844452, -0.31429213285446167, -0.21718962490558624, 0.3846139907836914, -0.18738870322704315, -0.09364338964223862, -0.22391989827156067, -0.2821354866027832, 0.14149297773838043, 0.15897788107395172, 0.2970096468925476, -0.1674042046070099, 0.11852956563234329, 0.0908483937382698, 0.3935778737068176, 0.45970484614372253, -0.04816799610853195, 0.112855464220047, 0.100851871073246, 0.16190867125988007, 0.048287004232406616, -0.09799230843782425, 0.1011854037642479, -0.06178389862179756, 0.42505553364753723, -0.03219973295927048, 0.041653797030448914, -0.10718822479248047, -0.26106610894203186, 0.09687711298465729, -0.007823141291737556, -0.20519955456256866, 0.166612908244133, 0.18667402863502502, 0.1723243147134781, 0.019371947273612022, 0.06729061156511307, 0.4301666021347046, -0.05773100256919861, -0.2265525609254837, 0.10329607874155045, 0.10110333561897278, -0.3205890357494354, -0.36789995431900024, 0.4237630069255829, -0.12987098097801208, -0.02597195655107498, -0.004820419009774923, -0.25508174300193787, -0.0653328225016594, 0.4840129017829895, -0.09291893988847733, 0.25380969047546387, 0.3099851608276367, -0.2183120995759964, -0.08803397417068481, -0.21226534247398376, -0.16537843644618988, -0.1422928422689438, 0.5295100212097168, -0.18499599397182465, -0.3411288261413574, -0.08569476008415222, 0.05997924879193306, -0.066001757979393, 0.2800513803958893, -0.5685245394706726, 0.06119999662041664, 0.1911429613828659, 0.06874527037143707, -0.04182734712958336, 0.21400612592697144, -0.037509024143218994, -0.08871499449014664, -0.2247154712677002, 0.4024040699005127, -0.625430166721344, -0.13332878053188324, -0.3174978494644165, -0.14520105719566345, 0.20104609429836273, 0.24209359288215637, -0.17494429647922516, 0.3494220972061157, -0.31563591957092285, 0.009658518247306347, 0.4006727635860443, -0.2328711301088333, -0.4543677270412445, 0.17654170095920563, 0.11901242285966873, 0.4207157492637634, 0.3524938225746155, 0.2543875575065613, 0.2594759166240692, -0.03225388377904892, -0.002492823638021946, 0.33502089977264404, 0.07736728340387344, -0.07384940981864929, -0.2808282673358917, -0.3792129158973694, 0.22563567757606506, 0.19167526066303253, -0.0921851396560669, 0.11055190116167068, 0.16780906915664673, -0.0024407668970525265, 0.26096823811531067, 0.11505113542079926, 0.11328461021184921, 0.19407184422016144, 0.11540865153074265, -0.2010035216808319, -0.1774224489927292, 0.13137903809547424, -0.5052553415298462, 0.09868557006120682, -0.4657924175262451, -0.33217698335647583, -0.37567076086997986, -0.28495025634765625, 0.038604505360126495, 0.11749280989170074, -0.3890927731990814, 0.12905530631542206, -0.022017382085323334, -0.12795232236385345, 0.3280845582485199, 0.055946964770555496, -0.35931357741355896, 0.15207208693027496, -0.09837936609983444, 0.07802250236272812, -0.5450097322463989, 0.20503561198711395, 0.18430252373218536, -0.24730798602104187, -0.12907123565673828, 0.1400124728679657, -0.23060783743858337, -0.36273422837257385, -0.16539928317070007, 0.20361639559268951, 0.33911290764808655, 0.21509838104248047, 0.15600386261940002, 0.24213539063930511, 0.230407252907753, 0.20096009969711304, 0.04697372391819954, 0.1948217749595642, 0.011586691252887249, 0.046387698501348495, -0.2821245491504669, 0.3812068700790405, -0.22195035219192505, 0.053480807691812515, -0.17758217453956604, -0.4575612246990204, 0.25355538725852966, -0.057093653827905655, 0.07907900214195251, -0.47995686531066895, 0.10833457857370377, 0.35521385073661804, -0.05362487956881523, 0.024503711611032486, 0.11226148903369904, -0.16337749361991882, 0.0036086912732571363, -0.09471254795789719, -0.1975780576467514, 0.28924304246902466, -0.12100966274738312, -0.17924083769321442, 0.05397084355354309, 0.4722077548503876, 0.38724613189697266, 0.07281213998794556, -0.06920731067657471, -0.1037086695432663, 0.4217987358570099, 0.07832690328359604, 0.1705799549818039, 0.056321438401937485, -0.03791382163763046, 0.3702068328857422, 0.25991517305374146, -0.09258521348237991, -0.23543916642665863, 0.014322455041110516, 0.10432586818933487, 0.2683176100254059, 0.12892188131809235, -0.03347434476017952, -0.3978506028652191, -0.3873174786567688, 0.336569219827652, 0.19679966568946838, 0.19247959554195404, -0.146978497505188, 0.3643902540206909, 0.1799004226922989, -0.20706385374069214, 0.030583715066313744, -0.04499952122569084, 0.4603665769100189, 0.007302742917090654, -0.3709699511528015, -0.34440332651138306, -0.16320838034152985, 0.1228644996881485, -0.08310598134994507, 0.4022926092147827, -0.28095200657844543, 0.44407954812049866, 0.12756378948688507, -0.003878363175317645, -0.054243262857198715, -0.01771000400185585, 0.037647608667612076, 0.38792338967323303, 0.18766896426677704, 0.10017810016870499, 0.15313048660755157, 0.03798767551779747, 0.09637919813394547, -0.09912426769733429, -0.14493486285209656, -0.1022409200668335, 0.32337453961372375, 0.06612250208854675, 0.18513189256191254, -0.17125815153121948, 0.0005538494442589581, -0.27579280734062195, -0.28989943861961365, 0.20133833587169647, 0.03196076676249504, -0.016234705224633217, 0.2689192593097687, 0.2810167670249939, -0.09652313590049744, 0.08417496830224991, 0.14889340102672577, -0.025183608755469322, -0.7104851007461548, 0.16074544191360474, -0.07690130919218063, 0.1364145129919052, 0.18906570971012115, -0.06975320726633072, -0.029377227649092674, 0.3408842086791992, -0.4336385130882263, -0.012082614004611969, 0.06604539602994919, 0.16275939345359802, -0.2804272174835205, 0.01919930800795555, 0.09588680416345596, 0.27543407678604126, 0.037888675928115845, 0.020179251208901405, 0.09850849211215973, 0.14473271369934082, 0.3198249340057373, 0.17311464250087738, 0.12626765668392181, 0.2603628933429718, 0.2043638676404953, 0.43218865990638733, -0.0622243694961071, 0.01960187405347824, 0.38818973302841187, 0.31632566452026367, 0.43872934579849243, -0.24701373279094696, 0.09891921281814575, -0.4738687574863434, 0.005000083241611719, -0.21820475161075592, -0.003710700199007988, 0.1213676780462265, -0.04964723810553551, 0.17356938123703003, -0.10634016990661621, -0.1391187608242035, -0.14047417044639587, 0.21180477738380432, -0.36621546745300293, 0.10254291445016861, 0.050067104399204254, -0.2705192267894745, -0.1174217015504837, -0.16752725839614868, 0.039107900112867355, 0.16579920053482056, 0.5044098496437073, -0.0209650918841362, -0.19519731402397156, -0.1079094186425209, -0.22365278005599976, 0.26889246702194214, -0.1963934451341629, -0.12398676574230194, 0.02568543516099453, 0.09046467393636703, 0.21922700107097626, 0.22385919094085693, 0.4910553991794586, -0.10353359580039978, 0.03907229006290436, -0.0954006016254425, -0.001442986773326993, -0.2994736433029175, -0.039861615747213364, 0.05027983710169792, 0.09249259531497955, -0.02874523028731346, 0.40036723017692566, -0.2519613802433014, -0.1651291400194168, -0.22570881247520447, 0.690610945224762, -0.26012441515922546, -0.18842901289463043, -0.14953958988189697, -0.26303672790527344, -0.5465506911277771, -0.020044542849063873, -0.0080207958817482, -0.023606497794389725, 0.08120367676019669, -0.28320983052253723, -0.12703092396259308, -0.2804134488105774, 0.1166422963142395, -0.056404806673526764, 0.5973095893859863, -0.29328641295433044, 0.17258912324905396, -0.07032985985279083, 0.08520451933145523, 0.5068808794021606, 0.31773310899734497, -0.09236910194158554, -0.08275429159402847, -0.16806282103061676, -0.19830690324306488, 0.10998782515525818, 0.09359819442033768, -0.3003251552581787, 0.31807148456573486, -0.24987947940826416, 0.4409911334514618, -0.031517885625362396, 0.00972096435725689, 0.027195703238248825, -0.27298030257225037, -0.11541528254747391, -0.39698171615600586, 0.09795980155467987, 0.0724429041147232, -0.14415886998176575, 0.4777911603450775, -0.2132846713066101, -0.2477707415819168, 0.4918859601020813, -0.14855550229549408, 1.0456448793411255, -0.13452179729938507, -0.0002492689236532897, -0.057819437235593796, -0.22546900808811188, 0.42288288474082947, -0.6274013519287109, 0.19909462332725525, -0.04310007765889168, -0.04087941348552704, 0.10037627816200256, -0.12001071125268936, 0.023039232939481735, 0.31523147225379944, -0.05275261402130127, 0.2467501014471054, -0.48427167534828186, -0.1601075828075409, -0.3023616075515747, 0.3316246271133423, -0.05529984086751938, -0.13080716133117676, -0.19818362593650818, -0.05600866675376892, 0.017417646944522858, -0.020617302507162094, -0.20031705498695374, -0.05259699374437332, 0.46075311303138733, -0.05187201499938965, 0.21361494064331055, -0.12443632632493973, -0.24202466011047363, 0.4143178164958954, -0.1312369853258133, -0.2538132667541504, -0.18919849395751953, 0.13056103885173798, -0.22440378367900848, 0.018958840519189835, 0.27499833703041077, -0.0032371687702834606, 0.03137597814202309, -0.0009669627179391682, -0.3601750135421753, 0.10519884526729584, 0.0176961962133646, -0.03053945116698742, -0.024301769211888313, 0.15010260045528412, -0.31834110617637634, -0.44394874572753906, 0.14132313430309296, 0.15888644754886627, -0.1130429208278656, -0.046068016439676285, -0.29409539699554443, -0.09105789661407471, -0.3285748064517975, 0.09377183020114899, 0.03755630552768707, 0.3554033637046814, -0.22884300351142883, 0.2944490909576416, -0.4424228072166443, -0.1805371195077896, -0.1387426257133484, -0.1259230673313141, 0.27815550565719604, -0.1078391745686531, 0.4058580994606018, -0.19610357284545898, -0.16975009441375732, -0.31144458055496216, -0.10946479439735413, -0.0591653510928154, -0.3523539900779724, 0.49597129225730896, 0.1541586071252823, 0.019113924354314804, 0.030614174902439117, -0.1891186684370041, -0.1128220185637474, -0.0036655899602919817, -0.08838950097560883, -0.23307713866233826, -0.51262366771698, 0.133355975151062, 0.2334328591823578, 0.5337321162223816, 0.09821869432926178, 0.0723920613527298, -0.20635421574115753, 0.040302824229002, -0.14661456644535065, 0.27191704511642456, 0.2714770436286926, 0.17609871923923492, -0.005753235425800085, 0.25768357515335083, 0.12072748690843582, -0.27558252215385437, -0.1310795396566391, -0.01624945178627968, -0.10072015970945358, -0.11332551389932632, -0.1385001242160797, 0.13801053166389465, -0.08580715209245682, -0.08219480514526367, -0.17087271809577942, -0.3416001796722412, 0.19510574638843536, -0.20876751840114594, 0.3060407340526581, -0.07745501399040222, -0.09229832887649536, -0.0460982471704483, 0.3641612231731415, -0.10116574913263321, -0.03181180730462074, 0.12958702445030212, -0.07773678749799728, 0.35818836092948914, 0.09357118606567383, 0.018443385139107704, -0.024768071249127388, 0.02163207344710827, -0.5045360922813416, -0.01540774293243885, 0.218485489487648, 0.06541129946708679, 0.11453375965356827, -0.1634778529405594, -0.05167781934142113, 0.054404597729444504, 0.16292601823806763, 0.24672368168830872, -0.15288256108760834, -0.013364286161959171, -0.10647790133953094, 0.10300958156585693, -0.1887696385383606, -0.26447054743766785, 0.057401642203330994, 0.12217047810554504, -0.25386810302734375, 0.3539160490036011, 0.38324642181396484, 0.0591590479016304, 0.04596145451068878, 0.04153818264603615, 0.39360877871513367, -0.21633166074752808, 0.4034714996814728, 0.4159603416919708, 0.07310483604669571, -0.21103353798389435, -0.15883775055408478, 0.3227527439594269, 0.12933456897735596, -0.011438973248004913, -0.12805551290512085, 0.39225560426712036, 0.5880977511405945, 0.1931767463684082, -0.6003847718238831, -0.35929837822914124, -0.2539200186729431, 0.6064804792404175, -0.048820193856954575, 0.4539385139942169, 0.3565713167190552, 0.27205222845077515, 0.2334132045507431, -0.15201252698898315, -0.12469936162233353, 0.49895432591438293, 0.07639145106077194, -0.06073201820254326, 0.18664591014385223, -0.13066606223583221, 0.1558775156736374, 0.13195383548736572, 0.09249123930931091, 0.28267648816108704, -0.27766451239585876, 0.23492136597633362, -0.02092593163251877, 0.1108350083231926, 0.47641074657440186, 0.1959996074438095, 0.41553235054016113, -0.19943185150623322, -0.17052790522575378, 0.24433466792106628, 0.283907413482666, 0.025532405823469162, -0.09548510611057281, 0.14150860905647278, 0.11388705670833588, -0.3440547287464142, -0.01156394463032484, 0.03954176977276802, 0.09089084714651108, -0.1983005255460739, 0.4838027060031891, 0.05263117328286171, -0.18773503601551056, -0.08844642341136932, -0.020557718351483345, -0.042602866888046265, 0.13732630014419556, 0.20744012296199799, 0.29930803179740906, -0.27622634172439575, -0.055126335471868515, 0.26716792583465576, -0.39561328291893005, -0.013017621822655201, -0.09151848405599594, -0.12840479612350464, 0.0006956980796530843, 0.46480706334114075, -0.18815211951732635, 0.03861594200134277, -0.11769820004701614, 0.03316221758723259, -0.27902284264564514, 0.1828393042087555, 0.24306955933570862, -0.32570773363113403, -0.3032856583595276, -0.17758196592330933, -0.36108601093292236, -0.22810667753219604, -0.332194983959198, 0.0023377479519695044, 0.22570236027240753, 0.19085142016410828, -0.08666451275348663, 0.13386936485767365, 0.16630029678344727, -0.02775164321064949, -0.038105327636003494, 0.048981040716171265, -0.37456589937210083, -0.014257397502660751, 0.21512116491794586, 0.18909898400306702, 0.07797525823116302, -0.4346441328525543, -0.3108427822589874, -0.10405281186103821, -0.07542524486780167, -0.08235446363687515, 0.27466732263565063, 0.14712880551815033, 0.7400564551353455, 0.6187959909439087, -0.03638405725359917, -0.21408899128437042, 0.09637651592493057, -0.20816943049430847, -0.040176477283239365, -0.16464053094387054, -0.01681383326649666, -0.15967711806297302, 0.26930370926856995, 0.26988956332206726, -0.4261139929294586, 0.26456180214881897, -0.33128800988197327, -0.28569144010543823, -0.11480934917926788, 0.023192891851067543, -0.2574586570262909, -0.021233102306723595, -0.029740745201706886, 0.5283958911895752, 0.009937229566276073, 0.3121960461139679, 0.04792322590947151, 0.2261248677968979, -0.316837340593338, -0.0664725974202156, 0.33426064252853394, 0.17148785293102264, -0.38070645928382874, 0.5087204575538635, 0.07804739475250244, 0.05069436877965927, -0.05180438980460167, -0.3348768353462219, 0.3184890151023865, 0.22059454023838043, -0.3912207782268524, 0.004319836851209402, 0.22576485574245453, -0.05564824119210243, -0.0024561171885579824, 0.1746978461742401, 0.23275606334209442, 0.43569764494895935, 0.06150539219379425, -0.26196855306625366, -0.17453671991825104 ]
https://github.com/huggingface/datasets/issues/2604
Add option to delete temporary files (e.g. extracted files) when loading dataset
> > > Do you confirm the extracted folder stays empty after reloading? Yes, I have the above mentioned assertion on the emptiness of the extracted folder: ```python assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == [] ```
I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution.
37
Add option to delete temporary files (e.g. extracted files) when loading dataset I'm loading a dataset constituted of 44 GB of compressed JSON files. When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter. I can maybe tackle this one in the JSON script unless you want a more general solution. > > > Do you confirm the extracted folder stays empty after reloading? Yes, I have the above mentioned assertion on the emptiness of the extracted folder: ```python assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == [] ```
[ 0.04130737483501434, -0.04853765666484833, -0.1449722796678543, 0.22482965886592865, -0.04660547152161598, 0.20178936421871185, -0.16908562183380127, 0.3027114272117615, 0.22450824081897736, 0.13429401814937592, 0.010950164869427681, 0.4801865220069885, -0.26869168877601624, -0.12304327636957169, -0.18242350220680237, -0.00938391499221325, -0.234908789396286, 0.27678748965263367, -0.003962704911828041, 0.12066353857517242, -0.1744755357503891, 0.09212029725313187, 0.03784611448645592, -0.19656962156295776, 0.05250697210431099, -0.40806275606155396, 0.12740452587604523, -0.08393961936235428, -0.13565248250961304, -0.4438680112361908, 0.04382007196545601, 0.4613906741142273, 0.26513537764549255, 0.27561497688293457, -0.00011828108836198226, -0.005250615067780018, 0.3214159607887268, 0.04489754140377045, -0.44852158427238464, 0.07876113057136536, -0.13910925388336182, -0.16890369355678558, 0.26235231757164, -0.19874970614910126, 0.22335122525691986, -0.3563093841075897, -0.2938637137413025, -0.6617414355278015, 0.5167129039764404, -0.16085617244243622, 0.1268811672925949, 0.06837094575166702, -0.47382569313049316, 0.19338837265968323, 0.2738461196422577, 0.2409304827451706, -0.09168089926242828, 0.0385858453810215, 0.39279526472091675, 0.004566798452287912, 0.26329293847084045, 0.3668137788772583, -0.10023640841245651, -0.2114974558353424, 0.35578516125679016, 0.02187710627913475, -0.14610010385513306, -0.32141637802124023, 0.24983523786067963, -0.028761759400367737, 0.6228611469268799, -0.39443209767341614, -0.22752413153648376, -0.3693217933177948, 0.06139951944351196, -0.6855834722518921, 0.07141225785017014, 0.2646583318710327, -0.025691943243145943, 0.238250732421875, -0.08053067326545715, -0.3740074634552002, -0.3292851150035858, -0.14201423525810242, 0.5611357092857361, -0.33493155241012573, -0.06793801486492157, -0.15238575637340546, 0.43475067615509033, 0.14553160965442657, 0.20152020454406738, -0.24693575501441956, -0.2134845107793808, 0.4398033022880554, -0.11565986275672913, -0.16844022274017334, -0.2826519310474396, -0.25508224964141846, 0.15414342284202576, 0.23844850063323975, 0.38733971118927, -0.03185529634356499, 0.16810977458953857, 0.012285969220101833, 0.3026498258113861, 0.47012630105018616, 0.003545495681464672, 0.009140055626630783, 0.18236905336380005, 0.092332623898983, 0.07843238115310669, -0.05934077128767967, -0.00716733792796731, 0.00376849970780313, 0.35647448897361755, -0.005452548153698444, -0.0003948582452721894, -0.10364378988742828, -0.06632228195667267, 0.1109706237912178, 0.146550253033638, -0.17648883163928986, 0.05811518803238869, 0.25504156947135925, 0.11152324080467224, 0.0797707587480545, 0.11754514276981354, 0.31809496879577637, -0.006252656225115061, -0.16972975432872772, 0.09014105051755905, 0.1622939109802246, -0.2889665961265564, -0.31539759039878845, 0.45411133766174316, -0.08124595880508423, 0.01667638309299946, -0.12122397124767303, -0.2307782918214798, 0.024776166304945946, 0.5310214161872864, -0.12268809974193573, 0.28558167815208435, 0.36194664239883423, -0.14617842435836792, -0.1604759246110916, -0.19236186146736145, -0.08462273329496384, -0.1570645272731781, 0.49407410621643066, -0.11577049642801285, -0.2477865219116211, -0.008216692134737968, 0.17212852835655212, 0.010168473236262798, 0.22849583625793457, -0.5198005437850952, 0.01281807105988264, 0.10616946220397949, 0.09778323024511337, 0.008979182690382004, 0.3370688557624817, 0.05926835909485817, -0.16624677181243896, -0.21431954205036163, 0.36025527119636536, -0.5754247903823853, -0.07839301228523254, -0.31621086597442627, -0.138184055685997, 0.14195245504379272, 0.1934991031885147, -0.07481717318296432, 0.2696570158004761, -0.20394831895828247, 0.1503593772649765, 0.3257907032966614, -0.2086217850446701, -0.449649840593338, 0.13340918719768524, 0.0934552326798439, 0.35121285915374756, 0.2929980456829071, 0.26573726534843445, 0.3637498915195465, 0.037040892988443375, 0.02802298404276371, 0.30270475149154663, 0.04469301179051399, -0.03194655850529671, -0.3799366354942322, -0.30659422278404236, 0.12732195854187012, 0.20237500965595245, 0.04017765447497368, 0.06162286549806595, 0.11136511713266373, -0.030888548120856285, 0.24156396090984344, 0.12423070520162582, 0.11324457824230194, 0.2096998393535614, 0.21012602746486664, -0.21841607987880707, -0.14113359153270721, 0.07584211975336075, -0.5337057113647461, 0.11611953377723694, -0.4802550673484802, -0.2700076997280121, -0.32587307691574097, -0.3545674979686737, -0.006288542412221432, 0.0603998564183712, -0.25711220502853394, 0.07091552019119263, 0.10019266605377197, -0.09838259220123291, 0.33630239963531494, 0.005329621955752373, -0.4017883241176605, 0.09175916016101837, -0.002692645648494363, 0.07025659084320068, -0.44256946444511414, 0.1793137788772583, 0.12845110893249512, -0.25468283891677856, -0.09136990457773209, 0.019845006987452507, -0.22524148225784302, -0.5050381422042847, -0.1748075932264328, 0.2506627142429352, 0.3291652500629425, 0.2336900681257248, 0.2079576998949051, 0.22251680493354797, 0.17816630005836487, 0.25505536794662476, 0.09779014438390732, 0.21982640027999878, 0.0716380774974823, 0.06666336208581924, -0.35931846499443054, 0.4581737220287323, -0.22688888013362885, -0.022665180265903473, -0.12612658739089966, -0.38923314213752747, 0.2734323740005493, -0.10013797134160995, 0.08142947405576706, -0.4512613117694855, 0.07874081283807755, 0.3533686399459839, -0.04910344257950783, 0.0033766028936952353, 0.12963581085205078, -0.0848265066742897, -0.010779914446175098, -0.05964057520031929, -0.1538950800895691, 0.32068875432014465, -0.10863511264324188, -0.1442067176103592, 0.0110895661637187, 0.4614611566066742, 0.43855950236320496, 0.17018812894821167, -0.10129128396511078, -0.11482696235179901, 0.45718061923980713, 0.03653528168797493, 0.1816868931055069, 0.053016841411590576, -0.04882827773690224, 0.3767082095146179, 0.17042604088783264, 0.0017934984061866999, -0.31052282452583313, -0.02542593516409397, 0.08667939901351929, 0.22457145154476166, 0.24443428218364716, -0.1599861979484558, -0.23073895275592804, -0.3647024929523468, 0.46937689185142517, 0.19767539203166962, 0.21974819898605347, -0.07263089716434479, 0.46891629695892334, 0.15392790734767914, -0.32634055614471436, 0.09599203616380692, -0.033391986042261124, 0.5423591136932373, -0.017069067806005478, -0.3114195764064789, -0.377166211605072, -0.16811004281044006, 0.2098541557788849, 0.01862192712724209, 0.3155292868614197, -0.1995817869901657, 0.4949294924736023, 0.08884923160076141, 0.05853113904595375, -0.046410877257585526, -0.06411702185869217, 0.049756091088056564, 0.291763037443161, 0.02727397345006466, 0.10367514193058014, 0.20922501385211945, 0.022574670612812042, 0.10793552547693253, -0.09464354813098907, -0.3111015260219574, -0.15140359103679657, 0.2132692039012909, 0.17556840181350708, 0.05093318223953247, -0.27456042170524597, -0.11113887280225754, -0.2817267179489136, -0.42319732904434204, 0.2254270762205124, 0.03980096057057381, 0.033112168312072754, 0.12601245939731598, 0.16883482038974762, -0.061067044734954834, 0.114764504134655, 0.08111511170864105, -0.04502318799495697, -0.6299256086349487, 0.18313570320606232, -0.19124847650527954, -0.0007605240098200738, 0.24254928529262543, -0.06756995618343353, -0.0057537066750228405, 0.3238610327243805, -0.36748412251472473, -0.0564069002866745, -0.03328613191843033, 0.18072621524333954, -0.3109469413757324, -0.022311443462967873, 0.2386683076620102, 0.25498172640800476, -0.10065700858831406, -0.0001961867237696424, 0.09481102973222733, 0.16128531098365784, 0.3627622425556183, 0.08580901473760605, 0.015238323248922825, 0.22555343806743622, 0.155260369181633, 0.45752912759780884, -0.2319745570421219, 0.08945691585540771, 0.3778053820133209, 0.36233192682266235, 0.4830918610095978, -0.26745232939720154, 0.1350194215774536, -0.47616294026374817, -0.05971666797995567, -0.16356106102466583, 0.06149997189640999, 0.12683288753032684, -0.14897289872169495, 0.1271563023328781, -0.22674661874771118, -0.25540590286254883, -0.10871964693069458, 0.34884363412857056, -0.24559161067008972, 0.07470686733722687, 0.033701542764902115, -0.26010575890541077, -0.11066588014364243, -0.07503465563058853, 0.05254613235592842, 0.1934339851140976, 0.3555973470211029, -0.0959622785449028, -0.2293904572725296, -0.07046472281217575, -0.25824570655822754, 0.24369610846042633, -0.1842193752527237, -0.15758533775806427, 0.050777751952409744, 0.0009018275304697454, 0.1316085308790207, 0.17041927576065063, 0.4188082218170166, -0.1102038100361824, -0.03161558136343956, -0.04320141300559044, -0.049101706594228745, -0.2723810076713562, 0.014387926086783409, -0.04368792846798897, 0.05138170346617699, 0.006242867559194565, 0.35178035497665405, -0.24508565664291382, -0.1610230803489685, -0.26278191804885864, 0.6113593578338623, -0.2914118468761444, -0.146189883351326, -0.1679040491580963, -0.27581775188446045, -0.5205758213996887, 0.013708753511309624, 0.10242746025323868, -0.06994911283254623, 0.1287713646888733, -0.22618843615055084, -0.11656586080789566, -0.3135034143924713, 0.09558877348899841, 0.02612055279314518, 0.6730557084083557, -0.3106626570224762, 0.1338149905204773, -0.14997561275959015, 0.13530756533145905, 0.4575919210910797, 0.3512049615383148, -0.16341470181941986, 0.03242195025086403, -0.12535564601421356, -0.2660617530345917, 0.11174967139959335, 0.15934200584888458, -0.2497408241033554, 0.23550347983837128, -0.344284325838089, 0.49652066826820374, -0.0019973015878349543, -0.0435359813272953, -0.130154550075531, -0.2528442144393921, -0.0031907069496810436, -0.25544634461402893, 0.10302978754043579, -0.021974503993988037, -0.15521150827407837, 0.48357054591178894, -0.13926254212856293, -0.25539276003837585, 0.5033292174339294, -0.06331662088632584, 1.146225094795227, -0.09125564247369766, 0.05908089876174927, -0.07462494820356369, -0.2671489119529724, 0.2941931486129761, -0.6101069450378418, 0.1928519755601883, -0.023833155632019043, -0.14740443229675293, 0.10325244069099426, -0.03219452127814293, 0.007378232199698687, 0.19789354503154755, -0.25772228837013245, 0.17247554659843445, -0.4044649004936218, -0.24582968652248383, -0.31276246905326843, 0.3859442174434662, -0.13364076614379883, -0.23892426490783691, -0.22290709614753723, 0.030417270958423615, 0.07036300748586655, 0.009699671529233456, -0.24336937069892883, -0.06993960589170456, 0.3483140766620636, -0.10294023901224136, 0.2205170840024948, -0.10508359223604202, -0.21156218647956848, 0.36255204677581787, -0.17091302573680878, -0.1693262904882431, -0.3747054636478424, 0.014715811237692833, -0.2277478277683258, 0.06652716547250748, 0.17715664207935333, 0.019121604040265083, -0.006391078699380159, -0.027366261929273605, -0.31080925464630127, 0.08405736088752747, -0.023834215477108955, -0.1177816167473793, 0.0023076629731804132, 0.14611807465553284, -0.35474637150764465, -0.3214165270328522, 0.2032022625207901, 0.17500463128089905, -0.12040684372186661, 0.010827060788869858, -0.31906750798225403, -0.11614134162664413, -0.5043124556541443, 0.08122336864471436, 0.11450516432523727, 0.34767910838127136, -0.22784829139709473, 0.3304809033870697, -0.2915906310081482, -0.22508729994297028, -0.22063159942626953, -0.053279634565114975, 0.31312984228134155, -0.15983931720256805, 0.33341479301452637, -0.2019820660352707, -0.23233437538146973, -0.4242374897003174, 0.00824364647269249, -0.0975855365395546, -0.26665204763412476, 0.4921966791152954, 0.04981166869401932, -0.12440761923789978, 0.05697428435087204, -0.14614370465278625, 0.085146464407444, -0.008285628631711006, -0.17067673802375793, -0.19017314910888672, -0.4423627257347107, 0.2361503541469574, 0.30118057131767273, 0.5027702450752258, 0.03338145464658737, -0.0045293234288692474, -0.024131521582603455, 0.12317875027656555, -0.2732385993003845, 0.2419104278087616, 0.16901053488254547, 0.1864476501941681, -0.010839743539690971, 0.20980434119701385, 0.11469320207834244, -0.29050445556640625, -0.0424865260720253, 0.028029372915625572, -0.11940523236989975, -0.20528021454811096, -0.11945844441652298, 0.11007309705018997, -0.1223045215010643, -0.08909039199352264, -0.12792488932609558, -0.25480908155441284, 0.15144814550876617, -0.19670319557189941, 0.22192694246768951, -0.14089654386043549, -0.11528021097183228, -0.03826772794127464, 0.42367950081825256, -0.05348971486091614, -0.06674976646900177, 0.1244281604886055, -0.17530247569084167, 0.32819870114326477, 0.048431478440761566, -0.05803212523460388, -0.015175960958003998, -0.055929552763700485, -0.34259116649627686, -0.012550532817840576, 0.1476259082555771, 0.07933641225099564, 0.0730556920170784, -0.07566876709461212, -0.0917988270521164, 0.042477380484342575, 0.16057604551315308, 0.31336840987205505, -0.10059026628732681, -0.027840327471494675, -0.015204993076622486, 0.2355523407459259, -0.3078088164329529, -0.202885702252388, -0.0959705114364624, 0.04228580743074417, -0.128279909491539, 0.35269564390182495, 0.2551881968975067, 0.016021139919757843, 0.07859665155410767, 0.1219499483704567, 0.44354039430618286, -0.26256063580513, 0.35673412680625916, 0.2330171763896942, 0.03352106735110283, -0.2034561187028885, -0.14041337370872498, 0.2835744023323059, 0.08130735903978348, -0.04118967056274414, -0.13535115122795105, 0.41251710057258606, 0.5396202802658081, 0.2706170082092285, -0.5496681928634644, -0.23213037848472595, -0.30473607778549194, 0.5648609399795532, -0.06363650411367416, 0.4833981692790985, 0.4112481474876404, 0.16097718477249146, 0.19940601289272308, -0.2693638801574707, -0.21127574145793915, 0.39250433444976807, 0.037601884454488754, 0.01512722298502922, 0.17794494330883026, -0.12256618589162827, 0.15458428859710693, 0.08909669518470764, 0.1928018033504486, 0.3150663673877716, -0.07630553096532822, 0.3050919771194458, 0.04034743458032608, 0.14444011449813843, 0.5403456091880798, 0.17267371714115143, 0.41225501894950867, -0.20085056126117706, -0.16832879185676575, 0.3069993853569031, 0.22863012552261353, -0.046779219061136246, -0.04264628514647484, 0.060759399086236954, 0.2300114780664444, -0.400238960981369, 0.0562208890914917, 0.02911694534122944, 0.03616509214043617, -0.2809959650039673, 0.473840594291687, 0.17641685903072357, -0.1633598953485489, -0.06650026142597198, 0.0892370194196701, -0.1348399519920349, 0.22958438098430634, 0.12748120725154877, 0.16645638644695282, -0.13321976363658905, -0.09533987939357758, 0.34603530168533325, -0.416197806596756, -0.03934943303465843, -0.14949211478233337, -0.24054588377475739, 0.028394542634487152, 0.30422070622444153, -0.18590468168258667, 0.02068435586988926, -0.09955138713121414, 0.0874011293053627, -0.1506769210100174, 0.2765622138977051, 0.2304380089044571, -0.3117172420024872, -0.2855137884616852, -0.24080760776996613, -0.3313228487968445, -0.19241724908351898, -0.33345896005630493, -0.07936170697212219, 0.2031911462545395, 0.2810610830783844, -0.05789460986852646, 0.2194300889968872, 0.2072458416223526, -0.043705929070711136, -0.1320684850215912, 0.009600520133972168, -0.5555421113967896, 0.09323303401470184, 0.2999005615711212, 0.22536440193653107, 0.171548530459404, -0.5085917115211487, -0.290487676858902, -0.07408434897661209, 0.04909743368625641, -0.10993704944849014, 0.19738395512104034, 0.11965633928775787, 0.766352653503418, 0.6555730104446411, -0.08232910931110382, -0.28139451146125793, -0.08870671689510345, -0.22644923627376556, -0.029456570744514465, -0.12107584625482559, -0.018354183062911034, -0.19157302379608154, 0.46125543117523193, 0.2556867003440857, -0.35797128081321716, 0.17517752945423126, -0.2629184424877167, -0.20180544257164001, -0.11261413991451263, 0.11249691247940063, -0.21369341015815735, 0.023682350292801857, 0.09165334701538086, 0.46695563197135925, -0.07259970903396606, 0.32288697361946106, -0.037690285593271255, 0.13406409323215485, -0.36928150057792664, -0.10027358680963516, 0.3550422787666321, 0.2534770667552948, -0.4091677665710449, 0.4840550124645233, 0.11125800758600235, 0.021401377394795418, -0.020409442484378815, -0.29379644989967346, 0.31004345417022705, 0.13864704966545105, -0.272806853055954, -0.05132967606186867, 0.25453248620033264, -0.10606256127357483, -0.08098242431879044, 0.13831551373004913, 0.2301093190908432, 0.3491557836532593, 0.06697583943605423, -0.3895578682422638, -0.2239033430814743 ]
https://github.com/huggingface/datasets/issues/2598
Unable to download omp dataset
Hi @erikadistefano , thanks for reporting the issue. I have created a Pull Request that should fix it. Once merged into master, feel free to update your installed `datasets` library (either by installing it from our GitHub master branch or waiting until our next release) to be able to load omp dataset.
## Describe the bug The omp dataset cannot be downloaded because of a DuplicatedKeysError ## Steps to reproduce the bug from datasets import load_dataset omp = load_dataset('omp', 'posts_labeled') print(omp) ## Expected results This code should download the omp dataset and print the dictionary ## Actual results Downloading and preparing dataset omp/posts_labeled (download: 1.27 MiB, generated: 13.31 MiB, post-processed: Unknown size, total: 14.58 MiB) to /home/erika_distefano/.cache/huggingface/datasets/omp/posts_labeled/1.1.0/2fe5b067be3bff1d4588d5b0cbb9b5b22ae1b9d5b026a8ff572cd389f862735b... 0 examples [00:00, ? examples/s]2021-07-06 09:43:55.868815: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.11.0 Traceback (most recent call last): File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 990, in _prepare_split writer.write(example, key) File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 338, in write self.check_duplicate_keys() File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 3326 Keys should be unique and deterministic in nature During handling of the above exception, another exception occurred: Traceback (most recent call last): File "hf_datasets.py", line 32, in <module> omp = load_dataset('omp', 'posts_labeled') File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/load.py", line 748, in load_dataset use_auth_token=use_auth_token, File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 575, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 992, in _prepare_split num_examples, num_bytes = writer.finalize() File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 409, in finalize self.check_duplicate_keys() File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 3326 Keys should be unique and deterministic in nature ## Environment info - `datasets` version: 1.8.0 - Platform: Ubuntu 18.04.4 LTS - Python version: 3.6.9 - PyArrow version: 3.0.0
52
Unable to download omp dataset ## Describe the bug The omp dataset cannot be downloaded because of a DuplicatedKeysError ## Steps to reproduce the bug from datasets import load_dataset omp = load_dataset('omp', 'posts_labeled') print(omp) ## Expected results This code should download the omp dataset and print the dictionary ## Actual results Downloading and preparing dataset omp/posts_labeled (download: 1.27 MiB, generated: 13.31 MiB, post-processed: Unknown size, total: 14.58 MiB) to /home/erika_distefano/.cache/huggingface/datasets/omp/posts_labeled/1.1.0/2fe5b067be3bff1d4588d5b0cbb9b5b22ae1b9d5b026a8ff572cd389f862735b... 0 examples [00:00, ? examples/s]2021-07-06 09:43:55.868815: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.11.0 Traceback (most recent call last): File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 990, in _prepare_split writer.write(example, key) File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 338, in write self.check_duplicate_keys() File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 3326 Keys should be unique and deterministic in nature During handling of the above exception, another exception occurred: Traceback (most recent call last): File "hf_datasets.py", line 32, in <module> omp = load_dataset('omp', 'posts_labeled') File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/load.py", line 748, in load_dataset use_auth_token=use_auth_token, File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 575, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 992, in _prepare_split num_examples, num_bytes = writer.finalize() File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 409, in finalize self.check_duplicate_keys() File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 3326 Keys should be unique and deterministic in nature ## Environment info - `datasets` version: 1.8.0 - Platform: Ubuntu 18.04.4 LTS - Python version: 3.6.9 - PyArrow version: 3.0.0 Hi @erikadistefano , thanks for reporting the issue. I have created a Pull Request that should fix it. Once merged into master, feel free to update your installed `datasets` library (either by installing it from our GitHub master branch or waiting until our next release) to be able to load omp dataset.
[ -0.26337599754333496, -0.11635936796665192, -0.08252890408039093, 0.10050966590642929, 0.23119954764842987, -0.021743202582001686, 0.20523110032081604, 0.2830140292644501, 0.04831267520785332, 0.20946404337882996, -0.20779238641262054, 0.5524357557296753, -0.2091248780488968, 0.23590213060379028, 0.13298547267913818, -0.26636427640914917, -0.15812653303146362, 0.10206872969865799, -0.3342057168483734, -0.0926271453499794, -0.11044473201036453, 0.29327115416526794, -0.17788377404212952, 0.09048032015562057, 0.032410651445388794, -0.18051066994667053, -0.0745367631316185, -0.046990588307380676, -0.27787885069847107, -0.34637850522994995, 0.051886387169361115, 0.054879043251276016, -0.10146266222000122, 0.3988805115222931, -0.0001096027044695802, 0.11781585961580276, 0.07417431473731995, 0.01711249351501465, -0.14591243863105774, -0.6719622015953064, -0.13961094617843628, -0.2014087438583374, -0.08262057602405548, -0.3633430600166321, 0.22723935544490814, -0.25700095295906067, 0.05940704047679901, -0.22670672833919525, 0.43538016080856323, 0.3867660462856293, 0.2739732563495636, 0.12296850234270096, 0.5405080318450928, -0.0700388252735138, 0.13682065904140472, -0.10913489758968353, -0.12066364288330078, 0.3470195233821869, 0.05862380564212799, 0.15391038358211517, 0.2576219439506531, 0.3272630274295807, 0.02210267260670662, 0.20504230260849, 0.09252416342496872, 0.012578582391142845, 0.13955749571323395, -0.28003060817718506, 0.17920565605163574, 0.26130378246307373, 0.698787271976471, -0.396858811378479, -0.2707767188549042, -0.11483549326658249, 0.21555976569652557, -0.14401203393936157, 0.11427440494298935, 0.12411338835954666, -0.19978465139865875, 0.07276598364114761, -0.16058886051177979, -0.03201364725828171, -0.2135593146085739, 0.1117546483874321, 0.06572011858224869, 0.23256276547908783, -0.003894821275025606, 0.21636159718036652, 0.00007288862980203703, -0.01699691452085972, -0.0831875279545784, -0.11486081033945084, 0.138449564576149, 0.1905742883682251, -0.11528690159320831, -0.15327568352222443, -0.0530041828751564, -0.643604576587677, 0.25691094994544983, 0.023894859477877617, 0.3082270324230194, -0.04632355272769928, -0.2130434513092041, 0.03313145041465759, 0.11882703006267548, 0.22663478553295135, 0.1491996794939041, 0.041292935609817505, 0.1060219258069992, 0.12005501240491867, -0.21737821400165558, 0.016823578625917435, -0.08013235032558441, -0.1001487597823143, 0.26476725935935974, -0.05546410381793976, 0.5122630000114441, -0.16099359095096588, -0.4319576025009155, 0.2365228682756424, -0.6948947906494141, -0.10901428759098053, -0.10884319245815277, 0.2770729660987854, -0.07939829677343369, -0.0746440589427948, 0.18085113167762756, 0.08326879888772964, -0.23427627980709076, -0.21569699048995972, -0.1566639542579651, 0.15462452173233032, -0.03715496510267258, -0.13525164127349854, 0.15186025202274323, 0.09009724110364914, 0.4250286817550659, 0.10700403898954391, 0.1088748425245285, -0.566556990146637, 0.23591840267181396, 0.18048200011253357, -0.36078694462776184, 0.23124930262565613, 0.18124574422836304, 0.1465976983308792, -0.0617692805826664, 0.03781400993466377, -0.10027527809143066, 0.212456613779068, -0.1672932356595993, -0.4056834876537323, -0.07486573606729507, 0.34338250756263733, 0.053135231137275696, -0.2699447572231293, -0.16257081925868988, -0.05082244053483009, 0.038954321295022964, 0.030983159318566322, 0.024678722023963928, 0.02246483974158764, -0.2562178373336792, -0.24421148002147675, 0.1460745930671692, 0.2647913098335266, -0.20397979021072388, -0.0658719465136528, -0.11586905270814896, 0.0010875489097088575, 0.2173047512769699, 0.21075154840946198, -0.23821686208248138, 0.492054283618927, -0.12652252614498138, -0.061377786099910736, 0.37945109605789185, -0.294685959815979, -0.5540883541107178, 0.14986342191696167, -0.3093818128108978, 0.08788599818944931, 0.2221280187368393, -0.04518905654549599, 0.1302657425403595, 0.16553686559200287, 0.1286422610282898, -0.10271439701318741, -0.13444314897060394, -0.14395906031131744, -0.31331542134284973, -0.09504658728837967, -0.23791414499282837, 0.03583795949816704, 0.18496988713741302, -0.0782918930053711, 0.1971246898174286, 0.23298776149749756, 0.3517864942550659, 0.09669175744056702, -0.06916780024766922, 0.22162999212741852, 0.3059600293636322, -0.33004242181777954, 0.11082611232995987, -0.22934624552726746, -0.3739764988422394, 0.31553536653518677, -0.016556864604353905, -0.13559284806251526, -0.03004498779773712, -0.1432412713766098, -0.5316031575202942, 0.11481849104166031, -0.04729330539703369, 0.07179678976535797, 0.1636960655450821, -0.22254464030265808, 0.1199738010764122, 0.10335422307252884, -0.19920015335083008, 0.33423829078674316, -0.22978778183460236, 0.1891273707151413, -0.041265781968832016, 0.006993375718593597, -0.3651163876056671, 0.06637006998062134, 0.1807127743959427, 0.15540242195129395, 0.15033550560474396, -0.1990828812122345, -0.1807878017425537, 0.40382760763168335, -0.18736770749092102, 0.163109689950943, -0.19568510353565216, -0.05841729789972305, 0.2430950552225113, -0.2473962903022766, -0.06984902918338776, -0.045346200466156006, 0.17332275211811066, 0.01425158604979515, -0.07704739272594452, 0.3409191966056824, 0.12123093754053116, -0.2174380123615265, 0.015748610720038414, 0.20419466495513916, 0.3598780632019043, -0.29171493649482727, 0.2594669461250305, -0.22552445530891418, 0.4635407328605652, -0.23634028434753418, 0.11572563648223877, 0.03737141564488411, -0.19895371794700623, 0.29939308762550354, 0.06305370479822159, 0.006330392323434353, 0.11001868546009064, -0.03548245504498482, 0.03148200735449791, 0.033440906554460526, -0.07334780693054199, 0.4630732834339142, 0.24234244227409363, 0.23299549520015717, 0.08397989720106125, 0.14486974477767944, -0.22240354120731354, -0.14423152804374695, 0.20961707830429077, 0.06387671083211899, 0.12027816474437714, 0.38548895716667175, 0.09907335788011551, 0.1486281007528305, -0.2791573405265808, -0.22685956954956055, 0.4535355865955353, 0.35452914237976074, -0.06497342139482498, -0.0871003195643425, -0.40043309330940247, -0.2362251877784729, -0.24781052768230438, 0.0471528097987175, -0.0626160204410553, -0.08938094973564148, 0.07931108772754669, 0.3766822814941406, 0.07222003489732742, 0.07746065407991409, -0.005352651700377464, 0.00809356477111578, -0.08714074641466141, 0.07691150903701782, -0.011364343576133251, -0.03304821997880936, -0.2678030729293823, 0.1273902952671051, 0.27799978852272034, -0.1478266566991806, 0.688592255115509, 0.03214072436094284, -0.21633635461330414, -0.52239590883255, -0.24917270243167877, 0.03735842928290367, 0.018759196624159813, -0.29359379410743713, 0.043914202600717545, -0.02093414030969143, -0.136176198720932, -0.2722957134246826, 0.01980608142912388, -0.24202989041805267, -0.4843815863132477, 0.010391230694949627, -0.11602229624986649, -0.07208529859781265, -0.2030247300863266, -0.5646247863769531, -0.21312305331230164, -0.24000339210033417, 0.19354888796806335, 0.04669930040836334, 0.3808448612689972, 0.2424086183309555, -0.06738225370645523, 0.1859571635723114, 0.41959822177886963, 0.1539192944765091, -0.19421066343784332, -0.23945988714694977, 0.10296564549207687, -0.21371285617351532, -0.28679510951042175, 0.047488030046224594, -0.1526743322610855, 0.3554934561252594, 0.004659766796976328, -0.6089311838150024, -0.1365872174501419, -0.21419605612754822, 0.024342594668269157, -0.18621891736984253, -0.1313260942697525, 0.30981355905532837, 0.015480564907193184, -0.13652200996875763, -0.2190905213356018, -0.0629928857088089, 0.2879422903060913, 0.16355924308300018, 0.38208702206611633, -0.1381600797176361, 0.5215933322906494, 0.20620550215244293, 0.5446683764457703, 0.20924752950668335, 0.030962057411670685, 0.279248982667923, -0.004616855643689632, 0.019298886880278587, -0.05509887635707855, -0.25584831833839417, 0.005470614414662123, -0.08310191333293915, 0.009583337232470512, 0.009290842339396477, -0.08934049308300018, -0.07212545722723007, -0.04465682432055473, 0.1175525039434433, -0.36081433296203613, -0.33771011233329773, -0.10467223078012466, -0.4469049572944641, -0.04849698767066002, 0.21576108038425446, 0.061139438301324844, -0.21308906376361847, -0.007049901876598597, 0.09341626614332199, 0.020206255838274956, -0.06889884173870087, -0.06495178490877151, -0.1495748609304428, -0.019023939967155457, -0.8308066725730896, 0.22517558932304382, 0.04509920999407768, 0.2880030870437622, -0.12437562644481659, 0.32661962509155273, 0.3935658931732178, -0.1652686893939972, 0.39110440015792847, -0.16763484477996826, 0.26986661553382874, 0.09793657064437866, -0.07905642688274384, -0.14652365446090698, -0.16565977036952972, -0.2510336935520172, 0.08003155142068863, 0.40065890550613403, 0.35764071345329285, -0.34976544976234436, 0.1794051229953766, 0.3486420214176178, -0.06318899989128113, -0.14177976548671722, -0.21780653297901154, 0.08231309801340103, -0.4743446111679077, -0.4810013473033905, -0.052165184170007706, 0.04391631856560707, 0.35318395495414734, 0.09113481640815735, -0.030413514003157616, -0.010776527225971222, -0.036641109734773636, 0.16654624044895172, -0.09437501430511475, 0.11842088401317596, 0.1601199507713318, 0.6448458433151245, 0.09181471168994904, -0.03527916595339775, 0.5881879329681396, 0.6839149594306946, 0.009393470361828804, -0.567209005355835, -0.1577610820531845, -0.10658727586269379, -0.10101249068975449, 0.1782250553369522, 0.09080200642347336, 0.09334642440080643, -0.20887364447116852, -0.06466258317232132, 0.25874564051628113, 0.2643454670906067, 0.31420257687568665, 0.07239052653312683, -0.3763006925582886, -0.2506831884384155, 0.3191961646080017, -0.08175843954086304, -0.1552017629146576, 0.5849032402038574, -0.06784741580486298, -0.10478228330612183, 0.47215041518211365, -0.01147965807467699, 0.7160587906837463, -0.39857858419418335, -0.09278466552495956, 0.07311365753412247, -0.40176552534103394, 0.6066353917121887, -0.23477603495121002, 0.13099877536296844, -0.2987135350704193, -0.20087020099163055, 0.03992875665426254, -0.08245182037353516, 0.022216398268938065, 0.07520629465579987, -0.1967361718416214, -0.08724901080131531, 0.15803466737270355, 0.08727473020553589, 0.32064053416252136, 0.3674147129058838, -0.031964778900146484, -0.0848514512181282, 0.11500516533851624, 0.13733071088790894, -0.26286324858665466, 0.4060242474079132, -0.01812087371945381, -0.06680480390787125, 0.1028442531824112, -0.29926618933677673, -0.4831860363483429, 0.21736027300357819, -0.1947447955608368, 0.318595826625824, -0.06214935705065727, -0.4355204105377197, 0.12591208517551422, 0.4583158493041992, 0.38426926732063293, 0.0739847794175148, -0.10315217822790146, 0.20489223301410675, 0.24853140115737915, -0.1178387850522995, -0.13500463962554932, -0.12105274945497513, 0.13636371493339539, -0.18447738885879517, -0.1647845357656479, -0.027872223407030106, 0.13771939277648926, -0.37018001079559326, 0.0673820897936821, 0.08580024540424347, 0.17789731919765472, 0.10315842181444168, 0.10127247869968414, 0.1136690229177475, -0.25412994623184204, -0.4362242519855499, 0.12299438565969467, -0.04694485291838646, -0.24311213195323944, 0.1577254682779312, -0.03304250165820122, -0.438339501619339, 0.0451807864010334, 0.469819575548172, 0.34052348136901855, -0.02508513256907463, 0.5422225594520569, -0.18244397640228271, 0.024518504738807678, -0.27977505326271057, 0.15969698131084442, 0.014383689500391483, -0.1909034103155136, 0.21752536296844482, -0.2706023156642914, 0.19175797700881958, -0.02804534323513508, 0.2737780213356018, 0.295814573764801, 0.16457955539226532, 0.11275925487279892, -0.4255635738372803, -0.25095057487487793, 0.030123213306069374, -0.06416326761245728, 0.13413240015506744, 0.08765815198421478, 0.4184319078922272, -0.050697796046733856, 0.25539258122444153, -0.3356303870677948, 0.1482078731060028, -0.13183705508708954, -0.05942031741142273, 0.17461144924163818, -0.17171114683151245, 0.04257374256849289, 0.07189415395259857, 0.20413723587989807, 0.2437288612127304, -0.1099790632724762, -0.2864663600921631, -0.2727622985839844, 0.12192539125680923, -0.01796592026948929, -0.008863293565809727, -0.056794989854097366, -0.26030805706977844, -0.1260799616575241, 0.13988707959651947, -0.07489114254713058, 0.4401754140853882, 0.07842923700809479, -0.16445599496364594, 0.15827512741088867, 0.2488703727722168, -0.24606356024742126, -0.03894948586821556, -0.33696332573890686, 0.2750456631183624, 0.17593379318714142, 0.2675977647304535, 0.02924022264778614, -0.1288139820098877, -0.22964730858802795, -0.2728818953037262, -0.2131313532590866, -0.1464960277080536, 0.24355560541152954, -0.30185508728027344, -0.04216885566711426, 0.15195491909980774, 0.24602273106575012, 0.15204989910125732, -0.2486085295677185, -0.1632194221019745, 0.16443535685539246, 0.24596941471099854, -0.3797386884689331, -0.2860786020755768, 0.2032911777496338, 0.2655281126499176, 0.10338634997606277, 0.3162931501865387, 0.1810365617275238, -0.12765678763389587, -0.08023878931999207, -0.06843874603509903, 0.24738340079784393, 0.040377452969551086, 0.05154143646359444, 0.23372888565063477, -0.06135029345750809, -0.13159964978694916, 0.20034031569957733, 0.16556808352470398, 0.24642424285411835, 0.27966973185539246, -0.373953640460968, 0.10082252323627472, 0.1590702086687088, 0.2548450827598572, 0.1725817322731018, -0.2700347602367401, 0.020782997831702232, 0.05392943322658539, -0.20695453882217407, 0.20229870080947876, 0.13905292749404907, 0.0993252694606781, -0.2250608652830124, -0.0641920194029808, -0.14981292188167572, 0.11194796115159988, -0.11649947613477707, 0.09845013916492462, -0.48470962047576904, -0.14654992520809174, -0.21888917684555054, 0.17690584063529968, 0.030336791649460793, -0.10449457168579102, 0.20717941224575043, 0.09878072142601013, -0.3320986032485962, -0.4219251871109009, -0.2849453389644623, 0.19377733767032623, 0.2210933417081833, -0.4458441138267517, 0.2861189842224121, 0.14531318843364716, -0.22794565558433533, -0.11886458843946457, 0.4128701984882355, 0.2882544696331024, 0.13772061467170715, -0.004457512870430946, 0.18669934570789337, 0.24326255917549133, 0.06140945479273796, -0.06629776209592819, 0.14676892757415771, 0.38318508863449097, 0.18610861897468567, 0.23369020223617554, 0.0937461107969284, -0.1420445740222931, -0.04586045444011688, 0.4072280526161194, -0.051564451307058334, 0.026013871654868126, 0.20180657505989075, -0.1265823245048523, -0.11345022916793823, -0.041149623692035675, 0.16521970927715302, -0.20652234554290771, -0.3550454378128052, 0.0897853896021843, 0.060754403471946716, 0.13786964118480682, 0.01094543095678091, 0.11264505982398987, -0.12174508720636368, 0.11255715787410736, 0.34110093116760254, 0.21329867839813232, -0.4258602559566498, -0.1614370495080948, -0.6133249402046204, 0.38121581077575684, -0.3473397195339203, -0.0025530781131237745, 0.03220793604850769, 0.2755567729473114, -0.044515207409858704, 0.04744111746549606, 0.32561102509498596, 0.02061220444738865, -0.13623256981372833, 0.5303824543952942, -0.39044836163520813, -0.07948682457208633, 0.156526118516922, -0.2918983995914459, -0.013428542762994766, -0.28159505128860474, 0.2825533151626587, -0.27203354239463806, 0.02936466783285141, 0.005584040191024542, -0.09353344887495041, 0.21007776260375977, -0.07036715000867844, 0.3803653419017792, 0.0622594840824604, 0.519521176815033, -0.03083813562989235, -0.17543911933898926, 0.09449812769889832, -0.011273988522589207, -0.39461666345596313, 0.18183329701423645, 0.34796854853630066, 0.20453090965747833, -0.09176842123270035, -0.0474526509642601, 0.029755687341094017, 0.48563650250434875, 0.20239174365997314, -0.15209318697452545, -0.3098873198032379, 0.061571154743433, -0.22549352049827576, 0.10065858066082001, 0.008263218216598034, 0.36843642592430115, 0.06007995083928108, 0.19218288362026215, -0.33775830268859863, -0.48127272725105286, 0.5101732611656189, -0.20887409150600433, -0.09347978234291077, -0.1610664278268814, 0.3750956654548645, 0.05862808600068092, -0.07815200090408325, -0.4696168601512909, -0.11142131686210632, 0.36270809173583984, -0.4114663302898407, -0.21397632360458374, -0.0388944186270237, -0.06120309606194496, 0.03700346127152443, -0.0616338849067688, 0.5893382430076599, -0.026026543229818344, -0.22749334573745728, 0.2875640094280243, -0.22189873456954956 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
Hi ! Do you have an example in mind that shows how this could be useful ?
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
17
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). Hi ! Do you have an example in mind that shows how this could be useful ?
[ -0.4188196659088135, -0.11185524612665176, -0.02110976167023182, 0.1649782806634903, 0.44314804673194885, -0.07371680438518524, 0.5200479626655579, 0.02551070787012577, -0.00009148131357505918, -0.06128968670964241, 0.13835787773132324, 0.3554060161113739, -0.36642858386039734, 0.18168506026268005, 0.14372316002845764, -0.12673209607601166, -0.019302882254123688, 0.3366389572620392, -0.3813779652118683, -0.1455220729112625, -0.18102101981639862, -0.36535924673080444, -0.1667022556066513, 0.02092270739376545, -0.1870878040790558, -0.07787254452705383, -0.03244544938206673, -0.48121801018714905, -0.033489543944597244, -0.08909779787063599, 0.7275013327598572, 0.049632728099823, -0.015626685693860054, 0.6457779407501221, -0.0001180408289656043, -0.19178421795368195, 0.09638731181621552, -0.07683756202459335, 0.07401805371046066, -0.3926314115524292, -0.47024887800216675, -0.09309996664524078, 0.038480229675769806, -0.2704014778137207, -0.4740884602069855, -0.05278865993022919, -0.03906771168112755, -0.0544612817466259, 0.40187227725982666, 0.13899806141853333, 0.1720724105834961, -0.4391128122806549, -0.13842590153217316, -0.12190213054418564, -0.07935276627540588, 0.4444636106491089, -0.28699633479118347, -0.13274125754833221, 0.19047518074512482, 0.30426448583602905, 0.04844269901514053, -0.025628497824072838, -0.04942953959107399, -0.15038274228572845, 0.7289844155311584, -0.13781988620758057, 0.10423675924539566, -0.4418715536594391, -0.17863968014717102, 0.4444394111633301, 0.7537165284156799, -0.3168222904205322, -0.16756632924079895, -0.16340816020965576, 0.22007186710834503, 0.2761267125606537, -0.02315077930688858, 0.20091389119625092, -0.02806096524000168, 0.28652891516685486, -0.22268146276474, -0.25749471783638, -0.42249587178230286, 0.032274357974529266, -0.5201646089553833, 0.1166955977678299, -0.06819118559360504, 0.008746770210564137, 0.00913359597325325, -0.052633799612522125, 0.26580578088760376, 0.06938628852367401, 0.11794257164001465, 0.17348216474056244, -0.13983623683452606, -0.5531539916992188, -0.346199095249176, 0.21373450756072998, -0.113096684217453, -0.005009463522583246, -0.1444607824087143, -0.15903760492801666, 0.10091874748468399, -0.0037085276562720537, -0.04535297676920891, 0.25607165694236755, 0.04442426189780235, 0.28347229957580566, 0.15481217205524445, -0.3329989016056061, -0.18650101125240326, 0.1489245444536209, 0.004496867302805185, -0.1453438699245453, 0.12781530618667603, 0.08482062071561813, 0.07673491537570953, -0.15198269486427307, 0.05955524370074272, -0.2803954482078552, -0.019367335364222527, 0.04588428512215614, -0.1318855732679367, 0.04307384043931961, 0.18125593662261963, 0.0792010948061943, 0.17681626975536346, 0.24583256244659424, 0.23447760939598083, -0.22858114540576935, 0.06171593815088272, 0.25112834572792053, -0.2971736192703247, -0.13998499512672424, 0.03754222020506859, 0.16391180455684662, -0.26764222979545593, 0.0062304167076945305, -0.12349864840507507, 0.38049012422561646, -0.00012070054071955383, -0.26225289702415466, 0.14762051403522491, 0.29598096013069153, -0.551916241645813, -0.21851931512355804, 0.15826845169067383, -0.17859847843647003, -0.2252626270055771, 0.46311327815055847, -0.19851776957511902, 0.023116350173950195, 0.09012675285339355, 0.17781339585781097, -0.03369757905602455, 0.06828621029853821, -0.16854728758335114, 0.33712825179100037, 0.04450560361146927, -0.11007674783468246, 0.17105871438980103, -0.3961257338523865, -0.10473699122667313, -0.14223960041999817, -0.09998754411935806, 0.09168701618909836, -0.6140995025634766, -0.3623419404029846, -0.17605511844158173, -0.0748702883720398, 0.1173580139875412, 0.06891471147537231, -0.2285490185022354, 0.3040567636489868, -0.14126667380332947, -0.17978018522262573, 0.6639191508293152, 0.07276268303394318, -0.27186447381973267, 0.2040669322013855, -0.537502646446228, -0.1342458873987198, 0.14890938997268677, 0.3913097679615021, 0.24205714464187622, -0.2189546674489975, -0.589000403881073, 0.2351159006357193, -0.04817706719040871, -0.13639405369758606, 0.09845999628305435, -0.17218612134456635, 0.5869361162185669, 0.020745133981108665, 0.2949225604534149, 0.46515092253685, 0.18266692757606506, 0.5072156190872192, -0.14355850219726562, -0.37115785479545593, 0.23930296301841736, -0.0810985118150711, 0.4471268653869629, -0.04506082087755203, 0.003796484787017107, -0.39308661222457886, -0.007308590225875378, -0.12235141545534134, -0.08500072360038757, 0.13314257562160492, 0.3702481985092163, -0.09066225588321686, 0.02211989276111126, -0.3194076716899872, -0.14612092077732086, -0.11931190639734268, 0.14471474289894104, -0.39998963475227356, 0.2801669239997864, -0.2651737332344055, -0.10513190925121307, 0.44936665892601013, 0.00608096132054925, 0.06006830558180809, -0.40103021264076233, 0.29319217801094055, 0.08193042129278183, 0.22274839878082275, -0.3591739535331726, -0.04498668760061264, -0.1441909521818161, -0.1969311535358429, -0.10154459625482559, -0.18366362154483795, -0.058404259383678436, -0.05127837136387825, 0.008519317023456097, 0.439288467168808, 0.2763769030570984, -0.49339237809181213, 0.4896828234195709, 0.07931984961032867, 0.09571874886751175, -0.19397784769535065, -0.3488173484802246, 0.4720556437969208, -0.15012772381305695, 0.25031426548957825, -0.3207322359085083, 0.0362432487308979, 0.18632425367832184, -0.4335700273513794, -0.12522785365581512, -0.09077540040016174, -0.045995574444532394, 0.028086867183446884, 0.13917765021324158, 0.20288518071174622, 0.019478723406791687, -0.10247555375099182, -0.0012694360921159387, -0.09498364478349686, 0.2904399335384369, 0.46381473541259766, -0.23570668697357178, 0.2653408646583557, -0.24323607981204987, 0.529625415802002, 0.6370874643325806, 0.15562069416046143, -0.2533012330532074, 0.22747957706451416, 0.09587156772613525, -0.15038475394248962, 0.2806728482246399, -0.09431149065494537, 0.27169498801231384, 0.03509754315018654, -0.15714570879936218, 0.1369214951992035, 0.07075832784175873, -0.3582985997200012, -0.0043881419114768505, 0.1940809041261673, -0.10778850317001343, 0.0459178127348423, -0.18414092063903809, -0.09737712889909744, -0.3303300440311432, 0.06595120579004288, 0.07209702581167221, 0.1469985395669937, -0.09452411532402039, -0.07283241301774979, 0.2812085449695587, 0.06617417931556702, -0.083328016102314, 0.26073071360588074, 0.23674337565898895, -0.05793656408786774, -0.14711178839206696, -0.07016834616661072, 0.07776929438114166, 0.1580582708120346, -0.17417800426483154, 0.01698993146419525, 0.2542791962623596, -0.3422033488750458, 0.1313803344964981, -0.09901828318834305, -0.44044697284698486, -0.011937976814806461, 0.056602802127599716, 0.16734032332897186, 0.3422214090824127, 0.02478538453578949, -0.08968415856361389, 0.049368999898433685, -0.02071034349501133, 0.04608665406703949, -0.18600347638130188, -0.015751054510474205, -0.2754972279071808, 0.2332954704761505, 0.08404512703418732, -0.2450774908065796, -0.2703365087509155, -0.10526671260595322, 0.17080292105674744, 0.057578589767217636, -0.058461107313632965, 0.011634254828095436, 0.08250203728675842, -0.019699696451425552, 0.016059190034866333, 0.15712028741836548, -0.09403886646032333, 0.0360754020512104, 0.2773391604423523, 0.08925286680459976, -0.1180107519030571, -0.1655026078224182, -0.2728356122970581, -0.08584801852703094, 0.2958499491214752, -0.31100034713745117, 0.0010258256224915385, -0.11238125711679459, 0.022187702357769012, -0.08386009931564331, -0.14564502239227295, 0.5014487504959106, 0.05097616836428642, 0.023752858862280846, -0.02180301584303379, 0.0657578706741333, -0.07431478053331375, 0.18657222390174866, 0.34803205728530884, 0.17661422491073608, 0.4494113624095917, -0.016608091071248055, 0.22545845806598663, -0.3424138128757477, -0.4381715953350067, -0.2640432119369507, 0.05380938574671745, -0.00427956972271204, 0.10790611058473587, -0.41741833090782166, 0.24367459118366241, 0.23116055130958557, -0.30492112040519714, -0.012120027095079422, -0.08343447744846344, -0.22157570719718933, -0.16622459888458252, -0.21215927600860596, 0.04787507653236389, -0.07027476280927658, 0.017124569043517113, -0.20957528054714203, -0.06293608248233795, -0.19674916565418243, -0.04942198842763901, 0.12609189748764038, -0.10384374856948853, 0.029248887673020363, 0.5218976736068726, 0.11035120487213135, -0.04523042216897011, -0.02421366423368454, 0.024874219670891762, 0.2543194591999054, -0.09878937900066376, -0.2955642640590668, 0.02006964571774006, -0.0834713950753212, 0.056851599365472794, -0.004699649754911661, 0.19227975606918335, 0.7796649932861328, -0.05513394623994827, 0.19615599513053894, 0.19514138996601105, -0.37990614771842957, -0.2024967223405838, 0.055991385132074356, -0.2858712375164032, -0.17673636972904205, 0.011388661339879036, 0.0822412520647049, -0.07985126972198486, -0.12255803495645523, 0.10506509989500046, 0.27618128061294556, -0.2947768270969391, -0.36785128712654114, 0.18424110114574432, 0.008706009946763515, -0.25606754422187805, 0.21490393579006195, 0.03230297192931175, -0.1509324461221695, -0.12190786004066467, -0.05973339080810547, -0.37345290184020996, -0.0020948571618646383, 0.3103734254837036, -0.1419566571712494, -0.1717827320098877, -0.0993548110127449, 0.21835914254188538, 0.00021312141325324774, 0.23024016618728638, 0.09645773470401764, -0.032596226781606674, 0.2010592222213745, -0.5295646786689758, 0.04635315388441086, 0.010305013507604599, 0.2909168601036072, -0.21279676258563995, 0.04905799776315689, -0.0731624960899353, -0.0993528738617897, 0.24895314872264862, -0.17136764526367188, 0.0567142479121685, -0.06794862449169159, 0.04333645850419998, -0.286259263753891, -0.39913588762283325, 0.31705278158187866, 0.19240441918373108, -0.13701212406158447, -0.02991761453449726, -0.029585925862193108, -0.5042584538459778, 0.19775894284248352, 0.5593022108078003, 0.9863252639770508, 0.11598685383796692, 0.13852223753929138, -0.11276086419820786, -0.031207669526338577, 0.458359032869339, -0.11649004369974136, -0.05821920931339264, -0.2965385913848877, -0.39263227581977844, -0.2365938276052475, -0.3042210042476654, 0.3992500901222229, 0.5360763669013977, -0.5129194259643555, 0.2585292160511017, -0.371717631816864, -0.0838063433766365, 0.2241666615009308, -0.10479969531297684, 0.34807103872299194, -0.3577435612678528, 0.0461035892367363, 0.16791564226150513, -0.08825396001338959, 0.260130375623703, 0.030857188627123833, -0.16750189661979675, -0.07120048254728317, 0.28085634112358093, -0.08807709813117981, -0.06897029280662537, -0.26796573400497437, -0.14558114111423492, -0.20074208080768585, -0.43437811732292175, 0.8832833766937256, 0.3755268156528473, 0.2161356508731842, 0.2257458120584488, -0.16384851932525635, 0.04650808125734329, -0.074403777718544, 0.30899369716644287, 0.00028950482374057174, -0.184287428855896, 0.4555925726890564, -0.04589590057730675, -0.0858469307422638, 0.06826669722795486, 0.012259512208402157, -0.11869330704212189, 0.21348629891872406, -0.1756020039319992, 0.11995412409305573, -0.3734200894832611, -0.019665449857711792, 0.033097218722105026, 0.018280358985066414, -0.008692351169884205, 0.1461736261844635, 0.32128822803497314, -0.03599080443382263, 0.43783700466156006, 0.3599594831466675, -0.29255470633506775, -0.09265951812267303, 0.15254096686840057, 0.5887397527694702, 0.05939415469765663, 0.12736628949642181, -0.38415947556495667, -0.31160208582878113, -0.38537490367889404, 0.2694803774356842, -0.05881449207663536, -0.2542477548122406, 0.22761030495166779, 0.0699303150177002, 0.022932585328817368, -0.006897835526615381, -0.3377266824245453, 0.259275883436203, 0.2940542995929718, -0.3691021502017975, -0.4159674644470215, -0.3563140034675598, -0.2046508640050888, 0.09089858829975128, 0.07098235189914703, -0.07472781091928482, 0.1950051337480545, 0.3595225512981415, 0.022315865382552147, -0.31310489773750305, -0.053686756640672684, 0.004885860253125429, 0.11693097651004791, 0.17780476808547974, 0.16549667716026306, -0.39203235507011414, 0.16791696846485138, 0.01831592246890068, -0.0933929905295372, -0.14483386278152466, -0.19754163920879364, -0.1709585338830948, 0.15066255629062653, 0.1506834179162979, 0.21858537197113037, -0.1473587155342102, 0.04010968282818794, -0.014419342391192913, 0.10926452279090881, -0.01778390258550644, 0.22909797728061676, -0.057783693075180054, 0.3751971125602722, 0.44899922609329224, -0.2798544466495514, -0.46485206484794617, 0.053228747099637985, 0.07201354205608368, -0.006777962204068899, -0.15879370272159576, 0.27501609921455383, 0.09910289943218231, 0.09454532712697983, -0.5071004033088684, 0.03203669190406799, 0.09959440678358078, -0.061590537428855896, 0.41865357756614685, -0.007899736985564232, 0.4520025849342346, 0.5059018135070801, -0.044163499027490616, 0.05014519393444061, -0.1926656812429428, 0.013904950581490993, 0.25092071294784546, 0.15459811687469482, -0.37922030687332153, 0.1363568753004074, 0.2737790644168854, 0.016039667651057243, -0.04809396341443062, 0.2951916754245758, -0.04358726367354393, 0.08830063045024872, -0.07070634514093399, -0.10387827455997467, 0.41840189695358276, -0.36031946539878845, 0.2763778567314148, 0.6955442428588867, -0.27418452501296997, -0.000025444996936130337, 0.587677538394928, 0.029415089637041092, -0.053479284048080444, 0.3487201929092407, 0.16481225192546844, 0.3593229651451111, 0.1140986755490303, -0.07635214924812317, 0.267356276512146, 0.2705792486667633, 0.11857029795646667, 0.666279137134552, -0.07757017016410828, -0.18246063590049744, 0.13055530190467834, -0.1851767897605896, -0.036671530455350876, -0.24047255516052246, -0.046064186841249466, 0.15598219633102417, -0.23953573405742645, 0.32086533308029175, -0.20139436423778534, -0.056617848575115204, 0.12622280418872833, -0.3402041792869568, -0.16031673550605774, -0.2548779547214508, 0.35635748505592346, 0.12667715549468994, 0.05375966057181358, 0.22560742497444153, 0.35044124722480774, 0.06690281629562378, 0.08717931807041168, -0.08892665803432465, -0.25964030623435974, 0.11785734444856644, 0.12170896679162979, 0.1699083298444748, 0.5181457996368408, 0.035926252603530884, 0.18658091127872467, -0.04960476607084274, 0.058588091284036636, -0.17138198018074036, -0.24734577536582947, 0.09499074518680573, 0.27255862951278687, -0.2967208921909332, -0.15805569291114807, 0.18447202444076538, 0.20329292118549347, -0.12133001536130905, 0.4222787618637085, 0.03669251874089241, 0.20910321176052094, -0.2514106035232544, 0.3976300358772278, 0.3067565858364105, -0.18231332302093506, -0.10094381123781204, 0.1998400092124939, 0.03937605768442154, -0.0032946867868304253, 0.4314260482788086, -0.4219203293323517, -0.024235500022768974, -0.041541118174791336, 0.0387020967900753, 0.21408776938915253, 0.1312820315361023, 0.018133310601115227, 0.014985370449721813, -0.015118472278118134, 0.049783188849687576, -0.31949469447135925, 0.20273050665855408, 0.16578248143196106, 0.018509389832615852, -0.1336502879858017, -0.20754779875278473, 0.009698247537016869, 0.25013330578804016, 0.05542553588747978, -0.17137743532657623, -0.14103864133358002, 0.20183725655078888, -0.03654174879193306, -0.027833791449666023, 0.15392637252807617, 0.428374320268631, 0.02234032191336155, -0.2247018814086914, 0.07162247598171234, 0.299714595079422, 0.026411665603518486, -0.032923374325037, 0.3513909578323364, 0.03854329511523247, 0.2977883517742157, 0.20751579105854034, 0.04201824590563774, 0.6284478902816772, -0.05375910922884941, 0.3799883723258972, 0.5167904496192932, -0.03326045721769333, -0.2373843491077423, 0.2958488166332245, 0.20155364274978638, -0.2141612470149994, -0.24493207037448883, -0.10700148344039917, 0.13808377087116241, -0.23639123141765594, 0.006223523057997227, 0.06048036366701126, -0.8246732950210571, 0.041549619287252426, -0.17096154391765594, -0.11131059378385544, 0.11977662891149521, 0.027488162741065025, -0.06765047460794449, -0.06712356209754944, -0.05248343199491501, -0.129825159907341, 0.2856086492538452, 0.07810612767934799, -0.33400869369506836, -0.17240706086158752, -0.06888721138238907, -0.33146509528160095, 0.12221729010343552, -0.06508723646402359, -0.0006407247274182737, 0.4729185402393341, -0.06968370079994202, 0.3831114172935486, 0.05829383432865143, -0.07388090342283249, -0.09924784302711487, -0.23022209107875824, 0.6369763016700745, -0.2621821165084839, 0.042226992547512054, -0.22691066563129425, -0.09620789438486099 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
Example: Merge 2 datasets into one datasets Label extraction from dataset dataset(text, label) —> dataset(text, newlabel) TextCleaning. For image dataset, Transformation are easier (ie linear algebra). > On Jul 6, 2021, at 17:39, Quentin Lhoest ***@***.***> wrote: > >  > Hi ! Do you have an example in mind that shows how this could be useful ? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
83
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). Example: Merge 2 datasets into one datasets Label extraction from dataset dataset(text, label) —> dataset(text, newlabel) TextCleaning. For image dataset, Transformation are easier (ie linear algebra). > On Jul 6, 2021, at 17:39, Quentin Lhoest ***@***.***> wrote: > >  > Hi ! Do you have an example in mind that shows how this could be useful ? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
[ -0.48543158173561096, 0.15293057262897491, -0.08864050358533859, 0.18962767720222473, 0.4006461501121521, 0.1068505272269249, 0.5075284242630005, 0.12447446584701538, -0.011683245189487934, -0.06204480677843094, 0.05338345095515251, 0.33453184366226196, -0.3507428467273712, 0.18758249282836914, 0.07216106355190277, -0.13148948550224304, -0.028311116620898247, 0.318009614944458, -0.443511962890625, -0.12159004807472229, -0.21722589433193207, -0.2452002465724945, -0.20433245599269867, -0.035017114132642746, -0.27362605929374695, -0.13871388137340546, -0.11187118291854858, -0.27443253993988037, -0.1285722404718399, 0.0032409848645329475, 0.5669195055961609, 0.21555064618587494, -0.0712963193655014, 0.5656957030296326, -0.00011136320244986564, -0.12790225446224213, 0.11006069928407669, -0.008048852905631065, -0.1362926959991455, -0.3996145725250244, -0.4163699448108673, -0.06039660796523094, -0.03964652866125107, -0.2917911112308502, -0.26644501090049744, -0.18540824949741364, 0.02377607487142086, -0.06451503187417984, 0.413410484790802, 0.07513856142759323, 0.2136537730693817, -0.4207116365432739, -0.081319659948349, -0.13264206051826477, -0.07253319770097733, 0.43234527111053467, -0.15735645592212677, -0.07395799458026886, 0.2559337317943573, 0.27749407291412354, -0.005224086809903383, 0.2231011539697647, -0.10980786383152008, -0.21184739470481873, 0.6597431898117065, -0.08687248080968857, -0.05189047008752823, -0.36802244186401367, -0.1720128357410431, 0.30207160115242004, 0.620286762714386, -0.41654691100120544, -0.27182111144065857, -0.23530901968479156, 0.3179521858692169, 0.13809800148010254, -0.09366445988416672, 0.15360315144062042, -0.02915291301906109, 0.2862277925014496, -0.3013945519924164, -0.3070755898952484, -0.3126647174358368, 0.07691408693790436, -0.3927910625934601, 0.18383315205574036, -0.018702512606978416, 0.07870648801326752, 0.026106737554073334, -0.012061521410942078, 0.27862221002578735, 0.028674129396677017, 0.17349056899547577, 0.13025078177452087, -0.15759296715259552, -0.44309648871421814, -0.3470885753631592, -0.01647152751684189, -0.17240184545516968, 0.08205274492502213, -0.06693731248378754, -0.1407575011253357, 0.00015066399646457285, 0.06787411868572235, -0.09761687368154526, 0.2801889181137085, 0.07562431693077087, 0.2835092842578888, 0.09272553771734238, -0.2981123924255371, -0.13427899777889252, 0.23355700075626373, -0.15006817877292633, -0.18283602595329285, 0.0823877826333046, 0.07516349107027054, 0.08817467093467712, 0.06075730547308922, 0.00793226808309555, -0.370504230260849, 0.010207823477685452, 0.010420264676213264, -0.1592569351196289, 0.011426223441958427, 0.21353629231452942, 0.053742025047540665, 0.22687816619873047, 0.19773682951927185, 0.27815359830856323, -0.29101815819740295, 0.0033117872662842274, 0.33806341886520386, -0.3129454255104065, -0.1553812325000763, 0.05730486661195755, 0.09892473369836807, -0.3175147771835327, -0.006846461910754442, -0.2444898635149002, 0.38609734177589417, -0.010476534254848957, -0.248030424118042, 0.25615352392196655, 0.19992467761039734, -0.44744956493377686, -0.13089849054813385, 0.15153385698795319, -0.20377855002880096, -0.2086181491613388, 0.34214532375335693, -0.1957416534423828, 0.16296346485614777, 0.06557748466730118, 0.2365572303533554, 0.11480125039815903, 0.03165076673030853, -0.2980538010597229, 0.390444278717041, 0.011352922767400742, -0.0630762130022049, 0.1027774065732956, -0.3152868151664734, -0.06384560465812683, -0.07782559841871262, -0.07142145186662674, 0.13448083400726318, -0.6597014665603638, -0.37526050209999084, -0.08923899382352829, -0.040043458342552185, 0.02573835663497448, 0.17851026356220245, -0.16793803870677948, 0.3726218640804291, -0.11667675524950027, -0.20428407192230225, 0.7212477922439575, -0.06591831147670746, -0.1949128359556198, 0.15814447402954102, -0.5203275680541992, -0.1914045661687851, 0.16405273973941803, 0.37043440341949463, 0.2596187889575958, -0.1747305542230606, -0.4552614986896515, 0.35977280139923096, -0.13519395887851715, -0.13348104059696198, 0.15245488286018372, -0.28314268589019775, 0.4489601254463196, 0.1342543512582779, 0.27272656559944153, 0.27755290269851685, 0.08476979285478592, 0.4158126413822174, -0.14019067585468292, -0.4404051601886749, 0.2843724191188812, 0.04014565050601959, 0.3044770658016205, -0.12694840133190155, -0.032850105315446854, -0.3859139382839203, -0.11052066832780838, -0.12622396647930145, 0.04785691574215889, 0.15630871057510376, 0.26923614740371704, -0.05149095878005028, -0.050979167222976685, -0.2854633331298828, -0.16288717091083527, -0.22486506402492523, 0.20877961814403534, -0.3400040864944458, 0.2504788339138031, -0.31470051407814026, -0.07457001507282257, 0.5503138303756714, 0.03704589605331421, 0.2137279212474823, -0.5016190409660339, 0.3224230408668518, 0.04493904486298561, 0.20223911106586456, -0.32858553528785706, 0.04715445637702942, -0.26167652010917664, -0.2003248929977417, 0.0024983303155750036, -0.13452281057834625, -0.09608443081378937, -0.046261016279459, 0.09162526577711105, 0.34880515933036804, 0.3109097480773926, -0.43743592500686646, 0.35713085532188416, -0.08325659483671188, 0.1965893656015396, -0.1748179942369461, -0.40340977907180786, 0.3144293427467346, -0.2289670705795288, 0.2899330258369446, -0.177475705742836, 0.0508708655834198, 0.13577722012996674, -0.3550783097743988, -0.11696173250675201, -0.14954449236392975, -0.06055954471230507, -0.007577307056635618, 0.2507331371307373, 0.2566909193992615, 0.09110477566719055, -0.08593493700027466, 0.1485474854707718, -0.06722614914178848, 0.22107532620429993, 0.3868330121040344, -0.28764212131500244, 0.22639934718608856, -0.20820792019367218, 0.5587702393531799, 0.4472164213657379, 0.2356889247894287, -0.2560156285762787, 0.23048263788223267, 0.10215514153242111, -0.07364016026258469, 0.26214084029197693, 0.02676037885248661, 0.4427098333835602, -0.013277241960167885, -0.04414071887731552, 0.21165655553340912, 0.04423835128545761, -0.49060460925102234, 0.08058683574199677, 0.10660052299499512, -0.020708689466118813, 0.004888998810201883, -0.18069487810134888, -0.18151544034481049, -0.4042201638221741, 0.1540665328502655, 0.037680674344301224, -0.06111331656575203, -0.08800379931926727, -0.07290279865264893, 0.10770702362060547, 0.1231757253408432, 0.06671757251024246, 0.22310468554496765, 0.2378365844488144, -0.1539999097585678, -0.05822063609957695, -0.11083251237869263, 0.057614512741565704, 0.1907510757446289, -0.06669378280639648, 0.04291636496782303, 0.386446088552475, -0.36717212200164795, 0.23922887444496155, -0.14112630486488342, -0.5004368424415588, 0.13608546555042267, -0.024693433195352554, 0.03684770315885544, 0.3780708611011505, -0.08696990460157394, -0.10102007538080215, -0.04032368212938309, 0.02269035205245018, 0.057700712233781815, -0.20354925096035004, 0.004540449474006891, -0.23006445169448853, 0.07991089671850204, 0.04350204020738602, -0.22631318867206573, -0.30540236830711365, -0.21694153547286987, 0.2214498221874237, -0.012898305431008339, -0.04391941800713539, 0.02343405969440937, 0.1507759541273117, 0.03175955265760422, -0.0810161828994751, 0.16767261922359467, -0.08090659230947495, 0.03904925659298897, 0.17362038791179657, 0.12728118896484375, -0.09196138381958008, -0.2783716320991516, -0.3630928099155426, 0.023474013432860374, 0.3173169195652008, -0.23527319729328156, 0.014670410193502903, -0.14551560580730438, 0.04554304853081703, -0.007651694118976593, -0.07875733822584152, 0.5167151689529419, 0.13599099218845367, -0.0250540804117918, -0.044886644929647446, 0.004079535603523254, -0.08321946859359741, 0.045928698033094406, 0.12903442978858948, 0.07093779742717743, 0.3557412922382355, 0.04346251115202904, 0.2524475157260895, -0.19931961596012115, -0.3729276657104492, -0.29994601011276245, 0.1988699585199356, 0.09983369708061218, 0.07157911360263824, -0.48462334275245667, 0.26655739545822144, 0.12568669021129608, -0.28038978576660156, -0.06436377763748169, -0.07264828681945801, -0.15847215056419373, -0.16526709496974945, -0.08324620127677917, -0.12824110686779022, -0.11571351438760757, 0.12148307263851166, -0.17386552691459656, -0.06069658324122429, -0.13480201363563538, -0.11010491102933884, 0.0693342462182045, 0.05609152838587761, 0.012464516796171665, 0.45346495509147644, 0.043997567147016525, -0.018562421202659607, -0.14299246668815613, 0.05378070846199989, 0.20131224393844604, -0.019841214641928673, -0.16492336988449097, -0.0192358810454607, -0.02333058975636959, 0.013860012404620647, -0.16047899425029755, 0.11670498549938202, 0.874385416507721, -0.10534659773111343, 0.03921378776431084, 0.1754385083913803, -0.321591854095459, -0.24803169071674347, 0.03423772752285004, -0.3715789318084717, -0.3055802881717682, 0.061450760811567307, 0.20856736600399017, -0.11381179839372635, -0.12568393349647522, 0.3286096453666687, 0.30077993869781494, -0.18762417137622833, -0.24295134842395782, 0.226459339261055, -0.06087525933980942, -0.39767712354660034, 0.06340175867080688, 0.09865924715995789, 0.018280331045389175, -0.12873387336730957, -0.015914639458060265, -0.3286941349506378, -0.07865610718727112, 0.32006943225860596, -0.08871205896139145, -0.16689154505729675, -0.08836730569601059, 0.19265471398830414, -0.039585914462804794, 0.22572609782218933, 0.13781952857971191, 0.11934907734394073, 0.027498265728354454, -0.6537033319473267, 0.17152690887451172, 0.05056679621338844, 0.4162429869174957, -0.19991274178028107, 0.034475892782211304, -0.16581471264362335, -0.09215232729911804, 0.22525125741958618, -0.2954201400279999, 0.12159058451652527, -0.03437616676092148, 0.14897584915161133, -0.42043447494506836, -0.3190881311893463, 0.29728999733924866, 0.2758485674858093, -0.12644460797309875, 0.03623683378100395, -0.1070566400885582, -0.49728813767433167, 0.20067718625068665, 0.4948275685310364, 0.8818396329879761, -0.01735560968518257, 0.23648479580879211, -0.04857095703482628, -0.20043054223060608, 0.5380058884620667, -0.0032377277966588736, -0.020133422687649727, -0.28224632143974304, -0.3579155504703522, -0.15456430613994598, -0.26933857798576355, 0.3293358087539673, 0.5125815868377686, -0.5189642906188965, 0.23955516517162323, -0.21726414561271667, -0.005756421480327845, 0.19216619431972504, 0.08041345328092575, 0.2758346199989319, -0.5404213666915894, 0.021334754303097725, 0.18453842401504517, -0.0028101333882659674, 0.18117566406726837, -0.010338131338357925, -0.1743306964635849, -0.14443062245845795, 0.26762548089027405, -0.14159296452999115, -0.00993014220148325, -0.24880674481391907, -0.0028001219034194946, -0.16350586712360382, -0.3484615087509155, 0.6934313774108887, 0.2555440068244934, 0.2147723287343979, 0.22177837789058685, -0.057855863124132156, -0.013601470738649368, -0.16445904970169067, 0.3608770966529846, 0.037006501108407974, -0.3177412152290344, 0.5784928798675537, 0.03488186001777649, 0.061187587678432465, 0.040362343192100525, 0.045563954859972, -0.08435283601284027, 0.10054921358823776, -0.15194281935691833, 0.11859150230884552, -0.3325747847557068, -0.02504623681306839, 0.10562264919281006, -0.009645831771194935, -0.11249502003192902, 0.14914461970329285, 0.23612189292907715, 0.041629813611507416, 0.2985835671424866, 0.290743887424469, -0.33935776352882385, -0.029011037200689316, 0.15575583279132843, 0.5326724648475647, -0.006044221110641956, 0.20886215567588806, -0.2699061334133148, -0.2365812212228775, -0.4026522934436798, 0.26716160774230957, 0.11954063177108765, -0.39097434282302856, 0.3062414824962616, -0.0393647663295269, -0.06122893840074539, 0.04923173785209656, -0.38518574833869934, 0.30855226516723633, 0.2617303431034088, -0.28581660985946655, -0.3528086543083191, -0.3455171287059784, -0.03814104571938515, 0.11074722558259964, 0.10793188214302063, 0.00007626079604960978, 0.35727962851524353, 0.24430601298809052, 0.03758779168128967, -0.3780190348625183, -0.0753517672419548, -0.025206053629517555, 0.07985282689332962, 0.16354885697364807, 0.0765359029173851, -0.3550303280353546, 0.10565236955881119, 0.0826992318034172, -0.07145386189222336, -0.16293980181217194, -0.27784958481788635, -0.17338286340236664, 0.12104645371437073, 0.09081028401851654, 0.2292817085981369, -0.0004705759638454765, 0.12548211216926575, -0.03140214458107948, -0.04686149209737778, 0.06336961686611176, 0.07096163183450699, -0.04594068601727486, 0.28663796186447144, 0.24124231934547424, -0.1901993751525879, -0.31512388586997986, 0.07310544699430466, 0.035177044570446014, -0.055633850395679474, -0.1957438588142395, 0.35963377356529236, 0.19820576906204224, 0.09169062227010727, -0.47915568947792053, 0.07730074971914291, 0.16452473402023315, -0.08975587785243988, 0.3933250308036804, -0.07313266396522522, 0.3916722536087036, 0.4886706471443176, 0.0866587832570076, -0.06322517991065979, -0.16469597816467285, 0.0011306579690426588, 0.10729523003101349, 0.21241864562034607, -0.3923546373844147, 0.10344230383634567, 0.2767430543899536, 0.0379575714468956, 0.03269428759813309, 0.2100822478532791, -0.13459639251232147, 0.23817701637744904, -0.11697528511285782, -0.07819841802120209, 0.4796941578388214, -0.33709612488746643, 0.36420780420303345, 0.6463413238525391, -0.1479431539773941, 0.0617980882525444, 0.4965006709098816, 0.07117174565792084, -0.01957438699901104, 0.34927499294281006, 0.09803824871778488, 0.46783167123794556, 0.005631701555103064, -0.006190817803144455, 0.4555327892303467, 0.1775166243314743, 0.1988166719675064, 0.6114426851272583, -0.06006675586104393, -0.028298798948526382, 0.02394612319767475, -0.14313748478889465, -0.056723613291978836, -0.324642539024353, 0.027753708884119987, 0.2988836169242859, -0.2211218625307083, 0.33212679624557495, -0.1391836255788803, -0.08116768300533295, 0.07641719281673431, -0.34673038125038147, -0.22390581667423248, -0.34993240237236023, 0.36921173334121704, 0.06603245437145233, -0.036987751722335815, 0.06414266675710678, 0.16766692698001862, -0.02178317680954933, 0.05893317982554436, -0.1439836025238037, -0.19387121498584747, 0.1554632931947708, 0.09185511618852615, 0.11438586562871933, 0.6183263659477234, 0.14135795831680298, 0.22683309018611908, -0.026636742055416107, 0.045473501086235046, -0.21947729587554932, -0.26958632469177246, -0.02958017773926258, 0.2105143517255783, -0.24848517775535583, -0.18525171279907227, 0.26316747069358826, 0.26065197587013245, -0.14934247732162476, 0.2405785173177719, 0.08955105394124985, 0.16320084035396576, -0.24390821158885956, 0.25727421045303345, 0.19719809293746948, -0.1521504670381546, -0.04664105549454689, 0.19722169637680054, -0.13806186616420746, -0.08383206278085709, 0.547649085521698, -0.4606725871562958, 0.019235070794820786, 0.014285112731158733, 0.07617952674627304, 0.1886262446641922, 0.211513489484787, 0.10032755136489868, -0.04006025567650795, -0.023813050240278244, 0.03714725002646446, -0.3171057403087616, 0.08326481282711029, 0.14692987501621246, -0.09470783174037933, -0.18919885158538818, -0.10042692720890045, 0.10864700376987457, 0.3245387375354767, 0.06717237830162048, -0.14242978394031525, -0.13956589996814728, 0.13004979491233826, -0.17661415040493011, -0.07182426005601883, 0.3381156623363495, 0.2639378309249878, 0.07753966003656387, -0.33541232347488403, 0.06844332814216614, 0.3268902003765106, 0.06509792059659958, -0.047522831708192825, 0.36193448305130005, 0.1386045217514038, 0.15871956944465637, 0.2067413479089737, 0.09013109654188156, 0.5049050450325012, -0.06866198033094406, 0.16379274427890778, 0.37045446038246155, -0.07327970862388611, -0.26274383068084717, 0.39999350905418396, 0.204880952835083, -0.030037952587008476, -0.25294098258018494, -0.13918429613113403, 0.16660204529762268, -0.18997526168823242, 0.0365460105240345, 0.06697895377874374, -0.8383824825286865, 0.06006553769111633, -0.11592130362987518, -0.009171810932457447, 0.16603019833564758, 0.05949870124459267, 0.0017780623165890574, -0.021466819569468498, -0.013974686153233051, -0.30643609166145325, 0.3038732707500458, 0.040573202073574066, -0.3939802646636963, -0.1428617238998413, -0.16342540085315704, -0.2189144492149353, 0.1842784285545349, -0.09426245838403702, 0.009632132016122341, 0.44709110260009766, -0.10432375222444534, 0.33530595898628235, 0.23664036393165588, 0.0734262764453888, 0.005556764546781778, -0.22749412059783936, 0.5061415433883667, -0.3077508509159088, -0.17950119078159332, -0.21115094423294067, -0.17409859597682953 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
There are already a few transformations that you can apply on a dataset using methods like `dataset.map()`. You can find examples in the documentation here: https://huggingface.co/docs/datasets/processing.html You can merge two datasets with `concatenate_datasets()` or do label extraction with `dataset.map()` for example
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
41
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). There are already a few transformations that you can apply on a dataset using methods like `dataset.map()`. You can find examples in the documentation here: https://huggingface.co/docs/datasets/processing.html You can merge two datasets with `concatenate_datasets()` or do label extraction with `dataset.map()` for example
[ -0.4685247838497162, -0.23068057000637054, -0.05315738916397095, 0.14103932678699493, 0.37909868359565735, -0.19871503114700317, 0.3367202579975128, 0.16955861449241638, 0.1045028567314148, 0.1931907683610916, -0.17467616498470306, 0.28939753770828247, -0.2316427379846573, 0.5593628287315369, 0.08683664351701736, -0.2147054374217987, -0.15761545300483704, 0.32449477910995483, -0.4510013163089752, -0.09339147061109543, -0.20451359450817108, -0.15179085731506348, 0.08597425371408463, 0.04350501298904419, -0.20522885024547577, -0.2564642131328583, -0.05032186582684517, -0.18086659908294678, -0.092927947640419, -0.02069046162068844, 0.39564064145088196, 0.22751310467720032, -0.1231827586889267, 0.4610511362552643, -0.00009944683552021161, -0.10746829211711884, -0.1551022231578827, -0.09259678423404694, 0.10216858237981796, -0.168192058801651, -0.1254185438156128, -0.08463314175605774, 0.022099118679761887, -0.267852246761322, -0.5002475380897522, -0.10915371775627136, -0.03184868395328522, 0.0631248950958252, 0.5358988046646118, -0.010313753969967365, 0.29587656259536743, 0.00978911854326725, -0.015897898003458977, -0.11695140600204468, -0.006982460152357817, 0.2734377086162567, -0.1275932639837265, -0.018072789534926414, 0.17401152849197388, 0.2556478679180145, -0.19455347955226898, 0.3934062719345093, -0.0161711648106575, -0.032958582043647766, 0.6259975433349609, 0.014366981573402882, 0.054763082414865494, -0.407156378030777, -0.2678073048591614, 0.46987518668174744, 0.30690720677375793, -0.23419189453125, -0.41588327288627625, -0.42409536242485046, 0.14179889857769012, -0.043688565492630005, 0.018205098807811737, 0.08187998086214066, -0.01911049149930477, 0.2180839329957962, -0.3345589339733124, -0.22628697752952576, -0.25507429242134094, -0.08484084904193878, -0.4569258689880371, 0.15570160746574402, -0.15812024474143982, -0.032084766775369644, 0.2083066999912262, -0.10934703052043915, -0.05707553029060364, 0.23321722447872162, 0.07701152563095093, 0.12421852350234985, -0.1319325864315033, -0.46676161885261536, -0.24043415486812592, 0.24204471707344055, 0.0641128346323967, 0.09259410202503204, -0.10185251384973526, 0.036471880972385406, -0.1074582114815712, 0.17890623211860657, -0.001942309201695025, 0.3197197914123535, -0.01815112493932247, 0.08710493892431259, 0.2844577133655548, -0.09844445437192917, -0.07802179455757141, 0.14268173277378082, 0.1567530781030655, -0.1871575266122818, -0.10856129974126816, -0.047767311334609985, 0.07163824886083603, -0.12147293984889984, 0.05116400867700577, -0.30870187282562256, 0.2672423720359802, 0.17209509015083313, -0.11213775724172592, 0.2878982424736023, 0.015388727188110352, 0.20372727513313293, 0.3953179121017456, 0.17936971783638, 0.17633531987667084, -0.14846491813659668, -0.0825691819190979, 0.18028861284255981, -0.04941065236926079, -0.019670983776450157, -0.0038546451833099127, -0.03780148923397064, -0.029367273673415184, 0.02613910473883152, -0.08892805874347687, 0.3310033977031708, -0.08216718584299088, -0.1042410358786583, 0.2652434706687927, 0.1671464741230011, -0.2829815745353699, -0.2588632106781006, 0.07455214112997055, -0.1645919382572174, -0.23826773464679718, -0.013722669333219528, -0.17087332904338837, 0.07976560294628143, 0.018604349344968796, 0.27741047739982605, -0.003512331284582615, -0.08648096024990082, -0.21165668964385986, 0.40363067388534546, -0.012850590981543064, -0.09909208863973618, 0.04066912457346916, -0.17359411716461182, -0.19436240196228027, -0.0251163262873888, 0.08863342553377151, -0.05991446599364281, -0.32927417755126953, -0.49427512288093567, 0.1610182374715805, -0.1373925507068634, -0.04528297483921051, 0.2936731278896332, -0.03899523243308067, 0.1977720707654953, -0.06221037730574608, -0.08020898699760437, 0.49395185708999634, -0.10655554383993149, -0.18149664998054504, 0.06813943386077881, -0.33994802832603455, -0.018411895260214806, 0.008344447240233421, 0.3178717792034149, 0.2948329448699951, -0.0164956022053957, -0.3483884036540985, 0.3703300356864929, -0.07521028816699982, 0.14979788661003113, 0.10503682494163513, -0.286467581987381, 0.2458958923816681, 0.06297220289707184, 0.2355772703886032, 0.25379908084869385, -0.0692673921585083, 0.11178488284349442, -0.07534930855035782, -0.4083537757396698, 0.20055338740348816, 0.07484299689531326, 0.25692543387413025, -0.03208628296852112, -0.10398269444704056, -0.4349063038825989, -0.1174091175198555, -0.10575693100690842, -0.17698541283607483, 0.23050813376903534, 0.28359454870224, -0.28353583812713623, -0.050457000732421875, -0.24058273434638977, -0.13281875848770142, -0.15751445293426514, 0.25841179490089417, -0.20404528081417084, 0.22211575508117676, -0.3294779658317566, -0.1069270446896553, 0.4259644150733948, 0.10779128968715668, 0.2475835233926773, -0.49182772636413574, 0.08941089361906052, 0.04324353486299515, 0.06139560416340828, 0.037855081260204315, 0.06427952647209167, -0.15450268983840942, -0.2567334771156311, 0.07156643271446228, 0.0709938034415245, -0.08628558367490768, 0.08285466581583023, -0.0011879326775670052, 0.32274964451789856, 0.2609708607196808, -0.0784020870923996, 0.14390906691551208, -0.0525297187268734, 0.17882642149925232, 0.043389465659856796, -0.43055209517478943, 0.6129770278930664, 0.01800268515944481, 0.17224645614624023, -0.04841824993491173, 0.0495319627225399, 0.3008768558502197, -0.33059945702552795, -0.014369925484061241, -0.19494323432445526, -0.14801855385303497, -0.13013584911823273, 0.29369673132896423, 0.10754226893186569, -0.255398690700531, -0.02358921989798546, 0.27605846524238586, 0.03844209015369415, 0.19505935907363892, 0.32941439747810364, -0.2586318254470825, 0.2395891547203064, -0.06543567776679993, 0.37129104137420654, 0.20401383936405182, 0.35696694254875183, -0.16672061383724213, 0.2390264868736267, 0.032015472650527954, -0.004614280071109533, 0.18885736167430878, -0.03382258862257004, 0.2357213795185089, 0.07838200032711029, 0.048915982246398926, 0.1945626437664032, -0.22780604660511017, -0.20590364933013916, -0.264570415019989, 0.0031588308047503233, -0.203365296125412, 0.003446610877290368, -0.19672580063343048, -0.14503636956214905, -0.23931914567947388, 0.01001697313040495, -0.3171902894973755, -0.07846676558256149, 0.1861802339553833, 0.11252135783433914, -0.2316170185804367, 0.11884083598852158, 0.2403348833322525, 0.2831951379776001, 0.19869957864284515, -0.020386526361107826, -0.12751558423042297, -0.1675504893064499, 0.10662428289651871, 0.21948279440402985, -0.1370416134595871, 0.09778086841106415, 0.4182056486606598, -0.41186875104904175, 0.12386737763881683, -0.2679353952407837, -0.4999009370803833, 0.2685491442680359, -0.1570933312177658, 0.22568905353546143, 0.33859795331954956, 0.14909368753433228, 0.029423382133245468, -0.018831493332982063, 0.08592473715543747, -0.15405389666557312, -0.2891170084476471, -0.068782739341259, -0.21526356041431427, 0.06951569020748138, -0.13394732773303986, -0.17378437519073486, -0.23381732404232025, -0.35813286900520325, 0.3657940924167633, 0.1533704400062561, 0.04517175629734993, 0.010571036487817764, 0.008277816697955132, -0.03100709244608879, -0.21544872224330902, 0.30046647787094116, -0.2189868539571762, -0.17807450890541077, 0.2259611189365387, -0.07192957401275635, -0.1818496584892273, -0.23605626821517944, -0.1790878027677536, 0.06738083809614182, 0.2620018422603607, -0.1796705275774002, -0.29520705342292786, -0.2022518366575241, 0.20449890196323395, 0.07635673135519028, 0.11472594738006592, 0.5687103271484375, 0.10932852327823639, -0.17922137677669525, -0.055511921644210815, -0.022950701415538788, 0.10115785151720047, 0.15971866250038147, 0.059347763657569885, -0.02602609619498253, 0.36849644780158997, -0.03899798169732094, 0.3227411210536957, -0.3008691072463989, -0.47587746381759644, -0.061968401074409485, -0.058989666402339935, 0.21560870110988617, 0.041600435972213745, -0.2979399561882019, 0.22788335382938385, 0.04417808726429939, 0.019154595211148262, 0.14818787574768066, -0.048699282109737396, 0.011145882308483124, -0.23109330236911774, -0.15891717374324799, -0.22453705966472626, -0.31709033250808716, 0.04283125326037407, 0.24250327050685883, -0.05015958473086357, -0.07107876241207123, 0.018423588946461678, -0.07545731961727142, 0.05621024966239929, 0.1994459629058838, 0.4151168167591095, 0.08475037664175034, -0.02350512333214283, -0.21098658442497253, 0.1167982742190361, -0.024234265089035034, 0.24196726083755493, -0.06833267211914062, -0.224635511636734, 0.005717893596738577, -0.2587054669857025, -0.14849285781383514, -0.1356758028268814, 0.6416298747062683, 0.0848638042807579, 0.07675378024578094, -0.017906254157423973, -0.46462753415107727, -0.29708966612815857, 0.20672963559627533, -0.3552080988883972, -0.22205883264541626, 0.15041251480579376, 0.34583836793899536, -0.35622918605804443, -0.2923681437969208, 0.16447602212429047, 0.3387872576713562, -0.3072397708892822, -0.0829119086265564, -0.0008132258662953973, -0.12631237506866455, -0.3773188292980194, 0.20552827417850494, 0.03855272755026817, -0.07713237404823303, 0.0005985785974189639, -0.0592508465051651, -0.3329601287841797, -0.11860641837120056, 0.2515355348587036, 0.3139459192752838, 0.0628119632601738, -0.1446581482887268, 0.01714923046529293, 0.10513360798358917, 0.4406680166721344, 0.041891008615493774, 0.2494480162858963, 0.023510437458753586, -0.5702093243598938, -0.013386761769652367, 0.04227496683597565, 0.15090657770633698, -0.0021074372343719006, 0.12467890232801437, -0.010500014759600163, -0.0035682106390595436, 0.30546656250953674, -0.44060876965522766, 0.2906222343444824, -0.031088491901755333, 0.17822791635990143, -0.25485163927078247, -0.10460525751113892, 0.40591564774513245, 0.18762455880641937, -0.2115994095802307, -0.000697807059623301, 0.2190539687871933, -0.44858893752098083, 0.2102266252040863, 0.3379160463809967, 0.8208333849906921, -0.02207230217754841, 0.1324448436498642, 0.22208748757839203, -0.05619461089372635, 0.4963650405406952, -0.1502447873353958, 0.032530829310417175, -0.26915067434310913, -0.3934501111507416, -0.13576853275299072, -0.06528874486684799, 0.2102765440940857, 0.24373145401477814, -0.38134291768074036, 0.36415258049964905, -0.04969777166843414, -0.15864688158035278, -0.07656623423099518, 0.032895445823669434, 0.14871834218502045, -0.5673127174377441, -0.419462651014328, 0.25726518034935, -0.16187845170497894, 0.2847169041633606, -0.003560248762369156, -0.13183800876140594, -0.08765799552202225, 0.04572877287864685, 0.09723249822854996, -0.04412433132529259, -0.3256535828113556, -0.2421281337738037, 0.0073954216204583645, -0.20838503539562225, 0.3350386619567871, 0.2558932602405548, 0.30959364771842957, 0.19815844297409058, -0.1272193193435669, 0.11926782131195068, -0.28531205654144287, 0.3346182107925415, -0.09156695753335953, -0.1033792495727539, 0.5256096720695496, -0.030811170116066933, 0.03211827576160431, -0.11503279209136963, 0.08190134912729263, -0.1203010305762291, 0.4231550395488739, -0.20499379932880402, -0.09531767666339874, -0.39099860191345215, 0.04882353916764259, 0.08005338162183762, 0.10957597196102142, -0.18680693209171295, 0.21176601946353912, 0.16076257824897766, -0.11719487607479095, 0.2752372920513153, 0.40200138092041016, -0.25435224175453186, -0.12543827295303345, 0.24942195415496826, 0.22247210144996643, 0.13150154054164886, 0.019878968596458435, -0.22106601297855377, -0.2818225920200348, -0.4306579530239105, 0.07077430188655853, 0.20525731146335602, -0.4010016620159149, 0.3377911448478699, 0.09767378866672516, -0.3812923729419708, -0.11812622845172882, 0.11453843861818314, 0.3145773112773895, 0.04291107505559921, -0.1349579244852066, -0.3282351493835449, -0.5083824396133423, 0.14490726590156555, 0.042173124849796295, 0.1967897117137909, 0.22567255795001984, 0.3546481430530548, 0.04953661561012268, 0.2430291324853897, -0.48197710514068604, -0.08268991857767105, -0.20950143039226532, 0.19999167323112488, 0.2634356617927551, -0.017115425318479538, -0.03749151900410652, 0.02639869414269924, 0.1727619469165802, -0.059601686894893646, -0.21504996716976166, -0.36609166860580444, -0.3127807378768921, 0.061279963701963425, -0.14530424773693085, 0.18232165277004242, 0.09409461915493011, 0.2562640607357025, -0.07554320991039276, -0.2365216612815857, 0.3544233441352844, 0.09062765538692474, 0.028078844770789146, 0.3455359935760498, 0.17912079393863678, -0.20065346360206604, -0.1870821863412857, -0.018530603498220444, 0.0946885272860527, -0.11021073162555695, -0.20369184017181396, 0.1857883185148239, -0.19227810204029083, -0.007223797030746937, 0.016615789383649826, 0.1514561027288437, 0.30994337797164917, -0.1421372890472412, 0.3326794505119324, 0.17622849345207214, 0.08304525166749954, 0.5306999087333679, 0.28765371441841125, -0.03431098535656929, -0.027517877519130707, 0.12354099005460739, 0.23192285001277924, 0.352450430393219, -0.5596112608909607, 0.09309206902980804, 0.3111479878425598, -0.13095511496067047, 0.3483593761920929, 0.3157458007335663, 0.02329328842461109, 0.19967244565486908, -0.0048856609500944614, -0.06492197513580322, 0.266897588968277, -0.30598655343055725, 0.13534823060035706, 0.36438819766044617, -0.15115490555763245, 0.008681317791342735, 0.4588140547275543, 0.12982845306396484, 0.16626471281051636, 0.15356439352035522, -0.016384918242692947, 0.40124645829200745, -0.11603027582168579, 0.024524208158254623, 0.45412927865982056, -0.0029641781002283096, 0.021549489349126816, 0.36195406317710876, 0.08465570956468582, 0.08487807214260101, 0.15446321666240692, 0.16458489000797272, -0.12455136328935623, -0.452375590801239, -0.08469939976930618, 0.4605713486671448, -0.217618927359581, 0.05250975489616394, -0.15128788352012634, -0.12918423116207123, 0.0573185496032238, -0.1781861037015915, -0.07563777267932892, -0.2884867787361145, 0.4399871826171875, 0.06055576354265213, 0.15383435785770416, -0.03797759488224983, -0.028966782614588737, -0.042991530150175095, 0.24989618360996246, -0.07695265859365463, 0.020879771560430527, 0.2935594618320465, 0.022123821079730988, 0.21360382437705994, 0.6038639545440674, 0.1448429375886917, -0.08494370430707932, -0.16045530140399933, 0.19327011704444885, -0.24756139516830444, -0.20249558985233307, -0.21259628236293793, -0.03106049820780754, -0.21452684700489044, -0.16878202557563782, 0.3770325481891632, 0.3230583667755127, -0.24931013584136963, 0.12878842651844025, -0.1560344398021698, 0.2232082486152649, -0.20346084237098694, 0.1954643279314041, 0.20166738331317902, -0.13288094103336334, -0.28704407811164856, -0.05390574783086777, -0.12113509327173233, 0.09983617812395096, 0.16051270067691803, -0.4364561140537262, 0.16860976815223694, 0.012498045340180397, 0.14889314770698547, 0.23132702708244324, 0.2973576486110687, 0.07013150304555893, -0.060089707374572754, 0.10384278744459152, 0.0233303252607584, -0.45501986145973206, 0.058087047189474106, 0.33594077825546265, -0.16377902030944824, -0.19795377552509308, -0.18825370073318481, 0.07784847915172577, 0.31846413016319275, 0.02434862032532692, -0.2890489101409912, 0.09324286878108978, -0.0799017921090126, -0.27696511149406433, -0.0069262124598026276, -0.0820760652422905, 0.1544283777475357, 0.2809631824493408, -0.3392108082771301, -0.05509667098522186, 0.14504635334014893, 0.17001529037952423, 0.05634918436408043, 0.46602725982666016, -0.21883907914161682, -0.007285748142749071, 0.20618654787540436, 0.25296536087989807, 0.3293139338493347, -0.3406134247779846, 0.184725821018219, 0.38147154450416565, -0.15141205489635468, -0.5562722682952881, 0.16682080924510956, 0.13184818625450134, 0.22879287600517273, -0.06721197068691254, -0.11912707984447479, 0.018122775480151176, -0.003666847711429, 0.13342861831188202, 0.05853772535920143, -0.6600282788276672, 0.2794375717639923, 0.028212102130055428, -0.17848028242588043, 0.13719281554222107, 0.3119848966598511, -0.05576854571700096, -0.14054977893829346, -0.11890505254268646, -0.32300060987472534, 0.4701818823814392, -0.03202681988477707, -0.24592970311641693, -0.07235530763864517, -0.09050023555755615, 0.04801134765148163, -0.1316295713186264, -0.32484883069992065, 0.1184534877538681, 0.20897096395492554, -0.06440360099077225, 0.06767547875642776, 0.1719876080751419, -0.18988265097141266, -0.24440306425094604, -0.22526301443576813, 0.5100144147872925, 0.09942727535963058, -0.20927484333515167, -0.2593584656715393, -0.20649650692939758 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
Ok, sure. Thanks for pointing on functional part. My question is more “Philosophical”/Design perspective. There are 2 perspetive: Add transformation methods to Dataset Class OR Create a Transformer Class which operates on Dataset Class. T(Dataset) —> Dataset datasetnew = MyTransform.transform(dataset) datasetNew.save(path) What would be the difficulty of implementing a Transformer Class operating at dataset level ? thanks > On Jul 6, 2021, at 22:00, Quentin Lhoest ***@***.***> wrote: > >  > There are already a few transformations that you can apply on a dataset using methods like dataset.map(). > You can find examples in the documentation here: > https://huggingface.co/docs/datasets/processing.html > > You can merge two datasets with concatenate_datasets() or do label extraction with dataset.map() for example > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
142
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). Ok, sure. Thanks for pointing on functional part. My question is more “Philosophical”/Design perspective. There are 2 perspetive: Add transformation methods to Dataset Class OR Create a Transformer Class which operates on Dataset Class. T(Dataset) —> Dataset datasetnew = MyTransform.transform(dataset) datasetNew.save(path) What would be the difficulty of implementing a Transformer Class operating at dataset level ? thanks > On Jul 6, 2021, at 22:00, Quentin Lhoest ***@***.***> wrote: > >  > There are already a few transformations that you can apply on a dataset using methods like dataset.map(). > You can find examples in the documentation here: > https://huggingface.co/docs/datasets/processing.html > > You can merge two datasets with concatenate_datasets() or do label extraction with dataset.map() for example > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
[ -0.10654173791408539, -0.0538383424282074, 0.026053549721837044, 0.14303100109100342, 0.3365960121154785, -0.13995900750160217, 0.5725405216217041, -0.03391559422016144, -0.052186112850904465, 0.16315801441669464, 0.11685654520988464, 0.24485844373703003, -0.462017297744751, 0.43270453810691833, 0.2910209596157074, -0.3197539150714874, 0.06042967364192009, 0.21103854477405548, -0.5410811901092529, -0.053649090230464935, -0.37125569581985474, -0.335592120885849, -0.053156040608882904, 0.05808768793940544, -0.21992264688014984, -0.1509217768907547, -0.12715552747249603, -0.17568525671958923, -0.14857123792171478, 0.07267819344997406, 0.7325076460838318, 0.05477982759475708, 0.17945455014705658, 0.6730666756629944, -0.00011880609963554889, -0.03874862939119339, -0.017558369785547256, -0.05006065219640732, -0.014885799959301949, -0.39879941940307617, -0.21084560453891754, -0.1249510794878006, -0.025034885853528976, -0.3303226828575134, -0.1954076886177063, -0.015498340129852295, 0.05616901069879532, -0.04345481097698212, 0.36257484555244446, -0.059580765664577484, 0.10465461015701294, -0.26999014616012573, -0.06583742797374725, 0.04670216143131256, -0.11548444628715515, 0.3715499937534332, -0.27966538071632385, 0.0010370095260441303, 0.17316488921642303, 0.3063555061817169, -0.028839243575930595, 0.0741661861538887, 0.08594515174627304, -0.31879234313964844, 0.9122115969657898, -0.07091792672872543, -0.03849219158291817, -0.396864652633667, -0.2046210616827011, 0.24446280300617218, 0.45993945002555847, -0.2721915543079376, -0.6343579292297363, -0.26576969027519226, 0.07097429782152176, 0.15893010795116425, 0.2296384572982788, -0.005880762357264757, 0.09211140871047974, 0.2785586416721344, -0.32457220554351807, -0.23609758913516998, -0.4755643606185913, 0.09383704513311386, -0.5276673436164856, 0.050612904131412506, -0.1485307514667511, 0.015501309186220169, 0.06218816339969635, -0.07446707785129547, 0.19515806436538696, 0.09761564433574677, 0.2587229609489441, 0.23564228415489197, -0.2632690966129303, -0.3962753713130951, -0.15439581871032715, 0.26651090383529663, -0.03981316089630127, -0.05344166234135628, -0.1178399845957756, -0.10951220989227295, -0.15198737382888794, 0.13212157785892487, 0.24454054236412048, 0.3347282111644745, -0.06788568943738937, 0.17465248703956604, 0.23869803547859192, -0.31498104333877563, 0.0606372132897377, 0.01930966228246689, 0.007584100589156151, -0.10748540610074997, 0.06356614828109741, 0.029093965888023376, 0.2385459989309311, -0.05910927429795265, 0.2498934417963028, -0.2912392318248749, -0.10806845128536224, -0.015994442626833916, -0.1475115269422531, 0.022848183289170265, 0.2536226212978363, 0.39712148904800415, 0.3115744888782501, 0.06939291954040527, 0.3559367060661316, -0.13714870810508728, 0.12343867868185043, 0.08962920308113098, -0.20771215856075287, -0.008513854816555977, 0.025432316586375237, -0.08829471468925476, -0.27008238434791565, -0.04131171479821205, -0.05176350846886635, 0.3604639172554016, 0.01321959588676691, -0.43511858582496643, 0.12184347957372665, 0.32195910811424255, -0.4701117277145386, -0.21497368812561035, -0.13251443207263947, -0.019255880266427994, -0.14249835908412933, 0.40757516026496887, -0.13375067710876465, -0.1032080128788948, 0.2736286520957947, 0.08550076186656952, 0.013680903241038322, 0.09059251844882965, -0.6206729412078857, 0.3858293890953064, 0.03931839391589165, -0.18486320972442627, 0.04010172560811043, -0.343100905418396, -0.15242649614810944, -0.18201564252376556, -0.17303822934627533, -0.027577463537454605, -0.48801788687705994, -0.32472074031829834, -0.05896804481744766, -0.007816260680556297, 0.0338277705013752, 0.28751569986343384, -0.31817662715911865, 0.5770634412765503, -0.06493224948644638, -0.118306003510952, 0.760932445526123, -0.16234469413757324, -0.3263247609138489, 0.13554051518440247, -0.3932285010814667, 0.10560266673564911, -0.028558598831295967, 0.3570360541343689, 0.39347076416015625, -0.3740149140357971, -0.5503361821174622, 0.25179871916770935, -0.050300437957048416, -0.011506601236760616, 0.18893536925315857, -0.19707389175891876, 0.49732890725135803, 0.013382069766521454, 0.26654183864593506, 0.3399259150028229, 0.04658995568752289, 0.34409651160240173, -0.2913910448551178, -0.4086550176143646, 0.2489723116159439, 0.015037632547318935, 0.27128493785858154, -0.00746631296351552, -0.02149197645485401, -0.4259054362773895, -0.20004509389400482, -0.03180929273366928, -0.06189928203821182, 0.32685980200767517, 0.3026996850967407, 0.008340839296579361, 0.15775983035564423, -0.11902274191379547, -0.21913325786590576, -0.2704629600048065, -0.012044140137732029, -0.31859469413757324, 0.32257845997810364, -0.5568807721138, -0.3735564649105072, 0.414218544960022, -0.05405440181493759, 0.23348239064216614, -0.5580812096595764, 0.11569388955831528, 0.023374542593955994, 0.24915571510791779, -0.34818387031555176, -0.00792395044118166, -0.1335955709218979, -0.29170122742652893, -0.09533871710300446, -0.05892917886376381, -0.026133811101317406, -0.1575658619403839, -0.07205596566200256, 0.4762626588344574, 0.2876899838447571, -0.21483245491981506, 0.3182384669780731, 0.062244217842817307, 0.22614116966724396, -0.14589768648147583, -0.3460886478424072, 0.2852136492729187, -0.05357030779123306, 0.3659825026988983, -0.08809636533260345, -0.064837746322155, 0.14044012129306793, -0.22402320802211761, -0.21819037199020386, 0.13990271091461182, -0.11297956109046936, -0.07260407507419586, 0.3441029191017151, 0.1270381212234497, -0.03252071887254715, -0.1819429099559784, 0.2679164409637451, -0.10342120379209518, 0.1382664144039154, 0.47964709997177124, -0.14082689583301544, 0.2142404019832611, -0.3483157753944397, 0.4952421188354492, 0.6219204068183899, 0.1169675961136818, -0.24428997933864594, 0.3060923218727112, 0.2635378837585449, -0.05247527360916138, 0.15046006441116333, 0.11449988186359406, 0.23663336038589478, -0.11068924516439438, 0.011536800302565098, 0.35518911480903625, 0.1476721316576004, -0.4427649676799774, -0.16228245198726654, -0.029641013592481613, -0.10992423444986343, 0.05889609828591347, -0.02872338704764843, -0.23808962106704712, -0.3307723104953766, -0.012986874207854271, -0.10743848979473114, 0.0961223840713501, -0.09994345158338547, -0.19370029866695404, 0.0738498717546463, 0.024385225027799606, 0.17079351842403412, 0.33439669013023376, 0.13048192858695984, -0.12423799186944962, 0.02310878597199917, 0.0867314264178276, 0.10825780779123306, 0.029264157637953758, -0.04911211133003235, 0.03837767615914345, 0.2854855954647064, -0.3548636734485626, 0.10197851806879044, -0.0494280681014061, -0.6258034706115723, 0.20462998747825623, 0.011404778808355331, 0.17095395922660828, 0.36307013034820557, 0.06254984438419342, 0.027403712272644043, 0.04225752502679825, 0.12479809671640396, -0.07410037517547607, -0.23391546308994293, 0.014663257636129856, -0.06866786628961563, 0.17588120698928833, -0.005366178695112467, -0.10264807939529419, -0.1687108427286148, -0.2311035394668579, 0.4608864486217499, 0.12010382860898972, 0.07616763561964035, -0.05850854516029358, -0.20508481562137604, 0.04455988481640816, 0.004125490318983793, 0.2625156044960022, -0.009350364096462727, -0.11286292970180511, 0.22735685110092163, 0.07681284099817276, -0.2224091738462448, -0.24625876545906067, -0.25033727288246155, 0.03418251499533653, 0.5150564312934875, -0.21946558356285095, -0.1157505065202713, -0.09793456643819809, 0.17708128690719604, 0.04434491693973541, 0.13606157898902893, 0.6754917502403259, 0.1972072422504425, 0.10807136446237564, -0.06831128150224686, -0.225761279463768, -0.0008918764069676399, 0.28987428545951843, 0.12438591569662094, 0.46218472719192505, 0.5110158920288086, -0.0024081054143607616, 0.33392134308815, -0.15105770528316498, -0.25827738642692566, -0.27681174874305725, 0.17634741961956024, 0.044319432228803635, 0.0027492260560393333, -0.4018689692020416, 0.29877975583076477, -0.07189669460058212, -0.34135517477989197, -0.06817682832479477, 0.03442040830850601, -0.11981885880231857, -0.2663063406944275, -0.29751625657081604, -0.15941090881824493, -0.2106073796749115, 0.18181785941123962, 0.03931620344519615, 0.18033002316951752, -0.08076179027557373, 0.11648847907781601, -0.0886695384979248, 0.15492507815361023, 0.166734978556633, 0.6605193614959717, 0.257885217666626, -0.00992919597774744, -0.10723960399627686, 0.08720332384109497, 0.040045928210020065, 0.036686841398477554, -0.03735329583287239, 0.11519576609134674, 0.035497333854436874, -0.029695874080061913, -0.1387939453125, -0.07746122777462006, 0.6734221577644348, -0.12638677656650543, -0.05388258025050163, -0.09254603087902069, -0.5396213531494141, -0.20939025282859802, 0.22596214711666107, -0.26507529616355896, -0.22247079014778137, 0.17467093467712402, 0.2993134558200836, -0.1425948292016983, -0.15778902173042297, 0.1220947802066803, 0.40641021728515625, -0.3311169147491455, -0.40636762976646423, 0.05492274463176727, -0.24088825285434723, -0.17785724997520447, -0.13179033994674683, -0.09597437083721161, -0.2433738261461258, 0.03069838508963585, 0.04252991825342178, -0.38387632369995117, 0.00471530994400382, 0.16963690519332886, -0.030225930735468864, -0.24164152145385742, -0.16220080852508545, 0.1318228542804718, 0.1834806501865387, 0.22953857481479645, 0.1789853423833847, 0.18173150718212128, 0.16270968317985535, -0.6273984313011169, 0.12783291935920715, 0.22929950058460236, 0.2480420172214508, 0.015640318393707275, -0.04927860572934151, -0.1301850527524948, 0.048331987112760544, 0.13662749528884888, -0.2756725549697876, -0.0003730657626874745, -0.0455009751021862, 0.3221077024936676, -0.3522964119911194, -0.5900354385375977, 0.3108600974082947, 0.22793695330619812, -0.10288873314857483, -0.15442368388175964, 0.1743735820055008, -0.48224037885665894, 0.13402029871940613, 0.36472564935684204, 0.9555782079696655, -0.017179252579808235, 0.07756257057189941, 0.13080748915672302, -0.06025804579257965, 0.4272617697715759, -0.21838262677192688, 0.0276529248803854, -0.19850902259349823, -0.3663858473300934, -0.31959104537963867, -0.2757727801799774, 0.4778459966182709, 0.4035704433917999, -0.369599848985672, 0.44477057456970215, -0.026855159550905228, 0.08304233849048615, 0.37838590145111084, 0.058767806738615036, 0.2714858949184418, -0.5816076397895813, -0.3119215667247772, 0.08926012367010117, -0.10575931519269943, 0.28056830167770386, -0.10498736798763275, -0.18661610782146454, -0.27182742953300476, 0.07700485736131668, 0.020539503544569016, -0.042792655527591705, -0.3292382061481476, -0.19950632750988007, -0.08506648987531662, -0.21732258796691895, 0.8510027527809143, 0.3416748642921448, 0.29687565565109253, 0.21046778559684753, -0.023610234260559082, -0.1445990651845932, -0.19451631605625153, 0.3003867268562317, 0.20331838726997375, -0.15051834285259247, 0.504975438117981, -0.1062808409333229, 0.05096503347158432, -0.06362924724817276, -0.09441396594047546, -0.20020952820777893, 0.24995189905166626, -0.14954420924186707, 0.01992456056177616, -0.4891408085823059, 0.06579764932394028, 0.07727863639593124, -0.04380631819367409, -0.022082701325416565, 0.0893048495054245, 0.15738122165203094, 0.00384713476523757, 0.3479999005794525, 0.23578478395938873, -0.20184724032878876, -0.06270625442266464, 0.0013765398180112243, 0.36102837324142456, 0.12470521032810211, 0.042896464467048645, -0.3429124653339386, -0.2802807688713074, -0.12544916570186615, 0.24068936705589294, 0.09511677175760269, -0.421135812997818, 0.20907053351402283, 0.06770287454128265, -0.00685236556455493, -0.18502630293369293, 0.02654464729130268, 0.24462249875068665, -0.04675837978720665, -0.40490201115608215, -0.3855031132698059, -0.5006259083747864, 0.10835244506597519, 0.28176194429397583, -0.015572468750178814, 0.07296677678823471, 0.46167075634002686, 0.19580207765102386, 0.1672315001487732, -0.27315080165863037, -0.18455998599529266, 0.05712584778666496, 0.18183885514736176, 0.3260115683078766, -0.12496951222419739, -0.15133899450302124, 0.08860207349061966, -0.04213196784257889, -0.08288275450468063, -0.13714124262332916, -0.13829395174980164, -0.1004507839679718, 0.1704815775156021, 0.14442099630832672, 0.04934827610850334, -0.12902167439460754, 0.018103864043951035, -0.07117540389299393, -0.10995180159807205, 0.11450043320655823, 0.11533181369304657, -0.10273539274930954, 0.2702433466911316, 0.16107742488384247, -0.03359206020832062, -0.5131680369377136, 0.2962310016155243, 0.0904713049530983, 0.03593682870268822, -0.2626495659351349, 0.19541175663471222, -0.0403057225048542, 0.11272591352462769, -0.40778404474258423, 0.20162281394004822, 0.25286737084388733, 0.07665817439556122, 0.4542485177516937, -0.2142670452594757, 0.5300098657608032, 0.45624208450317383, 0.19060161709785461, 0.09426208585500717, -0.13944144546985626, 0.08930946886539459, 0.21378660202026367, 0.05392953380942345, -0.3617953360080719, 0.26425647735595703, 0.3354159891605377, -0.12113869935274124, 0.039302293211221695, 0.4257608652114868, -0.024711623787879944, 0.13401710987091064, -0.16072027385234833, -0.18826571106910706, 0.22889596223831177, -0.19027301669120789, 0.15388840436935425, 0.5479018688201904, -0.18968980014324188, 0.3101465106010437, 0.5182445645332336, 0.22187618911266327, -0.08310484886169434, 0.26892685890197754, 0.12349686771631241, 0.2637135684490204, 0.09053051471710205, -0.02052825130522251, 0.39660900831222534, 0.02871435508131981, 0.06794888526201248, 0.5042470097541809, 0.07376457750797272, -0.21437658369541168, 0.12437206506729126, -0.061074405908584595, -0.09911566227674484, -0.3878374397754669, 0.1565185785293579, 0.22662030160427094, -0.13835009932518005, 0.441070020198822, -0.08695993572473526, -0.02596639283001423, 0.1422654539346695, -0.2406664937734604, -0.32441383600234985, -0.38666456937789917, 0.32531923055648804, 0.13279762864112854, 0.1506994068622589, 0.041624099016189575, -0.07540202140808105, -0.051691990345716476, 0.24636225402355194, -0.06271902471780777, -0.00026121531846001744, 0.22784028947353363, 0.22766928374767303, 0.09294945746660233, 0.539618730545044, 0.07618415355682373, 0.231683149933815, -0.04074646905064583, 0.18270418047904968, -0.22757068276405334, -0.18646779656410217, 0.039115387946367264, 0.19103564321994781, -0.19331514835357666, 0.0038740611635148525, 0.25461071729660034, 0.07402048259973526, -0.037406075745821, 0.22600458562374115, -0.10734450072050095, 0.4486505687236786, -0.38579434156417847, 0.38672149181365967, 0.08281265944242477, -0.13251234591007233, -0.16839370131492615, 0.16303682327270508, -0.11959582567214966, -0.030396660789847374, 0.24657577276229858, -0.3848779797554016, 0.04942712560296059, -0.010487234219908714, 0.029331445693969727, 0.244338259100914, 0.17568153142929077, 0.2190908044576645, 0.15147624909877777, 0.02479521930217743, 0.026575157418847084, -0.30540192127227783, -0.08438926190137863, 0.20601047575473785, -0.18959808349609375, -0.030219241976737976, -0.32391592860221863, 0.09800971299409866, 0.4614946246147156, 0.01375127024948597, -0.3440375328063965, 0.018950778990983963, 0.05979274958372116, -0.10773815959692001, -0.04784788936376572, 0.0716330036520958, 0.3046368956565857, 0.0701381266117096, -0.22738595306873322, -0.025264287367463112, 0.29073774814605713, -0.045555319637060165, 0.07543985545635223, 0.4472019374370575, -0.12306690961122513, 0.06239714473485947, 0.13876284658908844, 0.20460069179534912, 0.39719200134277344, -0.060432594269514084, 0.11158984154462814, 0.34805965423583984, -0.025699205696582794, -0.34300440549850464, 0.4000004827976227, 0.08634872734546661, -0.006771886721253395, -0.19524669647216797, -0.12115228921175003, -0.06401319056749344, -0.29953551292419434, -0.1213255226612091, 0.16044357419013977, -0.7866066098213196, 0.10511943697929382, -0.1982637345790863, -0.21504813432693481, 0.15357163548469543, 0.2690839469432831, -0.04744107648730278, -0.1647905558347702, -0.173992320895195, 0.009541118517518044, 0.41626229882240295, -0.17124499380588531, -0.20352010428905487, -0.06164121255278587, -0.24542608857154846, -0.07948008179664612, 0.012491891160607338, -0.3885914385318756, -0.08112122118473053, 0.2913823127746582, -0.035154808312654495, 0.2398267388343811, 0.19167469441890717, -0.20447270572185516, -0.22091269493103027, -0.13213105499744415, 0.6106514930725098, -0.3881571590900421, -0.043425094336271286, -0.24389220774173737, -0.00931454449892044 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc. I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :)
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
64
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc. I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :)
[ -0.490424782037735, 0.08723032474517822, -0.19068123400211334, -0.08399514853954315, 0.3473586440086365, -0.1753203272819519, 0.3381088078022003, 0.2574363350868225, 0.09037769585847855, 0.01979086734354496, 0.2580317258834839, 0.36186277866363525, -0.3850794732570648, 0.47672149538993835, 0.1930704563856125, -0.23244068026542664, -0.1511344611644745, 0.26518383622169495, -0.4250875413417816, -0.016854163259267807, -0.3289778530597687, -0.15335899591445923, -0.03308875486254692, 0.13287051022052765, 0.0029006910044699907, -0.14663466811180115, -0.0935133621096611, -0.32801902294158936, -0.07021598517894745, -0.10451693087816238, 0.316780686378479, 0.13688696920871735, -0.05560341849923134, 0.43027442693710327, -0.00010566465061856434, -0.10335623472929001, 0.15285982191562653, 0.01724454015493393, 0.02709794230759144, -0.3660883605480194, -0.2878672778606415, -0.2310526967048645, -0.0796365961432457, -0.35150155425071716, -0.2724733352661133, -0.15478645265102386, 0.17596189677715302, -0.34270936250686646, 0.5134333372116089, 0.16262918710708618, 0.249275803565979, -0.26640063524246216, -0.1245226189494133, -0.01068962924182415, -0.05416960269212723, 0.4239855706691742, -0.30337104201316833, -0.5247584581375122, 0.4609452188014984, 0.23065496981143951, -0.10122865438461304, 0.11873398721218109, -0.09940452128648758, -0.19072148203849792, 0.6304563879966736, -0.11569904536008835, -0.09317008405923843, -0.5817269682884216, -0.07845152914524078, 0.2958921790122986, 0.4102664887905121, -0.27051883935928345, -0.47583168745040894, -0.29982322454452515, -0.014563838951289654, 0.1219540685415268, -0.22599336504936218, 0.20291677117347717, -0.02189788967370987, 0.32702168822288513, -0.2893727719783783, -0.22548910975456238, -0.3472731411457062, 0.012036046013236046, -0.22293667495250702, 0.16009114682674408, -0.09787435084581375, -0.025985192507505417, 0.045366883277893066, 0.04036490246653557, 0.23708878457546234, 0.09525232017040253, 0.16542084515094757, 0.14293815195560455, -0.09124228358268738, -0.4284115731716156, -0.1221809834241867, 0.010445675812661648, -0.20884139835834503, 0.2001112401485443, 0.03290017321705818, 0.1262461096048355, -0.018282989040017128, 0.049241650849580765, 0.005421513691544533, 0.13228152692317963, 0.0045804488472640514, 0.0382177010178566, 0.28804710507392883, -0.3633047640323639, -0.031348589807748795, 0.13700486719608307, 0.035436078906059265, 0.021280184388160706, -0.1402965486049652, 0.16610565781593323, 0.014712102711200714, 0.014948843978345394, -0.0016044945223256946, -0.272656112909317, 0.1066768616437912, 0.13367445766925812, -0.13376663625240326, 0.07497929036617279, 0.16004757583141327, 0.34271490573883057, 0.40940961241722107, 0.05671370029449463, 0.24071794748306274, -0.1985294669866562, 0.010068452917039394, 0.17173975706100464, -0.20101867616176605, -0.03145093843340874, 0.0899902880191803, 0.09846080839633942, -0.19028933346271515, -0.08574898540973663, -0.13601061701774597, 0.40322163701057434, 0.25866472721099854, -0.010307547636330128, 0.3266676366329193, 0.287662148475647, -0.3840348422527313, -0.22475886344909668, 0.04783611372113228, -0.021408244967460632, -0.26457011699676514, 0.15716274082660675, -0.28433850407600403, -0.04958634078502655, 0.16544854640960693, 0.2562445104122162, 0.07456766068935394, -0.08259924501180649, -0.25850892066955566, 0.4359450042247772, 0.03506264463067055, -0.12886430323123932, 0.18799731135368347, -0.21532011032104492, -0.20616039633750916, -0.09295405447483063, -0.16135889291763306, -0.08553050458431244, -0.5210270285606384, -0.4330344498157501, -0.2928817570209503, 0.06708589941263199, 0.18551841378211975, 0.1258125752210617, -0.09951914846897125, 0.2549537122249603, -0.05400676280260086, 0.017664199694991112, 0.6603579521179199, -0.17472019791603088, -0.09790265560150146, 0.2688251733779907, -0.3572138547897339, -0.1598704606294632, 0.12790299952030182, 0.40350306034088135, 0.3632652759552002, -0.21253061294555664, -0.4146343767642975, 0.35345420241355896, -0.09096936881542206, 0.00540980976074934, 0.15271712839603424, -0.26825156807899475, 0.24697889387607574, 0.21280816197395325, 0.35049378871917725, 0.2810119092464447, 0.12943324446678162, 0.14013221859931946, -0.11051297932863235, -0.4927366077899933, 0.35316401720046997, -0.03766364976763725, 0.19124408066272736, 0.020649606361985207, 0.0428725928068161, -0.6312662363052368, 0.18813832104206085, -0.11620885133743286, -0.27098414301872253, 0.1082688644528389, 0.2710978090763092, -0.1145075112581253, 0.11726434528827667, -0.15500624477863312, 0.07336264848709106, -0.16303546726703644, 0.23637929558753967, -0.3905518352985382, 0.17087550461292267, -0.2011028379201889, -0.23998922109603882, 0.39378729462623596, 0.009754504077136517, 0.0534660667181015, -0.43605419993400574, 0.14320378005504608, 0.22979339957237244, 0.18558356165885925, -0.16413696110248566, 0.19893231987953186, -0.349107563495636, -0.20439672470092773, 0.0468195378780365, -0.22833675146102905, 0.07345960289239883, 0.0671369656920433, 0.049784090369939804, 0.5814135670661926, 0.25757405161857605, -0.07388908416032791, 0.271572083234787, 0.029742907732725143, 0.15121948719024658, -0.06866434961557388, -0.16900567710399628, 0.6479954719543457, -0.00271325814537704, 0.25563040375709534, -0.1393958032131195, 0.1753908395767212, 0.26691100001335144, -0.3181125521659851, -0.2655095160007477, -0.030037248507142067, -0.03970935195684433, -0.06468464434146881, 0.24214857816696167, 0.04816346615552902, 0.018981095403432846, 0.04628293216228485, 0.2515477240085602, 0.015413443557918072, 0.24255432188510895, 0.3825642168521881, -0.15108902752399445, 0.20118212699890137, -0.1937965303659439, 0.5782844424247742, 0.4915003776550293, 0.20471572875976562, -0.22913365066051483, 0.19659818708896637, 0.1805029809474945, -0.088001549243927, 0.25339144468307495, 0.1599666178226471, 0.305857390165329, 0.032433513551950455, -0.027973361313343048, 0.1396908015012741, -0.06318753212690353, -0.4729796350002289, -0.1748870313167572, -0.05515579134225845, -0.058984577655792236, 0.24671685695648193, -0.29873502254486084, -0.3389692008495331, -0.18293845653533936, -0.05429224297404289, 0.2892731726169586, -0.05133094638586044, 0.2056131660938263, -0.252484530210495, -0.11103039979934692, 0.1603521853685379, -0.029456892982125282, 0.5149573683738708, 0.10222886502742767, -0.04877829551696777, -0.28075799345970154, -0.2141820192337036, 0.07959690690040588, 0.19242413341999054, 0.017153970897197723, 0.03269345313310623, 0.47362032532691956, -0.20526014268398285, 0.35567083954811096, -0.22284731268882751, -0.5828429460525513, 0.0999874696135521, -0.03938145190477371, 0.1567537933588028, 0.34717893600463867, -0.06408420205116272, 0.11750706285238266, -0.08127783238887787, -0.005426728166639805, -0.19490250945091248, -0.28895464539527893, -0.058073777705430984, -0.1537412703037262, -0.06828679144382477, -0.1009427085518837, -0.18541835248470306, -0.3057164251804352, -0.3653063178062439, 0.3621486723423004, 0.016842946410179138, 0.10683269053697586, -0.14641521871089935, -0.052857059985399246, 0.04665451496839523, 0.12019307911396027, 0.11843503266572952, -0.025423862040042877, -0.054498787969350815, 0.13311706483364105, -0.1406107246875763, -0.19210831820964813, -0.2421642243862152, -0.3054255247116089, 0.1779668927192688, 0.35930851101875305, -0.1374824047088623, -0.08648893237113953, -0.17978434264659882, 0.026906318962574005, 0.140541672706604, -0.09509425610303879, 0.5606482625007629, 0.058053504675626755, -0.1028713658452034, -0.14306135475635529, 0.09604887664318085, -0.15945446491241455, 0.14040443301200867, 0.06226538121700287, 0.2014610469341278, 0.48876574635505676, 0.05738365277647972, 0.396676242351532, -0.2763511538505554, -0.5605836510658264, -0.1552896648645401, 0.055917903780937195, -0.1592635214328766, 0.03577306121587753, -0.42233431339263916, 0.11166059225797653, -0.09613600373268127, -0.18437398970127106, 0.014401750639081001, -0.017721273005008698, -0.4235359728336334, -0.09080812335014343, 0.012506287544965744, -0.2403860241174698, -0.10807681083679199, 0.12253706157207489, -0.058638278394937515, 0.12715229392051697, -0.08068186044692993, -0.005404438823461533, -0.0942278504371643, 0.006489155814051628, 0.2501513659954071, 0.31866055727005005, 0.22445814311504364, -0.06712055206298828, -0.08952461928129196, -0.13135620951652527, 0.0592401847243309, 0.1989096701145172, -0.028622444719076157, -0.1292303055524826, -0.09338760375976562, -0.12763793766498566, -0.06058383360505104, -0.09351537376642227, 0.6798672676086426, -0.25858622789382935, -0.18335939943790436, 0.11501769721508026, -0.5211292505264282, -0.21162362396717072, 0.15721604228019714, -0.2936237156391144, -0.13875460624694824, 0.1846015304327011, 0.2109842598438263, -0.004083557985723019, -0.09683089703321457, -0.04368084296584129, 0.05577176809310913, -0.2764882445335388, -0.1382438689470291, 0.17329084873199463, -0.16752000153064728, -0.40469205379486084, 0.04347669705748558, 0.06670447438955307, -0.11909347772598267, -0.16243970394134521, -0.22028709948062897, -0.3782519996166229, 0.01792757585644722, 0.20509327948093414, -0.11876709014177322, -0.30534592270851135, -0.21153154969215393, 0.16287663578987122, -0.0756174698472023, 0.24822083115577698, 0.12177343666553497, 0.011103881523013115, 0.17715822160243988, -0.44121018052101135, 0.2124975323677063, 0.06919144839048386, 0.24685585498809814, -0.07703029364347458, 0.06955893337726593, 0.01367682684212923, 0.09931442141532898, 0.1730928272008896, -0.47687655687332153, 0.0910908505320549, -0.04908956214785576, 0.13108132779598236, -0.17009250819683075, -0.538585901260376, 0.416454553604126, 0.3622056245803833, -0.14253339171409607, 0.19241423904895782, -0.13962340354919434, -0.45834776759147644, 0.310894250869751, 0.5458199977874756, 0.8820569515228271, 0.020246347412467003, 0.18159382045269012, -0.1626458764076233, -0.2520895302295685, 0.3659992218017578, -0.3363489508628845, 0.16344892978668213, -0.3765653371810913, -0.3504270017147064, -0.27775365114212036, -0.16027283668518066, 0.35881808400154114, 0.31633126735687256, -0.44214510917663574, 0.21410904824733734, 0.18541449308395386, -0.2774670124053955, 0.09271293878555298, 0.12229857593774796, -0.006412019021809101, -0.517720639705658, -0.061726540327072144, 0.2326449453830719, 0.01471475325524807, 0.23466458916664124, -0.07671232521533966, -0.21865083277225494, -0.06353244930505753, 0.2925376892089844, -0.2410866767168045, -0.08985932916402817, -0.1945820152759552, 0.07600521296262741, -0.15705743432044983, -0.157939150929451, 0.5903679132461548, 0.2139989137649536, 0.11315540969371796, 0.1655707061290741, -0.15227584540843964, 0.02864646352827549, -0.16785302758216858, 0.29730188846588135, 0.05960793420672417, -0.2248905599117279, 0.529411792755127, -0.0713268294930458, 0.022772904485464096, -0.050037842243909836, 0.09852629899978638, -0.23470251262187958, 0.05668417364358902, -0.01977258175611496, 0.014620366506278515, -0.288188636302948, 0.03744244948029518, 0.06809689104557037, -0.08478481322526932, -0.009779490530490875, 0.20562781393527985, 0.1391352415084839, 0.10218456387519836, 0.48807042837142944, 0.24779129028320312, -0.26983293890953064, -0.018706195056438446, 0.04850192368030548, 0.24337881803512573, -0.028265655040740967, 0.1078597828745842, -0.2474265843629837, -0.30798009037971497, -0.40381258726119995, 0.19363178312778473, -0.08006492257118225, -0.14029765129089355, 0.42410290241241455, 0.0560075007379055, -0.27233973145484924, 0.022789662703871727, -0.2902476489543915, 0.273131400346756, -0.060627423226833344, -0.36738231778144836, -0.44181594252586365, -0.2765260636806488, 0.09843339771032333, -0.0481785386800766, 0.17486222088336945, -0.11950656771659851, 0.15798687934875488, 0.22333504259586334, 0.019256576895713806, -0.40043124556541443, -0.020610392093658447, -0.04667193442583084, 0.07733568549156189, 0.14801189303398132, -0.011920370161533356, -0.39658063650131226, 0.18311023712158203, 0.0164040457457304, 0.0023937728255987167, -0.2839091718196869, -0.2874855697154999, -0.17359896004199982, 0.11511758714914322, -0.05167536064982414, 0.22663244605064392, 0.09732739627361298, 0.14616575837135315, -0.1276879459619522, -0.0839436799287796, 0.01752052828669548, 0.08775041252374649, -0.06572063267230988, 0.39656805992126465, 0.3393174409866333, -0.3135196268558502, -0.12800711393356323, 0.1323915272951126, 0.11971434950828552, 0.010975131765007973, -0.14041373133659363, 0.40495234727859497, 0.22198687493801117, 0.031991634517908096, -0.1367151141166687, 0.17517314851284027, 0.26960623264312744, -0.04333215951919556, 0.5080506801605225, 0.016217362135648727, 0.304981529712677, 0.5331391096115112, 0.0364384800195694, 0.1318991333246231, -0.1432759165763855, 0.1320044994354248, 0.16620591282844543, 0.2966305613517761, -0.28222930431365967, 0.09344527125358582, 0.24856634438037872, 0.09421539306640625, 0.055135760456323624, 0.22992849349975586, 0.1871546059846878, 0.08469497412443161, 0.11093597114086151, -0.13043944537639618, 0.30490782856941223, -0.49423015117645264, 0.24682648479938507, 0.3790174424648285, -0.06944189220666885, 0.027154624462127686, 0.3060772120952606, 0.07165150344371796, 0.06851793080568314, 0.3909010887145996, 0.22719109058380127, 0.5443753600120544, 0.278563916683197, 0.06792274117469788, 0.3333745300769806, 0.09510847926139832, -0.022444043308496475, 0.33891165256500244, -0.13128885626792908, 0.2181159108877182, 0.2518443465232849, -0.03865537792444229, 0.1300685554742813, -0.19979067146778107, -0.1038372740149498, 0.4290378987789154, -0.20540064573287964, 0.08879264444112778, -0.26586583256721497, -0.0644456222653389, 0.13667570054531097, -0.27685582637786865, -0.06329764425754547, -0.1097518727183342, 0.4635694622993469, 0.09020504355430603, 0.07080701738595963, 0.17559488117694855, 0.20308886468410492, -0.13223956525325775, 0.22480253875255585, -0.15673378109931946, -0.19426587224006653, 0.17747624218463898, -0.010163097642362118, 0.147527277469635, 0.4574740529060364, 0.2258291393518448, 0.17317387461662292, -0.43937692046165466, 0.21725372970104218, -0.3352847993373871, -0.20826862752437592, -0.16188673675060272, 0.4071258008480072, -0.13323144614696503, 0.03228636458516121, 0.18163198232650757, 0.27378711104393005, -0.1549273431301117, 0.16820019483566284, -0.019114097580313683, 0.20278386771678925, -0.20839443802833557, 0.5841747522354126, 0.3528767228126526, -0.11910353600978851, -0.11959251016378403, 0.1830761432647705, -0.100672647356987, -0.03531834855675697, 0.497343510389328, -0.5335723757743835, -0.0101908715441823, 0.0372522808611393, 0.11499906331300735, 0.08393281698226929, 0.2910144031047821, 0.10345790535211563, 0.14825399219989777, 0.14195862412452698, -0.037788935005664825, -0.15654467046260834, 0.002148902043700218, 0.2513352036476135, -0.04252377152442932, -0.1603265404701233, -0.14108484983444214, 0.0675836130976677, 0.27083835005760193, -0.026876075193285942, -0.38742631673812866, -0.1746883988380432, 0.1546907275915146, -0.182895228266716, 0.10269365459680557, 0.11120928823947906, 0.2961474657058716, 0.08961261808872223, -0.25458669662475586, -0.07734479010105133, 0.22449937462806702, 0.1373784989118576, -0.04031664505600929, 0.3328830599784851, 0.13044026494026184, 0.12385573238134384, 0.2548814117908478, 0.20910640060901642, 0.4130348861217499, -0.21546630561351776, 0.3468511402606964, 0.23436613380908966, -0.18993894755840302, -0.259122371673584, 0.2467823028564453, 0.11878779530525208, -0.03432561457157135, -0.21980692446231842, -0.23053404688835144, 0.0652121901512146, -0.15308739244937897, 0.005577522329986095, 0.12222956866025925, -0.5944432020187378, 0.01672797091305256, -0.2975139617919922, -0.09412927180528641, -0.0070219216868281364, 0.310941219329834, -0.00017430295702069998, -0.1021808609366417, -0.023492418229579926, -0.2513221204280853, 0.2158101350069046, -0.13683770596981049, -0.4659647047519684, -0.09298311918973923, -0.137057363986969, -0.30588120222091675, 0.15795491635799408, -0.13814079761505127, -0.17422430217266083, 0.3162981867790222, -0.24969032406806946, 0.3183441460132599, 0.21755170822143555, 0.02220272459089756, -0.2063116878271103, -0.2627236545085907, 0.48050376772880554, -0.10959041118621826, -0.09337040781974792, -0.25711074471473694, -0.23900151252746582 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
Thanks for reply. What would be the constraints to have Dataset —> Dataset consistency ? Main issue would be larger than memory dataset and serialization on disk. Technically, one still process at atomic level and try to wrap the full results into Dataset…. (!) What would you think ? > On Jul 7, 2021, at 16:51, Quentin Lhoest ***@***.***> wrote: > >  > I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc. > > I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :) > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
155
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). Thanks for reply. What would be the constraints to have Dataset —> Dataset consistency ? Main issue would be larger than memory dataset and serialization on disk. Technically, one still process at atomic level and try to wrap the full results into Dataset…. (!) What would you think ? > On Jul 7, 2021, at 16:51, Quentin Lhoest ***@***.***> wrote: > >  > I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc. > > I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :) > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
[ -0.42738857865333557, 0.20382387936115265, -0.08927103132009506, 0.06771692633628845, 0.5223817229270935, -0.13401207327842712, 0.3225385546684265, 0.19111192226409912, 0.013091424480080605, 0.061537954956293106, 0.2266189157962799, 0.3506036400794983, -0.41034483909606934, 0.29846739768981934, 0.013341806828975677, -0.054273687303066254, -0.0388859324157238, 0.29654544591903687, -0.5386684536933899, -0.07398643344640732, -0.16742342710494995, -0.22617661952972412, -0.07463953644037247, -0.11888139694929123, -0.07012061029672623, -0.056086935102939606, -0.16320320963859558, -0.4052656888961792, -0.31355419754981995, -0.06573620438575745, 0.5253241062164307, 0.2762766480445862, 0.022316250950098038, 0.47556599974632263, -0.0001143179542850703, -0.16310566663742065, 0.2398657649755478, 0.008474265225231647, -0.11458826810121536, -0.4431599974632263, -0.3388582468032837, -0.20926129817962646, -0.08252429962158203, -0.3510289192199707, -0.2636530101299286, 0.01739887334406376, 0.05388278886675835, -0.31006959080696106, 0.4917912185192108, -0.04070663079619408, 0.1410670429468155, -0.3664948344230652, 0.006173848640173674, 0.03957488760352135, -0.25924035906791687, 0.4160122573375702, -0.1895076334476471, -0.26592808961868286, 0.2792958617210388, 0.283755362033844, -0.10736249387264252, -0.0279848612844944, -0.04700164124369621, -0.23508132994174957, 0.6600620746612549, -0.19433648884296417, 0.004330814350396395, -0.5277864336967468, -0.04653191566467285, 0.3039247691631317, 0.6490060687065125, -0.3981790542602539, -0.42641782760620117, -0.19456303119659424, -0.038327425718307495, 0.13893429934978485, -0.04986078292131424, 0.24435864388942719, 0.01765540987253189, 0.38496825098991394, -0.29075008630752563, -0.29404333233833313, -0.42228320240974426, 0.025669880211353302, -0.3817669153213501, 0.14516156911849976, -0.004739654250442982, -0.04995941370725632, -0.03843243047595024, 0.13080886006355286, 0.3123418688774109, -0.11270122975111008, 0.22723251581192017, 0.06862378120422363, -0.1626562476158142, -0.532831609249115, -0.3075408935546875, 0.09869424998760223, 0.03445308655500412, 0.10205579549074173, -0.0561496838927269, 0.037679266184568405, -0.06474027782678604, 0.01211718749254942, 0.13775935769081116, 0.2655593752861023, -0.017764633521437645, 0.11452456563711166, 0.1995014101266861, -0.387246698141098, 0.030475500971078873, 0.2286774069070816, 0.00887704361230135, -0.05936584249138832, 0.11556990444660187, 0.14833217859268188, 0.048878807574510574, -0.05836360901594162, 0.06967657804489136, -0.13578742742538452, 0.04417530819773674, -0.04550933092832565, -0.2064177244901657, -0.00377011694945395, 0.21029777824878693, 0.4288654327392578, 0.26722440123558044, 0.1521555632352829, 0.20641736686229706, -0.24881549179553986, 0.07792859524488449, 0.022502079606056213, -0.3289785087108612, -0.07786117494106293, 0.04613853245973587, 0.05875010788440704, -0.3108724355697632, 0.11119334399700165, -0.16365781426429749, 0.4183044135570526, 0.13643577694892883, -0.29131922125816345, 0.16368511319160461, 0.1784060299396515, -0.36460497975349426, -0.029323196038603783, -0.04573677480220795, 0.025066370144486427, -0.22078150510787964, 0.4000893235206604, 0.00811397098004818, 0.054680123925209045, 0.17352084815502167, 0.17611433565616608, -0.017880190163850784, 0.13666552305221558, -0.2848552167415619, 0.29278701543807983, 0.16203197836875916, -0.06341243535280228, 0.11343882977962494, -0.4430217444896698, -0.18596667051315308, -0.1998777538537979, -0.10331836342811584, 0.017200743779540062, -0.6279922127723694, -0.24537169933319092, -0.13628236949443817, 0.1093936637043953, 0.03653838112950325, 0.28484904766082764, -0.12137532979249954, 0.22522801160812378, -0.15341003239154816, -0.2330721765756607, 0.5798242688179016, -0.09703963994979858, -0.24546590447425842, 0.22896288335323334, -0.3728945255279541, -0.13948577642440796, 0.19574066996574402, 0.2967514395713806, 0.4605462849140167, -0.23935769498348236, -0.49085602164268494, 0.2818579077720642, -0.06483906507492065, -0.11804523319005966, 0.012663884088397026, -0.25417986512184143, 0.3696836829185486, -0.0692063644528389, 0.26024141907691956, 0.19972950220108032, 0.004315665457397699, 0.32010865211486816, -0.02603139542043209, -0.4473753869533539, 0.3603180944919586, -0.0066867307759821415, 0.45499932765960693, 0.056745439767837524, 0.058583419770002365, -0.34780558943748474, -0.0341731496155262, 0.05309063196182251, -0.04736625403165817, 0.24668766558170319, 0.3147384822368622, -0.009118533693253994, 0.18413196504116058, -0.15661661326885223, 0.033421412110328674, -0.11462462693452835, 0.1116199791431427, -0.3407635986804962, 0.29664677381515503, -0.14154189825057983, -0.2600742280483246, 0.5447853207588196, 0.047379422932863235, 0.12054897099733353, -0.5010402798652649, 0.3326474726200104, 0.05007907375693321, 0.16719092428684235, -0.15015779435634613, 0.059782326221466064, -0.34454935789108276, -0.19233958423137665, 0.021028121933341026, -0.16293467581272125, 0.13142620027065277, 0.07726968824863434, -0.0494827926158905, 0.6066027283668518, 0.4095854163169861, -0.17006278038024902, 0.47391533851623535, 0.05108010768890381, 0.13340111076831818, -0.11948566138744354, -0.12700442969799042, 0.4927962124347687, -0.09844036400318146, 0.21285781264305115, -0.0814322829246521, -0.0044127875007689, 0.2524283230304718, -0.29853659868240356, -0.37206801772117615, -0.09597590565681458, 0.10433189570903778, -0.013754266314208508, 0.22531390190124512, 0.2128073126077652, 0.015364479273557663, 0.012466582469642162, 0.15733210742473602, -0.07550504803657532, 0.14214372634887695, 0.3831194043159485, -0.17461587488651276, 0.22057607769966125, -0.2004304677248001, 0.48996061086654663, 0.5510010123252869, 0.17052261531352997, -0.24515005946159363, 0.15999066829681396, 0.11050579696893692, -0.06508627533912659, 0.22281751036643982, 0.05257435888051987, 0.3805496096611023, 0.22481784224510193, -0.029850266873836517, 0.18787534534931183, 0.0349263995885849, -0.3846752345561981, -0.08974111080169678, -0.069858118891716, -0.052834924310445786, 0.01596521958708763, -0.2960268259048462, -0.2227746546268463, -0.4385724663734436, -0.08189871907234192, 0.04922856390476227, -0.025558818131685257, -0.04040942341089249, -0.04244379699230194, 0.23822540044784546, 0.11598291248083115, -0.1045532375574112, 0.39316222071647644, 0.11400238424539566, -0.13478344678878784, -0.14029714465141296, -0.08848396688699722, 0.005335348192602396, 0.03955993056297302, 0.09504073858261108, 0.016657084226608276, 0.4365258812904358, -0.1513850837945938, 0.12934355437755585, -0.07607053965330124, -0.5865777730941772, 0.0719241127371788, 0.07265360653400421, 0.13065434992313385, 0.2849869430065155, 0.0718221366405487, 0.14271141588687897, 0.054583095014095306, 0.034046679735183716, -0.19979293644428253, -0.31829598546028137, -0.06812606006860733, -0.02699970081448555, -0.05617349222302437, -0.006238482892513275, -0.1270180195569992, -0.3657004237174988, -0.15904982388019562, 0.2604338228702545, -0.03706752881407738, 0.02250152826309204, -0.1918988823890686, 0.03664042055606842, -0.16758300364017487, 0.039266880601644516, 0.1488778442144394, -0.11302132159471512, -0.0118304044008255, 0.2623637318611145, 0.06927955895662308, -0.26764342188835144, -0.28128743171691895, -0.35090601444244385, 0.1491183489561081, 0.29539844393730164, -0.2414918839931488, 0.011000840924680233, -0.1852770447731018, 0.0474691204726696, 0.006226496770977974, -0.05304017663002014, 0.6440248489379883, 0.13525475561618805, -0.009084483608603477, -0.1666705310344696, -0.012399936094880104, -0.0724097266793251, 0.09611951559782028, 0.17596495151519775, 0.3626629710197449, 0.47764158248901367, 0.13531796634197235, 0.4528476893901825, -0.030989844352006912, -0.5186715126037598, -0.25585535168647766, 0.24276772141456604, -0.010979429818689823, 0.0309007465839386, -0.46944695711135864, 0.20969784259796143, -0.09029972553253174, -0.40662288665771484, -0.10129154473543167, -0.08845449984073639, -0.20111416280269623, -0.14992746710777283, -0.005766635295003653, -0.10171889513731003, -0.13210484385490417, 0.17234671115875244, -0.16243577003479004, 0.12463784217834473, -0.06375861167907715, -0.03381442278623581, 0.07959850877523422, -0.03446532413363457, 0.172552689909935, 0.43234074115753174, 0.08138450980186462, -0.06205474212765694, -0.05863380804657936, 0.031068792566657066, -0.03840607777237892, 0.08968979120254517, -0.12391156703233719, 0.016913795843720436, 0.08031654357910156, 0.04981949180364609, -0.14094382524490356, -0.048019394278526306, 0.9176004528999329, -0.10543598234653473, 0.07518396526575089, -0.052862562239170074, -0.40789860486984253, -0.16062763333320618, 0.05552293732762337, -0.2564146816730499, -0.2815265357494354, 0.1257936954498291, 0.1607533097267151, -0.17366978526115417, -0.04676707088947296, -0.1674884706735611, 0.14651860296726227, -0.3606068193912506, -0.3681035041809082, 0.13732290267944336, 0.019704381003975868, -0.18515163660049438, -0.13516736030578613, 0.060341667383909225, -0.09393253177404404, -0.32345908880233765, -0.1602892279624939, -0.34615859389305115, -0.15594612061977386, 0.30140286684036255, -0.4090830385684967, -0.18053555488586426, -0.2664681673049927, 0.3182809352874756, -0.015642937272787094, 0.24021963775157928, 0.32779744267463684, 0.08345196396112442, 0.09673460572957993, -0.44475874304771423, 0.11288172751665115, 0.0916413888335228, 0.15802405774593353, -0.0036630260292440653, 0.13135097920894623, -0.25200560688972473, 0.10545939952135086, 0.05376946181058884, -0.560413658618927, -0.060542743653059006, -0.019784431904554367, 0.18371693789958954, -0.4386500418186188, -0.5073027014732361, 0.281085342168808, 0.372270405292511, -0.04375697299838066, 0.13409170508384705, -0.08832649141550064, -0.5383078455924988, 0.33170294761657715, 0.5413066148757935, 1.011505365371704, 0.03530878201127052, 0.09510910511016846, -0.16181907057762146, -0.294016033411026, 0.4121868312358856, -0.2551249861717224, 0.13746607303619385, -0.40250715613365173, -0.3175674080848694, -0.3263964354991913, -0.3039836883544922, 0.4266257882118225, 0.36611372232437134, -0.46976661682128906, 0.2520800828933716, 0.06604759395122528, -0.16980871558189392, 0.17878246307373047, 0.31935572624206543, -0.013073517940938473, -0.4183337688446045, 0.07111583650112152, 0.14107921719551086, -0.041554417461156845, 0.196319118142128, -0.04622355476021767, -0.2723698616027832, -0.20796820521354675, 0.22087889909744263, -0.32554998993873596, -0.11736899614334106, -0.32213419675827026, -0.007234435994178057, -0.19277992844581604, -0.28328368067741394, 0.5923352837562561, 0.19044926762580872, 0.24292123317718506, 0.21275243163108826, -0.09053453803062439, -0.10155852138996124, -0.048585355281829834, 0.25039440393447876, 0.1308310627937317, -0.26838940382003784, 0.5263619422912598, 0.0036334546748548746, 0.05600665137171745, -0.133529394865036, 0.01746121421456337, -0.10483445972204208, 0.09183257818222046, -0.34024670720100403, 0.07997316122055054, -0.4458639323711395, -0.032355256378650665, 0.0731360986828804, 0.000003182125510647893, 0.033757127821445465, 0.11412414908409119, 0.2982456088066101, -0.005326525773853064, 0.5414869785308838, 0.24115392565727234, -0.1254364401102066, -0.08806357532739639, 0.25468745827674866, 0.3291701078414917, 0.085701584815979, 0.04398306831717491, -0.24233867228031158, -0.34452101588249207, -0.22693297266960144, 0.2997029721736908, -0.09330826997756958, -0.1767575591802597, 0.29139116406440735, -0.049197718501091, -0.07354623824357986, -0.07078851014375687, -0.2497793734073639, 0.3696150779724121, 0.14451822638511658, -0.3072432279586792, -0.4929696321487427, -0.22347131371498108, 0.1468706727027893, 0.027238711714744568, 0.24724304676055908, -0.056998539716005325, 0.2250388115644455, 0.1466003954410553, 0.05128220096230507, -0.32496681809425354, -0.15635812282562256, 0.12724031507968903, 0.037869084626436234, 0.08235310763120651, -0.12065467238426208, -0.4654300808906555, 0.0243740975856781, -0.041016820818185806, -0.022376947104930878, -0.2515201270580292, -0.1795807033777237, 0.0025025573559105396, 0.17601405084133148, 0.02901763841509819, 0.3748072385787964, -0.06231189891695976, -0.042919594794511795, 0.025282198563218117, 0.0009239396313205361, -0.11335422098636627, 0.18861158192157745, -0.1212603971362114, 0.38171151280403137, 0.3554999530315399, -0.2482014000415802, -0.3381771445274353, 0.21744397282600403, 0.11947181820869446, 0.07223811000585556, -0.02479712851345539, 0.4353024661540985, 0.1737561821937561, 0.08687281608581543, -0.45251402258872986, 0.11676069349050522, 0.19055134057998657, -0.12612316012382507, 0.40277713537216187, -0.16676592826843262, 0.34284067153930664, 0.5249502062797546, 0.346102774143219, 0.330994188785553, -0.24207113683223724, -0.017868759110569954, 0.19201286137104034, 0.16847100853919983, -0.22437596321105957, 0.18294279277324677, 0.24875493347644806, 0.03333548456430435, -0.07616468518972397, 0.3599676191806793, 0.19591882824897766, -0.013688378036022186, -0.0975947454571724, -0.0059232949279248714, 0.534785807132721, -0.5172252655029297, 0.2831365466117859, 0.45293867588043213, -0.057820264250040054, 0.13005177676677704, 0.3954426348209381, 0.11734595894813538, 0.040670253336429596, 0.32922402024269104, 0.17468300461769104, 0.4738538861274719, 0.2645655572414398, 0.02435188554227352, 0.3100905418395996, 0.13824209570884705, -0.03970790281891823, 0.5465513467788696, -0.05787587910890579, -0.04617824777960777, 0.14815017580986023, -0.055320560932159424, 0.10891207307577133, -0.3581899404525757, -0.03748641163110733, 0.25359290838241577, -0.2680293023586273, 0.24177856743335724, -0.23995761573314667, -0.12680575251579285, 0.12084085494279861, -0.20764979720115662, -0.15611670911312103, -0.18414504826068878, 0.4952985346317291, 0.17789524793624878, 0.002078346209600568, -0.008686637505888939, 0.20540472865104675, -0.15188317000865936, 0.0813433825969696, -0.1358141452074051, -0.047856513410806656, 0.14612935483455658, 0.05624565854668617, 0.08462612330913544, 0.6115334630012512, 0.23779204487800598, 0.3204871714115143, -0.2992589473724365, 0.13916364312171936, -0.23919953405857086, -0.27488836646080017, 0.0035140919499099255, 0.4170592725276947, -0.22620904445648193, -0.17578484117984772, 0.28709709644317627, 0.1712302416563034, -0.055743295699357986, 0.31069228053092957, 0.045580994337797165, 0.2401365041732788, -0.2947983145713806, 0.5732992887496948, 0.4169827401638031, -0.0019925704691559076, -0.004402791615575552, 0.10763536393642426, -0.2917107045650482, -0.07115543633699417, 0.5056442022323608, -0.5531600713729858, -0.07428974658250809, 0.005825086962431669, 0.07136604189872742, 0.05757535621523857, 0.10993459820747375, 0.15494975447654724, 0.05505729839205742, 0.05223621800541878, -0.061666958034038544, -0.19317874312400818, 0.05944158136844635, 0.18100744485855103, -0.062045879662036896, -0.31746846437454224, -0.004277166444808245, 0.11447115242481232, 0.38692647218704224, 0.093915656208992, -0.2907923460006714, -0.2940658628940582, 0.3518129587173462, -0.11160217970609665, 0.1389460414648056, 0.13810215890407562, 0.3081415593624115, 0.055972155183553696, -0.24727267026901245, 0.05994216725230217, 0.2529648542404175, -0.0038803888019174337, 0.09388174116611481, 0.3810409903526306, 0.15139301121234894, 0.17399823665618896, 0.15882070362567902, 0.2628677487373352, 0.4578670263290405, -0.08033717423677444, 0.20290611684322357, 0.325469046831131, 0.01968987286090851, -0.2989491820335388, 0.43373826146125793, 0.16880901157855988, -0.07580257207155228, -0.43235015869140625, -0.20015130937099457, 0.046230342239141464, -0.156706303358078, -0.00282678403891623, 0.08781790733337402, -0.7870509028434753, -0.10791685432195663, -0.22667813301086426, -0.01859017089009285, 0.019773928448557854, 0.2365133911371231, 0.09010661393404007, 0.10044364631175995, -0.19077353179454803, -0.20956984162330627, 0.18084077537059784, -0.16258955001831055, -0.3482760488986969, -0.20395615696907043, -0.23738251626491547, -0.3200112581253052, 0.06704222410917282, -0.327146977186203, -0.08184454590082169, 0.3845260739326477, -0.1479875147342682, 0.3348054885864258, 0.2760918438434601, 0.07171948999166489, -0.08765196800231934, -0.21400633454322815, 0.5781519412994385, -0.18064042925834656, -0.09730587899684906, -0.2706849277019501, -0.07910672575235367 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
We can be pretty flexible and not impose any constraints for transforms. Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like `map` work in a batched fashion to not fill up your RAM. So this shouldn't be an issue
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
59
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). We can be pretty flexible and not impose any constraints for transforms. Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like `map` work in a batched fashion to not fill up your RAM. So this shouldn't be an issue
[ -0.5401788949966431, -0.018992431461811066, -0.14400826394557953, 0.1232815608382225, 0.43724945187568665, -0.2170049548149109, 0.24531258642673492, 0.1936606913805008, 0.21922753751277924, 0.13049159944057465, 0.06151597201824188, 0.1877676397562027, -0.26032596826553345, 0.07238705456256866, 0.04819224029779434, -0.01159789226949215, -0.07829257845878601, 0.25257644057273865, -0.5557228922843933, -0.057362865656614304, -0.3713935613632202, -0.15737031400203705, 0.013565918430685997, -0.14408522844314575, -0.03289370983839035, -0.24287766218185425, 0.07152129709720612, -0.013766446150839329, -0.13780860602855682, 0.06725981086492538, 0.306924968957901, 0.13950935006141663, -0.1308078020811081, 0.34379464387893677, -0.0000978967291302979, -0.03233564272522926, 0.03869551420211792, -0.129364013671875, 0.04639740660786629, 0.12445593625307083, -0.1310037523508072, -0.11048545688390732, -0.10950833559036255, -0.36120232939720154, -0.24680736660957336, 0.04237956181168556, 0.02839638665318489, -0.31460824608802795, 0.2295783907175064, 0.13057398796081543, 0.35437339544296265, -0.16992756724357605, -0.19622506201267242, -0.05397430434823036, 0.21612286567687988, 0.1079377606511116, -0.08900152891874313, -0.16634777188301086, 0.26657265424728394, 0.24562574923038483, -0.31213271617889404, 0.23566889762878418, -0.04619491472840309, 0.006583775393664837, 0.5308230519294739, -0.14778617024421692, 0.07460755854845047, -0.18837204575538635, -0.04395894706249237, 0.21119146049022675, 0.3024064600467682, -0.35855454206466675, -0.14957833290100098, -0.18984892964363098, -0.06427930295467377, 0.18071241676807404, 0.12555797398090363, 0.09108626842498779, -0.11629732698202133, 0.12362472712993622, -0.29323676228523254, -0.2158866971731186, -0.1858692169189453, 0.02468826249241829, -0.38647374510765076, 0.08438828587532043, 0.08105501532554626, -0.019889449700713158, 0.23208506405353546, -0.12199410796165466, 0.06409572064876556, 0.2333991974592209, 0.03155649080872536, 0.03620480000972748, -0.10758404433727264, -0.4280068278312683, -0.3164812922477722, -0.01048488449305296, 0.1404884308576584, -0.07699032127857208, 0.030527764931321144, 0.21469512581825256, 0.06849910318851471, 0.04047820344567299, 0.0683707445859909, 0.21329949796199799, -0.35771307349205017, 0.06293908506631851, 0.34719353914260864, -0.2959290146827698, -0.09472820907831192, 0.14219360053539276, 0.17776580154895782, -0.19199079275131226, -0.03746775910258293, -0.18786843121051788, -0.14582666754722595, -0.11188261210918427, 0.03925579413771629, -0.14975549280643463, 0.24101778864860535, 0.28165265917778015, -0.05489540472626686, 0.37972819805145264, 0.016487281769514084, 0.12259336560964584, 0.41587111353874207, -0.07043036073446274, -0.10166265070438385, -0.026789410039782524, -0.12345156073570251, 0.1682242602109909, -0.23923039436340332, -0.11781708896160126, 0.17554466426372528, 0.25475603342056274, -0.00901313778012991, -0.13932651281356812, -0.0014684769557788968, 0.45021864771842957, 0.14545035362243652, -0.16329939663410187, 0.3711448311805725, 0.32152074575424194, -0.3073902428150177, -0.23121657967567444, -0.18242958188056946, 0.13556355237960815, -0.22487150132656097, 0.2574271559715271, -0.010025118477642536, -0.060182277113199234, 0.2163718044757843, 0.3365976810455322, -0.0965411439538002, 0.08898141980171204, -0.016476072371006012, 0.14122506976127625, 0.05782051756978035, -0.21000970900058746, 0.022371578961610794, -0.18442599475383759, -0.15611091256141663, -0.1307399570941925, 0.004221166484057903, 0.023484792560338974, -0.3599259853363037, -0.1965467929840088, -0.016180245205760002, 0.029943758621811867, 0.039363764226436615, 0.23557093739509583, -0.25842350721359253, -0.06667045503854752, -0.15185239911079407, -0.09598475694656372, 0.5436254143714905, -0.08736410737037659, -0.5102761387825012, 0.1716725081205368, -0.30717211961746216, -0.20669932663440704, 0.039222098886966705, 0.5570350885391235, 0.30301225185394287, -0.06066194921731949, -0.27798181772232056, 0.43898531794548035, -0.012084121815860271, 0.2393549382686615, -0.15221837162971497, -0.3807237446308136, 0.22414633631706238, 0.09997478127479553, 0.43580392003059387, 0.06959439069032669, -0.004208156373351812, 0.4479365348815918, 0.01919911429286003, -0.324707567691803, 0.2287275642156601, 0.0903669074177742, 0.20296938717365265, -0.17580026388168335, 0.05148005113005638, -0.38815924525260925, -0.029957734048366547, -0.019490579143166542, -0.12316378206014633, 0.1746489405632019, 0.312149316072464, -0.06333183497190475, 0.09396978467702866, -0.24061319231987, 0.06624211370944977, 0.05239417776465416, 0.3378174901008606, -0.050648488104343414, 0.256093293428421, -0.37894317507743835, 0.09675829112529755, 0.3695112466812134, -0.035923343151807785, 0.09001421183347702, -0.4097874164581299, 0.093051977455616, 0.039577338844537735, 0.04112723842263222, 0.017441241070628166, -0.08580480515956879, -0.15946824848651886, -0.12140157073736191, 0.08888036757707596, 0.08844485878944397, 0.14233390986919403, -0.08315064013004303, -0.22515282034873962, 0.39354753494262695, 0.2967003881931305, -0.0864638015627861, 0.4523482322692871, 0.22502239048480988, 0.11646821349859238, -0.05405862629413605, -0.23264239728450775, 0.35325348377227783, 0.06752253323793411, 0.11760459840297699, 0.08946073055267334, -0.03545086458325386, 0.3178417980670929, -0.21058844029903412, -0.09168770909309387, -0.23917394876480103, -0.08038217574357986, 0.14627306163311005, 0.2722609341144562, 0.24180617928504944, -0.14347076416015625, -0.17616504430770874, 0.257405549287796, 0.09557227790355682, 0.23561517894268036, 0.2567686140537262, -0.19858437776565552, 0.1687791645526886, -0.023058980703353882, 0.3929041028022766, 0.4536697566509247, 0.3772835433483124, -0.03214564546942711, 0.05706306919455528, -0.033480241894721985, -0.1285068243741989, 0.17434869706630707, -0.06117087975144386, 0.2145085334777832, -0.007575074210762978, 0.02248113602399826, -0.08485253155231476, -0.31403595209121704, -0.22028030455112457, 0.07882363349199295, -0.004089001566171646, -0.12856967747211456, -0.08258860558271408, -0.21044117212295532, -0.20823727548122406, -0.10027856379747391, 0.17740248143672943, -0.10652007907629013, 0.13378457725048065, 0.14695601165294647, 0.08701261878013611, -0.19860632717609406, 0.1812260001897812, 0.06172874942421913, 0.30599722266197205, 0.14939601719379425, -0.23431791365146637, -0.01033976674079895, 0.044234443455934525, -0.02093476988375187, 0.28393223881721497, 0.0812603160738945, 0.030154122039675713, 0.357311487197876, -0.032513853162527084, 0.015916023403406143, -0.10756712406873703, -0.41707196831703186, 0.021991323679685593, 0.05086714029312134, 0.13270987570285797, 0.22428834438323975, 0.15502865612506866, 0.1264585554599762, 0.054544564336538315, 0.02237759530544281, -0.27908650040626526, -0.3149186968803406, -0.024922441691160202, -0.05920129641890526, 0.12740227580070496, -0.2830106019973755, -0.2389218509197235, -0.09299640357494354, -0.5055263638496399, 0.2309703528881073, 0.1451749950647354, 0.057342227548360825, 0.002879129257053137, 0.2555830478668213, -0.175446018576622, 0.1253504902124405, 0.17296461760997772, -0.26684388518333435, 0.02311381883919239, 0.4328383803367615, -0.05561584234237671, -0.29877331852912903, -0.18642771244049072, -0.24190886318683624, 0.21637536585330963, 0.5209240913391113, -0.4316141605377197, -0.011605470441281796, -0.28758731484413147, -0.010451061651110649, 0.010865706950426102, -0.04552852734923363, 0.5706765651702881, 0.04710720479488373, -0.21820160746574402, -0.07783561944961548, -0.11069342494010925, 0.05975547060370445, 0.1506640464067459, 0.016526656225323677, -0.013385584577918053, 0.2726939618587494, 0.0209518875926733, 0.23720943927764893, -0.4598437547683716, -0.3791241943836212, -0.03705355152487755, 0.17541800439357758, 0.13233895599842072, -0.017673905938863754, -0.11200699210166931, 0.15405531227588654, 0.11469384282827377, -0.16316865384578705, 0.1865588277578354, -0.04148830473423004, -0.43852317333221436, -0.14495497941970825, -0.1328938752412796, 0.0028604839462786913, -0.251326322555542, 0.3997885286808014, 0.06627120077610016, -0.06507967412471771, -0.0767928883433342, 0.11904188245534897, -0.17882481217384338, -0.043198905885219574, 0.17821814119815826, 0.11425922065973282, -0.008725980296730995, -0.07354072481393814, -0.03109254129230976, 0.12085980176925659, -0.10726334899663925, 0.13332276046276093, -0.16067682206630707, 0.0035684355534613132, -0.07281802594661713, -0.29962024092674255, -0.11835863441228867, -0.16536776721477509, 0.581554114818573, 0.05004940554499626, 0.07156587392091751, 0.15108321607112885, -0.36800459027290344, -0.3692411184310913, 0.19093772768974304, -0.29538553953170776, -0.1915871798992157, 0.020209360867738724, 0.23346668481826782, -0.1936124861240387, -0.031203126534819603, -0.05042707547545433, 0.19129759073257446, -0.3580101430416107, -0.1948174089193344, -0.015485303476452827, -0.17807823419570923, -0.3872000575065613, 0.15392199158668518, 0.10014193505048752, -0.09083204716444016, 0.016103366389870644, -0.2437741756439209, -0.3259715139865875, -0.3354438245296478, 0.24591197073459625, 0.01273859292268753, 0.09448114037513733, -0.1280447542667389, 0.16405406594276428, -0.18070511519908905, 0.3554743826389313, 0.2075027972459793, 0.06697815656661987, 0.1276005506515503, -0.03317081183195114, 0.19785359501838684, 0.004381156992167234, 0.07370590418577194, 0.1707678884267807, 0.0512656643986702, -0.07574582099914551, -0.10461565852165222, 0.22454379498958588, -0.5025940537452698, 0.22693711519241333, -0.11761544644832611, -0.037203773856163025, -0.1397036761045456, -0.30469200015068054, 0.332645982503891, 0.13892494142055511, -0.2194041907787323, 0.09529346972703934, -0.11296765506267548, -0.5864386558532715, 0.2940365672111511, 0.661720335483551, 0.9825019240379333, -0.09684591740369797, 0.1830243021249771, 0.02361861802637577, -0.09514966607093811, 0.24895192682743073, -0.3341439664363861, 0.19136486947536469, -0.27138569951057434, -0.3456098437309265, 0.03924660384654999, -0.07263541221618652, 0.0903850570321083, 0.2218269556760788, -0.4011257290840149, 0.023028163239359856, 0.034658610820770264, -0.22705796360969543, -0.14721845090389252, 0.22605754435062408, 0.08166539669036865, -0.5389624238014221, -0.19047249853610992, 0.34006693959236145, 0.010083467699587345, -0.09799295663833618, -0.0679820105433464, -0.1252211630344391, -0.08387923985719681, 0.07220622897148132, -0.05111956223845482, -0.14579737186431885, -0.39101797342300415, -0.026933977380394936, -0.4349457323551178, -0.09616953879594803, 0.25283879041671753, 0.1495361030101776, 0.010297100991010666, 0.41060811281204224, -0.08137544989585876, 0.14458569884300232, -0.16958004236221313, 0.2668820321559906, -0.044429030269384384, -0.0862690731883049, 0.4258615970611572, -0.10750863701105118, -0.01760867051780224, -0.08913358300924301, -0.055873457342386246, -0.2663671374320984, 0.21188035607337952, -0.13304445147514343, 0.12361251562833786, -0.33392348885536194, -0.03062780387699604, 0.037690017372369766, -0.18584546446800232, 0.023625871166586876, 0.29725953936576843, 0.09537246078252792, -0.10949452221393585, 0.48866143822669983, 0.37428972125053406, -0.26714375615119934, -0.24936744570732117, 0.3068591356277466, 0.4510115087032318, 0.16796791553497314, 0.06819901615381241, -0.20793381333351135, -0.3289976716041565, -0.46133744716644287, -0.038634106516838074, 0.1475534290075302, -0.15660370886325836, 0.33107733726501465, 0.017641128972172737, -0.4553513824939728, -0.036294545978307724, -0.011230493895709515, 0.2609972655773163, 0.10425730794668198, -0.24851512908935547, -0.11956094205379486, -0.5757896900177002, 0.11667381972074509, 0.060039978474378586, 0.3340652883052826, -0.07173473387956619, -0.02918992191553116, 0.04091518372297287, 0.13098454475402832, -0.5081637501716614, -0.06182878091931343, -0.17017492651939392, 0.2392064779996872, -0.09061887860298157, 0.04018683731555939, -0.19955024123191833, 0.11647924035787582, 0.17862260341644287, 0.1987209916114807, -0.3415718972682953, -0.3561057448387146, 0.026503290981054306, 0.07296138256788254, -0.08510158956050873, 0.038108374923467636, -0.005790184251964092, -0.1136714518070221, -0.10057560354471207, -0.17480310797691345, 0.2322605550289154, 0.07570389658212662, -0.13587597012519836, 0.16171178221702576, 0.35168856382369995, -0.19042812287807465, -0.1061379536986351, 0.2564586400985718, -0.022988593205809593, 0.12878859043121338, -0.0762275978922844, 0.22484278678894043, 0.12898953258991241, -0.07555074989795685, -0.03703873232007027, 0.1613631546497345, 0.10920561105012894, 0.016162516549229622, 0.24293886125087738, 0.08721499145030975, 0.029629124328494072, 0.6459558606147766, 0.22138100862503052, 0.1402515172958374, -0.07334329187870026, -0.11044973134994507, 0.21138960123062134, 0.42081862688064575, -0.31077495217323303, -0.14776510000228882, 0.16104121506214142, -0.184902161359787, 0.2987510859966278, 0.3614836037158966, 0.059765469282865524, -0.10970770567655563, 0.11339970678091049, 0.0597117617726326, 0.26579880714416504, -0.23696193099021912, 0.1515234410762787, 0.2913590371608734, -0.12587958574295044, -0.13498851656913757, 0.32012149691581726, 0.20689474046230316, 0.2180113047361374, 0.4387919306755066, 0.03762207180261612, 0.3958040773868561, 0.07724766433238983, 0.07233483344316483, 0.007183982990682125, -0.05939032509922981, 0.08403906226158142, 0.5973977446556091, -0.013415194116532803, 0.13843053579330444, 0.11932917684316635, -0.07740891724824905, 0.1104002296924591, -0.29573071002960205, -0.16415543854236603, -0.014918162487447262, -0.4132998585700989, 0.23731043934822083, 0.010765520855784416, -0.19971738755702972, -0.10879107564687729, 0.08601289242506027, -0.08463039249181747, -0.2840934097766876, 0.5777484774589539, 0.04363711550831795, 0.06987043470144272, 0.2187255173921585, 0.2641713321208954, -0.12875087559223175, -0.09558317810297012, -0.25542566180229187, 0.04368659853935242, 0.16520553827285767, 0.0027945523615926504, 0.2931784391403198, 0.31719398498535156, 0.024733128026127815, 0.24770106375217438, -0.17837755382061005, 0.15878427028656006, -0.02234385535120964, -0.14739611744880676, -0.4861270487308502, 0.13078124821186066, 0.01304310467094183, 0.12222680449485779, 0.33298081159591675, 0.35806897282600403, -0.2723880112171173, 0.05734465271234512, 0.08220019936561584, -0.030633067712187767, -0.09871287643909454, 0.15745584666728973, 0.335822731256485, -0.19052936136722565, -0.11321572959423065, -0.10253801941871643, -0.18730418384075165, -0.07118340581655502, 0.2527502179145813, -0.6251531839370728, 0.17332658171653748, 0.1061769500374794, 0.16275881230831146, 0.06768625974655151, 0.5246926546096802, -0.1559082418680191, -0.06977475434541702, -0.037201572209596634, -0.21995121240615845, -0.30367833375930786, 0.16219103336334229, 0.01765189878642559, 0.09076748043298721, -0.2603810727596283, 0.14547492563724518, 0.14556559920310974, 0.08338381350040436, -0.027917426079511642, -0.2130620777606964, -0.14231906831264496, 0.0992484763264656, -0.18222154676914215, 0.04954167455434799, 0.04388178139925003, 0.12559080123901367, 0.21526877582073212, -0.36443930864334106, 0.05706527829170227, 0.012062065303325653, 0.30148717761039734, -0.01248660683631897, 0.24679027497768402, -0.054457470774650574, 0.3218402564525604, 0.46793848276138306, 0.15051880478858948, 0.413720041513443, -0.16253505647182465, 0.12292610108852386, 0.1877683848142624, 0.047076623886823654, -0.32085373997688293, -0.05844695493578911, 0.3024865984916687, 0.09491121768951416, -0.15681269764900208, 0.02386985905468464, 0.005528785288333893, 0.049561597406864166, 0.028037620708346367, 0.1776486039161682, -0.3475267291069031, 0.14901162683963776, -0.030827227979898453, -0.021389657631516457, -0.09298203140497208, 0.24721302092075348, 0.007918317802250385, -0.21081018447875977, -0.1649531126022339, -0.41436493396759033, 0.2555774748325348, 0.009373055770993233, -0.26562222838401794, -0.11676578223705292, 0.012865587137639523, -0.16652733087539673, 0.064349465072155, -0.4184451401233673, 0.05682303011417389, 0.1724008172750473, -0.14450176060199738, 0.04842148721218109, 0.08564335852861404, -0.15108917653560638, -0.2606150805950165, -0.312992662191391, 0.4690489172935486, -0.03363063186407089, -0.15142394602298737, -0.25409001111984253, -0.28873997926712036 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
Ok thanks. But, Dataset has various flavors. In current design of Dataset, how the serialization on disk is done (?) The main issue is serialization of newdataset= Transform(Dataset) (ie thats why am referring to Out Of memory dataset…): Should be part of Transform or part of dataset ? Maybe, not, since the output is aimed to feed model in memory (?) > On Jul 7, 2021, at 18:04, Quentin Lhoest ***@***.***> wrote: > >  > We can be pretty flexible and not impose any constraints for transforms. > > Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like map work in a batched fashion to not fill up your RAM. So this shouldn't be an issue > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
162
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). Ok thanks. But, Dataset has various flavors. In current design of Dataset, how the serialization on disk is done (?) The main issue is serialization of newdataset= Transform(Dataset) (ie thats why am referring to Out Of memory dataset…): Should be part of Transform or part of dataset ? Maybe, not, since the output is aimed to feed model in memory (?) > On Jul 7, 2021, at 18:04, Quentin Lhoest ***@***.***> wrote: > >  > We can be pretty flexible and not impose any constraints for transforms. > > Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like map work in a batched fashion to not fill up your RAM. So this shouldn't be an issue > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
[ -0.30282866954803467, -0.07524682581424713, -0.05205000564455986, 0.25686150789260864, 0.49632033705711365, 0.033301062881946564, 0.3464807868003845, 0.13595689833164215, 0.10846932232379913, -0.048908695578575134, 0.14332546293735504, 0.18079474568367004, -0.2497083991765976, 0.09951982647180557, 0.14334964752197266, 0.029433704912662506, -0.036758795380592346, 0.2082752138376236, -0.6057530641555786, -0.11037847399711609, -0.29442858695983887, -0.1542579084634781, -0.10568933188915253, -0.11360923945903778, -0.06226382404565811, -0.19962520897388458, -0.15818701684474945, -0.12624189257621765, -0.256913959980011, -0.07501193135976791, 0.420137494802475, 0.09897034615278244, 0.11094746738672256, 0.562895655632019, -0.00010495314199943095, -0.1980094462633133, 0.06296680122613907, -0.14172925055027008, -0.041641633957624435, -0.12714748084545135, -0.11059077084064484, -0.12413591891527176, -0.0914636105298996, -0.37884435057640076, -0.25158804655075073, -0.012632166966795921, 0.04266602545976639, -0.16326414048671722, 0.26733049750328064, 0.18912383913993835, 0.2877257764339447, -0.2571980953216553, 0.06131548434495926, -0.11599468439817429, -0.09063409268856049, 0.4980598986148834, -0.2132178395986557, -0.13176921010017395, 0.16394203901290894, 0.2951177656650543, -0.17686216533184052, 0.1194915771484375, 0.03161583095788956, -0.06239892169833183, 0.694988489151001, -0.11448965221643448, 0.1647530198097229, -0.3416479229927063, -0.04749033600091934, 0.17702719569206238, 0.6858400106430054, -0.4208054840564728, -0.29260632395744324, -0.19781289994716644, 0.04135388508439064, 0.11255799978971481, 0.07362834364175797, 0.2918519079685211, -0.10238966345787048, 0.4228280782699585, -0.2906360626220703, -0.15785712003707886, -0.21226565539836884, -0.027360858395695686, -0.35383936762809753, -0.027298135682940483, -0.04856954142451286, 0.07043539732694626, -0.028070250526070595, -0.08964145928621292, 0.11524660885334015, 0.06874236464500427, 0.08594180643558502, 0.005337430164217949, -0.047100890427827835, -0.48893609642982483, -0.24929466843605042, -0.10576183348894119, 0.17702917754650116, 0.020616887137293816, -0.10555322468280792, -0.08250505477190018, 0.06632892787456512, -0.08804427832365036, 0.17521890997886658, 0.3654627799987793, -0.1550440937280655, 0.16023750603199005, 0.07138291746377945, -0.3452310860157013, -0.04997517913579941, 0.004470213782042265, -0.023658353835344315, 0.03802133724093437, 0.20027601718902588, -0.01010970026254654, -0.009433405473828316, -0.07412368804216385, 0.10057783126831055, -0.2199297398328781, 0.18858852982521057, 0.14360429346561432, -0.1644641011953354, 0.2562830448150635, 0.13431629538536072, 0.2364141196012497, 0.2878933250904083, -0.06082237511873245, 0.07285447418689728, -0.18356336653232574, -0.09207460284233093, 0.20970658957958221, -0.3946242332458496, -0.03168202564120293, 0.06148657575249672, 0.2625039517879486, -0.09842704981565475, -0.16312232613563538, -0.10270529985427856, 0.29323795437812805, 0.045008838176727295, -0.288505882024765, 0.37007758021354675, 0.29362034797668457, -0.5175173282623291, 0.003423678455874324, -0.00823112204670906, 0.0908266082406044, -0.23883602023124695, 0.3887871205806732, -0.08082897216081619, -0.05687800422310829, 0.1232486441731453, 0.2654305100440979, -0.056801822036504745, 0.13044489920139313, -0.24254998564720154, 0.23344331979751587, 0.23551447689533234, -0.11404906958341599, 0.05234580859541893, -0.2796919643878937, -0.014556948095560074, -0.22482533752918243, 0.0019176413770765066, 0.13082526624202728, -0.550594687461853, -0.1371418833732605, -0.09296388924121857, 0.00547959515824914, 0.2257183939218521, 0.25380536913871765, -0.2389269918203354, 0.21124285459518433, -0.27818092703819275, -0.15985649824142456, 0.530823290348053, -0.07172978669404984, -0.36874228715896606, 0.22729603946208954, -0.3469467759132385, -0.2316666543483734, 0.1396828591823578, 0.39113765954971313, 0.3910188376903534, -0.0739193856716156, -0.3169715702533722, 0.3255685865879059, -0.1547599732875824, 0.017296068370342255, -0.18261247873306274, -0.29834693670272827, 0.4146895706653595, 0.004398931749165058, 0.3740958273410797, 0.31722214818000793, -0.08999191224575043, 0.554475724697113, 0.036176301538944244, -0.16427461802959442, 0.2736385762691498, 0.03950854390859604, 0.36993324756622314, -0.21873487532138824, 0.06695496290922165, -0.38904958963394165, -0.13238221406936646, -0.01647198386490345, 0.07169650495052338, 0.23841048777103424, 0.1521543562412262, 0.042567405849695206, -0.035138025879859924, -0.18842335045337677, 0.1005934476852417, -0.14410388469696045, 0.2575832009315491, -0.06822273880243301, 0.29085978865623474, -0.36089888215065, -0.12019387632608414, 0.3291369378566742, 0.016959479078650475, 0.09973032027482986, -0.4722501039505005, 0.1352907121181488, -0.10374750196933746, 0.06372043490409851, -0.13348226249217987, -0.11953747272491455, -0.14710161089897156, -0.20590513944625854, 0.027681434527039528, 0.045599810779094696, 0.10069573670625687, -0.07277727127075195, -0.1369665116071701, 0.4407847225666046, 0.3833370506763458, -0.22134608030319214, 0.4104965031147003, 0.1753510981798172, 0.1971820741891861, -0.15817424654960632, -0.15636394917964935, 0.3226000666618347, 0.059188004583120346, 0.05396294221282005, -0.004589053336530924, -0.044410135596990585, 0.27493566274642944, -0.18466442823410034, -0.1495002955198288, -0.22131069004535675, -0.09303921461105347, 0.1528904289007187, 0.20645831525325775, 0.267208456993103, -0.01802140288054943, -0.08723094314336777, 0.27590692043304443, -0.09933069348335266, 0.17542320489883423, 0.23990318179130554, -0.2363840639591217, 0.09679871052503586, -0.11559288203716278, 0.33688098192214966, 0.4515928626060486, 0.2688370943069458, -0.017209492623806, 0.09940613061189651, 0.22483037412166595, -0.13741880655288696, 0.21065619587898254, -0.010123344138264656, 0.306111216545105, 0.09286525845527649, -0.04356610029935837, 0.014841063879430294, -0.14263169467449188, -0.27317649126052856, 0.20114564895629883, 0.10526106506586075, -0.08680956065654755, -0.08278772234916687, -0.07911724597215652, -0.05861890688538551, -0.32101619243621826, 0.11395131796598434, 0.0012528933584690094, 0.13549476861953735, -0.04518060013651848, 0.013305429369211197, 0.06787142157554626, 0.1548037827014923, -0.025890519842505455, 0.2285890430212021, 0.14031946659088135, -0.022201722487807274, -0.0016006173100322485, 0.07191575318574905, -0.012956502847373486, 0.18600700795650482, 0.008257982321083546, -0.05232059583067894, 0.3632895052433014, 0.02374216914176941, 0.07232915610074997, -0.0993586927652359, -0.3952198624610901, 0.10079872608184814, -0.03920507803559303, 0.13625824451446533, 0.24870143830776215, 0.15830671787261963, 0.06384802609682083, 0.07395870983600616, 0.100337915122509, -0.19011108577251434, -0.2742713689804077, 0.03831230476498604, -0.08366138488054276, 0.16953982412815094, -0.17373019456863403, -0.3793550729751587, -0.2794138193130493, -0.33823856711387634, 0.18880365788936615, 0.023864179849624634, 0.003937928471714258, 0.10180798172950745, 0.08514883369207382, -0.1637769192457199, 0.11679686605930328, 0.13599932193756104, -0.20133094489574432, 0.008923034183681011, 0.32450392842292786, 0.09603136032819748, -0.3421609699726105, -0.13819840550422668, -0.15438252687454224, 0.010208270512521267, 0.3889782130718231, -0.31695470213890076, -0.03138413280248642, -0.2151266485452652, -0.028546717017889023, -0.03227068483829498, -0.17379601299762726, 0.6250017881393433, -0.007911685854196548, -0.14442980289459229, -0.040227703750133514, -0.11250663548707962, -0.07561763375997543, 0.18653589487075806, 0.12700478732585907, 0.053928107023239136, 0.4150843322277069, 0.15489161014556885, 0.1784224510192871, -0.2313496321439743, -0.348187118768692, -0.15976232290267944, 0.21639008820056915, 0.020848959684371948, -0.0015363048296421766, -0.2815902829170227, 0.29862573742866516, 0.08677642792463303, -0.525776743888855, 0.06357964873313904, -0.14337489008903503, -0.31260886788368225, -0.09387347847223282, 0.041599538177251816, -0.059173885732889175, -0.10236577689647675, 0.30855271220207214, -0.06289102137088776, -0.0016259553376585245, -0.09560370445251465, 0.08324997127056122, -0.09036971628665924, -0.0007779945153743029, 0.1365065574645996, 0.17920532822608948, 0.044802334159612656, -0.08239621669054031, -0.2790709435939789, 0.033336855471134186, -0.17547504603862762, -0.06888072192668915, -0.24276085197925568, 0.10187244415283203, -0.03683764487504959, -0.20866699516773224, -0.04482930153608322, -0.04717046394944191, 0.8162038922309875, 0.11398530006408691, 0.030603496357798576, 0.08672460913658142, -0.3628522753715515, -0.32291775941848755, 0.06457052379846573, -0.30208954215049744, -0.21201960742473602, -0.05345435068011284, 0.20991288125514984, -0.2198081910610199, -0.08174357563257217, -0.06451661884784698, 0.3001191318035126, -0.34403616189956665, -0.30839648842811584, 0.08771275728940964, -0.22145414352416992, -0.3976360261440277, 0.009579119272530079, 0.1840384304523468, -0.02455560304224491, 0.011908537708222866, -0.14440502226352692, -0.2201026827096939, -0.11553970724344254, 0.24850068986415863, -0.17229677736759186, 0.01775180920958519, -0.11200668662786484, 0.15869583189487457, -0.13538497686386108, 0.3628402054309845, 0.4106985032558441, 0.049473922699689865, 0.18060021102428436, -0.23036032915115356, 0.21157166361808777, -0.008221895433962345, 0.1288546770811081, 0.03118220344185829, 0.04279373213648796, -0.2118959128856659, 0.07505810260772705, 0.14926806092262268, -0.6959338188171387, 0.059315264225006104, -0.10672817379236221, -0.15003593266010284, -0.2943804860115051, -0.44527164101600647, 0.21179018914699554, 0.12461673468351364, -0.18429787456989288, -0.040122129023075104, -0.06349367648363113, -0.6139556765556335, 0.3885999619960785, 0.6128232479095459, 1.1169227361679077, -0.1842900514602661, 0.16694116592407227, -0.016898995265364647, -0.005891156382858753, 0.37749043107032776, -0.23715080320835114, 0.19982196390628815, -0.35508227348327637, -0.3183296322822571, -0.10029921680688858, -0.14181898534297943, 0.1677478551864624, 0.349981427192688, -0.45124921202659607, 0.03924880549311638, -0.030631588771939278, -0.030270373448729515, -0.055279407650232315, 0.2415483295917511, 0.19534224271774292, -0.5374816656112671, -0.1339251548051834, 0.2882777154445648, -0.12082255631685257, -0.034762926399707794, -0.04533636197447777, -0.15340310335159302, -0.093294158577919, 0.190748393535614, -0.1508701592683792, -0.06728510558605194, -0.3210913836956024, 0.055667079985141754, -0.463463693857193, -0.19976158440113068, 0.3177560567855835, 0.2684037685394287, 0.15015123784542084, 0.24922311305999756, -0.0224041398614645, 0.025525018572807312, -0.2658393979072571, 0.2352413535118103, -0.08592166006565094, -0.07096627354621887, 0.5328399538993835, -0.06234047934412956, -0.051844462752342224, -0.03485006093978882, -0.06884503364562988, -0.17066772282123566, 0.12751173973083496, -0.2459346204996109, 0.1342008262872696, -0.503185510635376, -0.14029844105243683, 0.031262993812561035, -0.13254788517951965, 0.014352628961205482, 0.24225963652133942, 0.2745440602302551, -0.1834602653980255, 0.428076833486557, 0.26326557993888855, -0.2569595277309418, -0.20401591062545776, 0.24887874722480774, 0.573326587677002, 0.12301046401262283, 0.2374247908592224, -0.11569096893072128, -0.37989869713783264, -0.41025805473327637, 0.17692188918590546, 0.2932386100292206, -0.20354141294956207, 0.34635695815086365, 0.007665443234145641, -0.16944020986557007, -0.0017321486957371235, -0.05737421289086342, 0.3999810218811035, 0.08334845304489136, -0.3539371192455292, -0.14498361945152283, -0.592272937297821, 0.08759688585996628, 0.008170003071427345, 0.18910184502601624, -0.058388277888298035, 0.09692998230457306, 0.12700167298316956, 0.05520810931921005, -0.47727251052856445, -0.17861223220825195, -0.1551099568605423, 0.20889371633529663, -0.09171171486377716, -0.05655848607420921, -0.2293165773153305, 0.019699646160006523, 0.11210133880376816, 0.030732369050383568, -0.2857632339000702, -0.28748640418052673, 0.14817799627780914, 0.1052134782075882, 0.15820148587226868, 0.11438006162643433, -0.19880670309066772, -0.15841856598854065, -0.10515688359737396, -0.1556757390499115, 0.1166793629527092, 0.16720902919769287, -0.026931431144475937, 0.37379100918769836, 0.3921230435371399, -0.19732117652893066, -0.3632749617099762, 0.03817036747932434, 0.0736834928393364, 0.13354557752609253, -0.008795728906989098, 0.2220735400915146, 0.20705674588680267, 0.014372617937624454, -0.5705883502960205, 0.23229476809501648, 0.14670240879058838, 0.0700937956571579, 0.35553207993507385, -0.08428848534822464, 0.21527233719825745, 0.7550535798072815, 0.23473702371120453, 0.01457118894904852, -0.07522737234830856, -0.0008535813540220261, 0.16782815754413605, 0.3209892511367798, -0.20929491519927979, 0.08897116780281067, 0.14555756747722626, -0.20118162035942078, 0.08743102103471756, 0.26521360874176025, -0.03766953572630882, 0.07385548949241638, -0.09938199818134308, -0.02168666571378708, 0.6841109395027161, -0.36707350611686707, 0.18091602623462677, 0.46502411365509033, -0.04276811331510544, 0.0162019245326519, 0.4952475130558014, 0.26278066635131836, 0.14232856035232544, 0.4545319080352783, 0.15722565352916718, 0.37949907779693604, 0.24662016332149506, 0.08286159485578537, 0.20417313277721405, 0.0437721312046051, 0.07978593558073044, 0.6636736989021301, 0.03796359524130821, -0.06975748389959335, 0.04077894240617752, -0.17900040745735168, -0.060150906443595886, -0.41617465019226074, -0.13537810742855072, -0.01350424438714981, -0.4005988538265228, 0.29154640436172485, -0.11248670518398285, -0.06841089576482773, 0.05789725482463837, -0.0972616970539093, -0.15370342135429382, -0.2673508822917938, 0.47477424144744873, 0.046213340014219284, -0.12058418989181519, 0.19517990946769714, 0.1547544300556183, -0.075572170317173, 0.01013661827892065, -0.28842082619667053, -0.06506062299013138, 0.1735551357269287, 0.06056588515639305, 0.09867910295724869, 0.523745596408844, 0.026367392390966415, 0.2559470236301422, -0.08224210888147354, 0.06291377544403076, -0.05087970197200775, -0.2541758418083191, -0.24533474445343018, 0.35326629877090454, -0.1296032965183258, 0.18759463727474213, 0.13010145723819733, 0.2976490259170532, -0.16229020059108734, 0.16548602283000946, 0.27389246225357056, 0.06770842522382736, -0.17610226571559906, 0.2827882170677185, 0.18297795951366425, -0.24448788166046143, 0.017565172165632248, 0.04094680771231651, -0.30126380920410156, 0.12065683305263519, 0.4616492688655853, -0.6105458736419678, 0.10435241460800171, 0.10443522781133652, 0.12695156037807465, 0.06151209771633148, 0.2328919619321823, 0.11640918999910355, -0.1334686428308487, -0.0879257395863533, -0.0016165160341188312, -0.21383288502693176, 0.22222356498241425, 0.07224349677562714, 0.03108648583292961, -0.21699583530426025, 0.2303779572248459, 0.22440791130065918, 0.12648513913154602, -0.25056689977645874, -0.30926069617271423, -0.2979167103767395, 0.20715346932411194, -0.0954662337899208, -0.0076390779577195644, 0.0572800412774086, 0.37794601917266846, 0.05388179048895836, -0.2726294696331024, 0.12606211006641388, 0.1939678192138672, 0.11596310883760452, -0.0036792163737118244, 0.29973265528678894, 0.03361362963914871, 0.24569113552570343, 0.38607022166252136, 0.18191000819206238, 0.4176517724990845, -0.04008845239877701, -0.00887424685060978, 0.2440115064382553, -0.08188795298337936, -0.21225474774837494, 0.2055051326751709, 0.2114606499671936, 0.1955602467060089, -0.2826955318450928, 0.023086311295628548, -0.06552356481552124, -0.10573714971542358, -0.14790494740009308, -0.04037949815392494, -0.6305208802223206, 0.03021388314664364, -0.12641826272010803, -0.20301799476146698, 0.08731387555599213, 0.201850026845932, 0.09493885189294815, -0.07171731442213058, -0.1438315063714981, -0.3844313323497772, 0.20915007591247559, -0.0003155857848469168, -0.35488471388816833, -0.12941686809062958, -0.10198161751031876, -0.185372993350029, 0.08687054365873337, -0.5133615136146545, 0.12843085825443268, 0.30058395862579346, -0.010658975690603256, 0.09924544394016266, 0.1067642867565155, 0.00807556975632906, -0.14577679336071014, -0.20620262622833252, 0.735855758190155, -0.21721555292606354, -0.19246283173561096, -0.2694469392299652, -0.12811632454395294 ]
https://github.com/huggingface/datasets/issues/2596
Transformer Class on dataset
I'm not sure I understand, could you elaborate a bit more please ? Each dataset is a wrapper of a PyArrow Table that contains all the data. The table is loaded from an arrow file on the disk. We have an ArrowWriter and ArrowReader class to write/read arrow tables on disk or in in-memory buffers.
Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit).
55
Transformer Class on dataset Just wondering if you have intenttion to create TransformerClass : dataset --> dataset and make determnistic transformation (ie not fit). I'm not sure I understand, could you elaborate a bit more please ? Each dataset is a wrapper of a PyArrow Table that contains all the data. The table is loaded from an arrow file on the disk. We have an ArrowWriter and ArrowReader class to write/read arrow tables on disk or in in-memory buffers.
[ -0.36044779419898987, -0.05612464249134064, 0.011653267778456211, 0.27049779891967773, 0.39460867643356323, -0.09719637036323547, 0.3508630394935608, 0.04822322726249695, -0.10002893209457397, -0.16110995411872864, 0.1317933350801468, 0.3815635144710541, -0.3154996633529663, -0.08339153975248337, 0.25427907705307007, -0.23259015381336212, 0.018295107409358025, 0.4430122375488281, -0.30591705441474915, -0.15378963947296143, -0.20243129134178162, -0.29757919907569885, -0.14110106229782104, 0.15635386109352112, -0.10866178572177887, -0.1525423377752304, -0.1539613902568817, -0.36308786273002625, -0.308154433965683, -0.15665823221206665, 0.6911967396736145, 0.05112917348742485, 0.023532351478934288, 0.5484088063240051, -0.00012985583452973515, -0.023574750870466232, 0.07271523773670197, -0.14338018000125885, 0.12988953292369843, -0.1923113316297531, -0.2210623174905777, -0.03382923826575279, 0.18111397325992584, -0.38922420144081116, -0.3804796040058136, -0.2979855239391327, -0.004094074014574289, 0.05152853578329086, 0.5385866165161133, 0.19422009587287903, 0.08660905808210373, -0.30262595415115356, 0.05516450107097626, 0.1068509891629219, 0.2160901129245758, 0.38616228103637695, -0.2014034241437912, 0.017513440921902657, 0.15157532691955566, 0.2822318375110626, -0.15152880549430847, -0.13187550008296967, -0.17619143426418304, -0.02727421559393406, 0.8690388798713684, 0.024441134184598923, 0.15094535052776337, -0.36327221989631653, -0.2043597400188446, 0.29082590341567993, 0.7759716510772705, -0.5236784815788269, -0.15506352484226227, -0.06795179843902588, 0.18380476534366608, 0.15509022772312164, 0.008390644565224648, 0.2853398323059082, -0.10652478039264679, 0.21953216195106506, -0.11103912442922592, -0.2602997422218323, -0.5028030872344971, 0.10280277580022812, -0.521472156047821, 0.14578630030155182, -0.0008758847834542394, 0.13025479018688202, -0.052323512732982635, 0.07414330542087555, 0.4201742112636566, 0.0259792972356081, 0.0769914835691452, 0.20101280510425568, -0.10597065091133118, -0.4257587790489197, -0.4286721348762512, 0.12167464196681976, -0.05182739347219467, 0.07064460963010788, -0.05208246782422066, -0.24724270403385162, 0.1668993979692459, 0.02989896945655346, -0.04348815977573395, 0.26797255873680115, -0.027597615495324135, 0.3352455794811249, 0.06586270034313202, -0.3162097930908203, -0.15339574217796326, 0.138279527425766, -0.06098021939396858, -0.2558610141277313, 0.2248508483171463, 0.05470718815922737, 0.14567720890045166, -0.09029064327478409, 0.12429988384246826, -0.22159580886363983, -0.083100326359272, -0.1453959345817566, -0.20766465365886688, 0.15421836078166962, 0.21722489595413208, 0.0267331600189209, 0.24015599489212036, 0.28799933195114136, 0.13104549050331116, -0.20537641644477844, 0.08024563640356064, 0.2888299524784088, -0.42280998826026917, -0.12896978855133057, 0.06845365464687347, 0.1690240353345871, -0.328716903924942, 0.05849551782011986, -0.20533408224582672, 0.26386040449142456, 0.00076853804057464, -0.32111355662345886, 0.25133970379829407, 0.3396918773651123, -0.4704187512397766, -0.1540032923221588, 0.15388146042823792, -0.13037441670894623, -0.2196122705936432, 0.6994737982749939, -0.19401420652866364, -0.010155824944376945, 0.07224719971418381, 0.07581035792827606, -0.000241545305470936, 0.06769165396690369, -0.24309679865837097, 0.1669624149799347, 0.21101419627666473, -0.18988148868083954, 0.3288913667201996, -0.36187806725502014, 0.13881915807724, -0.2993888854980469, -0.0887862965464592, 0.11976028978824615, -0.7907068729400635, -0.2019081860780716, -0.014581791125237942, -0.08888506144285202, 0.184751495718956, 0.21061019599437714, -0.3140334188938141, 0.3180657923221588, -0.11911092698574066, -0.05588052049279213, 0.7501407861709595, 0.07907452434301376, -0.3657934069633484, 0.14100956916809082, -0.4655134975910187, -0.30851855874061584, 0.265013724565506, 0.4832536280155182, 0.2425495833158493, -0.09040339291095734, -0.5927633047103882, 0.17444637417793274, 0.04949420690536499, -0.19067981839179993, 0.016551285982131958, -0.16020286083221436, 0.46720364689826965, 0.027599185705184937, 0.28900790214538574, 0.22777453064918518, 0.16618898510932922, 0.14607630670070648, -0.030154285952448845, -0.352947473526001, 0.2881470322608948, 0.0217047780752182, 0.38008391857147217, -0.0008919051033444703, 0.04297957569360733, -0.26517453789711, -0.046558935195207596, -0.11685489863157272, -0.21437712013721466, 0.16267353296279907, 0.12546038627624512, -0.08599432557821274, 0.04017311707139015, -0.21850332617759705, -0.20534101128578186, -0.14958055317401886, 0.02750956080853939, -0.3762700855731964, 0.34538182616233826, -0.32319870591163635, -0.20457588136196136, 0.36233243346214294, 0.0327497161924839, 0.20752866566181183, -0.429980993270874, 0.4497605264186859, -0.0851840004324913, 0.05894458293914795, -0.2049831598997116, -0.12239990383386612, -0.04879611358046532, -0.1631947010755539, -0.018509291112422943, -0.07536838203668594, 0.02263803221285343, -0.22531858086585999, -0.07449859380722046, 0.3795033395290375, 0.24430330097675323, -0.6910708546638489, 0.6359955668449402, -0.07142657786607742, 0.144813671708107, -0.2594783902168274, -0.16143231093883514, 0.4715096652507782, -0.06781401485204697, 0.22638188302516937, -0.2780800461769104, -0.012620200403034687, 0.11199640482664108, -0.33359068632125854, -0.10630849003791809, 0.10667669028043747, -0.06788961589336395, 0.11178892850875854, 0.23807691037654877, 0.25747084617614746, 0.0649886503815651, -0.18648755550384521, 0.1255376935005188, -0.15977227687835693, 0.23512397706508636, 0.4662557542324066, -0.2535707652568817, 0.2055150419473648, -0.17916913330554962, 0.39582592248916626, 0.6401334404945374, 0.17187321186065674, -0.31247028708457947, 0.23813416063785553, 0.038758281618356705, -0.04055663198232651, 0.29729968309402466, -0.0722029060125351, 0.35646769404411316, 0.008707283064723015, -0.19429929554462433, 0.13253773748874664, -0.04671742022037506, -0.29785722494125366, 0.09133661538362503, 0.16495001316070557, -0.22846418619155884, 0.07945673167705536, -0.07083157449960709, -0.1709194928407669, -0.4144051671028137, -0.06930100172758102, 0.0078859468922019, 0.28183838725090027, -0.08629980683326721, -0.17292870581150055, 0.3115227520465851, 0.057358548045158386, -0.1573173999786377, 0.1988902986049652, 0.232523113489151, -0.17143531143665314, -0.1934317797422409, -0.13233700394630432, -0.02628006786108017, 0.04997894540429115, -0.06615757942199707, 0.09928430616855621, 0.22948326170444489, -0.29769837856292725, 0.2404409497976303, -0.06809865683317184, -0.29475200176239014, 0.02005571871995926, -0.06145862862467766, 0.022761914879083633, 0.2964046895503998, 0.2587544023990631, -0.14942829310894012, -0.10049354285001755, 0.15125034749507904, -0.10104060918092728, -0.3608799874782562, 0.17530152201652527, -0.2611690163612366, 0.08574387431144714, 0.17930547893047333, -0.1949101835489273, -0.2642943561077118, -0.01624019630253315, 0.16387522220611572, 0.15311592817306519, 0.04318918660283089, -0.16287977993488312, 0.12587180733680725, -0.07525961101055145, -0.0013596598291769624, 0.10074321180582047, 0.03349428251385689, 0.17174078524112701, 0.3631781041622162, 0.16205954551696777, -0.18930889666080475, -0.050323933362960815, -0.29946863651275635, 0.029903488233685493, 0.3481314778327942, -0.4328606426715851, 0.05119198560714722, -0.1269654631614685, 0.1268927901983261, -0.1478935331106186, -0.013434058986604214, 0.6234859228134155, 0.182805597782135, 0.038635727018117905, -0.03613968566060066, -0.04359079524874687, -0.06367403268814087, 0.016723252832889557, 0.1787310689687729, 0.13270901143550873, 0.4253964126110077, -0.12833702564239502, 0.4583359360694885, -0.33257508277893066, -0.3514341711997986, -0.11176475882530212, 0.10255993902683258, -0.030140552669763565, 0.13163793087005615, -0.3031071722507477, 0.046897515654563904, 0.14951837062835693, -0.32504889369010925, -0.036708682775497437, -0.23004548251628876, -0.32703912258148193, -0.12541607022285461, -0.16804707050323486, -0.09726056456565857, -0.07463303208351135, 0.24532540142536163, -0.1871759444475174, -0.04182954505085945, -0.32863712310791016, -0.042205676436424255, 0.09856120496988297, -0.040264930576086044, 0.07083389163017273, 0.4972972571849823, -0.019448941573500633, 0.015937214717268944, -0.010600662790238857, -0.036170318722724915, 0.1508091241121292, 0.01183821726590395, -0.25178879499435425, 0.08916264772415161, 0.020746683701872826, 0.08582936227321625, 0.17049285769462585, -0.004848077427595854, 0.790642499923706, 0.10830360651016235, 0.11971548944711685, 0.23357044160366058, -0.12137731164693832, -0.402260422706604, -0.019828572869300842, -0.30512693524360657, -0.10827379673719406, -0.19837404787540436, -0.13387058675289154, -0.2571404278278351, -0.08098127692937851, 0.08344363421201706, 0.2612776458263397, -0.3665664494037628, -0.4619602560997009, -0.03632601723074913, -0.11902569979429245, -0.24589131772518158, 0.19449888169765472, 0.0799969956278801, -0.10933637619018555, -0.03936699777841568, -0.023013237863779068, -0.2647068500518799, -0.1444285660982132, 0.19122359156608582, -0.14425164461135864, 0.012875881977379322, -0.19096753001213074, 0.07574836164712906, -0.10494931787252426, 0.2206999957561493, 0.2764225900173187, 0.18941740691661835, 0.1228577271103859, -0.4357861280441284, -0.007248904090374708, 0.017895091325044632, 0.41482779383659363, -0.16934216022491455, -0.017324401065707207, 0.035938166081905365, -0.052761491388082504, 0.1164666935801506, -0.13066981732845306, -0.07858429104089737, -0.015579343773424625, -0.03304412215948105, -0.2313091903924942, -0.3976021707057953, 0.3808097541332245, 0.18182989954948425, -0.1406659483909607, 0.13260778784751892, 0.19002065062522888, -0.4119341969490051, 0.29648804664611816, 0.6284170150756836, 1.297055721282959, -0.013190565630793571, 0.18642708659172058, 0.061984218657016754, -0.21028706431388855, 0.33731451630592346, -0.1518898606300354, -0.03849215805530548, -0.4181610643863678, -0.27540385723114014, -0.243824765086174, -0.44499385356903076, 0.36969760060310364, 0.4542202651500702, -0.5083643198013306, 0.1258341670036316, -0.39702802896499634, -0.1894250065088272, 0.23024249076843262, -0.051598500460386276, 0.3095282018184662, -0.2607070803642273, -0.05563368648290634, 0.009317156858742237, -0.17617231607437134, 0.1614350825548172, -0.03179393708705902, -0.18214811384677887, -0.23130495846271515, 0.11591248959302902, -0.07073676586151123, -0.13435836136341095, -0.5251280069351196, -0.10500669479370117, -0.2574150860309601, -0.45175474882125854, 0.6619152426719666, 0.3650527596473694, 0.008517050184309483, 0.0933762714266777, -0.0914670079946518, 0.013674641959369183, 0.03208917751908302, 0.1699231117963791, -0.04205603897571564, -0.2248438149690628, 0.48180660605430603, -0.11971599608659744, -0.15508867800235748, 0.11497323215007782, -0.11057727783918381, -0.18786275386810303, 0.3535499572753906, -0.13959066569805145, 0.2810426950454712, -0.44718554615974426, -0.0013258332619443536, -0.05518534407019615, -0.062359899282455444, 0.03939409554004669, 0.052231937646865845, 0.3158760070800781, -0.006200653500854969, 0.3939512372016907, 0.2616311013698578, -0.34105634689331055, 0.0032760577742010355, 0.11494381725788116, 0.6427348852157593, 0.1686142235994339, 0.26326262950897217, -0.27075743675231934, -0.3766039311885834, -0.2814811170101166, 0.17837703227996826, 0.23879729211330414, -0.5504468083381653, 0.07654090225696564, 0.10079068690538406, 0.13892841339111328, -0.025230683386325836, -0.2555321753025055, 0.4737342596054077, 0.32424286007881165, -0.4022258222103119, -0.4078062176704407, -0.4356183409690857, -0.03404883295297623, 0.1871989667415619, 0.0944366604089737, 0.02125134877860546, 0.24630503356456757, 0.4592217803001404, 0.1894712597131729, -0.2077482044696808, 0.0023554277140647173, 0.019159749150276184, 0.14194512367248535, -0.005998284090310335, 0.07664062082767487, -0.3780395984649658, 0.16735896468162537, -0.0596417672932148, -0.07411133497953415, -0.19743365049362183, -0.09400636702775955, 0.029307998716831207, 0.22976967692375183, 0.14798706769943237, 0.17310869693756104, -0.25006210803985596, -0.08831910043954849, 0.03477080166339874, 0.1502581685781479, -0.08071230351924896, 0.13474127650260925, -0.16259437799453735, 0.32285335659980774, 0.6502873301506042, -0.2357775866985321, -0.7550687193870544, 0.07381010055541992, -0.03463109955191612, 0.07322665303945541, -0.12032676488161087, 0.21733716130256653, 0.11602061241865158, -0.01373275462538004, -0.40530797839164734, 0.10187544673681259, 0.13811244070529938, -0.031444672495126724, 0.3276543915271759, -0.10838564485311508, 0.3197028934955597, 0.18077600002288818, 0.07967951893806458, 0.30739015340805054, -0.18532603979110718, -0.010397053323686123, 0.20379610359668732, 0.06236552447080612, -0.38041770458221436, 0.08896397054195404, 0.20936785638332367, 0.03413204476237297, -0.12007246911525726, 0.2622236907482147, -0.06077171862125397, 0.03688498213887215, -0.12321845442056656, -0.010791311971843243, 0.377045214176178, -0.20253567397594452, 0.09982547163963318, 0.7080124616622925, -0.24380935728549957, 0.02006099373102188, 0.6556425094604492, 0.19762806594371796, -0.11393380910158157, 0.16680462658405304, 0.07048541307449341, 0.3836415410041809, 0.10706410557031631, -0.12091173231601715, 0.25177621841430664, 0.19350667297840118, -0.02989461086690426, 0.5973749756813049, 0.18243436515331268, -0.30348488688468933, 0.16539694368839264, 0.0709727331995964, 0.20928920805454254, -0.3164491653442383, 0.05879919230937958, 0.08309132605791092, -0.22803470492362976, 0.413318932056427, -0.3233689069747925, -0.10605636984109879, 0.14563509821891785, -0.293721079826355, -0.21353031694889069, -0.23871928453445435, 0.3417324423789978, 0.21200601756572723, 0.0011811746517196298, 0.18604351580142975, 0.3911277651786804, 0.0605413094162941, 0.030133258551359177, -0.1463623046875, 0.07614408433437347, 0.19609516859054565, 0.15214310586452484, 0.14963145554065704, 0.3942977786064148, 0.16326531767845154, 0.27610963582992554, -0.15174606442451477, 0.07235840708017349, -0.08456528931856155, -0.27772611379623413, 0.028280111029744148, 0.2136630415916443, -0.08708222955465317, -0.09669283777475357, 0.25098124146461487, 0.14308132231235504, -0.06894250959157944, 0.2980155050754547, 0.09755059331655502, 0.19082142412662506, -0.04137689992785454, 0.37000179290771484, 0.16673818230628967, -0.4476442337036133, -0.010499497875571251, 0.09617085009813309, -0.18858611583709717, 0.09038230776786804, 0.4336329400539398, -0.5003531575202942, -0.06198316067457199, -0.053299177438020706, -0.02928427793085575, 0.2192307561635971, 0.3402997851371765, 0.13010774552822113, 0.3010830581188202, -0.2303794026374817, -0.06879512220621109, -0.3981022536754608, 0.2100149542093277, 0.10483068227767944, -0.13262900710105896, -0.01653478480875492, -0.11782056093215942, 0.11125002801418304, 0.25308725237846375, 0.1387648731470108, -0.046443141996860504, -0.20621338486671448, 0.3914126753807068, -0.1201331689953804, 0.06493455171585083, 0.292353093624115, 0.473635196685791, -0.06789858639240265, -0.21382753551006317, 0.09619414806365967, 0.3186486065387726, -0.052687354385852814, -0.06148727983236313, 0.2939695119857788, 0.18289287388324738, 0.43956881761550903, 0.33217358589172363, 0.005055188667029142, 0.8048734664916992, 0.007444771472364664, 0.4048200845718384, 0.5635287761688232, 0.08195654302835464, -0.2770858705043793, 0.3589549660682678, 0.2951972186565399, -0.1419908106327057, -0.22971530258655548, -0.10508010536432266, -0.027240445837378502, -0.21226327121257782, -0.07600690424442291, 0.22102776169776917, -0.7341041564941406, 0.04972495138645172, -0.13599860668182373, -0.15358394384384155, 0.10583684593439102, -0.04754317179322243, 0.11449696868658066, -0.05525722727179527, -0.23822888731956482, -0.19231365621089935, 0.3582509458065033, -0.06860924512147903, -0.2909310460090637, 0.061749108135700226, -0.04949673265218735, -0.14805877208709717, 0.17917314171791077, -0.25674471259117126, 0.050735119730234146, 0.4911363422870636, -0.08878237754106522, 0.23916174471378326, -0.004498925991356373, -0.10329906642436981, 0.011300713755190372, -0.186433345079422, 0.814225971698761, -0.32969310879707336, 0.02036929875612259, -0.4875224828720093, -0.2599969506263733 ]
https://github.com/huggingface/datasets/issues/2595
ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets
Hi @profsatwinder. It looks like you are using an old version of `datasets`. Please update it with `pip install -U datasets` and indicate if the problem persists.
Error traceback: --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-8-a7b592d3bca0> in <module>() 1 from datasets import load_dataset, load_metric 2 ----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation") 4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test") 9 frames /root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>() 19 20 import datasets ---> 21 from datasets.tasks import AutomaticSpeechRecognition 22 23 ModuleNotFoundError: No module named 'datasets.tasks'
27
ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets Error traceback: --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-8-a7b592d3bca0> in <module>() 1 from datasets import load_dataset, load_metric 2 ----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation") 4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test") 9 frames /root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>() 19 20 import datasets ---> 21 from datasets.tasks import AutomaticSpeechRecognition 22 23 ModuleNotFoundError: No module named 'datasets.tasks' Hi @profsatwinder. It looks like you are using an old version of `datasets`. Please update it with `pip install -U datasets` and indicate if the problem persists.
[ -0.4680480659008026, -0.2621823251247406, -0.04225946217775345, -0.12496829777956009, 0.2041027545928955, 0.14506219327449799, 0.4402434229850769, 0.25430920720100403, 0.22203561663627625, 0.13481761515140533, -0.21101908385753632, 0.20888751745224, -0.27976709604263306, -0.07806102931499481, 0.08124509453773499, -0.05570811405777931, 0.04231993108987808, 0.2207898050546646, 0.00424715131521225, -0.19110532104969025, -0.03197408840060234, 0.17828883230686188, -0.3306013345718384, 0.20550136268138885, -0.3548135459423065, -0.2180953323841095, 0.07793736457824707, 0.0423673577606678, -0.04224570468068123, -0.24390006065368652, 0.1500825732946396, -0.014650438912212849, 0.07050064951181412, 0.4818689525127411, -0.00010449936962686479, 0.046449728310108185, 0.35436907410621643, -0.050302788615226746, -0.3212524354457855, -0.4222036600112915, -0.33184754848480225, 0.03482764586806297, -0.04613787680864334, -0.15791772305965424, 0.10334472358226776, 0.13190627098083496, 0.126346617937088, -0.13682538270950317, 0.5385986566543579, 0.348238080739975, 0.2840608060359955, 0.413153737783432, 0.15671366453170776, -0.12671512365341187, 0.01978924125432968, 0.24982251226902008, -0.04030879959464073, 0.2972659766674042, 0.08955756574869156, -0.19310706853866577, 0.3447548747062683, 0.28938108682632446, -0.23903559148311615, 0.06366699188947678, 0.07982371747493744, -0.04652402549982071, -0.041496291756629944, -0.4952995181083679, 0.07444719970226288, 0.13219305872917175, 0.3183712065219879, -0.4103884696960449, -0.19300007820129395, -0.20507846772670746, 0.11013171076774597, -0.2723013758659363, 0.00043044702033512294, -0.018203366547822952, -0.1323794722557068, 0.10622867196798325, 0.11628404259681702, -0.1884782761335373, 0.02291628159582615, 0.02689271792769432, -0.0017304697539657354, -0.0327819362282753, -0.057935889810323715, -0.13116340339183807, 0.24403944611549377, -0.19135843217372894, -0.12213893234729767, 0.2369028478860855, 0.17705503106117249, 0.5055810213088989, -0.4833754301071167, -0.1723853051662445, 0.2230120599269867, -0.25376760959625244, 0.08283890038728714, 0.012145772576332092, 0.026049669831991196, 0.1074606254696846, -0.1929783970117569, 0.29380837082862854, 0.1571599543094635, 0.20555925369262695, 0.24075956642627716, 0.30807754397392273, 0.2705407738685608, 0.19832971692085266, -0.05292293801903725, 0.10624832659959793, -0.27316486835479736, -0.16814135015010834, 0.2600196301937103, -0.051661308854818344, 0.49453607201576233, -0.17212365567684174, -0.5520046949386597, 0.06451589614152908, -0.18060074746608734, -0.09731655567884445, 0.043759141117334366, 0.2725818455219269, -0.05976853147149086, 0.2682129740715027, 0.09926765412092209, 0.09802156686782837, -0.3125719130039215, -0.08398151397705078, -0.20834515988826752, 0.12046739459037781, -0.13398873805999756, 0.03753967583179474, 0.19684138894081116, -0.1620703935623169, 0.16114048659801483, 0.026297057047486305, 0.12542107701301575, -0.09945505857467651, 0.060776788741350174, -0.08042691648006439, -0.33141568303108215, 0.16535335779190063, -0.05826286971569061, -0.01408707071095705, 0.04459422454237938, 0.025396455079317093, -0.15046380460262299, 0.08688986301422119, -0.328918993473053, -0.19164258241653442, 0.04174046590924263, 0.26437312364578247, -0.0014751541893929243, -0.2592625319957733, -0.18522579967975616, 0.019564758986234665, -0.011282467283308506, -0.37099412083625793, -0.13091140985488892, -0.3607838749885559, 0.06614857912063599, 0.11084725707769394, 0.30373504757881165, 0.25922301411628723, -0.08037376403808594, -0.2542344629764557, -0.16399724781513214, -0.1825811117887497, 0.013343791477382183, 0.3237011432647705, -0.008494691923260689, 0.1405988484621048, -0.06374042481184006, 0.4380910396575928, 0.24729804694652557, -0.4526940584182739, -0.24913719296455383, 0.13404470682144165, 0.09614628553390503, 0.06780553609132767, -0.13990430533885956, -0.21476030349731445, 0.1372888684272766, -0.011143337935209274, 0.34685781598091125, 0.17331404983997345, -0.013389806263148785, -0.10767852514982224, -0.05891403183341026, -0.14396126568317413, 0.13195155560970306, 0.2343856692314148, 0.004960556980222464, -0.04832245409488678, -0.042768094688653946, 0.19296537339687347, 0.12696494162082672, -0.17895682156085968, 0.03870466351509094, 0.20704719424247742, 0.4356287717819214, 0.06957224756479263, -0.08904878795146942, -0.41998258233070374, -0.174518421292305, 0.03763289749622345, 0.02121693640947342, 0.2585081458091736, -0.23170606791973114, -0.09896505624055862, -0.4054160714149475, -0.10512268543243408, -0.3773021399974823, 0.12027452886104584, 0.1669742316007614, 0.0990830734372139, -0.06108817085623741, 0.006682189647108316, -0.2997961938381195, 0.37572672963142395, -0.1313782036304474, 0.09442359954118729, -0.33236995339393616, 0.3736220598220825, -0.23770853877067566, -0.26707252860069275, 0.24095036089420319, 0.41137251257896423, -0.004160468932241201, 0.06251604855060577, -0.11709397286176682, 0.2125418484210968, -0.0076910872012376785, 0.17219798266887665, -0.27363497018814087, -0.0751657709479332, 0.06570298224687576, -0.3961910009384155, 0.03388596698641777, 0.11104736477136612, 0.04263126477599144, -0.08869000524282455, 0.028557104989886284, 0.12964613735675812, 0.1537570208311081, 0.10633575916290283, 0.11651110649108887, 0.086843341588974, 0.16825230419635773, -0.06831037253141403, -0.22810494899749756, -0.03617500141263008, 0.2848305106163025, -0.1852826327085495, 0.4031331241130829, -0.03813318908214569, -0.6622074842453003, -0.3254397511482239, 0.4939153492450714, -0.023165076971054077, 0.26339223980903625, 0.08828175067901611, -0.22325384616851807, 0.2004331350326538, 0.12878578901290894, -0.18243880569934845, 0.43718022108078003, 0.25298115611076355, -0.11841033399105072, 0.27854594588279724, -0.12138239294290543, -0.014825287275016308, -0.002135706599801779, 0.03763772174715996, 0.09448873996734619, 0.1906544417142868, 0.05395893380045891, 0.1309289187192917, -0.4432958662509918, -0.24921736121177673, -0.2248523235321045, 0.17233632504940033, -0.3543303608894348, -0.03415607661008835, -0.27806201577186584, -0.048387642949819565, -0.18973609805107117, -0.09766203910112381, -0.2422446757555008, -0.08856058865785599, -0.018589505925774574, 0.13715000450611115, 0.1353914588689804, 0.4319053292274475, -0.04417896270751953, -0.06195111200213432, 0.04691005498170853, -0.455549955368042, -0.16737176477909088, -0.16925914585590363, -0.09829532355070114, 0.1030319556593895, 0.3574744760990143, 0.015301674604415894, 0.2674029469490051, -0.21922369301319122, -0.004659919533878565, 0.049545180052518845, -0.3638138473033905, -0.004420850425958633, -0.24710488319396973, 0.10067769885063171, 0.02809695154428482, 0.19446471333503723, -0.08778099715709686, -0.27164897322654724, 0.2568014860153198, -0.29029595851898193, -0.3031883239746094, 0.008494059555232525, -0.07151010632514954, -0.21795731782913208, -0.10560639202594757, -0.6792387366294861, -0.49160894751548767, -0.3824000656604767, 0.18915753066539764, -0.004323718603700399, -0.05044807493686676, 0.5760880708694458, -0.0038486875128000975, 0.16622468829154968, -0.039601363241672516, 0.20013950765132904, -0.18552006781101227, -0.001417586114257574, 0.36840492486953735, -0.1762259304523468, -0.1984473317861557, 0.06507238745689392, -0.20732979476451874, 0.610748827457428, -0.17717894911766052, -0.17900928854942322, -0.09921444952487946, -0.1153990626335144, 0.20721404254436493, -0.1426558792591095, 0.19877396523952484, 0.2562192678451538, 0.22437095642089844, -0.06652270257472992, -0.038542937487363815, -0.22909165918827057, -0.0892241969704628, 0.5440239310264587, 0.123674675822258, 0.029923684895038605, 0.36961230635643005, -0.23376980423927307, 0.7312173843383789, 0.25424495339393616, 0.052972376346588135, 0.22507402300834656, -0.1787751168012619, 0.25733816623687744, -0.23298805952072144, -0.4067521095275879, 0.22507557272911072, 0.052332986146211624, 0.12402530759572983, 0.18903766572475433, -0.07551717758178711, -0.17171327769756317, -0.3085710108280182, -0.1609121859073639, -0.2336980253458023, -0.24393029510974884, -0.11221469193696976, -0.21183659136295319, 0.332800030708313, 0.13657359778881073, 0.07790093868970871, -0.17173898220062256, -0.06231846660375595, 0.1407049298286438, 0.1314399391412735, -0.0679294615983963, 0.06768389046192169, -0.31492868065834045, -0.09493039548397064, -0.2611026465892792, 0.1321662962436676, -0.06716366112232208, 0.38456201553344727, -0.3105471134185791, -0.005371004343032837, -0.09060893207788467, 0.10611928254365921, -0.02680506557226181, 0.051029130816459656, -0.1677810549736023, 0.1527027040719986, 0.22108350694179535, -0.15672087669372559, -0.0859282910823822, -0.13425499200820923, 0.012281275354325771, 0.14346323907375336, 0.15306921303272247, -0.29735952615737915, 0.01272384263575077, 0.3386218845844269, 0.37277495861053467, 0.03774825856089592, -0.09411711245775223, -0.2668099105358124, -0.3024866282939911, -0.4897353947162628, 0.12073573470115662, 0.1983536183834076, 0.0963839590549469, -0.19931526482105255, 0.1669946312904358, 0.20831510424613953, -0.1086239442229271, 0.4872303903102875, 0.1101526990532875, 0.17201142013072968, -0.05017675831913948, 0.3456842005252838, 0.5056830644607544, 0.13421253859996796, 0.29061105847358704, 0.6657878756523132, -0.022307386621832848, -0.5903888940811157, -0.12387458980083466, -0.06292858719825745, 0.3958956301212311, 0.08724921196699142, 0.10590363293886185, -0.04795607179403305, 0.3212255537509918, -0.0264970064163208, -0.04841653257608414, 0.1525447964668274, 0.5146482586860657, 0.39276573061943054, -0.339478999376297, -0.4118451774120331, 0.09500579535961151, 0.18550151586532593, 0.0875617191195488, 0.06814558058977127, -0.10430233180522919, -0.16130979359149933, -0.03560167923569679, -0.4842158854007721, 0.7982998490333557, 0.3278927803039551, 0.044506289064884186, 0.22525788843631744, -0.03037099540233612, 0.03999444842338562, -0.10184340178966522, 0.08847811073064804, -0.1324901580810547, 0.05868467688560486, -0.00594553304836154, -0.11153868585824966, 0.20561128854751587, 0.08895640075206757, -0.40665918588638306, 0.4010353982448578, 0.08365887403488159, -0.02075452357530594, 0.038233768194913864, 0.2802620530128479, 0.021472204476594925, -0.1409972608089447, -0.11784256249666214, 0.2391812652349472, -0.15853968262672424, 0.5873623490333557, 0.09033124148845673, -0.09470280259847641, -0.0624559111893177, -0.30765900015830994, -0.11904913932085037, 0.23651821911334991, -0.17631737887859344, 0.1899978220462799, 0.31967079639434814, -0.07804795354604721, 0.3400166928768158, 0.024367744103074074, 0.011199728585779667, -0.019650733098387718, -0.24279554188251495, 0.09519336372613907, 0.1217559278011322, 0.014033748768270016, -0.046279482543468475, 0.018566764891147614, 0.5849072933197021, -0.10096382349729538, -0.43257203698158264, 0.1455034464597702, -0.05509397014975548, 0.0390627421438694, -0.2691909968852997, 0.0498390719294548, 0.28393426537513733, -0.1750938445329666, -0.22183996438980103, 0.12232542783021927, 0.2192096710205078, -0.027199389412999153, 0.2155410796403885, 0.06490826606750488, -0.12252300977706909, 0.3755880296230316, 0.03956149145960808, 0.07220485061407089, -0.040856748819351196, 0.2515897750854492, -0.018732964992523193, -0.3264920115470886, 0.6129220128059387, -0.0750422328710556, -0.16170534491539001, -0.30275481939315796, 0.0731455609202385, 0.11651427298784256, -0.23528341948986053, -0.05641232803463936, 0.11712914705276489, 0.09034804999828339, 0.029194021597504616, 0.1955384910106659, -0.017713863402605057, -0.24864783883094788, -0.0644364207983017, -0.1412014663219452, -0.3983120620250702, 0.22892794013023376, 0.1119450181722641, 0.3001002073287964, -0.10092446953058243, 0.35021093487739563, 0.24706125259399414, -0.020484676584601402, -0.4086299240589142, -0.017280515283346176, -0.15061429142951965, 0.22977307438850403, 0.38677701354026794, -0.21386027336120605, 0.07955770939588547, 0.004547384101897478, 0.2706663906574249, 0.0681106299161911, -0.15413878858089447, -0.29020383954048157, -0.13805799186229706, 0.07492734491825104, 0.10812000185251236, -0.046176232397556305, 0.1655641496181488, 0.030689146369695663, -0.09279859066009521, -0.16296696662902832, -0.024024982005357742, 0.07060810923576355, -0.10044605284929276, 0.2611725926399231, 0.019956227391958237, -0.009458870626986027, 0.24623289704322815, 0.14675335586071014, -0.024072617292404175, 0.1554425209760666, -0.022890213876962662, 0.08983264863491058, 0.14845584332942963, 0.07804552465677261, -0.22698737680912018, 0.0927136167883873, 0.36525997519493103, -0.20797786116600037, 0.09195249527692795, -0.41460785269737244, -0.18692384660243988, 0.003545672632753849, 0.27474457025527954, 0.2939596176147461, -0.21621571481227875, 0.06637042760848999, 0.32280030846595764, 0.2919088304042816, -0.43397095799446106, 0.21760231256484985, 0.3344874083995819, 0.003923706244677305, 0.10138867795467377, -0.010827574878931046, 0.0384640097618103, 0.04702327400445938, 0.17537358403205872, 0.16580939292907715, 0.10263856500387192, -0.34466832876205444, 0.37641996145248413, 0.05067410320043564, 0.07587266713380814, -0.14639608561992645, 0.38205745816230774, -0.030178772285580635, 0.10450220853090286, 0.5094953775405884, -0.4414915144443512, 0.1682893931865692, 0.011565705761313438, 0.1542973518371582, 0.27671143412590027, -0.32336175441741943, -0.20223039388656616, -0.11390125751495361, -0.05365900695323944, 0.0028553041629493237, -0.06264567375183105, 0.6269553899765015, -0.3885320723056793, -0.10940726846456528, -0.14445963501930237, 0.1354537457227707, -0.3061710298061371, 0.07008184492588043, 0.03406951576471329, -0.18399634957313538, -0.1791858971118927, -0.22477519512176514, 0.13553005456924438, -0.08245715498924255, 0.4152856469154358, 0.09843923151493073, -0.17800381779670715, -0.2696000337600708, -0.19876480102539062, 0.21051543951034546, 0.06253822147846222, -0.08520950376987457, 0.3057462275028229, -0.03830580413341522, -0.13220322132110596, 0.06689608842134476, 0.5210750102996826, 0.5806877613067627, 0.1711713969707489, -0.0728711262345314, 0.18261197209358215, -0.08557277172803879, -0.07937174290418625, 0.09434796869754791, 0.11675836145877838, 0.0382121205329895, 0.3208303451538086, 0.12354883551597595, 0.2243594229221344, -0.22641107439994812, -0.049290768802165985, -0.11672981083393097, -0.24440675973892212, -0.44651177525520325, 0.38510891795158386, -0.26685354113578796, -0.11445896327495575, -0.38674283027648926, -0.031037883833050728, -0.5898923873901367, -0.03724038228392601, 0.49321314692497253, 0.27210697531700134, -0.10287433862686157, -0.3833264112472534, 0.11201009899377823, -0.2403331995010376, 0.14378979802131653, 0.3910236954689026, 0.21618346869945526, 0.026675883680582047, 0.01950119622051716, -0.6945980191230774, 0.12061724066734314, -0.07248678803443909, -0.015480210073292255, -0.048651840537786484, -0.08896590024232864, 0.046739671379327774, 0.13187812268733978, 0.1182088702917099, -0.26543179154396057, -0.21650391817092896, -0.2908380925655365, -0.30419406294822693, 0.014306523837149143, 0.0956115648150444, 0.044563453644514084, 0.16431790590286255, -0.2925545871257782, -0.08718008548021317, -0.30296358466148376, 0.07162926346063614, -0.19858556985855103, 0.01382361352443695, -0.022037675604224205, 0.15483850240707397, 0.37785547971725464, 0.07075216621160507, 0.7247418165206909, -0.12190933525562286, -0.014916741289198399, 0.08846288919448853, -0.3524928390979767, -0.1980544477701187, 0.1428399533033371, 0.040093038231134415, 0.4865869879722595, -0.16568095982074738, -0.14661625027656555, -0.2866223156452179, 0.013492070138454437, 0.095257468521595, -0.3367999792098999, -0.08147121220827103, 0.10757563263177872, -0.0959663987159729, 0.23801389336585999, -0.056812867522239685, 0.03837963566184044, -0.18237295746803284, -0.0006934874108992517, -0.3166337013244629, -0.41836678981781006, 0.6252817511558533, -0.09947770833969116, -0.4117879867553711, -0.4622049927711487, 0.2439308911561966, -0.13915017247200012, -0.2128487527370453, -0.4571857750415802, 0.17436209321022034, 0.33709219098091125, -0.04778965935111046, -0.0868128314614296, 0.2577061057090759, 0.069532610476017, -0.004733491223305464, 0.029503941535949707, 0.29872190952301025, 0.0493529848754406, -0.026867246255278587, 0.2987108528614044, -0.15217183530330658 ]
https://github.com/huggingface/datasets/issues/2595
ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets
@albertvillanova Thanks for the information. I updated it to 1.9.0 and the issue is resolved. Thanks again.
Error traceback: --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-8-a7b592d3bca0> in <module>() 1 from datasets import load_dataset, load_metric 2 ----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation") 4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test") 9 frames /root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>() 19 20 import datasets ---> 21 from datasets.tasks import AutomaticSpeechRecognition 22 23 ModuleNotFoundError: No module named 'datasets.tasks'
17
ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets Error traceback: --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-8-a7b592d3bca0> in <module>() 1 from datasets import load_dataset, load_metric 2 ----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation") 4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test") 9 frames /root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>() 19 20 import datasets ---> 21 from datasets.tasks import AutomaticSpeechRecognition 22 23 ModuleNotFoundError: No module named 'datasets.tasks' @albertvillanova Thanks for the information. I updated it to 1.9.0 and the issue is resolved. Thanks again.
[ -0.3636058568954468, -0.3833411633968353, -0.018118280917406082, -0.13243871927261353, 0.15852582454681396, 0.17342989146709442, 0.40831348299980164, 0.27742037177085876, 0.19420109689235687, 0.09595779329538345, -0.1962038278579712, 0.21372216939926147, -0.28575167059898376, -0.03076758049428463, 0.12093382328748703, 0.02432960830628872, 0.05258430168032646, 0.17853698134422302, 0.06399606168270111, -0.22893846035003662, -0.08301801234483719, 0.17989645898342133, -0.379059761762619, 0.23350192606449127, -0.3515876829624176, -0.19421260058879852, 0.008990591391921043, 0.04729911684989929, -0.059428561478853226, -0.2619595527648926, 0.15847963094711304, -0.02443980984389782, 0.02479255571961403, 0.5354665517807007, -0.00010722185106715187, 0.013080810196697712, 0.38876795768737793, -0.09515739232301712, -0.3423605263233185, -0.4812256693840027, -0.5180743336677551, -0.019878624007105827, -0.03788986802101135, -0.1568298637866974, 0.14326082170009613, 0.09318093955516815, 0.1367632895708084, -0.021138779819011688, 0.5184742212295532, 0.32341766357421875, 0.27609336376190186, 0.43967577815055847, 0.17584459483623505, -0.1285550743341446, -0.09198886901140213, 0.32004809379577637, -0.031203288584947586, 0.3851701021194458, 0.07189454883337021, -0.24818675220012665, 0.3491153120994568, 0.3169421851634979, -0.24839846789836884, -0.03980373963713646, 0.20997175574302673, -0.07044313102960587, -0.086419016122818, -0.5517331957817078, 0.16126759350299835, 0.17453254759311676, 0.31499746441841125, -0.40023818612098694, -0.2445603907108307, -0.18676158785820007, 0.1450689733028412, -0.2974833548069, 0.02112138271331787, 0.05815380811691284, -0.11663685739040375, 0.048545364290475845, 0.08849190920591354, -0.21538445353507996, 0.03249865770339966, -0.009893580339848995, 0.03794628381729126, 0.06954188644886017, -0.07145100831985474, -0.12441657483577728, 0.22390933334827423, -0.1729116439819336, -0.21985220909118652, 0.1894759088754654, 0.18762946128845215, 0.5041463971138, -0.4748547673225403, -0.18373559415340424, 0.22598126530647278, -0.27478039264678955, 0.05924936756491661, -0.12574666738510132, 0.06968358904123306, 0.0972486287355423, -0.14173783361911774, 0.25981462001800537, 0.23289641737937927, 0.26573091745376587, 0.3367702066898346, 0.3275891840457916, 0.3152906894683838, 0.32050758600234985, -0.031915333122015, 0.09618405252695084, -0.2667922377586365, -0.11197377741336823, 0.274302214384079, -0.0072113764472305775, 0.5157477259635925, -0.14452269673347473, -0.478394091129303, 0.02684391476213932, -0.15860113501548767, -0.04911697283387184, 0.04592227563261986, 0.3150608241558075, -0.07190068811178207, 0.20492058992385864, 0.11407370120286942, 0.07078805565834045, -0.33948948979377747, -0.020724931731820107, -0.20565201342105865, 0.14397215843200684, -0.1351427286863327, 0.039092667400836945, 0.1669227033853531, -0.23699569702148438, 0.24267971515655518, -0.03844829276204109, 0.12716668844223022, -0.164611354470253, -0.002661902690306306, 0.03504344820976257, -0.285361647605896, 0.21888543665409088, -0.05775811895728111, -0.025066711008548737, -0.006532737519592047, 0.05940379947423935, -0.1507553905248642, 0.14884187281131744, -0.385599285364151, -0.2488822489976883, 0.03539203479886055, 0.24517492949962616, 0.0019519446650519967, -0.2012859433889389, -0.20436692237854004, 0.11030865460634232, -0.019995439797639847, -0.32801079750061035, -0.1137688010931015, -0.31144726276397705, -0.01839476078748703, 0.08322285115718842, 0.31400415301322937, 0.21452443301677704, -0.09572342038154602, -0.2608373463153839, -0.1386357843875885, -0.1814468502998352, -0.014655512757599354, 0.29927217960357666, -0.028323959559202194, 0.11036805808544159, -0.06790454685688019, 0.5170897245407104, 0.13058406114578247, -0.40234261751174927, -0.21302978694438934, 0.08117323368787766, 0.061591699719429016, 0.07849802821874619, -0.14946657419204712, -0.2262280434370041, 0.12173695862293243, -0.005358691792935133, 0.289502888917923, 0.2189674973487854, 0.023290622979402542, -0.06668787449598312, -0.07012637704610825, -0.1601053923368454, 0.07318392395973206, 0.14772672951221466, 0.04379892349243164, -0.016552794724702835, -0.08379504084587097, 0.1944783329963684, 0.18074491620063782, -0.20129507780075073, 0.037375081330537796, 0.2082429677248001, 0.4772288501262665, 0.061002466827631, 0.001808248576708138, -0.28998011350631714, -0.24396739900112152, 0.09068436175584793, -0.04902397841215134, 0.35661938786506653, -0.3079187572002411, -0.18249700963497162, -0.3866799473762512, -0.052774831652641296, -0.3918939232826233, 0.0559835247695446, 0.16655412316322327, 0.03537920117378235, -0.14001451432704926, 0.016196543350815773, -0.3451240360736847, 0.26486995816230774, -0.030972855165600777, 0.1227005273103714, -0.35190334916114807, 0.3853034973144531, -0.1914646476507187, -0.3086243271827698, 0.21476376056671143, 0.4524843096733093, -0.007953819818794727, 0.06205391511321068, -0.1368798017501831, 0.16456054151058197, -0.0686163604259491, 0.2083023637533188, -0.25347548723220825, -0.11359242349863052, 0.12041836231946945, -0.3686169683933258, -0.03355233743786812, 0.15603353083133698, 0.1338924765586853, -0.1023145541548729, 0.06019281968474388, 0.19254805147647858, 0.2630731761455536, 0.08724921941757202, 0.16275204718112946, 0.07408887147903442, 0.05832613259553909, -0.07030356675386429, -0.18518634140491486, -0.057180874049663544, 0.27019190788269043, -0.17461596429347992, 0.37561318278312683, -0.02584121935069561, -0.6040570735931396, -0.35358914732933044, 0.4849465489387512, -0.078264981508255, 0.22361023724079132, 0.05562988668680191, -0.2568134069442749, 0.1159278154373169, 0.17055782675743103, -0.3374951183795929, 0.35945925116539, 0.1739274263381958, -0.10838062316179276, 0.3482668697834015, -0.08417849242687225, 0.0032749101519584656, -0.012649493291974068, 0.11011466383934021, 0.05214284732937813, 0.17742951214313507, 0.09458088874816895, 0.05033291503787041, -0.4496416747570038, -0.2656068503856659, -0.1863158643245697, 0.18643082678318024, -0.3769989311695099, -0.0612788163125515, -0.2536343038082123, -0.006275623571127653, -0.12109023332595825, -0.1308910846710205, -0.29107505083084106, -0.1262824833393097, -0.028530338779091835, 0.1420174092054367, 0.11648652702569962, 0.41190412640571594, 0.05627036467194557, -0.04286908730864525, 0.056648556143045425, -0.35793107748031616, -0.21574287116527557, -0.2365891933441162, -0.05441415682435036, 0.06168833002448082, 0.37867677211761475, 0.03837428241968155, 0.16991809010505676, -0.1812995970249176, -0.00006438650598283857, 0.1045464500784874, -0.4350384771823883, -0.006325495894998312, -0.23352296650409698, 0.06339649111032486, 0.0017650164663791656, 0.1968350112438202, -0.09752395749092102, -0.31321293115615845, 0.26334458589553833, -0.27208760380744934, -0.2986530661582947, 0.06466466933488846, -0.08016005903482437, -0.21361799538135529, -0.1200266107916832, -0.5569186806678772, -0.4403800964355469, -0.3566887676715851, 0.18199275434017181, -0.077286496758461, -0.043181296437978745, 0.6514207124710083, 0.029371343553066254, 0.2377748340368271, -0.10743190348148346, 0.16171440482139587, -0.10488253086805344, 0.05394555255770683, 0.3376304507255554, -0.17017900943756104, -0.19587400555610657, 0.11668481677770615, -0.2572163939476013, 0.6778263449668884, -0.19400782883167267, -0.2012847661972046, -0.07281594723463058, -0.050906985998153687, 0.24086567759513855, -0.13469763100147247, 0.15935485064983368, 0.20594997704029083, 0.15662062168121338, -0.055430565029382706, -0.012773146852850914, -0.24800525605678558, -0.0972873792052269, 0.5820997953414917, 0.0944187119603157, 0.060019463300704956, 0.3471997082233429, -0.24867253005504608, 0.7864294052124023, 0.23086999356746674, 0.1107456162571907, 0.2190028727054596, -0.09828757494688034, 0.2674398720264435, -0.21084246039390564, -0.4376785457134247, 0.2226894646883011, 0.09148745238780975, 0.11182194948196411, 0.2504206597805023, -0.03265751525759697, -0.12136866897344589, -0.35565152764320374, -0.3254825174808502, -0.1687038540840149, -0.2966780662536621, -0.11673949658870697, -0.08178088814020157, 0.3221667408943176, 0.16972899436950684, 0.10559810698032379, -0.21874286234378815, -0.06542707234621048, 0.14673666656017303, 0.24216635525226593, -0.09705496579408646, 0.06538255512714386, -0.306646466255188, -0.14836964011192322, -0.34053894877433777, 0.13686716556549072, -0.05175958201289177, 0.45582064986228943, -0.2143549770116806, 0.02104921266436577, -0.07816136628389359, 0.11874643713235855, 0.0026044934056699276, 0.1094014048576355, -0.1714257299900055, 0.1266743540763855, 0.08906843513250351, -0.12004169821739197, -0.10462785512208939, -0.06604766100645065, 0.05938582122325897, 0.145089790225029, 0.2695627510547638, -0.3026840090751648, 0.017718544229865074, 0.3039088249206543, 0.3760623633861542, 0.08053933084011078, -0.1350095421075821, -0.37702929973602295, -0.3506785035133362, -0.47288036346435547, 0.14290335774421692, 0.17243528366088867, 0.09702249616384506, -0.12717293202877045, 0.16323310136795044, 0.21967048943042755, -0.15730410814285278, 0.4420221149921417, 0.12187036871910095, 0.13291382789611816, -0.028629090636968613, 0.3401710093021393, 0.47681108117103577, 0.0664622038602829, 0.23751284182071686, 0.6372557282447815, -0.02367633581161499, -0.7577487826347351, -0.1979634016752243, -0.12012265622615814, 0.343826025724411, 0.11216378957033157, 0.09019211679697037, 0.027692681178450584, 0.4193376302719116, -0.008080089464783669, -0.007642711047083139, 0.11318911612033844, 0.48464199900627136, 0.4113263785839081, -0.40189793705940247, -0.3383573293685913, 0.07834633439779282, 0.1432865858078003, 0.1592215746641159, 0.13717935979366302, -0.0960872620344162, -0.2214958369731903, -0.02484952099621296, -0.5586663484573364, 0.7840062975883484, 0.32275551557540894, 0.06124035269021988, 0.26293671131134033, -0.003396238898858428, 0.07993919402360916, 0.0453011617064476, 0.16852250695228577, -0.13810411095619202, -0.016007669270038605, 0.011967264115810394, -0.09744162112474442, 0.22062139213085175, 0.07796548306941986, -0.41014137864112854, 0.4231620728969574, 0.0714922696352005, 0.04687144234776497, 0.007525986526161432, 0.27931374311447144, 0.10802020877599716, -0.1398213654756546, -0.14610791206359863, 0.19996044039726257, -0.1303398311138153, 0.6326059103012085, 0.10155966877937317, -0.12584048509597778, -0.03054829314351082, -0.3149101436138153, -0.10650314390659332, 0.20049700140953064, -0.22000429034233093, 0.2250458300113678, 0.3635546863079071, -0.0740770623087883, 0.30702662467956543, -0.09080404043197632, -0.06724520772695541, 0.012437839061021805, -0.2876224219799042, 0.08296556025743484, 0.11729184538125992, 0.0674094557762146, -0.09600596129894257, 0.031805720180273056, 0.6111612319946289, -0.11104021221399307, -0.42293408513069153, 0.16731902956962585, -0.09541725367307663, 0.10453038662672043, -0.23546618223190308, 0.0267726369202137, 0.22497384250164032, -0.09808830171823502, -0.22557073831558228, 0.10455559194087982, 0.2335188090801239, -0.060801319777965546, 0.19466571509838104, 0.048396263271570206, -0.14517390727996826, 0.33759593963623047, 0.05211513862013817, 0.005514074116945267, -0.06953408569097519, 0.2893536388874054, -0.00040255990461446345, -0.3251860737800598, 0.6093980669975281, -0.09398803859949112, -0.17701134085655212, -0.25211915373802185, 0.032193150371313095, 0.21301180124282837, -0.2881563603878021, 0.026394527405500412, 0.14573156833648682, 0.09586633741855621, 0.009158519096672535, 0.271573007106781, -0.03579167649149895, -0.2337743043899536, -0.08702771365642548, -0.11457572132349014, -0.41282472014427185, 0.2796645760536194, 0.11660952866077423, 0.26428917050361633, -0.1291111707687378, 0.41322964429855347, 0.33128711581230164, -0.04697117581963539, -0.37690380215644836, -0.0129261938855052, -0.19945450127124786, 0.16772058606147766, 0.36695319414138794, -0.19355182349681854, 0.09035766124725342, 0.08348571509122849, 0.25806760787963867, 0.08665445446968079, -0.12997813522815704, -0.24244242906570435, -0.12288302183151245, 0.08765041083097458, 0.11718416213989258, -0.03285876289010048, 0.17965669929981232, 0.011978537775576115, -0.1475059539079666, -0.1580754518508911, 0.021080492064356804, 0.07147432118654251, -0.1193956509232521, 0.1821642518043518, 0.07641398906707764, -0.007199408020824194, 0.2596050202846527, 0.21251171827316284, 0.04110775515437126, 0.12991595268249512, 0.007317292038351297, 0.025597495958209038, 0.1358456164598465, 0.11087273061275482, -0.14504249393939972, 0.09272492676973343, 0.25302010774612427, -0.20151843130588531, 0.08517757803201675, -0.377585232257843, -0.15252374112606049, 0.0016043452778831124, 0.20830358564853668, 0.3257998824119568, -0.14626093208789825, 0.0995502844452858, 0.31645312905311584, 0.2548805773258209, -0.44263145327568054, 0.24021993577480316, 0.3323376476764679, 0.04457186535000801, 0.09072347730398178, -0.01400964055210352, 0.03408515453338623, 0.050593893975019455, 0.19294437766075134, 0.14503633975982666, 0.0011350434506312013, -0.2689981162548065, 0.3850501477718353, -0.009510418400168419, 0.04656980559229851, -0.08081512153148651, 0.36812371015548706, -0.02089361473917961, 0.09746035933494568, 0.3820582330226898, -0.43788856267929077, 0.24194954335689545, 0.03158680349588394, 0.14592193067073822, 0.28721171617507935, -0.3768298327922821, -0.2674655020236969, -0.1129542663693428, -0.015896432101726532, 0.021188469603657722, -0.07385347038507462, 0.6236790418624878, -0.486530601978302, -0.06269099563360214, -0.07762297987937927, 0.1505671590566635, -0.3340907692909241, 0.12476631999015808, 0.04123084247112274, -0.1665501892566681, -0.15295949578285217, -0.24080225825309753, 0.13427725434303284, -0.062005508691072464, 0.3735053241252899, 0.0824025496840477, -0.15662558376789093, -0.2083682119846344, -0.2844170033931732, 0.21982528269290924, 0.028859468176960945, -0.09742482751607895, 0.21858444809913635, -0.009172345511615276, -0.07402582466602325, 0.08732454478740692, 0.5061696171760559, 0.5795961618423462, 0.23848605155944824, -0.03313055261969566, 0.10495100170373917, -0.016866780817508698, -0.060255590826272964, 0.12997034192085266, 0.07002551853656769, 0.13685612380504608, 0.41413938999176025, 0.09768880903720856, 0.17247121036052704, -0.19979126751422882, -0.05299186706542969, -0.04291364178061485, -0.21572819352149963, -0.45596379041671753, 0.2976953387260437, -0.31281816959381104, -0.13894081115722656, -0.3822701871395111, -0.03458363190293312, -0.558260977268219, 0.06630246341228485, 0.4672362208366394, 0.26795676350593567, -0.16786445677280426, -0.39795607328414917, 0.08951596170663834, -0.26673424243927, 0.1480168253183365, 0.40193018317222595, 0.18182219564914703, -0.019209595397114754, 0.04714477062225342, -0.6798257231712341, 0.18624576926231384, -0.013390490785241127, -0.07089212536811829, -0.04275691509246826, -0.1561950296163559, -0.024506373330950737, 0.016696369275450706, 0.08771439641714096, -0.3457702696323395, -0.1732073277235031, -0.3885887563228607, -0.34078922867774963, -0.038382064551115036, 0.08905636519193649, -0.028440799564123154, 0.19616711139678955, -0.2559448182582855, -0.02158195897936821, -0.26709267497062683, 0.03971503674983978, -0.19741077721118927, -0.009619762189686298, -0.02933722548186779, 0.2362261265516281, 0.3201614320278168, -0.043613776564598083, 0.6852191090583801, -0.09797177463769913, -0.06327660381793976, 0.05460141599178314, -0.2957468628883362, -0.23357093334197998, 0.18203847110271454, 0.09987983852624893, 0.4836896061897278, -0.13162298500537872, -0.08214481920003891, -0.2838932275772095, -0.0038028955459594727, 0.05100981891155243, -0.33235037326812744, -0.06477305293083191, 0.1963786780834198, -0.061784565448760986, 0.23275744915008545, 0.00008503643766744062, 0.03978417441248894, -0.20827613770961761, -0.056877318769693375, -0.32053229212760925, -0.42500993609428406, 0.6887368559837341, -0.11748304218053818, -0.4332190454006195, -0.48823046684265137, 0.22156216204166412, -0.16907444596290588, -0.25081154704093933, -0.4525451362133026, 0.18267692625522614, 0.3078407049179077, -0.02808290719985962, -0.10325173288583755, 0.2085326910018921, 0.02833067812025547, 0.0559331439435482, -0.0203063003718853, 0.25455614924430847, 0.10181993991136551, -0.08721467107534409, 0.2926311492919922, -0.1661282479763031 ]
https://github.com/huggingface/datasets/issues/2591
Cached dataset overflowing disk space
I'm using the datasets concatenate dataset to combine the datasets and then train. train_dataset = concatenate_datasets([dataset1, dataset2, common_voice_train])
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb). The cache folder is 500gb (and now my disk space is full). Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files). This might not technically be a bug, but I was unsure and I felt that the bug was the closest one. Traceback (most recent call last): File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper out = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single writer.finalize() File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize self.pa_writer.close() File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device """ The above exception was the direct cause of the following exception:
18
Cached dataset overflowing disk space I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb). The cache folder is 500gb (and now my disk space is full). Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files). This might not technically be a bug, but I was unsure and I felt that the bug was the closest one. Traceback (most recent call last): File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper out = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single writer.finalize() File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize self.pa_writer.close() File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device """ The above exception was the direct cause of the following exception: I'm using the datasets concatenate dataset to combine the datasets and then train. train_dataset = concatenate_datasets([dataset1, dataset2, common_voice_train])
[ 0.037559643387794495, -0.4222128093242645, 0.09859009832143784, 0.4514758288860321, 0.10117408633232117, 0.20505647361278534, 0.074485644698143, 0.14190475642681122, 0.14452829957008362, 0.055637177079916, 0.40107935667037964, -0.2280428111553192, -0.12429968267679214, 0.11271926760673523, 0.14668874442577362, 0.068689726293087, 0.2591468095779419, -0.24585939943790436, -0.06104855611920357, 0.10608994960784912, -0.1954932063817978, 0.2656945586204529, 0.023638321086764336, -0.12529028952121735, -0.2641811668872833, -0.1312524378299713, 0.1114906445145607, 0.09155451506376266, 0.1169937402009964, -0.22152085602283478, 0.645517110824585, -0.03754299134016037, 0.29698383808135986, 0.33420392870903015, -0.00012711147428490222, -0.2188410609960556, 0.09154057502746582, -0.18159309029579163, -0.0922589972615242, 0.5504895448684692, 0.19144125282764435, -0.3445686399936676, -0.05229555815458298, 0.012889232486486435, -0.19401609897613525, 0.13530057668685913, -0.09690777957439423, -0.4302127957344055, 0.244851753115654, 0.07248489558696747, 0.04802979901432991, -0.007762677036225796, -0.11816836148500443, 0.17080125212669373, -0.10923659056425095, -0.004405634477734566, -0.2483726441860199, 0.19986838102340698, 0.24984583258628845, -0.16989432275295258, -0.11372186988592148, 0.5557485222816467, -0.05901399999856949, -0.0844288244843483, 0.5253403186798096, 0.08338169753551483, -0.35629764199256897, -0.11066245287656784, 0.38137856125831604, -0.08013555407524109, 0.3144633173942566, -0.42118629813194275, -0.03597567602992058, -0.5416687726974487, 0.12429245561361313, -0.4084813594818115, 0.4917795658111572, 0.1439301073551178, -0.3081754446029663, 0.20550809800624847, -0.26439520716667175, -0.46216875314712524, -0.2639661431312561, -0.12115156650543213, -0.05101524293422699, -0.16926036775112152, -0.17793002724647522, 0.003886954626068473, 0.4981888234615326, -0.12435232102870941, -0.018054747954010963, -0.11482809484004974, -0.1485932320356369, 0.16648872196674347, -0.4704055190086365, -0.1601632833480835, -0.15975640714168549, 0.4838791489601135, 0.17781610786914825, 0.03436853364109993, 0.05801529437303543, -0.22197778522968292, 0.013549590483307838, -0.05450795218348503, 0.03849118575453758, 0.6338205337524414, -0.4302007555961609, 0.1479855328798294, 0.026061421260237694, -0.10047579556703568, -0.06649564206600189, -0.08406542986631393, -0.006118884310126305, -0.38886627554893494, 0.24311813712120056, -0.30944710969924927, 0.03660645708441734, -0.26600468158721924, -0.1329784393310547, 0.10960038006305695, 0.18775682151317596, 0.14078284800052643, 0.2514514625072479, 0.3864435851573944, 0.18210609257221222, 0.3051149249076843, -0.3228459060192108, 0.22181016206741333, -0.24434234201908112, -0.11928997933864594, -0.04407370090484619, -0.08466439694166183, 0.04949849098920822, 0.329577773809433, 0.32801562547683716, -0.115823894739151, -0.043829336762428284, -0.16687282919883728, 0.23681992292404175, -0.02642090618610382, 0.030998803675174713, -0.25859296321868896, 0.28684496879577637, 0.11232362687587738, -0.3598537743091583, 0.22516925632953644, 0.24257752299308777, 0.39896583557128906, -0.2411041408777237, 0.12478254735469818, -0.3550453186035156, -0.25183871388435364, 0.1480788141489029, -0.01426953636109829, -0.18318107724189758, -0.09696339815855026, -0.42974621057510376, 0.21908265352249146, 0.4013513922691345, -0.28940993547439575, 0.04606153070926666, 0.016729900613427162, -0.45551231503486633, -0.12716706097126007, 0.21834076941013336, 0.390550434589386, -0.1844455897808075, -0.0037566369865089655, 0.08714276552200317, 0.4355641007423401, 0.048523109406232834, 0.623354434967041, -0.14133749902248383, 0.022438500076532364, -0.32213011384010315, -0.21304801106452942, -0.03465414419770241, -0.569579005241394, -0.7795041799545288, 0.015955910086631775, 0.05073589086532593, 0.2829306125640869, 0.34642645716667175, 0.1854572743177414, 0.0370459146797657, -0.1173868328332901, -0.12995195388793945, 0.21605747938156128, -0.004505920689553022, -0.0558646097779274, -0.3231567442417145, -0.5304924249649048, 0.2853464186191559, -0.11477996408939362, 0.04664991796016693, 0.10060366988182068, -0.2822222411632538, 0.0011680395109578967, 0.1973252296447754, -0.031637854874134064, 0.25416818261146545, 0.38443800806999207, 0.2930663526058197, -0.3115615248680115, -0.06635884940624237, 0.004258411005139351, -0.45750588178634644, 0.19509495794773102, 0.17837408185005188, -0.37532052397727966, 0.1245836615562439, -0.10039203613996506, 0.01440685335546732, -0.22644619643688202, -0.133951798081398, -0.21682646870613098, -0.13746318221092224, -0.03394440561532974, 0.4003782570362091, -0.17632868885993958, -0.29911065101623535, 0.34005624055862427, 0.0025756193790584803, -0.04063224047422409, -0.32598623633384705, -0.015432842075824738, 0.14475639164447784, -0.017068248242139816, -0.259840190410614, 0.18882541358470917, 0.06481882929801941, -0.035528119653463364, 0.03686456382274628, 0.2335701882839203, 0.02266704849898815, 0.3187161982059479, 0.34933197498321533, 0.37963563203811646, 0.21286973357200623, -0.09152249246835709, 0.28208228945732117, 0.2902055084705353, -0.06202613189816475, 0.052461862564086914, -0.3751503527164459, 0.20037972927093506, 0.0710655003786087, 0.19506196677684784, -0.11398103088140488, -0.23688288033008575, 0.25141093134880066, 0.13605988025665283, 0.09445452690124512, -0.12162724882364273, 0.22448955476284027, 0.0017586199101060629, 0.3925086259841919, 0.04765843600034714, -0.04161101207137108, 0.2306886911392212, 0.3817819654941559, 0.23128125071525574, 0.07951104640960693, 0.39274007081985474, -0.12577669322490692, -0.2583570182323456, 0.10781527310609818, 0.3400515615940094, 0.5201392769813538, 0.16599741578102112, 0.19271190464496613, -0.08257905393838882, 0.03340717777609825, -0.024867044761776924, 0.14059367775917053, -0.2922540009021759, -0.16624417901039124, 0.09999122470617294, 0.17856751382350922, -0.17033371329307556, -0.11510101705789566, 0.20650842785835266, -0.007210658397525549, 0.03747045248746872, -0.12302904576063156, 0.2915499210357666, -0.00518793286755681, 0.06696038693189621, -0.30042195320129395, 0.20180493593215942, -0.4009771943092346, -0.006393217947334051, 0.13575750589370728, 0.5235958695411682, 0.09591270983219147, 0.023175306618213654, -0.19688686728477478, 0.7337742447853088, -0.07811595499515533, -0.2568981945514679, 0.08064890652894974, -0.012009045109152794, -0.18147854506969452, -0.14870019257068634, 0.30939626693725586, -0.5017922520637512, 0.09717757254838943, 0.17247366905212402, -0.08517316728830338, -0.29793745279312134, 0.10572052747011185, -0.07112836092710495, 0.17247368395328522, 0.026216790080070496, -0.3023275136947632, 0.3171686828136444, 0.008635656908154488, -0.09089305251836777, -0.08609195798635483, -0.10901986062526703, -0.08055029809474945, -0.11614398658275604, 0.05000866949558258, 0.4038138687610626, 0.1403171271085739, 0.038804225623607635, -0.26064831018447876, -0.23034800589084625, 0.2758384048938751, -0.15369416773319244, -0.043294575065374374, 0.08113963156938553, 0.011299066245555878, -0.13151511549949646, -0.12341927736997604, -0.28817540407180786, -0.25257617235183716, -0.7670422792434692, 0.317576140165329, 0.06598126888275146, -0.07368731498718262, 0.14828820526599884, 0.22149933874607086, 0.35197293758392334, 0.1975894719362259, -0.5262953639030457, -0.10804370045661926, -0.19273068010807037, 0.27785471081733704, -0.20426757633686066, -0.24375173449516296, 0.3360223174095154, -0.12538671493530273, 0.19100737571716309, 0.04391113296151161, -0.19727276265621185, 0.2947358191013336, 0.260820209980011, 0.3492497503757477, -0.07572507858276367, -0.059926241636276245, 0.08637706190347672, 0.9180577993392944, 0.03664718195796013, 0.11798795312643051, 0.23432688415050507, 0.28716737031936646, 0.44863587617874146, -0.18619714677333832, -0.24647916853427887, 0.05115262791514397, -0.13457246124744415, -0.27134519815444946, 0.10462551563978195, 0.30827438831329346, 0.14662621915340424, 0.16312946379184723, -0.06892184913158417, 0.21875262260437012, -0.2138773649930954, 0.3311523199081421, -0.14019359648227692, 0.3264656066894531, 0.028098130598664284, 0.08923853188753128, -0.338379442691803, -0.22780512273311615, 0.003013046458363533, 0.127801775932312, 0.3850557506084442, 0.26120704412460327, -0.2789204716682434, -0.24332495033740997, -0.48271745443344116, 0.19565588235855103, -0.038494035601615906, 0.040339916944503784, -0.3785455524921417, -0.22536306083202362, 0.12978990375995636, 0.020334208384156227, 0.9234856367111206, 0.04645590856671333, 0.18212570250034332, -0.2568489909172058, -0.09680713713169098, -0.07582981139421463, 0.0022397679276764393, 0.29074612259864807, -0.21749097108840942, -0.14679281413555145, 0.40989261865615845, 0.037876006215810776, -0.08720714598894119, -0.32016491889953613, 0.36399757862091064, -0.45757320523262024, 0.006599836517125368, -0.2253907471895218, -0.05376359820365906, -0.06250029802322388, 0.15161918103694916, 0.13378916680812836, 0.12305872142314911, 0.09344234317541122, 0.13200989365577698, -0.17027254402637482, -0.04276743531227112, -0.05559322237968445, 0.02009529434144497, 0.5271492004394531, 0.11927369236946106, 0.04087502509355545, 0.2363303005695343, 0.2522958219051361, 0.1998601108789444, 0.27406078577041626, 0.09328579157590866, -0.02580292336642742, -0.02144981548190117, 0.0511358268558979, 0.11866341531276703, 0.43272462487220764, -0.22887319326400757, 0.2974846363067627, 0.09995904564857483, 0.12648481130599976, -0.7642991542816162, 0.07686611264944077, 0.22692017257213593, 0.3894955813884735, -0.04713692143559456, -0.38556963205337524, 0.3176094591617584, 0.016766157001256943, -0.014085629023611546, 0.24370868504047394, 0.11867457628250122, -0.5224871635437012, 0.00297380518168211, 0.01669776625931263, 1.0220947265625, -0.005273659247905016, 0.5250899195671082, 0.01060579065233469, 0.08383230119943619, 0.4028093218803406, -0.5466373562812805, 0.35856714844703674, 0.05777193605899811, -0.2558862566947937, -0.035482265055179596, 0.08913226425647736, -0.008490461856126785, -0.07289180159568787, -0.1517246812582016, 0.38956812024116516, -0.094648577272892, 0.21418005228042603, -0.4183894097805023, -0.08630824089050293, -0.011762941256165504, -0.22539059817790985, -0.5132775902748108, 0.054548945277929306, -0.27421170473098755, 0.10352631658315659, -0.05083382874727249, 0.03190649300813675, 0.16359196603298187, -0.021002070978283882, -0.3381100296974182, -0.20945332944393158, -0.25285211205482483, -0.025897515937685966, -0.03639259934425354, -0.3285657465457916, -0.016561241820454597, 0.2719000279903412, 0.3318612575531006, 0.09051402658224106, -0.364114373922348, 0.11960228532552719, -0.1798488348722458, 0.0628119483590126, -0.21515139937400818, -0.09834664314985275, -0.16749997437000275, -0.0548018142580986, 0.01749928668141365, 0.07076894491910934, 0.033785659819841385, -0.4108779728412628, 0.01751105487346649, 0.03225727751851082, -0.1330735981464386, -0.09009666740894318, -0.20876915752887726, 0.14244331419467926, 0.031938377767801285, -0.06901674717664719, 0.04544617235660553, 0.21769234538078308, -0.34029921889305115, 0.12043943256139755, -0.21364641189575195, -0.24093174934387207, -0.038049034774303436, 0.4774671494960785, 0.028959792107343674, -0.2921251058578491, 0.522063136100769, -0.011416008695960045, 0.05394536256790161, -0.18834972381591797, 0.14020152390003204, 0.17015105485916138, -0.1835630089044571, -0.0535128228366375, 0.028114350512623787, -0.28557512164115906, -0.205734983086586, -0.2029026597738266, 0.4924888610839844, -0.2519828677177429, -0.30505144596099854, -0.14498864114284515, -0.40764492750167847, -0.020889710634946823, -0.276292085647583, -0.02577695995569229, -0.09619072079658508, -0.2987641394138336, -0.019885314628481865, 0.19164162874221802, -0.14317092299461365, 0.014227696694433689, -0.00012187705578980967, -0.1673363745212555, 0.10388155281543732, 0.027455469593405724, 0.48546329140663147, -0.06346956640481949, -0.19099311530590057, -0.15952414274215698, -0.0006298439111560583, -0.03928935527801514, -0.06181412190198898, 0.15406861901283264, -0.1610926240682602, -0.012418549507856369, -0.018557224422693253, -0.2299518883228302, 0.044407714158296585, -0.32965439558029175, 0.157379150390625, 0.21430185437202454, 0.20892374217510223, -0.02163107506930828, -0.32651376724243164, 0.00021086396009195596, 0.0032443262171000242, 0.1196155846118927, 0.28255993127822876, -0.10582210123538971, 0.08209237456321716, 0.18946340680122375, -0.019517185166478157, -0.07181329280138016, -0.10820326209068298, 0.24002917110919952, 0.030345723032951355, -0.10756029188632965, 0.002384764142334461, -0.03746568411588669, -0.01439295057207346, 0.3485850989818573, 0.13812576234340668, 0.19012367725372314, -0.03175143152475357, -0.010205564089119434, 0.32908952236175537, 0.032443419098854065, -0.0629224181175232, -0.3029327690601349, 0.1396772712469101, -0.10798898339271545, -0.09744785726070404, 0.35205957293510437, 0.027017101645469666, -0.2138877660036087, 0.08610299229621887, 0.14734303951263428, 0.49556657671928406, -0.29766830801963806, 0.36282476782798767, 0.1930975764989853, 0.21265874803066254, 0.10369587689638138, 0.2905106246471405, 0.32934632897377014, 0.23671141266822815, 0.5512292385101318, -0.03360684588551521, 0.1553390920162201, 0.28774139285087585, 0.009771873243153095, -0.20694230496883392, -0.39939939975738525, -0.4862816035747528, 0.2589121162891388, -0.21330924332141876, 0.22736020386219025, -0.13360942900180817, 0.14679424464702606, -0.04144864156842232, -0.6776145696640015, -0.3064129948616028, -0.0712348222732544, -0.24339677393436432, -0.34788843989372253, 0.2802797257900238, -0.05674439296126366, 0.28443241119384766, 0.28727415204048157, 0.07969222962856293, -0.23314888775348663, 0.48158273100852966, -0.05466719716787338, -0.018018342554569244, 0.17536014318466187, 0.0876789316534996, 0.28630298376083374, 0.11032919585704803, -0.15479923784732819, 0.2614772915840149, -0.017421962693333626, -0.1297917366027832, 0.027695629745721817, 0.19197078049182892, 0.24324257671833038, 0.10014471411705017, -0.042350322008132935, 0.2072947770357132, 0.08171594887971878, 0.17870555818080902, -0.34299442172050476, 0.1529141217470169, -0.1525605320930481, 0.07531100511550903, 0.03375251963734627, -0.03199021890759468, 0.11957428604364395, 0.2038128823041916, -0.11085879802703857, 0.2348308116197586, -0.4639115333557129, -0.049700357019901276, -0.24467647075653076, 0.07653048634529114, -0.2179710566997528, 0.2800675630569458, -0.2816496193408966, 0.19422617554664612, 0.5648444294929504, -0.044258326292037964, 0.34975430369377136, 0.19053369760513306, -0.011787846684455872, -0.01126956008374691, 0.762752115726471, 0.1087862178683281, -0.3031584918498993, -0.305041640996933, 0.030853770673274994, -0.488602876663208, 0.0807434543967247, -0.31528156995773315, 0.2396727353334427, -0.20807887613773346, 0.10565054416656494, 0.06698784232139587, -0.018933113664388657, -0.07729978859424591, -0.09755352884531021, 0.051274072378873825, 0.046531856060028076, -0.34507298469543457, -0.09465101361274719, 0.1758098155260086, 0.22806501388549805, 0.08666235953569412, -0.3995473086833954, 0.2115197330713272, 0.16425146162509918, -0.158664271235466, 0.41969743371009827, 0.18698246777057648, -0.49183744192123413, 0.2579593360424042, -0.1285671442747116, 0.1905248463153839, 0.11105071008205414, 0.2345270812511444, 0.031241770833730698, -0.48960280418395996, -0.034894153475761414, -0.23273228108882904, -0.0441683866083622, -0.12012290954589844, 0.2055237889289856, -0.5847110748291016, 0.038765572011470795, -0.3769586682319641, 0.20367872714996338, 0.3197949528694153, -0.1638128012418747, 0.09265583008527756, -0.012531595304608345, 0.1860569417476654, 0.09033306688070297, 0.41705548763275146, 0.4198196828365326, -0.06857176125049591, 0.0642155185341835, -0.3439033329486847, 0.13526403903961182, 0.2230733036994934, -0.34712105989456177, -0.36009952425956726, 0.25708135962486267, 0.3946217894554138, 0.5234398245811462, -0.3522135615348816, -0.3459506928920746, 0.11524461209774017, 0.03330781310796738, 0.08213809132575989, -0.1448383778333664, 0.2011442929506302, -0.2863762080669403, -0.25332850217819214, 0.14249755442142487, 0.3100414574146271, 0.3002068102359772, -0.16755464673042297, 0.27148938179016113, -0.32099539041519165 ]
https://github.com/huggingface/datasets/issues/2591
Cached dataset overflowing disk space
Hi @BirgerMoell. You have several options: - to set caching to be stored on a different path location, other than the default one (`~/.cache/huggingface/datasets`): - either setting the environment variable `HF_DATASETS_CACHE` with the path to the new cache location - or by passing it with the parameter `cache_dir` when loading each of the datasets: `dataset = load_dataset(..., cache_dir=your_new_location)` You can get all the information in the docs: https://huggingface.co/docs/datasets/loading_datasets.html#cache-directory - I wouldn't recommend disabling caching, because current implementation generates cache files anyway, although in a temporary directory and they are deleted when the session closes. See details here: https://huggingface.co/docs/datasets/processing.html#enable-or-disable-caching - You could alternatively load the datasets in streaming mode. This is a new feature which allows loading the datasets without downloading the entire files. More information here: https://huggingface.co/docs/datasets/dataset_streaming.html
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb). The cache folder is 500gb (and now my disk space is full). Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files). This might not technically be a bug, but I was unsure and I felt that the bug was the closest one. Traceback (most recent call last): File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper out = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single writer.finalize() File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize self.pa_writer.close() File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device """ The above exception was the direct cause of the following exception:
127
Cached dataset overflowing disk space I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb). The cache folder is 500gb (and now my disk space is full). Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files). This might not technically be a bug, but I was unsure and I felt that the bug was the closest one. Traceback (most recent call last): File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper out = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single writer.finalize() File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize self.pa_writer.close() File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device """ The above exception was the direct cause of the following exception: Hi @BirgerMoell. You have several options: - to set caching to be stored on a different path location, other than the default one (`~/.cache/huggingface/datasets`): - either setting the environment variable `HF_DATASETS_CACHE` with the path to the new cache location - or by passing it with the parameter `cache_dir` when loading each of the datasets: `dataset = load_dataset(..., cache_dir=your_new_location)` You can get all the information in the docs: https://huggingface.co/docs/datasets/loading_datasets.html#cache-directory - I wouldn't recommend disabling caching, because current implementation generates cache files anyway, although in a temporary directory and they are deleted when the session closes. See details here: https://huggingface.co/docs/datasets/processing.html#enable-or-disable-caching - You could alternatively load the datasets in streaming mode. This is a new feature which allows loading the datasets without downloading the entire files. More information here: https://huggingface.co/docs/datasets/dataset_streaming.html
[ 0.037559643387794495, -0.4222128093242645, 0.09859009832143784, 0.4514758288860321, 0.10117408633232117, 0.20505647361278534, 0.074485644698143, 0.14190475642681122, 0.14452829957008362, 0.055637177079916, 0.40107935667037964, -0.2280428111553192, -0.12429968267679214, 0.11271926760673523, 0.14668874442577362, 0.068689726293087, 0.2591468095779419, -0.24585939943790436, -0.06104855611920357, 0.10608994960784912, -0.1954932063817978, 0.2656945586204529, 0.023638321086764336, -0.12529028952121735, -0.2641811668872833, -0.1312524378299713, 0.1114906445145607, 0.09155451506376266, 0.1169937402009964, -0.22152085602283478, 0.645517110824585, -0.03754299134016037, 0.29698383808135986, 0.33420392870903015, -0.00012711147428490222, -0.2188410609960556, 0.09154057502746582, -0.18159309029579163, -0.0922589972615242, 0.5504895448684692, 0.19144125282764435, -0.3445686399936676, -0.05229555815458298, 0.012889232486486435, -0.19401609897613525, 0.13530057668685913, -0.09690777957439423, -0.4302127957344055, 0.244851753115654, 0.07248489558696747, 0.04802979901432991, -0.007762677036225796, -0.11816836148500443, 0.17080125212669373, -0.10923659056425095, -0.004405634477734566, -0.2483726441860199, 0.19986838102340698, 0.24984583258628845, -0.16989432275295258, -0.11372186988592148, 0.5557485222816467, -0.05901399999856949, -0.0844288244843483, 0.5253403186798096, 0.08338169753551483, -0.35629764199256897, -0.11066245287656784, 0.38137856125831604, -0.08013555407524109, 0.3144633173942566, -0.42118629813194275, -0.03597567602992058, -0.5416687726974487, 0.12429245561361313, -0.4084813594818115, 0.4917795658111572, 0.1439301073551178, -0.3081754446029663, 0.20550809800624847, -0.26439520716667175, -0.46216875314712524, -0.2639661431312561, -0.12115156650543213, -0.05101524293422699, -0.16926036775112152, -0.17793002724647522, 0.003886954626068473, 0.4981888234615326, -0.12435232102870941, -0.018054747954010963, -0.11482809484004974, -0.1485932320356369, 0.16648872196674347, -0.4704055190086365, -0.1601632833480835, -0.15975640714168549, 0.4838791489601135, 0.17781610786914825, 0.03436853364109993, 0.05801529437303543, -0.22197778522968292, 0.013549590483307838, -0.05450795218348503, 0.03849118575453758, 0.6338205337524414, -0.4302007555961609, 0.1479855328798294, 0.026061421260237694, -0.10047579556703568, -0.06649564206600189, -0.08406542986631393, -0.006118884310126305, -0.38886627554893494, 0.24311813712120056, -0.30944710969924927, 0.03660645708441734, -0.26600468158721924, -0.1329784393310547, 0.10960038006305695, 0.18775682151317596, 0.14078284800052643, 0.2514514625072479, 0.3864435851573944, 0.18210609257221222, 0.3051149249076843, -0.3228459060192108, 0.22181016206741333, -0.24434234201908112, -0.11928997933864594, -0.04407370090484619, -0.08466439694166183, 0.04949849098920822, 0.329577773809433, 0.32801562547683716, -0.115823894739151, -0.043829336762428284, -0.16687282919883728, 0.23681992292404175, -0.02642090618610382, 0.030998803675174713, -0.25859296321868896, 0.28684496879577637, 0.11232362687587738, -0.3598537743091583, 0.22516925632953644, 0.24257752299308777, 0.39896583557128906, -0.2411041408777237, 0.12478254735469818, -0.3550453186035156, -0.25183871388435364, 0.1480788141489029, -0.01426953636109829, -0.18318107724189758, -0.09696339815855026, -0.42974621057510376, 0.21908265352249146, 0.4013513922691345, -0.28940993547439575, 0.04606153070926666, 0.016729900613427162, -0.45551231503486633, -0.12716706097126007, 0.21834076941013336, 0.390550434589386, -0.1844455897808075, -0.0037566369865089655, 0.08714276552200317, 0.4355641007423401, 0.048523109406232834, 0.623354434967041, -0.14133749902248383, 0.022438500076532364, -0.32213011384010315, -0.21304801106452942, -0.03465414419770241, -0.569579005241394, -0.7795041799545288, 0.015955910086631775, 0.05073589086532593, 0.2829306125640869, 0.34642645716667175, 0.1854572743177414, 0.0370459146797657, -0.1173868328332901, -0.12995195388793945, 0.21605747938156128, -0.004505920689553022, -0.0558646097779274, -0.3231567442417145, -0.5304924249649048, 0.2853464186191559, -0.11477996408939362, 0.04664991796016693, 0.10060366988182068, -0.2822222411632538, 0.0011680395109578967, 0.1973252296447754, -0.031637854874134064, 0.25416818261146545, 0.38443800806999207, 0.2930663526058197, -0.3115615248680115, -0.06635884940624237, 0.004258411005139351, -0.45750588178634644, 0.19509495794773102, 0.17837408185005188, -0.37532052397727966, 0.1245836615562439, -0.10039203613996506, 0.01440685335546732, -0.22644619643688202, -0.133951798081398, -0.21682646870613098, -0.13746318221092224, -0.03394440561532974, 0.4003782570362091, -0.17632868885993958, -0.29911065101623535, 0.34005624055862427, 0.0025756193790584803, -0.04063224047422409, -0.32598623633384705, -0.015432842075824738, 0.14475639164447784, -0.017068248242139816, -0.259840190410614, 0.18882541358470917, 0.06481882929801941, -0.035528119653463364, 0.03686456382274628, 0.2335701882839203, 0.02266704849898815, 0.3187161982059479, 0.34933197498321533, 0.37963563203811646, 0.21286973357200623, -0.09152249246835709, 0.28208228945732117, 0.2902055084705353, -0.06202613189816475, 0.052461862564086914, -0.3751503527164459, 0.20037972927093506, 0.0710655003786087, 0.19506196677684784, -0.11398103088140488, -0.23688288033008575, 0.25141093134880066, 0.13605988025665283, 0.09445452690124512, -0.12162724882364273, 0.22448955476284027, 0.0017586199101060629, 0.3925086259841919, 0.04765843600034714, -0.04161101207137108, 0.2306886911392212, 0.3817819654941559, 0.23128125071525574, 0.07951104640960693, 0.39274007081985474, -0.12577669322490692, -0.2583570182323456, 0.10781527310609818, 0.3400515615940094, 0.5201392769813538, 0.16599741578102112, 0.19271190464496613, -0.08257905393838882, 0.03340717777609825, -0.024867044761776924, 0.14059367775917053, -0.2922540009021759, -0.16624417901039124, 0.09999122470617294, 0.17856751382350922, -0.17033371329307556, -0.11510101705789566, 0.20650842785835266, -0.007210658397525549, 0.03747045248746872, -0.12302904576063156, 0.2915499210357666, -0.00518793286755681, 0.06696038693189621, -0.30042195320129395, 0.20180493593215942, -0.4009771943092346, -0.006393217947334051, 0.13575750589370728, 0.5235958695411682, 0.09591270983219147, 0.023175306618213654, -0.19688686728477478, 0.7337742447853088, -0.07811595499515533, -0.2568981945514679, 0.08064890652894974, -0.012009045109152794, -0.18147854506969452, -0.14870019257068634, 0.30939626693725586, -0.5017922520637512, 0.09717757254838943, 0.17247366905212402, -0.08517316728830338, -0.29793745279312134, 0.10572052747011185, -0.07112836092710495, 0.17247368395328522, 0.026216790080070496, -0.3023275136947632, 0.3171686828136444, 0.008635656908154488, -0.09089305251836777, -0.08609195798635483, -0.10901986062526703, -0.08055029809474945, -0.11614398658275604, 0.05000866949558258, 0.4038138687610626, 0.1403171271085739, 0.038804225623607635, -0.26064831018447876, -0.23034800589084625, 0.2758384048938751, -0.15369416773319244, -0.043294575065374374, 0.08113963156938553, 0.011299066245555878, -0.13151511549949646, -0.12341927736997604, -0.28817540407180786, -0.25257617235183716, -0.7670422792434692, 0.317576140165329, 0.06598126888275146, -0.07368731498718262, 0.14828820526599884, 0.22149933874607086, 0.35197293758392334, 0.1975894719362259, -0.5262953639030457, -0.10804370045661926, -0.19273068010807037, 0.27785471081733704, -0.20426757633686066, -0.24375173449516296, 0.3360223174095154, -0.12538671493530273, 0.19100737571716309, 0.04391113296151161, -0.19727276265621185, 0.2947358191013336, 0.260820209980011, 0.3492497503757477, -0.07572507858276367, -0.059926241636276245, 0.08637706190347672, 0.9180577993392944, 0.03664718195796013, 0.11798795312643051, 0.23432688415050507, 0.28716737031936646, 0.44863587617874146, -0.18619714677333832, -0.24647916853427887, 0.05115262791514397, -0.13457246124744415, -0.27134519815444946, 0.10462551563978195, 0.30827438831329346, 0.14662621915340424, 0.16312946379184723, -0.06892184913158417, 0.21875262260437012, -0.2138773649930954, 0.3311523199081421, -0.14019359648227692, 0.3264656066894531, 0.028098130598664284, 0.08923853188753128, -0.338379442691803, -0.22780512273311615, 0.003013046458363533, 0.127801775932312, 0.3850557506084442, 0.26120704412460327, -0.2789204716682434, -0.24332495033740997, -0.48271745443344116, 0.19565588235855103, -0.038494035601615906, 0.040339916944503784, -0.3785455524921417, -0.22536306083202362, 0.12978990375995636, 0.020334208384156227, 0.9234856367111206, 0.04645590856671333, 0.18212570250034332, -0.2568489909172058, -0.09680713713169098, -0.07582981139421463, 0.0022397679276764393, 0.29074612259864807, -0.21749097108840942, -0.14679281413555145, 0.40989261865615845, 0.037876006215810776, -0.08720714598894119, -0.32016491889953613, 0.36399757862091064, -0.45757320523262024, 0.006599836517125368, -0.2253907471895218, -0.05376359820365906, -0.06250029802322388, 0.15161918103694916, 0.13378916680812836, 0.12305872142314911, 0.09344234317541122, 0.13200989365577698, -0.17027254402637482, -0.04276743531227112, -0.05559322237968445, 0.02009529434144497, 0.5271492004394531, 0.11927369236946106, 0.04087502509355545, 0.2363303005695343, 0.2522958219051361, 0.1998601108789444, 0.27406078577041626, 0.09328579157590866, -0.02580292336642742, -0.02144981548190117, 0.0511358268558979, 0.11866341531276703, 0.43272462487220764, -0.22887319326400757, 0.2974846363067627, 0.09995904564857483, 0.12648481130599976, -0.7642991542816162, 0.07686611264944077, 0.22692017257213593, 0.3894955813884735, -0.04713692143559456, -0.38556963205337524, 0.3176094591617584, 0.016766157001256943, -0.014085629023611546, 0.24370868504047394, 0.11867457628250122, -0.5224871635437012, 0.00297380518168211, 0.01669776625931263, 1.0220947265625, -0.005273659247905016, 0.5250899195671082, 0.01060579065233469, 0.08383230119943619, 0.4028093218803406, -0.5466373562812805, 0.35856714844703674, 0.05777193605899811, -0.2558862566947937, -0.035482265055179596, 0.08913226425647736, -0.008490461856126785, -0.07289180159568787, -0.1517246812582016, 0.38956812024116516, -0.094648577272892, 0.21418005228042603, -0.4183894097805023, -0.08630824089050293, -0.011762941256165504, -0.22539059817790985, -0.5132775902748108, 0.054548945277929306, -0.27421170473098755, 0.10352631658315659, -0.05083382874727249, 0.03190649300813675, 0.16359196603298187, -0.021002070978283882, -0.3381100296974182, -0.20945332944393158, -0.25285211205482483, -0.025897515937685966, -0.03639259934425354, -0.3285657465457916, -0.016561241820454597, 0.2719000279903412, 0.3318612575531006, 0.09051402658224106, -0.364114373922348, 0.11960228532552719, -0.1798488348722458, 0.0628119483590126, -0.21515139937400818, -0.09834664314985275, -0.16749997437000275, -0.0548018142580986, 0.01749928668141365, 0.07076894491910934, 0.033785659819841385, -0.4108779728412628, 0.01751105487346649, 0.03225727751851082, -0.1330735981464386, -0.09009666740894318, -0.20876915752887726, 0.14244331419467926, 0.031938377767801285, -0.06901674717664719, 0.04544617235660553, 0.21769234538078308, -0.34029921889305115, 0.12043943256139755, -0.21364641189575195, -0.24093174934387207, -0.038049034774303436, 0.4774671494960785, 0.028959792107343674, -0.2921251058578491, 0.522063136100769, -0.011416008695960045, 0.05394536256790161, -0.18834972381591797, 0.14020152390003204, 0.17015105485916138, -0.1835630089044571, -0.0535128228366375, 0.028114350512623787, -0.28557512164115906, -0.205734983086586, -0.2029026597738266, 0.4924888610839844, -0.2519828677177429, -0.30505144596099854, -0.14498864114284515, -0.40764492750167847, -0.020889710634946823, -0.276292085647583, -0.02577695995569229, -0.09619072079658508, -0.2987641394138336, -0.019885314628481865, 0.19164162874221802, -0.14317092299461365, 0.014227696694433689, -0.00012187705578980967, -0.1673363745212555, 0.10388155281543732, 0.027455469593405724, 0.48546329140663147, -0.06346956640481949, -0.19099311530590057, -0.15952414274215698, -0.0006298439111560583, -0.03928935527801514, -0.06181412190198898, 0.15406861901283264, -0.1610926240682602, -0.012418549507856369, -0.018557224422693253, -0.2299518883228302, 0.044407714158296585, -0.32965439558029175, 0.157379150390625, 0.21430185437202454, 0.20892374217510223, -0.02163107506930828, -0.32651376724243164, 0.00021086396009195596, 0.0032443262171000242, 0.1196155846118927, 0.28255993127822876, -0.10582210123538971, 0.08209237456321716, 0.18946340680122375, -0.019517185166478157, -0.07181329280138016, -0.10820326209068298, 0.24002917110919952, 0.030345723032951355, -0.10756029188632965, 0.002384764142334461, -0.03746568411588669, -0.01439295057207346, 0.3485850989818573, 0.13812576234340668, 0.19012367725372314, -0.03175143152475357, -0.010205564089119434, 0.32908952236175537, 0.032443419098854065, -0.0629224181175232, -0.3029327690601349, 0.1396772712469101, -0.10798898339271545, -0.09744785726070404, 0.35205957293510437, 0.027017101645469666, -0.2138877660036087, 0.08610299229621887, 0.14734303951263428, 0.49556657671928406, -0.29766830801963806, 0.36282476782798767, 0.1930975764989853, 0.21265874803066254, 0.10369587689638138, 0.2905106246471405, 0.32934632897377014, 0.23671141266822815, 0.5512292385101318, -0.03360684588551521, 0.1553390920162201, 0.28774139285087585, 0.009771873243153095, -0.20694230496883392, -0.39939939975738525, -0.4862816035747528, 0.2589121162891388, -0.21330924332141876, 0.22736020386219025, -0.13360942900180817, 0.14679424464702606, -0.04144864156842232, -0.6776145696640015, -0.3064129948616028, -0.0712348222732544, -0.24339677393436432, -0.34788843989372253, 0.2802797257900238, -0.05674439296126366, 0.28443241119384766, 0.28727415204048157, 0.07969222962856293, -0.23314888775348663, 0.48158273100852966, -0.05466719716787338, -0.018018342554569244, 0.17536014318466187, 0.0876789316534996, 0.28630298376083374, 0.11032919585704803, -0.15479923784732819, 0.2614772915840149, -0.017421962693333626, -0.1297917366027832, 0.027695629745721817, 0.19197078049182892, 0.24324257671833038, 0.10014471411705017, -0.042350322008132935, 0.2072947770357132, 0.08171594887971878, 0.17870555818080902, -0.34299442172050476, 0.1529141217470169, -0.1525605320930481, 0.07531100511550903, 0.03375251963734627, -0.03199021890759468, 0.11957428604364395, 0.2038128823041916, -0.11085879802703857, 0.2348308116197586, -0.4639115333557129, -0.049700357019901276, -0.24467647075653076, 0.07653048634529114, -0.2179710566997528, 0.2800675630569458, -0.2816496193408966, 0.19422617554664612, 0.5648444294929504, -0.044258326292037964, 0.34975430369377136, 0.19053369760513306, -0.011787846684455872, -0.01126956008374691, 0.762752115726471, 0.1087862178683281, -0.3031584918498993, -0.305041640996933, 0.030853770673274994, -0.488602876663208, 0.0807434543967247, -0.31528156995773315, 0.2396727353334427, -0.20807887613773346, 0.10565054416656494, 0.06698784232139587, -0.018933113664388657, -0.07729978859424591, -0.09755352884531021, 0.051274072378873825, 0.046531856060028076, -0.34507298469543457, -0.09465101361274719, 0.1758098155260086, 0.22806501388549805, 0.08666235953569412, -0.3995473086833954, 0.2115197330713272, 0.16425146162509918, -0.158664271235466, 0.41969743371009827, 0.18698246777057648, -0.49183744192123413, 0.2579593360424042, -0.1285671442747116, 0.1905248463153839, 0.11105071008205414, 0.2345270812511444, 0.031241770833730698, -0.48960280418395996, -0.034894153475761414, -0.23273228108882904, -0.0441683866083622, -0.12012290954589844, 0.2055237889289856, -0.5847110748291016, 0.038765572011470795, -0.3769586682319641, 0.20367872714996338, 0.3197949528694153, -0.1638128012418747, 0.09265583008527756, -0.012531595304608345, 0.1860569417476654, 0.09033306688070297, 0.41705548763275146, 0.4198196828365326, -0.06857176125049591, 0.0642155185341835, -0.3439033329486847, 0.13526403903961182, 0.2230733036994934, -0.34712105989456177, -0.36009952425956726, 0.25708135962486267, 0.3946217894554138, 0.5234398245811462, -0.3522135615348816, -0.3459506928920746, 0.11524461209774017, 0.03330781310796738, 0.08213809132575989, -0.1448383778333664, 0.2011442929506302, -0.2863762080669403, -0.25332850217819214, 0.14249755442142487, 0.3100414574146271, 0.3002068102359772, -0.16755464673042297, 0.27148938179016113, -0.32099539041519165 ]
https://github.com/huggingface/datasets/issues/2591
Cached dataset overflowing disk space
Hi @BirgerMoell, We are planning to add a new feature to datasets, which could be interesting in your case: Add the option to delete temporary files (decompressed files) from the cache directory (see: #2481, #2604). We will ping you once this feature is implemented, so that the size of your cache directory will be considerably reduced.
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb). The cache folder is 500gb (and now my disk space is full). Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files). This might not technically be a bug, but I was unsure and I felt that the bug was the closest one. Traceback (most recent call last): File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper out = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single writer.finalize() File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize self.pa_writer.close() File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device """ The above exception was the direct cause of the following exception:
56
Cached dataset overflowing disk space I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb). The cache folder is 500gb (and now my disk space is full). Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files). This might not technically be a bug, but I was unsure and I felt that the bug was the closest one. Traceback (most recent call last): File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper out = func(self, *args, **kwargs) File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single writer.finalize() File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize self.pa_writer.close() File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device """ The above exception was the direct cause of the following exception: Hi @BirgerMoell, We are planning to add a new feature to datasets, which could be interesting in your case: Add the option to delete temporary files (decompressed files) from the cache directory (see: #2481, #2604). We will ping you once this feature is implemented, so that the size of your cache directory will be considerably reduced.
[ 0.037559643387794495, -0.4222128093242645, 0.09859009832143784, 0.4514758288860321, 0.10117408633232117, 0.20505647361278534, 0.074485644698143, 0.14190475642681122, 0.14452829957008362, 0.055637177079916, 0.40107935667037964, -0.2280428111553192, -0.12429968267679214, 0.11271926760673523, 0.14668874442577362, 0.068689726293087, 0.2591468095779419, -0.24585939943790436, -0.06104855611920357, 0.10608994960784912, -0.1954932063817978, 0.2656945586204529, 0.023638321086764336, -0.12529028952121735, -0.2641811668872833, -0.1312524378299713, 0.1114906445145607, 0.09155451506376266, 0.1169937402009964, -0.22152085602283478, 0.645517110824585, -0.03754299134016037, 0.29698383808135986, 0.33420392870903015, -0.00012711147428490222, -0.2188410609960556, 0.09154057502746582, -0.18159309029579163, -0.0922589972615242, 0.5504895448684692, 0.19144125282764435, -0.3445686399936676, -0.05229555815458298, 0.012889232486486435, -0.19401609897613525, 0.13530057668685913, -0.09690777957439423, -0.4302127957344055, 0.244851753115654, 0.07248489558696747, 0.04802979901432991, -0.007762677036225796, -0.11816836148500443, 0.17080125212669373, -0.10923659056425095, -0.004405634477734566, -0.2483726441860199, 0.19986838102340698, 0.24984583258628845, -0.16989432275295258, -0.11372186988592148, 0.5557485222816467, -0.05901399999856949, -0.0844288244843483, 0.5253403186798096, 0.08338169753551483, -0.35629764199256897, -0.11066245287656784, 0.38137856125831604, -0.08013555407524109, 0.3144633173942566, -0.42118629813194275, -0.03597567602992058, -0.5416687726974487, 0.12429245561361313, -0.4084813594818115, 0.4917795658111572, 0.1439301073551178, -0.3081754446029663, 0.20550809800624847, -0.26439520716667175, -0.46216875314712524, -0.2639661431312561, -0.12115156650543213, -0.05101524293422699, -0.16926036775112152, -0.17793002724647522, 0.003886954626068473, 0.4981888234615326, -0.12435232102870941, -0.018054747954010963, -0.11482809484004974, -0.1485932320356369, 0.16648872196674347, -0.4704055190086365, -0.1601632833480835, -0.15975640714168549, 0.4838791489601135, 0.17781610786914825, 0.03436853364109993, 0.05801529437303543, -0.22197778522968292, 0.013549590483307838, -0.05450795218348503, 0.03849118575453758, 0.6338205337524414, -0.4302007555961609, 0.1479855328798294, 0.026061421260237694, -0.10047579556703568, -0.06649564206600189, -0.08406542986631393, -0.006118884310126305, -0.38886627554893494, 0.24311813712120056, -0.30944710969924927, 0.03660645708441734, -0.26600468158721924, -0.1329784393310547, 0.10960038006305695, 0.18775682151317596, 0.14078284800052643, 0.2514514625072479, 0.3864435851573944, 0.18210609257221222, 0.3051149249076843, -0.3228459060192108, 0.22181016206741333, -0.24434234201908112, -0.11928997933864594, -0.04407370090484619, -0.08466439694166183, 0.04949849098920822, 0.329577773809433, 0.32801562547683716, -0.115823894739151, -0.043829336762428284, -0.16687282919883728, 0.23681992292404175, -0.02642090618610382, 0.030998803675174713, -0.25859296321868896, 0.28684496879577637, 0.11232362687587738, -0.3598537743091583, 0.22516925632953644, 0.24257752299308777, 0.39896583557128906, -0.2411041408777237, 0.12478254735469818, -0.3550453186035156, -0.25183871388435364, 0.1480788141489029, -0.01426953636109829, -0.18318107724189758, -0.09696339815855026, -0.42974621057510376, 0.21908265352249146, 0.4013513922691345, -0.28940993547439575, 0.04606153070926666, 0.016729900613427162, -0.45551231503486633, -0.12716706097126007, 0.21834076941013336, 0.390550434589386, -0.1844455897808075, -0.0037566369865089655, 0.08714276552200317, 0.4355641007423401, 0.048523109406232834, 0.623354434967041, -0.14133749902248383, 0.022438500076532364, -0.32213011384010315, -0.21304801106452942, -0.03465414419770241, -0.569579005241394, -0.7795041799545288, 0.015955910086631775, 0.05073589086532593, 0.2829306125640869, 0.34642645716667175, 0.1854572743177414, 0.0370459146797657, -0.1173868328332901, -0.12995195388793945, 0.21605747938156128, -0.004505920689553022, -0.0558646097779274, -0.3231567442417145, -0.5304924249649048, 0.2853464186191559, -0.11477996408939362, 0.04664991796016693, 0.10060366988182068, -0.2822222411632538, 0.0011680395109578967, 0.1973252296447754, -0.031637854874134064, 0.25416818261146545, 0.38443800806999207, 0.2930663526058197, -0.3115615248680115, -0.06635884940624237, 0.004258411005139351, -0.45750588178634644, 0.19509495794773102, 0.17837408185005188, -0.37532052397727966, 0.1245836615562439, -0.10039203613996506, 0.01440685335546732, -0.22644619643688202, -0.133951798081398, -0.21682646870613098, -0.13746318221092224, -0.03394440561532974, 0.4003782570362091, -0.17632868885993958, -0.29911065101623535, 0.34005624055862427, 0.0025756193790584803, -0.04063224047422409, -0.32598623633384705, -0.015432842075824738, 0.14475639164447784, -0.017068248242139816, -0.259840190410614, 0.18882541358470917, 0.06481882929801941, -0.035528119653463364, 0.03686456382274628, 0.2335701882839203, 0.02266704849898815, 0.3187161982059479, 0.34933197498321533, 0.37963563203811646, 0.21286973357200623, -0.09152249246835709, 0.28208228945732117, 0.2902055084705353, -0.06202613189816475, 0.052461862564086914, -0.3751503527164459, 0.20037972927093506, 0.0710655003786087, 0.19506196677684784, -0.11398103088140488, -0.23688288033008575, 0.25141093134880066, 0.13605988025665283, 0.09445452690124512, -0.12162724882364273, 0.22448955476284027, 0.0017586199101060629, 0.3925086259841919, 0.04765843600034714, -0.04161101207137108, 0.2306886911392212, 0.3817819654941559, 0.23128125071525574, 0.07951104640960693, 0.39274007081985474, -0.12577669322490692, -0.2583570182323456, 0.10781527310609818, 0.3400515615940094, 0.5201392769813538, 0.16599741578102112, 0.19271190464496613, -0.08257905393838882, 0.03340717777609825, -0.024867044761776924, 0.14059367775917053, -0.2922540009021759, -0.16624417901039124, 0.09999122470617294, 0.17856751382350922, -0.17033371329307556, -0.11510101705789566, 0.20650842785835266, -0.007210658397525549, 0.03747045248746872, -0.12302904576063156, 0.2915499210357666, -0.00518793286755681, 0.06696038693189621, -0.30042195320129395, 0.20180493593215942, -0.4009771943092346, -0.006393217947334051, 0.13575750589370728, 0.5235958695411682, 0.09591270983219147, 0.023175306618213654, -0.19688686728477478, 0.7337742447853088, -0.07811595499515533, -0.2568981945514679, 0.08064890652894974, -0.012009045109152794, -0.18147854506969452, -0.14870019257068634, 0.30939626693725586, -0.5017922520637512, 0.09717757254838943, 0.17247366905212402, -0.08517316728830338, -0.29793745279312134, 0.10572052747011185, -0.07112836092710495, 0.17247368395328522, 0.026216790080070496, -0.3023275136947632, 0.3171686828136444, 0.008635656908154488, -0.09089305251836777, -0.08609195798635483, -0.10901986062526703, -0.08055029809474945, -0.11614398658275604, 0.05000866949558258, 0.4038138687610626, 0.1403171271085739, 0.038804225623607635, -0.26064831018447876, -0.23034800589084625, 0.2758384048938751, -0.15369416773319244, -0.043294575065374374, 0.08113963156938553, 0.011299066245555878, -0.13151511549949646, -0.12341927736997604, -0.28817540407180786, -0.25257617235183716, -0.7670422792434692, 0.317576140165329, 0.06598126888275146, -0.07368731498718262, 0.14828820526599884, 0.22149933874607086, 0.35197293758392334, 0.1975894719362259, -0.5262953639030457, -0.10804370045661926, -0.19273068010807037, 0.27785471081733704, -0.20426757633686066, -0.24375173449516296, 0.3360223174095154, -0.12538671493530273, 0.19100737571716309, 0.04391113296151161, -0.19727276265621185, 0.2947358191013336, 0.260820209980011, 0.3492497503757477, -0.07572507858276367, -0.059926241636276245, 0.08637706190347672, 0.9180577993392944, 0.03664718195796013, 0.11798795312643051, 0.23432688415050507, 0.28716737031936646, 0.44863587617874146, -0.18619714677333832, -0.24647916853427887, 0.05115262791514397, -0.13457246124744415, -0.27134519815444946, 0.10462551563978195, 0.30827438831329346, 0.14662621915340424, 0.16312946379184723, -0.06892184913158417, 0.21875262260437012, -0.2138773649930954, 0.3311523199081421, -0.14019359648227692, 0.3264656066894531, 0.028098130598664284, 0.08923853188753128, -0.338379442691803, -0.22780512273311615, 0.003013046458363533, 0.127801775932312, 0.3850557506084442, 0.26120704412460327, -0.2789204716682434, -0.24332495033740997, -0.48271745443344116, 0.19565588235855103, -0.038494035601615906, 0.040339916944503784, -0.3785455524921417, -0.22536306083202362, 0.12978990375995636, 0.020334208384156227, 0.9234856367111206, 0.04645590856671333, 0.18212570250034332, -0.2568489909172058, -0.09680713713169098, -0.07582981139421463, 0.0022397679276764393, 0.29074612259864807, -0.21749097108840942, -0.14679281413555145, 0.40989261865615845, 0.037876006215810776, -0.08720714598894119, -0.32016491889953613, 0.36399757862091064, -0.45757320523262024, 0.006599836517125368, -0.2253907471895218, -0.05376359820365906, -0.06250029802322388, 0.15161918103694916, 0.13378916680812836, 0.12305872142314911, 0.09344234317541122, 0.13200989365577698, -0.17027254402637482, -0.04276743531227112, -0.05559322237968445, 0.02009529434144497, 0.5271492004394531, 0.11927369236946106, 0.04087502509355545, 0.2363303005695343, 0.2522958219051361, 0.1998601108789444, 0.27406078577041626, 0.09328579157590866, -0.02580292336642742, -0.02144981548190117, 0.0511358268558979, 0.11866341531276703, 0.43272462487220764, -0.22887319326400757, 0.2974846363067627, 0.09995904564857483, 0.12648481130599976, -0.7642991542816162, 0.07686611264944077, 0.22692017257213593, 0.3894955813884735, -0.04713692143559456, -0.38556963205337524, 0.3176094591617584, 0.016766157001256943, -0.014085629023611546, 0.24370868504047394, 0.11867457628250122, -0.5224871635437012, 0.00297380518168211, 0.01669776625931263, 1.0220947265625, -0.005273659247905016, 0.5250899195671082, 0.01060579065233469, 0.08383230119943619, 0.4028093218803406, -0.5466373562812805, 0.35856714844703674, 0.05777193605899811, -0.2558862566947937, -0.035482265055179596, 0.08913226425647736, -0.008490461856126785, -0.07289180159568787, -0.1517246812582016, 0.38956812024116516, -0.094648577272892, 0.21418005228042603, -0.4183894097805023, -0.08630824089050293, -0.011762941256165504, -0.22539059817790985, -0.5132775902748108, 0.054548945277929306, -0.27421170473098755, 0.10352631658315659, -0.05083382874727249, 0.03190649300813675, 0.16359196603298187, -0.021002070978283882, -0.3381100296974182, -0.20945332944393158, -0.25285211205482483, -0.025897515937685966, -0.03639259934425354, -0.3285657465457916, -0.016561241820454597, 0.2719000279903412, 0.3318612575531006, 0.09051402658224106, -0.364114373922348, 0.11960228532552719, -0.1798488348722458, 0.0628119483590126, -0.21515139937400818, -0.09834664314985275, -0.16749997437000275, -0.0548018142580986, 0.01749928668141365, 0.07076894491910934, 0.033785659819841385, -0.4108779728412628, 0.01751105487346649, 0.03225727751851082, -0.1330735981464386, -0.09009666740894318, -0.20876915752887726, 0.14244331419467926, 0.031938377767801285, -0.06901674717664719, 0.04544617235660553, 0.21769234538078308, -0.34029921889305115, 0.12043943256139755, -0.21364641189575195, -0.24093174934387207, -0.038049034774303436, 0.4774671494960785, 0.028959792107343674, -0.2921251058578491, 0.522063136100769, -0.011416008695960045, 0.05394536256790161, -0.18834972381591797, 0.14020152390003204, 0.17015105485916138, -0.1835630089044571, -0.0535128228366375, 0.028114350512623787, -0.28557512164115906, -0.205734983086586, -0.2029026597738266, 0.4924888610839844, -0.2519828677177429, -0.30505144596099854, -0.14498864114284515, -0.40764492750167847, -0.020889710634946823, -0.276292085647583, -0.02577695995569229, -0.09619072079658508, -0.2987641394138336, -0.019885314628481865, 0.19164162874221802, -0.14317092299461365, 0.014227696694433689, -0.00012187705578980967, -0.1673363745212555, 0.10388155281543732, 0.027455469593405724, 0.48546329140663147, -0.06346956640481949, -0.19099311530590057, -0.15952414274215698, -0.0006298439111560583, -0.03928935527801514, -0.06181412190198898, 0.15406861901283264, -0.1610926240682602, -0.012418549507856369, -0.018557224422693253, -0.2299518883228302, 0.044407714158296585, -0.32965439558029175, 0.157379150390625, 0.21430185437202454, 0.20892374217510223, -0.02163107506930828, -0.32651376724243164, 0.00021086396009195596, 0.0032443262171000242, 0.1196155846118927, 0.28255993127822876, -0.10582210123538971, 0.08209237456321716, 0.18946340680122375, -0.019517185166478157, -0.07181329280138016, -0.10820326209068298, 0.24002917110919952, 0.030345723032951355, -0.10756029188632965, 0.002384764142334461, -0.03746568411588669, -0.01439295057207346, 0.3485850989818573, 0.13812576234340668, 0.19012367725372314, -0.03175143152475357, -0.010205564089119434, 0.32908952236175537, 0.032443419098854065, -0.0629224181175232, -0.3029327690601349, 0.1396772712469101, -0.10798898339271545, -0.09744785726070404, 0.35205957293510437, 0.027017101645469666, -0.2138877660036087, 0.08610299229621887, 0.14734303951263428, 0.49556657671928406, -0.29766830801963806, 0.36282476782798767, 0.1930975764989853, 0.21265874803066254, 0.10369587689638138, 0.2905106246471405, 0.32934632897377014, 0.23671141266822815, 0.5512292385101318, -0.03360684588551521, 0.1553390920162201, 0.28774139285087585, 0.009771873243153095, -0.20694230496883392, -0.39939939975738525, -0.4862816035747528, 0.2589121162891388, -0.21330924332141876, 0.22736020386219025, -0.13360942900180817, 0.14679424464702606, -0.04144864156842232, -0.6776145696640015, -0.3064129948616028, -0.0712348222732544, -0.24339677393436432, -0.34788843989372253, 0.2802797257900238, -0.05674439296126366, 0.28443241119384766, 0.28727415204048157, 0.07969222962856293, -0.23314888775348663, 0.48158273100852966, -0.05466719716787338, -0.018018342554569244, 0.17536014318466187, 0.0876789316534996, 0.28630298376083374, 0.11032919585704803, -0.15479923784732819, 0.2614772915840149, -0.017421962693333626, -0.1297917366027832, 0.027695629745721817, 0.19197078049182892, 0.24324257671833038, 0.10014471411705017, -0.042350322008132935, 0.2072947770357132, 0.08171594887971878, 0.17870555818080902, -0.34299442172050476, 0.1529141217470169, -0.1525605320930481, 0.07531100511550903, 0.03375251963734627, -0.03199021890759468, 0.11957428604364395, 0.2038128823041916, -0.11085879802703857, 0.2348308116197586, -0.4639115333557129, -0.049700357019901276, -0.24467647075653076, 0.07653048634529114, -0.2179710566997528, 0.2800675630569458, -0.2816496193408966, 0.19422617554664612, 0.5648444294929504, -0.044258326292037964, 0.34975430369377136, 0.19053369760513306, -0.011787846684455872, -0.01126956008374691, 0.762752115726471, 0.1087862178683281, -0.3031584918498993, -0.305041640996933, 0.030853770673274994, -0.488602876663208, 0.0807434543967247, -0.31528156995773315, 0.2396727353334427, -0.20807887613773346, 0.10565054416656494, 0.06698784232139587, -0.018933113664388657, -0.07729978859424591, -0.09755352884531021, 0.051274072378873825, 0.046531856060028076, -0.34507298469543457, -0.09465101361274719, 0.1758098155260086, 0.22806501388549805, 0.08666235953569412, -0.3995473086833954, 0.2115197330713272, 0.16425146162509918, -0.158664271235466, 0.41969743371009827, 0.18698246777057648, -0.49183744192123413, 0.2579593360424042, -0.1285671442747116, 0.1905248463153839, 0.11105071008205414, 0.2345270812511444, 0.031241770833730698, -0.48960280418395996, -0.034894153475761414, -0.23273228108882904, -0.0441683866083622, -0.12012290954589844, 0.2055237889289856, -0.5847110748291016, 0.038765572011470795, -0.3769586682319641, 0.20367872714996338, 0.3197949528694153, -0.1638128012418747, 0.09265583008527756, -0.012531595304608345, 0.1860569417476654, 0.09033306688070297, 0.41705548763275146, 0.4198196828365326, -0.06857176125049591, 0.0642155185341835, -0.3439033329486847, 0.13526403903961182, 0.2230733036994934, -0.34712105989456177, -0.36009952425956726, 0.25708135962486267, 0.3946217894554138, 0.5234398245811462, -0.3522135615348816, -0.3459506928920746, 0.11524461209774017, 0.03330781310796738, 0.08213809132575989, -0.1448383778333664, 0.2011442929506302, -0.2863762080669403, -0.25332850217819214, 0.14249755442142487, 0.3100414574146271, 0.3002068102359772, -0.16755464673042297, 0.27148938179016113, -0.32099539041519165 ]
https://github.com/huggingface/datasets/issues/2585
sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index
Hi @mmajurski, thanks for reporting this issue. Indeed this misalignment arises because the source dataset context field contains leading blank spaces (and these are counted within the answer_start), while our datasets loading script removes these leading blank spaces. I'm going to fix our script so that all leading blank spaces in the source dataset are kept, and there is no misalignment between the answer text and the answer_start within the context.
## Describe the bug The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start']. For example: id = '56d1f453e7d4791d009025bd' answers = {'text': ['Pure Land'], 'answer_start': [146]} However the actual text in context at location 146 is 'ure Land,' Which is an off-by-one error from the correct answer. ## Steps to reproduce the bug ```python import datasets def check_context_answer_alignment(example): for a_idx in range(len(example['answers']['text'])): # check raw dataset for answer consistency between context and answer answer_text = example['answers']['text'][a_idx] a_st_idx = example['answers']['answer_start'][a_idx] a_end_idx = a_st_idx + len(example['answers']['text'][a_idx]) answer_text_from_context = example['context'][a_st_idx:a_end_idx] if answer_text != answer_text_from_context: #print(example['id']) return False return True dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True) start_len = len(dataset) dataset = dataset.filter(check_context_answer_alignment, num_proc=1, keep_in_memory=True) end_len = len(dataset) print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len)) ``` ## Expected results This code should result in 0 rows being filtered out from the dataset. ## Actual results This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location. This code will reproduce the problem and produce the following count: "258 instances contain mis-alignment between the answer text and answer index." ## Environment info Steps to rebuilt the Conda environment: ``` # create a virtual environment to stuff all these packages into conda create -n round8 python=3.8 -y # activate the virtual environment conda activate round8 # install pytorch (best done through conda to handle cuda dependencies) conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia pip install jsonpickle transformers datasets matplotlib ``` OS: Ubuntu 20.04 Python 3.8 Result of `conda env export`: ``` name: round8 channels: - pytorch-lts - nvidia - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=4.5=1_gnu - blas=1.0=mkl - brotlipy=0.7.0=py38h27cfd23_1003 - bzip2=1.0.8=h7b6447c_0 - ca-certificates=2021.5.25=h06a4308_1 - certifi=2021.5.30=py38h06a4308_0 - cffi=1.14.5=py38h261ae71_0 - chardet=4.0.0=py38h06a4308_1003 - cryptography=3.4.7=py38hd23ed53_0 - cudatoolkit=11.1.74=h6bb024c_0 - ffmpeg=4.2.2=h20bf706_0 - freetype=2.10.4=h5ab3b9f_0 - gmp=6.2.1=h2531618_2 - gnutls=3.6.15=he1e5248_0 - idna=2.10=pyhd3eb1b0_0 - intel-openmp=2021.2.0=h06a4308_610 - jpeg=9b=h024ee3a_2 - lame=3.100=h7b6447c_0 - lcms2=2.12=h3be6417_0 - ld_impl_linux-64=2.35.1=h7274673_9 - libffi=3.3=he6710b0_2 - libgcc-ng=9.3.0=h5101ec6_17 - libgomp=9.3.0=h5101ec6_17 - libidn2=2.3.1=h27cfd23_0 - libopus=1.3.1=h7b6447c_0 - libpng=1.6.37=hbc83047_0 - libstdcxx-ng=9.3.0=hd4cf53a_17 - libtasn1=4.16.0=h27cfd23_0 - libtiff=4.2.0=h85742a9_0 - libunistring=0.9.10=h27cfd23_0 - libuv=1.40.0=h7b6447c_0 - libvpx=1.7.0=h439df22_0 - libwebp-base=1.2.0=h27cfd23_0 - lz4-c=1.9.3=h2531618_0 - mkl=2021.2.0=h06a4308_296 - mkl-service=2.3.0=py38h27cfd23_1 - mkl_fft=1.3.0=py38h42c9631_2 - mkl_random=1.2.1=py38ha9443f7_2 - ncurses=6.2=he6710b0_1 - nettle=3.7.3=hbbd107a_1 - ninja=1.10.2=hff7bd54_1 - numpy=1.20.2=py38h2d18471_0 - numpy-base=1.20.2=py38hfae3a4d_0 - olefile=0.46=py_0 - openh264=2.1.0=hd408876_0 - openssl=1.1.1k=h27cfd23_0 - pillow=8.2.0=py38he98fc37_0 - pip=21.1.2=py38h06a4308_0 - pycparser=2.20=py_2 - pyopenssl=20.0.1=pyhd3eb1b0_1 - pysocks=1.7.1=py38h06a4308_0 - python=3.8.10=h12debd9_8 - pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0 - readline=8.1=h27cfd23_0 - requests=2.25.1=pyhd3eb1b0_0 - setuptools=52.0.0=py38h06a4308_0 - six=1.16.0=pyhd3eb1b0_0 - sqlite=3.35.4=hdfb4753_0 - tk=8.6.10=hbc83047_0 - torchtext=0.9.1=py38 - torchvision=0.9.1=py38_cu111 - typing_extensions=3.7.4.3=pyha847dfd_0 - urllib3=1.26.4=pyhd3eb1b0_0 - wheel=0.36.2=pyhd3eb1b0_0 - x264=1!157.20191217=h7b6447c_0 - xz=5.2.5=h7b6447c_0 - zlib=1.2.11=h7b6447c_3 - zstd=1.4.9=haebb681_0 - pip: - click==8.0.1 - cycler==0.10.0 - datasets==1.8.0 - dill==0.3.4 - filelock==3.0.12 - fsspec==2021.6.0 - huggingface-hub==0.0.8 - joblib==1.0.1 - jsonpickle==2.0.0 - kiwisolver==1.3.1 - matplotlib==3.4.2 - multiprocess==0.70.12.2 - packaging==20.9 - pandas==1.2.4 - pyarrow==3.0.0 - pyparsing==2.4.7 - python-dateutil==2.8.1 - pytz==2021.1 - regex==2021.4.4 - sacremoses==0.0.45 - tokenizers==0.10.3 - tqdm==4.49.0 - transformers==4.6.1 - xxhash==2.0.2 prefix: /home/mmajurski/anaconda3/envs/round8 ```
71
sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index ## Describe the bug The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start']. For example: id = '56d1f453e7d4791d009025bd' answers = {'text': ['Pure Land'], 'answer_start': [146]} However the actual text in context at location 146 is 'ure Land,' Which is an off-by-one error from the correct answer. ## Steps to reproduce the bug ```python import datasets def check_context_answer_alignment(example): for a_idx in range(len(example['answers']['text'])): # check raw dataset for answer consistency between context and answer answer_text = example['answers']['text'][a_idx] a_st_idx = example['answers']['answer_start'][a_idx] a_end_idx = a_st_idx + len(example['answers']['text'][a_idx]) answer_text_from_context = example['context'][a_st_idx:a_end_idx] if answer_text != answer_text_from_context: #print(example['id']) return False return True dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True) start_len = len(dataset) dataset = dataset.filter(check_context_answer_alignment, num_proc=1, keep_in_memory=True) end_len = len(dataset) print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len)) ``` ## Expected results This code should result in 0 rows being filtered out from the dataset. ## Actual results This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location. This code will reproduce the problem and produce the following count: "258 instances contain mis-alignment between the answer text and answer index." ## Environment info Steps to rebuilt the Conda environment: ``` # create a virtual environment to stuff all these packages into conda create -n round8 python=3.8 -y # activate the virtual environment conda activate round8 # install pytorch (best done through conda to handle cuda dependencies) conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia pip install jsonpickle transformers datasets matplotlib ``` OS: Ubuntu 20.04 Python 3.8 Result of `conda env export`: ``` name: round8 channels: - pytorch-lts - nvidia - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=4.5=1_gnu - blas=1.0=mkl - brotlipy=0.7.0=py38h27cfd23_1003 - bzip2=1.0.8=h7b6447c_0 - ca-certificates=2021.5.25=h06a4308_1 - certifi=2021.5.30=py38h06a4308_0 - cffi=1.14.5=py38h261ae71_0 - chardet=4.0.0=py38h06a4308_1003 - cryptography=3.4.7=py38hd23ed53_0 - cudatoolkit=11.1.74=h6bb024c_0 - ffmpeg=4.2.2=h20bf706_0 - freetype=2.10.4=h5ab3b9f_0 - gmp=6.2.1=h2531618_2 - gnutls=3.6.15=he1e5248_0 - idna=2.10=pyhd3eb1b0_0 - intel-openmp=2021.2.0=h06a4308_610 - jpeg=9b=h024ee3a_2 - lame=3.100=h7b6447c_0 - lcms2=2.12=h3be6417_0 - ld_impl_linux-64=2.35.1=h7274673_9 - libffi=3.3=he6710b0_2 - libgcc-ng=9.3.0=h5101ec6_17 - libgomp=9.3.0=h5101ec6_17 - libidn2=2.3.1=h27cfd23_0 - libopus=1.3.1=h7b6447c_0 - libpng=1.6.37=hbc83047_0 - libstdcxx-ng=9.3.0=hd4cf53a_17 - libtasn1=4.16.0=h27cfd23_0 - libtiff=4.2.0=h85742a9_0 - libunistring=0.9.10=h27cfd23_0 - libuv=1.40.0=h7b6447c_0 - libvpx=1.7.0=h439df22_0 - libwebp-base=1.2.0=h27cfd23_0 - lz4-c=1.9.3=h2531618_0 - mkl=2021.2.0=h06a4308_296 - mkl-service=2.3.0=py38h27cfd23_1 - mkl_fft=1.3.0=py38h42c9631_2 - mkl_random=1.2.1=py38ha9443f7_2 - ncurses=6.2=he6710b0_1 - nettle=3.7.3=hbbd107a_1 - ninja=1.10.2=hff7bd54_1 - numpy=1.20.2=py38h2d18471_0 - numpy-base=1.20.2=py38hfae3a4d_0 - olefile=0.46=py_0 - openh264=2.1.0=hd408876_0 - openssl=1.1.1k=h27cfd23_0 - pillow=8.2.0=py38he98fc37_0 - pip=21.1.2=py38h06a4308_0 - pycparser=2.20=py_2 - pyopenssl=20.0.1=pyhd3eb1b0_1 - pysocks=1.7.1=py38h06a4308_0 - python=3.8.10=h12debd9_8 - pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0 - readline=8.1=h27cfd23_0 - requests=2.25.1=pyhd3eb1b0_0 - setuptools=52.0.0=py38h06a4308_0 - six=1.16.0=pyhd3eb1b0_0 - sqlite=3.35.4=hdfb4753_0 - tk=8.6.10=hbc83047_0 - torchtext=0.9.1=py38 - torchvision=0.9.1=py38_cu111 - typing_extensions=3.7.4.3=pyha847dfd_0 - urllib3=1.26.4=pyhd3eb1b0_0 - wheel=0.36.2=pyhd3eb1b0_0 - x264=1!157.20191217=h7b6447c_0 - xz=5.2.5=h7b6447c_0 - zlib=1.2.11=h7b6447c_3 - zstd=1.4.9=haebb681_0 - pip: - click==8.0.1 - cycler==0.10.0 - datasets==1.8.0 - dill==0.3.4 - filelock==3.0.12 - fsspec==2021.6.0 - huggingface-hub==0.0.8 - joblib==1.0.1 - jsonpickle==2.0.0 - kiwisolver==1.3.1 - matplotlib==3.4.2 - multiprocess==0.70.12.2 - packaging==20.9 - pandas==1.2.4 - pyarrow==3.0.0 - pyparsing==2.4.7 - python-dateutil==2.8.1 - pytz==2021.1 - regex==2021.4.4 - sacremoses==0.0.45 - tokenizers==0.10.3 - tqdm==4.49.0 - transformers==4.6.1 - xxhash==2.0.2 prefix: /home/mmajurski/anaconda3/envs/round8 ``` Hi @mmajurski, thanks for reporting this issue. Indeed this misalignment arises because the source dataset context field contains leading blank spaces (and these are counted within the answer_start), while our datasets loading script removes these leading blank spaces. I'm going to fix our script so that all leading blank spaces in the source dataset are kept, and there is no misalignment between the answer text and the answer_start within the context.
[ -0.23303000628948212, -0.32953783869743347, -0.044109899550676346, 0.37493598461151123, 0.08782324194908142, -0.07634200155735016, 0.10575704276561737, 0.2279035747051239, -0.2927468419075012, 0.15778344869613647, -0.08416294306516647, 0.04506871476769447, 0.3250357210636139, 0.06854541599750519, -0.09260829538106918, 0.15236373245716095, 0.175633043050766, 0.010424783453345299, 0.009945611469447613, -0.17250365018844604, -0.22489848732948303, 0.2991381585597992, -0.29803261160850525, 0.03003019466996193, -0.3425646722316742, -0.010249072685837746, 0.03642430901527405, 0.11318311095237732, -0.1175084039568901, -0.4159387946128845, 0.21250206232070923, -0.09367889910936356, 0.0077110654674470425, 0.26386383175849915, -0.00011653102410491556, -0.17062537372112274, 0.07283831387758255, -0.0973288044333458, -0.2682836651802063, 0.004192151594907045, -0.04355863854289055, -0.12169106304645538, -0.1298898309469223, -0.10584231466054916, -0.2390318065881729, 0.2717563211917877, -0.06732302159070969, -0.28662484884262085, 0.6096699237823486, 0.24432244896888733, 0.1451374888420105, 0.2883637547492981, 0.010926204733550549, -0.0647382065653801, 0.17868654429912567, -0.1235734075307846, 0.07569434493780136, 0.11912643909454346, 0.145632803440094, 0.1079360768198967, -0.034699615091085434, 0.4713861346244812, -0.13435223698616028, -0.031890809535980225, -0.006144317332655191, 0.29044991731643677, 0.20661769807338715, -0.12783199548721313, 0.09985708445310593, 0.13117516040802002, 0.2598809003829956, -0.24844659864902496, -0.4248088002204895, -0.45694777369499207, -0.03582756593823433, -0.12240562587976456, 0.3317502737045288, 0.03945334255695343, -0.031152281910181046, 0.364789217710495, -0.13653261959552765, 0.07102788239717484, -0.08574998378753662, 0.1271403729915619, -0.08769320696592331, 0.2383425235748291, -0.12194901704788208, 0.14922155439853668, -0.26770448684692383, -0.13863477110862732, -0.06311677396297455, -0.1375986784696579, -0.10523352771997452, 0.41718530654907227, -0.5139369368553162, -0.10134794563055038, -0.16793787479400635, 0.09079288691282272, 0.2361776977777481, 0.06949418783187866, -0.06991668790578842, 0.001525034778751433, 0.26592060923576355, 0.06135200336575508, 0.3417299687862396, 0.2773300111293793, -0.11805348098278046, 0.2556288242340088, 0.10205760598182678, 0.14744651317596436, 0.041464317589998245, 0.10346710681915283, 0.19961705803871155, -0.18415699899196625, -0.10824698209762573, -0.15475396811962128, 0.1684664636850357, -0.18874827027320862, -0.5222858190536499, 0.43384385108947754, -0.6319301128387451, 0.2756717801094055, -0.0214355681091547, 0.34829723834991455, -0.22168448567390442, 0.2669173777103424, 0.3325079679489136, 0.24428386986255646, -0.06500289589166641, -0.18516825139522552, -0.1330844759941101, -0.09698004275560379, -0.014407208189368248, -0.03445906564593315, 0.007218503393232822, -0.1293736845254898, 0.22713057696819305, 0.2961052358150482, 0.21281960606575012, -0.22059224545955658, -0.3132045567035675, -0.16487348079681396, 0.14105865359306335, 0.030685413628816605, 0.027105338871479034, 0.1876549869775772, 0.1873006373643875, -0.2884293794631958, 0.07319557666778564, 0.09300610423088074, -0.23830552399158478, 0.07687349617481232, -0.09920445084571838, 0.22452029585838318, -0.16600359976291656, -0.05642641335725784, 0.04659959673881531, 0.2456643283367157, 0.29665839672088623, -0.2863127589225769, 0.2683805525302887, -0.2038262039422989, -0.33000779151916504, -0.0881248340010643, 0.3650222420692444, 0.29203781485557556, -0.19854624569416046, -0.06592587381601334, -0.05614028126001358, 0.15631771087646484, 0.026586992666125298, 0.23752635717391968, 0.27301210165023804, 0.2942620515823364, -0.42124485969543457, 0.26740556955337524, 0.10373373329639435, -0.8540112376213074, -0.5590248107910156, -0.17422007024288177, -0.1163511648774147, 0.22511041164398193, -0.10361585021018982, 0.07285972684621811, 0.4342783987522125, 0.15434327721595764, 0.27352839708328247, 0.5391798615455627, 0.06792427599430084, 0.1189374029636383, -0.37401795387268066, 0.04329166188836098, -0.09266810864210129, 0.12352566421031952, -0.24775755405426025, -0.17437708377838135, 0.05309804528951645, -0.18347428739070892, 0.18451713025569916, 0.10490529984235764, 0.07000785320997238, 0.24240805208683014, 0.32924482226371765, 0.12075698375701904, 0.17954546213150024, -0.5024951696395874, -0.48402902483940125, 0.09337487816810608, -0.0992034524679184, 0.05972154438495636, -0.062495920807123184, -0.13606706261634827, -0.39753293991088867, -0.03617607802152634, -0.35202834010124207, -0.30077171325683594, 0.09093020856380463, 0.008328832685947418, 0.1742563098669052, 0.1125233992934227, -0.11054432392120361, 0.6274507641792297, -0.202708899974823, 0.2574426829814911, -0.06485424935817719, 0.18380288779735565, -0.036992352455854416, 0.019787557423114777, 0.025744007900357246, 0.4265459179878235, -0.03663436695933342, 0.08658821135759354, -0.24530009925365448, 0.5439850687980652, 0.2354305535554886, 0.1975180059671402, -0.2265356034040451, -0.08877499401569366, 0.2265448272228241, -0.42915835976600647, -0.2648875415325165, 0.2957107126712799, 0.15490564703941345, 0.1138918548822403, -0.3117322027683258, 0.5959979891777039, 0.06861311942338943, 0.08495994657278061, -0.22454436123371124, -0.0018038577400147915, 0.280017614364624, -0.12427271902561188, -0.1135764792561531, -0.23090066015720367, 0.2905327081680298, 0.14321206510066986, 0.5214192867279053, 0.10394489765167236, -0.3891155421733856, 0.10013097524642944, 0.2672160863876343, -0.16954730451107025, 0.07944513857364655, 0.11687696725130081, 0.04127602279186249, -0.08224384486675262, 0.024764755740761757, 0.22095364332199097, 0.2899646759033203, 0.204453706741333, -0.3409022390842438, 0.31998583674430847, -0.03665297478437424, 0.14616502821445465, 0.21443943679332733, -0.17298521101474762, -0.04003667086362839, 0.4994862973690033, 0.37250712513923645, 0.2427581250667572, -0.18430663645267487, 0.17241805791854858, -0.39707931876182556, 0.15252360701560974, -0.5550448298454285, -0.021352579817175865, -0.14968447387218475, -0.07359038293361664, -0.19930081069469452, -0.01921396516263485, -0.2774990200996399, -0.11243771016597748, 0.2484334260225296, 0.15590623021125793, -0.05376284569501877, 0.27692627906799316, 0.0002654674754012376, 0.45941829681396484, 0.09787730127573013, -0.19885362684726715, -0.05862405151128769, -0.06503945589065552, -0.162403404712677, -0.009097847156226635, 0.015626592561602592, 0.19987744092941284, 0.14580555260181427, -0.4826640784740448, -0.3007999658584595, -0.28545549511909485, -0.3453066647052765, 0.21016865968704224, -0.06863675266504288, 0.3613206744194031, 0.16641688346862793, -0.018698517233133316, -0.3620542287826538, -0.20305202901363373, 0.1645020991563797, -0.02913537807762623, -0.4773869812488556, -0.05247538164258003, 0.05569225922226906, -0.2053314745426178, -0.041288021951913834, -0.4563174545764923, -0.09893912076950073, -0.270936518907547, 0.01622849516570568, -0.18172699213027954, 0.0823788195848465, 0.24365752935409546, -0.13891072571277618, 0.03481077402830124, -0.2918558716773987, 0.12605901062488556, -0.5039397478103638, -0.047288257628679276, 0.09391426295042038, 0.04301939532160759, -0.34363338351249695, -0.2887285351753235, -0.23202404379844666, -0.174905925989151, -0.035087935626506805, -0.13758446276187897, -0.22584185004234314, -0.1793825477361679, 0.2166629284620285, -0.22682707011699677, 0.2435196489095688, 0.22654619812965393, -0.18087446689605713, 0.08800973743200302, -0.2281244695186615, -0.445498526096344, 0.15238291025161743, 0.3971565365791321, 0.23534493148326874, -0.11179667711257935, 0.3300129473209381, -0.024653663858771324, 0.6546519994735718, 0.4053243100643158, 0.22661764919757843, 0.1022702306509018, -0.2168852537870407, 0.3332628905773163, -0.2054525762796402, -0.21879445016384125, 0.31269073486328125, 0.12877310812473297, -0.3271474540233612, 0.3284796476364136, 0.039797957986593246, 0.17491282522678375, 0.01551054511219263, 0.1942850947380066, -0.5804232954978943, -0.18751168251037598, -0.2166323959827423, 0.04989255964756012, 0.1647055745124817, 0.09028799831867218, -0.07233944535255432, 0.1494956910610199, -0.10614395141601562, -0.052444878965616226, 0.10693063586950302, -0.04424535110592842, 0.23646950721740723, -0.8369110822677612, -0.2997894585132599, 0.04330729693174362, 0.22586378455162048, 0.39950692653656006, 0.3815813660621643, -0.013444691896438599, -0.09399311244487762, 0.19683703780174255, 0.09238255023956299, 0.7246233820915222, 0.015938961878418922, 0.08295252174139023, -0.2899783253669739, 0.1853274405002594, -0.4381762742996216, -0.23490498960018158, -0.19489462673664093, 0.13776998221874237, 0.2811780273914337, 0.16984792053699493, -0.22085051238536835, -0.040870487689971924, 0.1911015659570694, 0.0646316260099411, -0.09848297387361526, -0.009389983490109444, -0.26534828543663025, -0.14907339215278625, -0.34381043910980225, 0.28513187170028687, 0.4409758150577545, 0.29318028688430786, 0.4785468578338623, -0.06088576093316078, 0.19115647673606873, 0.15684087574481964, -0.11838815361261368, 0.24441635608673096, 0.5145232677459717, -0.1394735872745514, 0.020231854170560837, 0.20985424518585205, -0.047285296022892, 0.035084743052721024, 0.5318819880485535, -0.09855577349662781, -0.320965051651001, -0.03559448942542076, -0.0423494316637516, 0.3858829438686371, 0.3409569263458252, 0.027156446129083633, 0.007218440528959036, -0.042327310889959335, 0.17052316665649414, -0.2394711673259735, -0.11459488421678543, 0.3838074505329132, 0.5305989980697632, -0.07233094424009323, -0.24324660003185272, 0.22699464857578278, -0.14598938822746277, 0.030438952147960663, 0.09295784682035446, 0.5290963053703308, -0.2636905908584595, 0.45205366611480713, -0.10958752781152725, 1.0020312070846558, 0.3281889259815216, 0.11342598497867584, 0.4978848695755005, -0.04720114916563034, 0.3578614890575409, -0.07541020959615707, 0.27481377124786377, -0.41394728422164917, 0.3110220432281494, -0.03776494413614273, -0.11987384408712387, -0.11781525611877441, -0.16986776888370514, -0.22657056152820587, 0.2860625386238098, -0.1526469588279724, 0.23116406798362732, -0.06266145408153534, -0.008522558957338333, -0.20341429114341736, -0.03352990373969078, -0.43697014451026917, 0.09323093295097351, 0.014677722007036209, 0.27039438486099243, -0.14877158403396606, 0.17500077188014984, -0.33909931778907776, -0.37423375248908997, -0.6190100908279419, -0.029975008219480515, -0.4763565957546234, 0.004796572495251894, 0.44992080330848694, -0.08977582305669785, -0.03641592338681221, 0.4331649839878082, 0.30170607566833496, 0.06793416291475296, -0.036910947412252426, 0.1858622431755066, -0.0765431672334671, 0.37628427147865295, 0.42951950430870056, -0.05190763622522354, 0.15741020441055298, -0.03748960420489311, -0.3992098867893219, -0.1864604353904724, 0.014257383532822132, -0.21475443243980408, 0.07059372961521149, 0.11322402209043503, 0.011674740351736546, -0.18065643310546875, -0.3797229826450348, -0.12185654789209366, 0.28885945677757263, -0.21521441638469696, 0.12182259559631348, -0.1044650673866272, -0.18339194357395172, 0.1680886149406433, 0.23020905256271362, -0.38283202052116394, -0.02935597486793995, 0.45915675163269043, -0.2447422444820404, 0.04463382810354233, 0.4361591041088104, 0.012649058364331722, -0.10209248960018158, -0.12105539441108704, 0.18574406206607819, -0.08986563235521317, -0.1195790097117424, 0.020980916917324066, -0.14428605139255524, -0.359521746635437, -0.21373805403709412, 0.33839961886405945, 0.383916437625885, -0.11619143933057785, -0.050292711704969406, -0.6957361698150635, -0.023551901802420616, 0.25307339429855347, 0.04387771338224411, -0.045118365436792374, 0.3628295063972473, 0.08016414940357208, -0.17540040612220764, -0.07035738229751587, -0.3165869414806366, -0.06968443840742111, -0.2544340193271637, 0.13788767158985138, -0.00048556216643191874, -0.05490511283278465, 0.22773724794387817, -0.2508431375026703, 0.09738325327634811, -0.0025258949026465416, -0.1287059783935547, -0.2157401591539383, -0.10593599081039429, 0.15164798498153687, 0.09583642333745956, -0.23682260513305664, -0.11058951169252396, -0.07676545530557632, 0.1523081511259079, -0.19047711789608002, 0.1285654753446579, 0.4913203716278076, 0.15181663632392883, 0.19984953105449677, -0.5185204148292542, -0.12653249502182007, 0.030971143394708633, 0.02348344586789608, -0.08319003134965897, -0.3460216522216797, 0.11455840617418289, 0.28577402234077454, -0.25416314601898193, -0.0568222738802433, 0.2504391074180603, 0.19712747633457184, 0.1563529074192047, 0.107992023229599, 0.19159884750843048, -0.09821972250938416, -0.019018705934286118, 0.1833929568529129, 0.22719499468803406, 0.37875449657440186, -0.4000140130519867, -0.04525141417980194, -0.03547416627407074, 0.1983867883682251, -0.37838128209114075, -0.03510386496782303, 0.21720577776432037, -0.18826884031295776, -0.020508497953414917, 0.21562382578849792, 0.136491596698761, -0.26487812399864197, -0.06507177650928497, 0.2325163036584854, 0.5807170271873474, -0.08882822096347809, 0.011357645504176617, 0.1476522833108902, 0.027407366782426834, 0.21495221555233002, 0.31767863035202026, -0.11529555171728134, 0.20218369364738464, 0.18653789162635803, -0.15203557908535004, 0.043982576578855515, -0.2052265703678131, 0.15206290781497955, 0.14444534480571747, 0.04668578505516052, 0.38284778594970703, 0.3497181236743927, -0.43962109088897705, 0.011120381765067577, 0.13172267377376556, 0.45762553811073303, -0.11604831367731094, -0.23841455578804016, -0.29361897706985474, -0.08832446485757828, -0.23818668723106384, -0.057863038033246994, -0.08070403337478638, -0.10523484647274017, -0.13906846940517426, -0.09896602481603622, -0.06288108974695206, -0.22114107012748718, 0.1579810529947281, 0.16819223761558533, -0.21827323734760284, -0.3492715060710907, -0.274662584066391, 0.2447260171175003, 0.18391801416873932, -0.1713453084230423, 0.3410624861717224, 0.06640898436307907, 0.009408937767148018, 0.30501219630241394, 0.5498548746109009, 0.5111486911773682, 0.21442024409770966, -0.15680398046970367, 0.1962302178144455, -0.1739753931760788, -0.02778681181371212, 0.011249005794525146, 0.11021409928798676, -0.29861196875572205, -0.49480003118515015, 0.09193795919418335, 0.21478743851184845, -0.18767285346984863, 0.013915094546973705, 0.061370089650154114, 0.11291617900133133, -0.3813638687133789, -0.22478275001049042, -0.3311120271682739, 0.31511420011520386, -0.18177683651447296, 0.10973432660102844, -0.14958298206329346, -0.025889337062835693, 0.14152759313583374, -0.1616256982088089, 0.20255796611309052, 0.07868485897779465, 0.07156539708375931, 0.1909436732530594, 0.04452817142009735, 0.6243497729301453, -0.2013411670923233, -0.06819035112857819, -0.05787837877869606, -0.5805677771568298, 0.13120722770690918, 0.03104480728507042, -0.11549718677997589, 0.20152340829372406, 0.21466420590877533, -0.159893199801445, 0.22095823287963867, 0.433492511510849, 0.06170843914151192, -0.19035248458385468, 0.011298144236207008, -0.2144550234079361, 0.07673801481723785, -0.20317523181438446, 0.11044425517320633, -0.00681770034134388, -0.2531498372554779, 0.2053185999393463, 0.14811372756958008, -0.05777183175086975, 0.18853189051151276, 0.15271049737930298, -0.08002657443284988, -0.43273717164993286, -0.12943552434444427, 0.3209771513938904, 0.22017914056777954, -0.23549500107765198, 0.19693486392498016, -0.06646451354026794, -0.16120530664920807, -0.523714005947113, 0.14058782160282135, -0.392633855342865, 0.29387715458869934, -0.04632244631648064, -0.3050650954246521, 0.04753214865922928, 0.23760411143302917, 0.3541373014450073, -0.29298171401023865, -0.4807344377040863, 0.1937258541584015, -0.15002985298633575, 0.23154787719249725, -0.08737541735172272, 0.19338446855545044, -0.08013942092657089, 0.45707279443740845, -0.33873456716537476, -0.3580106496810913, 0.32382306456565857, -0.34903576970100403, -0.11896345019340515, 0.014101995155215263, 0.33995917439460754, 0.28182557225227356, -0.14852772653102875, -0.5054002404212952, -0.1532178819179535, 0.2660461962223053, -0.00043565878877416253, -0.21644234657287598, 0.11160404980182648, -0.05062990263104439, -0.058732833713293076, 0.02992897294461727, 0.047723833471536636, 0.3681153953075409, -0.10838646441698074, 0.28898856043815613, -0.3507986068725586 ]
https://github.com/huggingface/datasets/issues/2585
sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index
If you are going to be altering the data cleaning from the source Squad dataset, here is one thing to consider. There are occasional double spaces separating words which it might be nice to get rid of. Either way, thank you.
## Describe the bug The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start']. For example: id = '56d1f453e7d4791d009025bd' answers = {'text': ['Pure Land'], 'answer_start': [146]} However the actual text in context at location 146 is 'ure Land,' Which is an off-by-one error from the correct answer. ## Steps to reproduce the bug ```python import datasets def check_context_answer_alignment(example): for a_idx in range(len(example['answers']['text'])): # check raw dataset for answer consistency between context and answer answer_text = example['answers']['text'][a_idx] a_st_idx = example['answers']['answer_start'][a_idx] a_end_idx = a_st_idx + len(example['answers']['text'][a_idx]) answer_text_from_context = example['context'][a_st_idx:a_end_idx] if answer_text != answer_text_from_context: #print(example['id']) return False return True dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True) start_len = len(dataset) dataset = dataset.filter(check_context_answer_alignment, num_proc=1, keep_in_memory=True) end_len = len(dataset) print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len)) ``` ## Expected results This code should result in 0 rows being filtered out from the dataset. ## Actual results This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location. This code will reproduce the problem and produce the following count: "258 instances contain mis-alignment between the answer text and answer index." ## Environment info Steps to rebuilt the Conda environment: ``` # create a virtual environment to stuff all these packages into conda create -n round8 python=3.8 -y # activate the virtual environment conda activate round8 # install pytorch (best done through conda to handle cuda dependencies) conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia pip install jsonpickle transformers datasets matplotlib ``` OS: Ubuntu 20.04 Python 3.8 Result of `conda env export`: ``` name: round8 channels: - pytorch-lts - nvidia - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=4.5=1_gnu - blas=1.0=mkl - brotlipy=0.7.0=py38h27cfd23_1003 - bzip2=1.0.8=h7b6447c_0 - ca-certificates=2021.5.25=h06a4308_1 - certifi=2021.5.30=py38h06a4308_0 - cffi=1.14.5=py38h261ae71_0 - chardet=4.0.0=py38h06a4308_1003 - cryptography=3.4.7=py38hd23ed53_0 - cudatoolkit=11.1.74=h6bb024c_0 - ffmpeg=4.2.2=h20bf706_0 - freetype=2.10.4=h5ab3b9f_0 - gmp=6.2.1=h2531618_2 - gnutls=3.6.15=he1e5248_0 - idna=2.10=pyhd3eb1b0_0 - intel-openmp=2021.2.0=h06a4308_610 - jpeg=9b=h024ee3a_2 - lame=3.100=h7b6447c_0 - lcms2=2.12=h3be6417_0 - ld_impl_linux-64=2.35.1=h7274673_9 - libffi=3.3=he6710b0_2 - libgcc-ng=9.3.0=h5101ec6_17 - libgomp=9.3.0=h5101ec6_17 - libidn2=2.3.1=h27cfd23_0 - libopus=1.3.1=h7b6447c_0 - libpng=1.6.37=hbc83047_0 - libstdcxx-ng=9.3.0=hd4cf53a_17 - libtasn1=4.16.0=h27cfd23_0 - libtiff=4.2.0=h85742a9_0 - libunistring=0.9.10=h27cfd23_0 - libuv=1.40.0=h7b6447c_0 - libvpx=1.7.0=h439df22_0 - libwebp-base=1.2.0=h27cfd23_0 - lz4-c=1.9.3=h2531618_0 - mkl=2021.2.0=h06a4308_296 - mkl-service=2.3.0=py38h27cfd23_1 - mkl_fft=1.3.0=py38h42c9631_2 - mkl_random=1.2.1=py38ha9443f7_2 - ncurses=6.2=he6710b0_1 - nettle=3.7.3=hbbd107a_1 - ninja=1.10.2=hff7bd54_1 - numpy=1.20.2=py38h2d18471_0 - numpy-base=1.20.2=py38hfae3a4d_0 - olefile=0.46=py_0 - openh264=2.1.0=hd408876_0 - openssl=1.1.1k=h27cfd23_0 - pillow=8.2.0=py38he98fc37_0 - pip=21.1.2=py38h06a4308_0 - pycparser=2.20=py_2 - pyopenssl=20.0.1=pyhd3eb1b0_1 - pysocks=1.7.1=py38h06a4308_0 - python=3.8.10=h12debd9_8 - pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0 - readline=8.1=h27cfd23_0 - requests=2.25.1=pyhd3eb1b0_0 - setuptools=52.0.0=py38h06a4308_0 - six=1.16.0=pyhd3eb1b0_0 - sqlite=3.35.4=hdfb4753_0 - tk=8.6.10=hbc83047_0 - torchtext=0.9.1=py38 - torchvision=0.9.1=py38_cu111 - typing_extensions=3.7.4.3=pyha847dfd_0 - urllib3=1.26.4=pyhd3eb1b0_0 - wheel=0.36.2=pyhd3eb1b0_0 - x264=1!157.20191217=h7b6447c_0 - xz=5.2.5=h7b6447c_0 - zlib=1.2.11=h7b6447c_3 - zstd=1.4.9=haebb681_0 - pip: - click==8.0.1 - cycler==0.10.0 - datasets==1.8.0 - dill==0.3.4 - filelock==3.0.12 - fsspec==2021.6.0 - huggingface-hub==0.0.8 - joblib==1.0.1 - jsonpickle==2.0.0 - kiwisolver==1.3.1 - matplotlib==3.4.2 - multiprocess==0.70.12.2 - packaging==20.9 - pandas==1.2.4 - pyarrow==3.0.0 - pyparsing==2.4.7 - python-dateutil==2.8.1 - pytz==2021.1 - regex==2021.4.4 - sacremoses==0.0.45 - tokenizers==0.10.3 - tqdm==4.49.0 - transformers==4.6.1 - xxhash==2.0.2 prefix: /home/mmajurski/anaconda3/envs/round8 ```
41
sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index ## Describe the bug The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start']. For example: id = '56d1f453e7d4791d009025bd' answers = {'text': ['Pure Land'], 'answer_start': [146]} However the actual text in context at location 146 is 'ure Land,' Which is an off-by-one error from the correct answer. ## Steps to reproduce the bug ```python import datasets def check_context_answer_alignment(example): for a_idx in range(len(example['answers']['text'])): # check raw dataset for answer consistency between context and answer answer_text = example['answers']['text'][a_idx] a_st_idx = example['answers']['answer_start'][a_idx] a_end_idx = a_st_idx + len(example['answers']['text'][a_idx]) answer_text_from_context = example['context'][a_st_idx:a_end_idx] if answer_text != answer_text_from_context: #print(example['id']) return False return True dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True) start_len = len(dataset) dataset = dataset.filter(check_context_answer_alignment, num_proc=1, keep_in_memory=True) end_len = len(dataset) print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len)) ``` ## Expected results This code should result in 0 rows being filtered out from the dataset. ## Actual results This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location. This code will reproduce the problem and produce the following count: "258 instances contain mis-alignment between the answer text and answer index." ## Environment info Steps to rebuilt the Conda environment: ``` # create a virtual environment to stuff all these packages into conda create -n round8 python=3.8 -y # activate the virtual environment conda activate round8 # install pytorch (best done through conda to handle cuda dependencies) conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia pip install jsonpickle transformers datasets matplotlib ``` OS: Ubuntu 20.04 Python 3.8 Result of `conda env export`: ``` name: round8 channels: - pytorch-lts - nvidia - defaults dependencies: - _libgcc_mutex=0.1=main - _openmp_mutex=4.5=1_gnu - blas=1.0=mkl - brotlipy=0.7.0=py38h27cfd23_1003 - bzip2=1.0.8=h7b6447c_0 - ca-certificates=2021.5.25=h06a4308_1 - certifi=2021.5.30=py38h06a4308_0 - cffi=1.14.5=py38h261ae71_0 - chardet=4.0.0=py38h06a4308_1003 - cryptography=3.4.7=py38hd23ed53_0 - cudatoolkit=11.1.74=h6bb024c_0 - ffmpeg=4.2.2=h20bf706_0 - freetype=2.10.4=h5ab3b9f_0 - gmp=6.2.1=h2531618_2 - gnutls=3.6.15=he1e5248_0 - idna=2.10=pyhd3eb1b0_0 - intel-openmp=2021.2.0=h06a4308_610 - jpeg=9b=h024ee3a_2 - lame=3.100=h7b6447c_0 - lcms2=2.12=h3be6417_0 - ld_impl_linux-64=2.35.1=h7274673_9 - libffi=3.3=he6710b0_2 - libgcc-ng=9.3.0=h5101ec6_17 - libgomp=9.3.0=h5101ec6_17 - libidn2=2.3.1=h27cfd23_0 - libopus=1.3.1=h7b6447c_0 - libpng=1.6.37=hbc83047_0 - libstdcxx-ng=9.3.0=hd4cf53a_17 - libtasn1=4.16.0=h27cfd23_0 - libtiff=4.2.0=h85742a9_0 - libunistring=0.9.10=h27cfd23_0 - libuv=1.40.0=h7b6447c_0 - libvpx=1.7.0=h439df22_0 - libwebp-base=1.2.0=h27cfd23_0 - lz4-c=1.9.3=h2531618_0 - mkl=2021.2.0=h06a4308_296 - mkl-service=2.3.0=py38h27cfd23_1 - mkl_fft=1.3.0=py38h42c9631_2 - mkl_random=1.2.1=py38ha9443f7_2 - ncurses=6.2=he6710b0_1 - nettle=3.7.3=hbbd107a_1 - ninja=1.10.2=hff7bd54_1 - numpy=1.20.2=py38h2d18471_0 - numpy-base=1.20.2=py38hfae3a4d_0 - olefile=0.46=py_0 - openh264=2.1.0=hd408876_0 - openssl=1.1.1k=h27cfd23_0 - pillow=8.2.0=py38he98fc37_0 - pip=21.1.2=py38h06a4308_0 - pycparser=2.20=py_2 - pyopenssl=20.0.1=pyhd3eb1b0_1 - pysocks=1.7.1=py38h06a4308_0 - python=3.8.10=h12debd9_8 - pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0 - readline=8.1=h27cfd23_0 - requests=2.25.1=pyhd3eb1b0_0 - setuptools=52.0.0=py38h06a4308_0 - six=1.16.0=pyhd3eb1b0_0 - sqlite=3.35.4=hdfb4753_0 - tk=8.6.10=hbc83047_0 - torchtext=0.9.1=py38 - torchvision=0.9.1=py38_cu111 - typing_extensions=3.7.4.3=pyha847dfd_0 - urllib3=1.26.4=pyhd3eb1b0_0 - wheel=0.36.2=pyhd3eb1b0_0 - x264=1!157.20191217=h7b6447c_0 - xz=5.2.5=h7b6447c_0 - zlib=1.2.11=h7b6447c_3 - zstd=1.4.9=haebb681_0 - pip: - click==8.0.1 - cycler==0.10.0 - datasets==1.8.0 - dill==0.3.4 - filelock==3.0.12 - fsspec==2021.6.0 - huggingface-hub==0.0.8 - joblib==1.0.1 - jsonpickle==2.0.0 - kiwisolver==1.3.1 - matplotlib==3.4.2 - multiprocess==0.70.12.2 - packaging==20.9 - pandas==1.2.4 - pyarrow==3.0.0 - pyparsing==2.4.7 - python-dateutil==2.8.1 - pytz==2021.1 - regex==2021.4.4 - sacremoses==0.0.45 - tokenizers==0.10.3 - tqdm==4.49.0 - transformers==4.6.1 - xxhash==2.0.2 prefix: /home/mmajurski/anaconda3/envs/round8 ``` If you are going to be altering the data cleaning from the source Squad dataset, here is one thing to consider. There are occasional double spaces separating words which it might be nice to get rid of. Either way, thank you.
[ -0.23303000628948212, -0.32953783869743347, -0.044109899550676346, 0.37493598461151123, 0.08782324194908142, -0.07634200155735016, 0.10575704276561737, 0.2279035747051239, -0.2927468419075012, 0.15778344869613647, -0.08416294306516647, 0.04506871476769447, 0.3250357210636139, 0.06854541599750519, -0.09260829538106918, 0.15236373245716095, 0.175633043050766, 0.010424783453345299, 0.009945611469447613, -0.17250365018844604, -0.22489848732948303, 0.2991381585597992, -0.29803261160850525, 0.03003019466996193, -0.3425646722316742, -0.010249072685837746, 0.03642430901527405, 0.11318311095237732, -0.1175084039568901, -0.4159387946128845, 0.21250206232070923, -0.09367889910936356, 0.0077110654674470425, 0.26386383175849915, -0.00011653102410491556, -0.17062537372112274, 0.07283831387758255, -0.0973288044333458, -0.2682836651802063, 0.004192151594907045, -0.04355863854289055, -0.12169106304645538, -0.1298898309469223, -0.10584231466054916, -0.2390318065881729, 0.2717563211917877, -0.06732302159070969, -0.28662484884262085, 0.6096699237823486, 0.24432244896888733, 0.1451374888420105, 0.2883637547492981, 0.010926204733550549, -0.0647382065653801, 0.17868654429912567, -0.1235734075307846, 0.07569434493780136, 0.11912643909454346, 0.145632803440094, 0.1079360768198967, -0.034699615091085434, 0.4713861346244812, -0.13435223698616028, -0.031890809535980225, -0.006144317332655191, 0.29044991731643677, 0.20661769807338715, -0.12783199548721313, 0.09985708445310593, 0.13117516040802002, 0.2598809003829956, -0.24844659864902496, -0.4248088002204895, -0.45694777369499207, -0.03582756593823433, -0.12240562587976456, 0.3317502737045288, 0.03945334255695343, -0.031152281910181046, 0.364789217710495, -0.13653261959552765, 0.07102788239717484, -0.08574998378753662, 0.1271403729915619, -0.08769320696592331, 0.2383425235748291, -0.12194901704788208, 0.14922155439853668, -0.26770448684692383, -0.13863477110862732, -0.06311677396297455, -0.1375986784696579, -0.10523352771997452, 0.41718530654907227, -0.5139369368553162, -0.10134794563055038, -0.16793787479400635, 0.09079288691282272, 0.2361776977777481, 0.06949418783187866, -0.06991668790578842, 0.001525034778751433, 0.26592060923576355, 0.06135200336575508, 0.3417299687862396, 0.2773300111293793, -0.11805348098278046, 0.2556288242340088, 0.10205760598182678, 0.14744651317596436, 0.041464317589998245, 0.10346710681915283, 0.19961705803871155, -0.18415699899196625, -0.10824698209762573, -0.15475396811962128, 0.1684664636850357, -0.18874827027320862, -0.5222858190536499, 0.43384385108947754, -0.6319301128387451, 0.2756717801094055, -0.0214355681091547, 0.34829723834991455, -0.22168448567390442, 0.2669173777103424, 0.3325079679489136, 0.24428386986255646, -0.06500289589166641, -0.18516825139522552, -0.1330844759941101, -0.09698004275560379, -0.014407208189368248, -0.03445906564593315, 0.007218503393232822, -0.1293736845254898, 0.22713057696819305, 0.2961052358150482, 0.21281960606575012, -0.22059224545955658, -0.3132045567035675, -0.16487348079681396, 0.14105865359306335, 0.030685413628816605, 0.027105338871479034, 0.1876549869775772, 0.1873006373643875, -0.2884293794631958, 0.07319557666778564, 0.09300610423088074, -0.23830552399158478, 0.07687349617481232, -0.09920445084571838, 0.22452029585838318, -0.16600359976291656, -0.05642641335725784, 0.04659959673881531, 0.2456643283367157, 0.29665839672088623, -0.2863127589225769, 0.2683805525302887, -0.2038262039422989, -0.33000779151916504, -0.0881248340010643, 0.3650222420692444, 0.29203781485557556, -0.19854624569416046, -0.06592587381601334, -0.05614028126001358, 0.15631771087646484, 0.026586992666125298, 0.23752635717391968, 0.27301210165023804, 0.2942620515823364, -0.42124485969543457, 0.26740556955337524, 0.10373373329639435, -0.8540112376213074, -0.5590248107910156, -0.17422007024288177, -0.1163511648774147, 0.22511041164398193, -0.10361585021018982, 0.07285972684621811, 0.4342783987522125, 0.15434327721595764, 0.27352839708328247, 0.5391798615455627, 0.06792427599430084, 0.1189374029636383, -0.37401795387268066, 0.04329166188836098, -0.09266810864210129, 0.12352566421031952, -0.24775755405426025, -0.17437708377838135, 0.05309804528951645, -0.18347428739070892, 0.18451713025569916, 0.10490529984235764, 0.07000785320997238, 0.24240805208683014, 0.32924482226371765, 0.12075698375701904, 0.17954546213150024, -0.5024951696395874, -0.48402902483940125, 0.09337487816810608, -0.0992034524679184, 0.05972154438495636, -0.062495920807123184, -0.13606706261634827, -0.39753293991088867, -0.03617607802152634, -0.35202834010124207, -0.30077171325683594, 0.09093020856380463, 0.008328832685947418, 0.1742563098669052, 0.1125233992934227, -0.11054432392120361, 0.6274507641792297, -0.202708899974823, 0.2574426829814911, -0.06485424935817719, 0.18380288779735565, -0.036992352455854416, 0.019787557423114777, 0.025744007900357246, 0.4265459179878235, -0.03663436695933342, 0.08658821135759354, -0.24530009925365448, 0.5439850687980652, 0.2354305535554886, 0.1975180059671402, -0.2265356034040451, -0.08877499401569366, 0.2265448272228241, -0.42915835976600647, -0.2648875415325165, 0.2957107126712799, 0.15490564703941345, 0.1138918548822403, -0.3117322027683258, 0.5959979891777039, 0.06861311942338943, 0.08495994657278061, -0.22454436123371124, -0.0018038577400147915, 0.280017614364624, -0.12427271902561188, -0.1135764792561531, -0.23090066015720367, 0.2905327081680298, 0.14321206510066986, 0.5214192867279053, 0.10394489765167236, -0.3891155421733856, 0.10013097524642944, 0.2672160863876343, -0.16954730451107025, 0.07944513857364655, 0.11687696725130081, 0.04127602279186249, -0.08224384486675262, 0.024764755740761757, 0.22095364332199097, 0.2899646759033203, 0.204453706741333, -0.3409022390842438, 0.31998583674430847, -0.03665297478437424, 0.14616502821445465, 0.21443943679332733, -0.17298521101474762, -0.04003667086362839, 0.4994862973690033, 0.37250712513923645, 0.2427581250667572, -0.18430663645267487, 0.17241805791854858, -0.39707931876182556, 0.15252360701560974, -0.5550448298454285, -0.021352579817175865, -0.14968447387218475, -0.07359038293361664, -0.19930081069469452, -0.01921396516263485, -0.2774990200996399, -0.11243771016597748, 0.2484334260225296, 0.15590623021125793, -0.05376284569501877, 0.27692627906799316, 0.0002654674754012376, 0.45941829681396484, 0.09787730127573013, -0.19885362684726715, -0.05862405151128769, -0.06503945589065552, -0.162403404712677, -0.009097847156226635, 0.015626592561602592, 0.19987744092941284, 0.14580555260181427, -0.4826640784740448, -0.3007999658584595, -0.28545549511909485, -0.3453066647052765, 0.21016865968704224, -0.06863675266504288, 0.3613206744194031, 0.16641688346862793, -0.018698517233133316, -0.3620542287826538, -0.20305202901363373, 0.1645020991563797, -0.02913537807762623, -0.4773869812488556, -0.05247538164258003, 0.05569225922226906, -0.2053314745426178, -0.041288021951913834, -0.4563174545764923, -0.09893912076950073, -0.270936518907547, 0.01622849516570568, -0.18172699213027954, 0.0823788195848465, 0.24365752935409546, -0.13891072571277618, 0.03481077402830124, -0.2918558716773987, 0.12605901062488556, -0.5039397478103638, -0.047288257628679276, 0.09391426295042038, 0.04301939532160759, -0.34363338351249695, -0.2887285351753235, -0.23202404379844666, -0.174905925989151, -0.035087935626506805, -0.13758446276187897, -0.22584185004234314, -0.1793825477361679, 0.2166629284620285, -0.22682707011699677, 0.2435196489095688, 0.22654619812965393, -0.18087446689605713, 0.08800973743200302, -0.2281244695186615, -0.445498526096344, 0.15238291025161743, 0.3971565365791321, 0.23534493148326874, -0.11179667711257935, 0.3300129473209381, -0.024653663858771324, 0.6546519994735718, 0.4053243100643158, 0.22661764919757843, 0.1022702306509018, -0.2168852537870407, 0.3332628905773163, -0.2054525762796402, -0.21879445016384125, 0.31269073486328125, 0.12877310812473297, -0.3271474540233612, 0.3284796476364136, 0.039797957986593246, 0.17491282522678375, 0.01551054511219263, 0.1942850947380066, -0.5804232954978943, -0.18751168251037598, -0.2166323959827423, 0.04989255964756012, 0.1647055745124817, 0.09028799831867218, -0.07233944535255432, 0.1494956910610199, -0.10614395141601562, -0.052444878965616226, 0.10693063586950302, -0.04424535110592842, 0.23646950721740723, -0.8369110822677612, -0.2997894585132599, 0.04330729693174362, 0.22586378455162048, 0.39950692653656006, 0.3815813660621643, -0.013444691896438599, -0.09399311244487762, 0.19683703780174255, 0.09238255023956299, 0.7246233820915222, 0.015938961878418922, 0.08295252174139023, -0.2899783253669739, 0.1853274405002594, -0.4381762742996216, -0.23490498960018158, -0.19489462673664093, 0.13776998221874237, 0.2811780273914337, 0.16984792053699493, -0.22085051238536835, -0.040870487689971924, 0.1911015659570694, 0.0646316260099411, -0.09848297387361526, -0.009389983490109444, -0.26534828543663025, -0.14907339215278625, -0.34381043910980225, 0.28513187170028687, 0.4409758150577545, 0.29318028688430786, 0.4785468578338623, -0.06088576093316078, 0.19115647673606873, 0.15684087574481964, -0.11838815361261368, 0.24441635608673096, 0.5145232677459717, -0.1394735872745514, 0.020231854170560837, 0.20985424518585205, -0.047285296022892, 0.035084743052721024, 0.5318819880485535, -0.09855577349662781, -0.320965051651001, -0.03559448942542076, -0.0423494316637516, 0.3858829438686371, 0.3409569263458252, 0.027156446129083633, 0.007218440528959036, -0.042327310889959335, 0.17052316665649414, -0.2394711673259735, -0.11459488421678543, 0.3838074505329132, 0.5305989980697632, -0.07233094424009323, -0.24324660003185272, 0.22699464857578278, -0.14598938822746277, 0.030438952147960663, 0.09295784682035446, 0.5290963053703308, -0.2636905908584595, 0.45205366611480713, -0.10958752781152725, 1.0020312070846558, 0.3281889259815216, 0.11342598497867584, 0.4978848695755005, -0.04720114916563034, 0.3578614890575409, -0.07541020959615707, 0.27481377124786377, -0.41394728422164917, 0.3110220432281494, -0.03776494413614273, -0.11987384408712387, -0.11781525611877441, -0.16986776888370514, -0.22657056152820587, 0.2860625386238098, -0.1526469588279724, 0.23116406798362732, -0.06266145408153534, -0.008522558957338333, -0.20341429114341736, -0.03352990373969078, -0.43697014451026917, 0.09323093295097351, 0.014677722007036209, 0.27039438486099243, -0.14877158403396606, 0.17500077188014984, -0.33909931778907776, -0.37423375248908997, -0.6190100908279419, -0.029975008219480515, -0.4763565957546234, 0.004796572495251894, 0.44992080330848694, -0.08977582305669785, -0.03641592338681221, 0.4331649839878082, 0.30170607566833496, 0.06793416291475296, -0.036910947412252426, 0.1858622431755066, -0.0765431672334671, 0.37628427147865295, 0.42951950430870056, -0.05190763622522354, 0.15741020441055298, -0.03748960420489311, -0.3992098867893219, -0.1864604353904724, 0.014257383532822132, -0.21475443243980408, 0.07059372961521149, 0.11322402209043503, 0.011674740351736546, -0.18065643310546875, -0.3797229826450348, -0.12185654789209366, 0.28885945677757263, -0.21521441638469696, 0.12182259559631348, -0.1044650673866272, -0.18339194357395172, 0.1680886149406433, 0.23020905256271362, -0.38283202052116394, -0.02935597486793995, 0.45915675163269043, -0.2447422444820404, 0.04463382810354233, 0.4361591041088104, 0.012649058364331722, -0.10209248960018158, -0.12105539441108704, 0.18574406206607819, -0.08986563235521317, -0.1195790097117424, 0.020980916917324066, -0.14428605139255524, -0.359521746635437, -0.21373805403709412, 0.33839961886405945, 0.383916437625885, -0.11619143933057785, -0.050292711704969406, -0.6957361698150635, -0.023551901802420616, 0.25307339429855347, 0.04387771338224411, -0.045118365436792374, 0.3628295063972473, 0.08016414940357208, -0.17540040612220764, -0.07035738229751587, -0.3165869414806366, -0.06968443840742111, -0.2544340193271637, 0.13788767158985138, -0.00048556216643191874, -0.05490511283278465, 0.22773724794387817, -0.2508431375026703, 0.09738325327634811, -0.0025258949026465416, -0.1287059783935547, -0.2157401591539383, -0.10593599081039429, 0.15164798498153687, 0.09583642333745956, -0.23682260513305664, -0.11058951169252396, -0.07676545530557632, 0.1523081511259079, -0.19047711789608002, 0.1285654753446579, 0.4913203716278076, 0.15181663632392883, 0.19984953105449677, -0.5185204148292542, -0.12653249502182007, 0.030971143394708633, 0.02348344586789608, -0.08319003134965897, -0.3460216522216797, 0.11455840617418289, 0.28577402234077454, -0.25416314601898193, -0.0568222738802433, 0.2504391074180603, 0.19712747633457184, 0.1563529074192047, 0.107992023229599, 0.19159884750843048, -0.09821972250938416, -0.019018705934286118, 0.1833929568529129, 0.22719499468803406, 0.37875449657440186, -0.4000140130519867, -0.04525141417980194, -0.03547416627407074, 0.1983867883682251, -0.37838128209114075, -0.03510386496782303, 0.21720577776432037, -0.18826884031295776, -0.020508497953414917, 0.21562382578849792, 0.136491596698761, -0.26487812399864197, -0.06507177650928497, 0.2325163036584854, 0.5807170271873474, -0.08882822096347809, 0.011357645504176617, 0.1476522833108902, 0.027407366782426834, 0.21495221555233002, 0.31767863035202026, -0.11529555171728134, 0.20218369364738464, 0.18653789162635803, -0.15203557908535004, 0.043982576578855515, -0.2052265703678131, 0.15206290781497955, 0.14444534480571747, 0.04668578505516052, 0.38284778594970703, 0.3497181236743927, -0.43962109088897705, 0.011120381765067577, 0.13172267377376556, 0.45762553811073303, -0.11604831367731094, -0.23841455578804016, -0.29361897706985474, -0.08832446485757828, -0.23818668723106384, -0.057863038033246994, -0.08070403337478638, -0.10523484647274017, -0.13906846940517426, -0.09896602481603622, -0.06288108974695206, -0.22114107012748718, 0.1579810529947281, 0.16819223761558533, -0.21827323734760284, -0.3492715060710907, -0.274662584066391, 0.2447260171175003, 0.18391801416873932, -0.1713453084230423, 0.3410624861717224, 0.06640898436307907, 0.009408937767148018, 0.30501219630241394, 0.5498548746109009, 0.5111486911773682, 0.21442024409770966, -0.15680398046970367, 0.1962302178144455, -0.1739753931760788, -0.02778681181371212, 0.011249005794525146, 0.11021409928798676, -0.29861196875572205, -0.49480003118515015, 0.09193795919418335, 0.21478743851184845, -0.18767285346984863, 0.013915094546973705, 0.061370089650154114, 0.11291617900133133, -0.3813638687133789, -0.22478275001049042, -0.3311120271682739, 0.31511420011520386, -0.18177683651447296, 0.10973432660102844, -0.14958298206329346, -0.025889337062835693, 0.14152759313583374, -0.1616256982088089, 0.20255796611309052, 0.07868485897779465, 0.07156539708375931, 0.1909436732530594, 0.04452817142009735, 0.6243497729301453, -0.2013411670923233, -0.06819035112857819, -0.05787837877869606, -0.5805677771568298, 0.13120722770690918, 0.03104480728507042, -0.11549718677997589, 0.20152340829372406, 0.21466420590877533, -0.159893199801445, 0.22095823287963867, 0.433492511510849, 0.06170843914151192, -0.19035248458385468, 0.011298144236207008, -0.2144550234079361, 0.07673801481723785, -0.20317523181438446, 0.11044425517320633, -0.00681770034134388, -0.2531498372554779, 0.2053185999393463, 0.14811372756958008, -0.05777183175086975, 0.18853189051151276, 0.15271049737930298, -0.08002657443284988, -0.43273717164993286, -0.12943552434444427, 0.3209771513938904, 0.22017914056777954, -0.23549500107765198, 0.19693486392498016, -0.06646451354026794, -0.16120530664920807, -0.523714005947113, 0.14058782160282135, -0.392633855342865, 0.29387715458869934, -0.04632244631648064, -0.3050650954246521, 0.04753214865922928, 0.23760411143302917, 0.3541373014450073, -0.29298171401023865, -0.4807344377040863, 0.1937258541584015, -0.15002985298633575, 0.23154787719249725, -0.08737541735172272, 0.19338446855545044, -0.08013942092657089, 0.45707279443740845, -0.33873456716537476, -0.3580106496810913, 0.32382306456565857, -0.34903576970100403, -0.11896345019340515, 0.014101995155215263, 0.33995917439460754, 0.28182557225227356, -0.14852772653102875, -0.5054002404212952, -0.1532178819179535, 0.2660461962223053, -0.00043565878877416253, -0.21644234657287598, 0.11160404980182648, -0.05062990263104439, -0.058732833713293076, 0.02992897294461727, 0.047723833471536636, 0.3681153953075409, -0.10838646441698074, 0.28898856043815613, -0.3507986068725586 ]
https://github.com/huggingface/datasets/issues/2583
Error iteration over IterableDataset using Torch DataLoader
Hi ! This is because you first need to format the dataset for pytorch: ```python >>> import torch >>> from datasets import load_dataset >>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True) >>> torch_iterable_dataset = dataset.with_format("torch") >>> assert isinstance(torch_iterable_dataset, torch.utils.data.IterableDataset) >>> dataloader = torch.utils.data.DataLoader(torch_iterable_dataset, batch_size=4) >>> next(iter(dataloader)) {'id': tensor([0, 1, 2, 3]), 'text': ['Mtendere Village was inspired...]} ``` This is because the pytorch dataloader expects a subclass of `torch.utils.data.IterableDataset`. Since you can't pass an arbitrary iterable to a pytorch dataloader, you first need to build an object that inherits from `torch.utils.data.IterableDataset` using `with_format("torch")` for example.
## Describe the bug I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler. I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me. ## Steps to reproduce the bug 1. Does not work. ```python >>> from datasets import load_dataset >>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True) >>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4) >>> dataloader.sampler <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> >>> for batch in dataloader: ... print(batch) ``` 2. Works. ```python import torch from torch.utils.data import Dataset, IterableDataset, DataLoader class CustomIterableDataset(IterableDataset): 'Characterizes a dataset for PyTorch' def __init__(self, data): 'Initialization' self.data = data def __iter__(self): return iter(self.data) data = list(range(12)) dataset = CustomIterableDataset(data) dataloader = DataLoader(dataset, batch_size=4) print("dataloader: ", dataloader.sampler) for batch in dataloader: print(batch) ``` ## Expected results To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different. dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50> tensor([0, 1, 2, 3]) tensor([4, 5, 6, 7]) tensor([ 8, 9, 10, 11]) ## Actual results <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data index = self._next_index() # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__ for idx in self.sampler: File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__ return iter(range(len(self.data_source))) TypeError: object of type 'IterableDataset' has no len() ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: '1.8.1.dev0' - Platform: Linux - Python version: Python 3.6.8 - PyArrow version: '3.0.0'
93
Error iteration over IterableDataset using Torch DataLoader ## Describe the bug I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler. I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me. ## Steps to reproduce the bug 1. Does not work. ```python >>> from datasets import load_dataset >>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True) >>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4) >>> dataloader.sampler <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> >>> for batch in dataloader: ... print(batch) ``` 2. Works. ```python import torch from torch.utils.data import Dataset, IterableDataset, DataLoader class CustomIterableDataset(IterableDataset): 'Characterizes a dataset for PyTorch' def __init__(self, data): 'Initialization' self.data = data def __iter__(self): return iter(self.data) data = list(range(12)) dataset = CustomIterableDataset(data) dataloader = DataLoader(dataset, batch_size=4) print("dataloader: ", dataloader.sampler) for batch in dataloader: print(batch) ``` ## Expected results To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different. dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50> tensor([0, 1, 2, 3]) tensor([4, 5, 6, 7]) tensor([ 8, 9, 10, 11]) ## Actual results <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data index = self._next_index() # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__ for idx in self.sampler: File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__ return iter(range(len(self.data_source))) TypeError: object of type 'IterableDataset' has no len() ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: '1.8.1.dev0' - Platform: Linux - Python version: Python 3.6.8 - PyArrow version: '3.0.0' Hi ! This is because you first need to format the dataset for pytorch: ```python >>> import torch >>> from datasets import load_dataset >>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True) >>> torch_iterable_dataset = dataset.with_format("torch") >>> assert isinstance(torch_iterable_dataset, torch.utils.data.IterableDataset) >>> dataloader = torch.utils.data.DataLoader(torch_iterable_dataset, batch_size=4) >>> next(iter(dataloader)) {'id': tensor([0, 1, 2, 3]), 'text': ['Mtendere Village was inspired...]} ``` This is because the pytorch dataloader expects a subclass of `torch.utils.data.IterableDataset`. Since you can't pass an arbitrary iterable to a pytorch dataloader, you first need to build an object that inherits from `torch.utils.data.IterableDataset` using `with_format("torch")` for example.
[ -0.17598839104175568, -0.33258265256881714, -0.012141015380620956, 0.2365848422050476, 0.1552753895521164, 0.020412376150488853, 0.43117448687553406, 0.0018050287617370486, -0.16896097362041473, 0.24600963294506073, 0.09634552150964737, 0.24420931935310364, -0.33548101782798767, -0.406596839427948, -0.24957726895809174, -0.21472778916358948, 0.08618004620075226, -0.21722015738487244, -0.2279186248779297, -0.08439398556947708, -0.15839561820030212, -0.03149557113647461, -0.23817643523216248, -0.03344672545790672, -0.021350815892219543, -0.024418402463197708, -0.12059852480888367, 0.009426765143871307, 0.08263275772333145, -0.5168218612670898, 0.41323763132095337, 0.07846739888191223, 0.5836470127105713, 0.5928800702095032, -0.00012130137474741787, 0.08044078946113586, 0.5695521235466003, -0.14884786307811737, -0.34067538380622864, 0.033983100205659866, 0.18531012535095215, 0.12311206758022308, 0.18922939896583557, -0.25030386447906494, 0.00856360699981451, -0.13734552264213562, 0.04133287072181702, -0.44291186332702637, 0.02774513140320778, 0.09113851189613342, 0.12735103070735931, 0.14044657349586487, -0.21520979702472687, -0.1551947444677353, 0.08733932673931122, 0.08384337276220322, -0.06600605696439743, 0.3676382005214691, 0.6034709215164185, 0.14620231091976166, -0.2805483043193817, 0.10235284268856049, -0.0515720508992672, 0.14463266730308533, 0.20253410935401917, -0.20651447772979736, -0.15180723369121552, -0.14113104343414307, 0.01658495143055916, 0.1377263367176056, 0.42965105175971985, -0.36472275853157043, -0.2566860318183899, -0.21343407034873962, -0.09083700180053711, -0.008176171220839024, -0.05156197398900986, 0.24559390544891357, -0.25176018476486206, -0.10191318392753601, -0.10535220056772232, 0.29457569122314453, -0.2935190498828888, 0.15060503780841827, 0.12089275568723679, 0.06075609475374222, -0.06054233759641647, 0.4181460440158844, -0.025809453800320625, -0.04967731982469559, 0.41042715311050415, -0.1466061919927597, 0.1139799952507019, 0.17912723124027252, -0.409812867641449, 0.12157384306192398, -0.0745929479598999, 0.03438632935285568, 0.1090586930513382, 0.22854319214820862, 0.19129975140094757, -0.07218089699745178, 0.2148057371377945, -0.07588349282741547, 0.2809828817844391, 0.21040184795856476, 0.16070441901683807, 0.1309027075767517, -0.048436179757118225, 0.12946325540542603, 0.12071508914232254, -0.043157435953617096, -0.01311937253922224, -0.2782546579837799, 0.3315112292766571, 0.22974444925785065, 0.24273791909217834, 0.021872293204069138, -0.263030081987381, -0.06715558469295502, -0.37721529603004456, -0.04647711664438248, 0.09215173870325089, 0.03120928816497326, -0.06635399162769318, -0.018239395692944527, 0.026031216606497765, 0.21941518783569336, 0.0019597304053604603, -0.13634854555130005, -0.04496745020151138, -0.06343168020248413, -0.23698434233665466, 0.16531138122081757, 0.013812502846121788, -0.525913655757904, 0.21787631511688232, 0.07431989163160324, 0.12404228746891022, 0.09819072484970093, 0.1407570242881775, -0.15383106470108032, 0.08765185624361038, -0.18867874145507812, 0.10858329385519028, 0.293715238571167, 0.09096632897853851, 0.37019917368888855, 0.17034786939620972, 0.3358135521411896, -0.21395090222358704, -0.43116945028305054, -0.004114411771297455, 0.13150550425052643, -0.1349410116672516, 0.14840124547481537, -0.16619233787059784, 0.013972622342407703, 0.35923007130622864, -0.08629950135946274, 0.2563606798648834, -0.3309459090232849, 0.08548950403928757, -0.3074100613594055, -0.1566837728023529, 0.32015061378479004, -0.5023244619369507, -0.009421538561582565, 0.0944095179438591, -0.1242312490940094, 0.45208436250686646, 0.16446678340435028, -0.3807598054409027, 0.35968512296676636, -0.4563368260860443, -0.002249354962259531, 0.003712879493832588, -0.4484595060348511, -0.4353862702846527, 0.2547228932380676, 0.06006881594657898, 0.2916576862335205, 0.17571522295475006, 0.044359419494867325, 0.42816078662872314, -0.32416170835494995, 0.17888416349887848, 0.018160583451390266, -0.23640282452106476, -0.1766934096813202, -0.30590009689331055, 0.06542983651161194, 0.32229241728782654, 0.12153809517621994, 0.07876453548669815, 0.2113109827041626, -0.0018347434233874083, 0.03645366057753563, 0.2559022903442383, -0.16226054728031158, 0.1733243763446808, 0.27126815915107727, -0.022152699530124664, 0.10625101625919342, 0.1877066045999527, -0.06390511989593506, -0.38269227743148804, 0.19025419652462006, -0.03414405882358551, 0.025288384407758713, 0.024826588109135628, -0.035797495394945145, 0.07464268058538437, 0.1515568345785141, -0.40891599655151367, -0.19567102193832397, 0.02070046029984951, 0.3267153203487396, 0.24016287922859192, -0.34108659625053406, 0.05102561041712761, 0.17793254554271698, -0.3679125905036926, -0.09054145216941833, -0.6530373096466064, -0.015755552798509598, 0.1605355143547058, -0.2572541832923889, 0.006690280977636576, 0.007865660823881626, 0.2089659869670868, -0.20636743307113647, -0.09491855651140213, 0.214793398976326, -0.12380602955818176, -0.12815696001052856, -0.17848795652389526, -0.010511861182749271, 0.0613335445523262, -0.20365944504737854, -0.003343277843669057, 0.3811858594417572, 0.22065573930740356, -0.16431491076946259, 0.15714095532894135, 0.4330126643180847, -0.13789772987365723, 0.4838740825653076, -0.07346555590629578, -0.0011854771291837096, 0.05471349135041237, 0.20821653306484222, -0.4597418010234833, 0.14478571712970734, 0.250141441822052, -0.062213994562625885, 0.4288070499897003, -0.19781596958637238, -0.36332184076309204, 0.0964464470744133, -0.06512418389320374, -0.016503792256116867, -0.13323265314102173, 0.17621251940727234, -0.28312477469444275, 0.08376123756170273, 0.13753722608089447, -0.015924939885735512, 0.6980893611907959, 0.004887053743004799, 0.02115577459335327, -0.10675910115242004, 0.12121684104204178, -0.06639958918094635, 0.017251117154955864, 0.23966394364833832, 0.08117931336164474, 0.17260771989822388, 0.09104997664690018, -0.12290463596582413, -0.05047700181603432, -0.43839800357818604, -0.1312052309513092, 0.19988995790481567, -0.08025823533535004, 0.30072447657585144, 0.09545566141605377, -0.13905559480190277, -0.380645751953125, -0.5877687335014343, 0.018512969836592674, -0.2711995542049408, -0.23294855654239655, 0.5140381455421448, 0.07633223384618759, 0.11004101485013962, 0.04380517452955246, 0.12408671528100967, 0.33237603306770325, -0.10419755429029465, -0.015929343178868294, -0.03921160846948624, -0.36596009135246277, -0.03146069496870041, -0.023669740185141563, -0.6017322540283203, 0.3704042136669159, 0.13439153134822845, 0.040474846959114075, -0.47920116782188416, 0.1423616260290146, 0.04735913500189781, -0.066191665828228, 0.07064681500196457, 0.40863272547721863, -0.05046282336115837, 0.293843150138855, -0.20238712430000305, 0.30721810460090637, -0.09485248476266861, 0.0008259759051725268, 0.0853474959731102, -0.09316693991422653, -0.0026090270839631557, 0.14635786414146423, -0.03688664361834526, -0.2398693859577179, -0.2074587345123291, -0.08613358438014984, 0.07317996025085449, -0.008196261711418629, 0.16517981886863708, 0.02423711307346821, 0.09530344605445862, 0.4552522897720337, -0.1504250466823578, -0.06396009027957916, -0.41666367650032043, 0.1938694268465042, -0.333546906709671, -0.28590914607048035, -0.2267332822084427, -0.22947974503040314, 0.24978110194206238, 0.3717748522758484, -0.30562296509742737, -0.19610609114170074, -0.060211680829524994, 0.22527751326560974, -0.08177109062671661, -0.042503438889980316, 0.20502687990665436, -0.12811148166656494, 0.0889524593949318, -0.14572131633758545, -0.10337653011083603, 0.06909620016813278, -0.2425733208656311, 0.3543994426727295, 0.28956520557403564, 0.5595617890357971, 0.13785050809383392, 0.952619731426239, 0.462544322013855, -0.1511877030134201, 0.204190194606781, 0.008010867983102798, -0.13840869069099426, -0.08577485382556915, -0.38426443934440613, 0.21528270840644836, -0.210037961602211, -0.31230470538139343, 0.16608040034770966, -0.21496988832950592, -0.10470368713140488, 0.08273180574178696, 0.09725403040647507, -0.008991417475044727, -0.10375012457370758, 0.17559760808944702, -0.5570784211158752, 0.19041579961776733, -0.14686034619808197, 0.24267295002937317, -0.28692275285720825, -0.1258832961320877, -0.03696610406041145, 0.04244396090507507, 0.24592149257659912, 0.05157354474067688, -0.18931038677692413, 0.01908673346042633, -0.6127880811691284, 0.3754480183124542, 0.17678621411323547, 0.6406636834144592, 0.1874253749847412, -0.11556417495012283, 0.18792188167572021, 0.00491558201611042, 0.7799474596977234, -0.10748818516731262, -0.2398388683795929, -0.0036269472911953926, -0.16696499288082123, -0.7163996696472168, -0.4133671522140503, -0.14693999290466309, 0.7751924991607666, 0.15553878247737885, -0.07514585554599762, -0.1394631564617157, -0.03318013250827789, 0.1941220760345459, 0.07339299470186234, -0.20688581466674805, -0.16901369392871857, -0.11875499784946442, -0.3793283700942993, -0.08949168771505356, -0.2840985953807831, 0.05170008912682533, 0.19061806797981262, -0.08544106781482697, 0.061273243278265, -0.26140841841697693, -0.014388708397746086, 0.05835482105612755, -0.08949863910675049, 0.1643390655517578, -0.21373070776462555, 0.2124439775943756, -0.012210868299007416, 0.28405845165252686, 0.48792529106140137, 0.2832309305667877, -0.00356411118991673, -0.5100497603416443, 0.2887408137321472, -0.18306899070739746, 0.03784850984811783, 0.20618461072444916, -0.1886104941368103, 0.08036155998706818, -0.1013224720954895, -0.02139599248766899, -0.2109726220369339, -0.09348911046981812, 0.30206283926963806, 0.05301260948181152, -0.6308019161224365, -0.5626425743103027, 0.17281179130077362, 0.2680610418319702, 0.05267997458577156, 0.6681531667709351, -0.39850953221321106, -0.2715952396392822, 0.27770018577575684, 0.08388390392065048, 0.7267506718635559, 0.14852547645568848, -0.05574774742126465, 0.23261477053165436, 0.20901606976985931, 0.018676292151212692, 0.3115615248680115, 0.23696741461753845, -0.3453315496444702, -0.22724464535713196, -0.026991603896021843, -0.18979865312576294, 0.12217776477336884, 0.18264366686344147, -0.06328203529119492, 0.33182379603385925, -0.14366012811660767, 0.045979682356119156, 0.12700703740119934, -0.12689273059368134, -0.2129751443862915, -0.13387882709503174, 0.09565117210149765, 0.0851188525557518, 0.005765728652477264, 0.25649043917655945, -0.17285272479057312, -0.09265781939029694, 0.06687930226325989, -0.15552447736263275, -0.2618390917778015, 0.04439008608460426, -0.22300037741661072, 0.09858468174934387, 0.24561840295791626, -0.5232536196708679, 0.05012283846735954, 0.21589438617229462, 0.352230042219162, -0.362772673368454, -0.002662668703123927, -0.029419973492622375, 0.11824283003807068, -0.023342741653323174, -0.20290391147136688, -0.20772290229797363, 0.48709702491760254, 0.040551114827394485, 0.09955156594514847, 0.32059863209724426, 0.07133429497480392, -0.4681003987789154, -0.22823920845985413, 0.296656996011734, 0.47719869017601013, -0.5392913818359375, -0.23196958005428314, -0.25082769989967346, -0.21991920471191406, -0.23634280264377594, 0.010444988496601582, 0.02068900875747204, -0.28768226504325867, 0.19411145150661469, -0.17438216507434845, -0.12590745091438293, 0.09192650765180588, 0.5244771242141724, 0.33162134885787964, -0.04920823499560356, 0.46102187037467957, 0.12727822363376617, -0.07801894098520279, 0.01729987934231758, -0.033795394003391266, 0.27422982454299927, -0.603999674320221, 0.33209705352783203, -0.3019654154777527, 0.5657224059104919, -0.047774992883205414, 0.3233404755592346, 0.014581605792045593, 0.06453459709882736, -0.3575259745121002, -0.25253188610076904, -0.2616003453731537, -0.10557224601507187, 0.0183103010058403, 0.26057854294776917, 0.05244279280304909, 0.12131424993276596, 0.07276540994644165, -0.08296646177768707, -0.1959933340549469, -0.18018493056297302, -0.02059573121368885, 0.1617281436920166, 0.15081781148910522, 0.06201843172311783, -0.10457277297973633, 0.3312746584415436, -0.05368264019489288, 0.40632787346839905, 0.01992524042725563, -0.15047292411327362, -0.02763250470161438, 0.16993482410907745, 0.06052107363939285, -0.10470781475305557, -0.16922347247600555, -0.20600122213363647, 0.00635450379922986, -0.06021195650100708, 0.2894996404647827, 0.2464601993560791, 0.039910491555929184, 0.14236165583133698, 0.31735551357269287, 0.043183907866477966, -0.08609496057033539, 0.09589479863643646, 0.10156161338090897, 0.33742648363113403, 0.17748045921325684, 0.13566835224628448, 0.11205025017261505, -0.17338065803050995, -0.32013237476348877, 0.12381143867969513, 0.2855199873447418, 0.22080694139003754, -0.06243361905217171, -0.580786943435669, 0.1231827661395073, 0.02367304265499115, 0.1875419169664383, 0.36308369040489197, -0.36317041516304016, -0.10949833691120148, 0.09908869862556458, 0.055639203637838364, 0.05120868235826492, -0.07024829089641571, -0.18324775993824005, 0.03339720517396927, 0.022657200694084167, 0.2685617208480835, -0.08713938295841217, -0.2271842211484909, 0.16491307318210602, -0.011057168245315552, 0.34742850065231323, -0.13776107132434845, 0.10774951428174973, 0.36730894446372986, 0.15318788588047028, 0.01950356550514698, 0.3287827670574188, 0.07383748143911362, 0.062176141887903214, 0.4536166489124298, 0.04338495805859566, 0.6263987421989441, 0.31339579820632935, -0.2698841392993927, 0.10481753200292587, -0.3597237765789032, -0.13157638907432556, -0.06444606930017471, 0.14289376139640808, 0.2984360158443451, 0.07192477583885193, 0.4628483057022095, -0.17626449465751648, -0.31523850560188293, 0.048758625984191895, -0.24236394464969635, -0.08563855290412903, -0.11423971503973007, -0.3930783271789551, -0.1982114613056183, 0.23661555349826813, -0.027727052569389343, -0.09085875004529953, -0.012065819464623928, 0.18862029910087585, -0.1014317125082016, -0.20595715939998627, -0.5857433080673218, -0.17343786358833313, 0.28391233086586, -0.062401555478572845, -0.12223025411367416, 0.15278317034244537, 0.12454983592033386, 0.1562817245721817, 0.15072013437747955, 0.30550262331962585, 0.4985905885696411, 0.532503068447113, -0.10812880098819733, 0.10503160953521729, -0.15050733089447021, -0.06871141493320465, -0.01578177697956562, 0.17568232119083405, -0.12522141635417938, -0.14409959316253662, 0.4051365256309509, 0.06611458212137222, -0.06067241355776787, 0.3941463530063629, 0.3221776783466339, 0.04345725476741791, -0.23415423929691315, 0.11431561410427094, -0.1278596669435501, 0.06544743478298187, -0.13820311427116394, 0.015658024698495865, -0.39029285311698914, -0.05954190716147423, 0.3030413091182709, -0.3966251313686371, 0.11297602206468582, -0.03893231973052025, 0.026305442675948143, -0.4196697771549225, 0.37585875391960144, 0.32213979959487915, 0.17387878894805908, -0.22130145132541656, -0.14026835560798645, -0.1009964644908905, 0.17925874888896942, -0.24928787350654602, 0.11362731456756592, -0.04607987776398659, 0.3102740943431854, -0.10725919157266617, 0.13170044124126434, 0.19803005456924438, 0.002752445638179779, -0.06394953280687332, 0.7769205570220947, -0.2023661732673645, -0.40614011883735657, 0.00425870344042778, 0.0891181081533432, 0.06590458005666733, -0.48697665333747864, -0.06339024752378464, -0.09672956168651581, 0.03900183364748955, -0.10394356399774551, -0.25709810853004456, 0.27014365792274475, -0.010822772048413754, 0.32186293601989746, 0.17599165439605713, 0.08218260854482651, 0.047204818576574326, -0.039346568286418915, -0.4764401614665985, -0.035813603550195694, -0.09212058037519455, 0.11862238496541977, 0.09736494719982147, 0.2948976159095764, 0.013729391619563103, -0.1338668018579483, -0.2598082721233368, 0.3552680015563965, 0.37223002314567566, 0.0636512041091919, -0.3439749777317047, 0.2925577461719513, -0.4009212255477905, 0.18285243213176727, 0.016919249668717384, 0.3256886303424835, 0.22410523891448975, 0.36912304162979126, -0.28926604986190796, -0.3230036795139313, 0.5461323857307434, -0.804162323474884, -0.358165442943573, 0.018715204671025276, -0.12052173912525177, -0.007166610565036535, -0.08189412206411362, -0.3705403804779053, 0.08378984779119492, 0.37559574842453003, -0.10939624905586243, 0.03163190558552742, 0.07404965162277222, 0.08921752870082855, 0.1829012930393219, -0.08855532854795456, 0.17104262113571167, 0.20660613477230072, -0.0825919359922409, 0.2809373736381531, -0.32310447096824646 ]
https://github.com/huggingface/datasets/issues/2583
Error iteration over IterableDataset using Torch DataLoader
Thank you for that and the example! What you said makes total sense; I just somehow missed that and assumed HF IterableDataset was a subclass of Torch IterableDataset.
## Describe the bug I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler. I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me. ## Steps to reproduce the bug 1. Does not work. ```python >>> from datasets import load_dataset >>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True) >>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4) >>> dataloader.sampler <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> >>> for batch in dataloader: ... print(batch) ``` 2. Works. ```python import torch from torch.utils.data import Dataset, IterableDataset, DataLoader class CustomIterableDataset(IterableDataset): 'Characterizes a dataset for PyTorch' def __init__(self, data): 'Initialization' self.data = data def __iter__(self): return iter(self.data) data = list(range(12)) dataset = CustomIterableDataset(data) dataloader = DataLoader(dataset, batch_size=4) print("dataloader: ", dataloader.sampler) for batch in dataloader: print(batch) ``` ## Expected results To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different. dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50> tensor([0, 1, 2, 3]) tensor([4, 5, 6, 7]) tensor([ 8, 9, 10, 11]) ## Actual results <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data index = self._next_index() # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__ for idx in self.sampler: File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__ return iter(range(len(self.data_source))) TypeError: object of type 'IterableDataset' has no len() ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: '1.8.1.dev0' - Platform: Linux - Python version: Python 3.6.8 - PyArrow version: '3.0.0'
28
Error iteration over IterableDataset using Torch DataLoader ## Describe the bug I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler. I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me. ## Steps to reproduce the bug 1. Does not work. ```python >>> from datasets import load_dataset >>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True) >>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4) >>> dataloader.sampler <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> >>> for batch in dataloader: ... print(batch) ``` 2. Works. ```python import torch from torch.utils.data import Dataset, IterableDataset, DataLoader class CustomIterableDataset(IterableDataset): 'Characterizes a dataset for PyTorch' def __init__(self, data): 'Initialization' self.data = data def __iter__(self): return iter(self.data) data = list(range(12)) dataset = CustomIterableDataset(data) dataloader = DataLoader(dataset, batch_size=4) print("dataloader: ", dataloader.sampler) for batch in dataloader: print(batch) ``` ## Expected results To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different. dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50> tensor([0, 1, 2, 3]) tensor([4, 5, 6, 7]) tensor([ 8, 9, 10, 11]) ## Actual results <torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208> ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data index = self._next_index() # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__ for idx in self.sampler: File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__ return iter(range(len(self.data_source))) TypeError: object of type 'IterableDataset' has no len() ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: '1.8.1.dev0' - Platform: Linux - Python version: Python 3.6.8 - PyArrow version: '3.0.0' Thank you for that and the example! What you said makes total sense; I just somehow missed that and assumed HF IterableDataset was a subclass of Torch IterableDataset.
[ -0.17598839104175568, -0.33258265256881714, -0.012141015380620956, 0.2365848422050476, 0.1552753895521164, 0.020412376150488853, 0.43117448687553406, 0.0018050287617370486, -0.16896097362041473, 0.24600963294506073, 0.09634552150964737, 0.24420931935310364, -0.33548101782798767, -0.406596839427948, -0.24957726895809174, -0.21472778916358948, 0.08618004620075226, -0.21722015738487244, -0.2279186248779297, -0.08439398556947708, -0.15839561820030212, -0.03149557113647461, -0.23817643523216248, -0.03344672545790672, -0.021350815892219543, -0.024418402463197708, -0.12059852480888367, 0.009426765143871307, 0.08263275772333145, -0.5168218612670898, 0.41323763132095337, 0.07846739888191223, 0.5836470127105713, 0.5928800702095032, -0.00012130137474741787, 0.08044078946113586, 0.5695521235466003, -0.14884786307811737, -0.34067538380622864, 0.033983100205659866, 0.18531012535095215, 0.12311206758022308, 0.18922939896583557, -0.25030386447906494, 0.00856360699981451, -0.13734552264213562, 0.04133287072181702, -0.44291186332702637, 0.02774513140320778, 0.09113851189613342, 0.12735103070735931, 0.14044657349586487, -0.21520979702472687, -0.1551947444677353, 0.08733932673931122, 0.08384337276220322, -0.06600605696439743, 0.3676382005214691, 0.6034709215164185, 0.14620231091976166, -0.2805483043193817, 0.10235284268856049, -0.0515720508992672, 0.14463266730308533, 0.20253410935401917, -0.20651447772979736, -0.15180723369121552, -0.14113104343414307, 0.01658495143055916, 0.1377263367176056, 0.42965105175971985, -0.36472275853157043, -0.2566860318183899, -0.21343407034873962, -0.09083700180053711, -0.008176171220839024, -0.05156197398900986, 0.24559390544891357, -0.25176018476486206, -0.10191318392753601, -0.10535220056772232, 0.29457569122314453, -0.2935190498828888, 0.15060503780841827, 0.12089275568723679, 0.06075609475374222, -0.06054233759641647, 0.4181460440158844, -0.025809453800320625, -0.04967731982469559, 0.41042715311050415, -0.1466061919927597, 0.1139799952507019, 0.17912723124027252, -0.409812867641449, 0.12157384306192398, -0.0745929479598999, 0.03438632935285568, 0.1090586930513382, 0.22854319214820862, 0.19129975140094757, -0.07218089699745178, 0.2148057371377945, -0.07588349282741547, 0.2809828817844391, 0.21040184795856476, 0.16070441901683807, 0.1309027075767517, -0.048436179757118225, 0.12946325540542603, 0.12071508914232254, -0.043157435953617096, -0.01311937253922224, -0.2782546579837799, 0.3315112292766571, 0.22974444925785065, 0.24273791909217834, 0.021872293204069138, -0.263030081987381, -0.06715558469295502, -0.37721529603004456, -0.04647711664438248, 0.09215173870325089, 0.03120928816497326, -0.06635399162769318, -0.018239395692944527, 0.026031216606497765, 0.21941518783569336, 0.0019597304053604603, -0.13634854555130005, -0.04496745020151138, -0.06343168020248413, -0.23698434233665466, 0.16531138122081757, 0.013812502846121788, -0.525913655757904, 0.21787631511688232, 0.07431989163160324, 0.12404228746891022, 0.09819072484970093, 0.1407570242881775, -0.15383106470108032, 0.08765185624361038, -0.18867874145507812, 0.10858329385519028, 0.293715238571167, 0.09096632897853851, 0.37019917368888855, 0.17034786939620972, 0.3358135521411896, -0.21395090222358704, -0.43116945028305054, -0.004114411771297455, 0.13150550425052643, -0.1349410116672516, 0.14840124547481537, -0.16619233787059784, 0.013972622342407703, 0.35923007130622864, -0.08629950135946274, 0.2563606798648834, -0.3309459090232849, 0.08548950403928757, -0.3074100613594055, -0.1566837728023529, 0.32015061378479004, -0.5023244619369507, -0.009421538561582565, 0.0944095179438591, -0.1242312490940094, 0.45208436250686646, 0.16446678340435028, -0.3807598054409027, 0.35968512296676636, -0.4563368260860443, -0.002249354962259531, 0.003712879493832588, -0.4484595060348511, -0.4353862702846527, 0.2547228932380676, 0.06006881594657898, 0.2916576862335205, 0.17571522295475006, 0.044359419494867325, 0.42816078662872314, -0.32416170835494995, 0.17888416349887848, 0.018160583451390266, -0.23640282452106476, -0.1766934096813202, -0.30590009689331055, 0.06542983651161194, 0.32229241728782654, 0.12153809517621994, 0.07876453548669815, 0.2113109827041626, -0.0018347434233874083, 0.03645366057753563, 0.2559022903442383, -0.16226054728031158, 0.1733243763446808, 0.27126815915107727, -0.022152699530124664, 0.10625101625919342, 0.1877066045999527, -0.06390511989593506, -0.38269227743148804, 0.19025419652462006, -0.03414405882358551, 0.025288384407758713, 0.024826588109135628, -0.035797495394945145, 0.07464268058538437, 0.1515568345785141, -0.40891599655151367, -0.19567102193832397, 0.02070046029984951, 0.3267153203487396, 0.24016287922859192, -0.34108659625053406, 0.05102561041712761, 0.17793254554271698, -0.3679125905036926, -0.09054145216941833, -0.6530373096466064, -0.015755552798509598, 0.1605355143547058, -0.2572541832923889, 0.006690280977636576, 0.007865660823881626, 0.2089659869670868, -0.20636743307113647, -0.09491855651140213, 0.214793398976326, -0.12380602955818176, -0.12815696001052856, -0.17848795652389526, -0.010511861182749271, 0.0613335445523262, -0.20365944504737854, -0.003343277843669057, 0.3811858594417572, 0.22065573930740356, -0.16431491076946259, 0.15714095532894135, 0.4330126643180847, -0.13789772987365723, 0.4838740825653076, -0.07346555590629578, -0.0011854771291837096, 0.05471349135041237, 0.20821653306484222, -0.4597418010234833, 0.14478571712970734, 0.250141441822052, -0.062213994562625885, 0.4288070499897003, -0.19781596958637238, -0.36332184076309204, 0.0964464470744133, -0.06512418389320374, -0.016503792256116867, -0.13323265314102173, 0.17621251940727234, -0.28312477469444275, 0.08376123756170273, 0.13753722608089447, -0.015924939885735512, 0.6980893611907959, 0.004887053743004799, 0.02115577459335327, -0.10675910115242004, 0.12121684104204178, -0.06639958918094635, 0.017251117154955864, 0.23966394364833832, 0.08117931336164474, 0.17260771989822388, 0.09104997664690018, -0.12290463596582413, -0.05047700181603432, -0.43839800357818604, -0.1312052309513092, 0.19988995790481567, -0.08025823533535004, 0.30072447657585144, 0.09545566141605377, -0.13905559480190277, -0.380645751953125, -0.5877687335014343, 0.018512969836592674, -0.2711995542049408, -0.23294855654239655, 0.5140381455421448, 0.07633223384618759, 0.11004101485013962, 0.04380517452955246, 0.12408671528100967, 0.33237603306770325, -0.10419755429029465, -0.015929343178868294, -0.03921160846948624, -0.36596009135246277, -0.03146069496870041, -0.023669740185141563, -0.6017322540283203, 0.3704042136669159, 0.13439153134822845, 0.040474846959114075, -0.47920116782188416, 0.1423616260290146, 0.04735913500189781, -0.066191665828228, 0.07064681500196457, 0.40863272547721863, -0.05046282336115837, 0.293843150138855, -0.20238712430000305, 0.30721810460090637, -0.09485248476266861, 0.0008259759051725268, 0.0853474959731102, -0.09316693991422653, -0.0026090270839631557, 0.14635786414146423, -0.03688664361834526, -0.2398693859577179, -0.2074587345123291, -0.08613358438014984, 0.07317996025085449, -0.008196261711418629, 0.16517981886863708, 0.02423711307346821, 0.09530344605445862, 0.4552522897720337, -0.1504250466823578, -0.06396009027957916, -0.41666367650032043, 0.1938694268465042, -0.333546906709671, -0.28590914607048035, -0.2267332822084427, -0.22947974503040314, 0.24978110194206238, 0.3717748522758484, -0.30562296509742737, -0.19610609114170074, -0.060211680829524994, 0.22527751326560974, -0.08177109062671661, -0.042503438889980316, 0.20502687990665436, -0.12811148166656494, 0.0889524593949318, -0.14572131633758545, -0.10337653011083603, 0.06909620016813278, -0.2425733208656311, 0.3543994426727295, 0.28956520557403564, 0.5595617890357971, 0.13785050809383392, 0.952619731426239, 0.462544322013855, -0.1511877030134201, 0.204190194606781, 0.008010867983102798, -0.13840869069099426, -0.08577485382556915, -0.38426443934440613, 0.21528270840644836, -0.210037961602211, -0.31230470538139343, 0.16608040034770966, -0.21496988832950592, -0.10470368713140488, 0.08273180574178696, 0.09725403040647507, -0.008991417475044727, -0.10375012457370758, 0.17559760808944702, -0.5570784211158752, 0.19041579961776733, -0.14686034619808197, 0.24267295002937317, -0.28692275285720825, -0.1258832961320877, -0.03696610406041145, 0.04244396090507507, 0.24592149257659912, 0.05157354474067688, -0.18931038677692413, 0.01908673346042633, -0.6127880811691284, 0.3754480183124542, 0.17678621411323547, 0.6406636834144592, 0.1874253749847412, -0.11556417495012283, 0.18792188167572021, 0.00491558201611042, 0.7799474596977234, -0.10748818516731262, -0.2398388683795929, -0.0036269472911953926, -0.16696499288082123, -0.7163996696472168, -0.4133671522140503, -0.14693999290466309, 0.7751924991607666, 0.15553878247737885, -0.07514585554599762, -0.1394631564617157, -0.03318013250827789, 0.1941220760345459, 0.07339299470186234, -0.20688581466674805, -0.16901369392871857, -0.11875499784946442, -0.3793283700942993, -0.08949168771505356, -0.2840985953807831, 0.05170008912682533, 0.19061806797981262, -0.08544106781482697, 0.061273243278265, -0.26140841841697693, -0.014388708397746086, 0.05835482105612755, -0.08949863910675049, 0.1643390655517578, -0.21373070776462555, 0.2124439775943756, -0.012210868299007416, 0.28405845165252686, 0.48792529106140137, 0.2832309305667877, -0.00356411118991673, -0.5100497603416443, 0.2887408137321472, -0.18306899070739746, 0.03784850984811783, 0.20618461072444916, -0.1886104941368103, 0.08036155998706818, -0.1013224720954895, -0.02139599248766899, -0.2109726220369339, -0.09348911046981812, 0.30206283926963806, 0.05301260948181152, -0.6308019161224365, -0.5626425743103027, 0.17281179130077362, 0.2680610418319702, 0.05267997458577156, 0.6681531667709351, -0.39850953221321106, -0.2715952396392822, 0.27770018577575684, 0.08388390392065048, 0.7267506718635559, 0.14852547645568848, -0.05574774742126465, 0.23261477053165436, 0.20901606976985931, 0.018676292151212692, 0.3115615248680115, 0.23696741461753845, -0.3453315496444702, -0.22724464535713196, -0.026991603896021843, -0.18979865312576294, 0.12217776477336884, 0.18264366686344147, -0.06328203529119492, 0.33182379603385925, -0.14366012811660767, 0.045979682356119156, 0.12700703740119934, -0.12689273059368134, -0.2129751443862915, -0.13387882709503174, 0.09565117210149765, 0.0851188525557518, 0.005765728652477264, 0.25649043917655945, -0.17285272479057312, -0.09265781939029694, 0.06687930226325989, -0.15552447736263275, -0.2618390917778015, 0.04439008608460426, -0.22300037741661072, 0.09858468174934387, 0.24561840295791626, -0.5232536196708679, 0.05012283846735954, 0.21589438617229462, 0.352230042219162, -0.362772673368454, -0.002662668703123927, -0.029419973492622375, 0.11824283003807068, -0.023342741653323174, -0.20290391147136688, -0.20772290229797363, 0.48709702491760254, 0.040551114827394485, 0.09955156594514847, 0.32059863209724426, 0.07133429497480392, -0.4681003987789154, -0.22823920845985413, 0.296656996011734, 0.47719869017601013, -0.5392913818359375, -0.23196958005428314, -0.25082769989967346, -0.21991920471191406, -0.23634280264377594, 0.010444988496601582, 0.02068900875747204, -0.28768226504325867, 0.19411145150661469, -0.17438216507434845, -0.12590745091438293, 0.09192650765180588, 0.5244771242141724, 0.33162134885787964, -0.04920823499560356, 0.46102187037467957, 0.12727822363376617, -0.07801894098520279, 0.01729987934231758, -0.033795394003391266, 0.27422982454299927, -0.603999674320221, 0.33209705352783203, -0.3019654154777527, 0.5657224059104919, -0.047774992883205414, 0.3233404755592346, 0.014581605792045593, 0.06453459709882736, -0.3575259745121002, -0.25253188610076904, -0.2616003453731537, -0.10557224601507187, 0.0183103010058403, 0.26057854294776917, 0.05244279280304909, 0.12131424993276596, 0.07276540994644165, -0.08296646177768707, -0.1959933340549469, -0.18018493056297302, -0.02059573121368885, 0.1617281436920166, 0.15081781148910522, 0.06201843172311783, -0.10457277297973633, 0.3312746584415436, -0.05368264019489288, 0.40632787346839905, 0.01992524042725563, -0.15047292411327362, -0.02763250470161438, 0.16993482410907745, 0.06052107363939285, -0.10470781475305557, -0.16922347247600555, -0.20600122213363647, 0.00635450379922986, -0.06021195650100708, 0.2894996404647827, 0.2464601993560791, 0.039910491555929184, 0.14236165583133698, 0.31735551357269287, 0.043183907866477966, -0.08609496057033539, 0.09589479863643646, 0.10156161338090897, 0.33742648363113403, 0.17748045921325684, 0.13566835224628448, 0.11205025017261505, -0.17338065803050995, -0.32013237476348877, 0.12381143867969513, 0.2855199873447418, 0.22080694139003754, -0.06243361905217171, -0.580786943435669, 0.1231827661395073, 0.02367304265499115, 0.1875419169664383, 0.36308369040489197, -0.36317041516304016, -0.10949833691120148, 0.09908869862556458, 0.055639203637838364, 0.05120868235826492, -0.07024829089641571, -0.18324775993824005, 0.03339720517396927, 0.022657200694084167, 0.2685617208480835, -0.08713938295841217, -0.2271842211484909, 0.16491307318210602, -0.011057168245315552, 0.34742850065231323, -0.13776107132434845, 0.10774951428174973, 0.36730894446372986, 0.15318788588047028, 0.01950356550514698, 0.3287827670574188, 0.07383748143911362, 0.062176141887903214, 0.4536166489124298, 0.04338495805859566, 0.6263987421989441, 0.31339579820632935, -0.2698841392993927, 0.10481753200292587, -0.3597237765789032, -0.13157638907432556, -0.06444606930017471, 0.14289376139640808, 0.2984360158443451, 0.07192477583885193, 0.4628483057022095, -0.17626449465751648, -0.31523850560188293, 0.048758625984191895, -0.24236394464969635, -0.08563855290412903, -0.11423971503973007, -0.3930783271789551, -0.1982114613056183, 0.23661555349826813, -0.027727052569389343, -0.09085875004529953, -0.012065819464623928, 0.18862029910087585, -0.1014317125082016, -0.20595715939998627, -0.5857433080673218, -0.17343786358833313, 0.28391233086586, -0.062401555478572845, -0.12223025411367416, 0.15278317034244537, 0.12454983592033386, 0.1562817245721817, 0.15072013437747955, 0.30550262331962585, 0.4985905885696411, 0.532503068447113, -0.10812880098819733, 0.10503160953521729, -0.15050733089447021, -0.06871141493320465, -0.01578177697956562, 0.17568232119083405, -0.12522141635417938, -0.14409959316253662, 0.4051365256309509, 0.06611458212137222, -0.06067241355776787, 0.3941463530063629, 0.3221776783466339, 0.04345725476741791, -0.23415423929691315, 0.11431561410427094, -0.1278596669435501, 0.06544743478298187, -0.13820311427116394, 0.015658024698495865, -0.39029285311698914, -0.05954190716147423, 0.3030413091182709, -0.3966251313686371, 0.11297602206468582, -0.03893231973052025, 0.026305442675948143, -0.4196697771549225, 0.37585875391960144, 0.32213979959487915, 0.17387878894805908, -0.22130145132541656, -0.14026835560798645, -0.1009964644908905, 0.17925874888896942, -0.24928787350654602, 0.11362731456756592, -0.04607987776398659, 0.3102740943431854, -0.10725919157266617, 0.13170044124126434, 0.19803005456924438, 0.002752445638179779, -0.06394953280687332, 0.7769205570220947, -0.2023661732673645, -0.40614011883735657, 0.00425870344042778, 0.0891181081533432, 0.06590458005666733, -0.48697665333747864, -0.06339024752378464, -0.09672956168651581, 0.03900183364748955, -0.10394356399774551, -0.25709810853004456, 0.27014365792274475, -0.010822772048413754, 0.32186293601989746, 0.17599165439605713, 0.08218260854482651, 0.047204818576574326, -0.039346568286418915, -0.4764401614665985, -0.035813603550195694, -0.09212058037519455, 0.11862238496541977, 0.09736494719982147, 0.2948976159095764, 0.013729391619563103, -0.1338668018579483, -0.2598082721233368, 0.3552680015563965, 0.37223002314567566, 0.0636512041091919, -0.3439749777317047, 0.2925577461719513, -0.4009212255477905, 0.18285243213176727, 0.016919249668717384, 0.3256886303424835, 0.22410523891448975, 0.36912304162979126, -0.28926604986190796, -0.3230036795139313, 0.5461323857307434, -0.804162323474884, -0.358165442943573, 0.018715204671025276, -0.12052173912525177, -0.007166610565036535, -0.08189412206411362, -0.3705403804779053, 0.08378984779119492, 0.37559574842453003, -0.10939624905586243, 0.03163190558552742, 0.07404965162277222, 0.08921752870082855, 0.1829012930393219, -0.08855532854795456, 0.17104262113571167, 0.20660613477230072, -0.0825919359922409, 0.2809373736381531, -0.32310447096824646 ]
https://github.com/huggingface/datasets/issues/2573
Finding right block-size with JSON loading difficult for user
This was actually a second error arising from a too small block-size in the json reader. Finding the right block size is difficult for the layman user
As reported by @thomwolf, while loading a JSON Lines file with "json" loading script, he gets > json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 383)
27
Finding right block-size with JSON loading difficult for user As reported by @thomwolf, while loading a JSON Lines file with "json" loading script, he gets > json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 383) This was actually a second error arising from a too small block-size in the json reader. Finding the right block size is difficult for the layman user
[ 0.0956072136759758, 0.0020218619611114264, -0.22474884986877441, 0.40687301754951477, 0.13413351774215698, -0.08703842014074326, 0.35157862305641174, 0.3959694802761078, 0.505370557308197, 0.4565081000328064, 0.26593467593193054, -0.09846661239862442, 0.022460540756583214, -0.06383876502513885, -0.037977371364831924, -0.25689345598220825, -0.26185980439186096, 0.23197431862354279, 0.15688706934452057, 0.30399033427238464, -0.1997619867324829, 0.2665424644947052, 0.10622769594192505, -0.16091066598892212, 0.22362321615219116, 0.058751821517944336, 0.0914321318268776, 0.0959860160946846, -0.0711928978562355, -0.43594956398010254, -0.044709619134664536, -0.11516881734132767, -0.07432778924703598, 0.44983237981796265, -0.00009959172894014046, 0.02498970925807953, 0.3473541736602783, -0.07285009324550629, -0.4421045780181885, -0.1200120747089386, -0.0604003369808197, -0.5030122995376587, 0.20351627469062805, -0.19933664798736572, -0.02184334769845009, -0.1310320943593979, -0.06684157997369766, -0.10651153326034546, 0.46291103959083557, 0.12208770960569382, 0.37152013182640076, -0.2377004325389862, 0.04564476013183594, 0.036153171211481094, 0.23812179267406464, 0.06372125446796417, 0.04116763919591904, 0.3781583607196808, 0.351641982793808, 0.5234600305557251, 0.10953348875045776, 0.06754358857870102, -0.07116899639368057, -0.02982180379331112, 0.08291538804769516, -0.31869497895240784, 0.2817252278327942, -0.04850378260016441, 0.19416774809360504, 0.24298271536827087, 0.4865901470184326, 0.4166162610054016, -0.047456465661525726, -0.32421615719795227, 0.0322854183614254, 0.1813373863697052, 0.30770421028137207, 0.07953740656375885, -0.2536923289299011, -0.022642554715275764, -0.2651890516281128, -0.06480753421783447, -0.026415720582008362, -0.03692597150802612, -0.048568397760391235, -0.09895183145999908, -0.1725887507200241, -0.034094810485839844, 0.15244774520397186, -0.18617740273475647, -0.028152674436569214, -0.10803884267807007, -0.30909186601638794, -0.06386656314134598, 0.04730197414755821, -0.17213262617588043, 0.17239335179328918, -0.46169862151145935, 0.07376030087471008, 0.01646244525909424, 0.5296998023986816, 0.1309642195701599, 0.1242324635386467, 0.08389510959386826, 0.177636981010437, -0.008172793313860893, -0.03590919449925423, -0.19537733495235443, 0.14943177998065948, 0.27632755041122437, 0.17678722739219666, -0.09238108992576599, -0.27317553758621216, -0.26250559091567993, -0.23824648559093475, 0.042429350316524506, -0.08535508811473846, -0.13233038783073425, -0.008691803552210331, 0.22002196311950684, -0.42939746379852295, -0.05518817901611328, 0.06492941826581955, 0.17276518046855927, 0.06872755289077759, 0.26404139399528503, 0.2109944075345993, -0.03500752151012421, -0.10697934031486511, -0.079666867852211, -0.1454557478427887, 0.0986790806055069, 0.11205913871526718, -0.19248442351818085, 0.21744093298912048, 0.1487838327884674, 0.14837084710597992, -0.15160925686359406, -0.3099972605705261, -0.3423231542110443, 0.14623895287513733, 0.06353102624416351, -0.13485810160636902, 0.265014111995697, 0.18641206622123718, -0.10658445209264755, -0.23690705001354218, -0.12289336323738098, -0.18005648255348206, 0.2556237280368805, -0.22079534828662872, -0.1268770694732666, 0.024280091747641563, 0.3463027775287628, 0.02423413097858429, 0.14293146133422852, -0.16648846864700317, -0.06882117688655853, 0.002722294069826603, -0.17324359714984894, 0.07765872776508331, -0.22820506989955902, 0.04481211677193642, -0.20763757824897766, -0.12216188758611679, 0.1634410172700882, -0.37511494755744934, -0.11200721561908722, 0.1969166398048401, -0.05364786088466644, 0.05949882045388222, 0.305916428565979, -0.20706389844417572, 0.2804146111011505, -0.08690150082111359, -0.11960148066282272, 0.2914658784866333, 0.11734387278556824, -0.2984394431114197, 0.5185747146606445, -0.12997332215309143, 0.24125422537326813, 0.20934711396694183, -0.029225656762719154, 0.12712140381336212, 0.0056952303275465965, 0.3884540796279907, 0.28637993335723877, 0.1438802033662796, 0.2596036493778229, -0.30904725193977356, -0.1199648529291153, 0.0019169929437339306, 0.14288005232810974, -0.02487989142537117, -0.2754833400249481, -0.09846341609954834, -0.007682743016630411, 0.12415760010480881, -0.22618965804576874, -0.0808178037405014, 0.22298403084278107, -0.006351154297590256, -0.19714683294296265, 0.18225187063217163, 0.2619442343711853, -0.1677096039056778, 0.02420666441321373, -0.05061151832342148, -0.20763950049877167, 0.05576077848672867, 0.012183018960058689, -0.07248043268918991, -0.14527994394302368, 0.14707165956497192, 0.20623473823070526, 0.30159732699394226, 0.11803235113620758, 0.12322313338518143, -0.2187987118959427, 0.10078364610671997, 0.06694773584604263, 0.07898010313510895, 0.04601798951625824, -0.2172987014055252, 0.04093047231435776, -0.056874968111515045, -0.09332001209259033, 0.26060405373573303, -0.08125889301300049, -0.0284129548817873, -0.3079865276813507, -0.20693916082382202, 0.003405502298846841, 0.14636003971099854, -0.0012324078707024455, -0.16605469584465027, -0.17169471085071564, -0.01426406018435955, 0.4521523714065552, 0.1640969216823578, 0.34256845712661743, 0.048832088708877563, -0.10352738201618195, -0.019207797944545746, 0.33293259143829346, -0.15278536081314087, 0.09345566481351852, -0.014550847932696342, -0.29979488253593445, 0.4019198417663574, 0.0413825549185276, 0.12225373089313507, -0.032163120806217194, 0.3996908366680145, 0.5543021559715271, -0.04446182772517204, -0.026263875886797905, -0.16007807850837708, -0.0489269495010376, 0.4573385417461395, -0.2258950024843216, 0.0071737864054739475, 0.35647279024124146, 0.1343529373407364, -0.19635236263275146, -0.10522258281707764, 0.11822538077831268, 0.12990246713161469, 0.1888306587934494, -0.06106819584965706, -0.14877253770828247, 0.4033782184123993, -0.47651514410972595, 0.17590270936489105, -0.05827891826629639, 0.19232989847660065, 0.22823698818683624, 0.1666170060634613, -0.12964309751987457, -0.1703411042690277, -0.2919541299343109, -0.15980155766010284, 0.141459658741951, -0.21601195633411407, -0.038391437381505966, -0.1749047338962555, 0.017143649980425835, 0.11600753664970398, -0.19411620497703552, 0.06344722211360931, -0.2764543890953064, 0.18648409843444824, 0.08579999953508377, -0.3864559829235077, -0.23146246373653412, -0.13422462344169617, 0.4629591107368469, -0.12043705582618713, 0.3889084756374359, -0.2953086793422699, -0.08413805067539215, -0.2262495756149292, 0.25328680872917175, 0.45521774888038635, -0.09191262722015381, 0.08161316066980362, -0.2749210298061371, 0.04617971181869507, 0.3471119999885559, -0.0816962942481041, -0.010790297761559486, 0.022841552272439003, -0.06004980951547623, 0.05603049695491791, 0.4496857821941376, 0.08361103385686874, 0.0302212405949831, -0.15001270174980164, -0.07448309659957886, -0.2961721420288086, 0.26502200961112976, -0.0021036502439528704, -0.10489844530820847, -0.3383951783180237, -0.2061033844947815, 0.10786890238523483, -0.397512286901474, 0.44123393297195435, 0.23215757310390472, 0.21205221116542816, -0.3862467110157013, 0.2198590487241745, 0.15081731975078583, 0.18895281851291656, 0.3159150183200836, -0.20857177674770355, -0.43344998359680176, 0.11122316867113113, -0.23296676576137543, -0.42280513048171997, 0.1300274133682251, 0.13399048149585724, 0.049861062318086624, -0.26676222681999207, -0.48913678526878357, 0.3003759980201721, -0.052156947553157806, -0.2767091393470764, -0.188961923122406, -0.19784462451934814, 0.24480204284191132, 0.008173497393727303, -0.19183145463466644, 0.015229047276079655, -0.23566380143165588, 0.0061500053852796555, 0.14233916997909546, 0.14802582561969757, -0.18868397176265717, 0.6826392412185669, -0.010388034395873547, 0.044623348861932755, 0.13030703365802765, 0.07064440101385117, 0.06574647128582001, 0.3156469166278839, 0.024076582863926888, -0.28534018993377686, 0.3214402496814728, 0.19704625010490417, 0.14345857501029968, -0.0817008912563324, 0.28952789306640625, 0.03715285658836365, -0.21428216993808746, -0.14105385541915894, -0.42892423272132874, -0.2734738886356354, -0.24034902453422546, 0.36846086382865906, -0.05897960811853409, -0.39681699872016907, -0.21048901975154877, 0.20315183699131012, -0.17318497598171234, 0.0008151832153089345, -0.11522497236728668, 0.13869152963161469, 0.19254988431930542, -0.005894011817872524, -0.170982226729393, -0.07648894935846329, -0.29062172770500183, 0.5571379661560059, 0.08538923412561417, 0.05335437133908272, -0.01645970344543457, -0.06851373612880707, 0.17355389893054962, -0.31878361105918884, 0.3556576073169708, 0.057547714561223984, -0.07625825703144073, 0.04245379567146301, 0.04486489295959473, -0.2691236734390259, -0.07342380285263062, 0.07145033031702042, 0.06392797082662582, 0.33731651306152344, 0.09444620460271835, -0.33519771695137024, 0.0434359572827816, 0.07787419110536575, 0.03352075815200806, -0.09207647293806076, -0.43553683161735535, -0.19809889793395996, -0.3307768702507019, -0.358337938785553, 0.02883117087185383, -0.1152273416519165, 0.18730968236923218, 0.09755686670541763, -0.40583908557891846, 0.26246172189712524, -0.19722454249858856, -0.05974042788147926, 0.20774927735328674, -0.09002715349197388, -0.14619001746177673, 0.06064579263329506, 0.055664967745542526, 0.21915516257286072, 0.4232970178127289, 0.5937590599060059, 0.3618925213813782, 0.14258714020252228, 0.3213866949081421, -0.20365962386131287, 0.21215985715389252, 0.2889629900455475, 0.12376765161752701, -0.05426093935966492, -0.025348111987113953, 0.3709650933742523, 0.1296096295118332, -0.2740960717201233, 0.08584963530302048, -0.03094266541302204, -0.11933683604001999, -0.1653837412595749, 0.2441495805978775, -0.2641584277153015, 0.1816566437482834, 0.1978205293416977, -0.2616371810436249, -0.1393803209066391, 0.39201635122299194, 0.012142516672611237, 0.9516816139221191, 0.011781326495110989, -0.0407244935631752, 0.20595677196979523, -0.6339951753616333, 0.27034157514572144, -0.5762805938720703, 0.09212064743041992, -0.26775628328323364, 0.40312087535858154, 0.09431048482656479, -0.10345520079135895, 0.04419209808111191, 0.050129298120737076, -0.29258644580841064, -0.09534046798944473, -0.25732752680778503, -0.19213911890983582, -0.3197348117828369, 0.3754505515098572, -0.3018943965435028, -0.09327313303947449, -0.2033960521221161, 0.2914937734603882, -0.13134294748306274, 0.005947877652943134, -0.10167566686868668, -0.09612968564033508, -0.2755259573459625, -0.30083516240119934, -0.25411418080329895, 0.18009504675865173, 0.07812262326478958, 0.026045139878988266, 0.1926259994506836, -0.07246165722608566, -0.011842475272715092, -0.33539560437202454, -0.08610828965902328, 0.1424122005701065, -0.0768292099237442, 0.2569778561592102, -0.2475290298461914, -0.10778705030679703, 0.0033484676387161016, 0.20063893496990204, 0.16158808767795563, -0.3208276927471161, -0.18109673261642456, 0.07098900526762009, -0.11862403154373169, -0.12176146358251572, -0.1446334719657898, -0.0039852275513112545, -0.4416053891181946, -0.30482760071754456, -0.369039922952652, -0.14542295038700104, -0.0676659420132637, 0.017794856801629066, 0.3172253668308258, 0.1601397693157196, 0.06667555123567581, -0.23746712505817413, 0.17744795978069305, -0.2549624443054199, -0.25234872102737427, -0.08094604313373566, 0.2365005612373352, -0.027906375005841255, 0.36305925250053406, 0.01311249565333128, -0.2868364453315735, -0.30171701312065125, 0.05834844335913658, 0.3081490695476532, -0.0034955739974975586, 0.14878322184085846, -0.08472883701324463, -0.16034117341041565, 0.09760405868291855, 0.09242516756057739, 0.13856413960456848, 0.06124003231525421, 0.21694688498973846, -0.32123976945877075, -0.24780146777629852, 0.20879103243350983, 0.01371651329100132, 0.21620714664459229, 0.007369025144726038, -0.04637127369642258, -0.09441886097192764, 0.21173270046710968, -0.4128861725330353, -0.0015193121507763863, -0.1317283660173416, -0.05688871815800667, -0.36764606833457947, -0.09799662977457047, -0.12116997689008713, 0.0854506716132164, 0.2758598029613495, 0.31633099913597107, -0.19313190877437592, -0.3425484895706177, -0.04585159942507744, 0.02357865683734417, 0.059858061373233795, 0.019914347678422928, -0.08805719017982483, 0.004693211521953344, -0.03128310292959213, -0.0007757015409879386, 0.16499561071395874, -0.2054678499698639, -0.07883742451667786, -0.07329707592725754, 0.09965004026889801, 0.016274262219667435, -0.0511498786509037, 0.24485215544700623, -0.1358739733695984, 0.6824116110801697, -0.08615705370903015, 0.04785911366343498, -0.061426643282175064, 0.12099222093820572, -0.23351356387138367, 0.29434433579444885, 0.05738957226276398, 0.23902063071727753, 0.3425367474555969, -0.08673512190580368, 0.29979899525642395, -0.17942658066749573, -0.13639521598815918, 0.3500252068042755, -0.2331956923007965, 0.18836618959903717, -0.148979052901268, 0.3308044672012329, 0.03687777742743492, -0.03386024758219719, 0.060036320239305496, -0.004537354223430157, -0.1960623413324356, 0.08690229803323746, -0.046310387551784515, -0.20426160097122192, -0.03843635320663452, 0.15734846889972687, 0.11589539796113968, -0.003534442512318492, -0.24111691117286682, 0.03615959361195564, -0.3862704932689667, -0.18311698734760284, 0.13989242911338806, -0.08151160180568695, 0.37401729822158813, 0.05272937938570976, -0.04174680635333061, -0.14098846912384033, 0.16492882370948792, 0.34729209542274475, -0.22075597941875458, -0.33896374702453613, 0.31108900904655457, 0.3915056586265564, -0.11169659346342087, 0.29048261046409607, 0.3967679440975189, -0.26457154750823975, 0.005297503899782896, 0.30958792567253113, -0.44202920794487, 0.06611032038927078, -0.29671093821525574, -0.046739041805267334, -0.311615914106369, -0.12246128916740417, -0.24486197531223297, 0.1646091639995575, -0.06350741535425186, -0.026844196021556854, -0.23675906658172607, 0.2867298126220703, -0.23560912907123566, 0.08392228186130524, 0.08723356574773788, -0.3086821138858795, 0.09866918623447418, -0.3815235495567322, 0.19713467359542847, 0.27082765102386475, -0.11814708262681961, 0.2543821334838867, -0.18712107837200165, 0.36448830366134644, 0.21293404698371887, -0.019781701266765594, -0.07838348299264908, -0.07133753597736359, -0.1270236074924469, -0.17732767760753632, 0.4721391201019287, 0.40941211581230164, 0.08813319355249405, 0.12953153252601624, 0.3142966330051422, -0.3490210473537445, 0.19093823432922363, 0.1290358155965805, 0.018768133595585823, -0.14864636957645416, 0.05498538166284561, -0.2535211741924286, -0.15470236539840698, -0.2582300901412964, -0.33179953694343567, -0.36162543296813965, -0.3557007610797882, -0.2150493860244751, 0.024076085537672043, 0.0756877213716507, -0.05657022446393967, 0.15219458937644958, -0.011786796152591705, 0.40910258889198303, 0.08521758764982224, -0.11887315660715103, 0.19340091943740845, -0.08156100660562515, -0.045048829168081284, 0.17816311120986938, -0.35059618949890137, 0.03938215970993042, -0.014668003655970097, 0.11550281941890717, 0.1772552877664566, -0.013780790381133556, 0.1960996836423874, 0.3159480690956116, -0.058847974985837936, -0.04660307988524437, -0.23276354372501373, 0.0024330068845301867, 0.48333045840263367, -0.1535354107618332, -0.05134870484471321, -0.08875966817140579, 0.2628226578235626, -0.28043481707572937, 0.27327218651771545, -0.07505232095718384, 0.020909279584884644, 0.05706330016255379, 0.2809639573097229, 0.2937183678150177, 0.0545736588537693, 0.34087446331977844, -0.1181643083691597, -0.20743133127689362, 0.014819328673183918, -0.04825557768344879, 0.091216079890728, 0.3455093502998352, 0.11855120211839676, 0.35307833552360535, -0.011294134892523289, 0.09725463390350342, -0.0652899518609047, 0.10413374751806259, -0.5952876806259155, 0.0762314721941948, -0.15693733096122742, -0.1008727103471756, -0.14793460071086884, 0.21448397636413574, 0.18926690518856049, 0.07806850224733353, 0.03988583758473396, -0.22508125007152557, -0.23691509664058685, 0.1293318122625351, 0.23316839337348938, 0.105292409658432, -0.18173666298389435, 0.24947278201580048, 0.01622629351913929, -0.2458006739616394, -0.0074246427975595, -0.4358266592025757, 0.2334849089384079, 0.2724747657775879, -0.07109110802412033, 0.031200021505355835, 0.25234049558639526, 0.039132799953222275, -0.02485877461731434, -0.10256340354681015, 0.32518839836120605, 0.10133803635835648, 0.03392787650227547, -0.19108359515666962, -0.18689469993114471 ]
https://github.com/huggingface/datasets/issues/2569
Weights of model checkpoint not initialized for RobertaModel for Bertscore
Hi @suzyahyah, thanks for reporting. The message you get is indeed not an error message, but a warning coming from Hugging Face `transformers`. The complete warning message is: ``` Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.dense.weight', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.bias', 'lm_head.layer_norm.weight'] - This IS expected if you are initializing RobertaModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model). - This IS NOT expected if you are initializing RobertaModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model). ``` In this case, this behavior IS expected and you can safely ignore the warning message. The reason is that you are just using RoBERTa to get the contextual embeddings of the input sentences/tokens, thus leaving away its head layer, whose weights are ignored. Feel free to reopen this issue if you need further explanations.
When applying bertscore out of the box, ```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']``` Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html ``` from datasets import load_metric metric = load_metric('bertscore') # Example of typical usage for batch in dataset: inputs, references = batch predictions = model(inputs) metric.add_batch(predictions=predictions, references=references) score = metric.compute(lang="en") #score = metric.compute(model_type="roberta-large") # gives the same error ``` I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo.... ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27 - Python version: 3.9.5 - PyArrow version: 3.0.0
167
Weights of model checkpoint not initialized for RobertaModel for Bertscore When applying bertscore out of the box, ```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']``` Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html ``` from datasets import load_metric metric = load_metric('bertscore') # Example of typical usage for batch in dataset: inputs, references = batch predictions = model(inputs) metric.add_batch(predictions=predictions, references=references) score = metric.compute(lang="en") #score = metric.compute(model_type="roberta-large") # gives the same error ``` I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo.... ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27 - Python version: 3.9.5 - PyArrow version: 3.0.0 Hi @suzyahyah, thanks for reporting. The message you get is indeed not an error message, but a warning coming from Hugging Face `transformers`. The complete warning message is: ``` Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.dense.weight', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.bias', 'lm_head.layer_norm.weight'] - This IS expected if you are initializing RobertaModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model). - This IS NOT expected if you are initializing RobertaModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model). ``` In this case, this behavior IS expected and you can safely ignore the warning message. The reason is that you are just using RoBERTa to get the contextual embeddings of the input sentences/tokens, thus leaving away its head layer, whose weights are ignored. Feel free to reopen this issue if you need further explanations.
[ -0.059550341218709946, -0.36452993750572205, 0.09010986238718033, 0.1289697140455246, 0.4273764193058014, 0.07482700794935226, 0.2718203663825989, 0.12423470616340637, 0.12511076033115387, 0.13339757919311523, -0.14913855493068695, 0.21721382439136505, -0.1455291211605072, -0.0643484815955162, -0.07166112214326859, -0.2196488380432129, 0.14321893453598022, -0.049944061785936356, -0.20941568911075592, -0.17641285061836243, -0.13026916980743408, 0.18646471202373505, -0.20543307065963745, 0.12439893931150436, -0.3585759699344635, 0.1707724630832672, 0.028424639254808426, 0.39523348212242126, 0.056676432490348816, -0.4421778917312622, 0.4252815842628479, -0.07058922946453094, 0.1829727590084076, 0.48779889941215515, -0.00012287140998523682, 0.006460505072027445, 0.22131893038749695, -0.05408715084195137, -0.031310196965932846, -0.17735958099365234, 0.09162818640470505, -0.2407541424036026, 0.12993809580802917, -0.08467543125152588, 0.08507268875837326, 0.10984975099563599, -0.09713143110275269, -0.09177723526954651, 0.4431145489215851, -0.02038179710507393, 0.07553418725728989, 0.6024701595306396, 0.07637292891740799, -0.14947262406349182, 0.046066105365753174, -0.13142813742160797, 0.03135308995842934, 0.7358219027519226, -0.15314370393753052, -0.02085459977388382, -0.09856806695461273, 0.3127400577068329, 0.10292797535657883, 0.32584887742996216, 0.24333204329013824, -0.005074521992355585, 0.08904845267534256, -0.0216680895537138, -0.3173094391822815, 0.3472054898738861, -0.09817210584878922, -0.10466887056827545, -0.21882504224777222, -0.22436381876468658, 0.08870141208171844, -0.24746981263160706, 0.12574562430381775, -0.024699103087186813, 0.03812652826309204, 0.17200423777103424, -0.266701340675354, -0.06690714508295059, 0.06769523024559021, -0.08495254069566727, 0.12942181527614594, -0.10388440638780594, -0.3312370479106903, 0.04944942891597748, 0.5595439672470093, 0.01940644532442093, -0.4946100115776062, -0.03328145295381546, 0.00935197900980711, 0.12921473383903503, -0.19817374646663666, 0.0252225361764431, 0.25621268153190613, 0.30807915329933167, 0.20156054198741913, -0.044169776141643524, 0.09022058546543121, 0.047565896064043045, -0.16662676632404327, 0.02274114452302456, 0.06567803770303726, 0.37088286876678467, -0.10950816422700882, -0.04244539514183998, 0.19510886073112488, 0.45218104124069214, 0.2514285147190094, -0.12598204612731934, -0.20472241938114166, -0.12008558958768845, 0.07826503366231918, -0.11536790430545807, 0.06222043186426163, -0.15269991755485535, -0.43660929799079895, -0.024324534460902214, -0.04797302559018135, -0.2746989130973816, 0.4581756889820099, 0.24768725037574768, -0.03650021180510521, 0.20261026918888092, -0.1451326608657837, 0.32586368918418884, -0.19851620495319366, 0.023669522255659103, -0.19167038798332214, 0.035991862416267395, -0.5499863028526306, 0.11294020712375641, 0.15253980457782745, -0.5149907469749451, 0.3871520757675171, 0.012197514064610004, 0.4898633360862732, 0.047731854021549225, -0.13632531464099884, -0.06477624922990799, 0.07563904672861099, 0.30327746272087097, -0.05558237060904503, 0.30491140484809875, 0.34830355644226074, 0.2483801245689392, -0.14361758530139923, -0.11274274438619614, -0.32229337096214294, -0.4240390360355377, 0.33035364747047424, -0.024922078475356102, -0.20130154490470886, -0.002115185372531414, -0.6301624774932861, 0.1443106085062027, 0.061641134321689606, 0.03863371163606644, -0.08295031636953354, 0.13722817599773407, -0.10973174124956131, 0.0338977575302124, 0.4619482457637787, 0.5912771821022034, -0.45593658089637756, -0.38315585255622864, 0.017558623105287552, -0.03730597719550133, 0.2624932527542114, 0.5404409766197205, -0.2662965655326843, 0.24907614290714264, -0.11831555515527725, -0.13417045772075653, -0.09093434363603592, -0.2990626096725464, -0.19871248304843903, -0.11494605988264084, 0.18600039184093475, 0.03293830156326294, 0.10318832844495773, -0.38802632689476013, -0.5773237943649292, -0.17483781278133392, 0.07779370993375778, -0.16148829460144043, 0.05808655917644501, 0.035518717020750046, -0.20556692779064178, -0.2308664172887802, 0.026876622810959816, 0.2811306118965149, -0.1402851641178131, 0.0905100479722023, -0.21362386643886566, 0.1375388205051422, -0.08840863406658173, -0.15370558202266693, -0.040662117302417755, -0.04370637983083725, 0.12335590273141861, -0.14139829576015472, 0.0559835210442543, 0.19834043085575104, -0.07951053231954575, 0.2182411402463913, 0.08722810447216034, 0.03309006616473198, 0.17453108727931976, 0.08005575090646744, -0.27939027547836304, -0.09997090697288513, -0.050696175545454025, -0.08245430886745453, -0.08761855214834213, 0.07344715297222137, 0.04358293116092682, -0.032528720796108246, -0.4597766399383545, -0.1559246927499771, -0.3609873950481415, 0.1635395586490631, -0.16091938316822052, 0.05140674114227295, -0.03611290454864502, 0.046863481402397156, 0.02990340068936348, 0.31886595487594604, -0.06816263496875763, -0.23375312983989716, -0.0063472227193415165, 0.3686247766017914, 0.03997787833213806, -0.09595950692892075, 0.2741052806377411, -0.0035360155161470175, 0.17286236584186554, -0.1739944964647293, -0.11879220604896545, -0.11496586352586746, 0.04766364023089409, 0.00786314345896244, -0.1623605638742447, 0.3741194009780884, -0.03986966609954834, 0.1298772394657135, 0.12235257029533386, -0.08403170108795166, 0.1379922330379486, 0.0420227088034153, -0.09507979452610016, -0.21517570316791534, 0.12944866716861725, 0.12834255397319794, 0.505588948726654, -0.1493338793516159, -0.10570348799228668, -0.559013843536377, -0.01014898531138897, 0.023932091891765594, -0.02594921737909317, 0.22203609347343445, -0.26026439666748047, 0.07511509209871292, -0.1623806357383728, -0.3754821717739105, 0.3970046937465668, 0.04896456375718117, 0.04476510360836983, -0.06419110298156738, 0.09653834253549576, -0.16623106598854065, -0.13417625427246094, 0.403374046087265, -0.13831515610218048, 0.055798571556806564, -0.0470859557390213, 0.0068543776869773865, -0.2336544692516327, 0.057776521891355515, -0.010369149968028069, 0.04811621084809303, -0.5006849765777588, 0.24514377117156982, 0.0958232656121254, 0.2131483107805252, -0.2310560643672943, -0.6032779216766357, -0.21742790937423706, -0.12178771942853928, 0.04034853354096413, -0.07381311058998108, 0.07247140258550644, 0.27598604559898376, 0.3919842839241028, 0.6198577880859375, -0.053835850208997726, 0.16589638590812683, -0.35069870948791504, 0.03073977492749691, -0.08417385071516037, 0.0006197414477355778, 0.028195641934871674, -0.20455977320671082, -0.10483333468437195, -0.3925682008266449, -0.03182399645447731, 0.1536329984664917, -0.34455180168151855, 0.18958747386932373, -0.34014326333999634, 0.3981800377368927, 0.3173834979534149, -0.06080370396375656, -0.14565616846084595, -0.28033447265625, 0.37739109992980957, -0.1592203676700592, -0.0017578810220584273, -0.01811368018388748, -0.13464035093784332, -0.02191902883350849, -0.03611846640706062, 0.0024109838996082544, -0.04666297137737274, -0.12000489979982376, 0.24882331490516663, 0.27807381749153137, -0.1349143385887146, -0.008103052154183388, 0.18773290514945984, 0.30907395482063293, -0.2970648407936096, -0.1021994799375534, -0.1530171036720276, -0.6735306978225708, 0.4321500360965729, -0.10062604397535324, -0.26235079765319824, -0.16792474687099457, 0.03182806074619293, 0.3910508155822754, -0.42733773589134216, -0.27766668796539307, -0.35988399386405945, -0.1445212960243225, -0.06784021854400635, 0.1398448944091797, 0.39709916710853577, -0.07788294553756714, -0.1432485580444336, 0.022399768233299255, -0.09999980032444, -0.1330251693725586, 0.09726071357727051, -0.19076071679592133, 0.3079792559146881, -0.3312961459159851, 0.2309681922197342, -0.32568323612213135, 0.9833403825759888, 0.20836834609508514, -0.23818089067935944, 0.5505985617637634, 0.10548710823059082, 0.3776523470878601, -0.17890112102031708, -0.16993579268455505, 0.025700578466057777, -0.0011686841025948524, 0.27715742588043213, 0.18564261496067047, 0.11748356372117996, 0.2526871860027313, -0.15811282396316528, -0.2227056473493576, -0.05869998782873154, -0.18458986282348633, -0.09227451682090759, 0.17440862953662872, 0.040451522916555405, 0.043406806886196136, -0.10813941806554794, -0.1012127473950386, -0.06018127501010895, 0.2614684998989105, 0.3391655683517456, 0.2163945585489273, -0.15307320654392242, -0.1500348448753357, 0.0009446852491237223, -0.5353900790214539, 0.23430639505386353, -0.165389284491539, -0.10559768974781036, 0.2081579715013504, -0.3411155045032501, 0.14828722178936005, 0.11747671663761139, 0.4149768054485321, 0.2935401201248169, 0.0004636174999177456, -0.2337074875831604, -0.07403326034545898, -0.2577539086341858, -0.024577848613262177, -0.29152944684028625, -0.16116537153720856, 0.5257939696311951, 0.47309058904647827, -0.4316529929637909, -0.0833313912153244, 0.1507502943277359, -0.0110319247469306, -0.06403607130050659, -0.1930377036333084, -0.583446204662323, 0.024098828434944153, -0.1810367852449417, 0.16330412030220032, -0.010339295491576195, 0.14439211785793304, -0.05863376334309578, 0.3244633674621582, -0.036930520087480545, -0.20634184777736664, 0.25308743119239807, 0.3682604134082794, 0.1876196265220642, 0.07788987457752228, 0.20665772259235382, 0.5539929866790771, -0.00008842132228892297, 0.5046103000640869, 0.665798544883728, -0.1601141095161438, -0.3793659806251526, 0.17520949244499207, 0.2613639831542969, 0.17795677483081818, 0.24542123079299927, -0.07183688133955002, -0.1452246755361557, 0.21862977743148804, 0.38470929861068726, -0.41839367151260376, 0.24986723065376282, 0.35491132736206055, 0.15096035599708557, -0.19044619798660278, -0.17206475138664246, 0.45221683382987976, 0.04339468479156494, -0.011008688248693943, -0.05590398237109184, 0.3944799602031708, 0.025047054514288902, 0.19341331720352173, 0.13150553405284882, 0.9412787556648254, -0.1404450237751007, 0.28943416476249695, 0.26446977257728577, 0.38199740648269653, 0.43472984433174133, 0.07802633196115494, -0.04741806909441948, -0.11103005707263947, 0.009981553070247173, 0.003927711863070726, -0.08043184131383896, 0.1772288680076599, 0.03300277516245842, -0.14410486817359924, 0.306850790977478, -0.19445620477199554, 0.000602578918915242, -0.2966684401035309, -0.02254277467727661, -0.050829604268074036, -0.26072290539741516, -0.3046509325504303, -0.039943352341651917, 0.20541389286518097, 0.43038442730903625, -0.04038189351558685, -0.05318484082818031, 0.03361498564481735, -0.31736281514167786, -0.04230455681681633, 0.10695314407348633, -0.023501761257648468, -0.11785931885242462, 0.4349118173122406, 0.003776334226131439, 0.24928435683250427, 0.06360483169555664, 0.6500436067581177, 0.054842397570610046, -0.27596351504325867, 0.3410857319831848, -0.026057852432131767, -0.027199119329452515, -0.1503070890903473, 0.0005937973619438708, 0.21956351399421692, 0.09232159703969955, -0.16725388169288635, -0.003106644842773676, -0.07321733981370926, -0.0034420962911099195, -0.26016610860824585, 0.01994641125202179, 0.19876167178153992, -0.36437106132507324, 0.08521365374326706, 0.16905373334884644, 0.125623419880867, -0.09792915731668472, 0.015878645703196526, 0.007337604183703661, -0.08042233437299728, 0.08515427261590958, 0.1413448303937912, -0.2557505965232849, -0.15326720476150513, 0.4424974024295807, -0.35055333375930786, 0.07702618837356567, 0.46654757857322693, -0.15390236675739288, -0.12734553217887878, 0.09904544055461884, -0.2718663811683655, 0.7606896162033081, -0.8098626136779785, -0.0061645652167499065, 0.4467017650604248, 0.16769921779632568, 0.15875132381916046, 0.4819999039173126, 0.48682329058647156, -0.1703995168209076, -0.0927322581410408, -0.1318475753068924, -0.28671327233314514, 0.13729847967624664, -0.1310385763645172, 0.009123507887125015, -0.07411541044712067, 0.15044105052947998, 0.07577495276927948, 0.376919150352478, -0.16603128612041473, 0.1314229816198349, 0.043273087590932846, -0.10043714195489883, -0.06263561546802521, -0.024275489151477814, 0.5027936100959778, 0.07487107068300247, -0.02758931741118431, 0.0237130057066679, -0.21351969242095947, -0.05192731320858002, -0.38965216279029846, 0.16085411608219147, 0.014339710585772991, -0.2431516945362091, 0.031433526426553726, 0.09870070219039917, -0.02994035743176937, -0.25852710008621216, -0.015945378690958023, -0.07647755742073059, 0.09711835533380508, -0.11209551990032196, 0.5111291408538818, 0.008967773988842964, -0.06620120257139206, -0.14083391427993774, 0.14277246594429016, 0.003154617501422763, 0.23349395394325256, -0.17554739117622375, -0.12018685787916183, -0.045407943427562714, 0.11871557682752609, 0.055470533668994904, 0.3773244321346283, 0.039818692952394485, -0.004697570111602545, 0.047022745013237, -0.010890181176364422, -0.11050038784742355, 0.3558959662914276, 0.30313530564308167, -0.08427802473306656, -0.20951791107654572, 0.22649529576301575, 0.04457530751824379, -0.23690731823444366, -0.09327025711536407, -0.1619832068681717, 0.26364779472351074, -0.008569186553359032, 0.255413681268692, 0.17255377769470215, 0.3013778030872345, 0.0927802249789238, -0.03704618662595749, 0.05614640936255455, 0.037934012711048126, -0.06547326594591141, 0.20983515679836273, -0.16697125136852264, 0.21814048290252686, 0.7928681373596191, 0.2075892686843872, 0.2908722758293152, 0.18033649027347565, -0.16503429412841797, 0.4212486445903778, -0.4339539706707001, 0.14944854378700256, -0.24490979313850403, -0.5602257251739502, -0.09037834405899048, 0.16664065420627594, 0.14258278906345367, -0.1524406522512436, -0.1933709979057312, 0.787669837474823, -0.08484604954719543, 0.0509207621216774, -0.1816951483488083, 0.2001521736383438, 0.07819174975156784, -0.5429598093032837, -0.06517203152179718, -0.12709404528141022, 0.023090383037924767, -0.0550479032099247, 0.025203216820955276, -0.11963270604610443, 0.32642802596092224, -0.05051279067993164, -0.05696384608745575, -0.17904135584831238, -0.6971858143806458, 0.23219069838523865, 0.22785209119319916, -0.05209134519100189, 0.07361984997987747, 0.3492475748062134, -0.14551524817943573, 0.26864078640937805, 0.44736212491989136, 0.4319784641265869, 0.1288589984178543, 0.22525855898857117, -0.05701423063874245, 0.05038580298423767, 0.18688631057739258, -0.1474187970161438, 0.4391915798187256, 0.232335165143013, 0.1657164990901947, 0.04753584414720535, 0.052257053554058075, -0.17269012331962585, 0.1441652774810791, -0.36204075813293457, 0.41750550270080566, -0.268093466758728, 0.47268977761268616, -0.272277295589447, 0.13673779368400574, -0.3582392930984497, 0.1517600566148758, -0.3563923239707947, 0.6355628967285156, 0.15263153612613678, -0.06976982951164246, -0.09933900833129883, -0.15458254516124725, -0.014133771881461143, 0.15269064903259277, 0.5158997774124146, 0.32218605279922485, -0.12462005019187927, -0.5601329207420349, -0.06785669177770615, -0.5862093567848206, 0.10262271761894226, -0.03934033587574959, 0.31520864367485046, -0.040728215128183365, 0.028272584080696106, -0.07196028530597687, 0.1520363837480545, -0.016885284334421158, -0.3900325894355774, -0.26573747396469116, -0.15659812092781067, -0.12699557840824127, 0.08411206305027008, -0.5294066667556763, -0.03484480828046799, -0.005897613242268562, 0.06179492920637131, 0.09427682310342789, 0.04563877731561661, -0.15669146180152893, -0.01668180152773857, -0.06487416476011276, -0.0705244317650795, 0.35788869857788086, 0.18269318342208862, 0.008710134774446487, 0.3180001676082611, 0.014898990280926228, -0.03702128678560257, -0.11539506167173386, -0.2476244419813156, -0.14007695019245148, -0.08103413134813309, -0.18066683411598206, 0.08825093507766724, -0.36460021138191223, -0.21000726521015167, -0.4426749348640442, 0.0865500420331955, 0.2546903192996979, -0.2744082808494568, -0.3757108449935913, 0.010777675546705723, -0.029531776905059814, -0.13683289289474487, 0.09297075122594833, 0.3709932565689087, 0.04070970043540001, 0.3060778081417084, -0.2777657210826874, 0.009957356378436089, 0.7441993951797485, -0.5834299325942993, 0.09641799330711365, -0.11243972927331924, 0.04880610853433609, 0.2738860249519348, -0.474575936794281, -0.9858582615852356, 0.23803509771823883, 0.26440927386283875, 0.12794700264930725, -0.44003379344940186, 0.14393824338912964, -0.25242185592651367, 0.09903887659311295, -0.16261164844036102, 0.23195426166057587, -0.017027126625180244, -0.227102130651474, 0.03104328364133835, -0.19647005200386047 ]
https://github.com/huggingface/datasets/issues/2569
Weights of model checkpoint not initialized for RobertaModel for Bertscore
Hi @suzyahyah, I have created a Pull Request to filter out that warning message in this specific case, since the behavior is as expected and the warning message can only cause confusion for users (as in your case).
When applying bertscore out of the box, ```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']``` Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html ``` from datasets import load_metric metric = load_metric('bertscore') # Example of typical usage for batch in dataset: inputs, references = batch predictions = model(inputs) metric.add_batch(predictions=predictions, references=references) score = metric.compute(lang="en") #score = metric.compute(model_type="roberta-large") # gives the same error ``` I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo.... ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27 - Python version: 3.9.5 - PyArrow version: 3.0.0
38
Weights of model checkpoint not initialized for RobertaModel for Bertscore When applying bertscore out of the box, ```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']``` Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html ``` from datasets import load_metric metric = load_metric('bertscore') # Example of typical usage for batch in dataset: inputs, references = batch predictions = model(inputs) metric.add_batch(predictions=predictions, references=references) score = metric.compute(lang="en") #score = metric.compute(model_type="roberta-large") # gives the same error ``` I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo.... ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27 - Python version: 3.9.5 - PyArrow version: 3.0.0 Hi @suzyahyah, I have created a Pull Request to filter out that warning message in this specific case, since the behavior is as expected and the warning message can only cause confusion for users (as in your case).
[ -0.15063084661960602, -0.29753467440605164, 0.07905333489179611, 0.05135172978043556, 0.46475544571876526, 0.040576472878456116, 0.19793567061424255, 0.19078676402568817, 0.13858537375926971, 0.20844976603984833, -0.13037726283073425, 0.2869921028614044, -0.12756791710853577, -0.08662129938602448, -0.12382160127162933, -0.19499950110912323, 0.11293134838342667, -0.09181900322437286, -0.20666220784187317, -0.1772623211145401, -0.16807284951210022, 0.1075783520936966, -0.22707702219486237, 0.08774717152118683, -0.2647551894187927, 0.1180238351225853, 0.1158171147108078, 0.3999866247177124, -0.027943946421146393, -0.5496960282325745, 0.4129522740840912, -0.10248096287250519, 0.1832323968410492, 0.432197630405426, -0.00011840501247206703, -0.03506176918745041, 0.23120255768299103, -0.0642959475517273, -0.027250317856669426, -0.17994295060634613, 0.07141517102718353, -0.21532626450061798, 0.1907903552055359, -0.08510676771402359, 0.09625102579593658, 0.1106526255607605, -0.06385156512260437, -0.09772790968418121, 0.2969881594181061, 0.014700706116855145, 0.10609614104032516, 0.5801303386688232, 0.09152460098266602, -0.20335887372493744, 0.05621432512998581, -0.24340590834617615, -0.010716971941292286, 0.7996891140937805, -0.11941296607255936, 0.02111397311091423, -0.17554926872253418, 0.3603535592556, 0.04700058326125145, 0.41315531730651855, 0.23149804770946503, -0.04505486413836479, 0.1458597332239151, -0.014075778424739838, -0.28619110584259033, 0.36335089802742004, -0.049593325704336166, -0.09925432503223419, -0.14347760379314423, -0.17046087980270386, 0.1701108068227768, -0.32355308532714844, 0.15182076394557953, -0.020738117396831512, -0.0049407752230763435, 0.17676670849323273, -0.1856807917356491, -0.009638641960918903, 0.03920682519674301, -0.025585763156414032, 0.11223407834768295, -0.10806483030319214, -0.30888211727142334, 0.07157962769269943, 0.5233256816864014, 0.021915266290307045, -0.5161140561103821, 0.04425184056162834, -0.015838567167520523, 0.1050247922539711, -0.22155539691448212, 0.03718791902065277, 0.27684882283210754, 0.3556404709815979, 0.2921355366706848, -0.05160951614379883, 0.1328829526901245, 0.04957977682352066, -0.16774895787239075, 0.07359685003757477, 0.06193020939826965, 0.32985761761665344, -0.0936577096581459, -0.1504184603691101, 0.1854509711265564, 0.4818686842918396, 0.20261624455451965, -0.14685800671577454, -0.1522713601589203, -0.1516352742910385, 0.13312940299510956, -0.013410613872110844, 0.05158623307943344, -0.15035736560821533, -0.4884827136993408, 0.029397914186120033, -0.0861961767077446, -0.2325776219367981, 0.4540867209434509, 0.24001216888427734, -0.02879718877375126, 0.1914059966802597, -0.2195282280445099, 0.3667711019515991, -0.16752409934997559, -0.002410345012322068, -0.2121831774711609, 0.02009522169828415, -0.5994925498962402, 0.04519130289554596, 0.16704095900058746, -0.5211144089698792, 0.4407989978790283, 0.08610224723815918, 0.4616360068321228, 0.04390576481819153, -0.11341220885515213, -0.12419026345014572, 0.10503295809030533, 0.3450678586959839, 0.027523063123226166, 0.2916051745414734, 0.33216431736946106, 0.25062817335128784, -0.15508350729942322, -0.08651214092969894, -0.32085996866226196, -0.4442724883556366, 0.3166169822216034, 0.012765046209096909, -0.12097306549549103, -0.0538564994931221, -0.6307346224784851, 0.1684768944978714, 0.061226584017276764, 0.05870971456170082, -0.06801311671733856, 0.11154114454984665, -0.18671564757823944, -0.01458809059113264, 0.3714063763618469, 0.5238425135612488, -0.5235713720321655, -0.2953404486179352, 0.02248673141002655, -0.05665822699666023, 0.314673513174057, 0.4856600761413574, -0.24037548899650574, 0.22530661523342133, -0.11065556854009628, -0.13080225884914398, -0.0051895081996917725, -0.3240642547607422, -0.19947902858257294, -0.0552029088139534, 0.16294318437576294, 0.0029753546696156263, 0.13018111884593964, -0.41347354650497437, -0.5584427714347839, -0.1973026990890503, 0.15862208604812622, -0.19746127724647522, 0.07872265577316284, 0.02563655935227871, -0.23314268887043, -0.20446902513504028, 0.014170329086482525, 0.24078692495822906, -0.11708743125200272, 0.03464474156498909, -0.1564634144306183, 0.046131644397974014, -0.05783268064260483, -0.11703979223966599, -0.01203271746635437, -0.10535552352666855, 0.13017509877681732, -0.16963425278663635, 0.01521372515708208, 0.12394380569458008, -0.062188003212213516, 0.23359054327011108, 0.14634284377098083, 0.0846133902668953, 0.23865099251270294, 0.06924762576818466, -0.29491356015205383, -0.08956430852413177, -0.05793550983071327, -0.011745395138859749, -0.04916587099432945, 0.009605715051293373, 0.01475002896040678, 0.04315830394625664, -0.4249894618988037, -0.2600964605808258, -0.446978896856308, 0.149261474609375, -0.06187643110752106, -0.05074319615960121, -0.05950615927577019, 0.024960581213235855, 0.06140408664941788, 0.2770499587059021, -0.020104991272091866, -0.11347267776727676, -0.016294628381729126, 0.3425474464893341, 0.07042580842971802, -0.12815415859222412, 0.2877137362957001, -0.0041895052418112755, 0.1435241401195526, -0.07786086201667786, -0.08908890932798386, -0.15505297482013702, 0.057450395077466965, 0.01662336476147175, -0.11317127197980881, 0.37347307801246643, 0.020065078511834145, 0.09969939291477203, 0.0735730305314064, -0.0686984434723854, 0.18849875032901764, 0.030555615201592445, 0.009034518152475357, -0.273971825838089, 0.1552574336528778, 0.13753105700016022, 0.4346509277820587, -0.1644023358821869, -0.14818130433559418, -0.48366779088974, 0.009009681642055511, 0.07189859449863434, 0.030954336747527122, 0.20669932663440704, -0.21378599107265472, 0.03227909654378891, -0.15400606393814087, -0.339429646730423, 0.4418453276157379, 0.07573891431093216, 0.13170786201953888, -0.06684713065624237, 0.056590575724840164, -0.2283736914396286, -0.09160064160823822, 0.36430710554122925, -0.08371009677648544, 0.12232276797294617, -0.014459972269833088, 0.005025383085012436, -0.27437475323677063, 0.11039893329143524, 0.053331539034843445, 0.11160160601139069, -0.48862889409065247, 0.21119461953639984, 0.01606447622179985, 0.20750664174556732, -0.2277432233095169, -0.5473069548606873, -0.19786576926708221, -0.16741357743740082, 0.11088772863149643, 0.0035507860593497753, 0.015551622025668621, 0.2458345592021942, 0.3519873023033142, 0.5763666033744812, -0.0105391014367342, 0.18207955360412598, -0.32523590326309204, 0.037951841950416565, -0.0824352353811264, 0.034815479069948196, 0.02128133736550808, -0.1395525187253952, -0.03698628023266792, -0.2842596173286438, -0.06856942921876907, 0.1353873908519745, -0.3167825937271118, 0.16295114159584045, -0.3225495219230652, 0.43492022156715393, 0.34140878915786743, -0.07392702996730804, -0.13793009519577026, -0.24127809703350067, 0.35525768995285034, -0.17376698553562164, -0.01421984564512968, -0.045967426151037216, -0.1685473918914795, -0.0038152614142745733, -0.04159742221236229, -0.05529163032770157, -0.0487065352499485, -0.15754935145378113, 0.18592560291290283, 0.28911641240119934, -0.10520727187395096, -0.11520393937826157, 0.18896962702274323, 0.23628240823745728, -0.30058950185775757, -0.10017266869544983, -0.26346370577812195, -0.7119251489639282, 0.38266655802726746, -0.1397303193807602, -0.2567562162876129, -0.1022108793258667, 0.08988603949546814, 0.41234588623046875, -0.4059276282787323, -0.3205481469631195, -0.4146136939525604, -0.0838828906416893, -0.010426887311041355, 0.1121118888258934, 0.3206905126571655, -0.12591825425624847, -0.16577313840389252, -0.04244360327720642, -0.16631647944450378, -0.05978081375360489, 0.0870639979839325, -0.2837340235710144, 0.3143175542354584, -0.3372661769390106, 0.22765980660915375, -0.2759478986263275, 0.9847338795661926, 0.28848031163215637, -0.23260939121246338, 0.6071633100509644, 0.12879523634910583, 0.3356272876262665, -0.24866728484630585, -0.16450431942939758, 0.08057214319705963, -0.006294595543295145, 0.30269551277160645, 0.21066391468048096, 0.03295648470520973, 0.2064097672700882, -0.12477520853281021, -0.28305700421333313, -0.017948701977729797, -0.21005024015903473, -0.05149563401937485, 0.11634069681167603, -0.04076592996716499, 0.04948854818940163, -0.11923030763864517, -0.08300162106752396, -0.09481264650821686, 0.24191713333129883, 0.3854701519012451, 0.15101979672908783, -0.15350481867790222, -0.17041869461536407, 0.041296377778053284, -0.6059463024139404, 0.23025086522102356, -0.1467321813106537, -0.06992390006780624, 0.18003728985786438, -0.2958263158798218, 0.16276995837688446, 0.15405867993831635, 0.3248288333415985, 0.14942705631256104, 0.04319821670651436, -0.2296825349330902, 0.04390646517276764, -0.1999870240688324, -0.009032079018652439, -0.2797452509403229, -0.09043261408805847, 0.5518618226051331, 0.3548372685909271, -0.43180662393569946, -0.1261865794658661, 0.15287214517593384, -0.06108550354838371, -0.021894097328186035, -0.2179815024137497, -0.5934867262840271, 0.027805034071207047, -0.18543224036693573, 0.2032897174358368, 0.03515731170773506, 0.18934430181980133, -0.09607089310884476, 0.2732437252998352, -0.018780048936605453, -0.1408815085887909, 0.26167747378349304, 0.2927851974964142, 0.13523657619953156, 0.14937478303909302, 0.24913737177848816, 0.450540691614151, 0.08211498707532883, 0.5949650406837463, 0.6329041123390198, -0.14012601971626282, -0.3148523271083832, 0.1595424860715866, 0.26270148158073425, 0.17856332659721375, 0.2328169345855713, -0.07307592034339905, -0.05642307177186012, 0.14282608032226562, 0.3662606179714203, -0.3818345367908478, 0.23719829320907593, 0.32047179341316223, 0.12419300526380539, -0.16494549810886383, -0.1584482491016388, 0.4748920202255249, 0.04544682055711746, -0.061703458428382874, 0.00830118265002966, 0.3129756450653076, -0.008951895870268345, 0.18397122621536255, 0.14597678184509277, 0.8244401216506958, -0.06994259357452393, 0.23991580307483673, 0.3293840289115906, 0.42025038599967957, 0.33644941449165344, 0.05605556443333626, -0.05887017026543617, -0.12747198343276978, 0.02777332253754139, 0.0196379367262125, -0.06799531728029251, 0.17381863296031952, 0.0013342532329261303, -0.14545033872127533, 0.36175936460494995, -0.21765583753585815, -0.057736627757549286, -0.2969799339771271, -0.031265612691640854, -0.17563413083553314, -0.27348631620407104, -0.32899221777915955, -0.010720550082623959, 0.19909843802452087, 0.4005933701992035, -0.03054722212255001, -0.0526188425719738, 0.08237860351800919, -0.29891660809516907, -0.07932666689157486, 0.056301891803741455, -0.046260736882686615, -0.11336791515350342, 0.3503371477127075, 0.004677790682762861, 0.28554609417915344, 0.02081877551972866, 0.6671980023384094, 0.09813762456178665, -0.26017093658447266, 0.392407089471817, 0.051179416477680206, -0.04576722905039787, -0.1384090632200241, -0.0449974425137043, 0.224789559841156, 0.027337342500686646, -0.19691282510757446, -0.028254438191652298, -0.08638890087604523, 0.007013935130089521, -0.22059307992458344, -0.030705951154232025, 0.21827256679534912, -0.41004428267478943, 0.039959616959095, 0.1802453249692917, 0.20254777371883392, -0.11378604918718338, 0.03801550716161728, 0.07323992252349854, -0.05057508870959282, 0.1269163191318512, 0.10357815027236938, -0.24438776075839996, -0.14628709852695465, 0.4675121605396271, -0.32120606303215027, 0.05447143316268921, 0.4901282787322998, -0.17038026452064514, -0.1374824047088623, 0.05774126574397087, -0.2169572114944458, 0.7585760354995728, -0.72548907995224, -0.009793691337108612, 0.4498120844364166, 0.17673607170581818, 0.20234781503677368, 0.47363775968551636, 0.44591185450553894, -0.14228729903697968, -0.03261737525463104, -0.2269625961780548, -0.26660916209220886, 0.12686237692832947, -0.17526695132255554, -0.022427648305892944, -0.10893736779689789, 0.15975946187973022, 0.05779169127345085, 0.32418152689933777, -0.20593877136707306, 0.17099103331565857, 0.046371735632419586, -0.08932191878557205, -0.12593942880630493, -0.015322191640734673, 0.502522885799408, 0.1386447250843048, 0.0006158594624139369, 0.028989402577280998, -0.26843443512916565, -0.08923390507698059, -0.40548571944236755, 0.1571565866470337, -0.0036495798267424107, -0.20235233008861542, 0.02573506347835064, 0.03871692344546318, -0.0907379761338234, -0.20822696387767792, -0.027016617357730865, -0.11161717772483826, 0.07859215140342712, -0.12361939251422882, 0.5146750211715698, 0.06233008950948715, 0.008663395419716835, -0.14307132363319397, 0.09945163130760193, 0.009099612012505531, 0.1324455738067627, -0.24533295631408691, -0.1330106556415558, -0.08140059560537338, 0.11605247855186462, 0.03455604612827301, 0.2790311574935913, 0.08901427686214447, -0.04147355258464813, 0.07576658576726913, -0.04282161965966225, -0.11399699747562408, 0.33178460597991943, 0.27642741799354553, -0.11337944120168686, -0.25866830348968506, 0.25360193848609924, 0.09402885288000107, -0.26956576108932495, -0.09590334445238113, -0.1607610285282135, 0.33032509684562683, 0.00785310473293066, 0.18316204845905304, 0.1774289906024933, 0.2701612412929535, 0.0747518390417099, -0.0377349779009819, -0.07858182489871979, -0.0005334021989256144, -0.08521705865859985, 0.14700880646705627, -0.16242793202400208, 0.1945866495370865, 0.7594561576843262, 0.20291224122047424, 0.3006826937198639, 0.27626726031303406, -0.14810916781425476, 0.4754820466041565, -0.3361109495162964, 0.07573451846837997, -0.264982134103775, -0.6027318239212036, -0.09621972590684891, 0.2004273682832718, 0.04495815932750702, -0.15123672783374786, -0.0951133668422699, 0.7941795587539673, -0.11646871268749237, 0.009147566743195057, -0.21643392741680145, 0.16907097399234772, 0.023278316482901573, -0.5665176510810852, -0.1921994984149933, -0.14654454588890076, 0.09816712141036987, -0.02669486030936241, 0.033682625740766525, -0.03543200343847275, 0.32626238465309143, -0.032541241496801376, -0.07000879943370819, -0.2572222054004669, -0.6853575706481934, 0.24403153359889984, 0.24126651883125305, -0.04172520339488983, 0.06308597326278687, 0.37632790207862854, -0.15489740669727325, 0.24609844386577606, 0.40703830122947693, 0.46069270372390747, 0.15351784229278564, 0.21554920077323914, -0.16599327325820923, 0.06587853282690048, 0.15386708080768585, -0.16544760763645172, 0.42611539363861084, 0.3403892517089844, 0.181512713432312, 0.12959802150726318, 0.05116168409585953, -0.19312520325183868, 0.19738832116127014, -0.267856240272522, 0.4426290690898895, -0.21310144662857056, 0.44830551743507385, -0.24371851980686188, 0.19489790499210358, -0.3682037889957428, 0.1679104119539261, -0.3469514846801758, 0.688755989074707, 0.1995065063238144, -0.03171582520008087, -0.04576047882437706, -0.2536659836769104, 0.015308026224374771, 0.16025525331497192, 0.5332728028297424, 0.2655240595340729, -0.19024306535720825, -0.6655281186103821, -0.028383785858750343, -0.6237753033638, 0.14663484692573547, -0.08071614056825638, 0.3106876015663147, -0.06881162524223328, 0.07193993777036667, -0.0749487355351448, 0.20025475323200226, 0.0032361894845962524, -0.40711405873298645, -0.1927724927663803, -0.08978056907653809, -0.20409296452999115, 0.05719596892595291, -0.5257991552352905, -0.08846282958984375, 0.0108545096591115, 0.007926453836262226, 0.12539903819561005, -0.056890200823545456, -0.09773484617471695, -0.059269316494464874, -0.05063970014452934, -0.024636443704366684, 0.4130622148513794, 0.2529042065143585, 0.03342251479625702, 0.34235504269599915, 0.004593917168676853, -0.021417751908302307, -0.12098557502031326, -0.2568950057029724, -0.14870361983776093, -0.0593314990401268, -0.15645846724510193, 0.09707491099834442, -0.2969249188899994, -0.1412886530160904, -0.4015670120716095, 0.10559950768947601, 0.1789359599351883, -0.25235074758529663, -0.3688323497772217, 0.05236126482486725, 0.04182765260338783, -0.09569558501243591, 0.036574237048625946, 0.36071187257766724, 0.06723445653915405, 0.34355610609054565, -0.3030107617378235, -0.09119373559951782, 0.7570112347602844, -0.5725849270820618, 0.07906331866979599, -0.13141028583049774, 0.07408437877893448, 0.2822539806365967, -0.4676658809185028, -1.0831584930419922, 0.27197250723838806, 0.27459707856178284, 0.1263023018836975, -0.4521116316318512, 0.16268481314182281, -0.27875518798828125, 0.10433293133974075, -0.1492418348789215, 0.20969542860984802, -0.009847506880760193, -0.3521243929862976, 0.024411188438534737, -0.22663326561450958 ]
https://github.com/huggingface/datasets/issues/2561
Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
Hi ! I just tried to reproduce what you said: - create a local builder class - use `load_dataset` - update the builder class code - use `load_dataset` again (with or without `ignore_verifications=True`) And it creates a new cache, as expected. What modifications did you do to your builder's code ?
## Describe the bug If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets. ## Steps to reproduce the bug - Create a local dataset builder class - load the local builder class file using `load_dataset` and let the cache build - update the file's content - The cache should rebuilt. ## Expected results With `ignore_verifications=True`, `load_dataset` should pick up existing cache. ## Actual results Creates new cache. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0
51
Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` ## Describe the bug If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets. ## Steps to reproduce the bug - Create a local dataset builder class - load the local builder class file using `load_dataset` and let the cache build - update the file's content - The cache should rebuilt. ## Expected results With `ignore_verifications=True`, `load_dataset` should pick up existing cache. ## Actual results Creates new cache. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0 Hi ! I just tried to reproduce what you said: - create a local builder class - use `load_dataset` - update the builder class code - use `load_dataset` again (with or without `ignore_verifications=True`) And it creates a new cache, as expected. What modifications did you do to your builder's code ?
[ -0.3804817199707031, 0.4886573255062103, 0.03263238072395325, 0.193564310669899, 0.144663468003273, 0.1507261097431183, 0.3192700147628784, 0.3748849034309387, 0.12904877960681915, 0.2183319479227066, 0.21496087312698364, 0.36303719878196716, 0.11989084631204605, -0.2817021906375885, 0.05109236761927605, 0.2790057063102722, 0.11634325981140137, 0.14349575340747833, 0.2144532948732376, -0.077156201004982, -0.028279395774006844, -0.08005932718515396, -0.040138062089681625, -0.2102089822292328, -0.45055484771728516, 0.19761167466640472, 0.05286895111203194, 0.08538274466991425, -0.040551815181970596, -0.46622955799102783, 0.39087939262390137, 0.24418747425079346, -0.056226946413517, 0.2653217315673828, -0.00010906612442340702, 0.1760648936033249, 0.32086634635925293, 0.05264361947774887, -0.39786896109580994, 0.13890859484672546, -0.347424179315567, -0.4606625437736511, 0.022390270605683327, -0.08848978579044342, -0.21647176146507263, -0.24908459186553955, -0.14072589576244354, -0.1915910243988037, 0.3035663962364197, 0.056485865265131, 0.2780434191226959, 0.07508651167154312, -0.10233981907367706, -0.016868142411112785, 0.11995526403188705, -0.05077553912997246, -0.05361540988087654, 0.16099265217781067, 0.22537098824977875, 0.036166317760944366, -0.4304829239845276, 0.31746065616607666, -0.18966715037822723, 0.22037670016288757, 0.4303053617477417, -0.09732871502637863, 0.16110306978225708, -0.009329566732048988, 0.37734875082969666, 0.04149856045842171, 0.5871434807777405, -0.32999151945114136, -0.2986133098602295, -0.2611525356769562, -0.19443708658218384, -0.015570668503642082, 0.23212000727653503, -0.18326926231384277, -0.2992415130138397, 0.17350424826145172, -0.4138678014278412, -0.27074065804481506, 0.06783338636159897, -0.1559707373380661, 0.05288049578666687, -0.25111910700798035, 0.09921543300151825, -0.09261167049407959, -0.08937788754701614, 0.16885115206241608, 0.43493276834487915, -0.4686092734336853, -0.07397330552339554, 0.27029654383659363, -0.49891552329063416, 0.02196343056857586, 0.38459014892578125, 0.39726439118385315, 0.23840995132923126, 0.30228981375694275, -0.18992619216442108, 0.24092797935009003, 0.18605077266693115, 0.09683876484632492, -0.08260273933410645, 0.3067310154438019, 0.04100785404443741, -0.010966625064611435, 0.2831624150276184, 0.20311975479125977, -0.5477036833763123, -0.013798638246953487, 0.06386327743530273, -0.2574612498283386, 0.5983971953392029, -0.08989550173282623, 0.06806723773479462, -0.32887235283851624, -0.03164954110980034, 0.1889808475971222, -0.0006035610567778349, -0.14732247591018677, 0.22394685447216034, 0.25703832507133484, -0.12948496639728546, 0.08504611253738403, -0.25001129508018494, -0.2127595841884613, -0.34650734066963196, -0.3544662594795227, -0.39889615774154663, -0.23861388862133026, 0.020139703527092934, 0.36793816089630127, 0.4855269491672516, -0.5491023659706116, 0.31182408332824707, 0.2401127964258194, -0.06151106581091881, 0.07968436926603317, 0.1753486692905426, -0.13617153465747833, 0.17918933928012848, 0.22023475170135498, -0.28894466161727905, 0.06605963408946991, -0.024998417124152184, -0.19942809641361237, -0.07210645079612732, 0.34082916378974915, -0.11442793905735016, -0.7981070280075073, 0.009357312694191933, 0.1745111495256424, -0.2340957075357437, 0.05182991921901703, 0.2836398482322693, 0.11555524915456772, 0.4194815456867218, -0.3065301775932312, -0.13026411831378937, -0.047908198088407516, -0.2993506193161011, -0.1270206868648529, 0.48682358860969543, 0.6713590621948242, -0.4300764799118042, 0.0946415513753891, -0.12422578781843185, 0.08808086812496185, 0.004568662494421005, 0.15418855845928192, -0.32150113582611084, 0.41640397906303406, -0.2850262224674225, -0.4484735131263733, 0.20192350447177887, -0.2974614202976227, -0.8293771743774414, 0.2752144932746887, 0.1786656230688095, 0.2141064703464508, 0.13497425615787506, 0.03990400582551956, -0.08562112599611282, -0.16016045212745667, 0.09799094498157501, 0.24602262675762177, -0.2004423588514328, 0.023659465834498405, -0.43086203932762146, -0.1939275711774826, 0.06404845416545868, 0.0740332379937172, 0.008976810611784458, 0.24230894446372986, 0.05508427321910858, 0.11324330419301987, 0.028503555804491043, 0.008790064603090286, 0.13424985110759735, 0.38346654176712036, 0.14008460938930511, -0.12905177474021912, 0.20518513023853302, -0.11185947805643082, -0.4544259309768677, 0.41900208592414856, -0.22353248298168182, -0.13059799373149872, 0.049848366528749466, -0.2996342182159424, -0.12568196654319763, -0.08230918645858765, -0.41730985045433044, -0.2251386046409607, 0.13777972757816315, 0.17336302995681763, 0.4545210599899292, -0.06848132610321045, -0.13432124257087708, 0.274427592754364, -0.1714828908443451, 0.15988504886627197, -0.022832119837403297, -0.0699828714132309, -0.07876540720462799, -0.06929633021354675, -0.3138265907764435, 0.04108670726418495, 0.11417528241872787, -0.059281814843416214, -0.22257302701473236, 0.2792675793170929, 0.017024219036102295, 0.09435728937387466, 0.0013862058985978365, 0.19832280278205872, 0.04601432755589485, 0.16521325707435608, 0.12887537479400635, -0.12507537007331848, 0.07814670354127884, -0.09837788343429565, -0.05270250514149666, 0.07265892624855042, 0.20213523507118225, 0.172430157661438, -0.22499817609786987, -0.3149552345275879, 0.2511095404624939, -0.14765197038650513, 0.08710114657878876, -0.08845247328281403, -0.04267441853880882, 0.06562653928995132, 0.476736456155777, 0.22853590548038483, -0.01648183912038803, 0.16827084124088287, 0.4884265065193176, 0.20007136464118958, -0.29148322343826294, 0.022124260663986206, -0.13314825296401978, -0.2133834809064865, 0.17117096483707428, 0.3344316780567169, 0.36347872018814087, 0.1734694242477417, 0.20993204414844513, 0.06610886007547379, -0.032712172716856, -0.16340754926204681, 0.061357468366622925, -0.11185836791992188, -0.1488318294286728, 0.4112389385700226, 0.3244157135486603, 0.15361587703227997, -0.3777529001235962, 0.291276752948761, 0.14973844587802887, 0.1518627554178238, -0.013389582745730877, 0.17342901229858398, -0.4750729501247406, -0.11180785298347473, -0.15495558083057404, 0.15575122833251953, -0.3087693750858307, -0.18502849340438843, 0.14129148423671722, 0.10243438929319382, -0.004462117794901133, 0.2299690693616867, -0.059631362557411194, 0.3149354159832001, 0.006020776927471161, -0.5304796099662781, -0.30739250779151917, -0.05414367467164993, -0.4707733988761902, -0.012345940805971622, 0.4609992206096649, -0.2426987588405609, 0.29196667671203613, -0.22423522174358368, -0.0838986486196518, -0.20262594521045685, -0.21203218400478363, 0.09530598670244217, 0.10663700848817825, 0.4123835861682892, -0.17880865931510925, -0.008273090235888958, -0.04381651431322098, 0.029702039435505867, 0.2912224531173706, -0.17169030010700226, -0.1785908341407776, -0.11133000999689102, -0.08835238963365555, 0.14945027232170105, -0.28106018900871277, -0.20274817943572998, 0.011469596065580845, -0.3783387839794159, -0.1207699105143547, 0.14151106774806976, 0.06318602710962296, 0.19678540527820587, -0.05823313072323799, 0.17488518357276917, 0.02058258466422558, 0.1483394205570221, -0.2669385075569153, -0.646524965763092, 0.22831109166145325, -0.2430548369884491, -0.06688835471868515, 0.038410261273384094, -0.3015872538089752, 0.1177910789847374, -0.08158232271671295, -0.49134352803230286, -0.010552738793194294, -0.4558912515640259, 0.3086244761943817, -0.07159828394651413, 0.044475387781858444, 0.4206596910953522, -0.002462683478370309, -0.03360075503587723, -0.19086293876171112, -0.3150305151939392, 0.12387672811746597, -0.1581401526927948, 0.3299720883369446, 0.05419297143816948, -0.042786549776792526, 0.13222505152225494, 0.5684075951576233, 0.14535517990589142, -0.08034197986125946, 0.3159600496292114, 0.11882948130369186, 0.4034346640110016, -0.3024222254753113, -0.20682810246944427, 0.056179679930210114, -0.048052169382572174, -0.2586323320865631, 0.017970046028494835, 0.09222294390201569, 0.01535291038453579, -0.1323777288198471, -0.02413996495306492, 0.022135645151138306, -0.2735554575920105, 0.0025216047652065754, -0.3864331543445587, 0.20150667428970337, 0.4415508806705475, 0.176592156291008, -0.18885591626167297, -0.14169985055923462, 0.14989235997200012, 0.22547702491283417, 0.16013702750205994, -0.04568792134523392, 0.06595633924007416, 0.2351464182138443, -0.3701852858066559, 0.10267837345600128, 0.09848145395517349, -0.06827490776777267, 0.07201507687568665, 0.0008161116857081652, 0.27459803223609924, -0.07707894593477249, 0.2790738046169281, -0.43384137749671936, 0.02340242639183998, 0.20773112773895264, -0.044902022927999496, 0.044694237411022186, -0.25267112255096436, 0.20969818532466888, 0.2986283302307129, -0.1504017561674118, 0.2786414921283722, -0.040071453899145126, -0.25902172923088074, 0.06440941244363785, 0.37877002358436584, -0.1512274444103241, -0.40953776240348816, -0.26086610555648804, 0.00809918250888586, -0.16226620972156525, 0.0933757796883583, -0.1808728128671646, 0.29143333435058594, -0.009764469228684902, -0.03580668941140175, -0.10100726038217545, 0.32680562138557434, -0.17036382853984833, 0.010959259234368801, 0.28110408782958984, -0.14580406248569489, 0.3419131934642792, 0.060426317155361176, 0.06402184069156647, 0.17099088430404663, 0.4756253659725189, -0.08768507093191147, -0.20817357301712036, -0.16588549315929413, -0.025296028703451157, -0.08273684978485107, 0.23406827449798584, -0.08051778376102448, -0.16071178019046783, 0.2102660834789276, -0.08688563853502274, -0.09371621906757355, -0.08704135566949844, 0.012891501188278198, -0.023686887696385384, 0.08386451005935669, -0.47132784128189087, 0.1676434576511383, 0.12420375645160675, -0.05180526152253151, 0.37904176115989685, -0.2187289595603943, 0.027523865923285484, 0.20062439143657684, 0.11424922198057175, 0.6171649694442749, 0.12211592495441437, -0.07267508655786514, 0.0029368088580667973, -0.24529172480106354, 0.3415047526359558, -0.34622853994369507, 0.24688901007175446, -0.2816813588142395, -0.28034597635269165, 0.17270605266094208, -0.1924581378698349, 0.23646393418312073, 0.08977365493774414, -0.07016711682081223, 0.13362158834934235, -0.08850713074207306, 0.28170856833457947, -0.010706841014325619, 0.22855225205421448, -0.11761937290430069, -0.14447911083698273, -0.01957102119922638, 0.21384704113006592, 0.012485352344810963, 0.3353184759616852, -0.05826021730899811, 0.015901027247309685, 0.18015359342098236, -0.08082246035337448, -0.19480332732200623, -0.12313317507505417, -0.11868299543857574, 0.0012879821006208658, 0.2840407192707062, -0.20372439920902252, 0.015156446024775505, 0.06492631882429123, 0.22967426478862762, 0.11147359013557434, -0.18713319301605225, 0.1602967381477356, 0.1367703229188919, 0.3419646918773651, -0.12301081418991089, -0.2972230613231659, 0.3527774214744568, -0.06825985759496689, -0.16472825407981873, -0.1953941285610199, -0.5220222473144531, -0.4138987958431244, 0.2600608766078949, 0.18961802124977112, 0.3121991753578186, 0.07803265750408173, 0.1004079207777977, -0.014093239791691303, 0.2869427502155304, -0.20698679983615875, 0.21226587891578674, 0.10766925662755966, -0.16703706979751587, 0.14764614403247833, -0.33990323543548584, -0.23504994809627533, -0.052066754549741745, 0.3169325888156891, 0.22469723224639893, -0.134026437997818, 0.44365280866622925, -0.2458905726671219, -0.0958600714802742, -0.1339603215456009, -0.028145529329776764, 0.1562252789735794, -0.2629678547382355, -0.03575539216399193, 0.04257959499955177, 0.06248638033866882, 0.16572588682174683, -0.04006555303931236, 0.06009121984243393, 0.054487910121679306, -0.32692185044288635, -0.1526605188846588, -0.3810039162635803, -0.2966788113117218, -0.10818703472614288, 0.03353048861026764, 0.004141440149396658, -0.013324005529284477, 0.2901390492916107, 0.3709745705127716, -0.34794870018959045, -0.0777551531791687, -0.25375184416770935, 0.1006595715880394, -0.3202539384365082, 0.1699167937040329, 0.07372353225946426, -0.0583096481859684, -0.016535654664039612, 0.09428216516971588, -0.3026222288608551, -0.2772940397262573, -0.012969746254384518, 0.11272338032722473, 0.054807137697935104, 0.2695971429347992, -0.10764894634485245, 0.0404742956161499, 0.023292910307645798, -0.04819726571440697, 0.21926386654376984, -0.13497987389564514, -0.13807286322116852, 0.22050733864307404, 0.15995056927204132, 0.32121941447257996, -0.09972621500492096, -0.08777002990245819, -0.11915701627731323, 0.2350645363330841, 0.033585332334041595, 0.02394658513367176, 0.03686273843050003, -0.01751003786921501, 0.1461348980665207, -0.029881048947572708, -0.15135270357131958, 0.15052802860736847, 0.26232054829597473, -0.25994327664375305, 0.007039876189082861, 0.31973379850387573, 0.22336891293525696, 0.10864976048469543, 0.0006461086450144649, -0.1364182084798813, 0.3405466377735138, 0.258425235748291, -0.19667331874370575, -0.23782627284526825, 0.3885469436645508, -0.05080651864409447, 0.0853363648056984, -0.014569232240319252, 0.4374086260795593, -0.211165651679039, 0.22430717945098877, 0.14987146854400635, 0.29368120431900024, -0.4318629205226898, 0.012743639759719372, 0.3747750222682953, 0.1390731930732727, 0.0621829479932785, 0.2875869572162628, 0.001400252804160118, 0.006158674135804176, 0.5597171187400818, -0.07446956634521484, 0.14251163601875305, 0.004276552237570286, 0.2571490705013275, -0.1812986433506012, -0.5544177889823914, 0.4394110143184662, 0.12599368393421173, -0.11689148843288422, -0.19938039779663086, -0.23023514449596405, 0.279120534658432, 0.14579802751541138, -0.2319587618112564, -0.19670937955379486, 0.1830403208732605, -0.32165175676345825, 0.07360529899597168, 0.06732549518346786, -0.060989610850811005, 0.1429520547389984, 0.11177215725183487, 0.16910992562770844, 0.1647932231426239, 0.25561612844467163, -0.1488611400127411, -0.13409240543842316, -0.2487913817167282, 0.12850819528102875, -0.01550174131989479, 0.01614481396973133, -0.08737686276435852, 0.29000043869018555, 0.0014364117523655295, -0.1904773861169815, 0.017770491540431976, 0.4018319547176361, 0.2471945881843567, 0.29093748331069946, -0.05285670608282089, 0.12295417487621307, -0.2008676528930664, 0.01747172884643078, -0.42872127890586853, 0.37786945700645447, -0.25837311148643494, -0.2916318476200104, 0.25627270340919495, 0.06820102781057358, -0.18241356313228607, -0.007356299087405205, -0.14214764535427094, 0.14147241413593292, -0.5035197138786316, 0.3143913447856903, 0.32482096552848816, -0.03797402232885361, -0.0030623700004070997, 0.17792274057865143, -0.1650943160057068, -0.1860363781452179, 0.4572029113769531, -0.07097236812114716, 0.02094569429755211, -0.319040447473526, 0.11923616379499435, -0.22459496557712555, 0.5049150586128235, 0.26606065034866333, 0.06460543721914291, -0.29512110352516174, -0.19443848729133606, -0.7159307599067688, 0.21836012601852417, -0.08524872362613678, 0.2858005464076996, 0.13961535692214966, 0.2323763370513916, -0.19371971487998962, 0.16791820526123047, 0.0035755853168666363, -0.05424345284700394, 0.24181091785430908, 0.04083437845110893, -0.2626481354236603, 0.15869837999343872, -0.09823617339134216, -0.2893235683441162, -0.012038922868669033, -0.38661935925483704, 0.41662082076072693, -0.17469844222068787, 0.12203136831521988, 0.23819516599178314, -0.19449609518051147, 0.41567641496658325, 0.27635446190834045, 0.3132994771003723, 0.2699011564254761, 0.08338063955307007, 0.1488393247127533, 0.07221770286560059, -0.18366211652755737, 0.25966349244117737, -0.2895091474056244, 0.1402835100889206, -0.2510018050670624, 0.09630598872900009, -0.4065719544887543, -0.18255570530891418, -0.3155360221862793, 0.34080997109413147, 0.09819436073303223, -0.04474695771932602, -0.08215503394603729, -0.15061911940574646, -0.27257147431373596, 0.395617812871933, 0.2849607467651367, 0.041171230375766754, 0.07600434124469757, 0.0999494194984436, -0.48429936170578003, -0.04231276735663414, 0.363196462392807, -0.32088395953178406, -0.24237442016601562, -0.273333877325058, 0.332065224647522, -0.02759156934916973, -0.3213028907775879, -0.1497495174407959, 0.014292074367403984, 0.3661472201347351, -0.04420218616724014, 0.08517522364854813, 0.28462475538253784, -0.1038479283452034, 0.4637129306793213, -0.09502825140953064, -0.17614847421646118, 0.04146617650985718, 0.12915048003196716, -0.0996752679347992, -0.1462930291891098 ]
https://github.com/huggingface/datasets/issues/2561
Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
Hi @lhoestq. Thanks for your reply. I just did minor modifications for which it should not regenerate cache (for e.g. Adding a print statement). Overall, regardless of cache miss, there should be an explicit option to allow reuse of existing cache if author knows cache shouldn't be affected.
## Describe the bug If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets. ## Steps to reproduce the bug - Create a local dataset builder class - load the local builder class file using `load_dataset` and let the cache build - update the file's content - The cache should rebuilt. ## Expected results With `ignore_verifications=True`, `load_dataset` should pick up existing cache. ## Actual results Creates new cache. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0
48
Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` ## Describe the bug If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets. ## Steps to reproduce the bug - Create a local dataset builder class - load the local builder class file using `load_dataset` and let the cache build - update the file's content - The cache should rebuilt. ## Expected results With `ignore_verifications=True`, `load_dataset` should pick up existing cache. ## Actual results Creates new cache. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0 Hi @lhoestq. Thanks for your reply. I just did minor modifications for which it should not regenerate cache (for e.g. Adding a print statement). Overall, regardless of cache miss, there should be an explicit option to allow reuse of existing cache if author knows cache shouldn't be affected.
[ -0.2966100573539734, 0.4845605492591858, 0.04970746859908104, 0.1848863661289215, 0.0803922787308693, 0.21865548193454742, 0.2824614644050598, 0.37450700998306274, 0.1949125975370407, 0.17794625461101532, 0.2753896117210388, 0.35446998476982117, 0.08640958368778229, -0.2514213025569916, -0.004440490622073412, 0.2905791103839874, 0.05805312842130661, 0.14535212516784668, 0.18567198514938354, -0.006389640737324953, -0.06189575791358948, -0.059082064777612686, -0.04725072532892227, -0.265509694814682, -0.42177584767341614, 0.18863020837306976, 0.08113066107034683, -0.002848969306796789, -0.03975284844636917, -0.49427762627601624, 0.4173814654350281, 0.25959742069244385, 0.041010402143001556, 0.17198333144187927, -0.00010974200995406136, 0.17757345736026764, 0.2939721643924713, 0.02042517438530922, -0.3915855884552002, 0.12808626890182495, -0.3183545172214508, -0.36091935634613037, -0.015063603408634663, -0.11680847406387329, -0.14706891775131226, -0.20581437647342682, -0.07596464455127716, -0.31381499767303467, 0.34387630224227905, 0.033967725932598114, 0.2579467296600342, 0.0727289691567421, -0.1777898222208023, 0.005154263693839312, 0.06328197568655014, -0.060098495334386826, -0.031800590455532074, 0.15500737726688385, 0.3051302433013916, 0.04620831459760666, -0.39100754261016846, 0.4045752286911011, -0.20282763242721558, 0.10222332924604416, 0.42069581151008606, -0.23426638543605804, 0.12391705811023712, -0.032636940479278564, 0.3514983355998993, 0.0883088931441307, 0.6280643939971924, -0.36159446835517883, -0.2906776964664459, -0.28044459223747253, -0.18892203271389008, 0.008940082043409348, 0.1707502156496048, -0.24702546000480652, -0.16977199912071228, 0.28251972794532776, -0.41029518842697144, -0.3994596004486084, 0.02054343745112419, -0.1617594212293625, 0.20467609167099, -0.27363312244415283, 0.08416377007961273, -0.09003478288650513, -0.17392955720424652, 0.2221589833498001, 0.45344939827919006, -0.456678569316864, -0.05712033063173294, 0.24589720368385315, -0.4898160994052887, 0.04147672653198242, 0.3280723989009857, 0.39561912417411804, 0.2704193890094757, 0.33950191736221313, -0.08733782917261124, 0.23068340122699738, 0.14289285242557526, 0.13237181305885315, -0.07609409093856812, 0.34610602259635925, 0.04492871090769768, -0.004785090684890747, 0.23424020409584045, 0.21244782209396362, -0.4609408974647522, -0.036311373114585876, 0.09727641940116882, -0.21084193885326385, 0.5844724178314209, -0.05535922944545746, 0.01816427893936634, -0.3203703463077545, -0.0643923431634903, 0.23629195988178253, -0.03523513674736023, -0.15522713959217072, 0.18383362889289856, 0.18088677525520325, -0.02782578021287918, 0.21972501277923584, -0.15851399302482605, -0.1871972233057022, -0.23853887617588043, -0.4174994230270386, -0.38151833415031433, -0.20567399263381958, 0.02552023157477379, 0.3334382474422455, 0.46312886476516724, -0.49868133664131165, 0.3289690613746643, 0.24539323151111603, -0.08094561845064163, 0.038273490965366364, 0.20303092896938324, -0.06756512820720673, 0.19072000682353973, 0.22641582787036896, -0.32423827052116394, 0.046667128801345825, 0.01384993176907301, -0.14220738410949707, -0.06838853657245636, 0.37748557329177856, -0.10554008930921555, -0.7720667123794556, 0.05772128328680992, 0.14674332737922668, -0.23083055019378662, 0.05977718532085419, 0.2950684428215027, 0.09414250403642654, 0.43548882007598877, -0.30471286177635193, -0.07149732112884521, -0.039928823709487915, -0.29869839549064636, -0.171107679605484, 0.45471975207328796, 0.7276176810264587, -0.42518049478530884, 0.05801946669816971, -0.09661868959665298, 0.09036984294652939, -0.0047409445978701115, 0.1897815316915512, -0.2760145366191864, 0.35975217819213867, -0.33684223890304565, -0.44994664192199707, 0.19377875328063965, -0.33049556612968445, -0.7936919331550598, 0.23643670976161957, 0.23611706495285034, 0.2683826982975006, 0.15077686309814453, 0.09128445386886597, -0.13035733997821808, -0.17219462990760803, 0.07605425268411636, 0.20313312113285065, -0.21563716232776642, -0.06704412400722504, -0.4511631727218628, -0.2889777421951294, 0.053578536957502365, 0.013158602640032768, 0.08855330944061279, 0.30962198972702026, 0.05859516188502312, 0.11829331517219543, 0.053700562566518784, -0.0029383753426373005, 0.14188651740550995, 0.2921987473964691, 0.14242792129516602, -0.18628494441509247, 0.18636903166770935, -0.11509500443935394, -0.4901275932788849, 0.4268355965614319, -0.2512300908565521, -0.23528560996055603, 0.04205206036567688, -0.30221542716026306, -0.10987123101949692, -0.14069466292858124, -0.382951021194458, -0.203412726521492, 0.12350759655237198, 0.2031826674938202, 0.4170447289943695, -0.04609841853380203, -0.18303817510604858, 0.3019635081291199, -0.27470332384109497, 0.17614546418190002, -0.06561042368412018, -0.13440927863121033, -0.09138438105583191, 0.0057709598913788795, -0.32303738594055176, 0.03963615000247955, 0.1474548876285553, -0.09760592877864838, -0.1709592193365097, 0.27897101640701294, 0.00862586498260498, 0.13685095310211182, -0.012912306934595108, 0.24771781265735626, 0.04812365025281906, 0.13322800397872925, 0.08038293570280075, -0.19500860571861267, 0.07641357183456421, -0.07524846494197845, -0.022190576419234276, 0.05554305389523506, 0.10952368378639221, 0.051984142512083054, -0.22651779651641846, -0.32051730155944824, 0.21705476939678192, -0.20789045095443726, 0.062281087040901184, -0.14898835122585297, -0.07197954505681992, 0.08992784470319748, 0.44329559803009033, 0.17691950500011444, -0.028811683878302574, 0.15143996477127075, 0.376135915517807, 0.23063643276691437, -0.2651820778846741, -0.05842788517475128, -0.032497674226760864, -0.20066699385643005, 0.2052026093006134, 0.4338604211807251, 0.26647037267684937, 0.17730481922626495, 0.2373427003622055, 0.05737448111176491, 0.002419610507786274, -0.15755559504032135, 0.04317306727170944, -0.17919392883777618, -0.17148905992507935, 0.44724535942077637, 0.264668345451355, 0.2256845235824585, -0.36574575304985046, 0.3604893088340759, 0.19178177416324615, 0.1741560697555542, 0.00683320639654994, 0.14424607157707214, -0.4783358871936798, -0.11799857765436172, -0.17821529507637024, 0.23909272253513336, -0.2455628514289856, -0.20180363953113556, 0.13038691878318787, 0.1122717559337616, -0.06414585560560226, 0.1965552270412445, -0.16863681375980377, 0.36771634221076965, -0.08148005604743958, -0.5583730340003967, -0.345939576625824, 0.002071419497951865, -0.4155191481113434, 0.0044739036820828915, 0.4792739748954773, -0.328311949968338, 0.3057936131954193, -0.26840120553970337, -0.10867443680763245, -0.23059482872486115, -0.2436314821243286, 0.08330787718296051, 0.18052160739898682, 0.31124335527420044, -0.26693639159202576, -0.05699320510029793, -0.07041994482278824, 0.10756668448448181, 0.11304526776075363, -0.17875206470489502, -0.15012279152870178, -0.18280254304409027, -0.06436292827129364, 0.1532534807920456, -0.353260338306427, -0.26498594880104065, 0.02089511789381504, -0.34031158685684204, -0.0538647286593914, 0.05466168746352196, 0.012882106006145477, 0.21546554565429688, -0.13870614767074585, 0.12859584391117096, 0.027469061315059662, 0.17157141864299774, -0.30665498971939087, -0.6944124698638916, 0.21792156994342804, -0.17042937874794006, -0.026471545919775963, 0.07311393320560455, -0.2889467477798462, 0.14353087544441223, 0.019948840141296387, -0.5505862236022949, -0.030402235686779022, -0.379671573638916, 0.28391653299331665, -0.13020333647727966, -0.007642638403922319, 0.4433671832084656, 0.0021885705646127462, 0.013910905458033085, -0.22556696832180023, -0.23004589974880219, 0.15805289149284363, -0.17090721428394318, 0.3343120813369751, 0.0929652601480484, -0.1266644448041916, 0.25861018896102905, 0.5497052669525146, 0.23411379754543304, -0.018924744799733162, 0.36202681064605713, 0.20535258948802948, 0.5025871396064758, -0.2435247302055359, -0.1163853332400322, 0.06307859718799591, -0.10858218371868134, -0.28575173020362854, -0.06777510046958923, 0.08947990089654922, 0.056004613637924194, -0.1363673061132431, 0.010467889718711376, -0.01875924877822399, -0.293415904045105, -0.06427229195833206, -0.4409804940223694, 0.2686772644519806, 0.4563598036766052, 0.1301659345626831, -0.10317987203598022, -0.10591535270214081, 0.1789332628250122, 0.31603682041168213, 0.27493250370025635, 0.05546210706233978, 0.044978342950344086, 0.2654496133327484, -0.37047871947288513, 0.13032793998718262, 0.098307766020298, 0.060028884559869766, 0.08491174876689911, 0.03113194741308689, 0.18524399399757385, -0.0033049052581191063, 0.25005003809928894, -0.559052586555481, 0.023562368005514145, 0.13754110038280487, 0.0043951706029474735, 0.18345989286899567, -0.22399477660655975, 0.26304861903190613, 0.23458246886730194, -0.12395144253969193, 0.2270336002111435, 0.05290503427386284, -0.1990065723657608, 0.01871456764638424, 0.3892872929573059, -0.11646927893161774, -0.4054346978664398, -0.18742084503173828, 0.04910764470696449, -0.17122845351696014, 0.07847081869840622, -0.05900087207555771, 0.15182603895664215, -0.002144079189747572, 0.022861437872052193, -0.14532244205474854, 0.3600175678730011, -0.15977215766906738, -0.019976234063506126, 0.2620857059955597, -0.0905335545539856, 0.3267653286457062, 0.07064175605773926, 0.030549880117177963, 0.20732992887496948, 0.5026635527610779, -0.20050518214702606, -0.17890259623527527, -0.18217073380947113, -0.03255796432495117, -0.08924409747123718, 0.22495613992214203, -0.09737592935562134, -0.19545434415340424, 0.2267179787158966, -0.17405623197555542, -0.08463583886623383, -0.11701730638742447, -0.04459397494792938, -0.02848416194319725, 0.04231071099638939, -0.47396349906921387, 0.11511265486478806, 0.17917019128799438, -0.05623604729771614, 0.3488113582134247, -0.2945679724216461, -0.019916744902729988, 0.18366333842277527, 0.045803602784872055, 0.5849223136901855, 0.09381477534770966, -0.10630828887224197, -0.11293286830186844, -0.26177719235420227, 0.39568787813186646, -0.33509084582328796, 0.2682983875274658, -0.2448900192975998, -0.2729746103286743, 0.15062077343463898, -0.16872797906398773, 0.2396330088376999, 0.10266267508268356, -0.060553934425115585, 0.20226120948791504, -0.0745357871055603, 0.26399368047714233, 0.03824152424931526, 0.22787587344646454, -0.1351742297410965, -0.0660475641489029, 0.09564951807260513, 0.16952191293239594, -0.004629869479686022, 0.313681960105896, -0.1343437284231186, 0.026059266179800034, 0.27400392293930054, -0.09832265228033066, -0.24545234441757202, -0.13507798314094543, -0.14140011370182037, 0.01086408644914627, 0.1976475715637207, -0.14243878424167633, 0.08259294927120209, 0.11559715121984482, 0.27364832162857056, 0.10745453089475632, -0.16140933334827423, 0.12614722549915314, 0.12745752930641174, 0.2821272313594818, -0.17284920811653137, -0.2204596996307373, 0.3994208574295044, -0.00480111688375473, -0.12511011958122253, -0.21569043397903442, -0.5188755989074707, -0.434600293636322, 0.2353595495223999, 0.18762123584747314, 0.3133314251899719, 0.08224337548017502, 0.04463890194892883, 0.05066429823637009, 0.28566089272499084, -0.2207334041595459, 0.18870818614959717, 0.12948563694953918, -0.11029206961393356, 0.18521931767463684, -0.4093117415904999, -0.25120675563812256, -0.05825066193938255, 0.28182002902030945, 0.2550120949745178, -0.23354120552539825, 0.3360429108142853, -0.2673620581626892, -0.07267062366008759, -0.11859658360481262, -0.0566902719438076, 0.06481217592954636, -0.21454071998596191, -0.0365523137152195, 0.035025984048843384, 0.06481864303350449, 0.13717278838157654, -0.08903401345014572, 0.1072421446442604, 0.06262434273958206, -0.3028651177883148, -0.19942359626293182, -0.36945533752441406, -0.27321746945381165, -0.1160043403506279, 0.11177050322294235, 0.015584354288876057, -0.04421884939074516, 0.22396287322044373, 0.29317325353622437, -0.326852023601532, -0.03563959151506424, -0.20118744671344757, 0.07786275446414948, -0.31650078296661377, 0.21159110963344574, 0.07819050550460815, -0.12657736241817474, -0.06210491061210632, 0.12340797483921051, -0.3284885287284851, -0.23652850091457367, -0.004544422030448914, 0.129679337143898, 0.10192737728357315, 0.2676270604133606, -0.1630534678697586, -0.03431672230362892, 0.05065666139125824, 0.01709090732038021, 0.17996932566165924, -0.03156565502285957, -0.08698129653930664, 0.34480607509613037, 0.09508105367422104, 0.3468889594078064, -0.0890008881688118, -0.07349615544080734, -0.12033049762248993, 0.19327135384082794, 0.02150435745716095, 0.09285953640937805, 0.02242065593600273, 0.015367154031991959, 0.10913389176130295, -0.054668694734573364, -0.13895045220851898, 0.17867667973041534, 0.17558282613754272, -0.21139803528785706, -0.007110297214239836, 0.3065178692340851, 0.18432831764221191, 0.07514134794473648, -0.014477064833045006, -0.15491458773612976, 0.36586934328079224, 0.23364800214767456, -0.25629112124443054, -0.2456650733947754, 0.3817504048347473, 0.04604341834783554, 0.05810585618019104, 0.06724543124437332, 0.5152275562286377, -0.29259616136550903, 0.3185659945011139, 0.13486981391906738, 0.27336838841438293, -0.4803123474121094, 0.11807774007320404, 0.3190513551235199, 0.1784733533859253, 0.014569658786058426, 0.24047550559043884, 0.07970859855413437, 0.0531543530523777, 0.4855407774448395, -0.08296982944011688, 0.14100180566310883, -0.010191677138209343, 0.3159424960613251, -0.18351757526397705, -0.5806639194488525, 0.4861353933811188, 0.138770192861557, -0.15313826501369476, -0.05757102742791176, -0.2067170888185501, 0.2538536489009857, 0.17924386262893677, -0.22170832753181458, -0.16570696234703064, 0.11093950271606445, -0.33875343203544617, 0.06919805705547333, 0.14418452978134155, -0.1334666758775711, 0.13948242366313934, 0.08604560047388077, 0.19330497086048126, 0.19970358908176422, 0.3072153925895691, -0.1525801569223404, -0.17209097743034363, -0.17579135298728943, 0.13467049598693848, 0.02324836514890194, 0.07330071181058884, -0.11885051429271698, 0.23485086858272552, -0.030356671661138535, -0.22721101343631744, 0.002851655939593911, 0.41541293263435364, 0.19968464970588684, 0.19920000433921814, 0.01222396083176136, 0.13011734187602997, -0.2028799206018448, 0.10176362842321396, -0.4308284521102905, 0.43208789825439453, -0.25027957558631897, -0.36893129348754883, 0.28017157316207886, 0.026697568595409393, -0.11334464699029922, 0.09111704677343369, -0.1685042530298233, 0.11270728707313538, -0.5603570938110352, 0.3034968674182892, 0.34996768832206726, -0.012324963696300983, 0.048785462975502014, 0.22303245961666107, -0.14272591471672058, -0.1782524287700653, 0.4750250279903412, -0.11033892631530762, 0.02649131417274475, -0.27791160345077515, 0.12596242129802704, -0.18487714231014252, 0.3783935010433197, 0.3177627623081207, -0.06036817654967308, -0.2719249725341797, -0.16750043630599976, -0.7562371492385864, 0.21221117675304413, -0.048838116228580475, 0.33288607001304626, 0.20078471302986145, 0.15938909351825714, -0.1959911435842514, 0.14066074788570404, -0.051837533712387085, -0.03799867630004883, 0.23168258368968964, 0.011109492741525173, -0.20351029932498932, 0.10858070850372314, -0.06873570382595062, -0.32805949449539185, 0.03589747101068497, -0.39658668637275696, 0.34462684392929077, -0.1365157514810562, 0.0843563824892044, 0.2075681835412979, -0.19354400038719177, 0.3796265423297882, 0.2734096646308899, 0.337859570980072, 0.35908517241477966, 0.01531222928315401, 0.13035042583942413, 0.018846582621335983, -0.14755651354789734, 0.21753835678100586, -0.2528638243675232, 0.1426430344581604, -0.25022751092910767, 0.05008217692375183, -0.5288494825363159, -0.2059171348810196, -0.31604886054992676, 0.3023279011249542, 0.13042034208774567, -0.056755390018224716, -0.1321529597043991, -0.12842479348182678, -0.32660186290740967, 0.46131062507629395, 0.29880374670028687, 0.07991788536310196, 0.07405316829681396, 0.1341235190629959, -0.4689101278781891, -0.040112268179655075, 0.34173884987831116, -0.31549105048179626, -0.1534038633108139, -0.30659201741218567, 0.3315872550010681, -0.0630788505077362, -0.328174352645874, -0.23686625063419342, 0.010855174623429775, 0.3737574815750122, -0.06342531740665436, 0.12177814543247223, 0.3035767674446106, -0.17612792551517487, 0.4700823426246643, -0.05235213413834572, -0.0707978680729866, 0.1152307540178299, 0.09131971001625061, -0.05544891953468323, -0.18460442125797272 ]
https://github.com/huggingface/datasets/issues/2561
Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
The cache is based on the hash of the dataset builder's code, so changing the code makes it recompute the cache. You could still rename the cache directory of your previous computation to the new expected cache directory if you want to avoid having to recompute it and if you're sure that it would generate the exact same result. The verifications are data integrity verifications: it checks the checksums of the downloaded files, as well as the size of the generated splits.
## Describe the bug If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets. ## Steps to reproduce the bug - Create a local dataset builder class - load the local builder class file using `load_dataset` and let the cache build - update the file's content - The cache should rebuilt. ## Expected results With `ignore_verifications=True`, `load_dataset` should pick up existing cache. ## Actual results Creates new cache. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0
82
Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` ## Describe the bug If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets. ## Steps to reproduce the bug - Create a local dataset builder class - load the local builder class file using `load_dataset` and let the cache build - update the file's content - The cache should rebuilt. ## Expected results With `ignore_verifications=True`, `load_dataset` should pick up existing cache. ## Actual results Creates new cache. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0 The cache is based on the hash of the dataset builder's code, so changing the code makes it recompute the cache. You could still rename the cache directory of your previous computation to the new expected cache directory if you want to avoid having to recompute it and if you're sure that it would generate the exact same result. The verifications are data integrity verifications: it checks the checksums of the downloaded files, as well as the size of the generated splits.
[ -0.3809875249862671, 0.4386592507362366, -0.0031961980275809765, 0.17506973445415497, 0.0950205847620964, 0.15524223446846008, 0.23175182938575745, 0.41996970772743225, 0.15906161069869995, 0.309204638004303, 0.16211599111557007, 0.28301164507865906, 0.11000045388936996, -0.20820771157741547, -0.03214151784777641, 0.22181256115436554, 0.06826573610305786, 0.18489280343055725, 0.15041886270046234, -0.01821957156062126, -0.10427578538656235, -0.03407042846083641, -0.009553344920277596, -0.24195480346679688, -0.4294945299625397, 0.08296077698469162, 0.06355667859315872, 0.16019576787948608, -0.08795841783285141, -0.4699014127254486, 0.3021027445793152, 0.24755720794200897, -0.15265631675720215, 0.27255308628082275, -0.00010499652125872672, 0.17802846431732178, 0.3562343418598175, 0.05685100704431534, -0.47118061780929565, 0.2416318655014038, -0.3674049377441406, -0.4435734152793884, -0.15491679310798645, -0.15375389158725739, -0.018380284309387207, -0.194101482629776, -0.11457230150699615, -0.2818768322467804, 0.3508929908275604, 0.07161057740449905, 0.28270423412323, 0.14059405028820038, -0.20494860410690308, -0.015573658049106598, 0.19997018575668335, -0.014822132885456085, -0.028133507817983627, 0.15250639617443085, 0.18520723283290863, 0.0982397198677063, -0.40115541219711304, 0.3540208637714386, -0.20523479580879211, 0.16693115234375, 0.3523956835269928, -0.1947120577096939, 0.04733361303806305, -0.0936719998717308, 0.3847614526748657, 0.126073956489563, 0.5368219614028931, -0.2587716579437256, -0.35347241163253784, -0.2496432363986969, -0.28848204016685486, -0.014981170184910297, 0.2838676869869232, -0.12217377126216888, -0.19459812343120575, 0.15720875561237335, -0.4552614688873291, -0.23259469866752625, 0.08083421736955643, -0.2229064255952835, 0.06297500431537628, -0.22960062325000763, 0.14359138906002045, -0.08748152107000351, 0.044117480516433716, 0.22348764538764954, 0.34535321593284607, -0.4724613130092621, -0.040299929678440094, 0.2510865032672882, -0.4561103582382202, -0.07664939016103745, 0.25874143838882446, 0.3883616328239441, 0.26042822003364563, 0.3886112570762634, -0.1932557076215744, 0.24563395977020264, 0.1801901012659073, 0.09846237301826477, -0.12473967671394348, 0.33540934324264526, -0.04900960624217987, 0.00475406413897872, 0.3091166019439697, 0.2427244931459427, -0.3884592652320862, 0.006637089885771275, 0.1257503479719162, -0.2951217591762543, 0.4921705424785614, 0.026052117347717285, -0.05782588943839073, -0.3234989643096924, -0.0804763212800026, 0.18067915737628937, 0.02339823916554451, -0.12738725543022156, 0.1667691469192505, 0.19578462839126587, -0.08267311751842499, 0.1365429311990738, -0.3365084230899811, -0.24016094207763672, -0.3418677747249603, -0.33353734016418457, -0.39554929733276367, -0.1528071165084839, 0.025593619793653488, 0.32716643810272217, 0.49255651235580444, -0.526060938835144, 0.34804651141166687, 0.1541675478219986, -0.054354190826416016, 0.09984930604696274, 0.22373053431510925, -0.2249774932861328, 0.20718327164649963, 0.35389789938926697, -0.2637627124786377, -0.026921458542346954, -0.008456647396087646, -0.0912477970123291, -0.10133536159992218, 0.2589486837387085, -0.12300460040569305, -0.7289391160011292, 0.11847101897001266, 0.21284636855125427, -0.27725693583488464, 0.08543293178081512, 0.27860119938850403, 0.07544161379337311, 0.3407643735408783, -0.3217763304710388, -0.055651966482400894, -0.08204981684684753, -0.27803605794906616, -0.12905481457710266, 0.4463101625442505, 0.705308198928833, -0.45580989122390747, 0.1331191509962082, -0.16719284653663635, -0.05536138266324997, 0.00922034215182066, 0.22760353982448578, -0.23566043376922607, 0.30703839659690857, -0.3199961483478546, -0.2536695897579193, 0.1878541111946106, -0.224967360496521, -0.825517475605011, 0.2686668038368225, 0.14926132559776306, 0.1901012510061264, 0.21136106550693512, 0.04490577429533005, 0.025354718789458275, -0.2250095158815384, 0.00020961368863936514, 0.24080897867679596, -0.20487308502197266, 0.07763376086950302, -0.47155019640922546, -0.23089206218719482, 0.049450188875198364, 0.030416840687394142, 0.06501492857933044, 0.1332586109638214, 0.12750834226608276, 0.14798296988010406, 0.0028198871295899153, -0.02823488786816597, 0.12792567908763885, 0.28972503542900085, 0.07259953022003174, -0.16065479815006256, 0.2341431975364685, -0.12995553016662598, -0.4772048592567444, 0.4268709123134613, -0.24302032589912415, -0.16127179563045502, -0.0033578057773411274, -0.3678756058216095, -0.13158471882343292, -0.09593594819307327, -0.32273629307746887, -0.17618325352668762, 0.16269952058792114, 0.22173714637756348, 0.4972620904445648, -0.08636634051799774, -0.0921616405248642, 0.23643392324447632, -0.2325899451971054, 0.1563909947872162, -0.04374773055315018, -0.061953432857990265, -0.09655290842056274, -0.003732395125553012, -0.2672520577907562, 0.06371365487575531, 0.06128300726413727, -0.14380218088626862, -0.2119126170873642, 0.3813093602657318, 0.1824178248643875, 0.14830632507801056, 0.10388168692588806, 0.20736055076122284, 0.045435577630996704, 0.09153546392917633, 0.20940615236759186, -0.13869912922382355, 0.08829375356435776, -0.06921938806772232, -0.10168485343456268, 0.09413466602563858, -0.0026222351007163525, 0.11503611505031586, -0.09741193056106567, -0.3273005187511444, 0.24369066953659058, -0.09792295843362808, 0.04821749031543732, -0.15211240947246552, -0.022417403757572174, 0.10892432928085327, 0.4705243408679962, 0.24945957958698273, 0.0959344357252121, 0.13081398606300354, 0.56660395860672, 0.09511271119117737, -0.30640026926994324, 0.008478653617203236, -0.0920879915356636, -0.2652546167373657, 0.08583588153123856, 0.45673486590385437, 0.3705621361732483, 0.18728463351726532, 0.29713642597198486, 0.043376948684453964, 0.025068514049053192, -0.19818075001239777, 0.08526132255792618, -0.049864813685417175, -0.20390285551548004, 0.3712655007839203, 0.22855398058891296, 0.16485458612442017, -0.40264880657196045, 0.24531982839107513, 0.18850040435791016, 0.18177850544452667, 0.007612253539264202, 0.21014930307865143, -0.4117991030216217, -0.13937772810459137, -0.19304248690605164, 0.15589392185211182, -0.30651870369911194, -0.29439982771873474, 0.1703380048274994, -0.001887461170554161, -0.11349205672740936, 0.2163657695055008, -0.04385428503155708, 0.3727187514305115, -0.014459260739386082, -0.5106044411659241, -0.35189729928970337, -0.020488586276769638, -0.42195460200309753, 0.06384740769863129, 0.47550463676452637, -0.24971112608909607, 0.3643746078014374, -0.3301582932472229, -0.146728053689003, -0.1775904893875122, -0.25303947925567627, 0.057176101952791214, 0.002379331272095442, 0.24410374462604523, -0.11946167051792145, 0.009494481608271599, 0.09017230570316315, 0.07311324030160904, 0.13421069085597992, -0.1966596394777298, -0.2162158191204071, -0.12328614294528961, 0.0012073663529008627, 0.16174007952213287, -0.4055030345916748, -0.27196335792541504, 0.00343108456581831, -0.3567606508731842, 0.00149468460585922, 0.10710128396749496, 0.05387275293469429, 0.15467174351215363, -0.139568030834198, 0.20752179622650146, 0.035873327404260635, 0.0946289449930191, -0.33719709515571594, -0.5732307434082031, 0.1985996663570404, -0.1797294318675995, -0.08404308557510376, 0.08579789102077484, -0.262357622385025, 0.09238234162330627, 0.024669501930475235, -0.529371440410614, 0.008981036953628063, -0.5315983295440674, 0.2878866493701935, -0.12230910360813141, 0.013754518702626228, 0.4414840042591095, 0.01980445720255375, -0.1030043214559555, -0.20688942074775696, -0.20043109357357025, 0.08415719121694565, -0.2701408565044403, 0.21289314329624176, -0.06143171340227127, -0.0904942974448204, 0.19221656024456024, 0.6441385746002197, 0.17057043313980103, -0.02612435817718506, 0.26315250992774963, 0.23550301790237427, 0.5081673860549927, -0.3046400845050812, -0.15366363525390625, 0.17517372965812683, -0.11243365705013275, -0.2807418704032898, 0.09429068118333817, 0.0032026495318859816, -0.07605729252099991, -0.10717879235744476, 0.005423632450401783, 0.07173599302768707, -0.21134436130523682, 0.0174797922372818, -0.37708204984664917, 0.1748269498348236, 0.38059648871421814, 0.21628019213676453, -0.14430303871631622, -0.11608252674341202, 0.18505682051181793, 0.29572972655296326, 0.17475026845932007, 0.01811102405190468, 0.013210650533437729, 0.20206478238105774, -0.31035205721855164, 0.12603819370269775, 0.18751998245716095, -0.042107321321964264, 0.03420362249016762, -0.07160467654466629, 0.23431117832660675, -0.050252221524715424, 0.31095752120018005, -0.46990495920181274, 0.039635058492422104, 0.13168475031852722, 0.00030047414475120604, 0.1948232352733612, -0.2603045701980591, 0.0965258777141571, 0.219157412648201, -0.01780533604323864, 0.3281485438346863, -0.061430610716342926, -0.1760919839143753, 0.09454578161239624, 0.3984561264514923, -0.08204351365566254, -0.32541513442993164, -0.3235056400299072, 0.036930475383996964, -0.19154620170593262, 0.1425374150276184, -0.10919230431318283, 0.18120990693569183, -0.13640208542346954, -0.001845567487180233, -0.08896776288747787, 0.23006093502044678, -0.14548620581626892, 0.03936830908060074, 0.23797595500946045, -0.12252312153577805, 0.2264852374792099, 0.06669124215841293, 0.09995150566101074, 0.22872959077358246, 0.48579126596450806, -0.19692638516426086, -0.15247155725955963, -0.14136654138565063, -0.05938419699668884, -0.1390206217765808, 0.2855299115180969, -0.06803855299949646, -0.26391875743865967, 0.2175983041524887, -0.004712710157036781, -0.12727008759975433, -0.013721112161874771, 0.042212340980768204, -0.02545573003590107, 0.034945543855428696, -0.4442017376422882, 0.1618109494447708, 0.18684709072113037, -0.0335099920630455, 0.27810731530189514, -0.15211175382137299, 0.07958292961120605, 0.13301174342632294, 0.12495367228984833, 0.6822168827056885, 0.13621143996715546, -0.11459550261497498, 0.0002064158907160163, -0.2710430920124054, 0.37847402691841125, -0.3629117012023926, 0.24405606091022491, -0.19738933444023132, -0.3495340049266815, 0.13364653289318085, -0.16394972801208496, 0.285256028175354, 0.030786806717514992, -0.14365723729133606, 0.18676188588142395, -0.0287961196154356, 0.19450491666793823, 0.009616796858608723, 0.30095887184143066, -0.17344488203525543, -0.11991788446903229, 0.1038740798830986, 0.2350698858499527, 0.020589254796504974, 0.2723824381828308, -0.0777697041630745, 0.03245321288704872, 0.16453193128108978, -0.06915905326604843, -0.2880915403366089, -0.1545042097568512, -0.08715855330228806, 0.04424145072698593, 0.11702800542116165, -0.10488919168710709, -0.027732092887163162, 0.03294805809855461, 0.27324098348617554, 0.18823662400245667, -0.1695501059293747, 0.19028499722480774, 0.1060740128159523, 0.31678614020347595, -0.059758350253105164, -0.24416540563106537, 0.4073331356048584, -0.08082801103591919, -0.11480218917131424, -0.2614191174507141, -0.5250526070594788, -0.33272305130958557, 0.3132180869579315, 0.10880822688341141, 0.286995530128479, 0.043615203350782394, 0.14057761430740356, -0.04388614743947983, 0.15774038434028625, -0.21743135154247284, 0.2091280221939087, 0.04274650290608406, -0.10724518448114395, 0.14308717846870422, -0.3217618763446808, -0.32788413763046265, -0.11947298794984818, 0.2778666913509369, 0.17663417756557465, -0.12319056689739227, 0.3894489109516144, -0.2933330237865448, -0.1793525069952011, -0.17653514444828033, -0.04027490317821503, -0.041162267327308655, -0.26974183320999146, 0.0075380816124379635, -0.04017430543899536, 0.005067596212029457, 0.10451840609312057, -0.07125489413738251, 0.12293203175067902, 0.14393676817417145, -0.33695417642593384, -0.24676740169525146, -0.3537614643573761, -0.26538991928100586, -0.14808569848537445, 0.13091717660427094, -0.03454892337322235, -0.012209152802824974, 0.2249915599822998, 0.38297468423843384, -0.3870070278644562, -0.04686747491359711, -0.26494115591049194, 0.08123275637626648, -0.3280065357685089, 0.0506659559905529, 0.09093029052019119, -0.07474628835916519, 0.00900273583829403, 0.1508876085281372, -0.34631022810935974, -0.29398688673973083, 0.054027460515499115, 0.10594382137060165, -0.04690615460276604, 0.1963614970445633, -0.11997582763433456, 0.11902374029159546, -0.0014980912674218416, -0.049135081470012665, 0.21239516139030457, -0.21606311202049255, -0.15637272596359253, 0.2548011541366577, 0.1707793027162552, 0.3533981442451477, -0.07993356138467789, -0.02746553346514702, -0.18303771317005157, 0.19361364841461182, -0.043757349252700806, 0.1320660263299942, -0.04508567228913307, -0.08735986053943634, 0.1132311299443245, -0.03149872645735741, -0.03363948315382004, 0.13848592340946198, 0.24543774127960205, -0.16365180909633636, -0.003687822027131915, 0.22537583112716675, 0.2210753709077835, 0.16366614401340485, 0.07177834957838058, -0.2607775330543518, 0.31724831461906433, 0.2696537971496582, -0.18204843997955322, -0.20110170543193817, 0.33719196915626526, -0.024724630638957024, 0.13180072605609894, 0.03419865667819977, 0.4432097375392914, -0.1671999841928482, 0.22551481425762177, 0.1544448584318161, 0.34341537952423096, -0.3536665141582489, 0.04174739494919777, 0.4806295335292816, 0.14291945099830627, 0.09763572365045547, 0.21863503754138947, -0.035970985889434814, 0.05621533468365669, 0.498613566160202, -0.12540505826473236, 0.3106616139411926, -0.06867856532335281, 0.2836296856403351, -0.20625661313533783, -0.5564460754394531, 0.40187278389930725, 0.16932129859924316, -0.1316092610359192, -0.11216146498918533, -0.16349995136260986, 0.2880297303199768, 0.029241614043712616, -0.21761395037174225, -0.2586454153060913, 0.15242791175842285, -0.2848620116710663, 0.07627065479755402, 0.08214309811592102, -0.08519856631755829, 0.055417902767658234, 0.13261696696281433, 0.1994863748550415, 0.2265622466802597, 0.34739845991134644, -0.09897483885288239, -0.1429736167192459, -0.0877811536192894, 0.12336064875125885, -0.09859614819288254, 0.07120521366596222, -0.14799682796001434, 0.18240712583065033, 0.09585785120725632, -0.15354180335998535, 0.06405863165855408, 0.3616480827331543, 0.25069451332092285, 0.212377667427063, -0.09893494844436646, 0.02596033178269863, -0.1711537390947342, 0.018798325210809708, -0.37251707911491394, 0.4313400089740753, -0.29850849509239197, -0.28172868490219116, 0.34235700964927673, 0.08575586974620819, -0.1949165165424347, 0.0019105561077594757, -0.22042639553546906, 0.027450064197182655, -0.48456254601478577, 0.31012171506881714, 0.3515855669975281, -0.03093160130083561, -0.09049501270055771, 0.20668920874595642, -0.20653128623962402, -0.20101092755794525, 0.2995295226573944, -0.11960367113351822, 0.0717511922121048, -0.2509055435657501, 0.13034486770629883, -0.2079915553331375, 0.6261104345321655, 0.35181376338005066, 0.02819627709686756, -0.23921531438827515, -0.17702089250087738, -0.670855700969696, 0.20104627311229706, -0.09540055692195892, 0.18959715962409973, 0.08600600063800812, 0.20775330066680908, -0.14472243189811707, 0.15909551084041595, -0.0037628256250172853, 0.06489776819944382, 0.21737776696681976, -0.005004846956580877, -0.28268924355506897, 0.1956053227186203, -0.1473674774169922, -0.35279667377471924, 0.005521783139556646, -0.4427977502346039, 0.43738245964050293, -0.1514989286661148, 0.12826189398765564, 0.33310192823410034, -0.17160247266292572, 0.4262596666812897, 0.27266812324523926, 0.2524735629558563, 0.3181022107601166, 0.12002430111169815, 0.0899263545870781, 0.021541256457567215, -0.1689339280128479, 0.33275967836380005, -0.29008767008781433, 0.14658527076244354, -0.20024986565113068, 0.06940249353647232, -0.35555607080459595, -0.09729932993650436, -0.2597143054008484, 0.47064322233200073, 0.16529208421707153, 0.05769360810518265, -0.09768260270357132, -0.20625075697898865, -0.27869877219200134, 0.4057394862174988, 0.3590344488620758, 0.08325620740652084, 0.1341118961572647, 0.06535569578409195, -0.45154139399528503, -0.10348908603191376, 0.3416599929332733, -0.23799480497837067, -0.1830804944038391, -0.3390713632106781, 0.39013582468032837, 0.06578980386257172, -0.29849016666412354, -0.19494207203388214, 0.0399748720228672, 0.3311711847782135, -0.06268437206745148, 0.006986939813941717, 0.31127801537513733, -0.1424306333065033, 0.3858707845211029, -0.09996798634529114, -0.11952999979257584, 0.007081116549670696, 0.09740181267261505, -0.01771196722984314, -0.15252137184143066 ]
https://github.com/huggingface/datasets/issues/2561
Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
Hi @apsdehal, If you decide to follow @lhoestq's suggestion to rename the cache directory of your previous computation to the new expected cache directory, you can do the following to get the name of the new expected cache directory once #2500 is merged: ```python from datasets import load_dataset_builder dataset_builder = load_dataset_builder("path/to/your/dataset") print(dataset_builder.cache_dir) ``` This way, you don't have to recompute the hash of the dataset script yourself each time you modify the script.
## Describe the bug If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets. ## Steps to reproduce the bug - Create a local dataset builder class - load the local builder class file using `load_dataset` and let the cache build - update the file's content - The cache should rebuilt. ## Expected results With `ignore_verifications=True`, `load_dataset` should pick up existing cache. ## Actual results Creates new cache. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0
73
Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` ## Describe the bug If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets. ## Steps to reproduce the bug - Create a local dataset builder class - load the local builder class file using `load_dataset` and let the cache build - update the file's content - The cache should rebuilt. ## Expected results With `ignore_verifications=True`, `load_dataset` should pick up existing cache. ## Actual results Creates new cache. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0 Hi @apsdehal, If you decide to follow @lhoestq's suggestion to rename the cache directory of your previous computation to the new expected cache directory, you can do the following to get the name of the new expected cache directory once #2500 is merged: ```python from datasets import load_dataset_builder dataset_builder = load_dataset_builder("path/to/your/dataset") print(dataset_builder.cache_dir) ``` This way, you don't have to recompute the hash of the dataset script yourself each time you modify the script.
[ -0.43786269426345825, 0.4782145619392395, -0.007668428122997284, 0.11805299669504166, 0.15692700445652008, 0.18813155591487885, 0.2960323095321655, 0.4827200472354889, 0.17503754794597626, 0.3437815308570862, 0.22528555989265442, 0.3112470209598541, 0.06439507752656937, -0.19516780972480774, 0.026697639375925064, 0.32267695665359497, 0.0457070916891098, 0.1662353128194809, 0.0950702503323555, 0.00560968741774559, -0.1577252894639969, -0.04805397987365723, -0.04327532276511192, -0.2891952097415924, -0.37796664237976074, 0.1461431384086609, 0.12889893352985382, 0.10294239968061447, 0.041860129684209824, -0.5005037188529968, 0.347799152135849, 0.25453612208366394, -0.07903499901294708, 0.32210588455200195, -0.00010390514216851443, 0.14509381353855133, 0.3499031066894531, 0.029226412996649742, -0.4508455693721771, 0.13508516550064087, -0.30234166979789734, -0.39227935671806335, -0.044512130320072174, -0.15201957523822784, -0.14975237846374512, -0.19429835677146912, -0.09285639226436615, -0.33356016874313354, 0.23689572513103485, 0.06958762556314468, 0.30093449354171753, 0.11463583260774612, -0.17482678592205048, -0.055850494652986526, 0.13335803151130676, -0.0726911798119545, -0.03390474244952202, 0.1525844782590866, 0.17158527672290802, -0.026666369289159775, -0.37924665212631226, 0.4052733778953552, -0.2034498155117035, 0.1334886997938156, 0.3996666669845581, -0.1477891504764557, 0.08123204857110977, -0.03079564869403839, 0.384201318025589, 0.008895029313862324, 0.5154063105583191, -0.3620009124279022, -0.36488762497901917, -0.21129095554351807, -0.23110966384410858, -0.1044778898358345, 0.22093580663204193, -0.19834260642528534, -0.234751895070076, 0.1736161857843399, -0.3927208483219147, -0.22764767706394196, 0.04179517924785614, -0.18095248937606812, 0.08807583898305893, -0.22500202059745789, 0.1053645983338356, -0.13724492490291595, -0.12547700107097626, 0.14522074162960052, 0.3674779534339905, -0.39485517144203186, -0.021528474986553192, 0.22896957397460938, -0.4612692594528198, -0.023997221142053604, 0.39443543553352356, 0.3140068054199219, 0.23737604916095734, 0.3474125266075134, -0.10953206568956375, 0.2829093635082245, 0.1750379353761673, 0.09150975197553635, -0.1357051581144333, 0.3506705164909363, -0.034068405628204346, -0.05278757959604263, 0.3768588602542877, 0.2751900851726532, -0.469076007604599, 0.005692014005035162, 0.1060253158211708, -0.32596370577812195, 0.5800097584724426, 0.07204674184322357, 0.05242489278316498, -0.3129972517490387, -0.04757274314761162, 0.2453952431678772, 0.06364182382822037, -0.09618052840232849, 0.21225951611995697, 0.26109543442726135, -0.10543546825647354, 0.23114131391048431, -0.1733354777097702, -0.21530133485794067, -0.3223362863063812, -0.28026267886161804, -0.4096827507019043, -0.15373125672340393, 0.011925571598112583, 0.30561700463294983, 0.48294657468795776, -0.46896177530288696, 0.3161233365535736, 0.16185727715492249, 0.011893844231963158, 0.10071270167827606, 0.1903780996799469, -0.13220982253551483, 0.21431125700473785, 0.2632397413253784, -0.21326881647109985, 0.010252042673528194, 0.03131115436553955, -0.11755597591400146, -0.10584159195423126, 0.22312194108963013, -0.031761735677719116, -0.7341607809066772, 0.08890779316425323, 0.2330438792705536, -0.23815608024597168, 0.047488734126091, 0.2636314034461975, 0.03360611945390701, 0.3829755187034607, -0.2503572404384613, -0.12225908041000366, -0.0942947044968605, -0.3573616147041321, -0.17592117190361023, 0.49802419543266296, 0.7052149176597595, -0.3996891677379608, 0.15282848477363586, -0.11566289514303207, 0.0775156021118164, -0.0665535256266594, 0.15918408334255219, -0.27950137853622437, 0.3339781165122986, -0.2976713478565216, -0.4289458394050598, 0.17984695732593536, -0.38471320271492004, -0.7887806296348572, 0.22515882551670074, 0.1457596719264984, 0.14913815259933472, 0.18185126781463623, 0.03961067274212837, -0.016946131363511086, -0.21841676533222198, 0.16150300204753876, 0.23126058280467987, -0.16345049440860748, 0.09834776073694229, -0.43498215079307556, -0.20861266553401947, 0.008962123654782772, 0.06883377581834793, 0.08701251447200775, 0.1695851981639862, 0.056815244257450104, 0.08296122401952744, 0.02678731456398964, -0.04965367168188095, 0.14023086428642273, 0.37368616461753845, 0.11329542845487595, -0.11593477427959442, 0.22034119069576263, -0.1655067354440689, -0.49900558590888977, 0.4117000102996826, -0.18209709227085114, -0.1447317898273468, -0.05311548337340355, -0.32271239161491394, -0.13382883369922638, -0.08751510828733444, -0.33759939670562744, -0.13919897377490997, 0.18845632672309875, 0.24964500963687897, 0.44609320163726807, -0.07711237668991089, -0.1581667959690094, 0.2838537096977234, -0.16407324373722076, 0.089973583817482, -0.13269871473312378, -0.1409481316804886, -0.07001291215419769, -0.09916431456804276, -0.19540446996688843, 0.05743353068828583, 0.1353018879890442, -0.06671024113893509, -0.2608097195625305, 0.30249229073524475, 0.0793655663728714, 0.1147841066122055, 0.07111591845750809, 0.27902933955192566, -0.03507526218891144, 0.18580839037895203, 0.17453457415103912, -0.07905708253383636, 0.14262229204177856, -0.038448482751846313, -0.041347768157720566, 0.1354289948940277, 0.04639866575598717, 0.11259140819311142, -0.13888445496559143, -0.3127245306968689, 0.29537075757980347, -0.12457165122032166, 0.06334581226110458, -0.14818362891674042, -0.0057839625515043736, 0.07488440722227097, 0.4566468298435211, 0.17716747522354126, 0.0018893942469730973, 0.21240004897117615, 0.4804142415523529, 0.16495512425899506, -0.24868635833263397, -0.011734242551028728, -0.09440455585718155, -0.2098718136548996, 0.07300794124603271, 0.39722344279289246, 0.3072851002216339, 0.22163495421409607, 0.21928846836090088, 0.057242173701524734, -0.006848335266113281, -0.15892089903354645, 0.09115103632211685, -0.07537510991096497, -0.155050128698349, 0.3534369468688965, 0.28965091705322266, 0.16202569007873535, -0.3402824103832245, 0.1717149168252945, 0.10149072110652924, 0.17742112278938293, -0.019941499456763268, 0.14800849556922913, -0.43742531538009644, -0.10864405333995819, -0.1747342050075531, 0.20599161088466644, -0.1812388002872467, -0.2643585205078125, 0.09966140240430832, 0.10138271749019623, -0.11854253709316254, 0.216680109500885, -0.12253014743328094, 0.3018142879009247, 0.022989867255091667, -0.4956267774105072, -0.2863648235797882, -0.03621446341276169, -0.3606925904750824, 0.03165818750858307, 0.45717480778694153, -0.2570877969264984, 0.34143322706222534, -0.2753065824508667, -0.11610385030508041, -0.2035595327615738, -0.22706131637096405, 0.0009948818478733301, 0.03113858588039875, 0.3004501760005951, -0.12477463483810425, 0.0048388466238975525, 0.05451580509543419, 0.06162257120013237, 0.19664409756660461, -0.21015919744968414, -0.16139744222164154, -0.09595285356044769, -0.0007321551092900336, 0.09841985255479813, -0.3548961877822876, -0.3140827417373657, 0.016635041683912277, -0.4324187934398651, -0.0886579304933548, 0.12477777898311615, 0.016799503937363625, 0.18204553425312042, -0.11769039928913116, 0.14047500491142273, 0.04369216412305832, 0.16501487791538239, -0.2781704068183899, -0.6232038140296936, 0.2709970474243164, -0.25065863132476807, -0.09444685280323029, 0.06155461072921753, -0.32881543040275574, 0.1137559562921524, -0.021014772355556488, -0.4772718846797943, -0.08005908876657486, -0.5147486925125122, 0.27536314725875854, -0.1654992550611496, 0.031567566096782684, 0.43139660358428955, 0.0792464017868042, -0.11370766162872314, -0.23643912374973297, -0.2883404791355133, 0.0790761262178421, -0.28120604157447815, 0.19446015357971191, 0.00567946070805192, 0.014072077348828316, 0.187233105301857, 0.536739706993103, 0.19505566358566284, -0.09024947136640549, 0.29413896799087524, 0.1639423966407776, 0.4542674720287323, -0.31494712829589844, -0.20426586270332336, 0.053016260266304016, -0.07575956732034683, -0.2786773145198822, 0.048987165093421936, 0.007132565602660179, 0.000014548859326168895, -0.14133094251155853, -0.041352272033691406, -0.046301521360874176, -0.30570751428604126, 0.05905701220035553, -0.45346343517303467, 0.19547784328460693, 0.38034573197364807, 0.17413675785064697, -0.23211058974266052, -0.10065324604511261, 0.16467982530593872, 0.24630644917488098, 0.16826458275318146, -0.04572537541389465, 0.03513617441058159, 0.279537171125412, -0.40367865562438965, 0.16203737258911133, 0.12889829277992249, -0.00836461316794157, 0.093065045773983, -0.057227835059165955, 0.11773578077554703, -0.09113242477178574, 0.2825433909893036, -0.5072575211524963, 0.09113247692584991, 0.20383451879024506, -0.11256854981184006, 0.06277555972337723, -0.19892644882202148, 0.15047401189804077, 0.2622160017490387, -0.08798311650753021, 0.25075000524520874, -0.001111002522520721, -0.23511329293251038, 0.12535348534584045, 0.38704606890678406, -0.11976376920938492, -0.3344692587852478, -0.26235243678092957, -0.027738116681575775, -0.159190833568573, 0.056585267186164856, -0.08125434070825577, 0.24006406962871552, -0.03081130050122738, -0.027897218242287636, -0.13523077964782715, 0.23703044652938843, -0.1084027960896492, 0.018076373264193535, 0.26286715269088745, -0.0844259038567543, 0.38037818670272827, 0.02520229108631611, 0.030218537896871567, 0.23651278018951416, 0.4647635221481323, -0.12505897879600525, -0.23266400396823883, -0.194799542427063, 0.053039588034152985, -0.044909123331308365, 0.251813143491745, -0.11614898592233658, -0.20820946991443634, 0.14608991146087646, -0.010291052050888538, -0.1474386751651764, -0.030477456748485565, -0.020570097491145134, -0.0034660608507692814, 0.0006032998207956553, -0.4913097321987152, 0.20415820181369781, 0.1895582675933838, -0.04498394951224327, 0.31988218426704407, -0.27440670132637024, -0.02813110314309597, 0.25543734431266785, 0.10068764537572861, 0.6605779528617859, 0.09649400413036346, -0.03535032272338867, -0.003621187061071396, -0.23167145252227783, 0.32598212361335754, -0.308095782995224, 0.24570368230342865, -0.2795041799545288, -0.30748963356018066, 0.17358051240444183, -0.1925349086523056, 0.18910086154937744, 0.03482874110341072, -0.12405740469694138, 0.2253083437681198, -0.11510425060987473, 0.19125649333000183, -0.04584039747714996, 0.3150481879711151, -0.18686255812644958, -0.17457853257656097, -0.027450961992144585, 0.2539721727371216, 0.046978432685136795, 0.24615660309791565, -0.08152693510055542, 0.018776820972561836, 0.1505827009677887, -0.08085190504789352, -0.237986221909523, -0.0665983036160469, -0.10748180747032166, 0.06020230054855347, 0.12139055132865906, -0.10677003860473633, -0.04361167922616005, 0.05763408541679382, 0.30269044637680054, 0.25052550435066223, -0.15882687270641327, 0.14854326844215393, 0.0560750737786293, 0.3196146786212921, -0.06584331393241882, -0.21281346678733826, 0.4055594503879547, -0.061762597411870956, -0.15896819531917572, -0.25949302315711975, -0.4273691475391388, -0.3726552128791809, 0.26804807782173157, 0.14602050185203552, 0.27791672945022583, 0.05331066995859146, 0.0771036222577095, -0.0018370567122474313, 0.1734866052865982, -0.2306041717529297, 0.2520277202129364, 0.13480284810066223, -0.15156948566436768, 0.18913264572620392, -0.33632946014404297, -0.2991267740726471, -0.06736958026885986, 0.311456561088562, 0.1595466583967209, -0.1517670750617981, 0.4051167070865631, -0.20840050280094147, -0.14193136990070343, -0.18530051410198212, -0.04755242541432381, 0.07671912014484406, -0.23267552256584167, 0.06878411769866943, 0.040499426424503326, 0.04310369864106178, 0.15820710361003876, -0.06086752191185951, 0.03956471011042595, 0.02453332021832466, -0.3133845627307892, -0.22254495322704315, -0.4285660684108734, -0.21933208405971527, -0.06328479945659637, 0.12238511443138123, -0.0012287813005968928, -0.026729512959718704, 0.15031325817108154, 0.27602097392082214, -0.4142197370529175, -0.056600745767354965, -0.27916789054870605, 0.10241235047578812, -0.28814777731895447, 0.09848784655332565, 0.11464646458625793, -0.07665538787841797, 0.06322937458753586, 0.1305018812417984, -0.32845205068588257, -0.3228771388530731, 0.02420109324157238, 0.09457822144031525, -0.016606897115707397, 0.22320397198200226, -0.11470409482717514, 0.07946673780679703, 0.018437394872307777, -0.08873122930526733, 0.20977362990379333, -0.01784273236989975, -0.11041409522294998, 0.267986536026001, 0.12212269753217697, 0.32237645983695984, -0.009902115911245346, -0.0430622361600399, -0.15509198606014252, 0.21931998431682587, -0.04333657771348953, 0.10869452357292175, -0.05448688194155693, -0.07055743038654327, 0.1329297423362732, -0.05702406167984009, -0.15082845091819763, 0.19239765405654907, 0.22233565151691437, -0.18649297952651978, -0.06023028865456581, 0.3218359053134918, 0.24001924693584442, 0.09073974192142487, -0.005447832867503166, -0.19576595723628998, 0.30035659670829773, 0.2832585275173187, -0.21940787136554718, -0.17066003382205963, 0.2801480293273926, -0.013226895593106747, 0.1595281958580017, 0.06501269340515137, 0.35554400086402893, -0.19909466803073883, 0.23371060192584991, 0.13219967484474182, 0.32321697473526, -0.416841596364975, 0.0862705186009407, 0.28539741039276123, 0.16575324535369873, 0.008256644941866398, 0.20531541109085083, 0.06719491630792618, 0.09719067066907883, 0.6143578886985779, -0.0283517949283123, 0.21895523369312286, -0.028565118089318275, 0.2101491540670395, -0.22618120908737183, -0.5105992555618286, 0.43659037351608276, 0.1550198793411255, -0.11809543520212173, -0.10576241463422775, -0.16101288795471191, 0.2295513153076172, 0.10730525851249695, -0.12929341197013855, -0.19494226574897766, 0.14979180693626404, -0.2843475937843323, 0.03437726944684982, 0.12218797206878662, -0.024144066497683525, 0.13868163526058197, 0.10233684629201889, 0.21879367530345917, 0.1756788045167923, 0.28151002526283264, -0.056729115545749664, -0.10321543365716934, -0.09501513838768005, 0.1916714608669281, -0.04509195685386658, 0.11945648491382599, -0.11412282288074493, 0.18233852088451385, 0.10998418927192688, -0.14821037650108337, -0.0076162321493029594, 0.38535076379776, 0.3195370137691498, 0.27899330854415894, -0.07871953397989273, 0.1248614639043808, -0.17495599389076233, -0.008357717655599117, -0.42221611738204956, 0.33394691348075867, -0.3401622474193573, -0.22747690975666046, 0.32490119338035583, 0.12725530564785004, -0.20514598488807678, 0.018234673887491226, -0.1452871859073639, 0.06907406449317932, -0.4051777720451355, 0.3360978960990906, 0.3596474230289459, -0.015595429576933384, -0.10136514157056808, 0.23766940832138062, -0.2326168417930603, -0.2524328827857971, 0.4349989891052246, -0.060438528656959534, 0.08783789724111557, -0.3028019666671753, 0.1456751972436905, -0.1554858237504959, 0.4844498634338379, 0.2788093090057373, -0.00022089619596954435, -0.2452317178249359, -0.1420568823814392, -0.654424786567688, 0.21141262352466583, -0.05189425125718117, 0.21119333803653717, 0.0496993288397789, 0.23269200325012207, -0.1671123057603836, 0.11673730611801147, 0.05904500558972359, -0.016742072999477386, 0.17963068187236786, 0.03288658708333969, -0.2991630733013153, 0.15670153498649597, -0.1595652997493744, -0.3394169807434082, 0.08945374190807343, -0.456143319606781, 0.319713294506073, -0.21778208017349243, 0.18501915037631989, 0.21906039118766785, -0.15686078369617462, 0.3673098087310791, 0.23137550055980682, 0.34295904636383057, 0.25605857372283936, 0.10626877099275589, 0.029454195871949196, -0.016391700133681297, -0.20159369707107544, 0.2178562581539154, -0.3097856640815735, 0.19812677800655365, -0.22019252181053162, 0.0975879654288292, -0.4092790186405182, -0.17605717480182648, -0.2828538417816162, 0.34628942608833313, 0.0879390612244606, -0.005146501585841179, -0.06528615951538086, -0.09742658585309982, -0.22847799956798553, 0.40503665804862976, 0.2715633809566498, 0.0712456926703453, 0.05810157209634781, 0.18293410539627075, -0.48166677355766296, -0.17423665523529053, 0.41951656341552734, -0.22154250741004944, -0.28119388222694397, -0.26820358633995056, 0.37211108207702637, -0.09363717585802078, -0.26795220375061035, -0.22218267619609833, 0.09803006052970886, 0.3129081428050995, -0.003539505647495389, 0.00035083849797956645, 0.3377865254878998, -0.15323634445667267, 0.3676828444004059, -0.06706581264734268, -0.13772901892662048, 0.05994028225541115, 0.1395840346813202, -0.10613003373146057, -0.1550707370042801 ]
https://github.com/huggingface/datasets/issues/2559
Memory usage consistently increases when processing a dataset with `.map`
Hi ! Can you share the function you pass to `map` ? I know you mentioned it would be hard to share some code but this would really help to understand what happened
## Describe the bug I have a HF dataset with image paths stored in it and I am trying to load those image paths using `.map` with `num_proc=80`. I am noticing that the memory usage consistently keeps on increasing with time. I tried using `DEFAULT_WRITER_BATCH_SIZE=10` in the builder to decrease arrow writer's batch size but that doesn't seem to help. ## Steps to reproduce the bug Providing code as it is would be hard. I can provide a MVP if that helps. ## Expected results Memory usage should become consistent after some time following the launch of processing. ## Actual results Memory usage keeps on increasing. ## Environment info - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0
33
Memory usage consistently increases when processing a dataset with `.map` ## Describe the bug I have a HF dataset with image paths stored in it and I am trying to load those image paths using `.map` with `num_proc=80`. I am noticing that the memory usage consistently keeps on increasing with time. I tried using `DEFAULT_WRITER_BATCH_SIZE=10` in the builder to decrease arrow writer's batch size but that doesn't seem to help. ## Steps to reproduce the bug Providing code as it is would be hard. I can provide a MVP if that helps. ## Expected results Memory usage should become consistent after some time following the launch of processing. ## Actual results Memory usage keeps on increasing. ## Environment info - `datasets` version: 1.8.0 - Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.7 - PyArrow version: 3.0.0 Hi ! Can you share the function you pass to `map` ? I know you mentioned it would be hard to share some code but this would really help to understand what happened
[ -0.15703536570072174, -0.1291140913963318, 0.007089510094374418, 0.42113929986953735, 0.18093499541282654, -0.006408083718270063, 0.05896928906440735, 0.11856141686439514, 0.21515002846717834, 0.13143660128116608, 0.40360957384109497, 0.5179601907730103, -0.18737539649009705, -0.03429913520812988, -0.07754763215780258, 0.07395172864198685, 0.10070928931236267, 0.06218550726771355, -0.00248342496342957, 0.0814322829246521, -0.28912702202796936, 0.1485365331172943, -0.2638913691043854, -0.016958443447947502, -0.3848564922809601, -0.23752973973751068, 0.028359657153487206, 0.1595100462436676, 0.2712176740169525, -0.4738772213459015, -0.12402163445949554, -0.005695699248462915, 0.10056545585393906, 0.5225366353988647, -0.00012555293506011367, -0.030560847371816635, 0.40193095803260803, -0.011966574005782604, -0.014850610867142677, 0.12461724132299423, -0.3412506580352783, -0.14958323538303375, 0.019318144768476486, -0.09838512539863586, 0.23450309038162231, -0.028217747807502747, -0.01444303523749113, -0.4091302454471588, 0.28773048520088196, 0.07451073080301285, 0.10728617012500763, -0.0405006930232048, 0.04021335020661354, 0.20158880949020386, 0.3487725853919983, 0.38777172565460205, 0.07708214968442917, 0.11276095360517502, 0.047849804162979126, -0.26278355717658997, -0.413632333278656, 0.28839120268821716, -0.023698046803474426, 0.18979133665561676, 0.5099980235099792, -0.013492031022906303, 0.331156849861145, -0.38165196776390076, 0.45296019315719604, -0.10678630322217941, 0.14171800017356873, -0.23964136838912964, 0.23092545568943024, -0.20079946517944336, -0.3240591287612915, -0.07238496840000153, 0.25776901841163635, 0.18404628336429596, -0.33460289239883423, -0.0982150211930275, -0.26918724179267883, -0.23709917068481445, -0.13937467336654663, 0.17063520848751068, 0.1292567253112793, -0.314185231924057, -0.020100701600313187, 0.25195878744125366, 0.38427841663360596, -0.1438482254743576, 0.045506685972213745, -0.39026498794555664, -0.06031351163983345, 0.2051590234041214, -0.21770375967025757, 0.36166226863861084, 0.15985780954360962, -0.1390431523323059, 0.18601536750793457, -0.4799717664718628, 0.047116369009017944, 0.04938999563455582, -0.07072734087705612, 0.30786654353141785, 0.5049362182617188, 0.007135461084544659, 0.03394037112593651, 0.3567734658718109, 0.14456047117710114, 0.07390167564153671, -0.4335693418979645, -0.09687304496765137, -0.025475116446614265, -0.15042150020599365, 0.5621682405471802, -0.43410614132881165, -0.008952343836426735, -0.016202189028263092, 0.08388585597276688, 0.14404110610485077, -0.24744540452957153, -0.11926667392253876, -0.1069319024682045, 0.27730658650398254, 0.16082896292209625, 0.2124890685081482, 0.07982542365789413, -0.12002653628587723, -0.29814547300338745, 0.10349751263856888, -0.06179574504494667, -0.2247256189584732, -0.4726647436618805, 0.2819334864616394, -0.11379337310791016, -0.02372429147362709, 0.07998504489660263, 0.08393226563930511, -0.18095359206199646, -0.43114086985588074, 0.21903160214424133, -0.30979111790657043, 0.30813342332839966, 0.13379359245300293, -0.2712442874908447, 0.16610801219940186, -0.25650691986083984, 0.241497203707695, 0.0015332577750086784, 0.6213240027427673, -0.49387887120246887, -0.24637417495250702, 0.06669814139604568, -0.05544745922088623, 0.1610039919614792, 0.23729921877384186, -0.28903940320014954, 0.08027300983667374, 0.4135131537914276, -0.12287840247154236, -0.054127439856529236, -0.1508703976869583, -0.36378782987594604, -0.35680145025253296, 0.07448914647102356, 0.512019693851471, -0.2421160191297531, -0.05709490552544594, -0.06980182230472565, 0.13619975745677948, 0.3940269947052002, 0.33940815925598145, -0.1452195793390274, 0.21797049045562744, -0.27108100056648254, -0.00926897581666708, 0.05358114093542099, -0.13539983332157135, -0.46031519770622253, 0.16261941194534302, 0.035424988716840744, 0.04411701485514641, -0.16762720048427582, 0.09172382950782776, 0.11362186819314957, -0.02061256393790245, 0.0810672789812088, 0.23995476961135864, 0.06728441268205643, 0.21780720353126526, -0.3566507399082184, -0.330613911151886, -0.16026842594146729, -0.06863639503717422, 0.0161734651774168, -0.1525755375623703, 0.09987756609916687, -0.3316320776939392, 0.4156735837459564, -0.1726185828447342, 0.1996033638715744, 0.38734591007232666, 0.3280894458293915, 0.07157115638256073, 0.08201437443494797, -0.03712053224444389, 0.021824181079864502, 0.06859245151281357, -0.5524805784225464, -0.46972811222076416, -0.08928725868463516, 0.05952928960323334, 0.17691448330879211, 0.20536375045776367, -0.09544535726308823, -0.088355652987957, -0.07365600764751434, -0.11792908608913422, -0.3036300837993622, -0.024729439988732338, 0.1444118618965149, 0.15267391502857208, 0.06563565135002136, -0.04426051303744316, 0.02716621197760105, 0.23997057974338531, 0.07523655146360397, -0.20474344491958618, -0.20145581662654877, 0.0656852051615715, 0.06613387167453766, 0.06542037427425385, -0.2618909776210785, 0.15133537352085114, 0.28423380851745605, 0.1063961312174797, -0.07418281584978104, 0.07390296459197998, 0.38493800163269043, -0.14978927373886108, 0.21341831982135773, -0.06418026983737946, 0.10574714839458466, -0.06672113388776779, 0.12133104354143143, -0.23301100730895996, 0.3269648849964142, 0.3512520492076874, -0.058207105845212936, -0.15332955121994019, -0.021070746704936028, -0.019961262121796608, 0.4386909306049347, -0.15396271646022797, -0.147377610206604, 0.08735824376344681, 0.2650527060031891, 0.2884361147880554, 0.05703667178750038, 0.06768635660409927, 0.4835445284843445, 0.18636250495910645, -0.09078588336706161, 0.4215971529483795, -0.48088955879211426, -0.13821524381637573, 0.2403399795293808, -0.014124029316008091, 0.19930076599121094, 0.03444232419133186, -0.1749192178249359, 0.05505393445491791, 0.0971422791481018, -0.012740622274577618, 0.10647343099117279, 0.20500120520591736, 0.5473661422729492, 0.11843428015708923, 0.26934248208999634, -0.010612609796226025, -0.10872203856706619, -0.06343983113765717, 0.02049402892589569, 0.022230906412005424, -0.29896610975265503, 0.2088724821805954, -0.24584248661994934, 0.16147001087665558, -0.11524856090545654, 0.16597996652126312, -0.26645341515541077, -0.08651146292686462, -0.19480004906654358, 0.2522459626197815, -0.023851901292800903, 0.052924223244190216, 0.03733818605542183, 0.1334959715604782, 0.242518350481987, -0.2201698273420334, -0.13351655006408691, -0.2635023295879364, -0.37343427538871765, -0.18667742609977722, 0.38139787316322327, -0.18527400493621826, 0.3777764141559601, 0.14968369901180267, 0.11761534214019775, -0.20895631611347198, -0.12447238713502884, -0.002892826683819294, 0.30832916498184204, 0.2173018902540207, -0.09699157625436783, 0.17687083780765533, -0.10497724264860153, 0.09705819934606552, 0.18644748628139496, -0.4787375330924988, 0.06665649265050888, 0.13967110216617584, -0.11923620104789734, -0.2064533829689026, -0.017284125089645386, 0.06377843022346497, 0.04985292628407478, -0.2209957093000412, 0.23917897045612335, 0.08815376460552216, 0.3557165265083313, 0.23300524055957794, 0.42340007424354553, 0.22553421556949615, -0.22169449925422668, -0.2498883157968521, -0.13886022567749023, -0.05413651093840599, 0.03147308528423309, -0.08526764065027237, -0.023558884859085083, 0.002043871907517314, -0.04981082305312157, 0.1298586130142212, 0.35872799158096313, -0.6982621550559998, 0.030165929347276688, -0.2623218595981598, 0.2872709333896637, -0.15402406454086304, 0.23278731107711792, 0.19004911184310913, 0.2522500455379486, 0.00687637273222208, -0.11991490423679352, -0.3412652015686035, 0.22694596648216248, 0.10213200002908707, 0.26220282912254333, 0.4573043882846832, 0.23408472537994385, 0.17237980663776398, 0.6430394053459167, 0.36811187863349915, -0.1270594596862793, 0.5097684264183044, -0.10937084257602692, 0.14684300124645233, -0.18530763685703278, -0.08029511570930481, -0.1467502862215042, -0.35512369871139526, -0.10134559869766235, 0.056473419070243835, 0.1598132699728012, -0.3769490420818329, 0.3007535934448242, -0.23857201635837555, -0.014685050584375858, -0.3792770504951477, 0.33193880319595337, -0.08863714337348938, 0.41318950057029724, 0.03187287226319313, -0.09615503996610641, -0.42142748832702637, -0.4405424892902374, 0.13516105711460114, -0.4002673923969269, 0.17805415391921997, -0.03969891741871834, -0.04011596739292145, -0.013843243010342121, -0.5272119045257568, 0.3067459762096405, 0.0390462800860405, 0.2621276378631592, -0.029725223779678345, 0.04919827729463577, 0.29869458079338074, -0.07603015750646591, 0.5504162311553955, -0.03471400588750839, 0.05231642350554466, -0.08927789330482483, 0.02128422074019909, -0.4756467938423157, 0.055217497050762177, -0.0031107887625694275, 0.3808131814002991, 0.09404994547367096, 0.35087960958480835, 0.06972502171993256, -0.18757905066013336, 0.013252325356006622, 0.04215792194008827, -0.2354724258184433, -0.4961804449558258, -0.1325453519821167, -0.18410903215408325, -0.43044382333755493, 0.010923268273472786, -0.04656770080327988, 0.03360249474644661, 0.316508024930954, -0.30261749029159546, 0.12140107899904251, 0.13581125438213348, 0.0017413173336535692, -0.23510530591011047, 0.5520073771476746, -0.023251241073012352, 0.033229146152734756, 0.33828631043434143, -0.19803830981254578, 0.2834867238998413, 0.4085795283317566, -0.20609723031520844, 0.11846519261598587, -0.13023477792739868, -0.1976928859949112, 0.26860955357551575, 0.2723292112350464, 0.056034110486507416, -0.027153080329298973, -0.044082265347242355, 0.2403116524219513, -0.3981289863586426, 0.023662125691771507, 0.4464375078678131, 0.15398654341697693, -0.1511223018169403, -0.4074271321296692, 0.3398568332195282, 0.3760685324668884, -0.16976085305213928, 0.8557542562484741, -0.3192204236984253, -0.27486181259155273, 0.4450092613697052, 0.45988211035728455, 0.7785288691520691, -0.35357666015625, 0.35092368721961975, -0.1129692941904068, -0.40275439620018005, -0.34583961963653564, -0.19956552982330322, 0.0818229615688324, -0.48454490303993225, 0.0333418995141983, 0.0910126343369484, -0.24878907203674316, 0.2100742608308792, 0.3734503984451294, -0.025714049115777016, 0.04972061142325401, -0.12066180258989334, 0.19247786700725555, 0.049335550516843796, 0.0023937157820910215, 0.2157002091407776, -0.20184484124183655, 0.12367434799671173, 0.015334807336330414, 0.06751225888729095, -0.18633732199668884, -0.03636204078793526, 0.053442806005477905, 0.2349955439567566, -0.16999928653240204, -0.2345428615808487, -0.1118466928601265, -0.5601987838745117, 0.276753693819046, -0.03967138007283211, 0.2962338328361511, 0.02773791365325451, 0.05590307340025902, -0.46463724970817566, 0.12996497750282288, 0.04356710985302925, 0.08328182250261307, 0.4669642448425293, 0.2642523944377899, 0.1506466120481491, 0.013683624565601349, 0.08413591980934143, -0.01854330487549305, -0.31307166814804077, 0.10033613443374634, -0.23818354308605194, -0.23659692704677582, -0.43852195143699646, 0.32233279943466187, 0.2301783561706543, 0.07998032122850418, -0.2859730124473572, -0.08775848150253296, -0.1497965157032013, 0.14726507663726807, 0.02547375112771988, 0.16349579393863678, 0.01042198296636343, 0.7786634564399719, -0.2151990383863449, -0.34802013635635376, 0.04236996918916702, 0.14962263405323029, -0.027683867141604424, 0.13804872334003448, 0.26218438148498535, 0.02684583142399788, -0.10493842512369156, -0.037829991430044174, 0.2424715906381607, 0.07396606355905533, -0.2794210612773895, 0.16985507309436798, 0.04203266277909279, -0.16161803901195526, -0.0963287279009819, -0.16692012548446655, -0.12375567108392715, -0.251438707113266, -0.23424845933914185, -0.11395513266324997, -0.5196932554244995, -0.16515769064426422, -0.26434600353240967, 0.24413684010505676, 0.05326627567410469, -0.42304638028144836, 0.11318594217300415, 0.4644656181335449, -0.11002671718597412, 0.16839809715747833, 0.133918896317482, 0.18941570818424225, -0.024443812668323517, 0.09713580459356308, 0.19883659482002258, -0.18795160949230194, -0.10958930104970932, 0.23689796030521393, -0.2532469928264618, -0.0861603170633316, -0.21980582177639008, 0.2332851141691208, -0.19534744322299957, -0.21726176142692566, 0.044084448367357254, -0.2931397259235382, 0.1356251984834671, -0.34914180636405945, 0.2578803598880768, 0.08389037102460861, -0.23281969130039215, 0.03730176389217377, 0.23881566524505615, -0.3311474621295929, 0.2201014906167984, 0.45457524061203003, -0.04256124794483185, 0.43887633085250854, 0.16431839764118195, 0.1744069904088974, 0.18100519478321075, -0.08329924941062927, -0.16071276366710663, -0.0558805875480175, 0.14909982681274414, 0.0030750303994864225, 0.23419028520584106, -0.27458494901657104, 0.013263688422739506, 0.08008124679327011, 0.0003393683582544327, 0.188211590051651, -0.2667373716831207, -0.14756332337856293, 0.0492929108440876, 0.07828080654144287, 0.013443580828607082, -0.2528129518032074, 0.4869852662086487, 0.11273210495710373, -0.2317197620868683, 0.13654372096061707, 0.2346690595149994, -0.12237781286239624, -0.20933440327644348, 0.2005380094051361, 0.0721568688750267, -0.5397239923477173, 0.028128214180469513, 0.16198915243148804, 0.014795360155403614, 0.021054573357105255, 0.23595622181892395, 0.20582744479179382, 0.21016404032707214, 0.5615087747573853, 0.3088631331920624, 0.09746719151735306, 0.3279833495616913, 0.08735669404268265, -0.12920385599136353, -0.511712372303009, -0.07551523298025131, 0.6525542736053467, -0.2939627170562744, 0.3701234459877014, 0.05294118449091911, 0.39673927426338196, 0.33592018485069275, -0.5242993235588074, -0.07255519926548004, 0.31950944662094116, -0.16160550713539124, -0.16438204050064087, 0.24009820818901062, 0.006177372299134731, -0.10969989001750946, 0.1531411111354828, 0.12169868499040604, -0.12378925085067749, 0.7778651714324951, 0.28353986144065857, -0.08757540583610535, -0.1889849752187729, -0.1279658079147339, 0.2420136034488678, 0.33629897236824036, -0.26567697525024414, 0.2335510402917862, -0.20376668870449066, 0.06243336200714111, -0.10593687742948532, -0.052925195544958115, 0.448657363653183, 0.4429362714290619, -0.2017529159784317, 0.13369645178318024, -0.04504413530230522, 0.1585482954978943, -0.13562367856502533, 0.23301517963409424, -0.03457454964518547, 0.11345627903938293, -0.039414651691913605, -0.08562865853309631, 0.024861127138137817, -0.2527594268321991, 0.23645050823688507, 0.44645455479621887, -0.19280683994293213, 0.29656481742858887, 0.0010082225780934095, -0.2750466465950012, 0.13025620579719543, -0.21670004725456238, -0.17029626667499542, -0.025325994938611984, 0.6866879463195801, -0.6103775501251221, 0.1735483556985855, -0.24397286772727966, -0.019574010744690895, -0.2057756632566452, 0.5154134035110474, 0.021263498812913895, 0.11832156777381897, -0.27500298619270325, -0.09613645076751709, -0.4455813467502594, 0.03837263584136963, -0.4475420117378235, 0.024119706824421883, 0.22090843319892883, -0.020583445206284523, -0.4118445813655853, -0.1685490906238556, 0.4470592439174652, -0.15555010735988617, 0.10676106065511703, 0.20955339074134827, -0.4646928608417511, 0.10162089765071869, -0.10603367537260056, 0.06459818035364151, 0.04892503097653389, -0.5800877213478088, 0.310274600982666, -0.20639243721961975, -0.0724288821220398, -0.2161649614572525, -0.1279752254486084, 0.08319543302059174, 0.14937365055084229, 0.7480971217155457, 0.15447686612606049, 0.09335827827453613, -0.10137172788381577, -0.1662062406539917, -0.23866620659828186, -0.00928808469325304, -0.10826585441827774, -0.30076301097869873, 0.04824034869670868, 0.21315252780914307, -0.41867101192474365, -0.31624454259872437, -0.0958472192287445, -0.09732645750045776, -0.012664335779845715, -0.10179063677787781, -0.03130483999848366, -0.03766097500920296, -0.0718604326248169, 0.25852519273757935, -0.04725882038474083, 0.4419741630554199, 0.006575310602784157, 0.12750473618507385, -0.20608878135681152, -0.170195072889328, 0.30514752864837646, -0.5047956109046936, -0.5666654706001282, 0.24868471920490265, 0.22220027446746826, -0.29135528206825256, -0.41328421235084534, -0.4088250696659088, -0.30573439598083496, 0.3120824098587036, 0.11087656766176224, -0.30985498428344727, 0.09576031565666199, -0.2816903591156006, 0.0954844132065773, -0.05517847463488579, 0.38529545068740845, 0.05106794834136963, -0.16659964621067047, 0.22196729481220245, -0.13969670236110687 ]
https://github.com/huggingface/datasets/issues/2554
Multilabel metrics not supported
Hi @GuillemGSubies, thanks for reporting. I have made a PR to fix this issue and allow metrics to be computed also for multilabel classification problems.
When I try to use a metric like F1 macro I get the following error: ``` TypeError: int() argument must be a string, a bytes-like object or a number, not 'list' ``` There is an explicit casting here: https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/src/datasets/features.py#L274 And looks like this is because here https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/metrics/f1/f1.py#L88 the features can only be integers, so we cannot use that F1 for multilabel. Instead, if I create the following F1 (ints replaced with sequence of ints), it will work: ```python class F1(datasets.Metric): def _info(self): return datasets.MetricInfo( description=_DESCRIPTION, citation=_CITATION, inputs_description=_KWARGS_DESCRIPTION, features=datasets.Features( { "predictions": datasets.Sequence(datasets.Value("int32")), "references": datasets.Sequence(datasets.Value("int32")), } ), reference_urls=["https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html"], ) def _compute(self, predictions, references, labels=None, pos_label=1, average="binary", sample_weight=None): return { "f1": f1_score( references, predictions, labels=labels, pos_label=pos_label, average=average, sample_weight=sample_weight, ), } ```
25
Multilabel metrics not supported When I try to use a metric like F1 macro I get the following error: ``` TypeError: int() argument must be a string, a bytes-like object or a number, not 'list' ``` There is an explicit casting here: https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/src/datasets/features.py#L274 And looks like this is because here https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/metrics/f1/f1.py#L88 the features can only be integers, so we cannot use that F1 for multilabel. Instead, if I create the following F1 (ints replaced with sequence of ints), it will work: ```python class F1(datasets.Metric): def _info(self): return datasets.MetricInfo( description=_DESCRIPTION, citation=_CITATION, inputs_description=_KWARGS_DESCRIPTION, features=datasets.Features( { "predictions": datasets.Sequence(datasets.Value("int32")), "references": datasets.Sequence(datasets.Value("int32")), } ), reference_urls=["https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html"], ) def _compute(self, predictions, references, labels=None, pos_label=1, average="binary", sample_weight=None): return { "f1": f1_score( references, predictions, labels=labels, pos_label=pos_label, average=average, sample_weight=sample_weight, ), } ``` Hi @GuillemGSubies, thanks for reporting. I have made a PR to fix this issue and allow metrics to be computed also for multilabel classification problems.
[ -0.2212650030851364, -0.17884747684001923, 0.004477391485124826, 0.30089911818504333, 0.6725276708602905, -0.13599036633968353, 0.48068612813949585, -0.10233516991138458, 0.22830823063850403, 0.3166794180870056, -0.1240743100643158, 0.29819267988204956, -0.2808498740196228, 0.40463322401046753, -0.2508818209171295, -0.176121324300766, -0.2169739454984665, -0.3327274024486542, -0.059990204870700836, 0.105918750166893, -0.4245600998401642, 0.03595554083585739, -0.3928987681865692, -0.04741726070642471, -0.20538276433944702, 0.06821555644273758, 0.1161155253648758, -0.11355540156364441, -0.2787647545337677, -0.32952189445495605, 0.03608614578843117, -0.01855754666030407, -0.006459394935518503, 0.4338567852973938, -0.00011618381540756673, -0.11235740780830383, 0.23134629428386688, 0.0006337505183182657, -0.12151028960943222, -0.238866925239563, 0.10068748891353607, -0.12417624890804291, 0.03922269865870476, -0.24910077452659607, 0.015184715390205383, 0.06347836554050446, -0.3937758803367615, -0.11045897006988525, -0.029123974964022636, 0.3288373649120331, 0.1258651316165924, -0.06296215206384659, 0.42942893505096436, -0.09712200611829758, -0.15652093291282654, -0.015152009204030037, -0.22597664594650269, 0.24361929297447205, 0.006712000817060471, 0.18932774662971497, 0.19932465255260468, 0.36789870262145996, 0.05517261102795601, 0.09671048820018768, 0.33709317445755005, -0.09449492394924164, 0.15959836542606354, -0.1680668592453003, -0.1602083295583725, 0.22098508477210999, -0.06162334606051445, -0.06681893765926361, -0.5924569368362427, -0.0729387179017067, 0.0992550253868103, -0.8592527508735657, 0.10269226878881454, -0.14334118366241455, -0.005415988154709339, -0.1943717896938324, -0.4583280384540558, -0.12448233366012573, -0.11096344888210297, 0.20195263624191284, -0.18106487393379211, 0.44061535596847534, -0.15842650830745697, 0.23743589222431183, 0.3454502522945404, -0.1518542766571045, -0.205283984541893, 0.008173372596502304, 0.05832614004611969, 0.20561082661151886, -0.356854647397995, 0.10931126028299332, -0.17682918906211853, 0.0013984066899865866, 0.1842874139547348, -0.16339531540870667, -0.23855768144130707, 0.14221124351024628, -0.33207300305366516, 0.06417987495660782, 0.12255319952964783, 0.39981764554977417, 0.25460806488990784, 0.1608307957649231, 0.07207933813333511, 0.1423223316669464, -0.14014393091201782, -0.1567818969488144, -0.06989283859729767, -0.365604043006897, 0.2567169964313507, 0.3489769697189331, -0.2015083283185959, 0.013522704131901264, -0.3946038782596588, -0.044817909598350525, -0.07124532759189606, 0.008279452100396156, 0.6896387934684753, 0.09171872586011887, -0.0318085141479969, 0.22143419086933136, 0.1153472363948822, 0.44367656111717224, 0.06879657506942749, -0.20914381742477417, -0.021412406116724014, 0.04797987639904022, -0.3339827060699463, 0.048268336802721024, 0.1806906908750534, -0.0014859877992421389, 0.05395529046654701, 0.1387745440006256, 0.4493709206581116, -0.2276749163866043, -0.14830957353115082, -0.2939903438091278, -0.20853561162948608, 0.16550886631011963, -0.0190412700176239, 0.15125037729740143, 0.3160664141178131, -0.23029573261737823, 0.03577082231640816, 0.06692367047071457, -0.41163861751556396, 0.03824382275342941, -0.06661877036094666, 0.07122831791639328, 0.04837571084499359, 0.10256404429674149, -0.25429975986480713, 0.22136040031909943, -0.13259750604629517, -0.06657606363296509, -0.0036144847981631756, -0.40388816595077515, -0.2503190338611603, -0.11253789812326431, 0.2882920801639557, -0.11036643385887146, 0.2029673010110855, -0.1416214108467102, 0.005730245728045702, 0.1887962520122528, 0.06681045889854431, 0.11957971751689911, -0.06409791111946106, 0.035941287875175476, 0.05204349383711815, -0.050225529819726944, 0.5578498244285583, -0.7724627256393433, 0.022155072540044785, -0.11105440557003021, 0.16225987672805786, -0.19108572602272034, 0.17725348472595215, 0.05778762698173523, -0.04041966795921326, -0.2197519689798355, 0.48656609654426575, 0.07276727259159088, 0.06166863441467285, -0.14289698004722595, -0.08956685662269592, -0.15691249072551727, -0.04443274065852165, 0.037798311561346054, 0.3760763108730316, -0.05719650909304619, 0.10411479324102402, 0.3804464638233185, -0.11731284856796265, -0.21535100042819977, 0.02178167924284935, 0.2393890619277954, -0.1084289625287056, -0.20375825464725494, -0.021731173619627953, -0.5195295214653015, -0.2728661298751831, 0.20561623573303223, 0.013041683472692966, 0.10008043795824051, 0.32302436232566833, -0.10542596876621246, -0.22578540444374084, 0.1438712626695633, 0.06504697352647781, 0.1493532359600067, 0.04010706767439842, -0.07965154945850372, -0.093616783618927, -0.005691900849342346, -0.13184355199337006, -0.06274637579917908, 0.15352366864681244, 0.15771836042404175, 0.351640522480011, -0.070477195084095, -0.008762799203395844, -0.08259807527065277, 0.09730400145053864, 0.3517901599407196, 0.4347660541534424, 0.14074134826660156, -0.030635761097073555, 0.3947175145149231, 0.2970745861530304, -0.5094220638275146, 0.18060824275016785, 0.38793954253196716, 0.36073628067970276, -0.07303376495838165, -0.1506703495979309, -0.05046553537249565, 0.2503890097141266, -0.21855108439922333, -0.146192729473114, 0.350496381521225, -0.3115263283252716, 0.3024224042892456, 0.14302077889442444, 0.3508876860141754, 0.2961013913154602, 0.15460948646068573, -0.25654271245002747, -0.31380197405815125, 0.16299305856227875, -0.2991596758365631, -0.10053610056638718, -0.10967595130205154, -0.3435278534889221, -0.07324042916297913, 0.4491715729236603, 0.22496116161346436, 0.3339294195175171, 0.13072450459003448, -0.04566846042871475, 0.10115818679332733, -0.28512829542160034, -0.46233615279197693, 0.3690944314002991, 0.03253239765763283, -0.03240390866994858, -0.0058950092643499374, -0.2700992524623871, -0.12679104506969452, 0.3215009868144989, 0.024024736136198044, 0.02016022987663746, 0.058368537575006485, 0.07774091511964798, 0.012755217030644417, 0.04874958097934723, -0.07387516647577286, 0.15376263856887817, 0.014945395290851593, -0.3629768490791321, 0.05829082056879997, -0.24534893035888672, -0.04633358493447304, -0.09350825101137161, -0.7585228085517883, -0.17618241906166077, -0.33468955755233765, -0.04030602052807808, 0.23866115510463715, 0.2290697693824768, 0.21972186863422394, 0.1551395058631897, 0.20613865554332733, 0.124132439494133, 0.13012181222438812, -0.03681004047393799, -0.14144907891750336, -0.1046103984117508, -0.030502108857035637, 0.12732824683189392, -0.07237887382507324, 0.08290114253759384, 0.18744155764579773, 0.24024541676044464, -0.27384069561958313, -0.5661295652389526, -0.03166813775897026, -0.04507235437631607, 0.6306038498878479, 0.24905119836330414, -0.35934674739837646, -0.32420504093170166, 0.23131901025772095, 0.5897347927093506, -0.04271715134382248, 0.22548696398735046, 0.35947185754776, -0.08597327768802643, -0.22067244350910187, -0.3616172969341278, 0.30937913060188293, -0.032761987298727036, -0.20784343779087067, 0.24105612933635712, 0.21468156576156616, -0.10380800813436508, 0.3323219120502472, 0.06377401202917099, 0.1596951186656952, 0.333335816860199, -0.058382753282785416, -0.22033807635307312, 0.11703455448150635, 0.12109646946191788, -0.25814539194107056, -0.23531030118465424, -0.06850767880678177, 0.210846945643425, 0.10274728387594223, 0.08350047469139099, -0.08771168440580368, -0.6157522797584534, 0.04330864176154137, -0.10995139926671982, 0.0962609350681305, 0.3532509505748749, -0.023694796487689018, -0.023614821955561638, -0.005031100474298, -0.29542455077171326, -0.2439957559108734, 0.13757634162902832, -0.21491409838199615, 0.15142978727817535, -0.005148689728230238, 0.12474804371595383, 0.17198605835437775, 0.1946256160736084, 0.35390591621398926, 0.09507924318313599, 0.41593682765960693, 0.01763460971415043, 0.2028152495622635, -0.12274111062288284, -0.49601417779922485, 0.2217463105916977, -0.09357494860887527, 0.07301773875951767, 0.06442420929670334, 0.024882318452000618, 0.2972835600376129, -0.2300758808851242, 0.4053131937980652, -0.43268051743507385, -0.2399405539035797, -0.12160463631153107, -0.06792175024747849, -0.05996173247694969, 0.0068515301682055, -0.0686788558959961, -0.4538888931274414, -0.017498940229415894, -0.019770128652453423, 0.06182052940130234, -0.06522020697593689, -0.06905154138803482, -0.19122479856014252, -0.5020269155502319, -0.08778928220272064, 0.30134838819503784, 0.1033225879073143, 0.347380131483078, -0.013906635344028473, 0.4603223502635956, -0.09228185564279556, 0.06990313529968262, 0.4486810863018036, -0.37803155183792114, -0.16489282250404358, 0.4228249788284302, 0.012890255078673363, -0.3764900863170624, -0.04922674223780632, -0.3481474816799164, 0.15043148398399353, 0.21734800934791565, 0.5315401554107666, -0.3542802631855011, -0.10138631612062454, 0.2975427806377411, 0.06512032449245453, -0.07052233070135117, 0.041090209037065506, -0.16710978746414185, -0.2446782886981964, -0.06936415284872055, -0.10139504820108414, 0.15437279641628265, 0.43778330087661743, 0.11572489142417908, 0.2029924839735031, -0.45739680528640747, -0.18739257752895355, 0.18590250611305237, -0.19368839263916016, 0.010494282469153404, 0.10937588661909103, 0.0429963693022728, -0.14653380215168, -0.2478700578212738, -0.015292667783796787, 0.3211359977722168, -0.03844849020242691, -0.6306098699569702, 0.03580455854535103, -0.2560367286205292, 0.32252243161201477, 0.05269414931535721, -0.21525520086288452, 0.05281694233417511, -0.3137717843055725, 0.45787569880485535, -0.07798781991004944, 0.0748889371752739, 0.4235400855541229, 0.06541617959737778, -0.1905526965856552, -0.11974646151065826, 0.42453089356422424, 0.25868192315101624, -0.1111522912979126, 0.5211783647537231, 0.043051186949014664, -0.3598249852657318, -0.07596626877784729, 0.5890724658966064, 0.697599470615387, -0.22261153161525726, -0.2586011290550232, 0.16720043122768402, 0.08235297352075577, 0.5033918619155884, 0.1930381953716278, 0.12688934803009033, -0.047499291598796844, -0.14266303181648254, -0.011538802646100521, 0.017642654478549957, 0.02919786423444748, -0.08124547451734543, -0.27213165163993835, 0.4355114698410034, -0.32331201434135437, -0.1192600280046463, -0.05090271309018135, 0.021295666694641113, 0.10173551738262177, -0.3318382799625397, 0.0844058245420456, 0.10857771337032318, -0.05231858789920807, -0.0902346670627594, -0.12921260297298431, -0.044477351009845734, 0.08807236701250076, -0.07835017144680023, -0.3915769159793854, -0.22250986099243164, -0.23791269958019257, -0.022987529635429382, 0.17375054955482483, 0.27669447660446167, -0.046166956424713135, 0.37172314524650574, 0.883309006690979, -0.08970163762569427, -0.2677645981311798, 0.049895573407411575, -0.41897591948509216, 0.10672277957201004, -0.16139082610607147, -0.056174758821725845, 0.3169286847114563, 0.047415051609277725, 0.11929922550916672, 0.13141608238220215, 0.18532784283161163, -0.09219945222139359, 0.00020382864749990404, 0.00913803931325674, -0.1528530865907669, -0.0397045835852623, 0.13441619277000427, -0.14658218622207642, 0.1696137934923172, -0.27019602060317993, 0.030994873493909836, -0.04209325462579727, 0.014613778330385685, 0.3356795907020569, -0.15731728076934814, 0.013188667595386505, 0.12775753438472748, 0.05601029098033905, -0.013466632924973965, -0.11976196616888046, -0.003982081077992916, 0.11321566998958588, -0.009625905193388462, -0.055326271802186966, 0.00668456731364131, -0.1056758463382721, -0.2056482583284378, 0.44666603207588196, 0.2419058233499527, -0.12883435189723969, 0.21511299908161163, 0.7306455373764038, 0.01712256856262684, 0.19846300780773163, 0.00839336309581995, -0.44109272956848145, 0.06962564587593079, 0.2799544632434845, -0.36290937662124634, -0.267287939786911, -0.37855324149131775, 0.26722627878189087, 0.0635080635547638, 0.08191929012537003, -0.2287498563528061, -0.05125255882740021, -0.3522157371044159, -0.012071878649294376, 0.06625986099243164, -0.12351331114768982, -0.08766213804483414, 0.24277900159358978, 0.023447979241609573, -0.059009771794080734, -0.1183171421289444, -0.06451909244060516, -0.3597303330898285, 0.1503220498561859, 0.1956709325313568, 0.08650021255016327, -0.061236679553985596, -0.1852584183216095, -0.2648678123950958, -0.2953040599822998, -0.24208106100559235, 0.3174172341823578, -0.12733469903469086, 0.13425810635089874, -0.2086675465106964, 0.41463330388069153, 0.20629745721817017, 0.010060839354991913, 0.27347683906555176, 0.2579463720321655, -0.10878799855709076, 0.17875811457633972, 0.20474642515182495, 0.032422516494989395, -0.39547431468963623, -0.05991848185658455, -0.01245866809040308, -0.09959811717271805, 0.2261800915002823, -0.15810458362102509, 0.2550155520439148, 0.3032355308532715, 0.2987624704837799, 0.0989709123969078, -0.14194484055042267, 0.03778015449643135, -0.04529103264212608, 0.08280332386493683, -0.0907507836818695, -0.3420124650001526, -0.1665184050798416, 0.11570250242948532, 0.10419753193855286, 0.428494930267334, 0.2192298024892807, 0.1410689800977707, 0.18902896344661713, -0.29531922936439514, 0.20037224888801575, -0.15828508138656616, -0.15351754426956177, 0.23033685982227325, 0.21609701216220856, 0.11021435260772705, 0.513871967792511, 0.0970056802034378, 0.33115658164024353, 0.5222996473312378, -0.2508503496646881, 0.18690793216228485, -0.08416067063808441, 0.07252881675958633, 0.03038913942873478, 0.09473147243261337, 0.16011691093444824, 0.09579449146986008, -0.2019711285829544, -0.02147340588271618, -0.4733526408672333, 0.07676494866609573, -0.7301223874092102, -0.2037561982870102, -0.3301919400691986, 0.4148743152618408, 0.09141041338443756, -0.2277122288942337, -0.3952121138572693, -0.1649126559495926, -0.11751685291528702, -0.14009715616703033, -0.17647740244865417, 0.2861177921295166, 0.33232519030570984, -0.03802395612001419, 0.17974749207496643, -0.23770560324192047, -0.7110536694526672, 0.4802885055541992, 0.2804577052593231, -0.16381165385246277, 0.23551133275032043, 0.2511025369167328, 0.12855376303195953, 0.10145635157823563, 0.6210409998893738, 0.49346914887428284, 0.339962363243103, -0.12551119923591614, -0.2191709280014038, -0.2566690444946289, -0.18119332194328308, -0.09690473228693008, 0.19628757238388062, 0.44866397976875305, 0.07679241895675659, 0.13827107846736908, 0.04151183366775513, -0.16041624546051025, 0.32341450452804565, -0.3106698989868164, 0.18606002628803253, -0.2885330617427826, 0.25266560912132263, -0.09160873293876648, 0.01818738877773285, 0.06827844679355621, -0.12381835281848907, -0.3758450448513031, -0.06212055683135986, 0.2017790973186493, -0.049146868288517, 0.24223312735557556, -0.06143596023321152, 0.037075839936733246, 0.2704460322856903, 0.2974846661090851, 0.013661102391779423, -0.016382839530706406, -0.2051001489162445, 0.07529599964618683, -0.5276016592979431, -0.15790411829948425, 0.18761584162712097, -0.0403059758245945, 0.2682579457759857, 0.03561732918024063, -0.05185595527291298, 0.2787487208843231, 0.25363069772720337, -0.09347698092460632, 0.39224204421043396, 0.11862552911043167, -0.39828118681907654, 0.16055946052074432, 0.17943911254405975, -0.11331893503665924, 0.06049708276987076, -0.2399597465991974, 0.18222829699516296, -0.3501203954219818, 0.021892355754971504, -0.224232017993927, 0.21882298588752747, 0.08377715945243835, 0.27909040451049805, 0.2434476912021637, 0.28928273916244507, 0.4600462317466736, 0.1918538212776184, -0.027339685708284378, 0.04336688667535782, 0.07583478838205338, 0.11638263612985611, 0.09131516516208649, -0.17473679780960083, 0.30087825655937195, -0.3320212662220001, 0.007398784160614014, -0.19842441380023956, 0.0825691893696785, 0.06646446883678436, -0.17217816412448883, -0.24621304869651794, 0.2692367434501648, -0.32087060809135437, -0.09518931806087494, 0.3345550000667572, 0.48767849802970886, -0.03523679077625275, 0.426341712474823, 0.030074236914515495, -0.35200926661491394, 0.3873305320739746, -0.204019695520401, -0.3546738922595978, -0.13903766870498657, 0.2584778666496277, 0.0670100748538971, -0.10505659133195877, -0.6502358913421631, -0.12259262055158615, 0.2604498565196991, 0.2896444797515869, -0.5856113433837891, 0.2949887216091156, -0.19049668312072754, -0.14745855331420898, 0.013612624257802963, -0.3887822926044464, -0.09530401974916458, 0.031689658761024475, 0.13350607454776764, 0.2647954523563385 ]
https://github.com/huggingface/datasets/issues/2553
load_dataset("web_nlg") NonMatchingChecksumError
Hi ! Thanks for reporting. This is due to the WebNLG repository that got updated today. I just pushed a fix at #2558 - this shouldn't happen anymore in the future.
Hi! It seems the WebNLG dataset gives a NonMatchingChecksumError. ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset('web_nlg', name="release_v3.0_en", split="dev") ``` Gives ``` NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://gitlab.com/shimorina/webnlg-dataset/-/archive/master/webnlg-dataset-master.zip'] ``` ## Environment info - `datasets` version: 1.8.0 - Platform: macOS-11.3.1-x86_64-i386-64bit - Python version: 3.9.4 - PyArrow version: 3.0.0 Also tested on Linux, with python 3.6.8
31
load_dataset("web_nlg") NonMatchingChecksumError Hi! It seems the WebNLG dataset gives a NonMatchingChecksumError. ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset('web_nlg', name="release_v3.0_en", split="dev") ``` Gives ``` NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://gitlab.com/shimorina/webnlg-dataset/-/archive/master/webnlg-dataset-master.zip'] ``` ## Environment info - `datasets` version: 1.8.0 - Platform: macOS-11.3.1-x86_64-i386-64bit - Python version: 3.9.4 - PyArrow version: 3.0.0 Also tested on Linux, with python 3.6.8 Hi ! Thanks for reporting. This is due to the WebNLG repository that got updated today. I just pushed a fix at #2558 - this shouldn't happen anymore in the future.
[ -0.19279494881629944, 0.12983907759189606, -0.13637611269950867, 0.040642425417900085, 0.2651570737361908, 0.008678526617586613, 0.13199782371520996, 0.4511447548866272, 0.2963729500770569, 0.08619622886180878, -0.06551362574100494, 0.27239641547203064, 0.022088488563895226, -0.025521796196699142, -0.21546612679958344, 0.5214452147483826, 0.07555138319730759, 0.016244707629084587, -0.10936946421861649, -0.14617885649204254, -0.20667172968387604, 0.11847149580717087, -0.07337401062250137, -0.10032162815332413, 0.0636148601770401, 0.22365471720695496, 0.2499176263809204, 0.2134232521057129, -0.12483231723308563, -0.2628318667411804, 0.3232801556587219, -0.04954691231250763, -0.08511151373386383, 0.22110405564308167, -0.00010712481162045151, 0.1515759825706482, 0.3256530165672302, -0.025644322857260704, -0.42830148339271545, 0.0641530305147171, -0.5148389339447021, -0.5065799355506897, -0.01882721297442913, -0.20065459609031677, -0.003536038566380739, 0.24381481111049652, 0.09486746042966843, -0.17460250854492188, 0.12219449132680893, 0.15834058821201324, 0.2839369773864746, 0.555820107460022, -0.00553774693980813, 0.1301894336938858, 0.039026807993650436, -0.11251543462276459, -0.1401672065258026, 0.21859101951122284, 0.08098266273736954, -0.1305692493915558, -0.3386833369731903, 0.1725435107946396, -0.25408321619033813, 0.2696690559387207, 0.11475685983896255, -0.09824229776859283, 0.23154637217521667, -0.08170043677091599, 0.16343910992145538, 0.38822096586227417, 0.16148264706134796, -0.2111610323190689, -0.211198627948761, -0.1415819376707077, -0.09774107486009598, -0.06480838358402252, 0.23982281982898712, 0.37237611413002014, -0.2639216184616089, -0.08066026866436005, -0.3824213445186615, 0.24063614010810852, 0.13032402098178864, 0.1618117392063141, 0.09316890686750412, 0.2458067238330841, 0.05263972654938698, -0.017034370452165604, -0.011707535944879055, -0.20155072212219238, 0.1708223819732666, -0.41769078373908997, -0.16169951856136322, 0.06880471855401993, -0.5657452344894409, -0.12346535921096802, 0.2419981211423874, 0.5164667963981628, 0.3947957754135132, 0.445156455039978, 0.25177451968193054, 0.24481961131095886, -0.2092457264661789, 0.12714850902557373, -0.04403253644704819, 0.1494942456483841, 0.21719439327716827, -0.08376054465770721, 0.3254152238368988, 0.002421487122774124, 0.026335524395108223, 0.2340877205133438, 0.1602007895708084, -0.14985595643520355, 0.5749762058258057, 0.0011791824363172054, 0.1858931928873062, -0.15888293087482452, -0.23982121050357819, 0.22972682118415833, 0.11528579890727997, -0.1611861139535904, 0.05089923366904259, 0.367236465215683, -0.1573462039232254, 0.20449107885360718, -0.0839352160692215, 0.1732858419418335, -0.14685559272766113, -0.29987186193466187, -0.28783276677131653, -0.20221899449825287, -0.05963129550218582, -0.029689697548747063, 0.20521409809589386, -0.06021902710199356, 0.32273828983306885, 0.12609317898750305, 0.015207682736217976, -0.03983835503458977, 0.17059844732284546, 0.10354499518871307, -0.08059010654687881, 0.29385635256767273, 0.048956941813230515, 0.11088226735591888, 0.23251527547836304, 0.08429189771413803, -0.15139205753803253, 0.07216459512710571, -0.11991724371910095, -0.2106700986623764, 0.058168843388557434, 0.2775704562664032, -0.3827541172504425, -0.1413070410490036, -0.01957252062857151, -0.4089506268501282, 0.2865953743457794, -0.0916861966252327, 0.06419176608324051, -0.24044549465179443, -0.1441320925951004, -0.29841718077659607, -0.10503093153238297, 0.16966895759105682, 0.23770025372505188, -0.0296221561729908, -0.17844727635383606, -0.13163813948631287, 0.3148428797721863, 0.3782690763473511, -0.10697820782661438, -0.15478980541229248, -0.2393767088651657, 0.13313065469264984, 0.549522876739502, -0.1487932801246643, -0.435550332069397, 0.14574691653251648, -0.012282895855605602, 0.2730148136615753, -0.10011601448059082, 0.24682404100894928, -0.42841196060180664, 0.020671958103775978, -0.28520429134368896, 0.28632569313049316, 0.01236083172261715, 0.29562148451805115, -0.24429868161678314, -0.23574261367321014, 0.5397989153862, 0.076587975025177, -0.04109439626336098, -0.01274812687188387, 0.14153467118740082, -0.24479854106903076, 0.3284386396408081, -0.2872790992259979, -0.061706509441137314, 0.0739208310842514, 0.2371891289949417, 0.020666349679231644, 0.010072194039821625, -0.012223940342664719, -0.5249135494232178, 0.26441290974617004, -0.10441657155752182, 0.04275207221508026, -0.02492874301970005, -0.07072044909000397, -0.15820221602916718, 0.030022375285625458, -0.14339788258075714, 0.034607596695423126, 0.17069371044635773, 0.5151423811912537, 0.26426318287849426, 0.04455912113189697, 0.024048466235399246, 0.28355687856674194, -0.3699106276035309, 0.000020616076653823256, -0.5306884050369263, 0.272382915019989, -0.08840084820985794, -0.09013117104768753, 0.08434723317623138, -0.044148869812488556, -0.05752958357334137, 0.10413555055856705, -0.22342729568481445, 0.3572007119655609, 0.052773959934711456, -0.03788720816373825, 0.07283411920070648, 0.3291751444339752, -0.1157856285572052, -0.2637716233730316, -0.07209442555904388, 0.6472375392913818, 0.12139153480529785, -0.10788894444704056, -0.16842631995677948, 0.5147510170936584, -0.12856535613536835, 0.1689170002937317, -0.01759803295135498, 0.1398557424545288, 0.26366886496543884, -0.16206282377243042, -0.20841500163078308, -0.11597996205091476, 0.2796030640602112, -0.18193456530570984, 0.20425477623939514, 0.13519038259983063, -0.23311643302440643, 0.014666799455881119, 0.4084135591983795, -0.16457314789295197, 0.22195133566856384, 0.13395243883132935, 0.23644602298736572, -0.2454291582107544, -0.009847155772149563, 0.1951204389333725, 0.3664529621601105, 0.1531025618314743, 0.042347125709056854, 0.0599132664501667, -0.28928783535957336, -0.2328203320503235, 0.030000627040863037, 0.02167590893805027, 0.22927847504615784, 0.2969279885292053, 0.29054978489875793, -0.29664114117622375, -0.45139023661613464, -0.10664114356040955, -0.08665710687637329, 0.2381996214389801, -0.3005838096141815, -0.06912387907505035, -0.31293946504592896, -0.27740907669067383, -0.2933867275714874, -0.31663060188293457, -0.4951162338256836, -0.5132744312286377, -0.00910833291709423, 0.056307144463062286, -0.18291230499744415, 0.3383721709251404, -0.4450571835041046, 0.037730757147073746, 0.18503841757774353, 0.08694402873516083, -0.037746235728263855, -0.12096252292394638, -0.0876406580209732, 0.05534641444683075, 0.377540647983551, 0.011562898755073547, 0.32316476106643677, -0.31493058800697327, -0.07581156492233276, -0.33809536695480347, -0.22872662544250488, 0.026402704417705536, -0.0950910821557045, 0.09998930990695953, 0.21304211020469666, 0.23595957458019257, -0.006554447580128908, -0.1909569799900055, 0.34537073969841003, -0.2321029156446457, -0.40617257356643677, 0.33268147706985474, -0.024583816528320312, -0.02568242885172367, 0.012629304081201553, -0.08882821351289749, -0.09776174277067184, -0.2715514898300171, -0.05558856204152107, 0.17483782768249512, 0.21740350127220154, 0.2924055755138397, -0.08285345137119293, -0.07497920840978622, 0.11266662925481796, 0.44080719351768494, -0.3611868619918823, -0.5222999453544617, 0.42444154620170593, 0.04663461446762085, -0.35147640109062195, -0.19041012227535248, -0.06771320849657059, 0.23866750299930573, -0.008747287094593048, -0.4237615764141083, -0.15798410773277283, -0.3770035207271576, 0.22113706171512604, 0.1855119913816452, -0.03176600858569145, 0.1636943817138672, 0.05859674513339996, -0.12098202854394913, -0.3027125597000122, -0.07903178781270981, 0.18297913670539856, -0.26584094762802124, 0.26076972484588623, -0.1361594945192337, 0.2820148468017578, -0.0035262913443148136, 0.20517948269844055, 0.40788814425468445, 0.013267584145069122, 0.012966710142791271, -0.003606195794418454, 0.3086513578891754, -0.04454163461923599, -0.24727392196655273, -0.13899773359298706, 0.027422459796071053, 0.0640769898891449, 0.270485520362854, -0.013738065026700497, -0.13996458053588867, -0.05765382945537567, 0.07027870416641235, -0.13782745599746704, -0.20344501733779907, 0.06696893274784088, -0.061594072729349136, 0.12629522383213043, 0.18689846992492676, 0.11679836362600327, -0.22751647233963013, -0.3898285925388336, 0.027228085324168205, 0.2789311408996582, -0.20992478728294373, -0.050867557525634766, -0.37763476371765137, 0.07200606167316437, -0.09770690649747849, 0.3176906704902649, 0.14396259188652039, 0.48314622044563293, 0.21757616102695465, -0.4104098677635193, -0.009487946517765522, -0.16123244166374207, 0.12950849533081055, -0.480975866317749, 0.39391517639160156, 0.018296070396900177, 0.12029864639043808, -0.46626394987106323, -0.1257723569869995, 0.024008795619010925, -0.2370338886976242, 0.5430127382278442, 0.00312286289408803, -0.15673936903476715, 0.006920521147549152, 0.0016437657177448273, 0.3630625903606415, -0.1951064020395279, -0.26246413588523865, -0.45722442865371704, -0.04251834750175476, -0.3031875193119049, -0.08496236801147461, -0.2918834686279297, 0.11517095565795898, -0.09525065869092941, 0.1547553688287735, -0.03636118769645691, -0.05993136018514633, 0.28029999136924744, 0.11408793926239014, 0.09190664440393448, 0.06815396994352341, 0.21600355207920074, -0.36737334728240967, 0.17429761588573456, -0.09506735950708389, 0.6290802955627441, -0.09041062742471695, -0.4050775170326233, -0.020079921931028366, -0.11386734992265701, -0.2192772626876831, 0.10241908580064774, 0.07123395800590515, -0.021134749054908752, 0.3180246949195862, -0.029225235804915428, -0.13213780522346497, -0.05296455696225166, -0.06548476219177246, 0.05684376135468483, -0.31348222494125366, -0.2322528213262558, 0.24389368295669556, 0.024927770718932152, -0.0923280194401741, 0.3096950054168701, -0.3169838786125183, 0.0038189219776540995, 0.19917404651641846, 0.23151157796382904, 0.8551764488220215, 0.09462963044643402, 0.05240246281027794, 0.26039785146713257, -0.23810940980911255, 0.04610683023929596, -0.22183836996555328, 0.12226247042417526, -0.38472190499305725, -0.16209065914154053, 0.029629366472363472, -0.23975487053394318, 0.11046802252531052, 0.1308332085609436, 0.045658260583877563, 0.3157443702220917, 0.0824447050690651, 0.2654357850551605, 0.02678561955690384, 0.26266956329345703, -0.19821682572364807, -0.007739637047052383, -0.17839570343494415, 0.2799905240535736, -0.10963397473096848, 0.28391003608703613, -0.024587901309132576, -0.0027100280858576298, -0.06802718341350555, -0.120339035987854, -0.30877333879470825, 0.35784977674484253, 0.2986806631088257, 0.3499225080013275, 0.31097593903541565, -0.03014812245965004, -0.44353365898132324, 0.23089148104190826, 0.3204563856124878, 0.17092153429985046, -0.27960556745529175, 0.1042744442820549, 0.3298264443874359, 0.32115641236305237, -0.0569300651550293, 0.03603491187095642, 0.29862797260284424, -0.034251753240823746, -0.16731755435466766, -0.011326677165925503, -0.0020911211613565683, -0.49328354001045227, -0.046409718692302704, -0.045481983572244644, -0.3058384954929352, -0.25408804416656494, 0.060503147542476654, 0.019604215398430824, 0.1603306084871292, -0.2026752084493637, 0.193044975399971, 0.2711470127105713, -0.1588139832019806, 0.25498348474502563, 0.060897570103406906, -0.3740057945251465, -0.20733748376369476, 0.5218608379364014, 0.1486140638589859, 0.06977377086877823, 0.3076372444629669, 0.06543152779340744, -0.22386568784713745, -0.27674752473831177, 0.010303153656423092, 0.08175906538963318, -0.2700171172618866, 0.08665294945240021, -0.27230554819107056, 0.16384238004684448, 0.017519785091280937, 0.4179404079914093, 0.1980934590101242, 0.2834111154079437, 0.13011376559734344, -0.4619600176811218, -0.11999194324016571, -0.1962403506040573, 0.2207476794719696, 0.2335411012172699, -0.3102973401546478, 0.0291033573448658, -0.06884665787220001, -0.06427402049303055, -0.4017803370952606, -0.1179601401090622, -0.3063414692878723, 0.04543808475136757, -0.03781471401453018, -0.08232182264328003, 0.014070246368646622, 0.019772348925471306, 0.20366862416267395, -0.1700204461812973, -0.31565579771995544, -0.2876889705657959, 0.008588988333940506, 0.08341212570667267, 0.05856257677078247, -0.18697510659694672, 0.06151457503437996, -0.050439417362213135, -0.03727760538458824, -0.16536298394203186, -0.0062807779759168625, 0.055981047451496124, -0.12455467879772186, 0.23158660531044006, 0.030283717438578606, -0.05458642914891243, 0.16914358735084534, -0.17043134570121765, -0.48532938957214355, 0.09378832578659058, 0.026177261024713516, 0.018859166651964188, 0.16634511947631836, 0.041622575372457504, 0.22095708549022675, 0.13706383109092712, -0.04573168605566025, -0.07300712913274765, 0.3050607740879059, -0.3060208261013031, -0.09133723378181458, 0.35148924589157104, 0.2890301048755646, 0.24220149219036102, -0.3309824466705322, -0.09745459258556366, 0.11712435632944107, 0.3108784854412079, -0.3707127571105957, -0.0434039942920208, 0.2625825107097626, 0.15523020923137665, 0.1360214650630951, 0.09857812523841858, 0.07001016288995743, -0.3690333068370819, 0.5197039842605591, 0.025309022516012192, 0.16972212493419647, -0.45045456290245056, 0.16518792510032654, 0.3777584135532379, -0.07523936033248901, -0.11581125110387802, 0.17552606761455536, -0.22763314843177795, -0.00306067056953907, -0.022471478208899498, -0.046796251088380814, 0.3226107358932495, -0.19822144508361816, 0.15862852334976196, -0.28861337900161743, -0.420431911945343, 0.4601886570453644, 0.21647202968597412, -0.13071183860301971, 0.021112903952598572, 0.30014005303382874, 0.24066831171512604, 0.00031428513466380537, 0.23376648128032684, -0.5237199068069458, 0.21977710723876953, -0.16609524190425873, -0.12398383021354675, -0.1766878068447113, -0.13082294166088104, 0.022597147151827812, 0.3250639736652374, -0.03984177112579346, 0.09516184031963348, 0.008148460648953915, 0.1755940318107605, -0.15042835474014282, -0.6300576329231262, 0.03776048868894577, -0.030166445299983025, -0.07506992667913437, -0.2521837651729584, 0.12748610973358154, 0.307291716337204, -0.17017993330955505, 0.04241183027625084, 0.3488596975803375, 0.34623366594314575, 0.3489650785923004, 0.24658824503421783, 0.012971008196473122, -0.02326980046927929, -0.029877375811338425, -0.30376896262168884, 0.703905463218689, 0.05581071972846985, 0.016437603160738945, 0.365220844745636, 0.18725740909576416, -0.1858241856098175, 0.0569775216281414, -0.12071201205253601, -0.19570297002792358, -0.028100591152906418, 0.5019016861915588, 0.023771163076162338, 0.14742404222488403, -0.33371415734291077, 0.2036663144826889, -0.3072110712528229, 0.0872112363576889, 0.10411322861909866, 0.21707271039485931, 0.16621509194374084, -0.25206509232521057, 0.12901386618614197, -0.12721922993659973, 0.4657266438007355, 0.13481265306472778, -0.09193488210439682, -0.044652875512838364, -0.38442912697792053, -0.5979167819023132, 0.27050748467445374, -0.2651815712451935, -0.0466284453868866, -0.08240704238414764, 0.2728163003921509, -0.05143589526414871, 0.19507145881652832, 0.17346782982349396, -0.04618436470627785, -0.18691493570804596, 0.0627996176481247, -0.2228790670633316, 0.02213451825082302, 0.08496301621198654, -0.20451653003692627, -0.045315809547901154, -0.29674801230430603, 0.24866971373558044, 0.03419772535562515, 0.20291317999362946, -0.09038836508989334, -0.043453995138406754, -0.05092988163232803, 0.27719974517822266, 0.23989924788475037, 0.31353819370269775, 0.5241897106170654, -0.08096275478601456, -0.15977254509925842, -0.2426401972770691, -0.19349904358386993, -0.12480169534683228, 0.3427433371543884, -0.13327330350875854, 0.2896222472190857, -0.04877098649740219, -0.16103824973106384, -0.2663969397544861, 0.27887964248657227, 0.1420765221118927, -0.22439442574977875, -0.12599563598632812, 0.0790790319442749, -0.2387903779745102, 0.09935206919908524, -0.2077053338289261, -0.08647099137306213, 0.17357806861400604, 0.4444511830806732, -0.13182687759399414, -0.22260533273220062, 0.43845146894454956, -0.09634188562631607, -0.22031095623970032, -0.28802791237831116, 0.1975809931755066, -0.17422685027122498, -0.23280754685401917, -0.6331064701080322, 0.0692528784275055, 0.348944753408432, 0.1409206986427307, -0.09394267946481705, 0.2052641361951828, -0.17683744430541992, 0.22152194380760193, -0.0507071353495121, 0.20846311748027802, 0.10359778255224228, -0.3344598114490509, 0.05407755821943283, -0.16850578784942627 ]
https://github.com/huggingface/datasets/issues/2552
Keys should be unique error on code_search_net
Two questions: - with `datasets-cli env` we don't have any information on the dataset script version used. Should we give access to this somehow? Either as a note in the Error message or as an argument with the name of the dataset to `datasets-cli env`? - I don't really understand why the id is duplicated in the code of `code_search_net`, how can I debug this actually?
## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0
66
Keys should be unique error on code_search_net ## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0 Two questions: - with `datasets-cli env` we don't have any information on the dataset script version used. Should we give access to this somehow? Either as a note in the Error message or as an argument with the name of the dataset to `datasets-cli env`? - I don't really understand why the id is duplicated in the code of `code_search_net`, how can I debug this actually?
[ -0.009492403827607632, 0.004908621311187744, -0.10378047823905945, 0.3735044002532959, 0.04693065583705902, -0.05958148464560509, 0.23553311824798584, 0.2376767098903656, 0.05807110294699669, 0.04209858179092407, -0.08941294252872467, 0.4072093665599823, -0.15770073235034943, 0.10433845967054367, 0.16285887360572815, 0.06703110039234161, 0.014338470064103603, 0.15045128762722015, 0.12020223587751389, -0.1288989782333374, -0.3279084861278534, 0.2217668890953064, -0.249789759516716, 0.050549693405628204, -0.23360979557037354, -0.1389334350824356, -0.21910956501960754, 0.2946092188358307, -0.17181234061717987, -0.6023651361465454, 0.23651441931724548, 0.24690820276737213, -0.3047545850276947, 0.3485264778137207, -0.00011295880540274084, 0.14549857378005981, 0.3868982791900635, -0.011275413446128368, -0.24606768786907196, -0.19642594456672668, -0.10868223756551743, -0.1141095831990242, 0.093717060983181, -0.31640028953552246, 0.018459368497133255, -0.1501699537038803, -0.11318381130695343, -0.5023269057273865, 0.8769926428794861, 0.21019823849201202, 0.2571645677089691, 0.2303171306848526, 0.3121253550052643, -0.22142711281776428, 0.2857809364795685, -0.14498086273670197, -0.04080805554986, 0.4033091366291046, 0.1780674159526825, -0.05045327916741371, -0.0015698454808443785, 0.25355833768844604, 0.14914551377296448, -0.09222841262817383, 0.48892122507095337, 0.004278979264199734, 0.05236073210835457, -0.3802725672721863, 0.18330450356006622, 0.08421773463487625, 0.13998594880104065, -0.2937673330307007, -0.2534075379371643, -0.28524211049079895, -0.0006023428286425769, -0.2383114993572235, 0.35818007588386536, 0.11302797496318817, -0.18320927023887634, 0.10096940398216248, -0.023432856425642967, -0.24438779056072235, -0.020939882844686508, -0.06697932630777359, -0.0024757948704063892, 0.0001441583881387487, -0.040680255740880966, 0.17414827644824982, 0.14366401731967926, -0.030949855223298073, 0.29420745372772217, -0.13356943428516388, 0.10886169224977493, 0.21964247524738312, -0.48743104934692383, 0.10885261744260788, -0.041737284511327744, -0.06662414222955704, 0.25262776017189026, 0.0501062273979187, 0.15865424275398254, -0.13832345604896545, 0.058277737349271774, 0.03654571250081062, 0.13621185719966888, 0.11763879656791687, 0.024738434702157974, 0.23959191143512726, 0.19721850752830505, -0.21882693469524384, -0.27112674713134766, -0.056466732174158096, -0.1785912811756134, -0.1516626924276352, 0.44018059968948364, 0.08090853691101074, 0.5045517086982727, 0.051636721938848495, -0.19577322900295258, 0.1798708736896515, -0.18087811768054962, -0.17192605137825012, 0.07397175580263138, 0.3315834701061249, 0.1826924979686737, -0.36082255840301514, 0.08121459931135178, 0.23049519956111908, -0.1570228487253189, -0.2011745125055313, -0.3156380355358124, -0.14958761632442474, -0.07725360244512558, -0.12676659226417542, 0.21542595326900482, -0.5755312442779541, 0.29173338413238525, 0.2776086628437042, -0.07649000734090805, -0.41851338744163513, -0.010601834394037724, 0.06612752377986908, -0.21158400177955627, 0.10408033430576324, -0.03969672694802284, 0.09296424686908722, -0.08532470464706421, -0.23814310133457184, -0.08662018924951553, 0.20180091261863708, -0.21553455293178558, -0.3841582238674164, -0.011381260119378567, 0.27001845836639404, 0.04605831950902939, 0.12732431292533875, 0.017267536371946335, 0.034430813044309616, 0.2237822711467743, 0.19118787348270416, 0.037422534078359604, -0.03368968889117241, -0.02447383664548397, -0.32029828429222107, 0.2307136207818985, 0.625889003276825, -0.13886971771717072, -0.09949933737516403, -0.16616091132164001, -0.033791281282901764, 0.08669599145650864, 0.39924466609954834, -0.2378603219985962, 0.426987886428833, -0.31613898277282715, 0.2103261947631836, 0.7067998647689819, -0.20626595616340637, -0.3250534236431122, 0.13620588183403015, -0.25231313705444336, -0.1497698277235031, 0.1035354733467102, 0.02699667401611805, 0.18629951775074005, 0.0956459790468216, 0.1519937962293625, -0.07510067522525787, 0.07339289039373398, -0.0979359820485115, -0.384691447019577, -0.3182409107685089, 0.13996867835521698, -0.07881256937980652, 0.18625079095363617, -0.19083383679389954, 0.26999595761299133, -0.15566839277744293, 0.05821152403950691, -0.13123491406440735, -0.12056002765893936, 0.0026752743870019913, 0.27146053314208984, 0.040804650634527206, 0.08875139057636261, -0.008645451627671719, -0.4823821485042572, 0.3747636079788208, -0.3360305726528168, -0.2697579562664032, -0.1959293782711029, -0.3034655749797821, -0.35152924060821533, 0.14388245344161987, -0.5467948317527771, 0.014295704662799835, 0.2060532122850418, -0.06631427258253098, 0.21715576946735382, 0.10206393152475357, -0.17694005370140076, 0.15948112308979034, 0.0542387031018734, 0.11003495007753372, -0.20681987702846527, 0.250987708568573, -0.4732956886291504, -0.04282556474208832, 0.058891527354717255, 0.2304447740316391, 0.34866029024124146, -0.1266707181930542, -0.16886760294437408, 0.4440194368362427, -0.21932685375213623, 0.05115810036659241, -0.016334539279341698, -0.08885014802217484, 0.13984200358390808, -0.38150790333747864, 0.21653637290000916, 0.2500269114971161, 0.17342056334018707, -0.17316223680973053, -0.07871922105550766, 0.3603440821170807, -0.11167944967746735, 0.09486398845911026, -0.041367173194885254, -0.08704651147127151, 0.07926741987466812, -0.11977921426296234, 0.16312123835086823, -0.10418520122766495, 0.27822086215019226, -0.3106934428215027, 0.38906145095825195, 0.17473983764648438, -0.24437986314296722, 0.12069620192050934, 0.23138169944286346, -0.04080616310238838, 0.10529471933841705, 0.012036023661494255, 0.03238445520401001, -0.1912028193473816, -0.28774294257164, 0.23585207760334015, 0.3477756083011627, 0.15417709946632385, -0.058474499732255936, 0.27577975392341614, -0.01130309421569109, -0.23523803055286407, 0.3930319547653198, -0.12189378589391708, -0.1429181843996048, 0.397644579410553, 0.10854186862707138, 0.04897696152329445, -0.3879252076148987, -0.12170149385929108, 0.17144694924354553, 0.07672044634819031, -0.28297871351242065, 0.01257377490401268, -0.1297803521156311, -0.08319475501775742, -0.456539124250412, 0.5397939085960388, -0.11587352305650711, -0.11273828893899918, 0.252034455537796, 0.017056629061698914, 0.097591832280159, 0.12043933570384979, -0.23072537779808044, 0.18067766726016998, -0.014884854666888714, 0.11465303599834442, -0.23557403683662415, -0.11242705583572388, -0.07719063013792038, 0.03742801770567894, 0.39369693398475647, -0.06055154278874397, 0.5720286965370178, -0.1889272779226303, 0.10648365318775177, -0.17756560444831848, -0.34767913818359375, -0.013159646652638912, -0.004104258958250284, 0.16645793616771698, 0.05053142458200455, -0.1058804914355278, -0.03533521294593811, -0.3789185583591461, 0.2900122106075287, -0.3102479875087738, -0.4068109393119812, -0.0542965903878212, 0.03987736999988556, -0.06463700532913208, -0.2149249017238617, -0.5273551344871521, -0.265046626329422, -0.24305371940135956, 0.31698065996170044, -0.09621554613113403, 0.12793095409870148, 0.3379569947719574, -0.12277147173881531, -0.010192104615271091, -0.005926626268774271, 0.20165148377418518, -0.35942381620407104, 0.04805782064795494, 0.08746543526649475, -0.05090057849884033, -0.35330724716186523, -0.06889308989048004, -0.14486163854599, 0.15145371854305267, -0.0905500128865242, -0.3825453519821167, 0.25843802094459534, -0.2310800552368164, 0.45607107877731323, -0.1607944220304489, 0.33051466941833496, 0.22429662942886353, 0.259956032037735, -0.15050502121448517, -0.18581953644752502, -0.053172774612903595, 0.11411341279745102, -0.12539967894554138, 0.06859346479177475, 0.14049272239208221, 0.2881908416748047, -0.3000932037830353, 0.8568347692489624, 0.6044370532035828, 0.002475525951012969, 0.20318715274333954, -0.17341424524784088, 0.35417723655700684, -0.23690253496170044, -0.4189772307872772, -0.248749777674675, 0.07403146475553513, 0.024824094027280807, 0.11660365015268326, -0.0740138366818428, -0.09495710581541061, 0.13374561071395874, -0.16915874183177948, -0.6246013045310974, -0.31061574816703796, 0.05089573189616203, -0.22327561676502228, 0.15039288997650146, 0.055200401693582535, 0.00797616969794035, 0.052907463163137436, 0.06543894112110138, -0.02478654310107231, 0.23863422870635986, 0.0278170146048069, 0.0320965014398098, -0.18559810519218445, -0.17130137979984283, -0.39484575390815735, 0.10872878134250641, -0.14188708364963531, 0.1687641143798828, -0.0074773826636374, 0.14032214879989624, 0.4162752032279968, -0.19483231008052826, 0.65537428855896, -0.08205447345972061, 0.11870120465755463, 0.11391934752464294, 0.16004733741283417, -0.09184108674526215, -0.12160585820674896, -0.0004839009779971093, 0.4200729429721832, 0.12143072485923767, 0.08286775648593903, -0.28634965419769287, 0.03288578242063522, -0.061845939606428146, 0.2935726046562195, -0.3494207561016083, -0.4181869328022003, -0.10620888322591782, -0.3285909593105316, -0.5123427510261536, -0.000370873516658321, -0.03325452655553818, 0.20048090815544128, -0.0638972595334053, -0.037393949925899506, -0.18627414107322693, -0.2158709466457367, 0.04503575339913368, 0.2135523110628128, 0.2768929898738861, 0.05401691421866417, 0.5974949598312378, 0.43902695178985596, -0.15270774066448212, 0.013894569128751755, 0.7316983342170715, -0.031271710991859436, 0.008835522457957268, -0.3602290451526642, -0.2145642787218094, -0.1516321897506714, 0.3003145158290863, -0.1722506284713745, 0.14545677602291107, 0.06431011110544205, -0.005578681826591492, 0.044282201677560806, -0.2298400104045868, 0.16673262417316437, -0.20308183133602142, -0.1967429220676422, -0.3953811526298523, 0.2921682596206665, -0.12114837020635605, -0.3467521071434021, 0.2700577974319458, 0.14201204478740692, -0.1910458356142044, 0.3929702043533325, -0.2961893677711487, 0.9225983023643494, -0.27705222368240356, -0.03541794791817665, -0.12047963589429855, -0.3473200500011444, 0.2588881254196167, -0.08521212637424469, -0.06641858071088791, -0.5006070733070374, 0.0952882319688797, 0.14009730517864227, -0.09750765562057495, -0.07516174763441086, -0.008912120945751667, -0.30797067284584045, 0.1783439815044403, -0.053248755633831024, 0.031593888998031616, -0.1495845466852188, 0.32730937004089355, -0.003050856990739703, 0.226532444357872, -0.04216931015253067, 0.10008938610553741, 0.18198877573013306, 0.2940020263195038, -0.06903534382581711, -0.014677796512842178, 0.14855097234249115, -0.578879177570343, -0.2620587646961212, 0.045585524290800095, -0.3623944818973541, 0.49108609557151794, 0.02040768973529339, -0.28799453377723694, 0.20397208631038666, 0.025668343529105186, 0.2825470566749573, 0.15512707829475403, -0.033033475279808044, 0.09750191867351532, 0.31196296215057373, 0.15283888578414917, -0.1907721906900406, -0.054185669869184494, -0.06687945127487183, -0.01911168545484543, -0.3339546024799347, -0.06384953111410141, -0.09815312176942825, -0.3854926526546478, -0.189645916223526, 0.22951380908489227, -0.20251944661140442, -0.02923470549285412, 0.1831752359867096, -0.02610814943909645, -0.11397862434387207, -0.2872945964336395, 0.15066540241241455, 0.19377705454826355, 0.028157401829957962, 0.16749362647533417, -0.12792839109897614, -0.1594591587781906, 0.04277151823043823, 0.15847861766815186, 0.3779703676700592, 0.06918005645275116, 0.4716700613498688, -0.2742198705673218, -0.057669688016176224, -0.22294782102108002, 0.09077297151088715, 0.07511928677558899, -0.6839030981063843, 0.22684894502162933, -0.33026084303855896, 0.22168083488941193, 0.04924100264906883, 0.4456791579723358, 0.372816264629364, 0.26416993141174316, 0.044709574431180954, -0.18844641745090485, -0.1231537014245987, -0.02494102157652378, 0.055702175945043564, 0.2507336735725403, 0.03276350349187851, 0.1545562595129013, -0.057899508625268936, 0.22854860126972198, -0.35354000329971313, 0.2854168117046356, -0.06280580163002014, 0.11876478791236877, -0.004163158591836691, -0.11939239501953125, -0.10672911256551743, -0.05843283236026764, 0.16398155689239502, 0.07692504674196243, -0.2023906260728836, -0.24687354266643524, -0.05158117786049843, 0.13135838508605957, -0.005643474403768778, 0.08209895342588425, -0.23496177792549133, -0.2209153026342392, 0.27470988035202026, -0.015356101095676422, 0.20102877914905548, -0.12150801718235016, 0.12963886559009552, 0.037145037204027176, 0.13333706557750702, 0.12746158242225647, -0.2856585681438446, 0.2258189469575882, -0.27112141251564026, 0.3647974133491516, -0.020424513146281242, 0.1812969297170639, -0.05594104155898094, -0.08420828729867935, -0.3009374737739563, 0.06596449762582779, -0.1919427514076233, 0.12324882298707962, 0.17861153185367584, -0.2007998526096344, -0.15158803761005402, 0.3735957145690918, 0.18952494859695435, 0.5776082277297974, -0.37477996945381165, 0.12332116812467575, 0.0016046299133449793, 0.23424875736236572, -0.32705754041671753, -0.12329753488302231, 0.014103583060204983, 0.021993594244122505, 0.2465512603521347, 0.4026122987270355, 0.3325185179710388, -0.20412537455558777, -0.1000593975186348, 0.07733309268951416, 0.4145539402961731, 0.043195389211177826, 0.3692280054092407, 0.4215744435787201, 0.22497305274009705, -0.1458377093076706, 0.31781792640686035, -0.008857371285557747, 0.05325518921017647, 0.5327896475791931, -0.5467885136604309, 0.1335882842540741, 0.00731132784858346, 0.24827316403388977, 0.2667936682701111, -0.1006903126835823, 0.40650245547294617, 0.0637444257736206, -0.06161561980843544, 0.02322176657617092, 0.05910387262701988, 0.16418218612670898, -0.15358513593673706, -0.09861704707145691, -0.06751210242509842, 0.09404109418392181, -0.14254255592823029, -0.11540423333644867, -0.12213683873414993, -0.2859402596950531, -0.23999738693237305, 0.116532102227211, -0.044225115329027176, 0.030431389808654785, 0.18573841452598572, -0.005571016576141119, -0.3209535777568817, -0.3959377706050873, 0.24868141114711761, 0.24779191613197327, 0.3603604733943939, -0.36633166670799255, 0.31895241141319275, 0.5262146592140198, -0.09187469631433487, 0.18580855429172516, 0.51661217212677, 0.6797176599502563, 0.22972974181175232, -0.18708156049251556, 0.26326555013656616, 0.10307721793651581, -0.14979422092437744, -0.17142555117607117, 0.10480005294084549, -0.0949585810303688, 0.15284600853919983, 0.14194872975349426, 0.09637582302093506, -0.12545335292816162, -0.055563729256391525, 0.22385452687740326, 0.09781066328287125, -0.09991760551929474, 0.23345991969108582, -0.17853163182735443, -0.18114838004112244, 0.09593074768781662, 0.1979932188987732, -0.3587416112422943, -0.005802863743156195, 0.3178544342517853, 0.24641937017440796, 0.13596001267433167, -0.19891396164894104, 0.1301409900188446, 0.05042765289545059, 0.3355686366558075, 0.20148341357707977, 0.09953265637159348, -0.26537102460861206, -0.029946474358439445, -0.7278296947479248, 0.05788218975067139, -0.4435495138168335, -0.030902206897735596, 0.20305436849594116, 0.36284929513931274, -0.29938194155693054, 0.049781735986471176, 0.37168437242507935, 0.04440376162528992, 0.014872930012643337, 0.21856406331062317, -0.17056958377361298, -0.00047819639439694583, 0.4338776171207428, -0.23299121856689453, 0.09710130840539932, -0.3571488857269287, 0.36738577485084534, -0.37471482157707214, 0.02232029102742672, -0.1711810827255249, 0.06421808898448944, 0.189308762550354, -0.26246216893196106, 0.42243969440460205, 0.12649190425872803, 0.3507635295391083, 0.001402899855747819, -0.17009426653385162, -0.20353426039218903, -0.11241922527551651, -0.22470074892044067, 0.2866601347923279, 0.4753938317298889, 0.10727618634700775, -0.014148669317364693, -0.45605358481407166, -0.13254955410957336, 0.2371395379304886, 0.057124171406030655, -0.09285116195678711, -0.07322078198194504, 0.05777423456311226, -0.1940237283706665, 0.11423147469758987, 0.03309264034032822, 0.20631955564022064, -0.10235539078712463, 0.17809973657131195, -0.2683041989803314, -0.6693453788757324, 0.4163755774497986, -0.16041967272758484, -0.06921038031578064, -0.15805423259735107, 0.32680511474609375, 0.2550385296344757, 0.11887572705745697, -0.6650727987289429, 0.18001899123191833, 0.5570533871650696, -0.27187883853912354, -0.03802799433469772, 0.15058569610118866, -0.1034703329205513, -0.023336369544267654, -0.008342830464243889, -0.03893648833036423, -0.016970811411738396, -0.29568687081336975, 0.21664108335971832, -0.31605789065361023 ]
https://github.com/huggingface/datasets/issues/2552
Keys should be unique error on code_search_net
Thanks for reporting. There was indeed an issue with the keys. The key was the addition of the file id and row id, which resulted in collisions. I just opened a PR to fix this at https://github.com/huggingface/datasets/pull/2555 To help users debug this kind of errors we could try to show a message like this ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` This way users who what to look for if they want to debug this issue. I opened an issue to track this: https://github.com/huggingface/datasets/issues/2556
## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0
97
Keys should be unique error on code_search_net ## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0 Thanks for reporting. There was indeed an issue with the keys. The key was the addition of the file id and row id, which resulted in collisions. I just opened a PR to fix this at https://github.com/huggingface/datasets/pull/2555 To help users debug this kind of errors we could try to show a message like this ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` This way users who what to look for if they want to debug this issue. I opened an issue to track this: https://github.com/huggingface/datasets/issues/2556
[ -0.039389826357364655, -0.014791853725910187, -0.09282350540161133, 0.3366980254650116, 0.08731978386640549, -0.013939643278717995, 0.20039069652557373, 0.2712211608886719, 0.08827383071184158, 0.06673934310674667, -0.08619927614927292, 0.393449991941452, -0.16239213943481445, 0.13293910026550293, 0.1347278654575348, 0.09150559455156326, -0.04289285093545914, 0.18986892700195312, 0.11818882077932358, -0.05612065643072128, -0.318374365568161, 0.29349684715270996, -0.22281621396541595, 0.032828815281391144, -0.20740482211112976, -0.12978926301002502, -0.1850282847881317, 0.23940260708332062, -0.16951240599155426, -0.6275759339332581, 0.2506464719772339, 0.22042416036128998, -0.30456507205963135, 0.3702608644962311, -0.00011187338532181457, 0.177643820643425, 0.38900724053382874, -0.011913027614355087, -0.2631486654281616, -0.18946050107479095, -0.09327440708875656, -0.07266441732645035, 0.09867458045482635, -0.2597334086894989, -0.06124990060925484, -0.1425025910139084, -0.10621459037065506, -0.5259362459182739, 0.8551871180534363, 0.22494292259216309, 0.261464923620224, 0.19248713552951813, 0.3430314362049103, -0.25819727778434753, 0.24358470737934113, -0.17720432579517365, -0.05678102374076843, 0.3766360282897949, 0.20654010772705078, -0.05283018574118614, 0.014835820533335209, 0.2883768677711487, 0.15086676180362701, -0.10998377203941345, 0.4550984799861908, -0.04613209515810013, 0.05629509314894676, -0.34456148743629456, 0.20294225215911865, 0.08504330366849899, 0.09339392185211182, -0.297228068113327, -0.21182025969028473, -0.26302337646484375, 0.043652549386024475, -0.2451477348804474, 0.3421131670475006, 0.13947813212871552, -0.21775111556053162, 0.16495107114315033, -0.017371192574501038, -0.2581019401550293, 0.004423440899699926, -0.0469905324280262, -0.012423510663211346, -0.01742618903517723, -0.04727169871330261, 0.14450030028820038, 0.1904304325580597, -0.029454734176397324, 0.2612519860267639, -0.07703680545091629, 0.031968988478183746, 0.18670502305030823, -0.5232822895050049, 0.1069348081946373, -0.05280190706253052, -0.10803928226232529, 0.22106772661209106, 0.041558343917131424, 0.1781446635723114, -0.0987890288233757, 0.06307763606309891, 0.004615889396518469, 0.11861161142587662, 0.11133240908384323, 0.051071759313344955, 0.2479466050863266, 0.2089865505695343, -0.17993508279323578, -0.2521623969078064, -0.046532969921827316, -0.20121735334396362, -0.16858519613742828, 0.3703461289405823, 0.05842804163694382, 0.5287953019142151, 0.0775725468993187, -0.23168201744556427, 0.12419816851615906, -0.1455935686826706, -0.1006389856338501, 0.061097413301467896, 0.36204349994659424, 0.18594473600387573, -0.35678109526634216, 0.109672412276268, 0.22568261623382568, -0.14237593114376068, -0.1941259354352951, -0.317171573638916, -0.10635948181152344, -0.08113235980272293, -0.15681234002113342, 0.24193477630615234, -0.6133790016174316, 0.2899113893508911, 0.24165496230125427, -0.10925333946943283, -0.48363161087036133, 0.023033231496810913, 0.1235140711069107, -0.19886641204357147, 0.09568909555673599, 0.010164810344576836, 0.0778537318110466, -0.020327728241682053, -0.23866477608680725, -0.05125115066766739, 0.18407873809337616, -0.2536865174770355, -0.36331409215927124, -0.06954147666692734, 0.2863249182701111, 0.06703049689531326, 0.08970646560192108, 0.017821431159973145, 0.03697628900408745, 0.2047012597322464, 0.1793237179517746, 0.0022219077218323946, -0.024571401998400688, -0.07925622165203094, -0.26551076769828796, 0.2568255066871643, 0.635163426399231, -0.09228803962469101, -0.10679569095373154, -0.17371590435504913, -0.0022585014812648296, 0.0813436508178711, 0.3821578919887543, -0.242933452129364, 0.39171165227890015, -0.35137856006622314, 0.17836275696754456, 0.7134472131729126, -0.19588793814182281, -0.3543921113014221, 0.18667782843112946, -0.259311705827713, -0.2182944416999817, 0.08731399476528168, 0.025120550766587257, 0.17830844223499298, 0.11538942158222198, 0.15744350850582123, -0.07603107392787933, 0.05861690267920494, -0.0519525408744812, -0.35514190793037415, -0.353121817111969, 0.10548939555883408, -0.07883723825216293, 0.17293132841587067, -0.15934939682483673, 0.27098944783210754, -0.15264193713665009, 0.11806893348693848, -0.12138651311397552, -0.08495960384607315, 0.0823327824473381, 0.2390117347240448, 0.04968747869133949, 0.08244848251342773, -0.06329294294118881, -0.4461558759212494, 0.3696320056915283, -0.29722779989242554, -0.2668585181236267, -0.23902520537376404, -0.25052040815353394, -0.4130323529243469, 0.14403623342514038, -0.5862920880317688, -0.018085259944200516, 0.2047824263572693, -0.03461510315537453, 0.20921751856803894, 0.10340791940689087, -0.12694363296031952, 0.15200206637382507, 0.059399086982011795, 0.0834336057305336, -0.19859133660793304, 0.2522062063217163, -0.44536319375038147, -0.05504506826400757, 0.09480747580528259, 0.22529646754264832, 0.3252197504043579, -0.09946694225072861, -0.16273090243339539, 0.41750970482826233, -0.24108999967575073, 0.018014201894402504, -0.00072394561721012, -0.12094634771347046, 0.07873303443193436, -0.39305728673934937, 0.1947408765554428, 0.27127769589424133, 0.17837709188461304, -0.1665647178888321, -0.05733729153871536, 0.33201467990875244, -0.08910452574491501, 0.0955384373664856, -0.05274571478366852, -0.031574100255966187, 0.11177795380353928, -0.12019675225019455, 0.22024346888065338, -0.11676701158285141, 0.2911607027053833, -0.3164440393447876, 0.3656362295150757, 0.13195489346981049, -0.2356605976819992, 0.1314295530319214, 0.30602574348449707, 0.02208802103996277, 0.18824365735054016, 0.014060761779546738, 0.008779408410191536, -0.15509964525699615, -0.3161092698574066, 0.24433405697345734, 0.30741986632347107, 0.1628217250108719, -0.1048361137509346, 0.2712973952293396, 0.028976650908589363, -0.20051506161689758, 0.37511157989501953, -0.17696578800678253, -0.10466764122247696, 0.38296258449554443, 0.10481907427310944, 0.020004497841000557, -0.4195500612258911, -0.10607721656560898, 0.16659022867679596, 0.09044826030731201, -0.24326565861701965, 0.02458982914686203, -0.15732342004776, -0.05500371381640434, -0.49268004298210144, 0.5171211957931519, -0.1103610023856163, -0.14315739274024963, 0.24132466316223145, 0.07236231118440628, 0.13623540103435516, 0.12447241693735123, -0.23155133426189423, 0.14433075487613678, 0.04025699198246002, 0.09334351122379303, -0.2083083838224411, -0.11389423906803131, -0.07257630676031113, 0.03385409712791443, 0.3783900737762451, -0.07708533108234406, 0.5647827386856079, -0.16249389946460724, 0.11646319180727005, -0.24220746755599976, -0.3452757000923157, -0.017885059118270874, 0.0072638001292943954, 0.1485370248556137, 0.08054851740598679, -0.03759857639670372, -0.021428672596812248, -0.37263059616088867, 0.28171297907829285, -0.3179253041744232, -0.41350460052490234, -0.000935370393563062, 0.0158012006431818, -0.03573313355445862, -0.21294201910495758, -0.5386608242988586, -0.24696338176727295, -0.26654598116874695, 0.31766825914382935, -0.10624180734157562, 0.08213554322719574, 0.3633771240711212, -0.059387873858213425, -0.016830483451485634, -0.04933770000934601, 0.1703391671180725, -0.33940833806991577, 0.04502524808049202, 0.04605003446340561, -0.0631042867898941, -0.33258333802223206, -0.04303233325481415, -0.12315409630537033, 0.15626265108585358, -0.11822628229856491, -0.3490813672542572, 0.2830144762992859, -0.2649713456630707, 0.4167035222053528, -0.21162757277488708, 0.29056715965270996, 0.20584110915660858, 0.2561262249946594, -0.1482193022966385, -0.17120909690856934, -0.029090717434883118, 0.1058601588010788, -0.17159414291381836, 0.060361348092556, 0.09474331885576248, 0.29585132002830505, -0.25718310475349426, 0.8182132244110107, 0.5736105442047119, -0.00000438012011727551, 0.19712921977043152, -0.23205474019050598, 0.3561856150627136, -0.25973594188690186, -0.4400474727153778, -0.26205846667289734, 0.10126131027936935, 0.08239702135324478, 0.10126164555549622, -0.08907023817300797, -0.10511087626218796, 0.14807234704494476, -0.15352965891361237, -0.5878967046737671, -0.3327074348926544, 0.06774968653917313, -0.21549078822135925, 0.1211414709687233, 0.06498458236455917, 0.023683737963438034, 0.023672640323638916, 0.015650441870093346, -0.011440493166446686, 0.22440555691719055, -0.042997173964977264, 0.09034167230129242, -0.14269766211509705, -0.16010716557502747, -0.3927227854728699, 0.12695929408073425, -0.14554184675216675, 0.18795350193977356, -0.0046170055866241455, 0.18190830945968628, 0.3899118900299072, -0.2039211243391037, 0.6486157178878784, -0.08424283564090729, 0.14716094732284546, 0.11631660163402557, 0.15495915710926056, -0.10546758025884628, -0.10310547798871994, 0.043439753353595734, 0.4334651827812195, 0.11045362055301666, 0.11018117517232895, -0.2643679678440094, 0.012088690884411335, -0.04174189642071724, 0.2710541784763336, -0.3562948703765869, -0.39898765087127686, -0.17320048809051514, -0.3362308442592621, -0.52217036485672, 0.007048876490443945, 0.013236015103757381, 0.23344740271568298, -0.05660325661301613, -0.09641183167695999, -0.22303785383701324, -0.20345763862133026, 0.008227542042732239, 0.20193348824977875, 0.2648090422153473, 0.11556042730808258, 0.5737645626068115, 0.3952609896659851, -0.1276339590549469, -0.0011025113053619862, 0.7134284377098083, 0.004601221065968275, -0.014134743250906467, -0.3018513321876526, -0.2454431802034378, -0.17198839783668518, 0.2688552737236023, -0.18160757422447205, 0.16813984513282776, 0.07850882411003113, 0.02193710207939148, 0.029203973710536957, -0.1947406828403473, 0.18297763168811798, -0.17914634943008423, -0.21841904520988464, -0.38101115822792053, 0.2849346399307251, -0.14032232761383057, -0.28126686811447144, 0.2780410647392273, 0.15900327265262604, -0.14472031593322754, 0.3344266712665558, -0.3454681932926178, 0.8578017354011536, -0.33583879470825195, -0.054902173578739166, -0.14180776476860046, -0.33292585611343384, 0.24242855608463287, -0.05552346259355545, 0.020100437104701996, -0.5142738819122314, 0.044910889118909836, 0.17043571174144745, -0.055218908935785294, -0.08480804413557053, -0.017753841355443, -0.3104016184806824, 0.17205068469047546, -0.04764922708272934, 0.024828583002090454, -0.16022565960884094, 0.34588751196861267, -0.002921364502981305, 0.2451021373271942, -0.023507356643676758, 0.12506535649299622, 0.15157708525657654, 0.281994491815567, -0.036674972623586655, -0.04485835134983063, 0.19287854433059692, -0.5627151131629944, -0.27462607622146606, 0.12140709161758423, -0.3507395386695862, 0.5328576564788818, 0.012689603492617607, -0.2584879398345947, 0.24549700319766998, 0.026130976155400276, 0.24867521226406097, 0.19197599589824677, -0.06569690257310867, 0.11848260462284088, 0.2866915166378021, 0.07375849783420563, -0.2213352918624878, -0.015550512820482254, -0.08900399506092072, -0.027926085516810417, -0.37827572226524353, -0.052739422768354416, -0.05179315432906151, -0.41211754083633423, -0.14505307376384735, 0.2573261857032776, -0.18298186361789703, -0.03940374031662941, 0.1902216523885727, -0.05157002806663513, -0.10651294142007828, -0.3105297088623047, 0.15818175673484802, 0.17548567056655884, 0.042029548436403275, 0.09818680584430695, -0.049414172768592834, -0.18762649595737457, 0.07878690212965012, 0.16771012544631958, 0.3655771017074585, 0.07846483588218689, 0.5398336052894592, -0.241594135761261, -0.011098134331405163, -0.26371538639068604, 0.07083586603403091, 0.09149213880300522, -0.6893436908721924, 0.23056143522262573, -0.269223153591156, 0.22637996077537537, 0.13490170240402222, 0.45426034927368164, 0.31183668971061707, 0.20742294192314148, 0.06820932030677795, -0.18998615443706512, -0.08340363949537277, -0.07498712837696075, 0.007905690930783749, 0.23835664987564087, 0.017030613496899605, 0.18543489277362823, -0.03201664984226227, 0.21380609273910522, -0.3605462908744812, 0.2981472313404083, -0.09024756401777267, 0.08792094886302948, -0.023543329909443855, -0.1306426227092743, -0.03513310104608536, -0.01441655121743679, 0.1685694009065628, 0.1006682813167572, -0.2077367901802063, -0.25021255016326904, -0.0640062466263771, 0.12447134405374527, -0.04244270920753479, 0.1501915007829666, -0.224375918507576, -0.20867691934108734, 0.23107092082500458, -0.04126960039138794, 0.22023724019527435, -0.11250276863574982, 0.14271977543830872, 0.060799069702625275, 0.1483040750026703, 0.10306139290332794, -0.24119390547275543, 0.19188259541988373, -0.25977984070777893, 0.32322871685028076, -0.06088348850607872, 0.15699152648448944, -0.02976085990667343, -0.07014639675617218, -0.3087396025657654, 0.08462057262659073, -0.16822190582752228, 0.09435608983039856, 0.15492825210094452, -0.2569449841976166, -0.16147589683532715, 0.4119186997413635, 0.17230303585529327, 0.515667200088501, -0.3425479531288147, 0.1220133900642395, -0.03145827725529671, 0.2493458241224289, -0.3464597463607788, -0.14096906781196594, 0.021881550550460815, 0.023021815344691277, 0.2520657181739807, 0.3462914824485779, 0.2895457446575165, -0.2067205309867859, -0.08918804675340652, 0.08854864537715912, 0.4030730128288269, -0.009805643931031227, 0.35825663805007935, 0.3623289465904236, 0.265108197927475, -0.21787168085575104, 0.3288598358631134, -0.027689015492796898, 0.057312995195388794, 0.5360887050628662, -0.5569242238998413, 0.10199190676212311, -0.019768541678786278, 0.2291831523180008, 0.214448019862175, -0.13211573660373688, 0.3921254277229309, 0.05363747105002403, -0.10716082900762558, -0.016993515193462372, -0.0008157916599884629, 0.19378729164600372, -0.18508020043373108, -0.0418531596660614, -0.1078159362077713, 0.0945618525147438, -0.17130061984062195, -0.09540185332298279, -0.10709714144468307, -0.22833536565303802, -0.2598009705543518, 0.11138547211885452, 0.008882138878107071, 0.06507856398820877, 0.1844661980867386, 0.001382610178552568, -0.3270091712474823, -0.39651429653167725, 0.2018178552389145, 0.2869683504104614, 0.37426236271858215, -0.4109543263912201, 0.266115665435791, 0.46416372060775757, -0.09210596233606339, 0.17961588501930237, 0.5124382376670837, 0.6277316808700562, 0.214334636926651, -0.1546013504266739, 0.24716205894947052, 0.07468894869089127, -0.16644898056983948, -0.17760130763053894, 0.07899626344442368, -0.09692533314228058, 0.17503796517848969, 0.16895796358585358, 0.10145910084247589, -0.13538268208503723, -0.10176707804203033, 0.26395002007484436, 0.14370115101337433, -0.10579814016819, 0.19989998638629913, -0.19099768996238708, -0.13769620656967163, -0.006363034248352051, 0.25263020396232605, -0.37439462542533875, 0.023256611078977585, 0.33620262145996094, 0.21529588103294373, 0.1036929190158844, -0.2392006665468216, 0.13877958059310913, 0.046993087977170944, 0.32339560985565186, 0.1746046245098114, 0.05726045370101929, -0.22748598456382751, -0.04849212244153023, -0.6852203011512756, 0.11179042607545853, -0.44229957461357117, -0.020672127604484558, 0.1845688819885254, 0.3831755518913269, -0.31316083669662476, 0.018934041261672974, 0.35426414012908936, 0.06768485903739929, 0.008691300638020039, 0.22287088632583618, -0.21599744260311127, 0.008206143043935299, 0.4384152293205261, -0.2551453709602356, 0.13033811748027802, -0.40261295437812805, 0.35380300879478455, -0.3760163486003876, 0.0528254508972168, -0.12282600998878479, 0.05159194394946098, 0.12469933927059174, -0.28924402594566345, 0.41571781039237976, 0.09776473790407181, 0.32649606466293335, -0.013534490950405598, -0.20336684584617615, -0.22985927760601044, -0.18419991433620453, -0.22369270026683807, 0.2773227095603943, 0.5202605128288269, 0.12674246728420258, -0.017321154475212097, -0.4276801347732544, -0.19367948174476624, 0.24201799929141998, 0.04354642331600189, -0.05918987840414047, -0.06660859286785126, 0.06370348483324051, -0.16879768669605255, 0.1529017984867096, 0.031057925894856453, 0.2029290497303009, -0.08353874087333679, 0.16060735285282135, -0.2491607815027237, -0.6767696142196655, 0.3949703574180603, -0.1588924527168274, -0.11281958967447281, -0.10741446912288666, 0.3577101230621338, 0.2368585616350174, 0.0830923393368721, -0.6305253505706787, 0.2515730559825897, 0.5428171753883362, -0.20587843656539917, -0.020153310149908066, 0.14896121621131897, -0.13893945515155792, 0.032345835119485855, 0.031887903809547424, -0.047093164175748825, 0.038237348198890686, -0.2773481011390686, 0.24150456488132477, -0.3176977336406708 ]
https://github.com/huggingface/datasets/issues/2552
Keys should be unique error on code_search_net
and are we sure there are not a lot of datasets which are now broken with this change?
## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0
18
Keys should be unique error on code_search_net ## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0 and are we sure there are not a lot of datasets which are now broken with this change?
[ -0.04690854996442795, -0.027153147384524345, -0.1106119155883789, 0.349099338054657, 0.08127691596746445, -0.015619395300745964, 0.18118061125278473, 0.2770839333534241, 0.08159126341342926, 0.05441868305206299, -0.059907130897045135, 0.3916928470134735, -0.18466131389141083, 0.11661632359027863, 0.15640445053577423, 0.07851530611515045, -0.03128454461693764, 0.1728183925151825, 0.11068282276391983, -0.05424544960260391, -0.32562437653541565, 0.28873828053474426, -0.2328311800956726, 0.03895225003361702, -0.18482409417629242, -0.16207952797412872, -0.1911865472793579, 0.25887709856033325, -0.18450991809368134, -0.6111862659454346, 0.24181503057479858, 0.2137485146522522, -0.30185770988464355, 0.35580989718437195, -0.00011124829325126484, 0.17829446494579315, 0.396331250667572, -0.01830497942864895, -0.24289816617965698, -0.17859335243701935, -0.09768378734588623, -0.08690187335014343, 0.0782904252409935, -0.2927314341068268, -0.052299194037914276, -0.13119371235370636, -0.10200078785419464, -0.5351581573486328, 0.8553101420402527, 0.23242700099945068, 0.2680366337299347, 0.1950213760137558, 0.3377573788166046, -0.2356915920972824, 0.2538093626499176, -0.18405351042747498, -0.04789376258850098, 0.3911312222480774, 0.21762940287590027, -0.04693794250488281, -0.0018590039107948542, 0.31069818139076233, 0.15077851712703705, -0.12269429117441177, 0.43859148025512695, -0.03778401389718056, 0.05617343261837959, -0.3310019075870514, 0.18063493072986603, 0.07259507477283478, 0.10407683998346329, -0.3062260150909424, -0.2338496893644333, -0.2663578987121582, 0.03906581178307533, -0.25132817029953003, 0.3439497649669647, 0.1335711032152176, -0.22201208770275116, 0.16398228704929352, -0.011154272593557835, -0.2648170292377472, 0.011564862914383411, -0.047530174255371094, -0.015427889302372932, 0.01788637600839138, -0.05898905545473099, 0.1368977129459381, 0.16079308092594147, -0.04668275639414787, 0.27249935269355774, -0.08961185812950134, 0.046729858964681625, 0.1941232830286026, -0.5073845982551575, 0.11134201288223267, -0.026300692930817604, -0.0870053842663765, 0.2304595708847046, 0.02693360485136509, 0.1648990958929062, -0.1091131716966629, 0.05962216109037399, 0.006026583258062601, 0.1255844384431839, 0.12209933996200562, 0.02244121953845024, 0.24421706795692444, 0.2085752934217453, -0.15912403166294098, -0.24336931109428406, -0.0350925587117672, -0.17512696981430054, -0.1918126791715622, 0.374075710773468, 0.08374518156051636, 0.5239516496658325, 0.08179415017366409, -0.2396692931652069, 0.13707739114761353, -0.1299024522304535, -0.10126449167728424, 0.07003239542245865, 0.36654132604599, 0.1608087420463562, -0.3450776934623718, 0.11607380211353302, 0.18533822894096375, -0.13951031863689423, -0.1890881508588791, -0.32522475719451904, -0.08167871087789536, -0.08586115390062332, -0.16789287328720093, 0.21845129132270813, -0.5809810757637024, 0.2865792214870453, 0.2305637151002884, -0.09795119613409042, -0.47572964429855347, 0.007665538694709539, 0.10496756434440613, -0.2080146074295044, 0.08405442535877228, 0.0011775073362514377, 0.05926309525966644, -0.023182719945907593, -0.22309812903404236, -0.06815928220748901, 0.17335601150989532, -0.2561251223087311, -0.34397706389427185, -0.08128439635038376, 0.29830124974250793, 0.06877696514129639, 0.09403865784406662, 0.018880290910601616, 0.03600494936108589, 0.21151651442050934, 0.16895410418510437, 0.019319286569952965, -0.020148029550909996, -0.0689401775598526, -0.262236088514328, 0.2715475559234619, 0.6408418416976929, -0.08520031720399857, -0.11437054723501205, -0.16305753588676453, -0.011972676031291485, 0.08202200382947922, 0.3735702931880951, -0.2195252776145935, 0.4098963439464569, -0.3701931834220886, 0.17024852335453033, 0.7158523201942444, -0.2098325490951538, -0.35140350461006165, 0.17685864865779877, -0.2566373944282532, -0.1927759349346161, 0.10628529638051987, 0.0177452489733696, 0.17177212238311768, 0.12715312838554382, 0.19199542701244354, -0.07450103759765625, 0.04964117333292961, -0.05058739706873894, -0.3718303442001343, -0.3530539274215698, 0.10300090909004211, -0.08655965328216553, 0.1955663561820984, -0.17175430059432983, 0.2626264691352844, -0.1302558332681656, 0.11709271371364594, -0.11451507359743118, -0.09609102457761765, 0.0849805697798729, 0.24913807213306427, 0.027933795005083084, 0.08144966512918472, -0.0725879892706871, -0.45116132497787476, 0.3614913821220398, -0.29946792125701904, -0.2637137472629547, -0.22083593904972076, -0.27071160078048706, -0.3951713442802429, 0.14444555342197418, -0.5617755055427551, -0.021909639239311218, 0.2265326827764511, -0.03358631581068039, 0.20180562138557434, 0.0893622487783432, -0.15094318985939026, 0.17156179249286652, 0.049031686037778854, 0.07803712785243988, -0.21007762849330902, 0.2596829831600189, -0.47711193561553955, -0.06322566419839859, 0.09326022863388062, 0.22747938334941864, 0.31998980045318604, -0.11606478691101074, -0.16831405460834503, 0.42715010046958923, -0.23299303650856018, 0.015818309038877487, -0.0029283473268151283, -0.13001076877117157, 0.08715023100376129, -0.3934369385242462, 0.1725025624036789, 0.27511006593704224, 0.16739043593406677, -0.13462530076503754, -0.06979997456073761, 0.33262723684310913, -0.09888090938329697, 0.08166040480136871, -0.03424238786101341, -0.0534672886133194, 0.10309699922800064, -0.11208539456129074, 0.2092016041278839, -0.12173628062009811, 0.2808269262313843, -0.33232754468917847, 0.39568835496902466, 0.11942162364721298, -0.24149011075496674, 0.10921338945627213, 0.2924529016017914, 0.0013844480272382498, 0.1975155770778656, 0.009705916978418827, 0.02889714203774929, -0.1784738451242447, -0.2953673005104065, 0.23251408338546753, 0.2991613745689392, 0.173181414604187, -0.1086348444223404, 0.2740419805049896, 0.03667423129081726, -0.17995163798332214, 0.38115862011909485, -0.16498500108718872, -0.10443999618291855, 0.39415431022644043, 0.0818234384059906, 0.03420890495181084, -0.40606456995010376, -0.14422981441020966, 0.14478100836277008, 0.10745610296726227, -0.2713998854160309, 0.004004265181720257, -0.14407730102539062, -0.0816541239619255, -0.48553961515426636, 0.5519647598266602, -0.09673301875591278, -0.13400597870349884, 0.2336673140525818, 0.04173669219017029, 0.12607581913471222, 0.11397287249565125, -0.23598584532737732, 0.14882802963256836, 0.04324892535805702, 0.10606217384338379, -0.21049867570400238, -0.10438128560781479, -0.07206521183252335, 0.044764626771211624, 0.3772628605365753, -0.0930304154753685, 0.5541763305664062, -0.1986333429813385, 0.09969120472669601, -0.21648308634757996, -0.35790953040122986, -0.004037851467728615, 0.020813124254345894, 0.1498841643333435, 0.11007050424814224, -0.040244996547698975, -0.02568157948553562, -0.37553510069847107, 0.2560063898563385, -0.3044043183326721, -0.4428147077560425, -0.02254342846572399, 0.018757160753011703, -0.03953352943062782, -0.20743156969547272, -0.5418490767478943, -0.26627543568611145, -0.2766750752925873, 0.29266318678855896, -0.09817738085985184, 0.08146035671234131, 0.3725585341453552, -0.06791763007640839, 0.0038494374603033066, -0.026973215863108635, 0.1974370777606964, -0.3267028033733368, 0.031248560175299644, 0.03535430133342743, -0.05293406546115875, -0.3246127665042877, -0.05783496052026749, -0.14751586318016052, 0.1737261861562729, -0.1259882003068924, -0.36201491951942444, 0.26230931282043457, -0.2389126420021057, 0.42669999599456787, -0.2036777138710022, 0.30288901925086975, 0.2129475176334381, 0.25737541913986206, -0.15960490703582764, -0.16986183822155, -0.03147217631340027, 0.08927445858716965, -0.16778883337974548, 0.055672768503427505, 0.10184167325496674, 0.3043361306190491, -0.2619752287864685, 0.8216829299926758, 0.5829087495803833, -0.005969489924609661, 0.20165185630321503, -0.21184378862380981, 0.37335988879203796, -0.2440514862537384, -0.43553972244262695, -0.24598506093025208, 0.1285448968410492, 0.04078470915555954, 0.09705071151256561, -0.09210549294948578, -0.0974658951163292, 0.13967062532901764, -0.1615278422832489, -0.6219160556793213, -0.32124054431915283, 0.05093403533101082, -0.22732838988304138, 0.11793157458305359, 0.050858259201049805, 0.008977305144071579, 0.033571477979421616, 0.04447910934686661, 0.0025209509767591953, 0.23452666401863098, -0.011463219299912453, 0.07593007385730743, -0.1530277281999588, -0.15338636934757233, -0.3725162744522095, 0.11759162694215775, -0.13971762359142303, 0.19310390949249268, -0.010524161159992218, 0.19137179851531982, 0.3669939935207367, -0.22813181579113007, 0.6453695893287659, -0.08401411771774292, 0.1381121128797531, 0.11381377279758453, 0.15911130607128143, -0.08305063098669052, -0.10504310578107834, 0.03881848230957985, 0.42683014273643494, 0.12690426409244537, 0.129458948969841, -0.2729388475418091, 0.024264726787805557, -0.02320142462849617, 0.2627454102039337, -0.35733309388160706, -0.3812643587589264, -0.16628141701221466, -0.3246186077594757, -0.4989025890827179, 0.029086407274007797, 0.006489865481853485, 0.23114165663719177, -0.02172091230750084, -0.08895814418792725, -0.22712121903896332, -0.21128983795642853, 0.011182446964085102, 0.20086915791034698, 0.2838078737258911, 0.09307481348514557, 0.5682288408279419, 0.3745242953300476, -0.12442327290773392, -0.014536293223500252, 0.7123063206672668, -0.010346909984946251, -0.009232169948518276, -0.30111193656921387, -0.20466315746307373, -0.18429231643676758, 0.2573679983615875, -0.19497117400169373, 0.1513124406337738, 0.0869637057185173, 0.021875187754631042, 0.04571674019098282, -0.1883668452501297, 0.16706746816635132, -0.16285906732082367, -0.21596194803714752, -0.3804621398448944, 0.2882482707500458, -0.11842834949493408, -0.2861640751361847, 0.2685065269470215, 0.1581975519657135, -0.17775171995162964, 0.3684622645378113, -0.3176833987236023, 0.8326914310455322, -0.31463271379470825, -0.05234600603580475, -0.12637236714363098, -0.32595404982566833, 0.2553507685661316, -0.08594784885644913, 0.006733119487762451, -0.4939079284667969, 0.04646363481879234, 0.15982362627983093, -0.038056228309869766, -0.0747024416923523, -0.026272259652614594, -0.3291628658771515, 0.19051311910152435, -0.05923014506697655, 0.026452645659446716, -0.16300813853740692, 0.3300623595714569, -0.0007657340611331165, 0.24717387557029724, -0.04779534414410591, 0.13466651737689972, 0.14360010623931885, 0.2798324227333069, -0.05141584575176239, -0.030750183388590813, 0.1794310361146927, -0.5663871169090271, -0.2774447798728943, 0.10919123888015747, -0.36080169677734375, 0.522195041179657, 0.018358798697590828, -0.2535378038883209, 0.2114669382572174, 0.031442031264305115, 0.23289978504180908, 0.20517228543758392, -0.04958582669496536, 0.10889813303947449, 0.28940868377685547, 0.09928399324417114, -0.20451653003692627, -0.010202606208622456, -0.051963407546281815, -0.029665108770132065, -0.3613170087337494, -0.047094862908124924, -0.06225660443305969, -0.40157198905944824, -0.1501975804567337, 0.24813015758991241, -0.17291761934757233, -0.03501151129603386, 0.16496986150741577, -0.027037613093852997, -0.10760188847780228, -0.3131229281425476, 0.16624444723129272, 0.1862301379442215, 0.029859190806746483, 0.11240268498659134, -0.0546167828142643, -0.16925939917564392, 0.07501961290836334, 0.16945873200893402, 0.36652299761772156, 0.0696556344628334, 0.5085341930389404, -0.2613406479358673, -0.03375628963112831, -0.26124709844589233, 0.08004552125930786, 0.11481492966413498, -0.662311851978302, 0.21919433772563934, -0.29411453008651733, 0.22009867429733276, 0.10730928182601929, 0.42560726404190063, 0.33219149708747864, 0.21347641944885254, 0.05592682212591171, -0.20562675595283508, -0.11261157691478729, -0.04817885905504227, 0.027910396456718445, 0.2362506240606308, 0.03930206224322319, 0.16070130467414856, -0.042615678161382675, 0.1991032361984253, -0.3712841272354126, 0.26177361607551575, -0.1110306829214096, 0.07890961319208145, -0.015682490542531013, -0.10596166551113129, -0.06607072800397873, -0.0290738046169281, 0.1858229637145996, 0.09874965250492096, -0.18611940741539001, -0.25910133123397827, -0.05454329773783684, 0.11989598721265793, -0.03584473207592964, 0.14154060184955597, -0.21573075652122498, -0.19562463462352753, 0.23092108964920044, -0.04653570055961609, 0.18756677210330963, -0.11732703447341919, 0.14641040563583374, 0.06046318635344505, 0.1159072294831276, 0.10601843148469925, -0.24933134019374847, 0.1973869949579239, -0.24695460498332977, 0.3111076354980469, -0.05727827921509743, 0.18151958286762238, -0.029876146465539932, -0.07985274493694305, -0.30639344453811646, 0.08472389727830887, -0.18227900564670563, 0.10954076796770096, 0.15552371740341187, -0.24792326986789703, -0.16758550703525543, 0.4212433397769928, 0.1682537943124771, 0.5145012140274048, -0.3406195342540741, 0.12709906697273254, -0.02194797620177269, 0.2609177231788635, -0.36685794591903687, -0.12344008684158325, 0.0033126124180853367, 0.025348911061882973, 0.26225975155830383, 0.3413490951061249, 0.26930537819862366, -0.19101999700069427, -0.08152779936790466, 0.09181280434131622, 0.40022382140159607, 0.0021996726281940937, 0.36566171050071716, 0.37268057465553284, 0.2654098570346832, -0.20721280574798584, 0.2973615825176239, -0.04092400148510933, 0.062407203018665314, 0.5390818119049072, -0.5399002432823181, 0.1284630447626114, -0.020506106317043304, 0.25419291853904724, 0.22578179836273193, -0.12000502645969391, 0.3996991813182831, 0.05802658200263977, -0.09984678775072098, 0.009759324602782726, 0.01376735232770443, 0.1629026234149933, -0.1720845103263855, -0.05549496412277222, -0.07196975499391556, 0.0846279039978981, -0.17271409928798676, -0.10104753822088242, -0.10957741737365723, -0.22724950313568115, -0.25415530800819397, 0.0966639518737793, 0.013864208944141865, 0.05995659902691841, 0.16498711705207825, 0.0004621611733455211, -0.33332493901252747, -0.3664301335811615, 0.20156453549861908, 0.29780054092407227, 0.3739052712917328, -0.40815436840057373, 0.3000580966472626, 0.4755450487136841, -0.0917493999004364, 0.1509278267621994, 0.5318713188171387, 0.6291667222976685, 0.2287992238998413, -0.15575994551181793, 0.22674667835235596, 0.110518679022789, -0.16116149723529816, -0.1954079568386078, 0.06142033264040947, -0.11543253064155579, 0.1707049012184143, 0.16170601546764374, 0.11471361666917801, -0.13986214995384216, -0.07473110407590866, 0.2652658522129059, 0.10534866899251938, -0.09005741775035858, 0.20067156851291656, -0.1858329325914383, -0.1396440714597702, 0.015624290332198143, 0.25023582577705383, -0.39260512590408325, 0.009774882346391678, 0.32965439558029175, 0.2164011299610138, 0.12182103842496872, -0.2242479771375656, 0.14256487786769867, 0.0673692375421524, 0.3181639611721039, 0.193611741065979, 0.08309981971979141, -0.24433547258377075, -0.032158683985471725, -0.6895318627357483, 0.09274686872959137, -0.4029482305049896, -0.055442098528146744, 0.1859169453382492, 0.37221062183380127, -0.315990149974823, 0.011731326580047607, 0.3509391248226166, 0.06108057126402855, 0.03174801915884018, 0.21966053545475006, -0.23211748898029327, -0.009379696100950241, 0.4260523319244385, -0.2580839991569519, 0.14161720871925354, -0.407299280166626, 0.3420376479625702, -0.3757021129131317, 0.05647678300738335, -0.14721643924713135, 0.04221591353416443, 0.1315653771162033, -0.2852277457714081, 0.41177889704704285, 0.09779012203216553, 0.32198914885520935, -0.043852798640728, -0.20329809188842773, -0.2257692813873291, -0.1698814183473587, -0.23655593395233154, 0.2747158110141754, 0.5092766880989075, 0.11630946397781372, -0.004694683942943811, -0.4373764097690582, -0.19293196499347687, 0.23205532133579254, 0.061687033623456955, -0.07858913391828537, -0.07529771327972412, 0.072267547249794, -0.18344487249851227, 0.12286239117383957, 0.05182252824306488, 0.202510267496109, -0.09104573726654053, 0.1757325381040573, -0.2520788013935089, -0.6924311518669128, 0.3932870328426361, -0.15112663805484772, -0.07832735776901245, -0.11928142607212067, 0.3561943471431732, 0.24671226739883423, 0.07588724792003632, -0.6449912190437317, 0.24169407784938812, 0.5567662119865417, -0.19927214086055756, -0.007139013148844242, 0.15071943402290344, -0.12365634739398956, 0.037336599081754684, 0.026022804901003838, -0.04160608723759651, 0.03419095277786255, -0.27455851435661316, 0.2524395287036896, -0.3236229419708252 ]
https://github.com/huggingface/datasets/issues/2552
Keys should be unique error on code_search_net
Thanks to the dummy data, we know for sure that most of them work as expected. `code_search_net` wasn't caught because the dummy data only have one dummy data file while the dataset script can actually load several of them using `os.listdir`. Let me take a look at all the other datasets that use `os.listdir` to see if the keys are alright
## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0
61
Keys should be unique error on code_search_net ## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0 Thanks to the dummy data, we know for sure that most of them work as expected. `code_search_net` wasn't caught because the dummy data only have one dummy data file while the dataset script can actually load several of them using `os.listdir`. Let me take a look at all the other datasets that use `os.listdir` to see if the keys are alright
[ -0.036426711827516556, -0.020195595920085907, -0.09643834829330444, 0.3276671767234802, 0.0761767104268074, -0.013212069869041443, 0.20809926092624664, 0.29120180010795593, 0.09849930554628372, 0.07118485122919083, -0.06703731417655945, 0.3835591673851013, -0.17116571962833405, 0.13639980554580688, 0.1288100928068161, 0.08379984647035599, -0.04380200430750847, 0.17808778584003448, 0.11996646225452423, -0.05948181822896004, -0.31798747181892395, 0.2856628894805908, -0.23490586876869202, 0.016557417809963226, -0.209052175283432, -0.13764604926109314, -0.17600655555725098, 0.2507341802120209, -0.18241144716739655, -0.5908310413360596, 0.27119433879852295, 0.20933933556079865, -0.2992362976074219, 0.3508662283420563, -0.0001107918651541695, 0.1900058090686798, 0.3981907069683075, -0.025601385161280632, -0.28278300166130066, -0.1791192889213562, -0.07280826568603516, -0.0612184964120388, 0.08318158984184265, -0.2482587695121765, -0.08185642212629318, -0.12249799817800522, -0.10497519373893738, -0.5397647619247437, 0.8384174704551697, 0.24601797759532928, 0.2726713716983795, 0.21126672625541687, 0.3223752975463867, -0.2598755359649658, 0.2420283704996109, -0.1614333838224411, -0.06399110704660416, 0.3828732967376709, 0.1833222657442093, -0.047990668565034866, 0.005722641944885254, 0.29819634556770325, 0.1404443383216858, -0.08750444650650024, 0.41868072748184204, -0.032304152846336365, 0.046877291053533554, -0.30877652764320374, 0.2146267145872116, 0.10282369703054428, 0.08842777460813522, -0.3128262162208557, -0.2070397585630417, -0.2669890522956848, 0.0362551212310791, -0.24074457585811615, 0.3180389106273651, 0.1313277781009674, -0.20281486213207245, 0.16847632825374603, 0.008735988289117813, -0.23333926498889923, 0.016873016953468323, -0.03568221256136894, -0.012058718129992485, 0.007563792634755373, -0.04777722805738449, 0.14422166347503662, 0.18704752624034882, -0.030186619609594345, 0.26582300662994385, -0.10939360409975052, 0.019527485594153404, 0.17904503643512726, -0.5136680603027344, 0.12302035093307495, -0.05185677483677864, -0.09847282618284225, 0.2277050018310547, 0.028717609122395515, 0.169882133603096, -0.06871385872364044, 0.062492456287145615, 0.005372950807213783, 0.09051614999771118, 0.11253378540277481, 0.026970574632287025, 0.2809760570526123, 0.2035713642835617, -0.15020178258419037, -0.2411467730998993, -0.035826295614242554, -0.18146425485610962, -0.15676987171173096, 0.33824026584625244, 0.07081486284732819, 0.5329920649528503, 0.07598474621772766, -0.24769294261932373, 0.12774863839149475, -0.12357760965824127, -0.07536380738019943, 0.05699216574430466, 0.36040979623794556, 0.15865109860897064, -0.3382248878479004, 0.11390741914510727, 0.22571082413196564, -0.1590736210346222, -0.2025012969970703, -0.3317086100578308, -0.11995045095682144, -0.07043236494064331, -0.16871559619903564, 0.25537750124931335, -0.5790085196495056, 0.3142927885055542, 0.24576687812805176, -0.11949028819799423, -0.4515375792980194, 0.07836031913757324, 0.10400313884019852, -0.19531135261058807, 0.08905882388353348, 0.020835939794778824, 0.05830363556742668, 0.007697924505919218, -0.2369564026594162, -0.045337870717048645, 0.16775119304656982, -0.2531958520412445, -0.3557935357093811, -0.09430582821369171, 0.30074864625930786, 0.06466557830572128, 0.08033032715320587, 0.016925474628806114, 0.05540041625499725, 0.1994580328464508, 0.15688088536262512, -0.012706710956990719, -0.03325549513101578, -0.10192250460386276, -0.24832427501678467, 0.27353614568710327, 0.6290327310562134, -0.1159738078713417, -0.09790078550577164, -0.16220760345458984, -0.0023758907336741686, 0.079729363322258, 0.3462895154953003, -0.24124224483966827, 0.3902708888053894, -0.36548757553100586, 0.1659933626651764, 0.6817969083786011, -0.20551100373268127, -0.355248361825943, 0.15242701768875122, -0.24773342907428741, -0.17102546989917755, 0.0933934673666954, 0.031553637236356735, 0.16267666220664978, 0.15226006507873535, 0.15575209259986877, -0.06676259636878967, 0.05703229457139969, -0.05156327784061432, -0.35547342896461487, -0.3471827208995819, 0.11304782330989838, -0.06709545105695724, 0.16612985730171204, -0.16746318340301514, 0.2417474389076233, -0.13819347321987152, 0.12545645236968994, -0.11240676790475845, -0.08025656640529633, 0.0907338559627533, 0.21459145843982697, 0.027268890291452408, 0.09859681129455566, -0.06436770409345627, -0.4726128876209259, 0.36781811714172363, -0.2958660125732422, -0.23713898658752441, -0.21571844816207886, -0.28407832980155945, -0.4142511487007141, 0.11498699337244034, -0.5730294585227966, -0.03259379416704178, 0.22007210552692413, -0.026793701574206352, 0.21939104795455933, 0.08806450664997101, -0.12073183059692383, 0.15893535315990448, 0.04971884936094284, 0.08768392354249954, -0.24321790039539337, 0.251729816198349, -0.4583705961704254, -0.0632467269897461, 0.10950413346290588, 0.22771599888801575, 0.30385079979896545, -0.1221485584974289, -0.17016196250915527, 0.42194944620132446, -0.22273021936416626, 0.002072705188766122, -0.0018699015490710735, -0.1487247794866562, 0.06749779731035233, -0.3830086290836334, 0.1845068633556366, 0.2993699610233307, 0.1757294088602066, -0.15666724741458893, -0.09868993610143661, 0.3583337366580963, -0.0740242600440979, 0.09074891358613968, -0.051071006804704666, -0.03688137233257294, 0.12253018468618393, -0.10880332440137863, 0.2126479148864746, -0.12718239426612854, 0.28306788206100464, -0.31750234961509705, 0.40243881940841675, 0.13295987248420715, -0.23215153813362122, 0.12115240842103958, 0.2946244180202484, 0.016362115740776062, 0.1883886456489563, -0.00243405275978148, -0.021498333662748337, -0.1830298751592636, -0.2807164490222931, 0.2342672348022461, 0.2953343391418457, 0.17817100882530212, -0.1118413582444191, 0.25702396035194397, 0.004001048859208822, -0.18719713389873505, 0.379766583442688, -0.19415438175201416, -0.13407087326049805, 0.38468679785728455, 0.08995847404003143, -0.008661777712404728, -0.44472047686576843, -0.11100082844495773, 0.165065199136734, 0.12234743684530258, -0.24939367175102234, 0.00036601247848011553, -0.16399338841438293, -0.06364704668521881, -0.47976818680763245, 0.5345814228057861, -0.09948986768722534, -0.14887931942939758, 0.24353288114070892, 0.0811949297785759, 0.1193661093711853, 0.12789709866046906, -0.24043308198451996, 0.1499004364013672, 0.057675089687108994, 0.08186545222997665, -0.22388286888599396, -0.11080803722143173, -0.09239885956048965, 0.05616799369454384, 0.3637707233428955, -0.06526520103216171, 0.5341524481773376, -0.1901935338973999, 0.09057498723268509, -0.2226315438747406, -0.357488751411438, -0.012997319921851158, 0.0026211352087557316, 0.15803083777427673, 0.11136902868747711, -0.0347028411924839, -0.011829531751573086, -0.3635370135307312, 0.270929753780365, -0.315255731344223, -0.4279220700263977, 0.014069417491555214, 0.007502878084778786, -0.03093353472650051, -0.22946539521217346, -0.5562419891357422, -0.25205621123313904, -0.2643299996852875, 0.27264726161956787, -0.07574091106653214, 0.07023446261882782, 0.3859766721725464, -0.03293244168162346, -0.009322520345449448, -0.02851109206676483, 0.16716457903385162, -0.3440157175064087, 0.010919321328401566, 0.05264138802886009, -0.05841265246272087, -0.32405516505241394, -0.044094886630773544, -0.16821588575839996, 0.16076940298080444, -0.13155986368656158, -0.36247169971466064, 0.23761607706546783, -0.24489793181419373, 0.4199641942977905, -0.21500451862812042, 0.27628758549690247, 0.21946367621421814, 0.25795018672943115, -0.1546110212802887, -0.19461756944656372, -0.043108150362968445, 0.11911840736865997, -0.17727221548557281, 0.057953350245952606, 0.07518849521875381, 0.28500714898109436, -0.24568051099777222, 0.8134372234344482, 0.5724948048591614, -0.007752947509288788, 0.19562500715255737, -0.2384263575077057, 0.3781944215297699, -0.25809594988822937, -0.4343477189540863, -0.2718251347541809, 0.12006162106990814, 0.07931715250015259, 0.10621562600135803, -0.08879970759153366, -0.07257914543151855, 0.16934846341609955, -0.13287973403930664, -0.5772477984428406, -0.322095662355423, 0.051616065204143524, -0.21950139105319977, 0.09358543902635574, 0.08431509882211685, 0.030275117605924606, 0.0016909363912418485, 0.02972223609685898, -0.005609903018921614, 0.19695818424224854, -0.0401838943362236, 0.0871124267578125, -0.1645723432302475, -0.1121441051363945, -0.3914947509765625, 0.14287817478179932, -0.14410780370235443, 0.18394918739795685, 0.016256088390946388, 0.18465737998485565, 0.36109304428100586, -0.19155752658843994, 0.6522555351257324, -0.0972907692193985, 0.13873516023159027, 0.11521145701408386, 0.17278754711151123, -0.13777102530002594, -0.10880034416913986, 0.03325909003615379, 0.414243221282959, 0.11149084568023682, 0.13761237263679504, -0.27534061670303345, 0.0131415706127882, -0.0005723854410462081, 0.2770029306411743, -0.3481086194515228, -0.35336554050445557, -0.1978778839111328, -0.32961082458496094, -0.521511435508728, 0.004342908971011639, -0.0022250055335462093, 0.23394834995269775, -0.031041879206895828, -0.09864450246095657, -0.23544935882091522, -0.2289232313632965, 0.02034619078040123, 0.20964160561561584, 0.2850694954395294, 0.1258573830127716, 0.5712019801139832, 0.3908027410507202, -0.1034238263964653, -0.01324196346104145, 0.7329349517822266, 0.007224670611321926, -0.014144203625619411, -0.3090285360813141, -0.22627000510692596, -0.19219760596752167, 0.2538824677467346, -0.17472299933433533, 0.17612695693969727, 0.06522917747497559, 0.020186875015497208, 0.034942377358675, -0.14363346993923187, 0.16442720592021942, -0.16918516159057617, -0.20570562779903412, -0.3801518678665161, 0.27291634678840637, -0.12599828839302063, -0.27615249156951904, 0.2663394808769226, 0.13119935989379883, -0.16926084458827972, 0.3703281879425049, -0.33845773339271545, 0.8030840754508972, -0.32222211360931396, -0.032364364713430405, -0.11753978580236435, -0.3198092579841614, 0.23897705972194672, -0.07109379023313522, 0.016457295045256615, -0.4927276372909546, 0.05297946557402611, 0.16507528722286224, -0.03804195672273636, -0.07720762491226196, -0.01883254013955593, -0.3268424868583679, 0.1943095177412033, -0.04452190920710564, 0.055132001638412476, -0.17728553712368011, 0.3472311794757843, -0.014133710414171219, 0.2519339919090271, 0.007993423379957676, 0.148793563246727, 0.1591981202363968, 0.26232263445854187, -0.02314319834113121, -0.03138451650738716, 0.16241280734539032, -0.5612019896507263, -0.2426978349685669, 0.1193096861243248, -0.3816879391670227, 0.5089940428733826, -0.011308157816529274, -0.24303455650806427, 0.1899627447128296, 0.024728070944547653, 0.23850437998771667, 0.21759335696697235, -0.05999324098229408, 0.12292517721652985, 0.27275794744491577, 0.08999079465866089, -0.21182402968406677, -0.02779482863843441, -0.09245258569717407, -0.005021561402827501, -0.3614404797554016, -0.04881764203310013, -0.059945009648799896, -0.41076311469078064, -0.14648307859897614, 0.23628194630146027, -0.15620051324367523, -0.06238042190670967, 0.15882663428783417, -0.04258222132921219, -0.10807827115058899, -0.3281362056732178, 0.17031346261501312, 0.15569084882736206, 0.0344359390437603, 0.0936867743730545, -0.058717697858810425, -0.20662003755569458, 0.05751051753759384, 0.17590919137001038, 0.3556886315345764, 0.09734567999839783, 0.5280072689056396, -0.2695706784725189, -0.0025807975325733423, -0.269210547208786, 0.0659104511141777, 0.13009439408779144, -0.6779007315635681, 0.24043098092079163, -0.2633764445781708, 0.17854346334934235, 0.11935543268918991, 0.43541350960731506, 0.30736568570137024, 0.20084035396575928, 0.05575498566031456, -0.19557523727416992, -0.12817876040935516, -0.08453089743852615, 0.04317094013094902, 0.25581660866737366, 0.03044741600751877, 0.17191368341445923, -0.05925983935594559, 0.2200327217578888, -0.3742518126964569, 0.28764083981513977, -0.09201760590076447, 0.1150856763124466, -0.036031484603881836, -0.13653437793254852, -0.04393414780497551, -0.021716436371207237, 0.19145971536636353, 0.10170023143291473, -0.2023002952337265, -0.271777868270874, -0.08028809726238251, 0.11368245631456375, -0.039035677909851074, 0.1121336817741394, -0.21611809730529785, -0.19729605317115784, 0.19720831513404846, -0.055085133761167526, 0.20462410151958466, -0.11754600703716278, 0.139363631606102, 0.06412870436906815, 0.11854105442762375, 0.10533030331134796, -0.23492898046970367, 0.16448718309402466, -0.2630438804626465, 0.3048253357410431, -0.06655187159776688, 0.15409038960933685, -0.03244055062532425, -0.06917328387498856, -0.28176936507225037, 0.08593730628490448, -0.15320947766304016, 0.09072267264127731, 0.1475837677717209, -0.24262303113937378, -0.170698881149292, 0.4171832203865051, 0.17689405381679535, 0.4963461458683014, -0.32186058163642883, 0.121397003531456, -0.02225864678621292, 0.2640506327152252, -0.3719104528427124, -0.13722044229507446, 0.04545531049370766, 0.00780153926461935, 0.27775776386260986, 0.32370710372924805, 0.290885329246521, -0.17210371792316437, -0.07587284594774246, 0.07583758980035782, 0.3826349079608917, 0.0070856777019798756, 0.36281922459602356, 0.35714593529701233, 0.24452030658721924, -0.2220553755760193, 0.3068501353263855, -0.053951963782310486, 0.06392063200473785, 0.5503355860710144, -0.5318273901939392, 0.13650362193584442, -0.034736864268779755, 0.23053742945194244, 0.20377200841903687, -0.1257788985967636, 0.40797916054725647, 0.07306215167045593, -0.11642104387283325, 0.015899114310741425, 0.035226400941610336, 0.17207416892051697, -0.21781952679157257, -0.0557481087744236, -0.1123492494225502, 0.07308435440063477, -0.17552657425403595, -0.11908827722072601, -0.11768069118261337, -0.20505158603191376, -0.26496538519859314, 0.11121081560850143, 0.0344492606818676, 0.06203789263963699, 0.1656074970960617, 0.0011815758189186454, -0.33562934398651123, -0.38867121934890747, 0.1887097954750061, 0.31145769357681274, 0.3505724370479584, -0.38154006004333496, 0.2776068449020386, 0.46967506408691406, -0.10249052941799164, 0.17448553442955017, 0.5233424305915833, 0.6046810746192932, 0.20456191897392273, -0.1610855907201767, 0.23072971403598785, 0.08594831824302673, -0.15874145925045013, -0.21432456374168396, 0.08598855137825012, -0.11256001144647598, 0.15086166560649872, 0.18639272451400757, 0.11926539987325668, -0.15238530933856964, -0.12435059994459152, 0.2570669651031494, 0.08923428505659103, -0.11577918380498886, 0.20965740084648132, -0.19346269965171814, -0.11912937462329865, -0.010668645612895489, 0.25776273012161255, -0.37031060457229614, 0.00877187866717577, 0.33823075890541077, 0.19992780685424805, 0.12144248932600021, -0.25324857234954834, 0.14326271414756775, 0.03624618053436279, 0.320644348859787, 0.16745306551456451, 0.07082276046276093, -0.24967889487743378, -0.03449598699808121, -0.6907976269721985, 0.11374685168266296, -0.43485867977142334, -0.05024826154112816, 0.17793452739715576, 0.37891826033592224, -0.29521894454956055, 0.024981556460261345, 0.3320698142051697, 0.07119587808847427, 0.06783898919820786, 0.21664370596408844, -0.21557842195034027, 0.00885962974280119, 0.40264296531677246, -0.2635599374771118, 0.14919523894786835, -0.45074811577796936, 0.33494022488594055, -0.34721776843070984, 0.06707996129989624, -0.13218340277671814, 0.04370425269007683, 0.14638124406337738, -0.2922666668891907, 0.43222975730895996, 0.0993863120675087, 0.3241552412509918, -0.03178086876869202, -0.18043461441993713, -0.21886739134788513, -0.14869600534439087, -0.2408016324043274, 0.25814083218574524, 0.510123610496521, 0.13968105614185333, -0.00009105305070988834, -0.4157196581363678, -0.1875610053539276, 0.2462855726480484, 0.08920501917600632, -0.03880619257688522, -0.09257441014051437, 0.09676651656627655, -0.22002094984054565, 0.1512514054775238, 0.026862898841500282, 0.22602742910385132, -0.08238580822944641, 0.18348388373851776, -0.2212611883878708, -0.6726042628288269, 0.3810141980648041, -0.15736046433448792, -0.0951678454875946, -0.1255320906639099, 0.35822632908821106, 0.24553607404232025, 0.0702349990606308, -0.6323140859603882, 0.2581469714641571, 0.5377968549728394, -0.20069701969623566, -0.0005390439182519913, 0.16082289814949036, -0.10720496624708176, 0.05145039036870003, 0.02281259559094906, 0.001728654489852488, 0.055415596812963486, -0.27448150515556335, 0.2620244026184082, -0.3209923505783081 ]
https://github.com/huggingface/datasets/issues/2552
Keys should be unique error on code_search_net
I found one issue on `fever` (PR here: https://github.com/huggingface/datasets/pull/2557) All the other ones seem fine :)
## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0
16
Keys should be unique error on code_search_net ## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0 I found one issue on `fever` (PR here: https://github.com/huggingface/datasets/pull/2557) All the other ones seem fine :)
[ -0.020208142697811127, 0.0007681514834985137, -0.09075668454170227, 0.3496333658695221, 0.0851370319724083, -0.024872198700904846, 0.19917982816696167, 0.2581067681312561, 0.09322965145111084, 0.07367496937513351, -0.09278659522533417, 0.3846125304698944, -0.17428533732891083, 0.11450880765914917, 0.15799768269062042, 0.09787136316299438, -0.03220514580607414, 0.18603551387786865, 0.11466317623853683, -0.06635283678770065, -0.3220597207546234, 0.2716597616672516, -0.24977906048297882, 0.0057928902097046375, -0.21985316276550293, -0.1277940571308136, -0.18146106600761414, 0.2327200323343277, -0.15828271210193634, -0.6227065920829773, 0.28305697441101074, 0.23677898943424225, -0.3231882154941559, 0.3545233905315399, -0.0001138885272666812, 0.18496538698673248, 0.39150285720825195, -0.008243748918175697, -0.2720438838005066, -0.19195440411567688, -0.09738623350858688, -0.08764583617448807, 0.12209663540124893, -0.2598312795162201, -0.04034167900681496, -0.12674570083618164, -0.10032472759485245, -0.5317750573158264, 0.8246200084686279, 0.19364261627197266, 0.24873186647891998, 0.18870234489440918, 0.3378748893737793, -0.23723046481609344, 0.24390748143196106, -0.16667130589485168, -0.05522762984037399, 0.38774409890174866, 0.1985953450202942, -0.050490669906139374, 0.012191304937005043, 0.2858549952507019, 0.1549563854932785, -0.11023081839084625, 0.46213796734809875, -0.052585992962121964, 0.07631408423185349, -0.3710741698741913, 0.20499981939792633, 0.08927887678146362, 0.09743686765432358, -0.27615830302238464, -0.23243862390518188, -0.2789843678474426, 0.05604527145624161, -0.21321189403533936, 0.3593416213989258, 0.12219366431236267, -0.20762434601783752, 0.16240356862545013, -0.017256960272789, -0.25775283575057983, 0.012682037428021431, -0.0440756119787693, 0.007985482923686504, -0.030199727043509483, -0.04910866916179657, 0.154139906167984, 0.16627274453639984, -0.03205380216240883, 0.2796732187271118, -0.0996793806552887, 0.04115527868270874, 0.22037795186042786, -0.5572589635848999, 0.15093399584293365, -0.06771425902843475, -0.09797932207584381, 0.21286441385746002, 0.02902303822338581, 0.19949916005134583, -0.08487700670957565, 0.06507442891597748, 0.016166578978300095, 0.10343976318836212, 0.0965399220585823, 0.034240610897541046, 0.23270653188228607, 0.2190907597541809, -0.1835649162530899, -0.2517269551753998, -0.03572250157594681, -0.21291902661323547, -0.1737251579761505, 0.4017066955566406, 0.06110995262861252, 0.5241867899894714, 0.06799259036779404, -0.22717250883579254, 0.13217246532440186, -0.1534138023853302, -0.10085492581129074, 0.08606370538473129, 0.3410013020038605, 0.194920152425766, -0.33739766478538513, 0.11376480758190155, 0.22903282940387726, -0.13877660036087036, -0.20064374804496765, -0.31021082401275635, -0.12138351798057556, -0.05525432899594307, -0.14548824727535248, 0.2526145875453949, -0.6270565390586853, 0.26425307989120483, 0.2605430483818054, -0.10207672417163849, -0.49128487706184387, 0.0038111733738332987, 0.1023697480559349, -0.21929676830768585, 0.09431307762861252, 0.015966081991791725, 0.079572394490242, -0.0476265475153923, -0.23353755474090576, -0.054442889988422394, 0.17800065875053406, -0.25374042987823486, -0.35255730152130127, -0.022704781964421272, 0.26704198122024536, 0.0590398944914341, 0.12520432472229004, -0.0038165487349033356, 0.03867839649319649, 0.23063066601753235, 0.1851244568824768, -0.012323511764407158, -0.0314190648496151, -0.08888857811689377, -0.25522422790527344, 0.26879769563674927, 0.6540946960449219, -0.09658516198396683, -0.1106153205037117, -0.17602290213108063, -0.00005733166108257137, 0.10631294548511505, 0.37059324979782104, -0.22211217880249023, 0.41600123047828674, -0.34529468417167664, 0.15978963673114777, 0.710504949092865, -0.1933838427066803, -0.3874000310897827, 0.18393366038799286, -0.24762901663780212, -0.18241454660892487, 0.10658829659223557, 0.014433917589485645, 0.1848350465297699, 0.12239456176757812, 0.16344398260116577, -0.07338801771402359, 0.08130820095539093, -0.0535246804356575, -0.3427564799785614, -0.3470589518547058, 0.12123709172010422, -0.06390063464641571, 0.18306826055049896, -0.15793731808662415, 0.27260643243789673, -0.13734397292137146, 0.0896514281630516, -0.11776531487703323, -0.06316028535366058, 0.08188927918672562, 0.2199142575263977, 0.02303391322493553, 0.10415300726890564, -0.057609181851148605, -0.4630146026611328, 0.3818475306034088, -0.295995831489563, -0.27303779125213623, -0.2498997151851654, -0.24667322635650635, -0.36709901690483093, 0.15951237082481384, -0.5803839564323425, 0.028735941275954247, 0.18560348451137543, -0.04434306547045708, 0.22216276824474335, 0.10191206634044647, -0.10632796585559845, 0.17416076362133026, 0.06096820905804634, 0.07838769257068634, -0.20480716228485107, 0.26092326641082764, -0.42553022503852844, -0.05611361190676689, 0.10251583904027939, 0.23941881954669952, 0.33669981360435486, -0.11119532585144043, -0.190408855676651, 0.40789559483528137, -0.23928886651992798, 0.022107519209384918, -0.034824639558792114, -0.13013553619384766, 0.07923819869756699, -0.3870619535446167, 0.1635846197605133, 0.2781238853931427, 0.1803104281425476, -0.15507781505584717, -0.041218601167201996, 0.31616654992103577, -0.11222842335700989, 0.11763818562030792, -0.06732746958732605, -0.04628436267375946, 0.1096147894859314, -0.10859168320894241, 0.21488744020462036, -0.12732148170471191, 0.3092458248138428, -0.32209470868110657, 0.41012880206108093, 0.14560750126838684, -0.22843791544437408, 0.11481573432683945, 0.2885635793209076, 0.012962739914655685, 0.17084799706935883, 0.0142393559217453, 0.02312295511364937, -0.1852748692035675, -0.3099057674407959, 0.2503824830055237, 0.30743926763534546, 0.13689398765563965, -0.11005356907844543, 0.25771525502204895, 0.027205299586057663, -0.20180059969425201, 0.3694402873516083, -0.14716477692127228, -0.11450395733118057, 0.4094091057777405, 0.12360542267560959, 0.041806407272815704, -0.4395468533039093, -0.10312905162572861, 0.20668312907218933, 0.09791788458824158, -0.2481187880039215, 0.01454475149512291, -0.1656813621520996, -0.03469139710068703, -0.46923431754112244, 0.573692798614502, -0.10258807241916656, -0.11791439354419708, 0.23391088843345642, 0.0687987357378006, 0.15352797508239746, 0.1181849017739296, -0.223868265748024, 0.1479698121547699, 0.040018822997808456, 0.09138843417167664, -0.23323625326156616, -0.09147634357213974, -0.0854196771979332, 0.004380396101623774, 0.4014088809490204, -0.1010478064417839, 0.5399112701416016, -0.18143317103385925, 0.0794089213013649, -0.21309851109981537, -0.33611541986465454, -0.023754538968205452, 0.03869741037487984, 0.16656643152236938, 0.06583978235721588, -0.06527121365070343, -0.028721695765852928, -0.372128963470459, 0.2697654366493225, -0.3284953236579895, -0.4169459939002991, 0.010150755755603313, 0.0055708070285618305, -0.04137280955910683, -0.2417517900466919, -0.5231001377105713, -0.2458374947309494, -0.2457345426082611, 0.3262639045715332, -0.1252707690000534, 0.0861840546131134, 0.32654574513435364, -0.08735726773738861, -0.034176040440797806, -0.037580620497465134, 0.17869408428668976, -0.3457050323486328, 0.04664174094796181, 0.050595466047525406, -0.03771229460835457, -0.3421708941459656, -0.05824235454201698, -0.12461945414543152, 0.16845610737800598, -0.09011999517679214, -0.36496487259864807, 0.3040497899055481, -0.24960589408874512, 0.4348333179950714, -0.2169639766216278, 0.29219168424606323, 0.18885520100593567, 0.25234878063201904, -0.12353415787220001, -0.1784009486436844, -0.018536895513534546, 0.11483767628669739, -0.1724197119474411, 0.04445170983672142, 0.11567129194736481, 0.29169026017189026, -0.270828515291214, 0.8078588843345642, 0.5670901536941528, 0.010567459277808666, 0.20996372401714325, -0.2143363058567047, 0.35730814933776855, -0.2475782334804535, -0.433051735162735, -0.26561734080314636, 0.10709354281425476, 0.08138363808393478, 0.09569324553012848, -0.07953792810440063, -0.08078960329294205, 0.16575300693511963, -0.18090087175369263, -0.586648166179657, -0.31680333614349365, 0.055815439671278, -0.24452586472034454, 0.13247285783290863, 0.08510079234838486, 0.026823027059435844, 0.029313454404473305, -0.009579441510140896, -0.026589959859848022, 0.2357901632785797, -0.005633661989122629, 0.07948169112205505, -0.15795522928237915, -0.16499891877174377, -0.3975370526313782, 0.11815028637647629, -0.12731105089187622, 0.2269963175058365, 0.005598623305559158, 0.23170308768749237, 0.41636011004447937, -0.20222970843315125, 0.6757405400276184, -0.06797968596220016, 0.15607281029224396, 0.09368660300970078, 0.13932020962238312, -0.12316882610321045, -0.12032002955675125, 0.07331845164299011, 0.4453847408294678, 0.11786039173603058, 0.12181412428617477, -0.26510170102119446, 0.012544434517621994, -0.06745383143424988, 0.2935517132282257, -0.37997570633888245, -0.4098849296569824, -0.1448255181312561, -0.3187563419342041, -0.5102405548095703, -0.019287243485450745, -0.01450168527662754, 0.24962250888347626, -0.06267254799604416, -0.08093120157718658, -0.2437487691640854, -0.2154950350522995, 0.014571507461369038, 0.2108634114265442, 0.27314212918281555, 0.10071966052055359, 0.6041333079338074, 0.43934354186058044, -0.141389399766922, -0.004228376783430576, 0.706229031085968, -0.006803251802921295, -0.021242907270789146, -0.2818033993244171, -0.23563429713249207, -0.1919904351234436, 0.26794788241386414, -0.2039373368024826, 0.17773689329624176, 0.07932191342115402, -0.00191298290155828, 0.03309877961874008, -0.19607198238372803, 0.17029407620429993, -0.18827831745147705, -0.23669397830963135, -0.3877386450767517, 0.3027288019657135, -0.12718307971954346, -0.284485399723053, 0.2639063596725464, 0.1304771602153778, -0.16883863508701324, 0.3598026931285858, -0.3438883125782013, 0.8287068009376526, -0.3545683026313782, -0.05250740423798561, -0.1525411456823349, -0.3235085904598236, 0.25012779235839844, -0.06685180962085724, 0.022803891450166702, -0.5010050535202026, 0.0630502849817276, 0.164028137922287, -0.06110518053174019, -0.1104050800204277, 0.0001884319935925305, -0.2942344844341278, 0.17399314045906067, -0.054459862411022186, 0.020480157807469368, -0.15344226360321045, 0.3549318313598633, 0.009145462885499, 0.21883228421211243, -0.024584544822573662, 0.10504811257123947, 0.15875335037708282, 0.2887306213378906, -0.03258887305855751, -0.035595133900642395, 0.18337827920913696, -0.5770730376243591, -0.27923232316970825, 0.10728169977664948, -0.3708566725254059, 0.536970853805542, 0.019555339589715004, -0.25756993889808655, 0.24254223704338074, 0.013072013854980469, 0.23272636532783508, 0.20163027942180634, -0.05268705636262894, 0.12249057739973068, 0.3005024790763855, 0.10070634633302689, -0.22532545030117035, -0.02109171450138092, -0.10397310554981232, -0.0016898239264264703, -0.34438854455947876, -0.07735233008861542, -0.07948083430528641, -0.40058526396751404, -0.16589638590812683, 0.26310494542121887, -0.17360751330852509, -0.010528098791837692, 0.1767033338546753, -0.05212170258164406, -0.08903823047876358, -0.3136579692363739, 0.14975136518478394, 0.18000076711177826, 0.04096716642379761, 0.11198678612709045, -0.07747367769479752, -0.17475077509880066, 0.08596836775541306, 0.18168744444847107, 0.3723408281803131, 0.08331721276044846, 0.5415465235710144, -0.27410754561424255, -0.010432083159685135, -0.25238049030303955, 0.08366835862398148, 0.09185992926359177, -0.716533899307251, 0.23619826138019562, -0.30143991112709045, 0.23878532648086548, 0.10115960985422134, 0.4325394630432129, 0.305166631937027, 0.21366621553897858, 0.04068780317902565, -0.2169865518808365, -0.08582445979118347, -0.09690698981285095, 0.030451398342847824, 0.22586725652217865, 0.007245188113301992, 0.16768506169319153, -0.08454339951276779, 0.22305786609649658, -0.32886025309562683, 0.27063456177711487, -0.08113620430231094, 0.08412632346153259, -0.004769483115524054, -0.11927125602960587, -0.05203770473599434, -0.04612383991479874, 0.1594187170267105, 0.09487885236740112, -0.17365925014019012, -0.23261620104312897, -0.08967689424753189, 0.1331889033317566, -0.04001883789896965, 0.13290494680404663, -0.23253785073757172, -0.2018628865480423, 0.22113509476184845, -0.06188669428229332, 0.19287709891796112, -0.12437893450260162, 0.13668067753314972, 0.03726838156580925, 0.15354111790657043, 0.09993782639503479, -0.2555321156978607, 0.20247812569141388, -0.28098925948143005, 0.32469257712364197, -0.043404314666986465, 0.16911062598228455, -0.01953422836959362, -0.04079296439886093, -0.3310747742652893, 0.045702412724494934, -0.20603083074092865, 0.08934246748685837, 0.15247459709644318, -0.27314838767051697, -0.15863481163978577, 0.4062786400318146, 0.1589537262916565, 0.5390265583992004, -0.323869526386261, 0.12484091520309448, -0.03246679529547691, 0.2207845151424408, -0.350929856300354, -0.15090090036392212, 0.042109165340662, 0.00991430226713419, 0.23707322776317596, 0.3453678786754608, 0.311866819858551, -0.22164195775985718, -0.10294397920370102, 0.06607067584991455, 0.403157502412796, 0.012986347079277039, 0.3764740526676178, 0.38099661469459534, 0.2930634319782257, -0.20264014601707458, 0.29370206594467163, -0.04057707265019417, 0.026859089732170105, 0.564730703830719, -0.5716762542724609, 0.09701758623123169, -0.010052967816591263, 0.2584646940231323, 0.20961280167102814, -0.13181164860725403, 0.3875587582588196, 0.0626458004117012, -0.11366914957761765, 0.025414662435650826, -0.0024648080579936504, 0.16818855702877045, -0.20091430842876434, -0.05533188208937645, -0.08879832923412323, 0.09492382407188416, -0.1822155863046646, -0.11947035789489746, -0.10947609692811966, -0.23818251490592957, -0.24145621061325073, 0.12669804692268372, 0.0207604318857193, 0.06687314063310623, 0.17967848479747772, 0.024395950138568878, -0.32661715149879456, -0.39246582984924316, 0.21195469796657562, 0.3055471181869507, 0.3821730613708496, -0.40208709239959717, 0.2971870005130768, 0.46878039836883545, -0.10851896554231644, 0.18106159567832947, 0.49460795521736145, 0.6445355415344238, 0.2367231398820877, -0.1513955444097519, 0.2144290953874588, 0.09081395715475082, -0.15453779697418213, -0.19456082582473755, 0.10614631325006485, -0.10233613103628159, 0.18144747614860535, 0.14946560561656952, 0.07850361615419388, -0.11494791507720947, -0.10567755252122879, 0.27710410952568054, 0.14482052624225616, -0.09291412681341171, 0.21856515109539032, -0.19765204191207886, -0.13441704213619232, 0.021138783544301987, 0.2508803904056549, -0.34583473205566406, 0.008822580799460411, 0.3492436707019806, 0.24176815152168274, 0.11992082744836807, -0.23154878616333008, 0.12837938964366913, 0.03457070142030716, 0.3339749574661255, 0.17538848519325256, 0.05148964375257492, -0.24770411849021912, -0.03247464448213577, -0.696625828742981, 0.09627111256122589, -0.4398215115070343, -0.02471410669386387, 0.21955254673957825, 0.385526567697525, -0.3456202745437622, -0.009113002568483353, 0.3729903995990753, 0.07274433970451355, 0.02755960449576378, 0.2396106868982315, -0.22255219519138336, -0.0010229360777884722, 0.4384167194366455, -0.2554384768009186, 0.11879053711891174, -0.42891618609428406, 0.3651636838912964, -0.3669346570968628, 0.028713500127196312, -0.15102921426296234, 0.06782518327236176, 0.1020130142569542, -0.27574655413627625, 0.41586601734161377, 0.08896948397159576, 0.33409807085990906, -0.0057509299367666245, -0.20173878967761993, -0.2366868108510971, -0.1630811095237732, -0.21888163685798645, 0.29594284296035767, 0.500656247138977, 0.11525660753250122, -0.02089422196149826, -0.422118604183197, -0.17889757454395294, 0.22491306066513062, 0.03899523243308067, -0.07184121757745743, -0.07915545254945755, 0.05787736177444458, -0.20155221223831177, 0.16071589291095734, 0.02403893694281578, 0.20760448276996613, -0.08997777849435806, 0.16524195671081543, -0.2389785647392273, -0.6555594205856323, 0.39394521713256836, -0.17947912216186523, -0.09075816720724106, -0.13619442284107208, 0.3525640368461609, 0.2518314719200134, 0.07717850804328918, -0.6191430687904358, 0.2389179766178131, 0.5750241875648499, -0.22884932160377502, -0.00972963310778141, 0.15335296094417572, -0.129898339509964, 0.04729251563549042, 0.017555568367242813, -0.0761200338602066, 0.030506720766425133, -0.2946876287460327, 0.25486165285110474, -0.3082233667373657 ]
https://github.com/huggingface/datasets/issues/2552
Keys should be unique error on code_search_net
Hi! Got same error when loading other dataset: ```python3 load_dataset('wikicorpus', 'raw_en') ``` tb: ```pytb --------------------------------------------------------------------------- DuplicatedKeysError Traceback (most recent call last) /opt/conda/lib/python3.8/site-packages/datasets/builder.py in _prepare_split(self, split_generator) 1109 example = self.info.features.encode_example(record) -> 1110 writer.write(example, key) 1111 finally: /opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in write(self, example, key, writer_batch_size) 341 if self._check_duplicates: --> 342 self.check_duplicate_keys() 343 # Re-intializing to empty list for next batch /opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in check_duplicate_keys(self) 352 if hash in tmp_record: --> 353 raise DuplicatedKeysError(key) 354 else: DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 519 Keys should be unique and deterministic in nature ``` Version: datasets==1.11.0
## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0
91
Keys should be unique error on code_search_net ## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0 Hi! Got same error when loading other dataset: ```python3 load_dataset('wikicorpus', 'raw_en') ``` tb: ```pytb --------------------------------------------------------------------------- DuplicatedKeysError Traceback (most recent call last) /opt/conda/lib/python3.8/site-packages/datasets/builder.py in _prepare_split(self, split_generator) 1109 example = self.info.features.encode_example(record) -> 1110 writer.write(example, key) 1111 finally: /opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in write(self, example, key, writer_batch_size) 341 if self._check_duplicates: --> 342 self.check_duplicate_keys() 343 # Re-intializing to empty list for next batch /opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in check_duplicate_keys(self) 352 if hash in tmp_record: --> 353 raise DuplicatedKeysError(key) 354 else: DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 519 Keys should be unique and deterministic in nature ``` Version: datasets==1.11.0
[ -0.050656478852033615, -0.026531191542744637, -0.09670862555503845, 0.33766722679138184, 0.09382715821266174, -0.005184992216527462, 0.20963668823242188, 0.27232256531715393, 0.09786691516637802, 0.08467810600996017, -0.07676653563976288, 0.37975865602493286, -0.18557733297348022, 0.13125012814998627, 0.1376768946647644, 0.07047880440950394, -0.045173533260822296, 0.18325942754745483, 0.13118799030780792, -0.03421648591756821, -0.32477957010269165, 0.2772047519683838, -0.22566179931163788, 0.010590893216431141, -0.21625079214572906, -0.14123883843421936, -0.18521353602409363, 0.23770995438098907, -0.17053890228271484, -0.6306677460670471, 0.26207566261291504, 0.20496726036071777, -0.29320281744003296, 0.34949445724487305, -0.00011318139149807394, 0.18479086458683014, 0.3866308331489563, -0.022092139348387718, -0.2522617280483246, -0.19846367835998535, -0.09951575845479965, -0.09471725672483444, 0.08449257165193558, -0.2655923366546631, -0.061611488461494446, -0.12183180451393127, -0.0980844646692276, -0.5638546347618103, 0.8383654356002808, 0.21868939697742462, 0.24880275130271912, 0.17807215452194214, 0.3565167486667633, -0.2654961049556732, 0.2333429455757141, -0.1770569086074829, -0.057363733649253845, 0.39108598232269287, 0.21378861367702484, -0.04618004336953163, 0.018900694325566292, 0.2944653630256653, 0.15495097637176514, -0.0945594534277916, 0.44342249631881714, -0.057433247566223145, 0.07486304640769958, -0.352926105260849, 0.21761195361614227, 0.08297432214021683, 0.10211287438869476, -0.29076698422431946, -0.22445182502269745, -0.2823086380958557, 0.05067761614918709, -0.2336994707584381, 0.32890403270721436, 0.14342635869979858, -0.22585588693618774, 0.16563230752944946, -0.00857495330274105, -0.2514272630214691, 0.011715229600667953, -0.057937514036893845, 0.021885503083467484, -0.026317276060581207, -0.05222082883119583, 0.14106309413909912, 0.18785464763641357, -0.0514879934489727, 0.2746839225292206, -0.06660262495279312, 0.035233739763498306, 0.19457240402698517, -0.525819718837738, 0.12675733864307404, -0.04443756490945816, -0.12130017578601837, 0.23488642275333405, 0.03444923833012581, 0.18185940384864807, -0.11606668680906296, 0.07464207708835602, 0.0022267948370426893, 0.09573256969451904, 0.13079184293746948, 0.014150572940707207, 0.24627520143985748, 0.18251442909240723, -0.15482288599014282, -0.24895593523979187, -0.05596839636564255, -0.18998479843139648, -0.1946253478527069, 0.36495116353034973, 0.08283398300409317, 0.5289830565452576, 0.08616115897893906, -0.2361944019794464, 0.13379016518592834, -0.13450178503990173, -0.09757978469133377, 0.06428629904985428, 0.33345940709114075, 0.1980130970478058, -0.3291810154914856, 0.1161271333694458, 0.22787073254585266, -0.12730830907821655, -0.19554142653942108, -0.30808666348457336, -0.085772804915905, -0.07301349937915802, -0.14871059358119965, 0.23540164530277252, -0.6151367425918579, 0.290603369474411, 0.24765735864639282, -0.1106656864285469, -0.5036481618881226, 0.017825307324528694, 0.1039811223745346, -0.24194402992725372, 0.07849587500095367, 0.023220723494887352, 0.06665559113025665, -0.022295743227005005, -0.23037812113761902, -0.059893008321523666, 0.16670285165309906, -0.25888872146606445, -0.3754637539386749, -0.06665872037410736, 0.27563464641571045, 0.09911494702100754, 0.10026099532842636, 0.024197624996304512, 0.04353373125195503, 0.22546637058258057, 0.17646631598472595, -0.01940331608057022, -0.03149136155843735, -0.08474066853523254, -0.2560476064682007, 0.2619626522064209, 0.6545100212097168, -0.09670150279998779, -0.09103387594223022, -0.17273437976837158, 0.016248345375061035, 0.09784357249736786, 0.3790157735347748, -0.22284157574176788, 0.4225226640701294, -0.3517398238182068, 0.15071170032024384, 0.7040374875068665, -0.19038313627243042, -0.36904990673065186, 0.18396174907684326, -0.2506257891654968, -0.2029009312391281, 0.1125367060303688, 0.011254534125328064, 0.16693134605884552, 0.14609412848949432, 0.17363940179347992, -0.08322227001190186, 0.04376886412501335, -0.04668695479631424, -0.3396587669849396, -0.3785648047924042, 0.11581381410360336, -0.0809868723154068, 0.19277147948741913, -0.13967563211917877, 0.2820676267147064, -0.10088943690061569, 0.10651879757642746, -0.13113467395305634, -0.08408854901790619, 0.08526091277599335, 0.23587030172348022, 0.03797972947359085, 0.06104350462555885, -0.09419190883636475, -0.44922152161598206, 0.3751952350139618, -0.29696545004844666, -0.26010194420814514, -0.22364184260368347, -0.24571511149406433, -0.4040379226207733, 0.13048216700553894, -0.559860110282898, -0.01233336515724659, 0.19536234438419342, -0.02637830190360546, 0.23347821831703186, 0.09467851370573044, -0.13282744586467743, 0.1824875771999359, 0.06210881844162941, 0.07866073399782181, -0.2175978124141693, 0.24315518140792847, -0.45920801162719727, -0.06291139125823975, 0.09952846169471741, 0.23008452355861664, 0.3229333758354187, -0.09376334398984909, -0.1757679432630539, 0.4119700491428375, -0.22773592174053192, -0.0013415642315521836, -0.00005372831583372317, -0.13392366468906403, 0.06968796253204346, -0.377381831407547, 0.1881812959909439, 0.28734132647514343, 0.17587895691394806, -0.14630036056041718, -0.04675644636154175, 0.3089583218097687, -0.09620286524295807, 0.09824208170175552, -0.05539456382393837, -0.03795662894845009, 0.1037115827202797, -0.11514145880937576, 0.23398593068122864, -0.1282825618982315, 0.31353771686553955, -0.3360980749130249, 0.39280471205711365, 0.1252301037311554, -0.22481012344360352, 0.10922140628099442, 0.2842066287994385, 0.022660253569483757, 0.18944820761680603, 0.027357911691069603, 0.04803803935647011, -0.17088334262371063, -0.3229435682296753, 0.2553577423095703, 0.30246731638908386, 0.1463908702135086, -0.13264158368110657, 0.26532864570617676, 0.021454254165291786, -0.18303193151950836, 0.3622651696205139, -0.17404820024967194, -0.1003461480140686, 0.4041174352169037, 0.09082503616809845, 0.02711298130452633, -0.404718816280365, -0.13920266926288605, 0.17156191170215607, 0.11385021358728409, -0.23784668743610382, 0.00710514048114419, -0.15289223194122314, -0.056440770626068115, -0.49251800775527954, 0.560819685459137, -0.10723031312227249, -0.1246384009718895, 0.20696167647838593, 0.07199414074420929, 0.15260057151317596, 0.10050776600837708, -0.23538295924663544, 0.15930989384651184, 0.055126987397670746, 0.10801295191049576, -0.19707883894443512, -0.08667102456092834, -0.06144670769572258, 0.021470582112669945, 0.37018805742263794, -0.10351574420928955, 0.5540131330490112, -0.1882573962211609, 0.10394208133220673, -0.23969735205173492, -0.3182741701602936, -0.038376811891794205, 0.0301015917211771, 0.16027407348155975, 0.08712130784988403, -0.027178946882486343, -0.023795876652002335, -0.38703733682632446, 0.2663695216178894, -0.2896527051925659, -0.40522390604019165, -0.007430633530020714, -0.0020917465444654226, -0.027511410415172577, -0.21066972613334656, -0.5379371643066406, -0.2609393298625946, -0.27030420303344727, 0.312999427318573, -0.11990580707788467, 0.08808253705501556, 0.35698607563972473, -0.048091962933540344, -0.01728782057762146, -0.02123633213341236, 0.1838795691728592, -0.3261016309261322, 0.0197961013764143, 0.03387894853949547, -0.058575667440891266, -0.317038357257843, -0.07422687858343124, -0.14098969101905823, 0.17567335069179535, -0.10759589821100235, -0.3542786240577698, 0.2863629162311554, -0.2775952219963074, 0.40447062253952026, -0.22608278691768646, 0.30474427342414856, 0.19684535264968872, 0.25640061497688293, -0.13573215901851654, -0.1624036282300949, -0.02878391742706299, 0.10438762605190277, -0.17428700625896454, 0.0744478777050972, 0.12340327352285385, 0.3143497109413147, -0.24399444460868835, 0.8015072345733643, 0.6011494994163513, 0.002150630811229348, 0.21924404799938202, -0.21711526811122894, 0.3666771650314331, -0.27027627825737, -0.447871595621109, -0.2633081078529358, 0.10359855741262436, 0.0686427652835846, 0.07861462980508804, -0.09019683301448822, -0.07772626727819443, 0.15616029500961304, -0.1707778424024582, -0.5983709692955017, -0.3052639663219452, 0.06305940449237823, -0.25404083728790283, 0.13222448527812958, 0.05929265543818474, 0.009505624882876873, 0.014796944335103035, 0.019925350323319435, -0.02474537491798401, 0.24369773268699646, -0.016087869182229042, 0.09680815786123276, -0.14898377656936646, -0.16188624501228333, -0.3931611478328705, 0.13127557933330536, -0.12905551493167877, 0.2116868495941162, -0.003911151550710201, 0.2356928288936615, 0.37933290004730225, -0.20404574275016785, 0.6450523138046265, -0.07904833555221558, 0.1470450609922409, 0.10921629518270493, 0.14356549084186554, -0.09409943222999573, -0.10587894171476364, 0.0680074468255043, 0.4331175684928894, 0.1125946119427681, 0.10720478743314743, -0.260877400636673, 0.04332537576556206, -0.044214118272066116, 0.2962643802165985, -0.3561614453792572, -0.3749852180480957, -0.15645091235637665, -0.33203479647636414, -0.5376148223876953, -0.011380096897482872, 0.00592532055452466, 0.25770679116249084, -0.012277573347091675, -0.0873328298330307, -0.24341529607772827, -0.2121429741382599, 0.018421266227960587, 0.19750499725341797, 0.27778345346450806, 0.1220577284693718, 0.5724920630455017, 0.4022452235221863, -0.14940829575061798, 0.003984091803431511, 0.7032374739646912, -0.018190627917647362, -0.02686935104429722, -0.30098286271095276, -0.21836163103580475, -0.1841009557247162, 0.2520700693130493, -0.18203681707382202, 0.16879267990589142, 0.08916629105806351, 0.025671234354376793, 0.021567165851593018, -0.1831194907426834, 0.1712028682231903, -0.1753457933664322, -0.22596953809261322, -0.4079322814941406, 0.28266870975494385, -0.12923955917358398, -0.2515248656272888, 0.27989619970321655, 0.1300746649503708, -0.15422292053699493, 0.363235205411911, -0.335212379693985, 0.8218470811843872, -0.3532816469669342, -0.06764566153287888, -0.1762685328722, -0.32066038250923157, 0.2579033374786377, -0.07196084409952164, 0.029306834563612938, -0.49594053626060486, 0.05418750271201134, 0.17362360656261444, -0.05994076281785965, -0.07638925313949585, -0.010447395034134388, -0.3085426092147827, 0.19034138321876526, -0.05999670922756195, 0.0012931638630107045, -0.16727888584136963, 0.3595794141292572, -0.01231265626847744, 0.2399487942457199, -0.013556130230426788, 0.11528373509645462, 0.13412679731845856, 0.2973426580429077, -0.05040181428194046, -0.028444429859519005, 0.19192416965961456, -0.5713023543357849, -0.3050011992454529, 0.1107298880815506, -0.3681267499923706, 0.555381178855896, -0.00817042961716652, -0.2508479058742523, 0.2377808839082718, 0.032504208385944366, 0.24731887876987457, 0.22809071838855743, -0.050532955676317215, 0.10291207581758499, 0.28699901700019836, 0.0714266449213028, -0.24142444133758545, -0.013944038189947605, -0.0804188996553421, -0.012587087228894234, -0.3690928518772125, -0.06204044818878174, -0.07039182633161545, -0.43445706367492676, -0.16714151203632355, 0.24648459255695343, -0.16945073008537292, -0.03647856414318085, 0.17225319147109985, -0.055146340280771255, -0.09886234998703003, -0.31190797686576843, 0.1464177370071411, 0.1796560436487198, 0.062388475984334946, 0.10580611228942871, -0.06828185170888901, -0.1866520345211029, 0.08057238161563873, 0.1547396183013916, 0.3759059011936188, 0.06330237537622452, 0.5445219874382019, -0.26286593079566956, -0.007223327178508043, -0.24901553988456726, 0.08115049451589584, 0.08625070005655289, -0.6860790252685547, 0.2478179633617401, -0.29625728726387024, 0.22404100000858307, 0.10877247154712677, 0.41428878903388977, 0.3356962502002716, 0.22327929735183716, 0.08195988088846207, -0.215094655752182, -0.12095044553279877, -0.07531705498695374, 0.012726963497698307, 0.25212082266807556, 0.005137344356626272, 0.18771211802959442, -0.04971519485116005, 0.2116052508354187, -0.33932068943977356, 0.28701525926589966, -0.09369952231645584, 0.07923352718353271, -0.011899209581315517, -0.11922578513622284, -0.06057607755064964, -0.013703320175409317, 0.15991155803203583, 0.12080936878919601, -0.18905366957187653, -0.2317385971546173, -0.08219210058450699, 0.12983188033103943, -0.02727617509663105, 0.14835909008979797, -0.22584381699562073, -0.2204294502735138, 0.22166162729263306, -0.057471200823783875, 0.1928473711013794, -0.0927039086818695, 0.14921879768371582, 0.04309708625078201, 0.1456863135099411, 0.09884413331747055, -0.2510834336280823, 0.1975167840719223, -0.25404107570648193, 0.31947991251945496, -0.05786614120006561, 0.17433993518352509, 0.0008011662866920233, -0.05304102972149849, -0.34750500321388245, 0.06111622601747513, -0.1615915447473526, 0.08229922503232956, 0.1322798728942871, -0.2498299926519394, -0.15378202497959137, 0.42041337490081787, 0.16114602982997894, 0.502595067024231, -0.31539154052734375, 0.1437796801328659, -0.023763254284858704, 0.23356693983078003, -0.35531193017959595, -0.13314446806907654, 0.0018797152442857623, 0.013497456908226013, 0.24402691423892975, 0.35042083263397217, 0.2872250974178314, -0.18267761170864105, -0.10384883731603622, 0.07048051804304123, 0.40046727657318115, 0.007783371023833752, 0.38447126746177673, 0.37222152948379517, 0.278423935174942, -0.23352256417274475, 0.2874756455421448, -0.04316126927733421, 0.05002659186720848, 0.5659118294715881, -0.5653175115585327, 0.10772836953401566, -0.03380516543984413, 0.2446526288986206, 0.2079356163740158, -0.11937975138425827, 0.3859623968601227, 0.05764058977365494, -0.12049640715122223, 0.0073294006288051605, -0.0034063151106238365, 0.16657745838165283, -0.20716555416584015, -0.05674293264746666, -0.09290643036365509, 0.08416218310594559, -0.17666037380695343, -0.1067894846200943, -0.08232228457927704, -0.23169055581092834, -0.26213154196739197, 0.11272349208593369, 0.030534733086824417, 0.07362955808639526, 0.1796397864818573, -0.007466414477676153, -0.3481132984161377, -0.3785907030105591, 0.20021888613700867, 0.32143256068229675, 0.3671281933784485, -0.4137480556964874, 0.2705952823162079, 0.4744778275489807, -0.1166890487074852, 0.1705092191696167, 0.5382392406463623, 0.6460700631141663, 0.235500767827034, -0.1561446338891983, 0.23389948904514313, 0.09357096999883652, -0.1518334597349167, -0.17700998485088348, 0.0792701244354248, -0.10903357714414597, 0.1749889999628067, 0.16330689191818237, 0.08514022082090378, -0.12436217069625854, -0.11418259143829346, 0.2625716030597687, 0.13800382614135742, -0.10964316874742508, 0.2217370569705963, -0.19395680725574493, -0.10941337049007416, 0.023287586867809296, 0.2653513252735138, -0.38073065876960754, 0.0055835978128015995, 0.3437030613422394, 0.21793490648269653, 0.1009061187505722, -0.22970432043075562, 0.13101044297218323, 0.04474472999572754, 0.3138362765312195, 0.184736430644989, 0.04509453475475311, -0.253465861082077, -0.03942938894033432, -0.7021535634994507, 0.08850780874490738, -0.4366109371185303, -0.016316358000040054, 0.18161562085151672, 0.37965327501296997, -0.338712215423584, 0.010820664465427399, 0.36180853843688965, 0.07118245959281921, 0.023916471749544144, 0.2403917759656906, -0.2153802514076233, -0.008412846364080906, 0.4215867519378662, -0.2574015259742737, 0.14079856872558594, -0.42497652769088745, 0.34163251519203186, -0.3546766936779022, 0.040543604642152786, -0.14331473410129547, 0.05856847018003464, 0.12317654490470886, -0.3012669086456299, 0.39876019954681396, 0.10309426486492157, 0.3309642970561981, -0.017795301973819733, -0.23104122281074524, -0.23941628634929657, -0.17231403291225433, -0.2147093415260315, 0.2892090976238251, 0.531842827796936, 0.14685039222240448, -0.025586439296603203, -0.4306865632534027, -0.20933711528778076, 0.24627211689949036, 0.0495484359562397, -0.058330781757831573, -0.07409831881523132, 0.06394705921411514, -0.18390317261219025, 0.1469750851392746, 0.05750468373298645, 0.20974020659923553, -0.09274922311306, 0.19257286190986633, -0.23319418728351593, -0.6767181158065796, 0.39000698924064636, -0.1394376903772354, -0.1063905656337738, -0.11984957009553909, 0.3468550741672516, 0.2457018345594406, 0.08567873388528824, -0.6321538686752319, 0.25256267189979553, 0.5547978281974792, -0.20413513481616974, -0.00262718228623271, 0.1426163762807846, -0.13998626172542572, 0.024154460057616234, 0.03144039958715439, -0.057040367275476456, 0.03546857088804245, -0.27953898906707764, 0.27244600653648376, -0.30170994997024536 ]
https://github.com/huggingface/datasets/issues/2552
Keys should be unique error on code_search_net
The wikicorpus issue has been fixed by https://github.com/huggingface/datasets/pull/2844 We'll do a new release of `datasets` soon :)
## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0
17
Keys should be unique error on code_search_net ## Describe the bug Loading `code_search_net` seems not possible at the moment. ## Steps to reproduce the bug ```python >>> load_dataset('code_search_net') Downloading: 8.50kB [00:00, 3.09MB/s] Downloading: 19.1kB [00:00, 10.1MB/s] No config specified, defaulting to: code_search_net/all Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a... Traceback (most recent call last): File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split writer.write(example, key) File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write self.check_duplicate_keys() File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` ## Environment info - `datasets` version: 1.8.1.dev0 - Platform: macOS-10.15.7-x86_64-i386-64bit - Python version: 3.8.5 - PyArrow version: 2.0.0 The wikicorpus issue has been fixed by https://github.com/huggingface/datasets/pull/2844 We'll do a new release of `datasets` soon :)
[ -0.07428094744682312, -0.0351794995367527, -0.08668220043182373, 0.35816046595573425, 0.06232630833983421, -0.03549264371395111, 0.16847532987594604, 0.2639014422893524, 0.09276624768972397, 0.12361404299736023, -0.044513899832963943, 0.37844181060791016, -0.15191598236560822, 0.13472230732440948, 0.11378250271081924, 0.039382290095090866, -0.02783498726785183, 0.19986557960510254, 0.10081016272306442, -0.03489580377936363, -0.3487110137939453, 0.3278386890888214, -0.2847040295600891, 0.06205464154481888, -0.2731282413005829, -0.17734771966934204, -0.17788784205913544, 0.2007196694612503, -0.2140279859304428, -0.6042181849479675, 0.2684115469455719, 0.202705979347229, -0.2295342981815338, 0.37931424379348755, -0.00011121762508992106, 0.18493719398975372, 0.39672791957855225, -0.009995700791478157, -0.2528949975967407, -0.13522081077098846, -0.059360843151807785, -0.0799269825220108, 0.11422551423311234, -0.31151193380355835, -0.05528290197253227, -0.10503529757261276, -0.06629367917776108, -0.48703551292419434, 0.8415837287902832, 0.24766860902309418, 0.2632395625114441, 0.22911757230758667, 0.3477335274219513, -0.20142033696174622, 0.25884902477264404, -0.2904578745365143, -0.08240535110235214, 0.3073558509349823, 0.18800313770771027, -0.07121947407722473, -0.025993363931775093, 0.3081965744495392, 0.1307697296142578, -0.0733625665307045, 0.3915860652923584, -0.015497692860662937, 0.0570182129740715, -0.32799795269966125, 0.22982020676136017, 0.10040773451328278, 0.10760054737329483, -0.275733083486557, -0.18306800723075867, -0.23529940843582153, 0.04565155506134033, -0.25532081723213196, 0.3790767788887024, 0.10813771933317184, -0.18496200442314148, 0.16183684766292572, 0.018458416685461998, -0.14996053278446198, 0.043713852763175964, -0.0016606651479378343, -0.051175955682992935, 0.17371323704719543, -0.03230663388967514, 0.14440853893756866, 0.19393979012966156, -0.05478746443986893, 0.30418816208839417, -0.08993154764175415, 0.006632312200963497, 0.1831381469964981, -0.5206640958786011, 0.11904814094305038, -0.05583537369966507, -0.029769256711006165, 0.18824321031570435, -0.02092459797859192, 0.16257160902023315, -0.09580141305923462, 0.09990896284580231, 0.01813853532075882, 0.15904338657855988, 0.0995519608259201, 0.05601268261671066, 0.26264819502830505, 0.20377710461616516, -0.14407116174697876, -0.28741317987442017, -0.04675765708088875, -0.15676109492778778, -0.1744731217622757, 0.3424736261367798, 0.020965509116649628, 0.4984284043312073, 0.08778230100870132, -0.17726753652095795, 0.08519652485847473, -0.14820890128612518, -0.12401265650987625, 0.04194819554686546, 0.36182141304016113, 0.17235974967479706, -0.23168836534023285, 0.13410604000091553, 0.22108642756938934, -0.16488893330097198, -0.07922805845737457, -0.3258473575115204, -0.07711022347211838, -0.04486427083611488, -0.15089288353919983, 0.2584303915500641, -0.5565131306648254, 0.3257266581058502, 0.21642765402793884, -0.05759488791227341, -0.5052257776260376, 0.06626394391059875, 0.14264293015003204, -0.2543680667877197, 0.11147495359182358, 0.014556084759533405, 0.09538385272026062, -0.06990281492471695, -0.2688688039779663, -0.03345213085412979, 0.189326673746109, -0.2687191367149353, -0.33438390493392944, -0.12010806053876877, 0.2900274991989136, 0.09643248468637466, 0.09092801064252853, -0.0038087088614702225, -0.006024463567882776, 0.19286932051181793, 0.12178304046392441, 0.0052765351720154285, -0.05634324625134468, -0.09655570238828659, -0.24772250652313232, 0.2557835876941681, 0.5845032334327698, -0.03469273820519447, -0.10735037177801132, -0.14534543454647064, -0.047122545540332794, 0.09786081314086914, 0.32577160000801086, -0.25675490498542786, 0.4472723603248596, -0.3528084456920624, 0.2633310854434967, 0.6881000995635986, -0.24462029337882996, -0.38049933314323425, 0.09337525069713593, -0.2463257759809494, -0.18345330655574799, 0.07955784350633621, 0.05235427990555763, 0.18286745250225067, 0.1490887850522995, 0.11435762792825699, -0.04427848756313324, 0.1039806604385376, -0.0017024172702804208, -0.35552796721458435, -0.40460124611854553, 0.12093689292669296, -0.06097398325800896, 0.15740574896335602, -0.1855023354291916, 0.292300283908844, -0.07624680548906326, 0.16311390697956085, -0.13231050968170166, -0.11666981130838394, 0.04975685849785805, 0.17577925324440002, 0.0060180178843438625, 0.0691932886838913, -0.053721074014902115, -0.46383002400398254, 0.3711787462234497, -0.3174011707305908, -0.2441735863685608, -0.21985943615436554, -0.25430068373680115, -0.40069255232810974, 0.16879568994045258, -0.5710161924362183, -0.08225549012422562, 0.23777760565280914, -0.014065664261579514, 0.19303077459335327, 0.07216612994670868, -0.13650307059288025, 0.13150382041931152, 0.03693699091672897, 0.05503934994339943, -0.2035369724035263, 0.27332791686058044, -0.4755397140979767, -0.0901232436299324, 0.10201185941696167, 0.24868503212928772, 0.37095919251441956, -0.07316500693559647, -0.18678143620491028, 0.398981511592865, -0.19458100199699402, 0.02006540633738041, 0.020924830809235573, -0.12162422388792038, 0.058595210313797, -0.3596249222755432, 0.1598382443189621, 0.26249489188194275, 0.18729868531227112, -0.20889154076576233, -0.05402759090065956, 0.31511008739471436, -0.06891565024852753, 0.12123130261898041, -0.07566964626312256, -0.024524139240384102, 0.11084103584289551, -0.13426204025745392, 0.2704890966415405, -0.12265072762966156, 0.2525312602519989, -0.30488646030426025, 0.2955523133277893, 0.13028506934642792, -0.16170194745063782, 0.12040112912654877, 0.2963659465312958, -0.016451073810458183, 0.1959628462791443, -0.013848170638084412, 0.017793260514736176, -0.1833086609840393, -0.27838295698165894, 0.2625536024570465, 0.29295676946640015, 0.13898813724517822, -0.08986809849739075, 0.2467438131570816, 0.05804995447397232, -0.17755287885665894, 0.3787801265716553, -0.1610400229692459, -0.13129141926765442, 0.3710988461971283, 0.09661614149808884, -0.0010817539878189564, -0.3934865891933441, -0.0888894572854042, 0.12214551866054535, 0.11923409253358841, -0.1838066726922989, -0.04783129692077637, -0.1479790359735489, -0.01418797206133604, -0.4854326546192169, 0.559430718421936, -0.1174691766500473, -0.2091076821088791, 0.24760335683822632, 0.1138996034860611, 0.14755888283252716, 0.13453078269958496, -0.2055598497390747, 0.14885225892066956, 0.03092063032090664, 0.07778114825487137, -0.2433759868144989, -0.14216071367263794, -0.08067815750837326, 0.04343578219413757, 0.37223851680755615, -0.005975633859634399, 0.5033737421035767, -0.17265914380550385, 0.1110563650727272, -0.27091455459594727, -0.362272709608078, -0.011248676106333733, 0.06304511427879333, 0.17751526832580566, 0.1069367378950119, 0.029936565086245537, -0.049996454268693924, -0.472045361995697, 0.24903512001037598, -0.323165625333786, -0.41801631450653076, -0.047934792935848236, 0.007552663795650005, -0.042071547359228134, -0.20852777361869812, -0.5222278833389282, -0.275041788816452, -0.25736263394355774, 0.2600230872631073, -0.020688503980636597, 0.08905022591352463, 0.2367382049560547, -0.024525584653019905, 0.03946933522820473, -0.07203754037618637, 0.13147032260894775, -0.3177737891674042, 0.014497008174657822, 0.08669809252023697, -0.06115105375647545, -0.32459452748298645, -0.03705623745918274, -0.14354747533798218, 0.20854774117469788, -0.15187948942184448, -0.4038964509963989, 0.22152140736579895, -0.26998838782310486, 0.48510685563087463, -0.17688970267772675, 0.368338406085968, 0.23995040357112885, 0.28666865825653076, -0.13563089072704315, -0.18803931772708893, -0.08898814767599106, 0.08795592188835144, -0.21253786981105804, 0.09454723447561264, 0.09323498606681824, 0.21514292061328888, -0.31331661343574524, 0.8754814863204956, 0.5419551730155945, 0.01031509693711996, 0.16902710497379303, -0.24947993457317352, 0.3023970127105713, -0.2638947069644928, -0.40150943398475647, -0.1732809692621231, 0.09191955626010895, 0.1000397577881813, 0.1628786027431488, -0.0817173570394516, -0.11434394866228104, 0.12915726006031036, -0.1651422679424286, -0.6445291042327881, -0.34703919291496277, 0.04573225975036621, -0.0895172730088234, 0.0543886236846447, 0.055217742919921875, 0.03478430211544037, -0.017738182097673416, -0.008458287455141544, 0.014849553816020489, 0.19849513471126556, -0.09897266328334808, 0.08162190020084381, -0.11834714561700821, -0.07730939984321594, -0.4334525465965271, 0.1488151103258133, -0.11072506010532379, 0.2057381570339203, 0.06694700568914413, 0.19185175001621246, 0.3870505690574646, -0.25349077582359314, 0.5979358553886414, -0.09488388150930405, 0.16207031905651093, 0.11026330292224884, 0.15332885086536407, -0.019609663635492325, -0.09426486492156982, 0.024172717705368996, 0.32040491700172424, 0.15085738897323608, 0.06562931835651398, -0.29992130398750305, 0.008091104216873646, -0.007952490821480751, 0.27043628692626953, -0.3470427691936493, -0.3830891251564026, -0.18175320327281952, -0.3612959086894989, -0.5679562091827393, -0.0388948917388916, -0.01800375059247017, 0.29088661074638367, -0.03977913409471512, -0.09195545315742493, -0.28389111161231995, -0.2085038274526596, -0.023390918970108032, 0.24330437183380127, 0.2719500958919525, 0.13032817840576172, 0.5048883557319641, 0.37543371319770813, -0.13174457848072052, -0.12153680622577667, 0.654991090297699, 0.013012907467782497, 0.07370687276124954, -0.3199552595615387, -0.21836236119270325, -0.17773988842964172, 0.23664617538452148, -0.20964977145195007, 0.21164870262145996, 0.05967949703335762, 0.03543056175112724, 0.052526265382766724, -0.13548900187015533, 0.2041814923286438, -0.15217871963977814, -0.18117649853229523, -0.31688326597213745, 0.3276793956756592, -0.07978612184524536, -0.29358190298080444, 0.320447713136673, 0.18301922082901, -0.13615243136882782, 0.3454623520374298, -0.2941661477088928, 0.8646491169929504, -0.3622952103614807, -0.011260241270065308, -0.0950297862291336, -0.36146900057792664, 0.2783365845680237, -0.08596137911081314, 0.023506008088588715, -0.47011998295783997, 0.0890578106045723, 0.1547517627477646, -0.006572791840881109, -0.07367287576198578, -0.019072411581873894, -0.34055399894714355, 0.16037854552268982, -0.012533270753920078, 0.06283094733953476, -0.18613623082637787, 0.3396660089492798, 0.021042531356215477, 0.2069728523492813, -0.0783226490020752, 0.12335366010665894, 0.1063622310757637, 0.2603192627429962, -0.06110403314232826, -0.02623829059302807, 0.21972103416919708, -0.6053754687309265, -0.25624433159828186, 0.14158973097801208, -0.43170544505119324, 0.5209038257598877, -0.03542278707027435, -0.19005617499351501, 0.18607407808303833, 0.1064290776848793, 0.20525965094566345, 0.21764278411865234, -0.07292909920215607, 0.14931108057498932, 0.22589527070522308, 0.04728435352444649, -0.23814906179904938, 0.0004400997422635555, -0.13662151992321014, -0.04975314810872078, -0.38729220628738403, -0.07264914363622665, -0.05932093784213066, -0.43909284472465515, -0.09489105641841888, 0.3235536515712738, -0.13238240778446198, -0.026305032894015312, 0.15091416239738464, 0.020865974947810173, -0.15813758969306946, -0.32818952202796936, 0.16401603817939758, 0.1439601480960846, -0.0019018243765458465, 0.10280276834964752, -0.057371702045202255, -0.16008023917675018, 0.039942555129528046, 0.20162846148014069, 0.3525448441505432, -0.020414087921380997, 0.5597217679023743, -0.22384531795978546, -0.022203611209988594, -0.25681817531585693, 0.05053955689072609, 0.0784841850399971, -0.6631227135658264, 0.19796034693717957, -0.21696722507476807, 0.1372678577899933, 0.09527062624692917, 0.5443471074104309, 0.2849125564098358, 0.23197786509990692, 0.08913411945104599, -0.23733451962471008, -0.14456039667129517, -0.1138237789273262, 0.021297022700309753, 0.28131288290023804, 0.017784368246793747, 0.18478940427303314, -0.07960572838783264, 0.24428483843803406, -0.3585907220840454, 0.2909463942050934, -0.1517930030822754, 0.11261677742004395, 0.023583661764860153, -0.11574791371822357, -0.047515593469142914, 0.038617830723524094, 0.20429012179374695, 0.13021408021450043, -0.18923164904117584, -0.2583056688308716, -0.12504884600639343, 0.11936841160058975, 0.01972833462059498, 0.10222972184419632, -0.1927415132522583, -0.19397184252738953, 0.23766247928142548, -0.09767990559339523, 0.23155273497104645, -0.12627871334552765, 0.12164603173732758, 0.03510699048638344, 0.16172941029071808, 0.13284620642662048, -0.3004210293292999, 0.1358693689107895, -0.24065391719341278, 0.3165053129196167, -0.05068984627723694, 0.1333663910627365, -0.006060956511646509, -0.04599623382091522, -0.1634325087070465, 0.04334162548184395, -0.16134455800056458, 0.15627022087574005, 0.13282035291194916, -0.2350575029850006, -0.26079079508781433, 0.43057891726493835, 0.09158198535442352, 0.52411949634552, -0.3124520480632782, 0.07934656739234924, 0.0077800750732421875, 0.257598876953125, -0.35645341873168945, -0.13531775772571564, 0.12813080847263336, -0.012900538742542267, 0.24924130737781525, 0.3392433524131775, 0.2372637242078781, -0.2636076509952545, -0.12545154988765717, 0.07861334830522537, 0.29406964778900146, -0.11361223459243774, 0.3887001872062683, 0.35545191168785095, 0.2433120459318161, -0.27548840641975403, 0.26288703083992004, -0.05427629500627518, 0.03256780654191971, 0.5613676309585571, -0.5922800302505493, 0.20817594230175018, -0.09405942261219025, 0.2554304003715515, 0.23589035868644714, -0.09764078259468079, 0.4575895071029663, 0.09535657614469528, -0.07752364873886108, 0.018796442076563835, -0.011982990428805351, 0.0684346854686737, -0.20778097212314606, -0.015234120190143585, -0.13468843698501587, 0.07151888310909271, -0.19955813884735107, -0.11215505003929138, -0.09878107160329819, -0.22263558208942413, -0.2354944348335266, 0.11056395620107651, 0.03229361027479172, 0.08831435441970825, 0.19896210730075836, 0.026233503594994545, -0.35411980748176575, -0.37465178966522217, 0.11732804030179977, 0.2755415737628937, 0.4009864628314972, -0.3965547978878021, 0.2608458995819092, 0.49960756301879883, -0.10168492794036865, 0.11753319948911667, 0.5371187329292297, 0.605738639831543, 0.2470073252916336, -0.13427656888961792, 0.21503320336341858, 0.06290905177593231, -0.14977458119392395, -0.18340036273002625, 0.10924632102251053, -0.10839521884918213, 0.18562571704387665, 0.18245165050029755, 0.1080617681145668, -0.15290948748588562, -0.1572515219449997, 0.2447272092103958, 0.09841454774141312, -0.10115789622068405, 0.1219460666179657, -0.19248729944229126, -0.13520000874996185, -0.03995014354586601, 0.294703871011734, -0.345533162355423, 0.07329908758401871, 0.2401660829782486, 0.22332550585269928, 0.14867638051509857, -0.2627125382423401, 0.1377589851617813, 0.08875568211078644, 0.3642181158065796, 0.18231749534606934, 0.07947526127099991, -0.256742924451828, -0.06625092029571533, -0.7227301001548767, 0.11547267436981201, -0.437153697013855, -0.058776095509529114, 0.16906295716762543, 0.3498443067073822, -0.353267103433609, 0.045092515647411346, 0.35785314440727234, 0.1252620369195938, 0.11362936347723007, 0.20332804322242737, -0.24702805280685425, -0.04641963541507721, 0.4598293602466583, -0.2959710359573364, 0.1475212126970291, -0.42687875032424927, 0.3193940818309784, -0.361876517534256, 0.06441929191350937, -0.1150151714682579, 0.07191471010446548, 0.06680674850940704, -0.3483562171459198, 0.36820313334465027, 0.1753949373960495, 0.31024283170700073, -0.07424955815076828, -0.18543724715709686, -0.23999713361263275, -0.14637677371501923, -0.23066283762454987, 0.17341797053813934, 0.5155048370361328, 0.18014200031757355, 0.01830633543431759, -0.34339621663093567, -0.21217432618141174, 0.19654977321624756, 0.06840148568153381, -0.005520848091691732, -0.01965430937707424, 0.05978141725063324, -0.16449914872646332, 0.1473255455493927, 0.09698552638292313, 0.2417079210281372, -0.08786796033382416, 0.1769556999206543, -0.22191911935806274, -0.6492440104484558, 0.39641764760017395, -0.227842777967453, -0.13658274710178375, -0.12809383869171143, 0.3268314003944397, 0.20462307333946228, 0.10020646452903748, -0.6723284721374512, 0.2960059642791748, 0.5039244890213013, -0.16202907264232635, -0.01901126280426979, 0.14308498799800873, -0.12363514304161072, 0.008882623165845871, 0.010875266045331955, -0.02220454066991806, 0.08054051548242569, -0.2500542402267456, 0.2628285586833954, -0.3124885857105255 ]
https://github.com/huggingface/datasets/issues/2549
Handling unlabeled datasets
Hi @nelson-liu, You can pass the parameter `features` to `load_dataset`: https://huggingface.co/docs/datasets/_modules/datasets/load.html#load_dataset If you look at the code of the MNLI script you referred in your question (https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py#L62-L77), you can see how the Features were originally specified. Feel free to use it as a template, customize it and pass it to `load_dataset` using the parameter `features`.
Hi! Is there a way for datasets to produce unlabeled instances (e.g., the `ClassLabel` can be nullable). For example, I want to use the MNLI dataset reader ( https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py ) on a file that doesn't have the `gold_label` field. I tried setting `"label": data.get("gold_label")`, but got the following error: ``` File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/load.py", line 748, in load_dataset use_auth_token=use_auth_token, File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 989, in _prepare_split example = self.info.features.encode_example(record) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 953, in encode_example return encode_nested_example(self, example) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in encode_nested_example k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in <dictcomp> k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 875, in encode_nested_example return schema.encode_example(obj) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 653, in encode_example if not -1 <= example_data < self.num_classes: TypeError: '<=' not supported between instances of 'int' and 'NoneType' ``` What's the proper way to handle reading unlabeled datasets, especially for downstream usage with Transformers?
55
Handling unlabeled datasets Hi! Is there a way for datasets to produce unlabeled instances (e.g., the `ClassLabel` can be nullable). For example, I want to use the MNLI dataset reader ( https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py ) on a file that doesn't have the `gold_label` field. I tried setting `"label": data.get("gold_label")`, but got the following error: ``` File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/load.py", line 748, in load_dataset use_auth_token=use_auth_token, File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 989, in _prepare_split example = self.info.features.encode_example(record) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 953, in encode_example return encode_nested_example(self, example) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in encode_nested_example k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in <dictcomp> k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 875, in encode_nested_example return schema.encode_example(obj) File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 653, in encode_example if not -1 <= example_data < self.num_classes: TypeError: '<=' not supported between instances of 'int' and 'NoneType' ``` What's the proper way to handle reading unlabeled datasets, especially for downstream usage with Transformers? Hi @nelson-liu, You can pass the parameter `features` to `load_dataset`: https://huggingface.co/docs/datasets/_modules/datasets/load.html#load_dataset If you look at the code of the MNLI script you referred in your question (https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py#L62-L77), you can see how the Features were originally specified. Feel free to use it as a template, customize it and pass it to `load_dataset` using the parameter `features`.
[ 0.05881330743432045, 0.07810116559267044, 0.13162529468536377, 0.3273364305496216, 0.25035133957862854, 0.1380116492509842, 0.7898841500282288, -0.1512291133403778, 0.057231687009334564, 0.14990782737731934, -0.20007795095443726, 0.5356727838516235, -0.2677469849586487, 0.24402230978012085, -0.16445079445838928, 0.41767340898513794, -0.11344145983457565, 0.2267286479473114, 0.27662965655326843, -0.25992152094841003, -0.3965283930301666, -0.1135900467634201, -0.3251734673976898, -0.04578375443816185, -0.4231284558773041, -0.23102721571922302, 0.12108180671930313, -0.01394608709961176, -0.19707514345645905, -0.43481552600860596, 0.2606196701526642, 0.2651960253715515, 0.05793607234954834, 0.2684318423271179, -0.00012031396909151226, 0.00506402226164937, -0.04861590638756752, -0.11193017661571503, -0.41119199991226196, -0.16048483550548553, -0.1799219399690628, -0.11663398891687393, -0.0756472498178482, -0.32558438181877136, -0.17127731442451477, -0.20648342370986938, -0.0073194438591599464, -0.5275917053222656, -0.23696467280387878, 0.1300070732831955, 0.028252948075532913, 0.129878431558609, -0.22760502994060516, 0.18042463064193726, 0.06622999906539917, 0.1123860776424408, -0.09830349683761597, 0.042468976229429245, -0.0031260023824870586, 0.17069846391677856, 0.17617063224315643, 0.4569058120250702, -0.19838425517082214, 0.025181271135807037, 0.23056505620479584, 0.16588954627513885, -0.250334233045578, -0.13525688648223877, 0.04538382217288017, 0.5727469325065613, 0.48953357338905334, -0.5312577486038208, -0.8156601786613464, -0.5682111382484436, 0.546671450138092, -0.4145795404911041, 0.00947263278067112, 0.18754932284355164, 0.06129827722907066, 0.20658758282661438, -0.29481104016304016, -0.0639905110001564, -0.15351121127605438, -0.13515160977840424, -0.2159394919872284, 0.40901851654052734, 0.00579020194709301, 0.08306758850812912, 0.01868870109319687, -0.1347002238035202, 0.13504859805107117, -0.13826212286949158, -0.04748865216970444, 0.4597664177417755, -0.166514053940773, -0.3662479817867279, -0.1840958148241043, 0.084208644926548, 0.23714476823806763, 0.186298206448555, 0.2142309695482254, -0.11850835382938385, -0.3950497806072235, 0.22885234653949738, 0.4656935930252075, -0.1114894300699234, 0.2576126754283905, 0.25150278210639954, 0.4025675356388092, -0.15630613267421722, -0.10253813117742538, -0.05109705403447151, -0.3554549217224121, 0.19819268584251404, 0.30897989869117737, 0.007220458704978228, 0.013051318936049938, -0.2379135936498642, -0.34610089659690857, 0.05407547205686569, -0.2671501338481903, 0.12011510133743286, 0.06623400002717972, 0.10982659459114075, 0.15512409806251526, 0.13067375123500824, 0.004376402124762535, 0.08551457524299622, -0.09754787385463715, -0.5176509618759155, 0.08808425813913345, -0.037777990102767944, 0.0948990136384964, 0.019528789445757866, 0.11884757876396179, 0.12529046833515167, 0.2857358157634735, -0.012796776369214058, 0.007733575068414211, -0.07526325434446335, 0.19773690402507782, -0.14799188077449799, 0.10008079558610916, 0.10786454379558563, 0.13979104161262512, 0.260516881942749, -0.09571323543787003, -0.5286993384361267, -0.09421735256910324, 0.20753167569637299, -0.0390457808971405, 0.011888519860804081, -0.1286030411720276, 0.022501258179545403, -0.4288027584552765, -0.21672454476356506, -0.03753137215971947, 0.04273272678256035, -0.024934381246566772, -0.04784978926181793, 0.14551834762096405, -0.20703041553497314, 0.1521822214126587, -0.17658862471580505, 0.17796240746974945, 0.39383575320243835, -0.5988764762878418, -0.3255687952041626, -0.010793103836476803, -0.06817054003477097, -0.292135626077652, -0.023586878553032875, -0.021993080154061317, 0.18141740560531616, -0.1385185420513153, -0.05776911973953247, 0.11283715814352036, -0.4254542887210846, -0.2444218546152115, 0.032656773924827576, 0.017004378139972687, 0.027567189186811447, 0.12155928462743759, 0.4517727494239807, -0.150406613945961, 0.021428806707262993, -0.056030210107564926, 0.04555191472172737, -0.05172084644436836, -0.3628424108028412, -0.001908650971017778, -0.16361741721630096, 0.026848547160625458, 0.13029640913009644, 0.0897681713104248, 0.21372434496879578, 0.09895838052034378, 0.24636699259281158, 0.011097402311861515, -0.38540536165237427, 0.17423832416534424, 0.361204594373703, 0.30092883110046387, 0.07717998325824738, 0.08266512304544449, -0.25926145911216736, -0.5924979448318481, 0.35756826400756836, -0.3484356999397278, 0.15436922013759613, 0.07911846786737442, -0.5093023180961609, 0.166078120470047, -0.19756980240345, -0.20768338441848755, -0.04918760806322098, -0.030853137373924255, -0.05166951194405556, -0.0010147346183657646, -0.013430043123662472, -0.48052069544792175, -0.22395926713943481, -0.06846346706151962, 0.18670684099197388, -0.2691114544868469, -0.11771237850189209, 0.44225141406059265, -0.015584494918584824, -0.2933371663093567, 0.3634031414985657, 0.07495877891778946, -0.047597192227840424, 0.24787329137325287, 0.1806419938802719, 0.07927791774272919, -0.015623132698237896, 0.10707815736532211, 0.28687241673469543, 0.02418598346412182, 0.1035674437880516, -0.10186205059289932, 0.006880511064082384, 0.07406899333000183, -0.04788178950548172, -0.37048476934432983, 0.7585386633872986, -0.014359346590936184, 0.24238188564777374, 0.06921500712633133, -0.036073729395866394, 0.2637820243835449, -0.10884624719619751, 0.0059202685952186584, -0.3193672299385071, -0.15114542841911316, -0.09762302041053772, 0.25143298506736755, 0.26002055406570435, -0.4639052748680115, 0.07237128168344498, 0.19717775285243988, -0.03416457399725914, 0.19322021305561066, -0.24167685210704803, -0.4811052978038788, 0.423358678817749, 0.05346960946917534, 0.2950209677219391, 0.20300808548927307, 0.22683988511562347, 0.15597614645957947, 0.08881470561027527, 0.15867243707180023, -0.020764393731951714, 0.22150248289108276, 0.06502056866884232, 0.16061507165431976, 0.2593626081943512, -0.07051030546426773, -0.20326311886310577, 0.02458937279880047, -0.08984381705522537, 0.12402745336294174, 0.13066202402114868, -0.30019238591194153, 0.04327978193759918, -0.42246755957603455, -0.29374033212661743, -0.2737027704715729, 0.14525717496871948, -0.31713107228279114, 0.0007474746671505272, 0.14564087986946106, 0.14954614639282227, -0.078178770840168, 0.03619358316063881, -0.2981952428817749, 0.29716983437538147, -0.15572364628314972, -0.2295415848493576, 0.1275843232870102, -0.17767591774463654, -0.15741291642189026, 0.010998879559338093, 0.09593337774276733, -0.2238839864730835, 0.2040948122739792, 0.12711374461650848, -0.17500916123390198, -0.08771702647209167, -0.09407761693000793, 0.13978208601474762, 0.1698424518108368, 0.4188258945941925, 0.3386100232601166, -0.23515142500400543, -0.013696691021323204, 0.45739445090293884, 0.16092559695243835, 0.16494904458522797, 0.026714390143752098, -0.27068397402763367, -0.06515366584062576, 0.40006786584854126, -0.15249505639076233, -0.2732070982456207, -0.0821760967373848, -0.10397952049970627, 0.16004465520381927, 0.10930727422237396, 0.14936815202236176, 0.10686813294887543, -0.3497605621814728, 0.1359652578830719, 0.08972085267305374, -0.2319132387638092, 0.24571198225021362, -0.38744056224823, 0.45120134949684143, -0.12772773206233978, 0.08416242897510529, 0.2434755265712738, -0.10371222347021103, 0.14099830389022827, 0.11124242097139359, -0.15579630434513092, 0.053410258144140244, 0.45831748843193054, -0.21541248261928558, 0.1566190868616104, -0.08383338153362274, 0.018586058169603348, 0.256011039018631, 0.13519254326820374, -0.26044097542762756, 0.08819893002510071, 0.11302036792039871, -0.30009958148002625, 0.016252346336841583, 0.23248839378356934, -0.2371094971895218, 0.3170672655105591, 0.2986520528793335, 0.29560959339141846, -0.05841166526079178, 0.03487666696310043, -0.12118503451347351, 0.3143196702003479, 0.32018548250198364, 0.09341453015804291, -0.19460614025592804, 0.2961842715740204, -0.11297494918107986, 0.35180577635765076, 0.1224239245057106, 0.19343134760856628, -0.08926636725664139, 0.22570091485977173, -0.3296515941619873, -0.13330131769180298, -0.16140656173229218, -0.09046483784914017, 0.08846273273229599, -0.009232806973159313, 0.18539413809776306, -0.12363281846046448, -0.14744365215301514, -0.0547950454056263, -0.02283881977200508, 0.319075345993042, 0.09619667381048203, -0.5007607340812683, -0.36444905400276184, 0.0005033446359448135, 0.18054962158203125, 0.08822177350521088, 0.17232418060302734, 0.11418665200471878, 0.1356213390827179, 0.24447330832481384, 0.2311142385005951, 0.3968504071235657, -0.8019367456436157, 0.04407732933759689, 0.3882574737071991, 0.062343988567590714, -0.12986449897289276, 0.16887228190898895, -0.3431435823440552, 0.057609908282756805, -0.08606673777103424, 0.34409135580062866, -0.28485122323036194, -0.07747583836317062, 0.2539089322090149, 0.11061431467533112, -0.39143702387809753, -0.24144423007965088, -0.0032640877179801464, -0.008606049232184887, -0.09261077642440796, -0.07965703308582306, -0.10775547474622726, 0.22462865710258484, -0.21439768373966217, -0.03255646675825119, -0.4636358618736267, 0.3866446912288666, 0.3230827748775482, 0.057385846972465515, 0.0829203650355339, -0.09893276542425156, 0.24883094429969788, 0.4137304425239563, 0.2953953742980957, 0.5238578915596008, 0.5176033973693848, -0.1507747322320938, -0.328454852104187, -0.22574593126773834, -0.050210289657115936, 0.4424324035644531, -0.09076347202062607, 0.14964979887008667, 0.23192152380943298, 0.10238490253686905, -0.1536356508731842, -0.09592393040657043, -0.10067129135131836, 0.04347042739391327, -0.09506214410066605, -0.4350958466529846, -0.5098009705543518, 0.3801499009132385, 0.13622508943080902, -0.05670526623725891, 0.28981131315231323, 0.2649102210998535, -0.42618635296821594, 0.027488011866807938, 0.31928959488868713, 0.7659416794776917, -0.12368620187044144, 0.00048043683636933565, -0.21366286277770996, 0.016463831067085266, 0.8572258353233337, -0.1948137730360031, 0.13718970119953156, -0.5271179676055908, 0.12725035846233368, -0.08300313353538513, 0.05841284990310669, 0.27895650267601013, 0.6903210282325745, 0.3886294662952423, 0.36880815029144287, -0.122785784304142, 0.10995521396398544, -0.07249775528907776, -0.012737681157886982, -0.027643032371997833, -0.29114627838134766, -0.03177697956562042, -0.054518092423677444, 0.028933871537446976, 0.07180329412221909, -0.19770154356956482, -0.02074049413204193, 0.03869018703699112, 0.19725289940834045, 0.13418413698673248, -0.18537777662277222, -0.21276266872882843, -0.23640073835849762, -0.09990808367729187, -0.24124474823474884, 0.007027055602520704, 0.5078381896018982, 0.4107722043991089, 0.23004050552845, -0.10232531279325485, 0.1562463641166687, -0.03848566487431526, 0.2010704129934311, 0.08045350760221481, 0.18423081934452057, 0.4358702600002289, 0.19543905556201935, -0.2531304955482483, -0.010719643905758858, 0.04840806871652603, 0.13018979132175446, 0.2571738362312317, -0.19828158617019653, 0.22116126120090485, -0.048437733203172684, 0.19678322970867157, -0.2618727385997772, 0.21731947362422943, -0.19286130368709564, 0.003255210816860199, 0.1539718061685562, -0.24096179008483887, 0.08613497763872147, -0.24228081107139587, -0.20541176199913025, -0.11476358026266098, 0.38115614652633667, 0.22639024257659912, 0.07088635116815567, 0.2734777331352234, -0.0664195865392685, -0.09725148230791092, -0.1872231662273407, 0.4704650938510895, 0.2158827930688858, -0.26480141282081604, 0.36447441577911377, 0.5038284659385681, 0.13767141103744507, -0.02856362797319889, -0.0027729328721761703, -0.19757089018821716, 0.054367899894714355, -0.2784397602081299, -0.2706345319747925, -0.1602124273777008, 0.08875709772109985, -0.023679377511143684, 0.19007861614227295, 0.18556882441043854, -0.013427459634840488, -0.13257569074630737, -0.2978616952896118, -0.16173584759235382, -0.05990704894065857, -0.41927284002304077, 0.09813153743743896, 0.20576231181621552, 0.6343888640403748, -0.02627173811197281, 0.001922457478940487, 0.012562510557472706, -0.038064662367105484, 0.20531035959720612, -0.03357377648353577, -0.33604535460472107, 0.21074537932872772, 0.2821725904941559, 0.1085626408457756, 0.3158656358718872, -0.2067912071943283, -0.15487362444400787, -0.3689013123512268, 0.24815323948860168, 0.24958206713199615, 0.13858197629451752, 0.4728966951370239, -0.1120225116610527, 0.22983784973621368, -0.6494514346122742, 0.1717786341905594, 0.14083215594291687, -0.0035498193465173244, 0.10426324605941772, 0.26186636090278625, 0.2079252451658249, 0.15740425884723663, 0.03634161129593849, -0.017238546162843704, 0.03673696145415306, -0.11508792638778687, 0.2508655786514282, -0.41414448618888855, 0.23393738269805908, 0.32802000641822815, 0.393759161233902, -0.05502098426222801, -0.10325371474027634, 0.04858297109603882, 0.5089660882949829, 0.05081384629011154, -0.36740240454673767, -0.1784176081418991, 0.2600318193435669, -0.1713801622390747, 0.23197050392627716, 0.5777537822723389, 0.23524045944213867, 0.18417181074619293, -0.2669294476509094, -0.24250878393650055, 0.1080288365483284, -0.18195897340774536, 0.21891802549362183, 0.5804855227470398, 0.059546444565057755, 0.01420098077505827, 0.15375962853431702, 0.20755672454833984, 0.3028896152973175, 0.662052571773529, 0.07445007562637329, 0.5605961084365845, 0.11121691018342972, -0.23775658011436462, 0.014270748011767864, -0.46764659881591797, 0.10253459215164185, 0.013336055912077427, 0.19292891025543213, 0.29179561138153076, -0.20086129009723663, 0.040088240057229996, -0.5066404938697815, -0.11073105037212372, 0.08421982824802399, 0.03719484061002731, -0.22960218787193298, -0.139045849442482, -0.412496954202652, -0.11785250157117844, 0.10286667197942734, 0.05360031872987747, -0.03898690640926361, -0.39786645770072937, -0.21438506245613098, -0.15252728760242462, 0.0840248093008995, -0.4460497498512268, 0.1257648766040802, 0.24236086010932922, 0.3388943672180176, -0.2475621998310089, -0.14684775471687317, 0.04466721788048744, 0.16136077046394348, 0.33502352237701416, 0.3214455544948578, -0.16341055929660797, 0.06590507179498672, 0.09081090986728668, -0.02730429917573929, -0.34063076972961426, 0.006545974873006344, -0.09651687741279602, 0.005317602306604385, -0.2625388503074646, -0.02565736509859562, 0.2166793793439865, -0.060871466994285583, -0.026612503454089165, -0.26950666308403015, 0.3386755883693695, 0.050965312868356705, -0.3194707930088043, 0.32659342885017395, -0.08152236044406891, -0.3562275171279907, -0.1618674099445343, -0.03436743840575218, -0.03268356993794441, -0.1692184954881668, 0.24058252573013306, 0.11303551495075226, 0.06355932354927063, 0.17488816380500793, 0.0292497705668211, -0.043884288519620895, 0.15956085920333862, -0.0691293403506279, -0.10206051915884018, -0.0972222089767456, 0.18644049763679504, -0.7694787383079529, 0.07225941866636276, -0.04062323272228241, -0.23585999011993408, -0.05145988240838051, 0.04808143153786659, -0.07592614740133286, -0.172505721449852, 0.03122950904071331, 0.1307888925075531, 0.3904407024383545, 0.455370157957077, -0.19306738674640656, -0.44102227687835693, -0.22983969748020172, -0.12800176441669464, -0.12298163771629333, -0.4427228271961212, -0.12424860894680023, -0.10683503746986389, -0.2093498855829239, 0.12406818568706512, 0.20936033129692078, 0.11918078362941742, -0.03327808156609535, 0.38787803053855896, 0.07908433675765991, 0.4218618869781494, 0.1751772165298462, 0.03342832252383232, -0.041824132204055786, 0.10801974684000015, -0.3931537866592407, 0.19977477192878723, 0.05572028458118439, 0.1888757199048996, -0.302755206823349, -0.19665664434432983, -0.19703853130340576, -0.0015008841874077916, -0.11536388844251633, 0.12050941586494446, -0.4037131667137146, 0.17163756489753723, -0.5385057330131531, 0.23501485586166382, 0.23443764448165894, 0.008413424715399742, -0.0264048520475626, 0.05647404119372368, -0.3050249516963959, -0.10135897248983383, 0.3029194474220276, -0.44553259015083313, -0.024037018418312073, -0.11989612132310867, 0.473829448223114, 0.3564073145389557, -0.20600157976150513, -0.5122575163841248, 0.1980583220720291, 0.6573615074157715, 0.07193568348884583, 0.07625867426395416, -0.17057958245277405, -0.30978551506996155, -0.08850767463445663, -0.1510896235704422, -0.2408013790845871, 0.024432562291622162, 0.010371352545917034, 0.2113199383020401, -0.13594722747802734 ]
https://github.com/huggingface/datasets/issues/2548
Field order issue in loading json
Hi @luyug, thanks for reporting. The good news is that we fixed this issue only 9 days ago: #2507. The patch is already in the master branch of our repository and it will be included in our next `datasets` release version 1.9.0. Feel free to reopen the issue if the problem persists.
## Describe the bug The `load_dataset` function expects columns in alphabetical order when loading json files. Similar bug was previously reported for csv in #623 and fixed in #684. ## Steps to reproduce the bug For a json file `j.json`, ``` {"c":321, "a": 1, "b": 2} ``` Running the following, ``` f= datasets.Features({'a': Value('int32'), 'b': Value('int32'), 'c': Value('int32')}) json_data = datasets.load_dataset('json', data_files='j.json', features=f) ``` ## Expected results A successful load. ## Actual results ``` File "pyarrow/table.pxi", line 1409, in pyarrow.lib.Table.cast ValueError: Target schema's field names are not matching the table's field names: ['c', 'a', 'b'], ['a', 'b', 'c'] ``` ## Environment info - `datasets` version: 1.8.0 - Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.10 - Python version: 3.8.8 - PyArrow version: 3.0.0
52
Field order issue in loading json ## Describe the bug The `load_dataset` function expects columns in alphabetical order when loading json files. Similar bug was previously reported for csv in #623 and fixed in #684. ## Steps to reproduce the bug For a json file `j.json`, ``` {"c":321, "a": 1, "b": 2} ``` Running the following, ``` f= datasets.Features({'a': Value('int32'), 'b': Value('int32'), 'c': Value('int32')}) json_data = datasets.load_dataset('json', data_files='j.json', features=f) ``` ## Expected results A successful load. ## Actual results ``` File "pyarrow/table.pxi", line 1409, in pyarrow.lib.Table.cast ValueError: Target schema's field names are not matching the table's field names: ['c', 'a', 'b'], ['a', 'b', 'c'] ``` ## Environment info - `datasets` version: 1.8.0 - Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.10 - Python version: 3.8.8 - PyArrow version: 3.0.0 Hi @luyug, thanks for reporting. The good news is that we fixed this issue only 9 days ago: #2507. The patch is already in the master branch of our repository and it will be included in our next `datasets` release version 1.9.0. Feel free to reopen the issue if the problem persists.
[ 0.18250906467437744, 0.23169340193271637, -0.015927579253911972, 0.21059878170490265, 0.32902008295059204, -0.06300381571054459, 0.22351810336112976, 0.4288537800312042, 0.009034413844347, 0.022668354213237762, 0.07545371353626251, 0.6574709415435791, 0.3253486156463623, -0.012466421350836754, -0.02450983226299286, -0.10777074843645096, -0.0028558496851474047, 0.2404138445854187, -0.09283304214477539, 0.09579331427812576, -0.35949891805648804, 0.0710984468460083, -0.16953051090240479, 0.1843688189983368, 0.11274488270282745, 0.20500461757183075, 0.14214928448200226, 0.16889311373233795, -0.19744957983493805, -0.4280341565608978, -0.11631610244512558, 0.1603666990995407, 0.04091237112879753, 0.15382130444049835, -0.00011294232535874471, -0.09300313889980316, 0.2057090848684311, 0.04409612715244293, -0.1617201715707779, -0.45246821641921997, -0.18718065321445465, -0.24865613877773285, 0.15464797616004944, -0.2271185964345932, -0.03967299684882164, -0.22398127615451813, -0.06031116098165512, 0.055517565459012985, 0.17813198268413544, 0.09546707570552826, 0.19136522710323334, 0.12153813987970352, 0.19310323894023895, 0.18931475281715393, 0.5152662992477417, -0.0020206747576594353, -0.11110909283161163, 0.27563178539276123, 0.18469993770122528, -0.00942480843514204, -0.07582537829875946, 0.03248840570449829, -0.18140168488025665, 0.03186854347586632, 0.15601736307144165, 0.14833825826644897, -0.042527198791503906, 0.08741318434476852, -0.09946783632040024, 0.04869530722498894, 0.5981541275978088, -0.4596163034439087, -0.29342567920684814, -0.2007399946451187, 0.1998678743839264, -0.2957477569580078, 0.507579505443573, 0.15621662139892578, 0.22865884006023407, 0.05136673152446747, 0.01421154011040926, 0.2856675386428833, -0.18504425883293152, 0.10232523083686829, -0.15684328973293304, 0.13294562697410583, 0.05154142901301384, -0.02195095643401146, -0.13763107359409332, -0.2529476284980774, 0.3639650046825409, -0.22733181715011597, -0.19008928537368774, 0.13497258722782135, -0.34934309124946594, 0.05039714276790619, 0.13582009077072144, -0.07097002118825912, 0.15239332616329193, 0.11121780425310135, -0.051666587591171265, 0.01568221114575863, 0.02225610241293907, 0.17301826179027557, 0.2025146484375, 0.17984773218631744, 0.04751743748784065, -0.07301513850688934, 0.19679401814937592, 0.07299705594778061, -0.0629584789276123, -0.09405503422021866, -0.0123665239661932, -0.19510160386562347, -0.010318472050130367, 0.04089599847793579, 0.060914915055036545, -0.0840102955698967, -0.29185572266578674, 0.0429290235042572, -0.12454752624034882, -0.19080087542533875, -0.0035290566738694906, 0.31327158212661743, -0.07519412785768509, 0.09490196406841278, 0.09292905032634735, 0.23631078004837036, 0.013991642743349075, -0.00710070226341486, -0.06573989987373352, -0.148969829082489, -0.02293683961033821, 0.11514855176210403, 0.2163838893175125, 0.11221388727426529, 0.13066402077674866, 0.35090988874435425, 0.07153580337762833, -0.05436689406633377, -0.047882694751024246, -0.1265520602464676, -0.13244958221912384, 0.4157492220401764, 0.054799534380435944, 0.1828192174434662, -0.08143901824951172, -0.17506693303585052, -0.26668083667755127, 0.374187171459198, -0.49622035026550293, -0.10935887694358826, -0.05799767002463341, 0.2085764855146408, -0.17135873436927795, -0.12544983625411987, -0.6543218493461609, -0.14213527739048004, 0.029426125809550285, -0.2914304733276367, -0.06719373166561127, -0.14493456482887268, 0.17423710227012634, -0.24617627263069153, -0.13340206444263458, 0.03124185837805271, -0.5555416941642761, 0.08913850039243698, 0.09023719280958176, 0.05204981192946434, -0.0067551531828939915, -0.04320288822054863, -0.13298122584819794, 0.11145506799221039, -0.07285571098327637, 0.44256484508514404, 0.08269082754850388, -0.20958609879016876, -0.3545520305633545, 0.1003122329711914, -0.1832900494337082, 0.15646150708198547, 0.08736828714609146, 0.008004376664757729, 0.14736247062683105, 0.059487469494342804, 0.08623990416526794, 0.3296462297439575, 0.12091370671987534, 0.3840727210044861, -0.14933046698570251, -0.11447212845087051, 0.17720383405685425, 0.27489444613456726, -0.3706636130809784, 0.05611179769039154, 0.10174179822206497, -0.36836591362953186, 0.1644265055656433, -0.23298989236354828, -0.2976112961769104, 0.26510047912597656, 0.13851965963840485, 0.10466936230659485, 0.2926070988178253, 0.024906331673264503, -0.4560879170894623, 0.26088064908981323, 0.023952893912792206, -0.03983156010508537, -0.541038453578949, -0.11113062500953674, -0.022122325375676155, 0.03735461086034775, -0.21534490585327148, 0.4330095648765564, 0.10824044048786163, 0.0037273624911904335, -0.20648300647735596, -0.0993744507431984, -0.00009949981904355809, 0.015966586768627167, -0.16618239879608154, 0.04724893718957901, -0.3866337239742279, 0.4544113278388977, -0.2604217827320099, -0.14140291512012482, 0.1588270515203476, 0.03246638923883438, 0.23029911518096924, -0.26000863313674927, -0.14514076709747314, 0.2956561744213104, 0.2853766977787018, 0.06752441078424454, -0.24297088384628296, 0.05124359950423241, -0.01498554926365614, 0.051747873425483704, -0.14206591248512268, 0.1324092447757721, 0.01440628245472908, -0.009370499290525913, -0.08598999679088593, 0.7995304465293884, -0.023749256506562233, 0.2128821313381195, 0.003328565042465925, -0.3676093816757202, 0.3820781111717224, 0.03520134091377258, 0.01644282415509224, -0.06941591203212738, 0.30179646611213684, 0.5649794936180115, -0.11086536943912506, 0.25748875737190247, -0.36076870560646057, 0.1042414978146553, 0.9411555528640747, -0.1253245621919632, -0.10560546815395355, 0.07312963157892227, 0.2090289443731308, 0.016260232776403427, 0.09639666229486465, -0.16287584602832794, 0.37604397535324097, 0.1892888844013214, -0.6180870532989502, -0.06494976580142975, 0.011362486518919468, -0.15253934264183044, 0.07342259585857391, -0.024407241493463516, 0.2099509984254837, 0.3989824652671814, 0.42254307866096497, 0.09752163290977478, -0.38938337564468384, -0.17331641912460327, 0.10601483285427094, 0.08761025965213776, -0.6017729640007019, 0.06339653581380844, -0.36231154203414917, 0.0237796101719141, -0.11683560162782669, -0.2730720341205597, -0.20274263620376587, -0.007555107120424509, 0.02382718399167061, 0.2653528153896332, -0.18599078059196472, 0.20711030066013336, 0.1384097933769226, 0.038913168013095856, 0.07045594602823257, -0.3349533677101135, -0.514276385307312, -0.07790510356426239, -0.17774604260921478, 0.01323227770626545, 0.10841409862041473, 0.05679856240749359, 0.01616792567074299, -0.1116783618927002, -0.058040983974933624, 0.062461912631988525, -0.5082749724388123, -0.020823253318667412, -0.28017187118530273, 0.05986180156469345, 0.04909277707338333, 0.21726350486278534, 0.0719868466258049, -0.3592020273208618, 0.28286004066467285, 0.16797439754009247, -0.42801299691200256, 0.5928491950035095, -0.17546014487743378, -0.21203060448169708, -0.14376267790794373, -0.40866318345069885, 0.13446076214313507, -0.18354450166225433, 0.2575661242008209, 0.28477779030799866, 0.17525620758533478, -0.10987840592861176, -0.10370006412267685, -0.33403080701828003, -0.0910990983247757, 0.02937769703567028, -0.03264622017741203, -0.06538192927837372, 0.3305378258228302, -0.1414419710636139, -0.2782588005065918, -0.03051893599331379, -0.05791853368282318, -0.31052958965301514, 0.05354013293981552, -0.30148234963417053, -0.08572285622358322, -0.09332557022571564, 0.411336749792099, 0.061827220022678375, -0.17180569469928741, 0.16759848594665527, 0.1254289150238037, -0.02241108939051628, -0.0237897876650095, -0.0857907384634018, -0.07173218578100204, 0.3714413642883301, 0.11087137460708618, -0.14004233479499817, 0.6356087327003479, -0.08897315710783005, 0.2890287935733795, -0.2067595273256302, 0.06432432681322098, 0.22384069859981537, -0.14829431474208832, -0.08798178285360336, -0.20371398329734802, 0.16536515951156616, -0.05107713118195534, -0.08647153526544571, 0.2216321974992752, 0.26416686177253723, -0.026378076523542404, -0.05382203310728073, 0.1418454349040985, 0.27383846044540405, -0.45086461305618286, -0.07284355908632278, 0.15997157990932465, -0.0060576098039746284, -0.07554637640714645, 0.1250874251127243, 0.06175447255373001, -0.18851368129253387, -0.22364358603954315, 0.06741557270288467, -0.033434029668569565, -0.1557302325963974, -0.259505957365036, -0.396262526512146, -0.34874236583709717, 0.012231038883328438, 0.006135927047580481, 0.10842593014240265, 0.14936022460460663, 0.2657661736011505, 0.12754063308238983, 0.2514954209327698, -0.22384661436080933, 0.7247195243835449, 0.16592872142791748, 0.27412861585617065, 0.1798032820224762, 0.2624097764492035, -0.296665221452713, -0.1868922859430313, -0.1661119908094406, 0.02535567618906498, 0.010843370109796524, 0.5456569194793701, -0.450835257768631, -0.062419649213552475, 0.09055718034505844, 0.15795375406742096, -0.10829972475767136, -0.46634483337402344, -0.45407211780548096, -0.15359808504581451, -0.022328197956085205, -0.10137069225311279, -0.13076689839363098, 0.28077131509780884, -0.5067602396011353, -0.11199331283569336, 0.20801614224910736, -0.057281494140625, -0.1946267932653427, 0.2885279059410095, 0.297103613615036, -0.09225045889616013, 0.19501493871212006, 0.0013475398300215602, -0.03631537780165672, 0.2976648807525635, 0.4970463812351227, 0.1947045922279358, -0.5289745330810547, -0.11660080403089523, -0.2787717580795288, -0.058841802179813385, -0.02055802009999752, -0.1162029579281807, 0.1930958330631256, -0.2420474737882614, -0.07853243499994278, 0.016496067866683006, -0.34320732951164246, 0.6345767378807068, -0.20997029542922974, -0.1358884871006012, -0.3663291931152344, 0.6602267026901245, -0.12128681689500809, -0.05633019655942917, 0.19383694231510162, 0.356174498796463, -0.3036479353904724, 0.4781929552555084, 0.036437783390283585, 0.6812089681625366, -0.196567565202713, 0.08338393270969391, 0.6457630395889282, -0.2965189814567566, 0.2771168351173401, -0.5008105635643005, 0.2874607741832733, -0.7126541137695312, -0.28742921352386475, -0.06568486243486404, -0.1931162327528, 0.07274579256772995, 0.5663930177688599, 0.06608770787715912, 0.07327944040298462, -0.23452059924602509, 0.2931252717971802, 0.06992388516664505, 0.16525433957576752, 0.03770121932029724, -0.0289711095392704, -0.5482338070869446, 0.03735470771789551, -0.08109408617019653, -0.2535059154033661, -0.07669529318809509, 0.060959044843912125, -0.11178428679704666, -0.24369288980960846, 0.1308029443025589, 0.3869266211986542, 0.02261747047305107, 0.050802018493413925, 0.2855568528175354, 0.038533132523298264, 0.0888000950217247, 0.21661502122879028, -0.2158968448638916, -0.0013296621618792415, 0.023645559325814247, 0.27223077416419983, 0.35537904500961304, 0.25487786531448364, 0.09194590151309967, 0.10860640555620193, 0.061199966818094254, -0.021426815539598465, -0.1499883532524109, -0.10362710058689117, 0.0034808481577783823, -0.20051121711730957, -0.09099224954843521, 0.21890145540237427, -0.1750911921262741, -0.24359136819839478, -0.13042275607585907, -0.09962140768766403, 0.3487398326396942, -0.13987873494625092, 0.18517504632472992, -0.15177077054977417, 0.10838371515274048, 0.3658822178840637, -0.33834582567214966, -0.22809165716171265, -0.07795460522174835, 0.4607669711112976, 0.023323658853769302, 0.2834368348121643, 0.44996628165245056, 0.2891092598438263, -0.21895408630371094, -0.08518557995557785, -0.04004499316215515, 0.34671467542648315, -0.5800537467002869, -0.0313585065305233, 0.055474162101745605, 0.15871332585811615, 0.17335551977157593, 0.3075583577156067, -0.06804323196411133, -0.22462549805641174, 0.009390924125909805, -0.33480700850486755, 0.25954359769821167, 0.2816804051399231, 0.30852875113487244, -0.211473286151886, 0.3378102779388428, 0.22533714771270752, -0.2173423171043396, -0.07676810026168823, -0.2654394209384918, 0.047725025564432144, -0.019657842814922333, 0.20624692738056183, -0.0972459465265274, 0.15123669803142548, 0.0935845896601677, 0.0041225072927773, 0.30944475531578064, 0.013711253181099892, -0.004411745350807905, -0.2657623589038849, -0.05693293362855911, 0.007886671461164951, 0.08334007859230042, 0.17856502532958984, -0.25872886180877686, -0.41495281457901, -0.1024872437119484, -0.06851758062839508, 0.04445461556315422, 0.10586411505937576, 0.09968683123588562, 0.17533336579799652, 0.23320497572422028, 0.14077521860599518, -0.06027398630976677, 0.10249842703342438, -0.4341540038585663, 0.09013384580612183, 0.16161443293094635, 0.302760511636734, -0.3599027097225189, 0.2037089616060257, -0.45629560947418213, 0.0721854493021965, -0.13249346613883972, 0.23977027833461761, 0.5103181600570679, -0.5786808729171753, 0.15364070236682892, -0.03459980711340904, 0.4610271751880646, 0.36797788739204407, -0.30903273820877075, -0.36032751202583313, -0.010807301849126816, 0.2446335405111313, -0.246585413813591, -0.49689778685569763, -0.03146456927061081, 0.057702403515577316, -0.18926332890987396, -0.16501691937446594, 0.11618400365114212, 0.0026957704685628414, 0.01290119532495737, -0.019873175770044327, 0.44211846590042114, 0.09503452479839325, 0.03477014601230621, 0.4580203592777252, 0.03375495225191116, 0.12671418488025665, 0.3582773506641388, 0.25886863470077515, -0.10640472918748856, 0.19604849815368652, 0.32314711809158325, -0.10486388951539993, -0.09397134184837341, 0.003925147466361523, -0.16411155462265015, -0.4030665159225464, 0.06112324446439743, 0.14738385379314423, 0.08297992497682571, -0.061687976121902466, 0.4316120743751526, 0.07889025658369064, 0.15446016192436218, -0.043228793889284134, -0.25163426995277405, -0.04083852842450142, 0.013743003830313683, 0.08291901648044586, -0.1507076472043991, -0.1326124519109726, -0.018914978951215744, -0.003186103655025363, -0.36239340901374817, 0.09428989142179489, 0.07172353565692902, 0.1786763221025467, -0.07354456186294556, -0.6868674755096436, 0.4297246038913727, -0.0577261857688427, 0.32085084915161133, -0.02603752538561821, 0.37364059686660767, -0.03923701122403145, -0.16354519128799438, 0.20027175545692444, -0.29967421293258667, 0.1698542684316635, 0.3468167185783386, 0.1554800420999527, -0.3312588334083557, -0.27919241786003113, -0.12214045226573944, 0.05155645310878754, 0.27277544140815735, -0.09425514936447144, 0.11967404931783676, 0.12579628825187683, 0.22504596412181854, -0.18041275441646576, -0.0053907837718725204, 0.46817895770072937, 0.199090838432312, 0.046355485916137695, 0.1772395223379135, -0.1658029705286026, -0.4063180088996887, 0.09086742997169495, -0.20962221920490265, -0.024937782436609268, -0.12110133469104767, 0.004188325256109238, 0.3609236478805542, -0.0596134290099144, -0.15712745487689972, 0.10158304125070572, 0.13960525393486023, 0.2515597641468048, 0.16188938915729523, -0.013494785875082016, -0.20319673418998718, -0.11239954084157944, -0.3537179231643677, 0.27089688181877136, -0.04091077297925949, -0.023356417194008827, 0.5161076188087463, 0.14034347236156464, 0.05345718190073967, -0.16253913938999176, 0.008347287774085999, 0.021483268588781357, -0.21098648011684418, 0.29040229320526123, -0.29729124903678894, -0.1069241538643837, -0.058204445987939835, 0.06542894244194031, -0.4646751582622528, -0.13394449651241302, 0.11106459051370621, 0.0387885682284832, 0.09878618270158768, -0.4376762807369232, 0.12622007727622986, 0.10700362920761108, -0.03427957743406296, 0.28317829966545105, -0.12992826104164124, 0.32023653388023376, -0.030863139778375626, 0.0992104634642601, 0.020931079983711243, -0.33931487798690796, -0.191426083445549, 0.37112319469451904, 0.0069418721832334995, 0.22369961440563202, 0.2191455215215683, 0.07191801071166992, -0.23906302452087402, 0.016030162572860718, -0.3385501205921173, -0.12055385112762451, -0.2732466161251068, 0.13037867844104767, -0.007932148873806, 0.049231234937906265, -0.3172142207622528, -0.041233569383621216, 0.15463761985301971, 0.19628827273845673, -0.08770821243524551, -0.27790918946266174, 0.1896759420633316, -0.13865645229816437, -0.12064316123723984, 0.26424914598464966, 0.23815275728702545, -0.23842452466487885, 0.013423657976090908, -0.22465470433235168, 0.0950939729809761, 0.3887331485748291, -0.07728058844804764, -0.12939061224460602, 0.2517741620540619, 0.112235426902771, 0.11225888133049011, -0.1991974115371704, 0.15742212533950806, 0.19002915918827057, -0.22493644058704376, -0.1681823879480362, -0.07264553010463715 ]
https://github.com/huggingface/datasets/issues/2547
Dataset load_from_disk is too slow
Hi ! It looks like an issue with the virtual disk you are using. We load datasets using memory mapping. In general it makes it possible to load very big files instantaneously since it doesn't have to read the file (it just assigns virtual memory to the file on disk). However there happens to be issues with virtual disks (for example on spot instances), for which memory mapping does a pass over the entire file, and this takes a while. We are discussing about this issue here: #2252 Memory mapping is something handled by the OS so we can't do much about it, though we're still trying to figure out what's causing this behavior exactly to see what we can do.
@lhoestq ## Describe the bug It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example). ## Steps to reproduce the bug Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset. ## Expected results I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Ubuntu 18 - Python version: 3.8 I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
121
Dataset load_from_disk is too slow @lhoestq ## Describe the bug It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example). ## Steps to reproduce the bug Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset. ## Expected results I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Ubuntu 18 - Python version: 3.8 I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. Hi ! It looks like an issue with the virtual disk you are using. We load datasets using memory mapping. In general it makes it possible to load very big files instantaneously since it doesn't have to read the file (it just assigns virtual memory to the file on disk). However there happens to be issues with virtual disks (for example on spot instances), for which memory mapping does a pass over the entire file, and this takes a while. We are discussing about this issue here: #2252 Memory mapping is something handled by the OS so we can't do much about it, though we're still trying to figure out what's causing this behavior exactly to see what we can do.
[ -0.4744631052017212, -0.3652116656303406, -0.09103222191333771, 0.5078070759773254, 0.2949647307395935, 0.0777808204293251, 0.08729571104049683, 0.2941162586212158, 0.5636070966720581, 0.11371616274118423, 0.1030271127820015, 0.31005117297172546, -0.03649459034204483, -0.13101865351200104, -0.05102987214922905, 0.012053195387125015, 0.2169390469789505, 0.03406570106744766, 0.10168413072824478, -0.16221418976783752, -0.16796404123306274, 0.19429367780685425, -0.13975323736667633, -0.2468278557062149, -0.2608514726161957, -0.16752201318740845, 0.03609027341008186, 0.13267476856708527, 0.014111349359154701, -0.23193711042404175, 0.08277611434459686, -0.023467116057872772, 0.17471927404403687, 0.475650817155838, -0.00010661341366358101, -0.0308670736849308, 0.10141849517822266, 0.0678357183933258, -0.39806482195854187, -0.05916156247258186, 0.23691342771053314, -0.29434168338775635, 0.07696593552827835, -0.19942311942577362, -0.08507230877876282, -0.08455370366573334, -0.10453833639621735, -0.48060545325279236, 0.30542507767677307, 0.09953701496124268, 0.24208268523216248, 0.2846263647079468, -0.29732316732406616, -0.0019262293353676796, -0.042848002165555954, 0.05776166170835495, -0.22703438997268677, 0.2517683207988739, 0.47870245575904846, 0.12495561689138412, -0.13826467096805573, 0.30566853284835815, -0.0878099575638771, 0.16498294472694397, 0.4531145393848419, 0.0637822151184082, 0.08095727860927582, -0.20990341901779175, -0.01635989174246788, 0.16674211621284485, 0.4594857692718506, 0.0003165655361954123, -0.26777204871177673, -0.27580341696739197, 0.08704453706741333, -0.23030497133731842, 0.3020727336406708, 0.2804105281829834, -0.17326849699020386, 0.14562365412712097, -0.07252611219882965, -0.10919240862131119, -0.034735679626464844, 0.12060226500034332, 0.26018381118774414, 0.022048931568861008, -0.10330784320831299, 0.041921619325876236, 0.39988625049591064, 0.10310613363981247, 0.1836705356836319, -0.2756839394569397, 0.18134166300296783, 0.40962234139442444, -0.481718510389328, 0.022581106051802635, -0.04202839732170105, 0.17976456880569458, -0.05536937713623047, 0.16616536676883698, 0.2575043737888336, 0.18785925209522247, -0.19306644797325134, 0.1321932077407837, 0.17260617017745972, 0.25416886806488037, -0.23104560375213623, 0.06640961766242981, 0.27791014313697815, 0.14570048451423645, -0.22816696763038635, -0.009542928077280521, -0.2658999264240265, -0.14003664255142212, 0.3268367648124695, -0.29108867049217224, -0.15716160833835602, -0.14174093306064606, -0.06254328042268753, 0.0716487318277359, 0.14597685635089874, -0.13329213857650757, 0.21466907858848572, 0.30024194717407227, -0.2892742455005646, 0.5329865217208862, 0.08123403787612915, -0.15940923988819122, -0.3561357259750366, -0.0713702067732811, -0.17985232174396515, 0.0125497505068779, -0.2574569582939148, 0.18223610520362854, 0.2045733630657196, -0.1747213453054428, 0.16896168887615204, 0.12717920541763306, 0.17878836393356323, -0.2528987228870392, 0.23860861361026764, -0.5147580504417419, -0.07751888781785965, 0.17646488547325134, -0.001288510742597282, 0.22294825315475464, 0.06695546954870224, 0.01018507033586502, -0.34265410900115967, 0.10367371141910553, -0.3803783655166626, -0.47631457448005676, -0.1604786217212677, 0.22963008284568787, 0.0005405346164479852, 0.06434490531682968, -0.5296047925949097, 0.06339862942695618, -0.035907648503780365, 0.056738924235105515, -0.2487534135580063, -0.0802190974354744, -0.32711049914360046, 0.004392807371914387, 0.3452151417732239, 0.31708455085754395, -0.4786156117916107, 0.10886736959218979, -0.2045884132385254, 0.11258511990308762, 0.3233201801776886, 0.6517829298973083, -0.3402390778064728, 0.2586211562156677, -0.20394304394721985, -0.024145109578967094, 0.15269915759563446, -0.20880185067653656, -0.3435870409011841, 0.6806861162185669, 0.004990503191947937, 0.0012143083149567246, 0.0986388772726059, 0.30050063133239746, 0.08096258342266083, -0.04573989659547806, 0.16332265734672546, 0.5188062191009521, 0.11974330991506577, 0.3266189992427826, -0.3972659409046173, -0.22586114704608917, 0.023335758596658707, 0.5041813254356384, -0.3286643326282501, -0.11504237353801727, -0.057232439517974854, 0.36905914545059204, 0.38177984952926636, -0.10688359290361404, -0.04213283956050873, 0.3159361481666565, 0.08266013860702515, 0.031459908932447433, 0.005727328360080719, -0.040259260684251785, -0.2135917991399765, 0.36909693479537964, 0.28483402729034424, 0.05232388153672218, 0.1105620414018631, -0.09593769162893295, -0.12573371827602386, -0.0045078895054757595, -0.29288244247436523, 0.1405545026063919, 0.025115514174103737, 0.035631392151117325, 0.05813639983534813, -0.12447421997785568, -0.228387713432312, 0.23447255790233612, -0.34923255443573, -0.1504373401403427, -0.25340625643730164, 0.0683860257267952, -0.006344804540276527, 0.08378148078918457, -0.05151919275522232, -0.07744307070970535, -0.022477878257632256, -0.012339241802692413, -0.2500486969947815, 0.3335139751434326, 0.14800244569778442, 0.4500730037689209, 0.1707654446363449, 0.01970466785132885, 0.15391600131988525, 0.15021024644374847, 0.2900162637233734, 0.029065579175949097, 0.354721337556839, -0.20860570669174194, -0.15816614031791687, 0.316048264503479, -0.008646039292216301, 0.3458162248134613, 0.1937662810087204, -0.2984400987625122, 0.3042434751987457, 0.12538973987102509, -0.02005418948829174, -0.076572485268116, 0.4769965410232544, 0.1933380514383316, 0.6596889495849609, 0.14807234704494476, -0.29603826999664307, -0.15037165582180023, 0.48990267515182495, 0.00652939360588789, -0.0681876540184021, 0.281535267829895, -0.01619471237063408, -0.2959461808204651, -0.023628471419215202, 0.1372418999671936, 0.43831169605255127, 0.21627388894557953, 0.020021650940179825, -0.009543601423501968, -0.02101660706102848, -0.18083402514457703, 0.25274816155433655, -0.0400845967233181, 0.5054354667663574, 0.10154273360967636, -0.050669021904468536, -0.010992160998284817, -0.4174704849720001, -0.25987130403518677, -0.003329715458676219, 0.16301321983337402, -0.14683520793914795, 0.20736584067344666, -0.09576977044343948, 0.12245260179042816, -0.3151165544986725, 0.2789248526096344, -0.03592574596405029, -0.07289581000804901, -0.18248850107192993, 0.26598668098449707, 0.10747911781072617, -0.001979137770831585, -0.08943866193294525, 0.22493015229701996, -0.058127451688051224, -0.28491294384002686, -0.2735421657562256, -0.06036744639277458, -0.3348502218723297, 0.010303650051355362, 0.32521548867225647, 0.0741829201579094, 0.3003815710544586, -0.08235444873571396, -0.21482126414775848, -0.1328994780778885, 0.05210820585489273, 0.01714469864964485, -0.016599424183368683, 0.26997697353363037, -0.12106771767139435, 0.19121333956718445, -0.05054568871855736, -0.09592687338590622, 0.20414771139621735, -0.2538374662399292, -0.03892606869339943, -0.010283305309712887, -0.07355528324842453, -0.003747849725186825, -0.020795457065105438, -0.44784173369407654, -0.3565232455730438, -0.32373473048210144, 0.029212234541773796, -0.09339887648820877, 0.1269901543855667, -0.13618333637714386, 0.10475718975067139, 0.06417932361364365, 0.19653040170669556, 0.14438655972480774, -0.2523113191127777, -0.5606963038444519, 0.3110785484313965, 0.02033209055662155, -0.2803844213485718, 0.026268357411026955, 0.21969839930534363, 0.23572088778018951, 0.03453825041651726, -0.6052535772323608, -0.0271210428327322, -0.3552592396736145, 0.021931318566203117, -0.34907782077789307, 0.03712092339992523, 0.06305982172489166, -0.08537720143795013, -0.07926525175571442, 0.15275590121746063, -0.16202779114246368, -0.06915155053138733, -0.07677201181650162, 0.07748338580131531, -0.19060586392879486, 0.26727932691574097, 0.04263664782047272, 0.5003495216369629, 0.14098845422267914, 0.10457208752632141, 0.3580860197544098, 0.16801007091999054, 0.11993668973445892, -0.37361353635787964, -0.13043075799942017, 0.015423482283949852, -0.31504032015800476, -0.37421372532844543, 0.21724933385849, 0.07678218930959702, -0.39543452858924866, -0.17458371818065643, -0.08634182810783386, -0.1705096960067749, -0.19273002445697784, 0.15448473393917084, -0.253951758146286, 0.16259831190109253, -0.04123292490839958, 0.13801197707653046, -0.06795696914196014, -0.09232666343450546, -0.033516958355903625, -0.03060019202530384, 0.09002503752708435, -0.13375034928321838, -0.37502196431159973, 0.09864196181297302, -0.4460468292236328, 0.14257493615150452, -0.27220606803894043, 0.18620391190052032, -0.015618139877915382, 0.015771929174661636, 0.23181377351284027, -0.07275761663913727, 0.7050458788871765, 0.10267965495586395, 0.19669094681739807, 0.026116957888007164, -0.2520487904548645, -0.40858250856399536, 0.01788315922021866, -0.10416088998317719, -0.06422266364097595, 0.008626976981759071, 0.5170798301696777, -0.14525312185287476, -0.23413541913032532, -0.20643512904644012, 0.42178818583488464, -0.18722844123840332, -0.32447612285614014, -0.23217575252056122, -0.2543638348579407, -0.3492271602153778, 0.16074427962303162, 0.06682654470205307, 0.3056792616844177, 0.10281536728143692, -0.027349893003702164, -0.00505112623795867, 0.20196948945522308, 0.21992498636245728, 0.026665998622775078, 0.2480991631746292, -0.026326583698391914, 0.4335159361362457, -0.005260117817670107, 0.06470263749361038, -0.0664951279759407, 0.5060542225837708, -0.16399356722831726, -0.25447046756744385, 0.054527558386325836, -0.07480290532112122, 0.16979968547821045, 0.4769684970378876, 0.042427245527505875, -0.06741193681955338, 0.26454615592956543, 0.23759707808494568, -0.37035512924194336, 0.0503731444478035, 0.31291505694389343, 0.1920323669910431, -0.13028043508529663, -0.6680113673210144, 0.38853099942207336, 0.2552739381790161, 0.044193342328071594, 0.11039648950099945, -0.22651557624340057, -0.12721863389015198, 0.5779409408569336, 0.20833896100521088, 0.9637522101402283, -0.13626864552497864, 0.25530803203582764, -0.02215726114809513, 0.18920858204364777, 0.15440094470977783, -0.4441033601760864, -0.040927704423666, -0.3033842146396637, -0.20108312368392944, 0.0773729532957077, -0.06695660948753357, 0.129873588681221, 0.41007763147354126, -0.016232943162322044, 0.3677227199077606, -0.02046339586377144, -0.33006927371025085, -0.31680619716644287, 0.5213737487792969, -0.3694131076335907, -0.6282690763473511, -0.6542038321495056, 0.16493655741214752, -0.12583385407924652, 0.06048715114593506, -0.027284521609544754, 0.2898995876312256, 0.13255943357944489, -0.15720994770526886, -0.16786286234855652, 0.10889016091823578, -0.1719561070203781, 0.1888808161020279, -0.3077005445957184, -0.20531879365444183, 0.05810988321900368, 0.17949078977108002, 0.022522954270243645, 0.18464478850364685, -0.037679273635149, 0.4627090096473694, -0.19275696575641632, 0.25388771295547485, 0.12080729007720947, -0.31024274230003357, 0.30443063378334045, -0.21510007977485657, -0.13873626291751862, -0.20263034105300903, -0.2663207948207855, -0.20666362345218658, 0.19573992490768433, 0.03614777326583862, 0.1257941722869873, 0.06848025321960449, -0.6111648678779602, 0.18920864164829254, -0.02386441081762314, -0.23184509575366974, 0.1828300952911377, 0.2452363520860672, -0.07738738507032394, 0.3932022750377655, 0.054485104978084564, -0.3213697075843811, -0.0695638507604599, 0.350350558757782, 0.18539664149284363, -0.14534832537174225, 0.43021464347839355, 0.27950116991996765, -0.2068384438753128, -0.2503648102283478, 0.16761799156665802, 0.04831358417868614, -0.450331449508667, 0.271293967962265, 0.13728442788124084, -0.048242487013339996, 0.025161493569612503, 0.006454011425375938, 0.22304564714431763, -0.18120339512825012, -0.1374010145664215, -0.30953845381736755, -0.17295639216899872, -0.03869594633579254, 0.2079717367887497, 0.09431251138448715, 0.1608486920595169, -0.2859983444213867, -0.09568537771701813, 0.05228984355926514, -0.32494431734085083, 0.08491647988557816, -0.27639099955558777, -0.022349433973431587, -0.16404838860034943, -0.04493420943617821, 0.3319898545742035, -0.010750842280685902, 0.15447399020195007, 0.006422825623303652, -0.11990899592638016, -0.2420113980770111, -0.23059716820716858, 0.12250528484582901, -0.13474880158901215, 0.00036686076782643795, 0.13643468916416168, -0.4455791711807251, -0.13009487092494965, -0.30524852871894836, -0.012141493149101734, 0.06988152861595154, 0.012054807506501675, -0.10745368152856827, -0.03724122792482376, 0.08514919877052307, -0.12631450593471527, 0.13236211240291595, -0.1252925843000412, 0.31326478719711304, 0.11541377007961273, 0.010453852824866772, 0.37879398465156555, -0.21014630794525146, -0.4721018373966217, -0.145845428109169, 0.08563344925642014, 0.30042704939842224, 0.2204204946756363, -0.06822625547647476, 0.10851293802261353, 0.34021493792533875, 0.3384628891944885, 0.2614002823829651, -0.012101697735488415, -0.1884235292673111, 0.04016747698187828, 0.24038828909397125, -0.1858050376176834, -0.3267371952533722, -0.12382979691028595, -0.2268267422914505, -0.005949030164629221, 0.0884682759642601, 0.06757804751396179, 0.46143627166748047, -0.29529520869255066, 0.018346210941672325, 0.3483887016773224, -0.31965285539627075, 0.030764982104301453, 0.23404397070407867, 0.16097448766231537, 0.1844971477985382, 0.1374911218881607, 0.0627417042851448, 0.11889341473579407, 0.7941007018089294, -0.15576617419719696, 0.3140953481197357, 0.1635061502456665, 0.5316991209983826, -0.2107439488172531, -0.35841110348701477, 0.16031014919281006, 0.281974732875824, -0.20230504870414734, 0.156744122505188, -0.07907729595899582, 0.1474897861480713, -0.36055222153663635, -0.2502916157245636, -0.18410775065422058, 0.050141435116529465, -0.16143573820590973, -0.08241067826747894, -0.03449784964323044, 0.08991798758506775, -0.12240689247846603, 0.32684221863746643, -0.2461453676223755, 0.06808533519506454, 0.027738038450479507, 0.3039015829563141, 0.05800497904419899, -0.13636767864227295, -0.026432758197188377, -0.15931157767772675, 0.2774824798107147, -0.29186129570007324, 0.08700162917375565, -0.08175621181726456, -0.1345003843307495, -0.13334336876869202, 0.07557042688131332, 0.22740313410758972, 0.4301581084728241, 0.08337844163179398, 0.11080262809991837, -0.03221522644162178, 0.055504873394966125, -0.12919312715530396, 0.20676015317440033, 0.15777947008609772, 0.5026853084564209, 0.30847054719924927, 0.08856060355901718, -0.20332303643226624, -0.008554072119295597, -0.17160572111606598, 0.3376584053039551, -0.3392180800437927, 0.34435537457466125, 0.0564856231212616, -0.12458468973636627, -0.44953328371047974, 0.3309648334980011, -0.25903162360191345, 0.07375050336122513, 0.3909419775009155, -0.035381995141506195, -0.052263081073760986, -0.22038577497005463, 0.09130435436964035, -0.08589690923690796, 0.7191553115844727, 0.2900615632534027, 0.00012093011173419654, -0.3954750895500183, -0.03622611612081528, -0.7739748358726501, -0.03078281879425049, -0.18208837509155273, 0.23030300438404083, 0.049765899777412415, 0.36548247933387756, 0.1856747269630432, 0.22616411745548248, -0.09127471596002579, -0.11804712563753128, -0.17173901200294495, 0.14614450931549072, -0.19767966866493225, -0.09005486965179443, -0.1394362896680832, 0.16515715420246124, -0.11369246244430542, -0.5302265286445618, 0.17176453769207, 0.08190867304801941, -0.06730125099420547, -0.1615780144929886, -0.133585125207901, -0.013177504763007164, 0.21431578695774078, 0.4995812475681305, 0.054426223039627075, 0.07352041453123093, -0.10499769449234009, -0.10872063040733337, -0.05190745368599892, -0.053787123411893845, -0.09822320938110352, 0.16961461305618286, 0.08414650708436966, 0.2834584712982178, -0.09395622462034225, 0.22069434821605682, -0.3580942153930664, 0.20068225264549255, -0.22346247732639313, -0.3017806112766266, -0.25035303831100464, -0.11627215892076492, 0.15126736462116241, 0.08653204888105392, 0.19716116786003113, 0.36090078949928284, 0.02986556477844715, -0.1782895028591156, -0.3926267921924591, -0.1595790833234787, 0.25191405415534973, 0.016789032146334648, -0.20763251185417175, -0.055305007845163345, 0.2613336443901062, 0.15085762739181519, -0.06851672381162643, -0.5005115270614624, 0.06503015011548996, 0.21773621439933777, -0.02422507293522358, -0.19709435105323792, 0.31024742126464844, -0.051687005907297134, 0.036089494824409485, -0.10815298557281494, 0.3465844690799713, -0.14728540182113647, -0.37843117117881775, 0.013874226249754429, -0.32087960839271545 ]
https://github.com/huggingface/datasets/issues/2547
Dataset load_from_disk is too slow
Okay, that's exactly my case, with spot instances... Therefore this isn't something we can change in any way to be able to load the dataset faster? I mean, what do you do internally at huggingface for being able to use spot instances with datasets efficiently?
@lhoestq ## Describe the bug It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example). ## Steps to reproduce the bug Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset. ## Expected results I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Ubuntu 18 - Python version: 3.8 I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
45
Dataset load_from_disk is too slow @lhoestq ## Describe the bug It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example). ## Steps to reproduce the bug Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset. ## Expected results I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Ubuntu 18 - Python version: 3.8 I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. Okay, that's exactly my case, with spot instances... Therefore this isn't something we can change in any way to be able to load the dataset faster? I mean, what do you do internally at huggingface for being able to use spot instances with datasets efficiently?
[ -0.31963685154914856, -0.5587561130523682, -0.062026649713516235, 0.5160351395606995, 0.23286059498786926, 0.020378487184643745, 0.12462975829839706, 0.1379353106021881, 0.5566673278808594, 0.11270618438720703, -0.06148020923137665, 0.3583334982395172, -0.015343185514211655, 0.21133050322532654, 0.0768192857503891, -0.08293870091438293, 0.20185410976409912, 0.017478544265031815, 0.09677642583847046, -0.03347087278962135, -0.06026582419872284, 0.18477268517017365, -0.1777220070362091, -0.18015386164188385, -0.3432551324367523, -0.14818158745765686, 0.01697680726647377, 0.1757044941186905, -0.09117372334003448, -0.34216853976249695, 0.17432403564453125, 0.07797632366418839, 0.1314016431570053, 0.5717476606369019, -0.00011365361569914967, -0.045983750373125076, 0.11772408336400986, 0.07482901215553284, -0.34274742007255554, 0.036837927997112274, 0.0366964191198349, -0.2794431746006012, 0.15251308679580688, -0.13235481083393097, -0.13327956199645996, 0.12935292720794678, -0.04073474556207657, -0.33393704891204834, 0.3590656518936157, -0.01572795957326889, 0.18334853649139404, 0.580241322517395, -0.31825536489486694, -0.06263834238052368, -0.0680636465549469, 0.08786925673484802, -0.20418643951416016, 0.2897658050060272, 0.42826908826828003, 0.13750919699668884, -0.1503990888595581, 0.40812546014785767, -0.040174245834350586, 0.12905412912368774, 0.5548252463340759, 0.10667997598648071, -0.09098309278488159, -0.19065114855766296, -0.12760591506958008, 0.27461525797843933, 0.42168164253234863, -0.03594664856791496, -0.3770567774772644, -0.4575648605823517, 0.08068022131919861, -0.31985580921173096, 0.24321994185447693, 0.13894057273864746, -0.08136214315891266, 0.12381412833929062, -0.1747928410768509, -0.14543767273426056, -0.010641432367265224, 0.011534933932125568, 0.3172793984413147, 0.07209425419569016, -0.19954299926757812, 0.014346343465149403, 0.4727317988872528, 0.180620014667511, -0.16248859465122223, -0.1308172196149826, 0.18107931315898895, 0.28250643610954285, -0.577714204788208, 0.011466758325695992, 0.0010849572718143463, 0.41250377893447876, 0.05183866620063782, 0.2784290313720703, 0.3223167657852173, 0.2358660101890564, -0.30691787600517273, 0.0911344587802887, 0.23395563662052155, 0.3614221215248108, -0.056424517184495926, -0.13449996709823608, 0.3064207434654236, 0.38401278853416443, -0.11357718706130981, 0.009558804333209991, -0.23877456784248352, -0.10691945254802704, 0.1238982230424881, -0.31296899914741516, 0.014529558829963207, -0.12447615712881088, -0.020200714468955994, -0.10869650542736053, 0.16784511506557465, -0.15774649381637573, 0.24616631865501404, 0.3766627013683319, -0.27758342027664185, 0.5177397131919861, 0.12024667114019394, -0.142570361495018, -0.4330537021160126, -0.1303914487361908, -0.17328470945358276, 0.08044303208589554, -0.19500964879989624, 0.2662881314754486, 0.07013514637947083, -0.4665999114513397, 0.2580045163631439, 0.12105914950370789, 0.20604011416435242, -0.24203255772590637, 0.014870102517306805, -0.3456922471523285, -0.2548389732837677, 0.11205241084098816, -0.022159026935696602, 0.2393350452184677, 0.0031182700768113136, 0.029196348041296005, -0.33915212750434875, -0.12429306656122208, -0.30387747287750244, -0.5340563058853149, -0.1559811681509018, 0.15280941128730774, -0.03331825137138367, 0.007049539126455784, -0.6708775162696838, 0.17524056136608124, -0.03095373325049877, 0.16132451593875885, -0.06815601140260696, 0.03492013365030289, -0.4282568693161011, 0.012932941317558289, 0.40874341130256653, 0.4829118251800537, -0.33647215366363525, -0.00926362443715334, -0.17381538450717926, 0.0008565377211198211, 0.24383005499839783, 0.605516791343689, -0.2631828188896179, 0.3598327338695526, -0.19604142010211945, 0.04589782655239105, 0.0975215882062912, -0.3626188337802887, -0.18965229392051697, 0.4016988277435303, -0.04919866845011711, 0.0704115480184555, 0.19530224800109863, 0.21547144651412964, 0.049943115562200546, -0.00691487081348896, 0.026424545794725418, 0.4943830072879791, 0.1099173054099083, 0.30775877833366394, -0.32752496004104614, -0.23637689650058746, -0.010648466646671295, 0.47562265396118164, -0.4628462493419647, -0.13582269847393036, -0.1892004758119583, 0.43673044443130493, 0.34938302636146545, -0.07069186866283417, -0.09731824696063995, 0.21466600894927979, 0.05436265096068382, 0.18393461406230927, -0.02584737166762352, -0.039257436990737915, -0.3798595368862152, 0.37493449449539185, 0.2192991077899933, 0.20748348534107208, 0.06837118417024612, -0.19530600309371948, -0.27414336800575256, 0.07754599303007126, -0.3143351972103119, 0.015247632749378681, -0.06859119236469269, 0.07635664194822311, 0.1691778004169464, -0.09333974123001099, -0.3474593162536621, 0.24628137052059174, -0.3357875943183899, 0.06762230396270752, -0.4804134964942932, 0.007929692044854164, 0.07891540974378586, 0.07942693680524826, -0.12037955969572067, 0.01817001774907112, -0.06850814819335938, -0.09773635864257812, -0.09156563878059387, 0.3952662944793701, 0.09360634535551071, 0.4953525960445404, 0.19845739006996155, 0.14746788144111633, 0.2836606204509735, 0.17059147357940674, 0.196660578250885, -0.10056643187999725, 0.3328216075897217, -0.12494520097970963, -0.23282070457935333, 0.3337991535663605, -0.11161328107118607, 0.29345399141311646, 0.14850860834121704, -0.28528285026550293, 0.1642889827489853, 0.1509999781847, -0.05836951360106468, -0.0630398541688919, 0.4609431028366089, 0.02046557329595089, 0.6008419990539551, 0.2153659611940384, -0.4440365135669708, -0.04370268061757088, 0.48616695404052734, -0.015072767622768879, -0.058738306164741516, 0.273080050945282, 0.06241661682724953, -0.35256341099739075, 0.06953869014978409, -0.16108469665050507, 0.2996738851070404, 0.13614270091056824, -0.05436268821358681, 0.06003789231181145, 0.0870235487818718, -0.14045245945453644, 0.20306843519210815, -0.010766289196908474, 0.3830640912055969, -0.068327397108078, 0.03224582225084305, -0.04014940559864044, -0.4450128972530365, -0.1755075752735138, -0.12172397971153259, 0.1107887551188469, -0.28575241565704346, 0.14569281041622162, -0.05575022101402283, -0.0033407609444111586, -0.23024782538414001, 0.35593312978744507, -0.09302966296672821, -0.0899568721652031, -0.1406044363975525, 0.3619556128978729, 0.12146154046058655, 0.0018908188212662935, -0.043534789234399796, 0.40417376160621643, -0.03420998528599739, -0.17861321568489075, -0.3652998208999634, -0.004792636260390282, -0.1858634054660797, -0.04852842539548874, 0.29344701766967773, 0.1590782254934311, 0.29703113436698914, -0.20100559294223785, -0.19139203429222107, -0.25668999552726746, -0.011739801615476608, 0.004149436019361019, -0.058813221752643585, 0.35513535141944885, 0.08719421178102493, 0.21149608492851257, -0.2618366777896881, -0.06649186462163925, 0.26150980591773987, -0.2949221432209015, -0.1493818759918213, -0.13076463341712952, -0.12454434484243393, 0.12209361046552658, 0.028182363137602806, -0.2825682759284973, -0.2752528786659241, -0.30557554960250854, 0.3190363049507141, -0.0953008383512497, 0.05369336158037186, -0.14473482966423035, -0.0529216043651104, 0.13883569836616516, -0.0915212482213974, 0.1111418679356575, -0.19335328042507172, -0.6070042252540588, 0.21688991785049438, 0.024775883182883263, -0.2385852187871933, -0.10314884781837463, 0.2235170602798462, 0.11490463465452194, -0.13131795823574066, -0.5084903836250305, -0.3393254280090332, -0.33506274223327637, 0.09898065775632858, -0.22539006173610687, 0.152825728058815, 0.18813729286193848, -0.1391521394252777, -0.024984173476696014, 0.17798565328121185, -0.2847421169281006, -0.028691984713077545, 0.034859415143728256, -0.020989246666431427, -0.03961187228560448, 0.2691695988178253, -0.0004034730663988739, 0.46841588616371155, 0.19508220255374908, 0.1571451872587204, 0.4356394410133362, 0.12247063964605331, 0.19875682890415192, -0.40390312671661377, -0.19743749499320984, 0.020104091614484787, -0.2473001778125763, -0.28769347071647644, 0.23330603539943695, 0.11749996989965439, 0.03227784112095833, -0.1820489764213562, -0.089507095515728, -0.2380465865135193, -0.18365700542926788, 0.07526832818984985, 0.026932308450341225, 0.05892547219991684, -0.06422067433595657, 0.081267349421978, 0.020664162933826447, -0.05836910754442215, 0.08864676207304001, 0.0663987472653389, 0.18281659483909607, -0.11100280284881592, -0.5808103084564209, 0.17467167973518372, -0.6069727540016174, 0.2017240673303604, -0.20255441963672638, 0.06249609962105751, 0.05041179805994034, 0.011051543988287449, 0.4005095064640045, 0.005456831771880388, 0.7247175574302673, 0.09030552208423615, 0.18279127776622772, -0.053136926144361496, -0.45916101336479187, -0.43240582942962646, 0.120662622153759, -0.09465797245502472, -0.11709350347518921, 0.04519163817167282, 0.5109403729438782, -0.31237730383872986, -0.36355072259902954, -0.12086675316095352, 0.3289903998374939, -0.17040826380252838, -0.16021795570850372, -0.2254454791545868, -0.308747261762619, -0.28204545378685, 0.191544771194458, 0.0622892752289772, 0.3389367461204529, 0.2983132302761078, 0.07045086473226547, 0.011154204607009888, 0.2225707322359085, 0.18770478665828705, 0.055867474526166916, 0.2207466959953308, 0.06306241452693939, 0.2699100375175476, 0.19487133622169495, -0.0403418242931366, -0.16282784938812256, 0.564195454120636, -0.25018376111984253, -0.490609347820282, -0.01469686720520258, 0.12627287209033966, 0.23653754591941833, 0.5669198036193848, 0.04211123660206795, 0.11979600042104721, 0.14438016712665558, 0.33743223547935486, -0.43587416410446167, 0.08405177295207977, 0.2717902958393097, 0.2514377534389496, -0.13455307483673096, -0.5810298323631287, 0.4566175937652588, 0.1905066967010498, 0.048835769295692444, 0.056908827275037766, 0.051339052617549896, -0.08423703908920288, 0.6181398034095764, 0.06869824975728989, 1.0370100736618042, -0.2821864187717438, 0.22548572719097137, 0.1522790938615799, 0.219082772731781, 0.5381295084953308, -0.4257057011127472, 0.001136144739575684, -0.2776853144168854, -0.12133413553237915, 0.06258177012205124, -0.0462397038936615, 0.09466549009084702, 0.26317068934440613, 0.022685494273900986, 0.4595286548137665, -0.1524491012096405, -0.21976003050804138, -0.31941741704940796, 0.4795186519622803, -0.2825460731983185, -0.7124121189117432, -0.9103118777275085, 0.08631354570388794, -0.08077455312013626, 0.2299456149339676, -0.09658719599246979, 0.2374044805765152, 0.18099360167980194, -0.08959688991308212, -0.12759529054164886, -0.031545985490083694, -0.25076067447662354, 0.04245859757065773, -0.16387206315994263, -0.1292315274477005, 0.03110276348888874, 0.3478124141693115, 0.1300773322582245, 0.03611651062965393, -0.04431643709540367, 0.3795783817768097, -0.3030948340892792, 0.2124040424823761, 0.09257052838802338, -0.25420698523521423, 0.2649158537387848, -0.15428698062896729, -0.08235602080821991, -0.17558597028255463, -0.1746191680431366, -0.373575896024704, 0.2857707738876343, 0.03876839205622673, 0.039281681180000305, -0.03041354939341545, -0.5706742405891418, 0.14153705537319183, 0.1314600110054016, -0.284403532743454, 0.09806535392999649, 0.2616695463657379, -0.08885660022497177, 0.2768677771091461, 0.11338560283184052, -0.27482351660728455, -0.06782646477222443, 0.39452046155929565, -0.0038808234967291355, -0.1927155703306198, 0.36845630407333374, 0.3933853805065155, -0.20316144824028015, -0.14060190320014954, 0.13542109727859497, 0.19842629134655, -0.6394309401512146, 0.36885866522789, 0.22520162165164948, -0.08534099906682968, -0.03219154477119446, 0.25288835167884827, 0.2513149678707123, -0.15313902497291565, -0.06755045056343079, -0.2945724129676819, -0.13954201340675354, 0.12950338423252106, 0.17115288972854614, -0.00872366689145565, 0.23671337962150574, -0.21578699350357056, -0.0892510712146759, 0.08148331195116043, -0.25538769364356995, 0.06300222873687744, -0.3963884115219116, -0.0154434684664011, 0.1368577927350998, -0.07034928351640701, 0.4796364903450012, -0.07045750319957733, 0.07499229907989502, 0.02687547355890274, -0.26579299569129944, -0.17250119149684906, -0.17941659688949585, 0.16767527163028717, -0.18233522772789001, -0.07065027207136154, 0.1655530482530594, -0.17045943439006805, -0.11359407752752304, -0.36982548236846924, 0.17989273369312286, 0.19909916818141937, 0.05402502045035362, -0.19334086775779724, -0.007002878934144974, 0.06858503818511963, -0.23073452711105347, 0.10767753422260284, 0.06361068040132523, 0.1913837194442749, 0.12561391294002533, -0.09029477089643478, 0.18366099894046783, -0.208675354719162, -0.056275658309459686, -0.042978961020708084, 0.2864097058773041, 0.1725778728723526, 0.15076470375061035, -0.02742786332964897, -0.04525880888104439, 0.33279117941856384, 0.37384170293807983, 0.24035049974918365, -0.016524191945791245, -0.13628660142421722, 0.01154481340199709, 0.1501932144165039, -0.16407401859760284, -0.24574877321720123, -0.017364686354994774, -0.10749787837266922, -0.05169592797756195, 0.1891135424375534, 0.1765631139278412, 0.5343310832977295, -0.41593697667121887, 0.09000502526760101, 0.27860376238822937, -0.25126972794532776, 0.09522758424282074, 0.10142897814512253, 0.051705315709114075, 0.05928316339850426, 0.2839730978012085, 0.15689079463481903, 0.12526634335517883, 0.4663276970386505, -0.12483731657266617, 0.4365474581718445, -0.05181767791509628, 0.681725025177002, -0.03785458207130432, -0.4280994236469269, 0.10094227641820908, 0.4241501986980438, -0.09781520813703537, 0.054826002568006516, -0.17132830619812012, 0.390682190656662, -0.36069539189338684, -0.3087567389011383, -0.15851663053035736, 0.18025383353233337, -0.13678476214408875, -0.16699016094207764, 0.057270247489213943, 0.02472861111164093, -0.10005869716405869, 0.3391207456588745, -0.24647274613380432, -0.03841904550790787, 0.15254244208335876, 0.13036371767520905, 0.031228700652718544, -0.22462277114391327, -0.24861373007297516, -0.13291232287883759, 0.4031762480735779, -0.19266025722026825, 0.13215884566307068, -0.10363230854272842, -0.1441437155008316, -0.12136710435152054, 0.3481113910675049, 0.17978785932064056, 0.22193096578121185, 0.20548813045024872, 0.17454732954502106, -0.15457753837108612, 0.1652442216873169, -0.0052416687831282616, 0.15152300894260406, 0.06998452544212341, 0.30754971504211426, 0.17110075056552887, 0.038439273834228516, -0.1586204320192337, -0.03558408096432686, -0.2871457040309906, 0.31180885434150696, -0.41685935854911804, 0.23282493650913239, -0.07071593403816223, -0.04205544292926788, -0.4076865315437317, 0.3572511374950409, -0.1667424887418747, 0.1307481974363327, 0.3537976145744324, -0.028526300564408302, -0.10192789882421494, -0.21105346083641052, 0.05444679036736488, 0.02253352291882038, 0.6195695400238037, 0.3593433201313019, -0.09968587011098862, -0.31588423252105713, -0.03453188017010689, -0.7715908885002136, -0.08307880163192749, 0.02706839144229889, 0.18212078511714935, 0.21424776315689087, 0.30335307121276855, 0.06852974742650986, 0.27342522144317627, -0.0024457669351249933, -0.11443256586790085, -0.032248906791210175, -0.004326916765421629, -0.14688992500305176, 0.07158438116312027, -0.2752617299556732, 0.016788529232144356, -0.0520382858812809, -0.4649929106235504, 0.2568732798099518, -0.01274028792977333, -0.18272283673286438, -0.09550526738166809, 0.03897380828857422, -0.059595659375190735, 0.025990638881921768, 0.4170561134815216, 0.05981145054101944, -0.09621469676494598, -0.033641450107097626, -0.16410911083221436, -0.12545357644557953, -0.16935862600803375, -0.11148079484701157, 0.1880922019481659, -0.08114995807409286, 0.29600533843040466, -0.12145844846963882, 0.210329070687294, -0.402076780796051, 0.363786518573761, -0.1327587068080902, -0.3278030753135681, -0.26492542028427124, -0.051169298589229584, -0.06750862300395966, -0.014400997199118137, 0.26980260014533997, 0.3055674731731415, -0.01173138152807951, -0.21944697201251984, -0.3290025293827057, -0.13303448259830475, 0.44058069586753845, -0.08633013069629669, -0.11676911264657974, -0.04739106446504593, 0.2936115264892578, 0.3169219493865967, -0.2588174641132355, -0.6736823320388794, 0.06975964456796646, 0.09826825559139252, 0.12389842420816422, -0.14124946296215057, 0.3487517535686493, -0.17227263748645782, -0.06087753176689148, -0.1790948361158371, 0.2636469006538391, -0.13340842723846436, -0.262307733297348, 0.12870261073112488, -0.3133033514022827 ]
https://github.com/huggingface/datasets/issues/2547
Dataset load_from_disk is too slow
There are no solutions yet unfortunately. We're still trying to figure out a way to make the loading instantaneous on such disks, I'll keep you posted
@lhoestq ## Describe the bug It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example). ## Steps to reproduce the bug Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset. ## Expected results I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Ubuntu 18 - Python version: 3.8 I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
26
Dataset load_from_disk is too slow @lhoestq ## Describe the bug It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example). ## Steps to reproduce the bug Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset. ## Expected results I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time. ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.8.0 - Platform: Ubuntu 18 - Python version: 3.8 I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. There are no solutions yet unfortunately. We're still trying to figure out a way to make the loading instantaneous on such disks, I'll keep you posted
[ -0.4694783687591553, -0.24230213463306427, -0.11789412796497345, 0.394116073846817, 0.24218131601810455, 0.05294777452945709, 0.19930587708950043, 0.26577091217041016, 0.4733239710330963, 0.10509912669658661, 0.053388431668281555, 0.44948869943618774, -0.02447594329714775, 0.013596623204648495, -0.02667613886296749, -0.013558500446379185, 0.2004586160182953, 0.05155286565423012, 0.20939293503761292, -0.12101838737726212, -0.1660773903131485, 0.2531620264053345, -0.17681919038295746, -0.22154153883457184, -0.27578410506248474, -0.13873767852783203, -0.0035661798901855946, 0.040321413427591324, -0.06866363435983658, -0.3196173310279846, 0.1828829050064087, 0.12443128973245621, 0.22845816612243652, 0.44822460412979126, -0.00010554998880252242, -0.1314772367477417, 0.13361017405986786, 0.016942452639341354, -0.36605027318000793, -0.11348677426576614, 0.23584309220314026, -0.24450452625751495, 0.13717864453792572, -0.2250014990568161, -0.09726549685001373, 0.025180920958518982, -0.046004634350538254, -0.46427154541015625, 0.20520557463169098, 0.10939085483551025, 0.2575611472129822, 0.30518436431884766, -0.30671900510787964, -0.06366438418626785, -0.0051105450838804245, 0.016165008768439293, -0.2343575358390808, 0.20388109982013702, 0.4900561273097992, 0.1526581346988678, -0.13291120529174805, 0.343351811170578, -0.05409613251686096, 0.09305521100759506, 0.4101567268371582, 0.007167986128479242, 0.09535714238882065, -0.2674490213394165, -0.011626780033111572, 0.20360760390758514, 0.4939618706703186, -0.05210945010185242, -0.3432076573371887, -0.30284541845321655, 0.14752164483070374, -0.2496153563261032, 0.27383333444595337, 0.24136333167552948, -0.11563514918088913, 0.131980761885643, -0.05376094579696655, -0.18778008222579956, -0.06333871185779572, 0.06810138374567032, 0.2679540812969208, 0.22535163164138794, -0.08739839494228363, 0.01081827376037836, 0.4163220226764679, 0.11478366702795029, 0.21950167417526245, -0.24328094720840454, 0.15091395378112793, 0.37446317076683044, -0.5127292275428772, -0.012460154481232166, -0.03134378790855408, 0.2573702335357666, -0.09772605448961258, 0.22905489802360535, 0.1536373496055603, 0.20921042561531067, -0.16614627838134766, 0.16066822409629822, 0.1446458250284195, 0.24595369398593903, -0.08657079190015793, -0.04021252691745758, 0.24420951306819916, 0.1976843774318695, -0.18235553801059723, -0.0017860106891021132, -0.27365991473197937, -0.1554441899061203, 0.2644672691822052, -0.2677518129348755, -0.13552892208099365, -0.1284792423248291, -0.05555315688252449, 0.03888460993766785, 0.17590080201625824, -0.14763376116752625, 0.19115334749221802, 0.3013441562652588, -0.29210177063941956, 0.5728611946105957, 0.026014860719442368, -0.0990995317697525, -0.3289966285228729, -0.03752962872385979, -0.16817259788513184, 0.07358508557081223, -0.24965569376945496, 0.15386559069156647, 0.17315982282161713, -0.26112863421440125, 0.20465025305747986, 0.08704518526792526, 0.1814052164554596, -0.2219471037387848, 0.2221279889345169, -0.4922524392604828, -0.11507020145654678, 0.15652211010456085, 0.04395567625761032, 0.24178987741470337, 0.021833578124642372, -0.09405384957790375, -0.3755870461463928, 0.10600265860557556, -0.3327483534812927, -0.45184195041656494, -0.2468840479850769, 0.2598525285720825, 0.001502254162915051, -0.040048856288194656, -0.5704132318496704, 0.11382630467414856, 0.0026696498971432447, 0.08005154877901077, -0.15645718574523926, -0.07962456345558167, -0.29677698016166687, -0.002433772198855877, 0.31812429428100586, 0.3346172571182251, -0.45513325929641724, 0.10217556357383728, -0.26040348410606384, 0.07497074455022812, 0.3448600769042969, 0.5159242749214172, -0.31328174471855164, 0.2919720411300659, -0.1433935910463333, 0.08277344703674316, 0.22091315686702728, -0.22198519110679626, -0.2678498923778534, 0.6216791272163391, 0.0714554563164711, -0.07128719985485077, 0.11309120059013367, 0.25718504190444946, 0.17723704874515533, -0.03666739538311958, 0.13371752202510834, 0.5584757924079895, 0.15123669803142548, 0.28539761900901794, -0.3553661108016968, -0.2408137172460556, 0.022846950218081474, 0.5096569657325745, -0.27273571491241455, -0.15572217106819153, -0.13014079630374908, 0.38534948229789734, 0.3681557774543762, -0.10200080275535583, -0.042925842106342316, 0.24489234387874603, 0.1422252207994461, 0.05888565629720688, -0.02171420492231846, -0.05221787467598915, -0.2094910591840744, 0.315498948097229, 0.3402779996395111, 0.1055101677775383, 0.051887545734643936, -0.14993292093276978, -0.20646542310714722, 0.026975620537996292, -0.3376525342464447, 0.08857481181621552, 0.06511743366718292, 0.07031632214784622, 0.06862063705921173, -0.05903330817818642, -0.2992326021194458, 0.22015216946601868, -0.34181344509124756, -0.11203505098819733, -0.28884488344192505, 0.06471608579158783, -0.021096786484122276, 0.04409964755177498, -0.0066618057899177074, -0.10892912745475769, -0.015061695128679276, -0.024387309327721596, -0.20345152914524078, 0.37869131565093994, 0.09249736368656158, 0.5323039293289185, 0.18403755128383636, -0.03380367159843445, 0.17848943173885345, 0.1857828050851822, 0.19777990877628326, 0.010507631115615368, 0.36612167954444885, -0.1660584658384323, -0.14045527577400208, 0.3742794394493103, -0.0605221688747406, 0.26917192339897156, 0.2077661007642746, -0.2657872140407562, 0.3263537287712097, 0.13591524958610535, -0.09130110591650009, -0.11024324595928192, 0.4074092209339142, 0.08945859968662262, 0.6007937788963318, 0.13111397624015808, -0.3572586178779602, -0.07625115662813187, 0.5789568424224854, 0.04500102996826172, -0.04189939424395561, 0.30764511227607727, 0.09112454205751419, -0.3170953392982483, 0.050196100026369095, 0.18756984174251556, 0.43101513385772705, 0.19761502742767334, -0.004000991117209196, -0.032899461686611176, -0.00569108733907342, -0.21902231872081757, 0.27514976263046265, -0.07970534265041351, 0.49881744384765625, 0.04670418053865433, -0.025461941957473755, -0.006001755595207214, -0.46274423599243164, -0.3295348882675171, -0.05322156473994255, 0.17680904269218445, -0.08952078223228455, 0.2188509851694107, -0.07536152005195618, 0.08385667204856873, -0.25351566076278687, 0.21206897497177124, -0.02952693961560726, -0.10370344668626785, -0.11983043700456619, 0.2843451499938965, 0.12040291726589203, 0.0475345179438591, -0.1557544618844986, 0.1716059446334839, -0.10207836329936981, -0.2200123816728592, -0.3387373685836792, -0.09343039989471436, -0.2868705093860626, 0.035100918263196945, 0.2899341583251953, 0.06479145586490631, 0.31397178769111633, -0.14685764908790588, -0.117103211581707, -0.16014231741428375, -0.019671453163027763, -0.02573300525546074, -0.01593821682035923, 0.17361098527908325, -0.07210426032543182, 0.1581278145313263, -0.18027856945991516, -0.18957184255123138, 0.17624816298484802, -0.2932654917240143, 0.00958950538188219, -0.0883767157793045, -0.08601657301187515, -0.013308909721672535, -0.050396230071783066, -0.46487247943878174, -0.3632453382015228, -0.28910452127456665, 0.019005700945854187, -0.06709951907396317, 0.10134908556938171, -0.26160892844200134, 0.009760254062712193, 0.06194393336772919, 0.18451277911663055, 0.10329335182905197, -0.23623238503932953, -0.5854781866073608, 0.32260167598724365, 0.00498396810144186, -0.27120015025138855, 0.0211331844329834, 0.19478146731853485, 0.26559922099113464, -0.07991746068000793, -0.5386183857917786, -0.0461723655462265, -0.30277806520462036, 0.021211745217442513, -0.3066810965538025, 0.018114304170012474, 0.10550101846456528, -0.007771540433168411, -0.08138880878686905, 0.09916572272777557, -0.16948269307613373, -0.014922290109097958, -0.07976800203323364, 0.08361557871103287, -0.23010307550430298, 0.22554658353328705, 0.010093381628394127, 0.417573481798172, 0.055357594043016434, 0.07089430093765259, 0.42426598072052, 0.2432629019021988, 0.12406230717897415, -0.3561915159225464, -0.12050614506006241, 0.034583210945129395, -0.2498478889465332, -0.29617762565612793, 0.29656314849853516, 0.03902631253004074, -0.4405570924282074, -0.2313329428434372, -0.035748448222875595, -0.22015482187271118, -0.17477183043956757, 0.07172611355781555, -0.20131288468837738, 0.0571289137005806, -0.048447899520397186, 0.15188589692115784, -0.006072411313652992, -0.049080848693847656, -0.006501334719359875, 0.021280888468027115, 0.09200382977724075, -0.14816951751708984, -0.37902548909187317, 0.09609547257423401, -0.5191196203231812, 0.11567150801420212, -0.2607976198196411, 0.14703184366226196, 0.04201267659664154, 0.031134430319070816, 0.31508398056030273, -0.10633213818073273, 0.6286600828170776, 0.030587375164031982, 0.1294412910938263, 0.06503647565841675, -0.2170047163963318, -0.41514554619789124, 0.007485559210181236, -0.15427789092063904, -0.08267969638109207, 0.1175871267914772, 0.5377980470657349, -0.20964227616786957, -0.20628145337104797, -0.21870113909244537, 0.29948320984840393, -0.20430411398410797, -0.3161747455596924, -0.21044696867465973, -0.34975099563598633, -0.3888545036315918, 0.19379033148288727, 0.04995104297995567, 0.34678810834884644, 0.09202515333890915, -0.012594451196491718, -0.05988891422748566, 0.22897575795650482, 0.20436254143714905, 0.0788375735282898, 0.224042609333992, 0.007183591369539499, 0.3724556267261505, -0.09220772236585617, 0.06357672065496445, 0.0013744314201176167, 0.44163522124290466, -0.17141178250312805, -0.2881591022014618, 0.07083172351121902, -0.08263374865055084, 0.2258853316307068, 0.4218280017375946, 0.02379210852086544, -0.008685866370797157, 0.12579600512981415, 0.22535568475723267, -0.29265809059143066, 0.06399689614772797, 0.27219149470329285, 0.17819246649742126, -0.19653438031673431, -0.6573070883750916, 0.394816517829895, 0.2069481909275055, 0.004693156573921442, 0.057072706520557404, -0.18480853736400604, -0.14178691804409027, 0.6890683174133301, 0.201515793800354, 1.0291242599487305, -0.1868833601474762, 0.22229760885238647, -0.036385875195264816, 0.15556663274765015, 0.2503241002559662, -0.40734949707984924, -0.004439789801836014, -0.3594458997249603, -0.1366783082485199, 0.08785918354988098, 0.0014565185410901904, 0.1326105147600174, 0.40597373247146606, -0.1406879723072052, 0.3619868755340576, -0.0185152068734169, -0.3825739622116089, -0.2977781891822815, 0.5117339491844177, -0.3943452537059784, -0.6922772526741028, -0.8247361779212952, 0.16779892146587372, -0.08104895800352097, 0.11869706958532333, -0.09032760560512543, 0.264117032289505, 0.21349185705184937, -0.13828910887241364, -0.16505493223667145, 0.12327064573764801, -0.11688553541898727, 0.12141213566064835, -0.3188133239746094, -0.21663320064544678, 0.07294954359531403, 0.23183538019657135, 0.13021522760391235, 0.18927541375160217, -0.004162484779953957, 0.48770982027053833, -0.21950773894786835, 0.21186570823192596, 0.10337845981121063, -0.28276512026786804, 0.3081965744495392, -0.26013123989105225, -0.15534232556819916, -0.2089230716228485, -0.16405323147773743, -0.236153706908226, 0.30377358198165894, 0.013922642916440964, 0.1338055431842804, 0.06984000653028488, -0.5948091745376587, 0.18908968567848206, 0.015513341873884201, -0.2636428773403168, 0.20330512523651123, 0.2456427812576294, -0.15353406965732574, 0.39580100774765015, 0.059680622071027756, -0.3271467089653015, -0.09647011011838913, 0.35155895352363586, 0.19410814344882965, -0.14445216953754425, 0.39345672726631165, 0.3167480230331421, -0.22433915734291077, -0.25593301653862, 0.13723716139793396, -0.03058052808046341, -0.505411684513092, 0.27522218227386475, 0.1805754005908966, -0.033449072390794754, -0.0006363771972246468, 0.006377725396305323, 0.1991872489452362, -0.14189863204956055, -0.11744965612888336, -0.3069975972175598, -0.12996278703212738, -0.08634687215089798, 0.16429224610328674, 0.08399205654859543, 0.21191273629665375, -0.36021214723587036, -0.07376309484243393, 0.039503976702690125, -0.34308451414108276, 0.12339866161346436, -0.3643561899662018, 0.0190977044403553, -0.12973825633525848, -0.028015127405524254, 0.2609647512435913, -0.01767868548631668, 0.15858308970928192, 0.05047000199556351, -0.0842270702123642, -0.2597213387489319, -0.18864774703979492, 0.11824703961610794, -0.11860117316246033, 0.04477696493268013, 0.1561880260705948, -0.3250778019428253, -0.2172202616930008, -0.2890644371509552, 0.03484747186303139, 0.09805607050657272, 0.010470802895724773, -0.09390799701213837, 0.05206781253218651, 0.117930106818676, -0.1605370044708252, 0.06604873389005661, -0.08707349747419357, 0.34161585569381714, 0.06509272754192352, 0.049958594143390656, 0.35539987683296204, -0.1964927613735199, -0.28974032402038574, -0.17049716413021088, 0.07359221577644348, 0.34668275713920593, 0.15832819044589996, -0.08467080444097519, 0.08966168016195297, 0.3591155409812927, 0.33620506525039673, 0.2576815187931061, 0.02161370776593685, -0.23134833574295044, 0.09989423304796219, 0.2502579391002655, -0.23349934816360474, -0.29646867513656616, -0.10219035297632217, -0.14550888538360596, -0.034376248717308044, 0.051073648035526276, 0.06365581601858139, 0.44993066787719727, -0.2592742145061493, 0.08492710441350937, 0.2981084883213043, -0.28081583976745605, 0.11062456667423248, 0.2647833824157715, 0.11842174828052521, 0.186094731092453, 0.17249807715415955, 0.0764959380030632, 0.0882384330034256, 0.718064546585083, -0.16749361157417297, 0.4605650007724762, 0.1990513801574707, 0.5430526733398438, -0.1301976442337036, -0.29535847902297974, 0.10889382660388947, 0.22789011895656586, -0.16386720538139343, 0.12114513665437698, 0.022961778566241264, 0.21024397015571594, -0.2791338860988617, -0.25312191247940063, -0.2078099250793457, 0.07987397909164429, -0.1857956498861313, -0.1577618271112442, -0.055192723870277405, 0.06859282404184341, -0.10778670758008957, 0.3235853314399719, -0.25141531229019165, 0.15030138194561005, 0.05855138972401619, 0.29841622710227966, 0.1284312754869461, -0.13075412809848785, -0.048374999314546585, -0.23938579857349396, 0.33012792468070984, -0.23939183354377747, 0.1104545071721077, -0.05950162187218666, -0.13105668127536774, -0.15045979619026184, 0.12485641986131668, 0.24951431155204773, 0.341723769903183, 0.08623555302619934, 0.12636561691761017, -0.11844628304243088, 0.08924640715122223, -0.05923337861895561, 0.2225807160139084, 0.2490222007036209, 0.429394394159317, 0.32482314109802246, 0.11821886152029037, -0.20894035696983337, 0.0747365951538086, -0.1469835638999939, 0.2920445501804352, -0.2994968593120575, 0.40999647974967957, 0.10201595723628998, -0.1169014647603035, -0.4516199231147766, 0.35597625374794006, -0.24913747608661652, 0.06354546546936035, 0.39200612902641296, -0.021529383957386017, -0.0770392194390297, -0.30094537138938904, 0.10126897692680359, -0.04110565781593323, 0.6939364671707153, 0.271371990442276, -0.06893651187419891, -0.29332128167152405, -0.05159438028931618, -0.7838366627693176, -0.011074164882302284, -0.035774651914834976, 0.2923111617565155, 0.05865076184272766, 0.3379097878932953, 0.1290600597858429, 0.2557680606842041, -0.05406549572944641, -0.06818635761737823, -0.1145162358880043, 0.16031059622764587, -0.2366974651813507, 0.046710334718227386, -0.15647637844085693, 0.06831158697605133, -0.13579469919204712, -0.4821784496307373, 0.13853849470615387, -0.07249461859464645, -0.048545558005571365, -0.18443550169467926, -0.13354653120040894, 0.008103503845632076, 0.13738499581813812, 0.4866028428077698, 0.03854740411043167, 0.02323502115905285, -0.14708904922008514, -0.05425376817584038, 0.0028943405486643314, -0.042057354003190994, -0.06616724282503128, 0.13565030694007874, 0.0847153514623642, 0.27989715337753296, -0.064676433801651, 0.25807541608810425, -0.3375316858291626, 0.25990191102027893, -0.2294941395521164, -0.30237510800361633, -0.25813284516334534, -0.11023680865764618, 0.11255908757448196, 0.006415531970560551, 0.15016110241413116, 0.3269650936126709, 0.03281893581151962, -0.1675226390361786, -0.38374078273773193, -0.2113310992717743, 0.30554258823394775, -0.013870375230908394, -0.2495279759168625, -0.15429656207561493, 0.20679570734500885, 0.20520907640457153, -0.07262591272592545, -0.5406599640846252, 0.15365339815616608, 0.16387271881103516, 0.028297798708081245, -0.17403997480869293, 0.32248032093048096, -0.09789277613162994, 0.04422914609313011, -0.15905927121639252, 0.2737867534160614, -0.12685269117355347, -0.3126336932182312, -0.08277913182973862, -0.37310680747032166 ]
https://github.com/huggingface/datasets/issues/2543
switching some low-level log.info's to log.debug?
Hi @stas00, thanks for pointing out this issue with logging. I agree that `datasets` can sometimes be too verbose... I can create a PR and we could discuss there the choice of the log levels for different parts of the code.
In https://github.com/huggingface/transformers/pull/12276 we are now changing the examples to have `datasets` on the same log level as `transformers`, so that one setting can do a consistent logging across all involved components. The trouble is that now we get a ton of these: ``` 06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 acquired on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock 06/23/2021 12:15:31 - INFO - datasets.arrow_writer - Done writing 50 examples in 12280 bytes /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow. 06/23/2021 12:15:31 - INFO - datasets.arrow_dataset - Set __getitem__(key) output type to python objects for no columns (when key is int or slice) and don't output other (un-formatted) columns. 06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 released on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock ``` May I suggest that these can be `log.debug` as it's no informative to the user. More examples: these are not informative - too much information: ``` 06/23/2021 12:14:26 - INFO - datasets.load - Checking /home/stas/.cache/huggingface/datasets/downloads/459933f1fe47711fad2f6ff8110014ff189120b45ad159ef5b8e90ea43a174fa.e23e7d1259a8c6274a82a42a8936dd1b87225302c6dc9b7261beb3bc2daac640.py for additional imports. 06/23/2021 12:14:27 - INFO - datasets.builder - Constructing Dataset for split train, validation, test, from /home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a ``` While these are: ``` 06/23/2021 12:14:27 - INFO - datasets.info - Loading Dataset Infos from /home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt16/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a 06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a) ``` I also realize that `transformers` examples don't have do use `info` for `datasets` to let the default `warning` keep logging to less noisy. But I think currently the log levels are slightly misused and skewed by 1 level. Many `warnings` will better be `info`s and most `info`s be `debug`. e.g.: ``` 06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a) ``` why is this a warning? it is informing me that the cache is used, there is nothing to be worried about. I'd have it as `info`. Warnings are typically something that's bordering error or the first thing to check when things don't work as expected. infrequent info is there to inform of the different stages or important events. Everything else is debug. At least the way I understand things.
41
switching some low-level log.info's to log.debug? In https://github.com/huggingface/transformers/pull/12276 we are now changing the examples to have `datasets` on the same log level as `transformers`, so that one setting can do a consistent logging across all involved components. The trouble is that now we get a ton of these: ``` 06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 acquired on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock 06/23/2021 12:15:31 - INFO - datasets.arrow_writer - Done writing 50 examples in 12280 bytes /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow. 06/23/2021 12:15:31 - INFO - datasets.arrow_dataset - Set __getitem__(key) output type to python objects for no columns (when key is int or slice) and don't output other (un-formatted) columns. 06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 released on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock ``` May I suggest that these can be `log.debug` as it's no informative to the user. More examples: these are not informative - too much information: ``` 06/23/2021 12:14:26 - INFO - datasets.load - Checking /home/stas/.cache/huggingface/datasets/downloads/459933f1fe47711fad2f6ff8110014ff189120b45ad159ef5b8e90ea43a174fa.e23e7d1259a8c6274a82a42a8936dd1b87225302c6dc9b7261beb3bc2daac640.py for additional imports. 06/23/2021 12:14:27 - INFO - datasets.builder - Constructing Dataset for split train, validation, test, from /home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a ``` While these are: ``` 06/23/2021 12:14:27 - INFO - datasets.info - Loading Dataset Infos from /home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt16/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a 06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a) ``` I also realize that `transformers` examples don't have do use `info` for `datasets` to let the default `warning` keep logging to less noisy. But I think currently the log levels are slightly misused and skewed by 1 level. Many `warnings` will better be `info`s and most `info`s be `debug`. e.g.: ``` 06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a) ``` why is this a warning? it is informing me that the cache is used, there is nothing to be worried about. I'd have it as `info`. Warnings are typically something that's bordering error or the first thing to check when things don't work as expected. infrequent info is there to inform of the different stages or important events. Everything else is debug. At least the way I understand things. Hi @stas00, thanks for pointing out this issue with logging. I agree that `datasets` can sometimes be too verbose... I can create a PR and we could discuss there the choice of the log levels for different parts of the code.
[ 0.1725226193666458, -0.34119707345962524, 0.08715631067752838, 0.2024422436952591, 0.25608471035957336, 0.11248690634965897, 0.5520289540290833, 0.31011226773262024, -0.07186204940080643, -0.3018714189529419, -0.04163791239261627, 0.17572860419750214, -0.21787194907665253, 0.28082922101020813, 0.05038081854581833, -0.16351990401744843, -0.08273430168628693, -0.011047386564314365, -0.22705882787704468, -0.0930728167295456, -0.021676653996109962, 0.22455020248889923, -0.04603566974401474, 0.2822224795818329, -0.4451559782028198, -0.23405501246452332, 0.1867845505475998, 0.14146170020103455, 0.21268883347511292, -0.4743225574493408, 0.0037434976547956467, -0.016444146633148193, 0.04301578551530838, -0.029056796804070473, -0.00012339098611846566, 0.18065857887268066, 0.39627382159233093, -0.040211524814367294, -0.4393557012081146, 0.09134788066148758, -0.49993976950645447, -0.43552178144454956, 0.29871124029159546, -0.16709958016872406, 0.2413562536239624, -0.6675624847412109, 0.3559737801551819, -0.33117160201072693, 0.22117240726947784, 0.2089208960533142, 0.1022920235991478, 0.1760014146566391, -0.378012478351593, 0.024966474622488022, 0.4033830463886261, 0.4810091257095337, -0.15264475345611572, 0.10702303797006607, 0.2368956357240677, 0.09213470667600632, -0.15624386072158813, 0.37860068678855896, 0.012076529674232006, -0.15976914763450623, 0.3421986401081085, 0.19476042687892914, 0.4285320043563843, 0.048322614282369614, 0.2384691834449768, 0.3680718243122101, 0.09616859257221222, -0.3306322693824768, -0.4083092212677002, -0.6607733964920044, 0.0907098650932312, -0.10628604888916016, -0.09579969197511673, -0.09717869758605957, -0.18480972945690155, 0.26381421089172363, -0.14934033155441284, -0.12740974128246307, 0.03645290434360504, -0.21275891363620758, 0.21458221971988678, -0.0887046828866005, -0.3330811560153961, 0.0859098806977272, -0.08009546250104904, -0.247369647026062, 0.0023988159373402596, -0.09614677727222443, -0.19397535920143127, -0.19136755168437958, -0.022467216476798058, -0.11879295110702515, 0.14381037652492523, 0.08722972124814987, -0.05083059147000313, 0.28794044256210327, 0.03606416657567024, 0.04216234013438225, 0.21655917167663574, -0.034336213022470474, 0.1342565268278122, 0.13074667751789093, 0.5509586334228516, 0.2441018968820572, 0.207519069314003, -0.008192948065698147, 0.37904831767082214, -0.11008170247077942, -0.07710147649049759, -0.05461442098021507, 0.08756531774997711, 0.13993319869041443, 0.4767223298549652, -0.2333272248506546, -0.17095446586608887, -0.04309171438217163, -0.05431230366230011, 0.009958024136722088, 0.002480503171682358, 0.21849684417247772, 0.459628164768219, 0.1707853376865387, 0.17125599086284637, 0.18594971299171448, 0.20987758040428162, 0.1148032397031784, -0.0688314288854599, -0.21835726499557495, -0.15416546165943146, 0.21629801392555237, 0.03514938801527023, -0.042030978947877884, 0.22682231664657593, 0.07318838685750961, 0.18872693181037903, -0.11756646633148193, 0.06996786594390869, 0.27322229743003845, 0.13563622534275055, 0.23525990545749664, -0.5406369566917419, 0.24730484187602997, 0.1558995395898819, -0.3606779873371124, -0.35382065176963806, 0.06262141466140747, -0.10022301971912384, -0.30301812291145325, -0.04392820596694946, -0.021031348034739494, -0.30158841609954834, 0.15100347995758057, -0.031589750200510025, 0.324950635433197, 0.0678393617272377, 0.2703394889831543, 0.39800557494163513, 0.013917792588472366, 0.21479922533035278, 0.0231181550770998, 0.01143521536141634, 0.4221028983592987, -0.03855247423052788, -0.6235331892967224, -0.4271847903728485, -0.0567949078977108, 0.09832844138145447, 0.07234280556440353, -0.033057328313589096, 0.21983183920383453, -0.11255736649036407, -0.050258949398994446, 0.19164398312568665, -0.38362857699394226, 0.2618425786495209, 0.48281630873680115, -0.2888582646846771, 0.13804414868354797, 0.4421454966068268, 0.08502833545207977, -0.07839581370353699, -0.07494305074214935, 0.18107768893241882, -0.11971811205148697, 0.03373366594314575, -0.03269942104816437, -0.14350782334804535, -0.3740643560886383, -0.1517738699913025, 0.004464616999030113, -0.06771375983953476, 0.2607995271682739, -0.17339490354061127, 0.3144971430301666, 0.179752916097641, -0.1150379329919815, 0.012791184708476067, 0.07812199741601944, 0.24593110382556915, -0.22558651864528656, 0.09055080264806747, 0.08107338100671768, -0.5876049399375916, 0.005892224609851837, -0.3214450180530548, 0.04167734831571579, -0.1873551458120346, -0.4808940291404724, -0.15566401183605194, -0.1422925442457199, 0.15970030426979065, -0.4150124192237854, -0.019260302186012268, 0.12585599720478058, -0.20733390748500824, -0.19928209483623505, -0.40696078538894653, 0.010997099801898003, -0.09869612008333206, 0.27725163102149963, -0.35630738735198975, 0.15482842922210693, 0.3443707227706909, 0.11469479650259018, -0.15310734510421753, 0.0763467326760292, 0.13976095616817474, -0.06510383635759354, 0.15485353767871857, 0.3248720169067383, 0.01796954683959484, 0.6038196086883545, 0.13064943253993988, 0.41662460565567017, 0.05822940915822983, 0.07673029601573944, 0.14458566904067993, 0.07606679946184158, -0.14952129125595093, 0.15238061547279358, -0.06573912501335144, 0.4161951541900635, 0.06369194388389587, 0.28110164403915405, 0.01993841491639614, 0.11841277033090591, -0.23177975416183472, -0.17108774185180664, -0.448503315448761, -0.33691591024398804, 0.15588870644569397, -0.024338440969586372, 0.12256034463644028, 0.18303382396697998, -0.2320762574672699, 0.13824395835399628, 0.4867061972618103, -0.31732475757598877, 0.023993153125047684, 0.12979641556739807, -0.2656708061695099, 0.15800713002681732, 0.2322460561990738, 0.32310518622398376, 0.28673744201660156, 0.2394697219133377, 0.06873788684606552, 0.19810143113136292, 0.18020734190940857, 0.02394929528236389, 0.29092609882354736, 0.20729579031467438, -0.09710327535867691, 0.11773370206356049, -0.13089759647846222, -0.14484041929244995, 0.12889637053012848, 0.037882041186094284, -0.2107933908700943, 0.013220547698438168, -0.42295488715171814, 0.2986921966075897, -0.2806164622306824, -0.2747742533683777, -0.5732248425483704, 0.16728484630584717, -0.28669416904449463, -0.4487186372280121, 0.14929597079753876, -0.34644925594329834, -0.3457983136177063, 0.3194851279258728, -0.034476783126592636, 0.5397188067436218, -0.10215858370065689, 0.19894304871559143, -0.43351271748542786, -0.06863754242658615, -0.03415028750896454, -0.0356619693338871, 0.1388118714094162, 0.11561058461666107, 0.06141895055770874, -0.2835664749145508, -0.15464697778224945, -0.22539778053760529, -0.3233312964439392, 0.16909509897232056, -0.20620840787887573, 0.2027805894613266, 0.25508347153663635, -0.022730587050318718, 0.062203194946050644, -0.3148316740989685, -0.11034421622753143, -0.06736800074577332, -0.05748068541288376, 0.017110029235482216, -0.0726098120212555, 0.3511285185813904, -0.28809982538223267, -0.03999059647321701, 0.10528382658958435, -0.30695095658302307, 0.7045114040374756, -0.39593854546546936, 0.12198589742183685, 0.6507042050361633, -0.20352043211460114, 0.43669697642326355, -0.08261708915233612, 0.33488935232162476, 0.18824230134487152, -0.05185430496931076, 0.0956459641456604, -0.046184949576854706, 0.27138498425483704, -0.5008631348609924, -0.10190226882696152, -0.2713533341884613, -0.13915404677391052, -0.5069949626922607, -0.2255198210477829, -0.4302298128604889, -0.4604373872280121, 0.23047788441181183, 0.09097637236118317, -0.05869802087545395, 0.17006081342697144, -0.04218506067991257, 0.13220545649528503, -0.2719265818595886, 0.15502162277698517, -0.1330125480890274, -0.008953239768743515, 0.06388071179389954, 0.13648904860019684, 0.1463654488325119, 0.43435758352279663, 0.39732813835144043, 0.005105677526444197, -0.5073907375335693, 0.06412447243928909, 0.317185640335083, 0.028321657329797745, -0.24402883648872375, -0.13859783113002777, 0.02079680562019348, -0.36482131481170654, -0.06746699661016464, 0.10585927218198776, 0.17663165926933289, 0.10042422264814377, 0.23104320466518402, 0.011202006600797176, -0.4799419939517975, 0.07504399865865707, -0.2151433229446411, -0.11999689787626266, -0.22614137828350067, 0.3898008167743683, -0.0957811251282692, 0.054085806012153625, 0.14183148741722107, 0.3962549567222595, -0.033237822353839874, -0.058978527784347534, -0.30747365951538086, -0.18908841907978058, -0.5284598469734192, 0.42523449659347534, -0.08457041531801224, 0.054827407002449036, -0.17125515639781952, -0.6365629434585571, 0.02252303622663021, 0.2913704216480255, -0.0731276348233223, -0.03525663912296295, 0.06590966135263443, 0.22969745099544525, 0.03277761861681938, -0.2901079058647156, -0.09540557861328125, -0.4920993745326996, 0.4512873589992523, 0.45762449502944946, 0.5969650149345398, -0.4474855065345764, -0.39598920941352844, 0.19128622114658356, -0.24005910754203796, -0.00761824008077383, 0.201121985912323, -0.21852906048297882, -0.07689999788999557, -0.10535513609647751, -0.3052063584327698, 0.12023806571960449, -0.07214673608541489, -0.451823890209198, 0.18429706990718842, 0.045441266149282455, 0.10270094871520996, 0.39308539032936096, 0.10823717713356018, 0.08260007202625275, -0.022183284163475037, 0.059543851763010025, 0.2480269819498062, 0.19855675101280212, 0.02724207565188408, 0.5696773529052734, 0.034686729311943054, -0.3558327853679657, 0.0104207843542099, 0.09907814860343933, 0.2703761160373688, 0.6357897520065308, -0.1629931777715683, 0.3763466775417328, 0.25636473298072815, 0.3062859773635864, -0.33170875906944275, 0.15757790207862854, 0.35406944155693054, 0.22531238198280334, -0.36839109659194946, 0.08307672291994095, 0.6284778714179993, 0.15440931916236877, -0.18892978131771088, 0.5192850232124329, 0.561620831489563, -0.41181331872940063, 0.26867324113845825, -0.05771908909082413, 1.0515259504318237, -0.0787278413772583, 0.22432252764701843, -0.15755261480808258, -0.480335533618927, 0.6950418949127197, 0.24165745079517365, 0.1644829362630844, -0.34810853004455566, -0.1683157980442047, 0.11253072321414948, -0.19303733110427856, 0.25048258900642395, 0.0173904150724411, -0.2088644802570343, -0.11951153725385666, -0.29816463589668274, 0.21471142768859863, -0.19591587781906128, 0.10886625200510025, -0.29284003376960754, -0.20476874709129333, -0.5198537707328796, -0.07585018873214722, -0.031084761023521423, 0.10965879261493683, -0.04274296388030052, -0.1458023190498352, -0.012235129252076149, -0.13321931660175323, -0.43439579010009766, -0.43718644976615906, 0.3731706440448761, 0.011754043400287628, 0.41632822155952454, -0.38172364234924316, 0.030349185690283775, 0.10533785820007324, 0.3178354799747467, 0.07706253230571747, -0.08950159698724747, -0.09417206794023514, -0.17073002457618713, 0.18126802146434784, 0.10491013526916504, -0.00680010998621583, 0.24358601868152618, 0.22937053442001343, -0.07940211147069931, 0.15514244139194489, 0.06029469519853592, -0.1993076503276825, 0.023304633796215057, -0.2982434332370758, -0.39913251996040344, -0.25357139110565186, 0.4907605051994324, 0.2858036458492279, -0.014447931200265884, 0.026336966082453728, 0.00967146921902895, 0.11967597901821136, -0.04780928045511246, -0.026443935930728912, 0.13513953983783722, -0.5101804137229919, -0.006517613772302866, 0.20703904330730438, -0.02504779025912285, -0.022850072011351585, 0.2854442894458771, -0.06485437601804733, -0.11463624238967896, -0.03536149114370346, 0.4134580194950104, 0.33528152108192444, -0.474040150642395, 0.3915545642375946, -0.08857998996973038, -0.2742890417575836, -0.1122129037976265, 0.01942417584359646, 0.22735756635665894, 0.10049382597208023, -0.3486247658729553, 0.0035252906382083893, -0.5281161069869995, 0.6595491170883179, -0.018185937777161598, 0.33230704069137573, -0.4016897976398468, 0.07083756476640701, -0.14904522895812988, -0.0903487503528595, -0.19158586859703064, -0.06198357790708542, -0.2875705361366272, 0.055051036179065704, 0.0313849113881588, -0.06127826124429703, 0.37004515528678894, 0.12348295003175735, 0.03752836957573891, -0.22599878907203674, -0.06902975589036942, 0.022739963605999947, -0.07921091467142105, 0.16768668591976166, -0.25551730394363403, -0.2914048731327057, 0.14799541234970093, 0.013096451759338379, 0.0895102247595787, -0.19120754301548004, 0.4658157229423523, 0.47806644439697266, 0.19950047135353088, 0.496457576751709, -0.30062487721443176, 0.26927778124809265, 0.007000067736953497, -0.16029100120067596, 0.2643516957759857, 0.2556019723415375, -0.0177998635917902, 0.17726197838783264, -0.34852707386016846, 0.07264137268066406, 0.27804693579673767, 0.4325282573699951, 0.038256000727415085, 0.05313510447740555, 0.08974979817867279, 0.17920620739459991, -0.23109586536884308, 0.12106488645076752, 0.08411014825105667, 0.4048546552658081, -0.18954552710056305, 0.11147364228963852, -0.23155198991298676, 0.027310634031891823, 0.07490859180688858, 0.11555790901184082, -0.16324923932552338, -0.031543079763650894, 0.005529509857296944, 0.4606438875198364, -0.1514132022857666, -0.18613047897815704, 0.5105668306350708, 0.027987040579319, -0.1761777549982071, -0.03677017241716385, 0.36691591143608093, 0.21806029975414276, -0.1518862396478653, -0.09311269968748093, 0.37154847383499146, 0.11891927570104599, 0.3561660647392273, -0.18375073373317719, 0.08929575234651566, 0.15747281908988953, -0.34929466247558594, 0.09682630747556686, 0.1640324592590332, -0.0351882129907608, -0.0019461280899122357, 0.3601389229297638, -0.31405186653137207, 0.07499648630619049, 0.077106773853302, 0.22599159181118011, 0.07864246517419815, 0.023490356281399727, -0.06489083170890808, -0.2727428674697876, -0.10090840607881546, -0.3651106655597687, 0.3515729010105133, -0.04304854944348335, -0.26420754194259644, -0.26071205735206604, -0.03272438049316406, -0.3277744650840759, 0.16574576497077942, -0.1916966736316681, -0.008769326843321323, -0.012380288913846016, 0.09686732292175293, 0.07289852201938629, 0.6242204904556274, -0.22670744359493256, -0.1102113425731659, 0.21850647032260895, 0.21571053564548492, 0.4750940203666687, 0.5750282406806946, 0.433774471282959, 0.019205614924430847, -0.06542506814002991, 0.1829201579093933, 0.1801280379295349, 0.07729005068540573, 0.1416485756635666, 0.432101845741272, -0.21790434420108795, 0.018550023436546326, 0.10323059558868408, 0.047598570585250854, 0.053462158888578415, -0.12792089581489563, -0.2434787154197693, -0.003383008996024728, -0.34346622228622437, 0.7594910264015198, -0.19949989020824432, -0.11746852099895477, 0.13082943856716156, -0.14526523649692535, -0.3394356369972229, -0.5112399458885193, 0.4027400612831116, 0.1448565125465393, 0.03041812963783741, 0.07095954567193985, 0.05362476035952568, -0.2660657465457916, 0.14133575558662415, 0.3206530809402466, 0.2523707449436188, -0.008295673877000809, 0.062471337616443634, -0.09554924070835114, 0.05397014319896698, 0.25192487239837646, -0.17334261536598206, 0.04292687773704529, -0.1633804887533188, 0.1606701910495758, 0.14176300168037415, 0.1481829136610031, -0.2656475007534027, -0.06336567550897598, -0.14379867911338806, -0.20846900343894958, -0.12320822477340698, 0.03425665572285652, -0.10477049648761749, 0.11501472443342209, -0.07543004304170609, 0.14052683115005493, 0.1080743670463562, -0.1116308942437172, -0.10779274255037308, -0.03741367906332016, 0.23068761825561523, 0.26616811752319336, 0.20558220148086548, 0.12155282497406006, -0.15387201309204102, 0.061189159750938416, -0.6028909683227539, -0.18885093927383423, -0.3893945515155792, -0.16321448981761932, 0.15789930522441864, -0.2710793912410736, -0.03093794919550419, -0.2790282368659973, -0.1647609919309616, -0.20686639845371246, 0.1150200143456459, 0.12343228608369827, -0.17677879333496094, -0.20392294228076935, 0.17640407383441925, -0.2128606140613556, -0.1381819099187851, 0.051224127411842346, 0.317615270614624, 0.0969868004322052, 0.09997110068798065, -0.15032252669334412, -0.24951425194740295, 0.5768630504608154, -0.2938460409641266, -0.09680395573377609, 0.2487761527299881, 0.5207476615905762, 0.1378048062324524, -0.12858827412128448, -0.6660386323928833, -0.1548406183719635, 0.2529764175415039, -0.3253512978553772, 0.10311932861804962, 0.003931870684027672, -0.34821125864982605, -0.12316140532493591, -0.18256506323814392, 0.2663155496120453, 0.07339667528867722, 0.04313156008720398, -0.0564294271171093, -0.3381454050540924 ]
https://github.com/huggingface/datasets/issues/2542
`datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA`
Hi @VictorSanh, thank you for reporting this issue with duplicated keys. - The issue with "adversarial_qa" was fixed 23 days ago: #2433. Current version of `datasets` (1.8.0) includes the patch. - I am investigating the issue with `drop`. I'll ping you to keep you informed.
## Describe the bug Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys. ## Steps to reproduce the bug ```python from datasets import load_dataset load_dataset("drop") load_dataset("adversarial_qa", "adversarialQA") ``` ## Expected results The examples keys should be unique. ## Actual results ```bash >>> load_dataset("drop") Using custom data configuration default Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset use_auth_token=use_auth_token, File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split num_examples, num_bytes = writer.finalize() File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize self.check_duplicate_keys() File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398 Keys should be unique and deterministic in nature ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.7.0 - Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyArrow version: 3.0.0
45
`datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA` ## Describe the bug Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys. ## Steps to reproduce the bug ```python from datasets import load_dataset load_dataset("drop") load_dataset("adversarial_qa", "adversarialQA") ``` ## Expected results The examples keys should be unique. ## Actual results ```bash >>> load_dataset("drop") Using custom data configuration default Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset use_auth_token=use_auth_token, File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split num_examples, num_bytes = writer.finalize() File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize self.check_duplicate_keys() File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398 Keys should be unique and deterministic in nature ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.7.0 - Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyArrow version: 3.0.0 Hi @VictorSanh, thank you for reporting this issue with duplicated keys. - The issue with "adversarial_qa" was fixed 23 days ago: #2433. Current version of `datasets` (1.8.0) includes the patch. - I am investigating the issue with `drop`. I'll ping you to keep you informed.
[ -0.0905088484287262, -0.11600686609745026, 0.009455200284719467, 0.4709075391292572, 0.08408752828836441, 0.028658684343099594, 0.3028094172477722, 0.23976510763168335, 0.12779688835144043, 0.18143528699874878, -0.14392127096652985, 0.5057469606399536, -0.04829593747854233, 0.1198931485414505, 0.02666979469358921, -0.03278514742851257, 0.00128503970336169, 0.01367267593741417, -0.29827991127967834, -0.07621006667613983, -0.2426401972770691, 0.38705018162727356, -0.2559150457382202, 0.10335338860750198, 0.059840552508831024, -0.10427563637495041, -0.15724703669548035, 0.3131025731563568, -0.04336675629019737, -0.28979504108428955, 0.1407245546579361, 0.011254376731812954, -0.28365597128868103, 0.4620528519153595, -0.00010877361637540162, -0.017960375174880028, 0.13475917279720306, 0.06381095200777054, -0.4384644031524658, -0.1568869948387146, -0.2514856159687042, -0.05155928060412407, -0.08784876018762589, -0.27699732780456543, 0.13033246994018555, -0.2024020403623581, -0.3193138837814331, -0.3765532672405243, 0.7059350609779358, 0.09643036127090454, 0.2584540843963623, 0.2994430363178253, 0.05786716565489769, -0.2653636336326599, 0.1903436779975891, 0.03764496371150017, -0.19947922229766846, 0.20626240968704224, -0.014755974523723125, -0.06700916588306427, 0.3541852831840515, 0.16036856174468994, -0.014585134573280811, -0.05063977837562561, 0.20403489470481873, 0.06789505481719971, 0.012983021326363087, -0.16960810124874115, 0.34044149518013, 0.3239114582538605, 0.24727870523929596, -0.5006280541419983, -0.200030118227005, -0.28008273243904114, 0.28446686267852783, -0.0895540788769722, 0.1983644962310791, 0.04119636490941048, -0.24880747497081757, 0.1426335722208023, 0.06654725223779678, 0.13136258721351624, 0.05874668061733246, -0.07923700660467148, 0.15524859726428986, -0.0006445854669436812, 0.0497320257127285, 0.08948951214551926, 0.15734323859214783, -0.17231175303459167, -0.01850946806371212, -0.36470335721969604, 0.019967306405305862, -0.1255144625902176, -0.5385661721229553, 0.01297740451991558, -0.06292809545993805, 0.025668999180197716, 0.43645158410072327, 0.07410282641649246, 0.22148707509040833, -0.09840679913759232, -0.04824749007821083, 0.002411695895716548, 0.03990456461906433, 0.39611199498176575, 0.17628903687000275, 0.09121080487966537, 0.15046750009059906, 0.19072078168392181, -0.23070842027664185, 0.16412977874279022, 0.05689925700426102, -0.1409793645143509, 0.2863471210002899, 0.15518829226493835, 0.600986897945404, -0.06930512189865112, -0.42481204867362976, 0.20331652462482452, -0.16763246059417725, -0.12456643581390381, -0.23273113369941711, 0.11765425652265549, 0.09356751292943954, -0.021901778876781464, -0.12567833065986633, 0.20161664485931396, -0.32976555824279785, -0.1748310625553131, -0.2609868347644806, -0.012509048916399479, -0.008571654558181763, -0.07222956418991089, 0.08384183794260025, -0.18119756877422333, 0.2779160439968109, 0.3087562322616577, -0.004612268880009651, -0.13791470229625702, 0.2745800018310547, 0.09290984272956848, -0.2666785717010498, 0.0398339182138443, 0.17050112783908844, 0.0668969675898552, 0.18792951107025146, -0.36020228266716003, 0.0600280836224556, 0.11222171038389206, -0.028951531276106834, -0.1286870241165161, -0.11769082397222519, 0.3158142864704132, 0.02569279633462429, 0.09723175317049026, -0.17660610377788544, 0.14941224455833435, 0.11193063855171204, 0.09068075567483902, -0.004402543883770704, 0.039072804152965546, -0.15988963842391968, -0.42874646186828613, 0.2847689986228943, 0.7104182243347168, -0.32561156153678894, -0.131952702999115, -0.14311985671520233, 0.0301797054708004, 0.14422501623630524, 0.22938241064548492, -0.17597955465316772, 0.2083805799484253, -0.300104022026062, 0.11739272624254227, 0.0831044390797615, -0.34288546442985535, -0.49173372983932495, 0.29088103771209717, -0.3543907403945923, 0.19002678990364075, 0.17368541657924652, -0.05516777187585831, 0.2153705358505249, -0.0025119760539382696, 0.011651725508272648, -0.01654847525060177, -0.09076081961393356, -0.13531044125556946, -0.3101503849029541, -0.33662429451942444, 0.17491373419761658, -0.2637748718261719, 0.02848367765545845, 0.06559815257787704, 0.35739102959632874, -0.07049783319234848, 0.2868717312812805, -0.061024341732263565, 0.04679000377655029, 0.08632995188236237, 0.25373417139053345, -0.06032803654670715, 0.22050826251506805, -0.019394230097532272, -0.5272821187973022, 0.3890167772769928, -0.2856178879737854, 0.03896470367908478, -0.15008294582366943, -0.29366356134414673, -0.5489760637283325, 0.05413832888007164, -0.45720386505126953, -0.2501842677593231, 0.24877038598060608, 0.1914096176624298, -0.02845778316259384, 0.11421244591474533, -0.06473436951637268, 0.22202596068382263, 0.04494009166955948, 0.049014862626791, -0.42425552010536194, 0.25993451476097107, -0.38178199529647827, 0.05268148332834244, 0.08389723300933838, 0.2135804146528244, 0.41540899872779846, -0.053219519555568695, -0.12521030008792877, 0.39298492670059204, -0.036285653710365295, 0.01513927523046732, 0.20108740031719208, -0.13905423879623413, 0.2122400850057602, -0.1353645920753479, 0.2662816047668457, 0.10705946385860443, 0.18308401107788086, -0.13982439041137695, -0.012119622901082039, 0.27618101239204407, -0.18503811955451965, 0.15243884921073914, -0.05690860003232956, -0.005315202753990889, 0.13712722063064575, -0.23017236590385437, 0.15110373497009277, -0.21829134225845337, 0.07417730242013931, -0.10675780475139618, 0.1758691966533661, -0.032505907118320465, -0.14562952518463135, 0.17780780792236328, 0.1834479570388794, -0.15427376329898834, 0.171808660030365, -0.047923631966114044, 0.032778799533843994, -0.09463884681463242, 0.025892218574881554, 0.5896528959274292, 0.6832952499389648, 0.184027761220932, 0.09309874475002289, 0.18257680535316467, 0.010152257978916168, -0.17365196347236633, 0.4018148183822632, -0.23067696392536163, -0.1879463493824005, 0.3399556577205658, 0.13380317389965057, 0.09127596020698547, -0.3779129087924957, -0.07041949778795242, 0.1394081860780716, 0.22343729436397552, -0.2576567232608795, -0.013611288741230965, -0.4151092767715454, -0.04335867986083031, -0.14741499722003937, 0.25531110167503357, -0.016331518068909645, -0.3288874626159668, 0.1003982275724411, -0.17009992897510529, 0.03780603036284447, 0.282753586769104, -0.08029760420322418, 0.21931742131710052, -0.0255131833255291, 0.31167593598365784, -0.1784825176000595, 0.06612176448106766, -0.26238879561424255, 0.1238638237118721, 0.08686520159244537, 0.1311304122209549, 0.4407128691673279, -0.14069893956184387, -0.3182704448699951, -0.3026193678379059, -0.20355238020420074, 0.13791051506996155, -0.010499514639377594, 0.35646334290504456, 0.3850204050540924, 0.018612287938594818, -0.1929817795753479, -0.3572027087211609, 0.25554922223091125, -0.09539654105901718, -0.45416346192359924, 0.08962620794773102, -0.0987124890089035, 0.030877238139510155, -0.19220110774040222, -0.5104906558990479, -0.1726352870464325, -0.25200968980789185, 0.07736135274171829, -0.14388298988342285, 0.14062529802322388, 0.3311223089694977, -0.03031121753156185, 0.14079804718494415, 0.0260431170463562, 0.09881429374217987, -0.4347647726535797, -0.1841462403535843, 0.060204531997442245, -0.27621886134147644, -0.29747843742370605, -0.016933301463723183, -0.12270302325487137, 0.3157135546207428, -0.11578913033008575, -0.4564085900783539, -0.30707764625549316, -0.24925640225410461, 0.3409290611743927, -0.18406975269317627, 0.28685691952705383, 0.16756926476955414, 0.14749853312969208, -0.14265631139278412, -0.2416718602180481, -0.05387827754020691, 0.2804363965988159, -0.21173277497291565, 0.04007982835173607, 0.15095071494579315, 0.5182058215141296, 0.07246765494346619, 0.6133500933647156, 0.5002938508987427, 0.0882740318775177, 0.27911725640296936, -0.09282220155000687, 0.28917035460472107, -0.17085081338882446, -0.47795283794403076, -0.2943907082080841, 0.1661696881055832, 0.20613303780555725, 0.22674277424812317, -0.13078229129314423, 0.12601476907730103, 0.09188037365674973, -0.09142597019672394, -0.49831801652908325, -0.28099337220191956, -0.2584247291088104, -0.20793692767620087, 0.05941680446267128, 0.05599012225866318, 0.0944301038980484, -0.05890411511063576, 0.15206973254680634, 0.18828579783439636, 0.15231254696846008, 0.025005124509334564, 0.02369089238345623, -0.328214555978775, 0.029118500649929047, -0.41093772649765015, 0.22507955133914948, -0.2089010328054428, 0.32131415605545044, -0.11749539524316788, 0.12020594626665115, 0.027809109538793564, -0.010815558023750782, 0.6370673179626465, -0.36702343821525574, 0.16467970609664917, 0.08423113822937012, -0.15883800387382507, -0.12118303775787354, -0.030156901106238365, -0.013596780598163605, 0.11489186435937881, -0.031582895666360855, 0.22851505875587463, -0.5454472899436951, 0.13114666938781738, 0.20340506732463837, 0.27167364954948425, -0.17419366538524628, -0.2394859492778778, -0.03875061124563217, -0.49272698163986206, -0.49858856201171875, -0.14774386584758759, 0.011749726720154285, 0.22825217247009277, -0.16526535153388977, -0.05062034726142883, 0.015709465369582176, -0.17145739495754242, 0.17753583192825317, 0.14794711768627167, 0.2621709704399109, 0.21577900648117065, 0.6348121762275696, 0.13568025827407837, -0.15211381018161774, 0.16173969209194183, 0.6787911057472229, -0.1573691964149475, -0.21830376982688904, -0.28060731291770935, -0.17293259501457214, -0.2247733324766159, 0.27547234296798706, -0.14847496151924133, 0.3007209300994873, -0.14159056544303894, 0.020461345091462135, 0.21394190192222595, -0.31482815742492676, 0.20353169739246368, -0.16996702551841736, 0.008935756981372833, -0.3534320294857025, 0.015711767598986626, -0.058617595583200455, -0.2973245680332184, 0.1694922298192978, 0.1423400640487671, -0.22121013700962067, 0.3661328852176666, -0.19166558980941772, 0.8777389526367188, -0.06577461957931519, 0.009235185571014881, 0.16281937062740326, -0.22479718923568726, 0.36184054613113403, 0.09007766842842102, -0.16404201090335846, -0.46123334765434265, -0.30056101083755493, 0.15818744897842407, 0.0517323799431324, 0.15665830671787262, 0.1095854714512825, -0.29953649640083313, 0.20863895118236542, -0.11819254606962204, 0.09699245542287827, -0.047566402703523636, 0.28759652376174927, -0.2880065143108368, 0.07010500133037567, -0.1188703253865242, 0.1461499035358429, 0.06944262236356735, 0.049490801990032196, 0.048963241279125214, -0.11717892438173294, 0.1988668143749237, -0.48689767718315125, -0.2058994024991989, 0.033626191318035126, -0.3923664093017578, 0.3286436200141907, -0.11808546632528305, -0.33705705404281616, 0.20586104691028595, 0.43076378107070923, 0.46229836344718933, 0.24825046956539154, 0.018758315593004227, 0.05462849140167236, -0.007000075187534094, 0.2869390845298767, -0.12581761181354523, -0.23437227308750153, -0.011666174046695232, -0.11056018620729446, -0.35480180382728577, -0.10906891524791718, 0.15375103056430817, -0.08207840472459793, -0.24886228144168854, 0.11522730439901352, -0.06754521280527115, -0.12466622143983841, 0.023434240370988846, -0.14110925793647766, -0.17765332758426666, -0.4434715509414673, 0.13038647174835205, 0.13123612105846405, -0.17543984949588776, 0.22193670272827148, -0.18838149309158325, -0.1558762788772583, -0.041596926748752594, 0.3397011160850525, 0.1883184313774109, 0.24744123220443726, 0.5482301115989685, 0.055155474692583084, 0.042593784630298615, -0.253175288438797, -0.007690177299082279, 0.040628574788570404, -0.47690558433532715, 0.1915147304534912, -0.2640392780303955, 0.14428596198558807, 0.10886898636817932, 0.35771486163139343, 0.2171236127614975, 0.13662555813789368, 0.16879864037036896, -0.30376407504081726, -0.1269870400428772, 0.029950857162475586, 0.19083307683467865, 0.21747374534606934, 0.17312341928482056, -0.019191592931747437, -0.1452842354774475, 0.32744765281677246, -0.36895182728767395, 0.23783797025680542, -0.004665212705731392, -0.010238425806164742, 0.0007049788255244493, -0.11995133757591248, 0.039675258100032806, 0.11998622864484787, 0.202909916639328, 0.22615358233451843, -0.05593514069914818, -0.26797327399253845, -0.25219881534576416, 0.13160142302513123, -0.21849790215492249, -0.16821405291557312, -0.06940256804227829, -0.2364601343870163, -0.05867348238825798, -0.083917997777462, 0.4266134798526764, 0.13718357682228088, 0.0029950665775686502, 0.1578780561685562, 0.15296711027622223, 0.14564646780490875, -0.16317996382713318, 0.18801695108413696, -0.26906678080558777, 0.016333790495991707, 0.14150036871433258, 0.09483511000871658, -0.018950289115309715, -0.17155230045318604, -0.33726778626441956, 0.0826948881149292, -0.05604863166809082, 0.1779661327600479, 0.2785223424434662, -0.20525234937667847, -0.2647082507610321, 0.4296862781047821, 0.2974286675453186, 0.09966787695884705, -0.1986873894929886, 0.005100209265947342, 0.033595919609069824, 0.27050548791885376, -0.39920371770858765, -0.43699321150779724, 0.1719176322221756, -0.13999709486961365, 0.11391419172286987, 0.30594536662101746, 0.225458025932312, -0.3515103757381439, -0.27867400646209717, 0.11731936037540436, 0.3834746181964874, -0.08047918230295181, 0.22262340784072876, 0.4485849440097809, -0.08547059446573257, -0.07634764909744263, 0.026516281068325043, -0.12295867502689362, -0.026120033115148544, 0.32705771923065186, -0.23580893874168396, 0.31131041049957275, -0.13896885514259338, 0.0790470615029335, 0.2696990370750427, -0.37291815876960754, 0.44851818680763245, 0.13819316029548645, -0.2525947391986847, 0.022935541346669197, 0.15364494919776917, 0.16034412384033203, -0.0875273272395134, 0.080473393201828, -0.21754395961761475, 0.10587161779403687, -0.1773345023393631, -0.039666369557380676, -0.18827176094055176, -0.25918295979499817, -0.18296568095684052, -0.09380795061588287, -0.01209789328277111, -0.15875080227851868, 0.357146680355072, -0.06538508832454681, -0.2649567127227783, -0.2993311285972595, 0.044738348573446274, 0.29556065797805786, 0.13730444014072418, -0.4245438575744629, 0.0067300149239599705, 0.5594313740730286, -0.08068207651376724, -0.07908033579587936, 0.28080788254737854, 0.5457742214202881, 0.12703193724155426, -0.08278537541627884, 0.13831336796283722, 0.19294121861457825, -0.06373762339353561, -0.1260761022567749, 0.2143981158733368, -0.017314206808805466, 0.17054657638072968, 0.22341620922088623, 0.15142613649368286, -0.21100495755672455, -0.23218266665935516, 0.4559074640274048, -0.14533087611198425, -0.3635571002960205, 0.192087784409523, -0.23783984780311584, -0.032357022166252136, -0.09697262942790985, 0.36510413885116577, -0.2949545979499817, -0.19430580735206604, 0.18723993003368378, 0.23472122848033905, 0.14087115228176117, -0.42756009101867676, 0.1380084902048111, -0.15437628328800201, 0.12612567842006683, 0.24674034118652344, -0.1832292228937149, -0.3851373791694641, -0.015750007703900337, -0.7335858941078186, 0.20096616446971893, -0.1504068672657013, -0.07076635211706161, 0.07067649811506271, 0.23287685215473175, -0.013510056771337986, 0.07429404556751251, 0.23220184445381165, 0.22830253839492798, -0.09368480741977692, 0.49654823541641235, -0.4009828269481659, -0.22507470846176147, 0.11375031620264053, -0.12369860708713531, 0.09055047482252121, -0.43166112899780273, 0.2643917202949524, -0.01502981036901474, 0.08418003469705582, -0.05555405840277672, 0.002655820921063423, 0.32953161001205444, -0.23907922208309174, 0.24798105657100677, 0.30157139897346497, 0.45594215393066406, -0.11074330657720566, -0.28018438816070557, 0.012905188836157322, -0.03686358034610748, -0.04112657904624939, 0.28016918897628784, 0.3217189311981201, 0.2556380033493042, 0.10584640502929688, -0.288521409034729, -0.22451946139335632, 0.33878350257873535, 0.21528802812099457, 0.04287131503224373, -0.3165062367916107, 0.4041506350040436, -0.04459899663925171, 0.052679117769002914, 0.13927698135375977, 0.32261791825294495, -0.019639864563941956, 0.274564653635025, -0.332792729139328, -0.6344324350357056, 0.3417712152004242, -0.3225765526294708, -0.17968590557575226, -0.27400943636894226, 0.36774468421936035, -0.0831625759601593, -0.1276746541261673, -0.2130843847990036, 0.139754056930542, 0.42954593896865845, -0.2491011917591095, 0.06518565118312836, 0.3638625741004944, -0.06338633596897125, 0.12496094405651093, 0.20453575253486633, 0.14473958313465118, 0.12418326735496521, -0.2364501953125, 0.5228365063667297, -0.1628025621175766 ]
https://github.com/huggingface/datasets/issues/2542
`datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA`
Hi @VictorSanh, the issue is already fixed and merged into master branch and will be included in our next release version 1.9.0.
## Describe the bug Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys. ## Steps to reproduce the bug ```python from datasets import load_dataset load_dataset("drop") load_dataset("adversarial_qa", "adversarialQA") ``` ## Expected results The examples keys should be unique. ## Actual results ```bash >>> load_dataset("drop") Using custom data configuration default Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset use_auth_token=use_auth_token, File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split num_examples, num_bytes = writer.finalize() File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize self.check_duplicate_keys() File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398 Keys should be unique and deterministic in nature ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.7.0 - Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyArrow version: 3.0.0
22
`datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA` ## Describe the bug Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys. ## Steps to reproduce the bug ```python from datasets import load_dataset load_dataset("drop") load_dataset("adversarial_qa", "adversarialQA") ``` ## Expected results The examples keys should be unique. ## Actual results ```bash >>> load_dataset("drop") Using custom data configuration default Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset use_auth_token=use_auth_token, File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split num_examples, num_bytes = writer.finalize() File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize self.check_duplicate_keys() File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys raise DuplicatedKeysError(key) datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398 Keys should be unique and deterministic in nature ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.7.0 - Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyArrow version: 3.0.0 Hi @VictorSanh, the issue is already fixed and merged into master branch and will be included in our next release version 1.9.0.
[ -0.0905088484287262, -0.11600686609745026, 0.009455200284719467, 0.4709075391292572, 0.08408752828836441, 0.028658684343099594, 0.3028094172477722, 0.23976510763168335, 0.12779688835144043, 0.18143528699874878, -0.14392127096652985, 0.5057469606399536, -0.04829593747854233, 0.1198931485414505, 0.02666979469358921, -0.03278514742851257, 0.00128503970336169, 0.01367267593741417, -0.29827991127967834, -0.07621006667613983, -0.2426401972770691, 0.38705018162727356, -0.2559150457382202, 0.10335338860750198, 0.059840552508831024, -0.10427563637495041, -0.15724703669548035, 0.3131025731563568, -0.04336675629019737, -0.28979504108428955, 0.1407245546579361, 0.011254376731812954, -0.28365597128868103, 0.4620528519153595, -0.00010877361637540162, -0.017960375174880028, 0.13475917279720306, 0.06381095200777054, -0.4384644031524658, -0.1568869948387146, -0.2514856159687042, -0.05155928060412407, -0.08784876018762589, -0.27699732780456543, 0.13033246994018555, -0.2024020403623581, -0.3193138837814331, -0.3765532672405243, 0.7059350609779358, 0.09643036127090454, 0.2584540843963623, 0.2994430363178253, 0.05786716565489769, -0.2653636336326599, 0.1903436779975891, 0.03764496371150017, -0.19947922229766846, 0.20626240968704224, -0.014755974523723125, -0.06700916588306427, 0.3541852831840515, 0.16036856174468994, -0.014585134573280811, -0.05063977837562561, 0.20403489470481873, 0.06789505481719971, 0.012983021326363087, -0.16960810124874115, 0.34044149518013, 0.3239114582538605, 0.24727870523929596, -0.5006280541419983, -0.200030118227005, -0.28008273243904114, 0.28446686267852783, -0.0895540788769722, 0.1983644962310791, 0.04119636490941048, -0.24880747497081757, 0.1426335722208023, 0.06654725223779678, 0.13136258721351624, 0.05874668061733246, -0.07923700660467148, 0.15524859726428986, -0.0006445854669436812, 0.0497320257127285, 0.08948951214551926, 0.15734323859214783, -0.17231175303459167, -0.01850946806371212, -0.36470335721969604, 0.019967306405305862, -0.1255144625902176, -0.5385661721229553, 0.01297740451991558, -0.06292809545993805, 0.025668999180197716, 0.43645158410072327, 0.07410282641649246, 0.22148707509040833, -0.09840679913759232, -0.04824749007821083, 0.002411695895716548, 0.03990456461906433, 0.39611199498176575, 0.17628903687000275, 0.09121080487966537, 0.15046750009059906, 0.19072078168392181, -0.23070842027664185, 0.16412977874279022, 0.05689925700426102, -0.1409793645143509, 0.2863471210002899, 0.15518829226493835, 0.600986897945404, -0.06930512189865112, -0.42481204867362976, 0.20331652462482452, -0.16763246059417725, -0.12456643581390381, -0.23273113369941711, 0.11765425652265549, 0.09356751292943954, -0.021901778876781464, -0.12567833065986633, 0.20161664485931396, -0.32976555824279785, -0.1748310625553131, -0.2609868347644806, -0.012509048916399479, -0.008571654558181763, -0.07222956418991089, 0.08384183794260025, -0.18119756877422333, 0.2779160439968109, 0.3087562322616577, -0.004612268880009651, -0.13791470229625702, 0.2745800018310547, 0.09290984272956848, -0.2666785717010498, 0.0398339182138443, 0.17050112783908844, 0.0668969675898552, 0.18792951107025146, -0.36020228266716003, 0.0600280836224556, 0.11222171038389206, -0.028951531276106834, -0.1286870241165161, -0.11769082397222519, 0.3158142864704132, 0.02569279633462429, 0.09723175317049026, -0.17660610377788544, 0.14941224455833435, 0.11193063855171204, 0.09068075567483902, -0.004402543883770704, 0.039072804152965546, -0.15988963842391968, -0.42874646186828613, 0.2847689986228943, 0.7104182243347168, -0.32561156153678894, -0.131952702999115, -0.14311985671520233, 0.0301797054708004, 0.14422501623630524, 0.22938241064548492, -0.17597955465316772, 0.2083805799484253, -0.300104022026062, 0.11739272624254227, 0.0831044390797615, -0.34288546442985535, -0.49173372983932495, 0.29088103771209717, -0.3543907403945923, 0.19002678990364075, 0.17368541657924652, -0.05516777187585831, 0.2153705358505249, -0.0025119760539382696, 0.011651725508272648, -0.01654847525060177, -0.09076081961393356, -0.13531044125556946, -0.3101503849029541, -0.33662429451942444, 0.17491373419761658, -0.2637748718261719, 0.02848367765545845, 0.06559815257787704, 0.35739102959632874, -0.07049783319234848, 0.2868717312812805, -0.061024341732263565, 0.04679000377655029, 0.08632995188236237, 0.25373417139053345, -0.06032803654670715, 0.22050826251506805, -0.019394230097532272, -0.5272821187973022, 0.3890167772769928, -0.2856178879737854, 0.03896470367908478, -0.15008294582366943, -0.29366356134414673, -0.5489760637283325, 0.05413832888007164, -0.45720386505126953, -0.2501842677593231, 0.24877038598060608, 0.1914096176624298, -0.02845778316259384, 0.11421244591474533, -0.06473436951637268, 0.22202596068382263, 0.04494009166955948, 0.049014862626791, -0.42425552010536194, 0.25993451476097107, -0.38178199529647827, 0.05268148332834244, 0.08389723300933838, 0.2135804146528244, 0.41540899872779846, -0.053219519555568695, -0.12521030008792877, 0.39298492670059204, -0.036285653710365295, 0.01513927523046732, 0.20108740031719208, -0.13905423879623413, 0.2122400850057602, -0.1353645920753479, 0.2662816047668457, 0.10705946385860443, 0.18308401107788086, -0.13982439041137695, -0.012119622901082039, 0.27618101239204407, -0.18503811955451965, 0.15243884921073914, -0.05690860003232956, -0.005315202753990889, 0.13712722063064575, -0.23017236590385437, 0.15110373497009277, -0.21829134225845337, 0.07417730242013931, -0.10675780475139618, 0.1758691966533661, -0.032505907118320465, -0.14562952518463135, 0.17780780792236328, 0.1834479570388794, -0.15427376329898834, 0.171808660030365, -0.047923631966114044, 0.032778799533843994, -0.09463884681463242, 0.025892218574881554, 0.5896528959274292, 0.6832952499389648, 0.184027761220932, 0.09309874475002289, 0.18257680535316467, 0.010152257978916168, -0.17365196347236633, 0.4018148183822632, -0.23067696392536163, -0.1879463493824005, 0.3399556577205658, 0.13380317389965057, 0.09127596020698547, -0.3779129087924957, -0.07041949778795242, 0.1394081860780716, 0.22343729436397552, -0.2576567232608795, -0.013611288741230965, -0.4151092767715454, -0.04335867986083031, -0.14741499722003937, 0.25531110167503357, -0.016331518068909645, -0.3288874626159668, 0.1003982275724411, -0.17009992897510529, 0.03780603036284447, 0.282753586769104, -0.08029760420322418, 0.21931742131710052, -0.0255131833255291, 0.31167593598365784, -0.1784825176000595, 0.06612176448106766, -0.26238879561424255, 0.1238638237118721, 0.08686520159244537, 0.1311304122209549, 0.4407128691673279, -0.14069893956184387, -0.3182704448699951, -0.3026193678379059, -0.20355238020420074, 0.13791051506996155, -0.010499514639377594, 0.35646334290504456, 0.3850204050540924, 0.018612287938594818, -0.1929817795753479, -0.3572027087211609, 0.25554922223091125, -0.09539654105901718, -0.45416346192359924, 0.08962620794773102, -0.0987124890089035, 0.030877238139510155, -0.19220110774040222, -0.5104906558990479, -0.1726352870464325, -0.25200968980789185, 0.07736135274171829, -0.14388298988342285, 0.14062529802322388, 0.3311223089694977, -0.03031121753156185, 0.14079804718494415, 0.0260431170463562, 0.09881429374217987, -0.4347647726535797, -0.1841462403535843, 0.060204531997442245, -0.27621886134147644, -0.29747843742370605, -0.016933301463723183, -0.12270302325487137, 0.3157135546207428, -0.11578913033008575, -0.4564085900783539, -0.30707764625549316, -0.24925640225410461, 0.3409290611743927, -0.18406975269317627, 0.28685691952705383, 0.16756926476955414, 0.14749853312969208, -0.14265631139278412, -0.2416718602180481, -0.05387827754020691, 0.2804363965988159, -0.21173277497291565, 0.04007982835173607, 0.15095071494579315, 0.5182058215141296, 0.07246765494346619, 0.6133500933647156, 0.5002938508987427, 0.0882740318775177, 0.27911725640296936, -0.09282220155000687, 0.28917035460472107, -0.17085081338882446, -0.47795283794403076, -0.2943907082080841, 0.1661696881055832, 0.20613303780555725, 0.22674277424812317, -0.13078229129314423, 0.12601476907730103, 0.09188037365674973, -0.09142597019672394, -0.49831801652908325, -0.28099337220191956, -0.2584247291088104, -0.20793692767620087, 0.05941680446267128, 0.05599012225866318, 0.0944301038980484, -0.05890411511063576, 0.15206973254680634, 0.18828579783439636, 0.15231254696846008, 0.025005124509334564, 0.02369089238345623, -0.328214555978775, 0.029118500649929047, -0.41093772649765015, 0.22507955133914948, -0.2089010328054428, 0.32131415605545044, -0.11749539524316788, 0.12020594626665115, 0.027809109538793564, -0.010815558023750782, 0.6370673179626465, -0.36702343821525574, 0.16467970609664917, 0.08423113822937012, -0.15883800387382507, -0.12118303775787354, -0.030156901106238365, -0.013596780598163605, 0.11489186435937881, -0.031582895666360855, 0.22851505875587463, -0.5454472899436951, 0.13114666938781738, 0.20340506732463837, 0.27167364954948425, -0.17419366538524628, -0.2394859492778778, -0.03875061124563217, -0.49272698163986206, -0.49858856201171875, -0.14774386584758759, 0.011749726720154285, 0.22825217247009277, -0.16526535153388977, -0.05062034726142883, 0.015709465369582176, -0.17145739495754242, 0.17753583192825317, 0.14794711768627167, 0.2621709704399109, 0.21577900648117065, 0.6348121762275696, 0.13568025827407837, -0.15211381018161774, 0.16173969209194183, 0.6787911057472229, -0.1573691964149475, -0.21830376982688904, -0.28060731291770935, -0.17293259501457214, -0.2247733324766159, 0.27547234296798706, -0.14847496151924133, 0.3007209300994873, -0.14159056544303894, 0.020461345091462135, 0.21394190192222595, -0.31482815742492676, 0.20353169739246368, -0.16996702551841736, 0.008935756981372833, -0.3534320294857025, 0.015711767598986626, -0.058617595583200455, -0.2973245680332184, 0.1694922298192978, 0.1423400640487671, -0.22121013700962067, 0.3661328852176666, -0.19166558980941772, 0.8777389526367188, -0.06577461957931519, 0.009235185571014881, 0.16281937062740326, -0.22479718923568726, 0.36184054613113403, 0.09007766842842102, -0.16404201090335846, -0.46123334765434265, -0.30056101083755493, 0.15818744897842407, 0.0517323799431324, 0.15665830671787262, 0.1095854714512825, -0.29953649640083313, 0.20863895118236542, -0.11819254606962204, 0.09699245542287827, -0.047566402703523636, 0.28759652376174927, -0.2880065143108368, 0.07010500133037567, -0.1188703253865242, 0.1461499035358429, 0.06944262236356735, 0.049490801990032196, 0.048963241279125214, -0.11717892438173294, 0.1988668143749237, -0.48689767718315125, -0.2058994024991989, 0.033626191318035126, -0.3923664093017578, 0.3286436200141907, -0.11808546632528305, -0.33705705404281616, 0.20586104691028595, 0.43076378107070923, 0.46229836344718933, 0.24825046956539154, 0.018758315593004227, 0.05462849140167236, -0.007000075187534094, 0.2869390845298767, -0.12581761181354523, -0.23437227308750153, -0.011666174046695232, -0.11056018620729446, -0.35480180382728577, -0.10906891524791718, 0.15375103056430817, -0.08207840472459793, -0.24886228144168854, 0.11522730439901352, -0.06754521280527115, -0.12466622143983841, 0.023434240370988846, -0.14110925793647766, -0.17765332758426666, -0.4434715509414673, 0.13038647174835205, 0.13123612105846405, -0.17543984949588776, 0.22193670272827148, -0.18838149309158325, -0.1558762788772583, -0.041596926748752594, 0.3397011160850525, 0.1883184313774109, 0.24744123220443726, 0.5482301115989685, 0.055155474692583084, 0.042593784630298615, -0.253175288438797, -0.007690177299082279, 0.040628574788570404, -0.47690558433532715, 0.1915147304534912, -0.2640392780303955, 0.14428596198558807, 0.10886898636817932, 0.35771486163139343, 0.2171236127614975, 0.13662555813789368, 0.16879864037036896, -0.30376407504081726, -0.1269870400428772, 0.029950857162475586, 0.19083307683467865, 0.21747374534606934, 0.17312341928482056, -0.019191592931747437, -0.1452842354774475, 0.32744765281677246, -0.36895182728767395, 0.23783797025680542, -0.004665212705731392, -0.010238425806164742, 0.0007049788255244493, -0.11995133757591248, 0.039675258100032806, 0.11998622864484787, 0.202909916639328, 0.22615358233451843, -0.05593514069914818, -0.26797327399253845, -0.25219881534576416, 0.13160142302513123, -0.21849790215492249, -0.16821405291557312, -0.06940256804227829, -0.2364601343870163, -0.05867348238825798, -0.083917997777462, 0.4266134798526764, 0.13718357682228088, 0.0029950665775686502, 0.1578780561685562, 0.15296711027622223, 0.14564646780490875, -0.16317996382713318, 0.18801695108413696, -0.26906678080558777, 0.016333790495991707, 0.14150036871433258, 0.09483511000871658, -0.018950289115309715, -0.17155230045318604, -0.33726778626441956, 0.0826948881149292, -0.05604863166809082, 0.1779661327600479, 0.2785223424434662, -0.20525234937667847, -0.2647082507610321, 0.4296862781047821, 0.2974286675453186, 0.09966787695884705, -0.1986873894929886, 0.005100209265947342, 0.033595919609069824, 0.27050548791885376, -0.39920371770858765, -0.43699321150779724, 0.1719176322221756, -0.13999709486961365, 0.11391419172286987, 0.30594536662101746, 0.225458025932312, -0.3515103757381439, -0.27867400646209717, 0.11731936037540436, 0.3834746181964874, -0.08047918230295181, 0.22262340784072876, 0.4485849440097809, -0.08547059446573257, -0.07634764909744263, 0.026516281068325043, -0.12295867502689362, -0.026120033115148544, 0.32705771923065186, -0.23580893874168396, 0.31131041049957275, -0.13896885514259338, 0.0790470615029335, 0.2696990370750427, -0.37291815876960754, 0.44851818680763245, 0.13819316029548645, -0.2525947391986847, 0.022935541346669197, 0.15364494919776917, 0.16034412384033203, -0.0875273272395134, 0.080473393201828, -0.21754395961761475, 0.10587161779403687, -0.1773345023393631, -0.039666369557380676, -0.18827176094055176, -0.25918295979499817, -0.18296568095684052, -0.09380795061588287, -0.01209789328277111, -0.15875080227851868, 0.357146680355072, -0.06538508832454681, -0.2649567127227783, -0.2993311285972595, 0.044738348573446274, 0.29556065797805786, 0.13730444014072418, -0.4245438575744629, 0.0067300149239599705, 0.5594313740730286, -0.08068207651376724, -0.07908033579587936, 0.28080788254737854, 0.5457742214202881, 0.12703193724155426, -0.08278537541627884, 0.13831336796283722, 0.19294121861457825, -0.06373762339353561, -0.1260761022567749, 0.2143981158733368, -0.017314206808805466, 0.17054657638072968, 0.22341620922088623, 0.15142613649368286, -0.21100495755672455, -0.23218266665935516, 0.4559074640274048, -0.14533087611198425, -0.3635571002960205, 0.192087784409523, -0.23783984780311584, -0.032357022166252136, -0.09697262942790985, 0.36510413885116577, -0.2949545979499817, -0.19430580735206604, 0.18723993003368378, 0.23472122848033905, 0.14087115228176117, -0.42756009101867676, 0.1380084902048111, -0.15437628328800201, 0.12612567842006683, 0.24674034118652344, -0.1832292228937149, -0.3851373791694641, -0.015750007703900337, -0.7335858941078186, 0.20096616446971893, -0.1504068672657013, -0.07076635211706161, 0.07067649811506271, 0.23287685215473175, -0.013510056771337986, 0.07429404556751251, 0.23220184445381165, 0.22830253839492798, -0.09368480741977692, 0.49654823541641235, -0.4009828269481659, -0.22507470846176147, 0.11375031620264053, -0.12369860708713531, 0.09055047482252121, -0.43166112899780273, 0.2643917202949524, -0.01502981036901474, 0.08418003469705582, -0.05555405840277672, 0.002655820921063423, 0.32953161001205444, -0.23907922208309174, 0.24798105657100677, 0.30157139897346497, 0.45594215393066406, -0.11074330657720566, -0.28018438816070557, 0.012905188836157322, -0.03686358034610748, -0.04112657904624939, 0.28016918897628784, 0.3217189311981201, 0.2556380033493042, 0.10584640502929688, -0.288521409034729, -0.22451946139335632, 0.33878350257873535, 0.21528802812099457, 0.04287131503224373, -0.3165062367916107, 0.4041506350040436, -0.04459899663925171, 0.052679117769002914, 0.13927698135375977, 0.32261791825294495, -0.019639864563941956, 0.274564653635025, -0.332792729139328, -0.6344324350357056, 0.3417712152004242, -0.3225765526294708, -0.17968590557575226, -0.27400943636894226, 0.36774468421936035, -0.0831625759601593, -0.1276746541261673, -0.2130843847990036, 0.139754056930542, 0.42954593896865845, -0.2491011917591095, 0.06518565118312836, 0.3638625741004944, -0.06338633596897125, 0.12496094405651093, 0.20453575253486633, 0.14473958313465118, 0.12418326735496521, -0.2364501953125, 0.5228365063667297, -0.1628025621175766 ]
https://github.com/huggingface/datasets/issues/2538
Loading partial dataset when debugging
Hi ! `load_dataset` downloads the full dataset once and caches it, so that subsequent calls to `load_dataset` just reloads the dataset from your disk. Then when you specify a `split` in `load_dataset`, it will just load the requested split from the disk. If your specified split is a sliced split (e.g. `"train[:10]"`), then it will load the 10 first rows of the train split that you have on disk. Therefore, as long as you don't delete your cache, all your calls to `load_dataset` will be very fast. Except the first call that downloads the dataset of course ^^
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits). Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues. Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow. Something like a debug mode would really help. Thanks!
98
Loading partial dataset when debugging I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits). Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues. Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow. Something like a debug mode would really help. Thanks! Hi ! `load_dataset` downloads the full dataset once and caches it, so that subsequent calls to `load_dataset` just reloads the dataset from your disk. Then when you specify a `split` in `load_dataset`, it will just load the requested split from the disk. If your specified split is a sliced split (e.g. `"train[:10]"`), then it will load the 10 first rows of the train split that you have on disk. Therefore, as long as you don't delete your cache, all your calls to `load_dataset` will be very fast. Except the first call that downloads the dataset of course ^^
[ -0.36718904972076416, -0.14316895604133606, -0.021608319133520126, 0.36220434308052063, -0.06753049045801163, 0.27566948533058167, 0.574037492275238, 0.41680431365966797, 0.26127564907073975, -0.08351020514965057, -0.08284469693899155, 0.14032061398029327, -0.17392075061798096, 0.18208903074264526, 0.09958672523498535, 0.10870715230703354, -0.1426476240158081, 0.31652215123176575, 0.07343555241823196, -0.07848575711250305, 0.17070063948631287, -0.2612392008304596, -0.17485176026821136, -0.17879103124141693, -0.4388395845890045, 0.06583218276500702, 0.07243425399065018, 0.1917068362236023, 0.29212599992752075, -0.19661147892475128, 0.38091742992401123, 0.12371090054512024, 0.004290945362299681, 0.1477992832660675, -0.00012503743346314877, 0.04857788607478142, 0.4530164897441864, -0.11772707104682922, -0.44139501452445984, 0.07931530475616455, -0.2372337430715561, -0.017255987972021103, 0.4449103772640228, -0.0426376610994339, -0.053050197660923004, -0.18753929436206818, 0.005216227378696203, -0.31299886107444763, 0.28297436237335205, -0.012045104056596756, 0.06675532460212708, 0.06415385007858276, -0.5506687164306641, 0.1383746862411499, 0.21969319880008698, -0.04009004309773445, 0.006369790993630886, 0.38395956158638, 0.41145986318588257, 0.02572324313223362, -0.3189213275909424, 0.14332953095436096, -0.13030026853084564, 0.2568039298057556, 0.365166038274765, -0.017533205449581146, 0.016991930082440376, -0.4844472408294678, 0.27796241641044617, 0.3971956670284271, 0.6139983534812927, 0.01779792830348015, -0.3248315453529358, -0.5615002512931824, 0.0680837482213974, -0.10190368443727493, 0.1404104232788086, -0.03295193240046501, -0.44043609499931335, -0.001911746570840478, -0.5037775635719299, -0.17880071699619293, 0.06568460911512375, 0.18152183294296265, 0.07425763458013535, -0.29635003209114075, 0.06357692182064056, 0.11993793398141861, 0.4592185616493225, 0.22577425837516785, 0.31104594469070435, -0.05914763733744621, 0.08678269386291504, 0.10405705869197845, -0.3470101058483124, 0.055210575461387634, -0.17155568301677704, -0.09378665685653687, -0.036015115678310394, 0.5328016877174377, -0.033562373369932175, 0.46230992674827576, 0.1792251616716385, 0.004895114339888096, 0.581814706325531, -0.10443943738937378, 0.13577525317668915, 0.16049522161483765, 0.33020371198654175, -0.3076431155204773, -0.05620276927947998, -0.029139336198568344, -0.4441227614879608, -0.14464713633060455, 0.2911393940448761, -0.03317640721797943, -0.060982681810855865, -0.3301864266395569, -0.09849406033754349, -0.34577202796936035, 0.10447926074266434, -0.027723530307412148, 0.23564353585243225, 0.45086684823036194, 0.0771404281258583, 0.05776525288820267, -0.19051697850227356, 0.09677261114120483, -0.2860884964466095, -0.06460916996002197, -0.12529851496219635, -0.1794559806585312, -0.05339789390563965, 0.13431605696678162, 0.34564876556396484, -0.3430440127849579, 0.30360692739486694, -0.0918702781200409, 0.4442438781261444, -0.19420075416564941, 0.1545957326889038, -0.25423046946525574, -0.03019615262746811, 0.17747171223163605, -0.015024570748209953, 0.2808522880077362, 0.11442667990922928, 0.25640782713890076, -0.3054347038269043, 0.4385037422180176, -0.11468290537595749, -0.3874347507953644, 0.06421296298503876, -0.0014648776268586516, -0.38823121786117554, 0.24428892135620117, -0.19810885190963745, 0.23641861975193024, 0.19101440906524658, -0.23388350009918213, -0.23002612590789795, 0.09611290693283081, 0.0001007530081551522, -0.11394547671079636, 0.6939179301261902, 0.3801715075969696, -0.14354582130908966, -0.2851574718952179, -0.25552797317504883, 0.03463296964764595, 0.2755739390850067, 0.24220116436481476, -0.44276997447013855, 0.23244673013687134, -0.1369287222623825, -0.07506109774112701, 0.5813106894493103, -0.045876212418079376, -0.38998085260391235, 0.4592677056789398, -0.06608609855175018, 0.2072695642709732, -0.06395779550075531, 0.5403291583061218, 0.22449833154678345, 0.06297090649604797, 0.11130720376968384, 0.43230628967285156, -0.14347629249095917, 0.11651480942964554, -0.2158845067024231, -0.1530446857213974, 0.13135483860969543, 0.46650293469429016, 0.03728947043418884, 0.1652178168296814, -0.03860984370112419, 0.1996423304080963, 0.18845488131046295, 0.00033358988002873957, -0.06667986512184143, 0.19264906644821167, -0.10654201358556747, 0.0639997199177742, 0.03716108947992325, -0.2812866270542145, -0.5614964962005615, 0.37746214866638184, 0.17464253306388855, -0.31024762988090515, -0.08220755308866501, -0.02052345499396324, -0.1016741618514061, -0.15764372050762177, -0.018042955547571182, -0.0850495919585228, -0.18913131952285767, 0.014795608818531036, -0.07933907210826874, -0.39698392152786255, -0.45676928758621216, 0.11842276155948639, 0.02883782424032688, -0.016268711537122726, -0.34635648131370544, 0.11181487888097763, 0.36374250054359436, -0.056494466960430145, -0.04300258681178093, -0.08845574408769608, 0.002618422731757164, -0.266302227973938, -0.06605952233076096, 0.33275702595710754, 0.14879773557186127, 0.29042699933052063, 0.045085884630680084, 0.17578020691871643, -0.015816302970051765, -0.08042629063129425, 0.3634447157382965, -0.05617425590753555, 0.0023398173507303, -0.19306428730487823, -0.19840411841869354, 0.35414910316467285, -0.4528668224811554, 0.40730881690979004, 0.039931803941726685, -0.27715906500816345, 0.13743606209754944, -0.15656086802482605, -0.13146746158599854, -0.08851401507854462, 0.46537163853645325, -0.25897690653800964, 0.37836554646492004, 0.24758534133434296, -0.08319343626499176, -0.10189396888017654, 0.2595180571079254, -0.03595062345266342, 0.004565598908811808, 0.2960413992404938, -0.4620667099952698, -0.02783360332250595, -0.1357196867465973, -0.18683622777462006, 0.080544613301754, 0.1411464363336563, 0.1734265685081482, -0.21359491348266602, 0.2454039454460144, -0.08223602920770645, 0.1437816023826599, 0.07579124718904495, 0.1059345155954361, 0.1493421196937561, -0.1592336893081665, -0.16431522369384766, -0.15998521447181702, 0.07174306362867355, 0.15879841148853302, 0.1586150825023651, -0.23622845113277435, 0.10229428857564926, -0.4182840883731842, -0.10481763631105423, 0.09905079007148743, -0.05474783480167389, -0.04089715704321861, -0.12261267751455307, 0.04784754663705826, 0.3270421624183655, 0.06984102725982666, 0.20511677861213684, -0.27459901571273804, 0.18118295073509216, -0.1321084201335907, -0.37160786986351013, -0.2293088436126709, -0.32600101828575134, -0.08150424063205719, -0.00474465312436223, 0.48533493280410767, 0.10317444801330566, 0.3148231506347656, -0.20688655972480774, -0.25748303532600403, 0.16530011594295502, -0.04305054247379303, -0.035823650658130646, 0.25386619567871094, 0.21439200639724731, -0.12876717746257782, 0.3431731164455414, 0.19442740082740784, -0.3629199266433716, 0.08242127299308777, -0.12853719294071198, -0.033652517944574356, 0.086114801466465, 0.22748404741287231, 0.36373430490493774, -0.04777250811457634, -0.13443318009376526, -0.02988336607813835, -0.3539547920227051, 0.3215944468975067, 0.029343966394662857, 0.14985138177871704, 0.06735914200544357, -0.1317504346370697, -0.16738000512123108, -0.02743656001985073, 0.14918622374534607, 0.08649015426635742, -0.3391229808330536, 0.40301287174224854, 0.17474567890167236, -0.04086221009492874, -0.07522735744714737, -0.07180391997098923, -0.15467384457588196, 0.29176440834999084, -0.6640379428863525, -0.06682521849870682, -0.12848056852817535, -0.004083072766661644, -0.12102603167295456, -0.28576672077178955, -0.002187837613746524, -0.11744009703397751, 0.06316200643777847, 0.15985478460788727, -0.1683163046836853, -0.13882963359355927, -0.2689240872859955, 0.08197303861379623, -0.049770060926675797, 0.27595341205596924, -0.050689298659563065, 0.8458831906318665, 0.04192886874079704, -0.18530164659023285, -0.16891634464263916, -0.1192442774772644, 0.06383298337459564, -0.32444310188293457, -0.4014127254486084, -0.06877607107162476, -0.1970939040184021, -0.26336434483528137, 0.1077178418636322, -0.0919821709394455, -0.3551761209964752, -0.1895463466644287, 0.028249802067875862, -0.27457812428474426, -0.35815098881721497, 0.4824312627315521, -0.5855875015258789, -0.14060507714748383, -0.028272368013858795, 0.2764354348182678, -0.04491795599460602, -0.2472791075706482, 0.018132362514734268, 0.07960742712020874, 0.4708019495010376, -0.23356090486049652, -0.013949490152299404, 0.1771232634782791, -0.17793898284435272, 0.16549080610275269, -0.12264319509267807, 0.1473454087972641, -0.02570013329386711, -0.1633838564157486, 0.2757572531700134, 0.1785818636417389, 0.788439929485321, 0.0170750729739666, 0.13271906971931458, 0.00020159943960607052, -0.510222852230072, -0.29631659388542175, 0.053474582731723785, 0.10029696673154831, 0.578852117061615, 0.198878213763237, 0.35228732228279114, -0.39641305804252625, -0.08153113722801208, 0.12288561463356018, 0.350629597902298, -0.29573753476142883, -0.11074219644069672, -0.300718754529953, 0.07920697331428528, -0.33844390511512756, 0.060216452926397324, -0.07723446190357208, -0.1689598113298416, 0.11117913573980331, -0.13265451788902283, -0.2855384647846222, 0.05975746735930443, 0.14123988151550293, 0.2928122580051422, 0.25571683049201965, -0.05180734768509865, 0.5995862483978271, 0.2853758931159973, -0.08737870305776596, 0.2835312485694885, 0.43089526891708374, 0.0039384933188557625, -0.2233618050813675, 0.212796151638031, -0.02805396169424057, 0.1954459846019745, 0.46852046251296997, 0.0028097203467041254, -0.13052469491958618, 0.216825470328331, 0.1986551731824875, -0.36617594957351685, 0.12991885840892792, 0.0626511499285698, -0.07617849856615067, -0.3292379081249237, -0.5705028772354126, 0.40899744629859924, -0.07795612514019012, 0.011841459199786186, 0.5679507851600647, -0.24310186505317688, -0.005395279265940189, 0.19036832451820374, 0.02035355754196644, 1.0178792476654053, -0.3330104351043701, 0.02189701795578003, -0.46500730514526367, 0.09143289178609848, 0.4882529377937317, -0.2961696982383728, 0.06469778716564178, -0.36548373103141785, -0.6286566853523254, 0.07860106974840164, -0.2877316176891327, -0.2745550572872162, 0.2768290638923645, 0.25405049324035645, 0.23778928816318512, -0.42824533581733704, 0.08984939754009247, -0.09953368455171585, 0.2724858820438385, 0.09064342826604843, -0.3121679127216339, -0.03346975892782211, 0.0022575880866497755, -0.03453166410326958, 0.12555760145187378, 0.06438782066106796, 0.06653506308794022, -0.06859306991100311, 0.15509214997291565, -0.39273208379745483, 0.14111898839473724, -0.13745588064193726, -0.04289012402296066, -0.2702484726905823, -0.398581862449646, -0.02548704482614994, 0.137005016207695, -0.06832810491323471, 0.0879688486456871, -0.05618790537118912, 0.30465129017829895, 0.02962319925427437, 0.17377491295337677, 0.02101314440369606, 0.07060180604457855, -0.05024651437997818, -0.009301232174038887, -0.09922663122415543, -0.13372305035591125, -0.25537779927253723, -0.47204530239105225, 0.32337623834609985, 0.2395315021276474, 0.14159086346626282, -0.0632365271449089, -0.24862460792064667, -0.00017726627993397415, 0.1796436607837677, -0.1793680191040039, 0.029104741290211678, 0.4345211088657379, -0.0641021877527237, 0.17926892638206482, 0.2324335128068924, -0.397584468126297, 0.024546300992369652, 0.3809717893600464, 0.18169184029102325, -0.05833373963832855, 0.4532395601272583, -0.09178350120782852, -0.31434497237205505, -0.08938675373792648, 0.015912378206849098, 0.329349160194397, -0.519686222076416, -0.00002351201510464307, -0.16101780533790588, 0.05943375080823898, -0.15263433754444122, -0.28479281067848206, -0.005598039366304874, 0.068976029753685, -0.37400689721107483, -0.3733096420764923, -0.1986030638217926, 0.3582199811935425, 0.025332903489470482, 0.36404457688331604, -0.26896512508392334, -0.11130426824092865, -0.18663817644119263, 0.5100818872451782, -0.15152564644813538, -0.11666029691696167, -0.15062817931175232, 0.3793259561061859, 0.01034419797360897, 0.023071087896823883, 0.35650262236595154, -0.1719987839460373, -0.01773732341825962, 0.026342254132032394, 0.13874828815460205, -0.08772645145654678, 0.08569621294736862, 0.22371789813041687, -0.21669822931289673, -0.23188145458698273, -0.1974545121192932, -0.12839624285697937, -0.0637034922838211, -0.2944410443305969, 0.2201378494501114, 0.16982528567314148, 0.19674943387508392, -0.10603421181440353, 0.41446220874786377, 0.02025740034878254, -0.4970489740371704, 0.17242181301116943, -0.290547251701355, 0.3164816200733185, -0.09080025553703308, 0.20464274287223816, 0.07211285084486008, -0.005418060813099146, -0.011009217239916325, -0.0986156165599823, 0.36519375443458557, -0.10532961040735245, 0.14019446074962616, 0.05748603865504265, 0.2886664569377899, 0.06170761585235596, 0.3608945608139038, 0.7714850902557373, 0.03022797778248787, 0.22537949681282043, 0.0788225457072258, 0.03532760962843895, -0.04155002906918526, -0.14323388040065765, 0.054832812398672104, -0.38687843084335327, -0.02270485647022724, 0.22165586054325104, -0.22898051142692566, 0.2641274631023407, -0.01519855484366417, -0.2538965046405792, 0.2530398666858673, -0.1723759025335312, 0.017283953726291656, 0.3965557813644409, -0.21704408526420593, -0.10603047907352448, 0.08040650188922882, 0.267973393201828, 0.0435834564268589, 0.34965386986732483, -0.13365192711353302, 0.21642014384269714, 0.14095942676067352, 0.15064971148967743, -0.2677200138568878, -0.3968944847583771, 0.00760270282626152, 0.5739414691925049, 0.15091469883918762, 0.003849311964586377, -0.17681492865085602, 0.06648147851228714, 0.14898695051670074, -0.23711366951465607, -0.03113281913101673, 0.043632764369249344, 0.0971297174692154, -0.07464318722486496, 0.20676128566265106, -0.17384804785251617, -0.2689623534679413, 0.11787869781255722, -0.17308707535266876, -0.3819600045681, -0.07691901922225952, 0.2927038073539734, 0.1724591851234436, -0.10805125534534454, 0.1192585751414299, 0.020360391587018967, 0.22638347744941711, -0.36335545778274536, 0.10588790476322174, -0.11519111692905426, 0.26593348383903503, 0.45201578736305237, -0.05527932941913605, 0.011352311819791794, 0.14525915682315826, -0.13874788582324982, 0.05347903072834015, 0.30161669850349426, -0.036470577120780945, -0.27819639444351196, 0.3117522597312927, 0.15103013813495636, 0.3166753649711609, 0.03544320911169052, 0.023774441331624985, -0.0851154699921608, 0.17452916502952576, -0.22542552649974823, -0.054854169487953186, -0.5020071864128113, 0.3572726249694824, 0.09798754751682281, -0.2567739486694336, 0.021799717098474503, -0.14606966078281403, 0.16414673626422882, -0.5156952738761902, 0.20814312994480133, -0.2873867154121399, -0.02987474389374256, 0.3652808666229248, 0.00816964078694582, -0.0818290188908577, 0.6307968497276306, 0.08446376025676727, 0.5784640908241272, -0.25188010931015015, 0.04716427996754646, -0.45672616362571716, 0.08644819259643555, -0.06382624059915543, 0.006862815003842115, 0.426787793636322, 0.2150808423757553, 0.35210439562797546, 0.3763366639614105, 0.015649769455194473, -0.003993183374404907, 0.3473140597343445, 0.3020210564136505, -0.036560047417879105, -0.00767567940056324, -0.5346398949623108, 0.21763737499713898, -0.0012322558322921395, -0.35256779193878174, 0.1920086145401001, -0.05230465903878212, -0.15894590318202972, 0.45280393958091736, -0.4606046676635742, 0.452731728553772, 0.3637913465499878, 0.4324216842651367, -0.20643557608127594, 0.6541492342948914, 0.031074557453393936, -0.12995299696922302, -0.06981595605611801, -0.5255057215690613, -0.2674126625061035, 0.31019678711891174, 0.14024081826210022, -0.13440287113189697, -0.06945925205945969, 0.041976235806941986, -0.3419908881187439, 0.1872284710407257, -0.12827461957931519, 0.031474266201257706, -0.040994442999362946, -0.4278571307659149, 0.12159008532762527, 0.27473026514053345, 0.26735323667526245, 0.16403548419475555, -0.10899750888347626, -0.18433931469917297, -0.17634278535842896, 0.050282273441553116, 0.5359641909599304, -0.16131991147994995, -0.02619314379990101, -0.014375030063092709, 0.38248714804649353, 0.19769826531410217, 0.21832437813282013, -0.5468694567680359, -0.03759973123669624, 0.3215598464012146, -0.2120874971151352, -0.017228994518518448, -0.008357641287147999, 0.04108181968331337, -0.07891681045293808, -0.24726422131061554, 0.1625504195690155, 0.05813636630773544, -0.0685482919216156, -0.3469407558441162, -0.32690486311912537 ]
https://github.com/huggingface/datasets/issues/2538
Loading partial dataset when debugging
Hi @reachtarunhere. Besides the above insights provided by @lhoestq and @thomwolf, there is also a Dataset feature in progress (I plan to finish it this week): #2249, which will allow you, when calling `load_dataset`, to pass the option to download/preprocess/cache only some specific split(s), which will definitely speed up your workflow. If this feature is interesting for you, I can ping you once it will be merged into the master branch.
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits). Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues. Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow. Something like a debug mode would really help. Thanks!
71
Loading partial dataset when debugging I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits). Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues. Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow. Something like a debug mode would really help. Thanks! Hi @reachtarunhere. Besides the above insights provided by @lhoestq and @thomwolf, there is also a Dataset feature in progress (I plan to finish it this week): #2249, which will allow you, when calling `load_dataset`, to pass the option to download/preprocess/cache only some specific split(s), which will definitely speed up your workflow. If this feature is interesting for you, I can ping you once it will be merged into the master branch.
[ -0.42554771900177, -0.10989382117986679, -0.034853313118219376, 0.3032790720462799, -0.07041159272193909, 0.28239259123802185, 0.5759149193763733, 0.4311378598213196, 0.30114316940307617, -0.08975882828235626, -0.09464352577924728, 0.17002831399440765, -0.167522132396698, 0.23832842707633972, 0.04756883531808853, 0.0998503565788269, -0.16172543168067932, 0.3242848515510559, 0.038770802319049835, -0.06606727838516235, 0.1287386566400528, -0.2229062169790268, -0.248351588845253, -0.21158798038959503, -0.4659934937953949, 0.02932887338101864, 0.098626509308815, 0.17055173218250275, 0.31795281171798706, -0.12683603167533875, 0.3389090299606323, 0.1375173181295395, -0.00848781131207943, 0.13357219099998474, -0.00012419569247867912, -0.010722031816840172, 0.5006646513938904, -0.09310750663280487, -0.4362998902797699, 0.07352856546640396, -0.23742131888866425, -0.04771466553211212, 0.45775943994522095, 0.02748936414718628, -0.08342090994119644, -0.1815836876630783, 0.025319891050457954, -0.3546508848667145, 0.2971428632736206, -0.006424763705581427, 0.07370726019144058, 0.10679557919502258, -0.46614640951156616, 0.14421319961547852, 0.17943067848682404, -0.050980426371097565, -0.06999976933002472, 0.39406055212020874, 0.4568610191345215, -0.034427158534526825, -0.2619633376598358, 0.14700947701931, -0.09070300310850143, 0.3317945897579193, 0.3868725299835205, -0.031170137226581573, 0.012000689283013344, -0.5471944212913513, 0.2819918394088745, 0.43994084000587463, 0.6287297010421753, 0.03294720873236656, -0.3415045738220215, -0.5828245282173157, 0.07576567679643631, -0.09794475138187408, 0.14900022745132446, 0.00702432356774807, -0.424578458070755, 0.006580217741429806, -0.48645123839378357, -0.1778586208820343, 0.04783719405531883, 0.15686167776584625, 0.05318405106663704, -0.2893977463245392, 0.03689686208963394, 0.09430906921625137, 0.39025694131851196, 0.21983736753463745, 0.32616955041885376, -0.05730718746781349, 0.07802177220582962, 0.08700864017009735, -0.38687190413475037, 0.06285452097654343, -0.1920488476753235, -0.09468680620193481, -0.06105029582977295, 0.5311384797096252, -0.0742088183760643, 0.47884494066238403, 0.2084881216287613, -0.035814881324768066, 0.5376530885696411, -0.15025493502616882, 0.18376107513904572, 0.17387402057647705, 0.36885392665863037, -0.35868149995803833, -0.07993655651807785, -0.041148725897073746, -0.38917380571365356, -0.19401268661022186, 0.2670510709285736, -0.022362954914569855, -0.017677225172519684, -0.3543410897254944, -0.15779505670070648, -0.3675398528575897, 0.1221824586391449, -0.05026207119226456, 0.20322617888450623, 0.4276989996433258, 0.08812462538480759, 0.06535951048135757, -0.19839473068714142, 0.1510772407054901, -0.27075713872909546, -0.1073966920375824, -0.09710746258497238, -0.22725827991962433, -0.012313398532569408, 0.1486579179763794, 0.36505046486854553, -0.3609238564968109, 0.2793484032154083, -0.06933516263961792, 0.42524653673171997, -0.23006696999073029, 0.13990983366966248, -0.26639261841773987, -0.025323769077658653, 0.19209544360637665, 0.03809192776679993, 0.2751617431640625, 0.06902468949556351, 0.27011042833328247, -0.30267539620399475, 0.3971213400363922, -0.04960541054606438, -0.3965829610824585, 0.04402428865432739, -0.0021046949550509453, -0.3572971224784851, 0.24185091257095337, -0.19393451511859894, 0.24391263723373413, 0.1567402333021164, -0.14957255125045776, -0.2970223128795624, 0.0720490962266922, -0.05048616603016853, -0.09225954860448837, 0.6279114484786987, 0.38506221771240234, -0.13243801891803741, -0.19118191301822662, -0.21317507326602936, 0.04282805323600769, 0.28300654888153076, 0.2111838310956955, -0.39662468433380127, 0.25199344754219055, -0.1373877078294754, -0.11864297091960907, 0.5024477243423462, -0.0747004970908165, -0.32048505544662476, 0.5063076019287109, -0.08707841485738754, 0.1802229881286621, -0.06221214309334755, 0.4636334478855133, 0.21603326499462128, 0.04201430454850197, 0.051006998866796494, 0.4863909184932709, -0.14791658520698547, 0.15533669292926788, -0.20053941011428833, -0.12234766781330109, 0.10389392822980881, 0.47971510887145996, 0.04562606289982796, 0.1825733333826065, -0.05006086826324463, 0.18734902143478394, 0.17891642451286316, -0.020991697907447815, -0.0779564306139946, 0.19626931846141815, -0.11762557923793793, 0.042844247072935104, 0.0597052201628685, -0.2848040461540222, -0.6154302358627319, 0.3532470464706421, 0.15037110447883606, -0.3225485682487488, -0.06311236321926117, -0.007873176597058773, -0.06166546791791916, -0.11725595593452454, -0.014097286388278008, -0.08452299237251282, -0.1754077672958374, 0.0163250844925642, -0.06331471353769302, -0.4030498266220093, -0.45660892128944397, 0.17250579595565796, 0.001414224156178534, 0.007622992619872093, -0.3340214490890503, 0.1149461418390274, 0.3976438641548157, -0.05062789469957352, -0.002528526121750474, -0.08045846968889236, -0.005834002513438463, -0.26968085765838623, -0.06570062786340714, 0.30114200711250305, 0.13932055234909058, 0.297926664352417, 0.11367575079202652, 0.1450333148241043, -0.03134814649820328, -0.06815513223409653, 0.39275166392326355, -0.09174126386642456, -0.007026826962828636, -0.2175114005804062, -0.18658356368541718, 0.36159300804138184, -0.4406472444534302, 0.44268694519996643, 0.03345082700252533, -0.2793010473251343, 0.11154241114854813, -0.14442971348762512, -0.10603996366262436, -0.09069547802209854, 0.47027069330215454, -0.2627227008342743, 0.37446993589401245, 0.25155386328697205, -0.11801315099000931, -0.043103788048028946, 0.22243979573249817, -0.01099996455013752, -0.026483433321118355, 0.30003613233566284, -0.456755667924881, -0.02791704051196575, -0.16574108600616455, -0.1882311999797821, 0.1148749515414238, 0.1626739799976349, 0.1160585954785347, -0.2489050030708313, 0.23451386392116547, -0.1317112147808075, 0.17068243026733398, 0.11357373744249344, 0.10786230862140656, 0.18012672662734985, -0.15707506239414215, -0.17437699437141418, -0.14152632653713226, 0.10435343533754349, 0.14916662871837616, 0.1552514284849167, -0.24204730987548828, 0.040989041328430176, -0.4336853325366974, -0.09543624520301819, 0.1087246686220169, 0.0012949425727128983, 0.000009911996130540501, -0.16840164363384247, 0.045547280460596085, 0.32332006096839905, 0.08706826716661453, 0.14288370311260223, -0.2267100214958191, 0.15259724855422974, -0.14844529330730438, -0.37710416316986084, -0.23462651669979095, -0.27463775873184204, -0.03316037729382515, 0.0033812341280281544, 0.5305063128471375, 0.14176185429096222, 0.33259662985801697, -0.21333254873752594, -0.22711490094661713, 0.08890534937381744, -0.05195361748337746, -0.05185142159461975, 0.2499419003725052, 0.25269877910614014, -0.12633612751960754, 0.3071931004524231, 0.25695183873176575, -0.3159407079219818, 0.10980430990457535, -0.10888846963644028, 0.0034075535368174314, 0.06769679486751556, 0.16055484116077423, 0.30111977458000183, 0.005396626424044371, -0.16980354487895966, -0.03070840798318386, -0.36862343549728394, 0.3665096163749695, 0.016429273411631584, 0.11514230072498322, 0.060963623225688934, -0.15349526703357697, -0.20318740606307983, -0.055140573531389236, 0.12407930940389633, 0.13005569577217102, -0.24881671369075775, 0.39994677901268005, 0.14993751049041748, -0.06740187108516693, -0.06261890381574631, -0.029601644724607468, -0.15988579392433167, 0.25365808606147766, -0.6322859525680542, -0.033095501363277435, -0.1697777807712555, 0.05915062129497528, -0.09262514859437943, -0.337998628616333, -0.03060443326830864, -0.1077452301979065, 0.06593525409698486, 0.17353494465351105, -0.17050515115261078, -0.12342651933431625, -0.3009801208972931, 0.03321698307991028, 0.007505935151129961, 0.27938011288642883, -0.13134416937828064, 0.7960774302482605, 0.05270146578550339, -0.17762356996536255, -0.15904095768928528, -0.13151876628398895, 0.05263788253068924, -0.3936483561992645, -0.39835289120674133, -0.012133085168898106, -0.17094933986663818, -0.19291633367538452, 0.12345509231090546, -0.056906651705503464, -0.36070716381073, -0.18440738320350647, -0.024530276656150818, -0.24628804624080658, -0.34223151206970215, 0.48583826422691345, -0.5331357717514038, -0.15085859596729279, -0.00021825260773766786, 0.2596716284751892, -0.015386979095637798, -0.2984858453273773, -0.0077807484194636345, 0.07231315970420837, 0.5126265287399292, -0.24782657623291016, 0.09501199424266815, 0.23208603262901306, -0.23543119430541992, 0.19430823624134064, -0.1584601104259491, 0.15554843842983246, -0.04715967923402786, -0.14702366292476654, 0.3114204406738281, 0.19763341546058655, 0.6516824960708618, 0.013132880441844463, 0.1269877403974533, -0.025643737986683846, -0.5850504040718079, -0.2765258550643921, 0.0595206581056118, 0.09031025320291519, 0.5965149402618408, 0.15767090022563934, 0.3528318405151367, -0.33617228269577026, -0.16939757764339447, 0.15827615559101105, 0.3369893729686737, -0.25297340750694275, -0.1542021632194519, -0.24787290394306183, 0.10856850445270538, -0.3825853765010834, 0.06953418254852295, -0.013652564026415348, -0.20192478597164154, 0.07567760348320007, -0.17208606004714966, -0.3040814995765686, 0.08185560256242752, 0.1404736042022705, 0.29081296920776367, 0.21066881716251373, -0.11113819479942322, 0.6667947173118591, 0.30496135354042053, -0.10575175285339355, 0.2823260426521301, 0.38894909620285034, -0.006626336835324764, -0.26719680428504944, 0.18257379531860352, -0.11432307213544846, 0.20097897946834564, 0.4967266917228699, -0.03281097486615181, -0.18059244751930237, 0.11691737920045853, 0.21658475697040558, -0.3674064576625824, 0.04258759319782257, 0.10228016972541809, 0.004907727241516113, -0.30117279291152954, -0.5198281407356262, 0.395416796207428, -0.0661349892616272, 0.039684634655714035, 0.6187754273414612, -0.2771739363670349, -0.008443640545010567, 0.1720663160085678, 0.021292278543114662, 0.926654040813446, -0.32377079129219055, -0.026725534349679947, -0.4711100161075592, 0.04204748198390007, 0.3918359875679016, -0.2913416624069214, 0.03272834047675133, -0.3474789261817932, -0.6259022951126099, 0.0939164012670517, -0.25494134426116943, -0.24244850873947144, 0.307862788438797, 0.2693953514099121, 0.24445469677448273, -0.4067322611808777, 0.07542731612920761, -0.10805085301399231, 0.313056617975235, 0.052311040461063385, -0.357248991727829, -0.033037275075912476, 0.015045794658362865, -0.015557087026536465, 0.16697797179222107, 0.07609570026397705, 0.04633460193872452, -0.043139539659023285, 0.16992917656898499, -0.4182584881782532, 0.12732091546058655, -0.1174611747264862, -0.1342809498310089, -0.22342519462108612, -0.35891810059547424, 0.08065569400787354, 0.16421175003051758, -0.06633841246366501, 0.12774625420570374, -0.07710358500480652, 0.32439905405044556, 0.020370716229081154, 0.16771025955677032, 0.053724102675914764, 0.04041013866662979, -0.0689280703663826, -0.05607825890183449, -0.08291643857955933, -0.23831360042095184, -0.2540111243724823, -0.4231799840927124, 0.2556212544441223, 0.25390172004699707, 0.11000034213066101, -0.03198106214404106, -0.2888385057449341, -0.015512046404182911, 0.16552519798278809, -0.20772168040275574, 0.04955700784921646, 0.44507038593292236, -0.02908329851925373, 0.20750004053115845, 0.22862611711025238, -0.44483238458633423, -0.01937461830675602, 0.3128204643726349, 0.15478397905826569, -0.024569328874349594, 0.4885360598564148, -0.02388649992644787, -0.34825125336647034, -0.09680060297250748, 0.032405786216259, 0.3478177785873413, -0.5323245525360107, 0.04322599992156029, -0.09543299674987793, 0.07178433239459991, -0.08557885140180588, -0.2574070990085602, -0.08272900432348251, 0.025230227038264275, -0.3723296523094177, -0.39971354603767395, -0.12438198179006577, 0.25551578402519226, -0.001685934141278267, 0.3168869912624359, -0.2882213294506073, -0.1357833445072174, -0.11567802727222443, 0.4980577230453491, -0.1506543606519699, -0.12287706881761551, -0.11880166083574295, 0.34640422463417053, 0.052948396652936935, 0.0250471830368042, 0.3450152575969696, -0.12824611365795135, -0.001338901580311358, 0.026642028242349625, 0.1603635847568512, -0.10477940738201141, 0.10743024200201035, 0.20325727760791779, -0.24223750829696655, -0.23293709754943848, -0.14011171460151672, -0.1356324553489685, -0.13783405721187592, -0.3078649044036865, 0.2151729166507721, 0.16676761209964752, 0.187856525182724, -0.14241090416908264, 0.42682039737701416, -0.031564682722091675, -0.41165071725845337, 0.24463820457458496, -0.288543701171875, 0.349788635969162, -0.14570100605487823, 0.2330196499824524, 0.11680871248245239, 0.013068166561424732, 0.027390142902731895, -0.1620250940322876, 0.3498271405696869, -0.0905717983841896, 0.1439080834388733, 0.049829866737127304, 0.25118395686149597, 0.07122191786766052, 0.3635663688182831, 0.752698540687561, 0.0421287938952446, 0.23098181188106537, 0.03586924076080322, 0.02665744535624981, -0.04563566669821739, -0.07973244041204453, 0.08894665539264679, -0.3545721173286438, -0.03607126697897911, 0.22081705927848816, -0.18600349128246307, 0.2577243447303772, -0.029929840937256813, -0.24127432703971863, 0.24923433363437653, -0.22949987649917603, -0.023491686210036278, 0.33866646885871887, -0.18343569338321686, -0.07223912328481674, 0.11411073058843613, 0.27871987223625183, 0.004405005369335413, 0.3821219801902771, -0.1071387380361557, 0.17877745628356934, 0.1578715443611145, 0.18651443719863892, -0.20526652038097382, -0.3974643051624298, -0.007394067011773586, 0.5795640349388123, 0.1509663164615631, 0.006389374379068613, -0.15505152940750122, 0.029777470976114273, 0.15681447088718414, -0.23019331693649292, -0.040392808616161346, 0.05574207007884979, 0.1063028872013092, -0.08712799102067947, 0.2420918494462967, -0.12436938285827637, -0.2532743215560913, 0.15706492960453033, -0.1857650727033615, -0.36719658970832825, -0.10610783100128174, 0.32317307591438293, 0.2204078733921051, -0.12150883674621582, 0.15510249137878418, -0.07876764982938766, 0.2425987422466278, -0.33895888924598694, 0.13904467225074768, -0.14756658673286438, 0.32077109813690186, 0.4877931773662567, -0.026048431172966957, 0.06150618940591812, 0.1670367419719696, -0.1229516789317131, 0.057380560785532, 0.25213658809661865, -0.04557324945926666, -0.21949711441993713, 0.38870465755462646, 0.10532224923372269, 0.32203999161720276, 0.049375981092453, 0.018255000934004784, -0.07622762024402618, 0.14854228496551514, -0.2521013617515564, -0.041113026440143585, -0.4598384201526642, 0.31223222613334656, 0.12219211459159851, -0.26669687032699585, -0.0598166361451149, -0.1620405912399292, 0.1932632029056549, -0.5238357186317444, 0.2419542521238327, -0.3260863721370697, -0.07653339952230453, 0.329089879989624, 0.017869194969534874, -0.07855389267206192, 0.6179023385047913, 0.0901753231883049, 0.6525303721427917, -0.24137166142463684, 0.04499468952417374, -0.4157398045063019, 0.07186038792133331, -0.0802074521780014, -0.017931263893842697, 0.43355128169059753, 0.18779735267162323, 0.3594686686992645, 0.37411513924598694, 0.06507385522127151, -0.013917536474764347, 0.3873796761035919, 0.3575514256954193, -0.041827790439128876, 0.012162698432803154, -0.5447234511375427, 0.19337278604507446, 0.005810116417706013, -0.3408640921115875, 0.23038645088672638, 0.03536844998598099, -0.14861558377742767, 0.3801404535770416, -0.39336979389190674, 0.47112521529197693, 0.31872162222862244, 0.32603880763053894, -0.22658763825893402, 0.6798647046089172, 0.025049934163689613, -0.12495454400777817, -0.06593223661184311, -0.526088297367096, -0.2678969204425812, 0.35941997170448303, 0.14789257943630219, -0.21176837384700775, -0.04711475968360901, 0.014473680406808853, -0.2860056757926941, 0.17873185873031616, -0.19559648633003235, 0.051644593477249146, -0.0779004916548729, -0.4243185818195343, 0.12158314883708954, 0.29159656167030334, 0.2652495205402374, 0.14659059047698975, -0.10060640424489975, -0.2337411791086197, -0.1721859723329544, 0.00662522716447711, 0.5101660490036011, -0.12486361712217331, -0.04789179190993309, 0.006093122065067291, 0.33915773034095764, 0.18186043202877045, 0.2179676592350006, -0.5644077062606812, -0.037099581211805344, 0.26621198654174805, -0.22866685688495636, 0.08096715062856674, 0.004256594460457563, 0.10769861191511154, -0.06291575729846954, -0.26446518301963806, 0.11962234228849411, 0.058404818177223206, -0.062307726591825485, -0.37675410509109497, -0.3212263286113739 ]
https://github.com/huggingface/datasets/issues/2538
Loading partial dataset when debugging
Thanks all for responding. Hey @albertvillanova Thanks. Yes, I would be interested. @lhoestq I think even if a small split is specified it loads up the full dataset from the disk (please correct me if this is not the case). Because it does seem to be slow to me even on subsequent calls. There is no repeated downloading so it seems that the cache is working. I am not aware of the streaming feature @thomwolf mentioned. So I might need to read up on it.
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits). Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues. Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow. Something like a debug mode would really help. Thanks!
85
Loading partial dataset when debugging I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits). Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues. Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow. Something like a debug mode would really help. Thanks! Thanks all for responding. Hey @albertvillanova Thanks. Yes, I would be interested. @lhoestq I think even if a small split is specified it loads up the full dataset from the disk (please correct me if this is not the case). Because it does seem to be slow to me even on subsequent calls. There is no repeated downloading so it seems that the cache is working. I am not aware of the streaming feature @thomwolf mentioned. So I might need to read up on it.
[ -0.41591259837150574, -0.14814642071723938, -0.012523077428340912, 0.35715124011039734, -0.09925161302089691, 0.27749383449554443, 0.5004062056541443, 0.4125296175479889, 0.3049233853816986, -0.16910290718078613, -0.09666934609413147, 0.12072679400444031, -0.11352930217981339, 0.251886248588562, 0.12172941863536835, 0.062383923679590225, -0.18127860128879547, 0.36251187324523926, 0.055830635130405426, -0.12074288725852966, 0.1732834428548813, -0.2011188119649887, -0.22024880349636078, -0.2168610394001007, -0.38894888758659363, 0.07649586349725723, 0.10064079612493515, 0.15147709846496582, 0.28426530957221985, -0.17818468809127808, 0.3325756788253784, 0.10093017667531967, 0.04303521290421486, 0.15291067957878113, -0.0001255008246516809, 0.003987381234765053, 0.5047403573989868, -0.1904088854789734, -0.4295721650123596, 0.08613782376050949, -0.20116178691387177, 0.013138030655682087, 0.4568486213684082, -0.006286047864705324, -0.08015269786119461, -0.18912462890148163, 0.019671063870191574, -0.3495226204395294, 0.30237704515457153, 0.013711061328649521, 0.05769208073616028, 0.0685625970363617, -0.5156866312026978, 0.18960198760032654, 0.16702276468276978, -0.03355208411812782, -0.02325812540948391, 0.3747783899307251, 0.47445476055145264, 0.02653483860194683, -0.3703330159187317, 0.15619222819805145, -0.12065374106168747, 0.33496952056884766, 0.4263785183429718, -0.027421090751886368, -0.08636444807052612, -0.5245528817176819, 0.3088875114917755, 0.43285512924194336, 0.7110125422477722, 0.0691518634557724, -0.3323354125022888, -0.5463775396347046, 0.05531613901257515, -0.12147048860788345, 0.1506926417350769, 0.0559455007314682, -0.4858688712120056, -0.01601504161953926, -0.47475042939186096, -0.17957302927970886, 0.009408893994987011, 0.15969333052635193, 0.03705722466111183, -0.28029096126556396, 0.04891859367489815, 0.10702750086784363, 0.3559328317642212, 0.24729900062084198, 0.31802254915237427, -0.10363566130399704, 0.07162513583898544, 0.0855664312839508, -0.3632456660270691, 0.03968388959765434, -0.18767721951007843, -0.06346248090267181, -0.03511198237538338, 0.4928973615169525, 0.05373365804553032, 0.4419736862182617, 0.19517195224761963, -0.05391218885779381, 0.5882902145385742, -0.12397937476634979, 0.19995616376399994, 0.1320294439792633, 0.3957650065422058, -0.26813259720802307, -0.042877111583948135, -0.030360832810401917, -0.334136426448822, -0.058583736419677734, 0.2521035969257355, -0.08398843556642532, -0.05640985071659088, -0.34373974800109863, -0.16818152368068695, -0.310180127620697, 0.14148153364658356, -0.08817420899868011, 0.20621339976787567, 0.41737255454063416, 0.0737161785364151, 0.07970201969146729, -0.1862521469593048, 0.12311761826276779, -0.23081301152706146, -0.15630009770393372, -0.10044059157371521, -0.2052614390850067, -0.007984623312950134, 0.1595642864704132, 0.3800746202468872, -0.3889923393726349, 0.34798747301101685, -0.13703975081443787, 0.41210082173347473, -0.16636648774147034, 0.11366324126720428, -0.26661479473114014, 0.017144009470939636, 0.2017514854669571, 0.0424344502389431, 0.27241551876068115, 0.08878014981746674, 0.24023154377937317, -0.28429296612739563, 0.4575054943561554, -0.007821669802069664, -0.3609115183353424, 0.07740896940231323, -0.008456455543637276, -0.3604274392127991, 0.23395587503910065, -0.252204030752182, 0.30748531222343445, 0.11198011785745621, -0.23428121209144592, -0.27748602628707886, 0.08197961002588272, -0.05166429281234741, -0.09618539363145828, 0.6512778997421265, 0.43517497181892395, -0.18351563811302185, -0.2662341594696045, -0.17411868274211884, 0.048852622509002686, 0.24126379191875458, 0.22475726902484894, -0.4059406816959381, 0.1950816959142685, -0.15566641092300415, -0.030799269676208496, 0.5310041308403015, -0.05498122796416283, -0.3930070996284485, 0.5534247159957886, -0.042355943471193314, 0.19682741165161133, -0.014045493677258492, 0.4981527626514435, 0.2792954444885254, 0.08346372842788696, 0.08599003404378891, 0.46846914291381836, -0.1412014663219452, 0.14416459202766418, -0.2153417468070984, -0.11615564674139023, 0.13951332867145538, 0.4743175506591797, 0.04317896440625191, 0.18870456516742706, -0.030954375863075256, 0.14274418354034424, 0.25083252787590027, 0.014693014323711395, -0.04309092089533806, 0.17158885300159454, -0.1290428191423416, 0.004890854004770517, 0.07088574022054672, -0.251520037651062, -0.6060563325881958, 0.35161885619163513, 0.21215905249118805, -0.34689536690711975, -0.017833566293120384, 0.014997879043221474, -0.103904590010643, -0.13330164551734924, -0.010694616474211216, -0.13978026807308197, -0.18772563338279724, 0.058074891567230225, -0.05526003986597061, -0.38996535539627075, -0.5041707754135132, 0.17053678631782532, 0.013852949254214764, 0.011117351241409779, -0.3354495167732239, 0.1781119555234909, 0.40084758400917053, -0.04625479131937027, 0.014477727934718132, -0.1621897667646408, 0.006824814714491367, -0.23686407506465912, -0.0759178176522255, 0.2959756851196289, 0.1486867219209671, 0.28288552165031433, 0.11451100558042526, 0.11395438015460968, 0.020264096558094025, -0.11390818655490875, 0.42750537395477295, 0.027754519134759903, 0.03520450368523598, -0.20949183404445648, -0.22807806730270386, 0.33323416113853455, -0.44680237770080566, 0.3899788558483124, 0.08672360330820084, -0.27793774008750916, 0.13554564118385315, -0.09032262116670609, -0.13101501762866974, -0.05916240066289902, 0.46903160214424133, -0.26533243060112, 0.3321261405944824, 0.20596817135810852, -0.17018108069896698, -0.06763043999671936, 0.1805543750524521, -0.05474117398262024, -0.02818194217979908, 0.31914547085762024, -0.5030069947242737, -0.08555622398853302, -0.07106717675924301, -0.15355074405670166, 0.17065541446208954, 0.14122548699378967, 0.12573619186878204, -0.24631744623184204, 0.3012809455394745, -0.09736929088830948, 0.17975203692913055, 0.0764465406537056, 0.02399114891886711, 0.24016499519348145, -0.16928941011428833, -0.16772505640983582, -0.20757655799388885, 0.13353990018367767, 0.1633007526397705, 0.12616179883480072, -0.24610091745853424, 0.055953823029994965, -0.3923882246017456, -0.13712912797927856, 0.09841904789209366, -0.02630859613418579, -0.01624375395476818, -0.11454487591981888, 0.029551658779382706, 0.39225947856903076, 0.13704928755760193, 0.1323356032371521, -0.24320892989635468, 0.20426064729690552, -0.15110467374324799, -0.37578174471855164, -0.2814657688140869, -0.2620999217033386, -0.048549238592386246, 0.003944803960621357, 0.44296109676361084, 0.15152381360530853, 0.2691594958305359, -0.2304833084344864, -0.23614215850830078, 0.10462452471256256, -0.04456314817070961, -0.041058965027332306, 0.23515962064266205, 0.2145913690328598, -0.1406756192445755, 0.3545922040939331, 0.2172021120786667, -0.28708600997924805, 0.06787058711051941, -0.18214111030101776, -0.008720706216990948, 0.07924564182758331, 0.20336395502090454, 0.31698209047317505, 0.0007929332787171006, -0.14705291390419006, -0.0798829048871994, -0.3423278033733368, 0.3489234149456024, 0.021949121728539467, 0.10811182111501694, 0.013132179155945778, -0.20319004356861115, -0.1880279928445816, -0.02010267600417137, 0.12279176712036133, 0.09905825555324554, -0.2736402451992035, 0.38888001441955566, 0.1685301959514618, -0.13197578489780426, -0.019749244675040245, -0.04279990866780281, -0.17256022989749908, 0.24570679664611816, -0.7163404822349548, -0.036367855966091156, -0.10390682518482208, -0.027533894404768944, -0.14114579558372498, -0.31527432799339294, -0.009318525902926922, -0.16386324167251587, 0.0879862979054451, 0.14057570695877075, -0.24662892520427704, -0.16608405113220215, -0.23834887146949768, 0.03270425647497177, -0.05191579833626747, 0.27903878688812256, -0.10510842502117157, 0.7948540449142456, 0.06696251034736633, -0.13587529957294464, -0.1208629235625267, -0.11529415100812912, 0.07480905205011368, -0.40055301785469055, -0.3552452325820923, 0.004725039936602116, -0.21756096184253693, -0.2861964702606201, 0.13862454891204834, -0.08460528403520584, -0.3736603260040283, -0.21034486591815948, -0.00403288658708334, -0.24126049876213074, -0.2968296706676483, 0.4443386495113373, -0.49016812443733215, -0.16395564377307892, 0.008424933068454266, 0.28299835324287415, 0.014986888505518436, -0.30828744173049927, -0.044269416481256485, 0.11671416461467743, 0.5464727878570557, -0.20556509494781494, 0.07723604142665863, 0.20334704220294952, -0.22944298386573792, 0.18010380864143372, -0.1383928805589676, 0.15408797562122345, -0.03720221295952797, -0.18684837222099304, 0.3023751676082611, 0.2027571201324463, 0.6964055895805359, 0.0290532223880291, 0.15235228836536407, -0.0294493418186903, -0.5537371039390564, -0.3339632749557495, 0.05131424218416214, 0.12365720421075821, 0.542699933052063, 0.1416492462158203, 0.33195820450782776, -0.34121039509773254, -0.08572869747877121, 0.0878412052989006, 0.34751951694488525, -0.25629740953445435, -0.11656392365694046, -0.27331438660621643, 0.1115521490573883, -0.33919939398765564, 0.04603348299860954, -0.034102845937013626, -0.2568400204181671, 0.07717792689800262, -0.13583430647850037, -0.19691213965415955, 0.07038614898920059, 0.10829450190067291, 0.3095800578594208, 0.2561497688293457, -0.07959919422864914, 0.6283693313598633, 0.24731726944446564, -0.07466848194599152, 0.26231229305267334, 0.4484376311302185, 0.054110925644636154, -0.23913264274597168, 0.2559787631034851, -0.07614137977361679, 0.15703138709068298, 0.4805581867694855, -0.02732146345078945, -0.17404700815677643, 0.1657721996307373, 0.18218055367469788, -0.353529155254364, 0.029664641246199608, 0.04374738782644272, -0.03637475147843361, -0.2842463552951813, -0.5381669402122498, 0.40997084975242615, -0.15834228694438934, 0.02700827084481716, 0.5929960012435913, -0.267898827791214, 0.043302495032548904, 0.17118540406227112, -0.03412523493170738, 0.900187075138092, -0.2775949239730835, 0.018104370683431625, -0.4738500714302063, 0.02551574818789959, 0.3826700747013092, -0.252936989068985, 0.05766076594591141, -0.37582316994667053, -0.6318650245666504, 0.04519462585449219, -0.2700016498565674, -0.2560805678367615, 0.29038751125335693, 0.1918896585702896, 0.26269805431365967, -0.34502291679382324, 0.14522333443164825, -0.08962966501712799, 0.2789685130119324, 0.009276087395846844, -0.31333351135253906, -0.0787835568189621, -0.01124037615954876, -0.06868622452020645, 0.18296343088150024, 0.11946319788694382, 0.03241658955812454, -0.01371588185429573, 0.12809985876083374, -0.4161297678947449, 0.150904580950737, -0.13541413843631744, -0.1083076149225235, -0.2610020637512207, -0.445933073759079, 0.0013437620364129543, 0.1891568899154663, -0.16957955062389374, 0.00795354787260294, -0.09623053669929504, 0.31134945154190063, -0.002813018625602126, 0.23179461061954498, 0.03423323109745979, 0.09171956032514572, -0.08843410015106201, -0.06694149225950241, -0.08679553866386414, -0.11936850845813751, -0.299748957157135, -0.4180702567100525, 0.32023313641548157, 0.2411244511604309, 0.17271921038627625, -0.04884258285164833, -0.24463485181331635, -0.020855393260717392, 0.15519052743911743, -0.20338736474514008, 0.01304471492767334, 0.4422786831855774, -0.0547039657831192, 0.17661626636981964, 0.23174582421779633, -0.38996168971061707, -0.03244560956954956, 0.4000258445739746, 0.17748910188674927, -0.01220995094627142, 0.47297292947769165, -0.09839034080505371, -0.3320080041885376, -0.09052971005439758, 0.05281738564372063, 0.29138094186782837, -0.4966560900211334, 0.007761090528219938, -0.1362750232219696, 0.10667838901281357, -0.13566052913665771, -0.255093514919281, -0.060069743543863297, 0.08961706608533859, -0.3603338599205017, -0.42926833033561707, -0.1603853702545166, 0.29256704449653625, -0.0006640379433520138, 0.28138837218284607, -0.24829579889774323, -0.1884155571460724, -0.08656222373247147, 0.4756276309490204, -0.13671104609966278, -0.0825287401676178, -0.06714431196451187, 0.33846327662467957, 0.035408079624176025, 0.060830533504486084, 0.35257551074028015, -0.12603670358657837, -0.038571663200855255, 0.024558505043387413, 0.16562189161777496, -0.07323961704969406, 0.1285143792629242, 0.22955068945884705, -0.15579305589199066, -0.2205277532339096, -0.23342952132225037, -0.18025866150856018, -0.12481912970542908, -0.26381659507751465, 0.25114619731903076, 0.15839678049087524, 0.16945554316043854, -0.11068311333656311, 0.4914950728416443, -0.06092354655265808, -0.47928062081336975, 0.22149179875850677, -0.2967146039009094, 0.3501199185848236, -0.1263444870710373, 0.20382174849510193, 0.0991055965423584, -0.010506981983780861, -0.03576776012778282, -0.1017041727900505, 0.3124389052391052, -0.11133646219968796, 0.2047918736934662, 0.04702717438340187, 0.2950061559677124, 0.0029085150454193354, 0.3840980529785156, 0.8036355376243591, 0.03344658389687538, 0.2618502974510193, -0.009987208060920238, 0.023774340748786926, -0.05242619663476944, -0.132724791765213, 0.04297047480940819, -0.35470736026763916, -0.032794490456581116, 0.2194918394088745, -0.17780297994613647, 0.1971530020236969, 0.006640702486038208, -0.25712907314300537, 0.2985551953315735, -0.1595153510570526, -0.0018200452905148268, 0.37393802404403687, -0.2226196527481079, -0.024882188066840172, 0.05943810194730759, 0.2785045802593231, 0.010102997533977032, 0.3171231150627136, -0.10134423524141312, 0.20246151089668274, 0.16210097074508667, 0.1747724562883377, -0.2879360318183899, -0.4448859989643097, -0.04596638306975365, 0.5084711313247681, 0.1409299373626709, 0.034962836652994156, -0.11586739867925644, -0.018383480608463287, 0.11527401208877563, -0.24199701845645905, -0.058295026421546936, -0.014559266157448292, 0.12229324132204056, -0.06675560772418976, 0.2357204556465149, -0.16624759137630463, -0.1868184506893158, 0.1992182433605194, -0.21243320405483246, -0.33870312571525574, -0.12238510698080063, 0.3224775791168213, 0.13677209615707397, -0.11149384826421738, 0.059854913502931595, -0.0568307563662529, 0.22794194519519806, -0.3398153781890869, 0.12816110253334045, -0.13082213699817657, 0.31740355491638184, 0.5237313508987427, -0.025046106427907944, -0.004435584880411625, 0.10366525501012802, -0.08806483447551727, 0.06026233732700348, 0.30790990591049194, -0.038688015192747116, -0.23401834070682526, 0.36262160539627075, 0.18830516934394836, 0.31227603554725647, 0.03324195370078087, 0.014388704672455788, -0.05941081419587135, 0.236465722322464, -0.22987869381904602, -0.037265751510858536, -0.47610926628112793, 0.2671966552734375, 0.10544922947883606, -0.23716594278812408, -0.016149111092090607, -0.15958018600940704, 0.18718920648097992, -0.46139129996299744, 0.2017507553100586, -0.32199448347091675, -0.04847676679491997, 0.32828381657600403, 0.004022844601422548, -0.09810314327478409, 0.6001442670822144, 0.06216803938150406, 0.5602128505706787, -0.22831395268440247, 0.02136199176311493, -0.41722285747528076, 0.09457055479288101, -0.016452940180897713, -0.006826487369835377, 0.42963162064552307, 0.20576345920562744, 0.38345590233802795, 0.3887081742286682, 0.035589467734098434, 0.03802402317523956, 0.2914915978908539, 0.3280867338180542, -0.016788842156529427, -0.05895519629120827, -0.5148504376411438, 0.28426024317741394, -0.05550031736493111, -0.3336770534515381, 0.24578075110912323, 0.0031643391121178865, -0.1566980928182602, 0.4101819396018982, -0.43011608719825745, 0.42350655794143677, 0.35959985852241516, 0.35068169236183167, -0.2170027196407318, 0.6864228844642639, 0.022863799706101418, -0.1376713216304779, -0.02963917888700962, -0.5314250588417053, -0.29449471831321716, 0.31330737471580505, 0.1260620802640915, -0.11575033515691757, -0.012857133522629738, 0.023660525679588318, -0.2885640263557434, 0.21854014694690704, -0.18843859434127808, 0.034426018595695496, -0.07424311339855194, -0.4067564010620117, 0.09701240062713623, 0.32798874378204346, 0.28388145565986633, 0.16559141874313354, -0.13930897414684296, -0.2604668438434601, -0.16526640951633453, 0.03573445603251457, 0.5490173101425171, -0.17038539052009583, -0.0008904506685212255, 0.007443822454661131, 0.3300960659980774, 0.1613236367702484, 0.2442731410264969, -0.5656347274780273, -0.01879517361521721, 0.30262672901153564, -0.2663388252258301, 0.05325871706008911, -0.010547514073550701, 0.040147941559553146, -0.0577692948281765, -0.24615201354026794, 0.18530666828155518, 0.09047820419073105, -0.12175789475440979, -0.3685893714427948, -0.3309917747974396 ]
https://github.com/huggingface/datasets/issues/2532
Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task
Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**?
[This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner). The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`: ![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png) Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing) It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'. One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`. I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this. p.s. **I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)** `get_dataset `is just a simple wrapping for `load_dataset` and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")`
18
Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task [This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner). The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`: ![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png) Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing) It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'. One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`. I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this. p.s. **I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)** `get_dataset `is just a simple wrapping for `load_dataset` and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")` Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**?
[ -0.1536964476108551, 0.0790131539106369, 0.0737818107008934, -0.038231730461120605, 0.09215747565031052, -0.32468152046203613, -0.08998160809278488, 0.10603179782629013, -0.461760938167572, 0.19867414236068726, -0.20853734016418457, 0.30742090940475464, 0.2766764760017395, 0.030885009095072746, -0.21919120848178864, -0.16327767074108124, 0.14799299836158752, 0.21905748546123505, 0.005623494740575552, 0.06112281233072281, -0.11941923201084137, 0.45713838934898376, -0.21233563125133514, 0.21436059474945068, -0.28662580251693726, -0.07063627988100052, 0.12557794153690338, -0.3156486749649048, -0.16839778423309326, -0.3988148272037506, 0.24971412122249603, 0.11891087144613266, -0.08367140591144562, 0.2043142467737198, -0.00011269693641224876, -0.05750160664319992, -0.018035709857940674, 0.01428860891610384, 0.178675577044487, -0.19643273949623108, 0.12838593125343323, -0.3769187033176422, -0.3356097340583801, 0.10738955438137054, -0.06366988271474838, 0.03961026296019554, 0.2408124953508377, -0.055418964475393295, 0.643140435218811, 0.4151497483253479, 0.14555534720420837, -0.013489087112247944, 0.25451838970184326, 0.06076847016811371, -0.3109237253665924, 0.268966943025589, -0.09506748616695404, 0.01900973916053772, -0.15407218039035797, 0.03146851435303688, -0.07465153932571411, -0.009617644362151623, -0.09226997196674347, -0.4802752137184143, -0.01488538272678852, 0.11489617079496384, 0.3214079737663269, -0.4625910222530365, 0.18707242608070374, 0.018533416092395782, -0.24988871812820435, -0.04507339373230934, -0.18307743966579437, -0.39149487018585205, -0.1368265002965927, -0.2679939568042755, 0.200096994638443, -0.15426328778266907, -0.11812403798103333, 0.11682826280593872, 0.012083387933671474, 0.13784581422805786, 0.029742900282144547, -0.21203915774822235, -0.29428672790527344, 0.5647348165512085, -0.06541194766759872, 0.04264496639370918, -0.20475587248802185, -0.010176342912018299, 0.39184334874153137, -0.0428207665681839, 0.0059832436963915825, 0.4373287260532379, -0.2852552533149719, -0.058525729924440384, 0.19706979393959045, -0.45482712984085083, -0.007932623848319054, -0.035667017102241516, 0.12427114695310593, 0.206096351146698, 0.071958526968956, 0.06091693788766861, -0.16301628947257996, 0.4642791748046875, 0.21145112812519073, 0.27663564682006836, 0.1968422383069992, 0.1170864850282669, -0.03980034217238426, -0.040441375225782394, 0.0627819299697876, -0.1251492202281952, -0.04987642541527748, 0.25085967779159546, -0.37355363368988037, 0.103970967233181, -0.2315126210451126, 0.4121434986591339, -0.07186730206012726, 0.3000814616680145, 0.0338655486702919, -0.09935857355594635, 0.039320338517427444, 0.2893413305282593, -0.3403165936470032, -0.10191550850868225, -0.08262176811695099, 0.10865503549575806, -0.19528374075889587, 0.018983298912644386, -0.29474547505378723, 0.12470950186252594, -0.19662223756313324, 0.10817774385213852, -0.027550727128982544, 0.12801213562488556, 0.35698652267456055, -0.03269282355904579, -0.08280531316995621, -0.09475266188383102, 0.5368515849113464, 0.27820253372192383, 0.026152458041906357, 0.12618710100650787, 0.11548149585723877, -0.359840452671051, -0.37482213973999023, -0.04339093714952469, -0.2157931923866272, 0.0899902880191803, 0.1479027271270752, 0.20128227770328522, -0.10737664252519608, 0.13482147455215454, -0.37850892543792725, 0.2858779728412628, 0.33080121874809265, -0.24652467668056488, 0.002981478115543723, -0.3679090738296509, -0.4135369658470154, -0.1898319125175476, 0.3192930519580841, -0.1442519575357437, -0.0017332143615931273, -0.009171188808977604, 0.11065849661827087, 0.18913911283016205, 0.48401129245758057, 0.13396500051021576, 0.3138589859008789, 0.3631409704685211, -0.49170973896980286, 0.4855649173259735, 0.09879113733768463, -0.13364563882350922, -0.08816632628440857, -0.1546434909105301, -0.3981323540210724, 0.25741779804229736, -0.17784690856933594, -0.2853304147720337, 0.14593181014060974, 0.16483432054519653, 0.16425193846225739, 0.46753358840942383, -0.13454091548919678, 0.09679164737462997, -0.08240305632352829, 0.30935317277908325, -0.051647085696458817, -0.2683202624320984, 0.012527280487120152, -0.03489455580711365, -0.23073667287826538, -0.23822236061096191, -0.1597030907869339, -0.08852971345186234, 0.10251916199922562, -0.08720847964286804, 0.04389895871281624, -0.129617378115654, 0.023830369114875793, -0.1528645008802414, 0.04286300018429756, -0.01160081010311842, -0.36197882890701294, 0.2263040393590927, 0.006500022951513529, -0.16657161712646484, -0.24409854412078857, 0.17804330587387085, -0.1699589192867279, -0.13741956651210785, 0.2298453450202942, 0.06616360694169998, 0.1778307408094406, 0.3334912061691284, 0.05531628429889679, 0.2994610369205475, 0.1876496970653534, 0.2598831057548523, -0.23793986439704895, 0.16552145779132843, -0.15393249690532684, 0.03288360685110092, -0.10766229778528214, 0.44957244396209717, 0.05768651142716408, -0.11599159240722656, -0.12629809975624084, 0.22838284075260162, 0.2532852590084076, -0.04426867887377739, -0.2839110195636749, 0.08557271212339401, 0.14712081849575043, 0.16321684420108795, -0.3755311667919159, 0.2840961813926697, -0.20775176584720612, -0.12244734168052673, 0.526504397392273, 0.8932768106460571, -0.03842421621084213, 0.12675261497497559, -0.14578285813331604, -0.022170620039105415, 0.4458661377429962, 0.11814244091510773, -0.15466350317001343, -0.2694561183452606, 0.03720822557806969, 0.2975228726863861, -0.10649283230304718, 0.025268487632274628, -0.09403842687606812, 0.14218974113464355, 0.2193610966205597, 0.0666167214512825, -0.22007615864276886, 0.11705372482538223, 0.004420694429427385, -0.28484001755714417, 0.17360734939575195, 0.09409230202436447, 0.23082184791564941, 0.04038421809673309, 0.15981224179267883, 0.2757774293422699, -0.23048532009124756, -0.16235174238681793, 0.13986432552337646, 0.015991581603884697, 0.11915107816457748, 0.508124589920044, 0.1112571507692337, 0.4917434751987457, -0.25699901580810547, -0.25069448351860046, -0.32807308435440063, 0.04698161408305168, -0.16429369151592255, 0.23284126818180084, -0.20010221004486084, -0.33812472224235535, -0.41888493299484253, -0.14505553245544434, -0.11501048505306244, -0.5577636957168579, 0.13811010122299194, 0.04132475703954697, -0.27524077892303467, 0.42346230149269104, 0.11343634873628616, 0.2538703680038452, -0.11761448532342911, 0.05662180855870247, -0.2270079106092453, 0.04969862475991249, -0.4241378903388977, -0.0032034527976065874, 0.18830060958862305, -0.227152481675148, 0.18677832186222076, -0.300856351852417, -0.052372973412275314, 0.16121120750904083, -0.7381551861763, 0.15768741071224213, 0.05999606102705002, 0.030080068856477737, 0.2673285901546478, -0.2804105579853058, -0.4084676504135132, -0.5457119345664978, 0.11075828969478607, 0.027297528460621834, -0.36361491680145264, 0.12399110198020935, -0.08176733553409576, -0.14282965660095215, -0.16446278989315033, -0.023630725219845772, 0.06920338422060013, -0.20587819814682007, -0.04295727610588074, -0.4525323808193207, 0.2052508443593979, 0.23798343539237976, -0.4658527672290802, -0.09506639093160629, -0.4946015179157257, 0.033081378787755966, -0.1578766256570816, -0.08936239778995514, 0.20966845750808716, -0.20818307995796204, -0.06073031574487686, -0.2306276559829712, -0.30899059772491455, 0.42376548051834106, 0.03774343058466911, -0.03285626694560051, -0.02197899855673313, 0.023334914818406105, 0.06988711655139923, -0.11609354615211487, -0.0024435787927359343, 0.06314908713102341, 0.13902565836906433, -0.03184518963098526, 0.000342892250046134, 0.09777148813009262, 0.07185149937868118, -0.24975071847438812, 0.1135580837726593, -0.2141740322113037, 0.022148022428154945, 0.27030637860298157, 0.2845877408981323, 0.23099073767662048, -0.21089830994606018, 0.046213358640670776, 0.047886770218610764, 0.14703403413295746, -0.2481188029050827, -0.18722981214523315, 0.13886091113090515, 0.16332899034023285, -0.08042044937610626, 0.17763830721378326, 0.0043389685451984406, 0.012496129609644413, 0.07874146848917007, 0.06714529544115067, 0.12392532080411911, -0.5669610500335693, 0.17406655848026276, 0.006334821693599224, 0.307886004447937, -0.02243972010910511, 0.008806056343019009, -0.15569643676280975, -0.16755273938179016, -0.023014763370156288, 0.09127754718065262, -0.06852375715970993, 0.0833246186375618, -0.609336256980896, -0.40870603919029236, -0.579093873500824, 0.17966963350772858, 0.37692558765411377, 0.5158495306968689, 0.06319718807935715, 0.002239441266283393, -0.06092673912644386, 0.19010257720947266, 0.4397815465927124, -0.0025199733208864927, -0.3540676236152649, 0.15873605012893677, -0.24824810028076172, 0.04480891302227974, -0.05999468266963959, 0.11924614757299423, 0.4059159755706787, 0.4624781310558319, 0.6241880655288696, -0.10790744423866272, -0.04445144906640053, -0.2833610773086548, 0.03802776709198952, -0.043742261826992035, -0.027917785570025444, -0.2320086508989334, -0.12563557922840118, 0.02141231670975685, 0.2826705873012543, 0.37972113490104675, 0.4987154006958008, 0.12521600723266602, -0.324832946062088, -0.10135380178689957, -0.06805023550987244, -0.03759167715907097, 0.2665782868862152, -0.010676966980099678, 0.04789242148399353, 0.059367790818214417, 0.017635120078921318, 0.19567658007144928, 0.4381668269634247, -0.20380957424640656, 0.22620727121829987, -0.5027627348899841, -0.2139519900083542, 0.06295888125896454, 0.1709328293800354, 0.21437512338161469, 0.17903107404708862, 0.12522535026073456, -0.2666705548763275, 0.01956295594573021, -0.026947438716888428, 0.5451053380966187, -0.11037769913673401, 0.24740496277809143, -0.2115400731563568, 0.19465625286102295, -0.11201848834753036, 0.13194933533668518, -0.17595598101615906, 0.19865208864212036, 0.009429964236915112, -0.4868905246257782, 0.2963677942752838, 0.3950623571872711, 0.9533656239509583, 0.46903306245803833, 0.23238280415534973, 0.34437084197998047, -0.3253096044063568, 0.557752251625061, 0.012184437364339828, 0.22798274457454681, -0.4324994683265686, -0.1341833770275116, -0.04566382244229317, -0.006129949353635311, -0.10332513600587845, -0.19767944514751434, -0.033065877854824066, 0.17414332926273346, 0.28836438059806824, 0.32332465052604675, 0.027767611667513847, -0.09828926622867584, 0.08145787566900253, -0.3617430329322815, -0.001346698380075395, 0.023409388959407806, -0.0649721771478653, 0.0034664925187826157, -0.16220121085643768, 0.11704570055007935, -0.14431646466255188, 0.16573530435562134, -0.26354464888572693, -0.07000774890184402, -0.27165764570236206, 0.09895646572113037, 0.3264749050140381, -0.2881452143192291, 0.04992598295211792, 0.03686295822262764, 0.6191897392272949, 0.33154556155204773, 0.022581802681088448, -0.033967602998018265, 0.14692260324954987, 0.24282380938529968, 0.044536489993333817, -0.4531976580619812, 0.3092099726200104, 0.062404051423072815, 0.22388027608394623, -0.4029237926006317, 0.0980224758386612, 0.21580930054187775, -0.25089165568351746, -0.06150184944272041, 0.03825920820236206, 0.0031561709474772215, 0.22505715489387512, -0.11112813651561737, 0.20285648107528687, -0.22562789916992188, 0.13363869488239288, -0.03378205746412277, -0.2314991056919098, -0.008901157416403294, -0.03696199506521225, -0.31491801142692566, 0.04173874482512474, 0.20637650787830353, -0.03944896161556244, -0.5680711269378662, 0.2585470974445343, -0.3827706575393677, -0.2513921558856964, -0.007450631819665432, 0.2281176596879959, 0.19664382934570312, -0.06704265624284744, 0.13692495226860046, -0.09811090677976608, -0.29444050788879395, -0.1854887455701828, 0.21928182244300842, 0.32198211550712585, -0.14073701202869415, 0.04569866135716438, -0.35104355216026306, -0.15889844298362732, 0.0010027833050116897, -0.17866314947605133, 0.21997687220573425, 0.32523760199546814, 0.5128349661827087, -0.380193293094635, 0.13780687749385834, -0.2897762358188629, -0.2866574823856354, -0.18543267250061035, -0.011455218307673931, -0.4478396773338318, -0.12181437760591507, -0.46384552121162415, -0.06610316783189774, 0.03964594751596451, 0.4677850604057312, -0.09399263560771942, -0.15835069119930267, -0.15636059641838074, 0.09351414442062378, 0.3157993257045746, -0.15541188418865204, 0.1816108673810959, 0.4209158718585968, -0.10544480383396149, -0.2760102152824402, -0.01259295828640461, -0.006285406183451414, -0.034376904368400574, 0.21518537402153015, 0.21609288454055786, 0.45626547932624817, 0.10220438241958618, 0.021516306325793266, 0.1370665431022644, 0.04691419377923012, 0.1742350161075592, 0.4892761707305908, -0.3065263628959656, -0.060269568115472794, 0.06501059979200363, 0.1609165072441101, 0.2588517665863037, -0.10352475196123123, 0.21405133605003357, 0.13304726779460907, -0.3981344699859619, 0.21249258518218994, 0.016654133796691895, 0.24890437722206116, -0.056916043162345886, -0.4193788766860962, 0.4872603416442871, 0.15493597090244293, -0.07179497182369232, 0.05234532058238983, 0.39590173959732056, -0.11986333131790161, -0.058712925761938095, 0.053430426865816116, 0.2961941659450531, -0.017407115548849106, 0.2820732295513153, 0.09700965881347656, 0.29057976603507996, -0.03407777100801468, 0.1603579968214035, 0.029296277090907097, 0.017020098865032196, 0.49469712376594543, 0.44040101766586304, -0.1957184374332428, 0.15615251660346985, 0.2504728436470032, 0.04389605671167374, 0.3230758309364319, 0.030816230922937393, 0.02197316475212574, -0.09271342307329178, -0.18686723709106445, -0.2750905454158783, 0.12240209430456161, -0.08907721936702728, 0.21071432530879974, 0.34142357110977173, 0.042695023119449615, -0.0634649246931076, -0.06216595321893692, -0.009410087019205093, 0.17256201803684235, -0.6092425584793091, -0.10437511652708054, -0.39376527070999146, -0.06387676298618317, -0.3130137622356415, -0.08785922825336456, 0.11861374229192734, 0.16066360473632812, 0.013257335871458054, -0.20745667815208435, -0.32737457752227783, -0.015774544328451157, 0.2165646255016327, 0.00849821511656046, 0.23581860959529877, -0.08231784403324127, 0.29514575004577637, 0.010711753740906715, 0.0943172499537468, -0.22710295021533966, 0.1180296242237091, 0.5410670042037964, 0.19452524185180664, -0.3048999309539795, -0.18987524509429932, -0.1428612768650055, 0.015929823741316795, -0.2217850536108017, 0.37238165736198425, -0.04617301747202873, -0.1168173998594284, 0.18493115901947021, 0.0456458255648613, -0.17474907636642456, -0.04969199746847153, 0.25912266969680786, 0.09560959786176682, 0.25607195496559143, 0.3022284507751465, 0.027009183540940285, 0.046087417751550674, 0.13593989610671997, -0.01663518324494362, 0.10464510321617126, 0.018618324771523476, -0.1913215070962906, -0.022469347342848778, 0.04960550367832184, -0.1372322142124176, 0.08899515867233276, 0.24029964208602905, 0.3574059307575226, 0.5412002205848694, -0.09218037873506546, -0.20618970692157745, -0.41495996713638306, -0.38631266355514526, 0.5211240649223328, 0.47850552201271057, -0.01684807427227497, -0.06296150386333466, -0.19649192690849304, -0.10751692950725555, 0.09571298956871033, -0.4149102568626404, 0.16475462913513184, 0.08979474008083344, 0.16718725860118866, -0.15547344088554382, 0.28123337030410767, -0.0012404745211824775, -0.4019351601600647, -0.10898076742887497, -0.07242903858423233, 0.2989853620529175, 0.028775062412023544, 0.06019628420472145, 0.20420964062213898, -0.013470200821757317, -0.1505279839038849, 0.32013750076293945, -0.05211368575692177, 0.6280633211135864, 0.13540664315223694, -0.14559049904346466, 0.44118642807006836, -0.017650701105594635, 0.028677329421043396, -0.5843865275382996, 0.31666678190231323, -0.2392609417438507, 0.3147202730178833, 0.037315722554922104, -0.47179460525512695, -0.050221726298332214, 0.025254035368561745, 0.348757803440094, -0.17208097875118256, -0.3881038427352905, 0.3029595911502838, -0.2138737589120865, -0.03577934950590134, 0.05062957480549812, 0.38825714588165283, 0.26503056287765503, 0.4494660794734955, -0.2877137064933777, -0.6340729594230652, -0.03300780802965164, -0.21014870703220367, -0.28570157289505005, -0.19992072880268097, -0.11783649027347565, 0.2962207794189453, -0.1532810777425766, -0.13815084099769592, -0.28837674856185913, 0.15956318378448486, -0.23512057960033417, -0.2998197674751282, 0.24229291081428528, -0.17330779135227203, -0.032171912491321564, -0.19824384152889252, 0.3979834020137787, 0.17415443062782288, -0.2592078745365143, 0.10108782351016998, -0.14171187579631805 ]
https://github.com/huggingface/datasets/issues/2532
Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task
> Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**? Oh, I am sorry I would reopen the post on huggingface/transformers
[This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner). The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`: ![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png) Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing) It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'. One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`. I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this. p.s. **I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)** `get_dataset `is just a simple wrapping for `load_dataset` and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")`
30
Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task [This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner). The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`: ![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png) Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing) It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'. One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`. I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this. p.s. **I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)** `get_dataset `is just a simple wrapping for `load_dataset` and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")` > Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**? Oh, I am sorry I would reopen the post on huggingface/transformers
[ -0.1536964476108551, 0.0790131539106369, 0.0737818107008934, -0.038231730461120605, 0.09215747565031052, -0.32468152046203613, -0.08998160809278488, 0.10603179782629013, -0.461760938167572, 0.19867414236068726, -0.20853734016418457, 0.30742090940475464, 0.2766764760017395, 0.030885009095072746, -0.21919120848178864, -0.16327767074108124, 0.14799299836158752, 0.21905748546123505, 0.005623494740575552, 0.06112281233072281, -0.11941923201084137, 0.45713838934898376, -0.21233563125133514, 0.21436059474945068, -0.28662580251693726, -0.07063627988100052, 0.12557794153690338, -0.3156486749649048, -0.16839778423309326, -0.3988148272037506, 0.24971412122249603, 0.11891087144613266, -0.08367140591144562, 0.2043142467737198, -0.00011269693641224876, -0.05750160664319992, -0.018035709857940674, 0.01428860891610384, 0.178675577044487, -0.19643273949623108, 0.12838593125343323, -0.3769187033176422, -0.3356097340583801, 0.10738955438137054, -0.06366988271474838, 0.03961026296019554, 0.2408124953508377, -0.055418964475393295, 0.643140435218811, 0.4151497483253479, 0.14555534720420837, -0.013489087112247944, 0.25451838970184326, 0.06076847016811371, -0.3109237253665924, 0.268966943025589, -0.09506748616695404, 0.01900973916053772, -0.15407218039035797, 0.03146851435303688, -0.07465153932571411, -0.009617644362151623, -0.09226997196674347, -0.4802752137184143, -0.01488538272678852, 0.11489617079496384, 0.3214079737663269, -0.4625910222530365, 0.18707242608070374, 0.018533416092395782, -0.24988871812820435, -0.04507339373230934, -0.18307743966579437, -0.39149487018585205, -0.1368265002965927, -0.2679939568042755, 0.200096994638443, -0.15426328778266907, -0.11812403798103333, 0.11682826280593872, 0.012083387933671474, 0.13784581422805786, 0.029742900282144547, -0.21203915774822235, -0.29428672790527344, 0.5647348165512085, -0.06541194766759872, 0.04264496639370918, -0.20475587248802185, -0.010176342912018299, 0.39184334874153137, -0.0428207665681839, 0.0059832436963915825, 0.4373287260532379, -0.2852552533149719, -0.058525729924440384, 0.19706979393959045, -0.45482712984085083, -0.007932623848319054, -0.035667017102241516, 0.12427114695310593, 0.206096351146698, 0.071958526968956, 0.06091693788766861, -0.16301628947257996, 0.4642791748046875, 0.21145112812519073, 0.27663564682006836, 0.1968422383069992, 0.1170864850282669, -0.03980034217238426, -0.040441375225782394, 0.0627819299697876, -0.1251492202281952, -0.04987642541527748, 0.25085967779159546, -0.37355363368988037, 0.103970967233181, -0.2315126210451126, 0.4121434986591339, -0.07186730206012726, 0.3000814616680145, 0.0338655486702919, -0.09935857355594635, 0.039320338517427444, 0.2893413305282593, -0.3403165936470032, -0.10191550850868225, -0.08262176811695099, 0.10865503549575806, -0.19528374075889587, 0.018983298912644386, -0.29474547505378723, 0.12470950186252594, -0.19662223756313324, 0.10817774385213852, -0.027550727128982544, 0.12801213562488556, 0.35698652267456055, -0.03269282355904579, -0.08280531316995621, -0.09475266188383102, 0.5368515849113464, 0.27820253372192383, 0.026152458041906357, 0.12618710100650787, 0.11548149585723877, -0.359840452671051, -0.37482213973999023, -0.04339093714952469, -0.2157931923866272, 0.0899902880191803, 0.1479027271270752, 0.20128227770328522, -0.10737664252519608, 0.13482147455215454, -0.37850892543792725, 0.2858779728412628, 0.33080121874809265, -0.24652467668056488, 0.002981478115543723, -0.3679090738296509, -0.4135369658470154, -0.1898319125175476, 0.3192930519580841, -0.1442519575357437, -0.0017332143615931273, -0.009171188808977604, 0.11065849661827087, 0.18913911283016205, 0.48401129245758057, 0.13396500051021576, 0.3138589859008789, 0.3631409704685211, -0.49170973896980286, 0.4855649173259735, 0.09879113733768463, -0.13364563882350922, -0.08816632628440857, -0.1546434909105301, -0.3981323540210724, 0.25741779804229736, -0.17784690856933594, -0.2853304147720337, 0.14593181014060974, 0.16483432054519653, 0.16425193846225739, 0.46753358840942383, -0.13454091548919678, 0.09679164737462997, -0.08240305632352829, 0.30935317277908325, -0.051647085696458817, -0.2683202624320984, 0.012527280487120152, -0.03489455580711365, -0.23073667287826538, -0.23822236061096191, -0.1597030907869339, -0.08852971345186234, 0.10251916199922562, -0.08720847964286804, 0.04389895871281624, -0.129617378115654, 0.023830369114875793, -0.1528645008802414, 0.04286300018429756, -0.01160081010311842, -0.36197882890701294, 0.2263040393590927, 0.006500022951513529, -0.16657161712646484, -0.24409854412078857, 0.17804330587387085, -0.1699589192867279, -0.13741956651210785, 0.2298453450202942, 0.06616360694169998, 0.1778307408094406, 0.3334912061691284, 0.05531628429889679, 0.2994610369205475, 0.1876496970653534, 0.2598831057548523, -0.23793986439704895, 0.16552145779132843, -0.15393249690532684, 0.03288360685110092, -0.10766229778528214, 0.44957244396209717, 0.05768651142716408, -0.11599159240722656, -0.12629809975624084, 0.22838284075260162, 0.2532852590084076, -0.04426867887377739, -0.2839110195636749, 0.08557271212339401, 0.14712081849575043, 0.16321684420108795, -0.3755311667919159, 0.2840961813926697, -0.20775176584720612, -0.12244734168052673, 0.526504397392273, 0.8932768106460571, -0.03842421621084213, 0.12675261497497559, -0.14578285813331604, -0.022170620039105415, 0.4458661377429962, 0.11814244091510773, -0.15466350317001343, -0.2694561183452606, 0.03720822557806969, 0.2975228726863861, -0.10649283230304718, 0.025268487632274628, -0.09403842687606812, 0.14218974113464355, 0.2193610966205597, 0.0666167214512825, -0.22007615864276886, 0.11705372482538223, 0.004420694429427385, -0.28484001755714417, 0.17360734939575195, 0.09409230202436447, 0.23082184791564941, 0.04038421809673309, 0.15981224179267883, 0.2757774293422699, -0.23048532009124756, -0.16235174238681793, 0.13986432552337646, 0.015991581603884697, 0.11915107816457748, 0.508124589920044, 0.1112571507692337, 0.4917434751987457, -0.25699901580810547, -0.25069448351860046, -0.32807308435440063, 0.04698161408305168, -0.16429369151592255, 0.23284126818180084, -0.20010221004486084, -0.33812472224235535, -0.41888493299484253, -0.14505553245544434, -0.11501048505306244, -0.5577636957168579, 0.13811010122299194, 0.04132475703954697, -0.27524077892303467, 0.42346230149269104, 0.11343634873628616, 0.2538703680038452, -0.11761448532342911, 0.05662180855870247, -0.2270079106092453, 0.04969862475991249, -0.4241378903388977, -0.0032034527976065874, 0.18830060958862305, -0.227152481675148, 0.18677832186222076, -0.300856351852417, -0.052372973412275314, 0.16121120750904083, -0.7381551861763, 0.15768741071224213, 0.05999606102705002, 0.030080068856477737, 0.2673285901546478, -0.2804105579853058, -0.4084676504135132, -0.5457119345664978, 0.11075828969478607, 0.027297528460621834, -0.36361491680145264, 0.12399110198020935, -0.08176733553409576, -0.14282965660095215, -0.16446278989315033, -0.023630725219845772, 0.06920338422060013, -0.20587819814682007, -0.04295727610588074, -0.4525323808193207, 0.2052508443593979, 0.23798343539237976, -0.4658527672290802, -0.09506639093160629, -0.4946015179157257, 0.033081378787755966, -0.1578766256570816, -0.08936239778995514, 0.20966845750808716, -0.20818307995796204, -0.06073031574487686, -0.2306276559829712, -0.30899059772491455, 0.42376548051834106, 0.03774343058466911, -0.03285626694560051, -0.02197899855673313, 0.023334914818406105, 0.06988711655139923, -0.11609354615211487, -0.0024435787927359343, 0.06314908713102341, 0.13902565836906433, -0.03184518963098526, 0.000342892250046134, 0.09777148813009262, 0.07185149937868118, -0.24975071847438812, 0.1135580837726593, -0.2141740322113037, 0.022148022428154945, 0.27030637860298157, 0.2845877408981323, 0.23099073767662048, -0.21089830994606018, 0.046213358640670776, 0.047886770218610764, 0.14703403413295746, -0.2481188029050827, -0.18722981214523315, 0.13886091113090515, 0.16332899034023285, -0.08042044937610626, 0.17763830721378326, 0.0043389685451984406, 0.012496129609644413, 0.07874146848917007, 0.06714529544115067, 0.12392532080411911, -0.5669610500335693, 0.17406655848026276, 0.006334821693599224, 0.307886004447937, -0.02243972010910511, 0.008806056343019009, -0.15569643676280975, -0.16755273938179016, -0.023014763370156288, 0.09127754718065262, -0.06852375715970993, 0.0833246186375618, -0.609336256980896, -0.40870603919029236, -0.579093873500824, 0.17966963350772858, 0.37692558765411377, 0.5158495306968689, 0.06319718807935715, 0.002239441266283393, -0.06092673912644386, 0.19010257720947266, 0.4397815465927124, -0.0025199733208864927, -0.3540676236152649, 0.15873605012893677, -0.24824810028076172, 0.04480891302227974, -0.05999468266963959, 0.11924614757299423, 0.4059159755706787, 0.4624781310558319, 0.6241880655288696, -0.10790744423866272, -0.04445144906640053, -0.2833610773086548, 0.03802776709198952, -0.043742261826992035, -0.027917785570025444, -0.2320086508989334, -0.12563557922840118, 0.02141231670975685, 0.2826705873012543, 0.37972113490104675, 0.4987154006958008, 0.12521600723266602, -0.324832946062088, -0.10135380178689957, -0.06805023550987244, -0.03759167715907097, 0.2665782868862152, -0.010676966980099678, 0.04789242148399353, 0.059367790818214417, 0.017635120078921318, 0.19567658007144928, 0.4381668269634247, -0.20380957424640656, 0.22620727121829987, -0.5027627348899841, -0.2139519900083542, 0.06295888125896454, 0.1709328293800354, 0.21437512338161469, 0.17903107404708862, 0.12522535026073456, -0.2666705548763275, 0.01956295594573021, -0.026947438716888428, 0.5451053380966187, -0.11037769913673401, 0.24740496277809143, -0.2115400731563568, 0.19465625286102295, -0.11201848834753036, 0.13194933533668518, -0.17595598101615906, 0.19865208864212036, 0.009429964236915112, -0.4868905246257782, 0.2963677942752838, 0.3950623571872711, 0.9533656239509583, 0.46903306245803833, 0.23238280415534973, 0.34437084197998047, -0.3253096044063568, 0.557752251625061, 0.012184437364339828, 0.22798274457454681, -0.4324994683265686, -0.1341833770275116, -0.04566382244229317, -0.006129949353635311, -0.10332513600587845, -0.19767944514751434, -0.033065877854824066, 0.17414332926273346, 0.28836438059806824, 0.32332465052604675, 0.027767611667513847, -0.09828926622867584, 0.08145787566900253, -0.3617430329322815, -0.001346698380075395, 0.023409388959407806, -0.0649721771478653, 0.0034664925187826157, -0.16220121085643768, 0.11704570055007935, -0.14431646466255188, 0.16573530435562134, -0.26354464888572693, -0.07000774890184402, -0.27165764570236206, 0.09895646572113037, 0.3264749050140381, -0.2881452143192291, 0.04992598295211792, 0.03686295822262764, 0.6191897392272949, 0.33154556155204773, 0.022581802681088448, -0.033967602998018265, 0.14692260324954987, 0.24282380938529968, 0.044536489993333817, -0.4531976580619812, 0.3092099726200104, 0.062404051423072815, 0.22388027608394623, -0.4029237926006317, 0.0980224758386612, 0.21580930054187775, -0.25089165568351746, -0.06150184944272041, 0.03825920820236206, 0.0031561709474772215, 0.22505715489387512, -0.11112813651561737, 0.20285648107528687, -0.22562789916992188, 0.13363869488239288, -0.03378205746412277, -0.2314991056919098, -0.008901157416403294, -0.03696199506521225, -0.31491801142692566, 0.04173874482512474, 0.20637650787830353, -0.03944896161556244, -0.5680711269378662, 0.2585470974445343, -0.3827706575393677, -0.2513921558856964, -0.007450631819665432, 0.2281176596879959, 0.19664382934570312, -0.06704265624284744, 0.13692495226860046, -0.09811090677976608, -0.29444050788879395, -0.1854887455701828, 0.21928182244300842, 0.32198211550712585, -0.14073701202869415, 0.04569866135716438, -0.35104355216026306, -0.15889844298362732, 0.0010027833050116897, -0.17866314947605133, 0.21997687220573425, 0.32523760199546814, 0.5128349661827087, -0.380193293094635, 0.13780687749385834, -0.2897762358188629, -0.2866574823856354, -0.18543267250061035, -0.011455218307673931, -0.4478396773338318, -0.12181437760591507, -0.46384552121162415, -0.06610316783189774, 0.03964594751596451, 0.4677850604057312, -0.09399263560771942, -0.15835069119930267, -0.15636059641838074, 0.09351414442062378, 0.3157993257045746, -0.15541188418865204, 0.1816108673810959, 0.4209158718585968, -0.10544480383396149, -0.2760102152824402, -0.01259295828640461, -0.006285406183451414, -0.034376904368400574, 0.21518537402153015, 0.21609288454055786, 0.45626547932624817, 0.10220438241958618, 0.021516306325793266, 0.1370665431022644, 0.04691419377923012, 0.1742350161075592, 0.4892761707305908, -0.3065263628959656, -0.060269568115472794, 0.06501059979200363, 0.1609165072441101, 0.2588517665863037, -0.10352475196123123, 0.21405133605003357, 0.13304726779460907, -0.3981344699859619, 0.21249258518218994, 0.016654133796691895, 0.24890437722206116, -0.056916043162345886, -0.4193788766860962, 0.4872603416442871, 0.15493597090244293, -0.07179497182369232, 0.05234532058238983, 0.39590173959732056, -0.11986333131790161, -0.058712925761938095, 0.053430426865816116, 0.2961941659450531, -0.017407115548849106, 0.2820732295513153, 0.09700965881347656, 0.29057976603507996, -0.03407777100801468, 0.1603579968214035, 0.029296277090907097, 0.017020098865032196, 0.49469712376594543, 0.44040101766586304, -0.1957184374332428, 0.15615251660346985, 0.2504728436470032, 0.04389605671167374, 0.3230758309364319, 0.030816230922937393, 0.02197316475212574, -0.09271342307329178, -0.18686723709106445, -0.2750905454158783, 0.12240209430456161, -0.08907721936702728, 0.21071432530879974, 0.34142357110977173, 0.042695023119449615, -0.0634649246931076, -0.06216595321893692, -0.009410087019205093, 0.17256201803684235, -0.6092425584793091, -0.10437511652708054, -0.39376527070999146, -0.06387676298618317, -0.3130137622356415, -0.08785922825336456, 0.11861374229192734, 0.16066360473632812, 0.013257335871458054, -0.20745667815208435, -0.32737457752227783, -0.015774544328451157, 0.2165646255016327, 0.00849821511656046, 0.23581860959529877, -0.08231784403324127, 0.29514575004577637, 0.010711753740906715, 0.0943172499537468, -0.22710295021533966, 0.1180296242237091, 0.5410670042037964, 0.19452524185180664, -0.3048999309539795, -0.18987524509429932, -0.1428612768650055, 0.015929823741316795, -0.2217850536108017, 0.37238165736198425, -0.04617301747202873, -0.1168173998594284, 0.18493115901947021, 0.0456458255648613, -0.17474907636642456, -0.04969199746847153, 0.25912266969680786, 0.09560959786176682, 0.25607195496559143, 0.3022284507751465, 0.027009183540940285, 0.046087417751550674, 0.13593989610671997, -0.01663518324494362, 0.10464510321617126, 0.018618324771523476, -0.1913215070962906, -0.022469347342848778, 0.04960550367832184, -0.1372322142124176, 0.08899515867233276, 0.24029964208602905, 0.3574059307575226, 0.5412002205848694, -0.09218037873506546, -0.20618970692157745, -0.41495996713638306, -0.38631266355514526, 0.5211240649223328, 0.47850552201271057, -0.01684807427227497, -0.06296150386333466, -0.19649192690849304, -0.10751692950725555, 0.09571298956871033, -0.4149102568626404, 0.16475462913513184, 0.08979474008083344, 0.16718725860118866, -0.15547344088554382, 0.28123337030410767, -0.0012404745211824775, -0.4019351601600647, -0.10898076742887497, -0.07242903858423233, 0.2989853620529175, 0.028775062412023544, 0.06019628420472145, 0.20420964062213898, -0.013470200821757317, -0.1505279839038849, 0.32013750076293945, -0.05211368575692177, 0.6280633211135864, 0.13540664315223694, -0.14559049904346466, 0.44118642807006836, -0.017650701105594635, 0.028677329421043396, -0.5843865275382996, 0.31666678190231323, -0.2392609417438507, 0.3147202730178833, 0.037315722554922104, -0.47179460525512695, -0.050221726298332214, 0.025254035368561745, 0.348757803440094, -0.17208097875118256, -0.3881038427352905, 0.3029595911502838, -0.2138737589120865, -0.03577934950590134, 0.05062957480549812, 0.38825714588165283, 0.26503056287765503, 0.4494660794734955, -0.2877137064933777, -0.6340729594230652, -0.03300780802965164, -0.21014870703220367, -0.28570157289505005, -0.19992072880268097, -0.11783649027347565, 0.2962207794189453, -0.1532810777425766, -0.13815084099769592, -0.28837674856185913, 0.15956318378448486, -0.23512057960033417, -0.2998197674751282, 0.24229291081428528, -0.17330779135227203, -0.032171912491321564, -0.19824384152889252, 0.3979834020137787, 0.17415443062782288, -0.2592078745365143, 0.10108782351016998, -0.14171187579631805 ]
https://github.com/huggingface/datasets/issues/2522
Documentation Mistakes in Dataset: emotion
Hi, this issue has been already reported in the dataset repo (https://github.com/dair-ai/emotion_dataset/issues/2), so this is a bug on their side.
As per documentation, Dataset: emotion Homepage: https://github.com/dair-ai/emotion_dataset Dataset: https://github.com/huggingface/datasets/blob/master/datasets/emotion/emotion.py Permalink: https://huggingface.co/datasets/viewer/?dataset=emotion Emotion is a dataset of English Twitter messages with eight basic emotions: anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. For more detailed information please refer to the paper. But when we view the data, there are only 6 emotions, anger, fear, joy, sadness, surprise, and trust.
20
Documentation Mistakes in Dataset: emotion As per documentation, Dataset: emotion Homepage: https://github.com/dair-ai/emotion_dataset Dataset: https://github.com/huggingface/datasets/blob/master/datasets/emotion/emotion.py Permalink: https://huggingface.co/datasets/viewer/?dataset=emotion Emotion is a dataset of English Twitter messages with eight basic emotions: anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. For more detailed information please refer to the paper. But when we view the data, there are only 6 emotions, anger, fear, joy, sadness, surprise, and trust. Hi, this issue has been already reported in the dataset repo (https://github.com/dair-ai/emotion_dataset/issues/2), so this is a bug on their side.
[ 0.22127074003219604, -0.3492063581943512, -0.10875467956066132, 0.576239287853241, 0.267790824174881, 0.17377594113349915, 0.29420924186706543, 0.11103971302509308, -0.12832535803318024, 0.2038235068321228, -0.12744274735450745, 0.04295259714126587, -0.2023334801197052, -0.11315099895000458, -0.005595292430371046, -0.18627455830574036, 0.08356308192014694, -0.08725511282682419, 0.3198855519294739, -0.11779296398162842, 0.03354756906628609, 0.1983209252357483, -0.09807039797306061, 0.2302875816822052, -0.45546871423721313, -0.05639774724841118, -0.26869410276412964, -0.05159404128789902, -0.046982116997241974, -0.5062127709388733, 0.0716763511300087, -0.089696004986763, -0.007479831576347351, 0.28957366943359375, -0.00011546514724614099, -0.11166495829820633, 0.3260878324508667, 0.077814981341362, 0.045454226434230804, -0.2310895174741745, 0.21439173817634583, -0.30715814232826233, 0.3784172534942627, -0.08769575506448746, -0.04483536630868912, -0.5062560439109802, 0.05929174646735191, -0.031277887523174286, 0.41844645142555237, 0.49271413683891296, 0.16677701473236084, 0.17808780074119568, 0.21755969524383545, 0.2025783210992813, 0.41941919922828674, 0.5456279516220093, -0.01782602071762085, 0.020421160385012627, -0.137822225689888, -0.021504590287804604, -0.18517640233039856, 0.3451380133628845, 0.16508007049560547, 0.07125121355056763, 0.1775849163532257, -0.0918467566370964, 0.19963790476322174, -0.5791181921958923, 0.15230295062065125, 0.19008998572826385, 0.4783172011375427, -0.017162691801786423, -0.3321194350719452, -0.11462670564651489, 0.015817074105143547, -0.13342931866645813, 0.19388148188591003, 0.2820129096508026, -0.11397742480039597, 0.09297125786542892, 0.10228900611400604, 0.09656334668397903, -0.16097977757453918, 0.42461079359054565, 0.06604630500078201, 0.1322464495897293, -0.37561526894569397, 0.019485699012875557, 0.007966477423906326, -0.20899930596351624, 0.03848789259791374, 0.14369364082813263, -0.03766101598739624, 0.2057613581418991, -0.17088210582733154, 0.2282334417104721, -0.016787584871053696, 0.00031678323284722865, -0.03892376273870468, -0.2421783059835434, -0.11244894564151764, 0.13327068090438843, -0.11476343870162964, -0.06136205792427063, 0.6197054982185364, 0.04955127462744713, 0.18680331110954285, 0.1237085610628128, 0.2935325503349304, 0.09094616770744324, -0.0030080198775976896, -0.001700941240414977, -0.03673570975661278, 0.02216094359755516, 0.013961815275251865, -0.43059706687927246, -0.005887710489332676, 0.09184759855270386, -0.3832753300666809, -0.052236005663871765, -0.23426707088947296, -0.3501875400543213, -0.0679657906293869, 0.3387867510318756, 0.07374763488769531, 0.30046337842941284, -0.0802047997713089, 0.13753250241279602, 0.01708417572081089, -0.5415084958076477, -0.18827182054519653, -0.024980468675494194, -0.2958143949508667, -0.008174077607691288, 0.1116003692150116, -0.09239498525857925, 0.6315552592277527, 0.15594075620174408, -0.21073207259178162, -0.3750534951686859, 0.08858907967805862, -0.19925503432750702, 0.30074435472488403, 0.18243730068206787, -0.035949330776929855, 0.22128339111804962, 0.2664773762226105, -0.09244333207607269, 0.04866509139537811, 0.09157005697488785, -0.03511560335755348, -0.08810655027627945, -0.4956247806549072, 0.09798871725797653, -0.20356765389442444, 0.019923534244298935, -0.03906065598130226, 0.6006981730461121, 0.08034970611333847, 0.15198025107383728, 0.22338472306728363, -0.07303556054830551, 0.012276507914066315, -0.29654422402381897, 0.3505524694919586, 0.3677571415901184, -0.3522182106971741, -0.39822256565093994, -0.3678136169910431, 0.0090233338996768, 0.14397868514060974, 0.4062840938568115, -0.33040866255760193, 0.12715093791484833, -0.3378307819366455, 0.25498342514038086, 0.24185684323310852, -0.18664628267288208, -0.2345922589302063, 0.11279349029064178, 0.35749584436416626, 0.06496232002973557, -0.07620881497859955, 0.25882408022880554, 0.15506792068481445, 0.18594542145729065, 0.08296550065279007, -0.26221805810928345, 0.30793941020965576, -0.04078898951411247, -0.3400009274482727, -0.19710548222064972, 0.1795884668827057, 0.07287212461233139, -0.07866880297660828, -0.056408293545246124, 0.29224497079849243, -0.24698926508426666, 0.6810659766197205, -0.019762137904763222, -0.0141568873077631, 0.2730136811733246, 0.17851774394512177, 0.48407307267189026, 0.12512272596359253, -0.055644918233156204, -0.13005313277244568, -0.11146822571754456, 0.14433033764362335, 0.4373606741428375, 0.20460180938243866, -0.05557730048894882, -0.2629444897174835, -0.09834790974855423, -0.14300619065761566, -0.42799127101898193, 0.13664105534553528, 0.20028284192085266, -0.3659701645374298, 0.2478678673505783, -0.33807697892189026, 0.22006508708000183, -0.24231216311454773, 0.09355658292770386, -0.2778651714324951, 0.23160666227340698, -0.09602977335453033, 0.01799337938427925, 0.1508452594280243, 0.08092926442623138, 0.04637623950839043, 0.07185719907283783, -0.07975810021162033, 0.26890307664871216, 0.0939958244562149, 0.14168423414230347, 0.015279042534530163, 0.010583468712866306, 0.32323187589645386, -0.49973419308662415, 0.014025586657226086, 0.15800997614860535, -0.16848328709602356, 0.23697315156459808, -0.13511060178279877, 0.17464622855186462, 0.27250081300735474, 0.022643128409981728, 0.0001455555175198242, 0.11856122314929962, 0.3502689003944397, 0.2929784655570984, -0.42975497245788574, -0.4398637115955353, 0.1170177310705185, -0.2998412847518921, 0.12134015560150146, 0.11564329266548157, -0.22448360919952393, 0.29922205209732056, 0.29735615849494934, 0.08013907074928284, 0.15438613295555115, 0.2432105392217636, -0.5394951701164246, -0.38131949305534363, 0.09010996669530869, 0.031518664211034775, 0.23231573402881622, 0.24321754276752472, -0.13900135457515717, -0.13697443902492523, 0.03640502691268921, -0.1281926929950714, 0.2262079119682312, 0.23625926673412323, 0.10604477673768997, -0.09019137918949127, 0.18619823455810547, 0.09769635647535324, -0.3965112268924713, 0.11314042657613754, -0.13628628849983215, 0.29273638129234314, -0.4832671284675598, -0.15883533656597137, -0.16843533515930176, -0.3459652066230774, 0.14431563019752502, -0.056644875556230545, -0.1863459050655365, -0.32940012216567993, -0.03846040368080139, -0.36499524116516113, -0.19076935946941376, -0.006747556384652853, -0.1385476291179657, 0.04708043485879898, -0.008954410441219807, 0.5758179426193237, -0.22792503237724304, -0.05290156230330467, -0.2607598900794983, 0.011780914850533009, -0.09943485260009766, 0.12970684468746185, 0.08164684474468231, -0.25965970754623413, -0.25900909304618835, -0.29789161682128906, -0.5375890135765076, 0.2664555013179779, -0.2632860541343689, 0.35855337977409363, 0.061222851276397705, -0.012353649362921715, -0.40865644812583923, -0.08891747891902924, 0.24681812524795532, -0.2753390073776245, -0.18397367000579834, -0.14423461258411407, -0.09395277500152588, 0.018686607480049133, 0.12655209004878998, -0.5909528732299805, -0.22423532605171204, -0.14257153868675232, 0.3636077344417572, -0.06736398488283157, 0.1479126363992691, 0.16919395327568054, 0.03367127105593681, 0.13535736501216888, -0.3880837559700012, -0.010190834291279316, -0.40528932213783264, -0.24964740872383118, 0.24513988196849823, -0.37150678038597107, -0.438024640083313, 0.1713707000017166, 0.009354804642498493, 0.1460305005311966, -0.26296669244766235, -0.6767252087593079, 0.06509777158498764, -0.2844429016113281, 0.16497312486171722, -0.03916540741920471, 0.25787076354026794, -0.19623559713363647, -0.03355497494339943, -0.14055898785591125, 0.013170752674341202, -0.302543580532074, -0.047264035791158676, -0.3038457930088043, 0.43155983090400696, -0.28312408924102783, 0.11896724253892899, 0.031450532376766205, 0.26062023639678955, 0.4236904978752136, -0.16616247594356537, 0.13303570449352264, -0.2599681615829468, 0.4982191324234009, 0.1351466178894043, -0.25445282459259033, 0.2596283555030823, -0.08364231884479523, 0.2704189419746399, 0.4516679346561432, 0.09687614440917969, -0.0060578156262636185, 0.02867020107805729, -0.07163266092538834, -0.38769152760505676, -0.3234592378139496, -0.0732191950082779, -0.3693273663520813, 0.28971782326698303, 0.1122933179140091, -0.10583595931529999, -0.04757864773273468, -0.16482624411582947, -0.06466669589281082, 0.24625582993030548, 0.04423760995268822, 0.13878294825553894, -0.23425154387950897, 0.10105986148118973, -0.37690046429634094, 0.11231836676597595, -0.02556668035686016, 0.3216903507709503, 0.02284483052790165, 0.07104136049747467, -0.011293835937976837, 0.3466480076313019, 0.47527438402175903, -0.10601344704627991, -0.12430974096059799, 0.1034456193447113, 0.25001680850982666, -0.6698012351989746, 0.04829196259379387, -0.20169250667095184, 0.17254270613193512, 0.3898584246635437, 0.48132944107055664, -0.10177256911993027, -0.03329433128237724, 0.2220119684934616, 0.003832917893305421, -0.05540899559855461, -0.1946830153465271, -0.3725694715976715, -0.27273592352867126, -0.09434658288955688, -0.31077155470848083, 0.20056034624576569, -0.20322458446025848, -0.16889403760433197, -0.08187714964151382, -0.0048377132043242455, -0.0029974377248436213, 0.10373783856630325, 0.04694250598549843, 0.3300940692424774, -0.020065363496541977, 0.04359188303351402, 0.4950055480003357, 0.3157636225223541, 0.010214101523160934, 0.40649592876434326, -0.02692202664911747, -0.6741474270820618, 0.06572796404361725, -0.2502686381340027, 0.034218691289424896, 0.1419757753610611, -0.1325027346611023, -0.0033857026137411594, 0.16669520735740662, 0.12828204035758972, -0.006562426686286926, 0.19571775197982788, 0.6088895797729492, 0.12206827104091644, 0.08948669582605362, -0.35472825169563293, 0.26508715748786926, 0.05142008885741234, 0.012391471303999424, -0.10136032104492188, 0.581145703792572, -0.1059892401099205, 0.24282538890838623, 0.16524779796600342, 0.8558472394943237, 0.05462503805756569, 0.18284223973751068, 0.2816801965236664, -0.05383875221014023, 0.5717366933822632, -0.08667021989822388, 0.10450887680053711, -0.3380014896392822, 0.17620497941970825, -0.03628251329064369, 0.02438739500939846, -0.08734355866909027, 0.348355770111084, -0.19208867847919464, 0.07025870680809021, -0.028769243508577347, 0.12765361368656158, 0.1744469255208969, 0.08075138181447983, -0.14160560071468353, 0.09134559333324432, -0.3640453517436981, 0.1393848955631256, -0.08215934783220291, 0.26863187551498413, 0.13771776854991913, 0.03793620318174362, -0.07131734490394592, -0.1258804351091385, -0.5482355952262878, -0.25778841972351074, -0.6138542294502258, -0.003874049987643957, -0.18415814638137817, 0.008730592206120491, 0.29420799016952515, 0.5220600366592407, 0.5753253698348999, -0.07248175144195557, -0.06366565823554993, 0.07644104957580566, 0.011209200136363506, -0.21063083410263062, 0.016880743205547333, 0.047855667769908905, 0.24656693637371063, -0.06396785378456116, -0.47478312253952026, 0.19247299432754517, -0.03193219378590584, 0.11356674134731293, -0.408145546913147, -0.02201283536851406, -0.20995114743709564, -0.20160815119743347, 0.14555443823337555, -0.12664195895195007, -0.25444507598876953, -0.21839472651481628, 0.10069568455219269, 0.18262764811515808, -0.00768505921587348, 0.03698999062180519, 0.015981003642082214, -0.17505128681659698, -0.1224471852183342, 0.05303753539919853, -0.13958700001239777, -0.33450207114219666, 0.4910680949687958, 0.28666630387306213, -0.14661681652069092, -0.19080889225006104, 0.18063023686408997, 0.296231210231781, -0.5138752460479736, 0.12837618589401245, -0.021982181817293167, 0.016277963295578957, -0.1513834446668625, 0.24096016585826874, 0.05489956960082054, 0.13719160854816437, -0.13024762272834778, -0.27328330278396606, -0.28364935517311096, 0.42487066984176636, 0.05704108625650406, 0.0046399421989917755, -0.08505818247795105, -0.23700931668281555, 0.17295141518115997, 0.10677742213010788, -0.25703808665275574, 0.07357171922922134, 0.06654778122901917, -0.017684319987893105, 0.11184137314558029, -0.07771795988082886, 0.20775620639324188, -0.09334924072027206, 0.08253885805606842, -0.03911687806248665, 0.2671704590320587, -0.14918255805969238, -0.04423406720161438, 0.16160880029201508, 0.07234758883714676, -0.16517570614814758, -0.01522133033722639, -0.05011817440390587, -0.020790500566363335, -0.1669558435678482, 0.15978124737739563, 0.4227868914604187, 0.06639807671308517, 0.41399526596069336, -0.4394424855709076, 0.06457525491714478, 0.3271656930446625, -0.1110580787062645, 0.23285646736621857, 0.4335312247276306, 0.37139663100242615, 0.06035543978214264, 0.25917133688926697, -0.0801142081618309, -0.05368450656533241, 0.0043767597526311874, -0.13755421340465546, 0.253436803817749, 0.04946518316864967, -0.46498170495033264, 0.007713868282735348, -0.2350020855665207, 0.33858272433280945, 0.16883082687854767, -0.2895057201385498, 0.09208700805902481, 0.09270880371332169, 0.19280625879764557, -0.37695446610450745, -0.03348298370838165, -0.25543349981307983, -0.18357853591442108, 0.14916670322418213, 0.039354510605335236, 0.12621374428272247, 0.09490164369344711, -0.13209132850170135, -0.0742514356970787, 0.250360369682312, -0.22066709399223328, 0.25825706124305725, -0.003588671563193202, -0.32275643944740295, -0.046363022178411484, 0.2064571976661682, 0.1990867704153061, 0.10758520662784576, 0.3274729251861572, 0.18777264654636383, 0.2775310277938843, 0.14158262312412262, 0.11204497516155243, 0.296092689037323, -0.011740021407604218, 0.2074180245399475, 0.17069971561431885, -0.36044278740882874, 0.15734736621379852, -0.17941896617412567, 0.627051830291748, 0.1679914891719818, -0.030981270596385002, 0.011247888207435608, -0.09178435057401657, -0.004166509956121445, 0.057258930057287216, -0.004641533829271793, -0.2117326557636261, -0.33609238266944885, -0.17080065608024597, -0.12709765136241913, -0.3938744068145752, -0.18816660344600677, 0.27264150977134705, -0.3617936372756958, -0.6225926876068115, 0.23959949612617493, 0.31846022605895996, 0.4276426136493683, 0.007905474863946438, 0.17543917894363403, 0.32650241255760193, -0.10693386197090149, 0.03726338595151901, 0.34384700655937195, 0.5582184791564941, 0.272655725479126, 0.13579827547073364, 0.05852445214986801, -0.10895263403654099, -0.1505998820066452, 0.07116014510393143, 0.03176576644182205, 0.31157657504081726, -0.30086180567741394, -0.08674117177724838, 0.05765419080853462, -0.13872630894184113, 0.13726341724395752, 0.05218476429581642, 0.5654798746109009, -0.2587907612323761, 0.29975858330726624, -0.6842373013496399, -0.2530014216899872, -0.16970153152942657, -0.10470075905323029, -0.39037179946899414, 0.047840703278779984, 0.4483489394187927, 0.05217967554926872, 0.06576638668775558, -0.2489425092935562, 0.08887610584497452, -0.2897295653820038, 0.25654277205467224, 0.36795487999916077, 0.0715659111738205, -0.025418827310204506, -0.1495763510465622, -0.6116507649421692, 0.058843858540058136, 0.06042839586734772, -0.21768943965435028, 0.026487797498703003, 0.23334893584251404, 0.09485585242509842, 0.059500645846128464, 0.40475910902023315, -0.11159370094537735, 0.13588744401931763, 0.01891464926302433, -0.10165136307477951, -0.08523602783679962, -0.10310477018356323, 0.5716152787208557, 0.09364612400531769, 0.16503797471523285, 0.19559967517852783, 0.195715069770813, -0.101258784532547, -0.14049899578094482, 0.17638762295246124, 0.034984271973371506, -0.19173027575016022, -0.024997059255838394, 0.33787059783935547, 0.21551521122455597, -0.05440695583820343, -0.31519585847854614, -0.38277512788772583, -0.19195245206356049, -0.09216533601284027, 0.43433046340942383, 0.11478521674871445, 0.40051737427711487, -0.1333857923746109, -0.36212655901908875, -0.30944302678108215, -0.11449086666107178, 0.08266866952180862, -0.3093986213207245, -0.16649380326271057, 0.046718332916498184, 0.23049862682819366, -0.08480266481637955, 0.05047019198536873, 0.14592218399047852, -0.152472585439682, -0.036356113851070404, -0.2446848303079605, -0.35240936279296875, 0.31860026717185974, -0.4616987109184265, 0.07566849887371063, -0.09872877597808838, 0.32126057147979736, 0.5552660822868347, -0.20044343173503876, -0.7379689812660217, -0.02664727345108986, 0.5044904351234436, 0.14354774355888367, -0.21545086801052094, 0.013313915580511093, -0.044797029346227646, 0.16853858530521393, 0.04448236897587776, 0.46019014716148376, 0.30105406045913696, 0.04840036481618881, 0.13570533692836761, -0.115216463804245 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
Hi ! `map` calls `__getstate__` using `dill` to hash your map function. This is used by the caching mechanism to recover previously computed results. That's why you don't see any `__setstate__` call. Why do you change an attribute of your tokenizer when `__getstate__` is called ?
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
46
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples Hi ! `map` calls `__getstate__` using `dill` to hash your map function. This is used by the caching mechanism to recover previously computed results. That's why you don't see any `__setstate__` call. Why do you change an attribute of your tokenizer when `__getstate__` is called ?
[ -0.22488734126091003, 0.19312112033367157, 0.1127530038356781, 0.028775125741958618, 0.03419579938054085, -0.32377052307128906, 0.13853639364242554, 0.19508472084999084, 0.346808522939682, -0.10001835227012634, 0.19218143820762634, 0.7253856658935547, -0.19296035170555115, 0.20866984128952026, -0.00161908776499331, 0.059579089283943176, 0.0705188438296318, -0.03540755435824394, -0.005137900356203318, -0.06401285529136658, -0.21730101108551025, 0.050916366279125214, -0.35797572135925293, 0.15361285209655762, -0.27659502625465393, -0.17681507766246796, 0.02593889646232128, 0.11868830025196075, -0.02998497150838375, -0.27113649249076843, 0.20454564690589905, -0.07879405468702316, -0.027705511078238487, 0.24116568267345428, -0.00012316943320911378, -0.08011501282453537, 0.01619364693760872, -0.08638346195220947, -0.004162499215453863, -0.21759970486164093, -0.22309590876102448, -0.12397710233926773, -0.12354390323162079, -0.2294130027294159, 0.07815724611282349, 0.002462665317580104, -0.2965724766254425, -0.38138142228126526, 0.6342014670372009, 0.4318728744983673, 0.11990705877542496, 0.36486896872520447, -0.06786814332008362, -0.034679364413022995, -0.13554894924163818, 0.31001877784729004, 0.05284783989191055, 0.223302960395813, 0.12532703578472137, -0.39181169867515564, -0.0012150539550930262, 0.09562967717647552, -0.1981259435415268, -0.21600981056690216, 0.15275079011917114, 0.059106774628162384, 0.18381048738956451, 0.010621432214975357, -0.008678345009684563, 0.09299485385417938, 0.2169976532459259, -0.35737496614456177, -0.2120290845632553, -0.3761958181858063, -0.05751387029886246, -0.15050049126148224, 0.34020355343818665, -0.21683953702449799, 0.13164880871772766, 0.14275935292243958, -0.04848417267203331, -0.10448601096868515, 0.22394081950187683, 0.3518485128879547, -0.03908213600516319, 0.25717827677726746, -0.01660947874188423, 0.3984132707118988, -0.053679224103689194, -0.10632327198982239, -0.18072597682476044, -0.1033441498875618, 0.10165431350469589, 0.45161691308021545, -0.011211344040930271, -0.23849092423915863, 0.2105509340763092, -0.21233083307743073, -0.024308189749717712, 0.21151089668273926, -0.16386432945728302, 0.12254893779754639, -0.3641282916069031, 0.26401758193969727, 0.47084030508995056, 0.22121864557266235, 0.12371264398097992, 0.6363037824630737, 0.19857057929039001, -0.16029275953769684, -0.30004552006721497, 0.07452613115310669, 0.31024834513664246, -0.10113576799631119, -0.03733976557850838, 0.17564794421195984, -0.1027165874838829, -0.1286521703004837, -0.0738532766699791, 0.27302250266075134, -0.7321614623069763, 0.008305598981678486, 0.18209092319011688, 0.12161965668201447, -0.0009523012558929622, -0.22241048514842987, -0.08313731849193573, 0.07775545120239258, -0.2158571034669876, 0.11480877548456192, -0.11857537925243378, 0.12424886971712112, -0.34277766942977905, 0.11042258143424988, -0.04326014593243599, 0.056945428252220154, 0.3175237476825714, 0.1256696581840515, -0.16883856058120728, -0.05965094268321991, 0.15125082433223724, -0.2294480949640274, 0.40169721841812134, -0.019704248756170273, -0.23601487278938293, 0.0424857996404171, 0.306940495967865, -0.44203194975852966, -0.25557491183280945, -0.059226926416158676, -0.15265673398971558, -0.14126329123973846, -0.038634903728961945, 0.03472553938627243, -0.23729616403579712, -0.004718092270195484, -0.30469051003456116, 0.10288961231708527, 0.3713429570198059, -0.20585303008556366, 0.09886566549539566, -0.5015791058540344, -0.3563106656074524, -0.20766381919384003, 0.008802086114883423, 0.17747803032398224, -0.43865102529525757, -0.24340380728244781, -0.09803219884634018, 0.15207849442958832, 0.3357070982456207, 0.12456773966550827, -0.26133888959884644, 0.6007255911827087, -0.49625009298324585, 0.8756874203681946, 0.2869647741317749, -0.14862658083438873, -0.40101128816604614, 0.03295399621129036, -0.17289471626281738, 0.23207536339759827, -0.6788752675056458, -0.1038571447134018, 0.16501542925834656, -0.07975811511278152, 0.11381687223911285, 0.33886396884918213, 0.1549205183982849, -0.09533259272575378, -0.12822012603282928, 0.0644305944442749, 0.3268658220767975, -0.28375959396362305, 0.07034888118505478, -0.009695252403616905, 0.16244390606880188, -0.2167634814977646, 0.21740300953388214, 0.034307319670915604, 0.18434280157089233, -0.11258946359157562, 0.4559537470340729, 0.17644372582435608, -0.1205102875828743, -0.31562507152557373, -0.18376821279525757, 0.32532259821891785, -0.028087200596928596, -0.026879219338297844, -0.11929532140493393, -0.08291007578372955, -0.11312627792358398, 0.056021906435489655, -0.33992499113082886, -0.24335640668869019, 0.029902398586273193, 0.024314124137163162, 0.23357664048671722, 0.17532935738563538, -0.08356519788503647, -0.24794533848762512, -0.05061448737978935, 0.060971084982156754, -0.05589332804083824, 0.05688369646668434, 0.12517836689949036, -0.2686153054237366, -0.31788957118988037, 0.16740378737449646, 0.40873536467552185, -0.09793613106012344, -0.18483813107013702, 0.27618658542633057, 0.5985626578330994, -0.2991659343242645, -0.3962603211402893, -0.18160809576511383, -0.10411584377288818, 0.12906286120414734, -0.23568858206272125, 0.17175059020519257, -0.002784482669085264, -0.23090070486068726, -0.025696707889437675, 0.5132231712341309, 0.24769368767738342, 0.3112366497516632, -0.4027121067047119, 0.2516181766986847, -0.012304892763495445, -0.08680547773838043, -0.14821752905845642, -0.33737725019454956, -0.2627914547920227, 0.03733240067958832, 0.3305850028991699, -0.13446247577667236, -0.036491651087999344, 0.040744487196207047, 0.3557880222797394, -0.07353571057319641, 0.3257075846195221, -0.06443073600530624, -0.19810637831687927, -0.19068050384521484, 0.2980230748653412, 0.37408438324928284, 0.5166622996330261, -0.10923225432634354, -0.05722501128911972, 0.08503744751214981, -0.04589052125811577, -0.04900113120675087, 0.016840562224388123, -0.1722276359796524, -0.03786466270685196, 0.198848158121109, 0.04858946055173874, -0.09989828616380692, -0.18129177391529083, 0.009794548153877258, 0.056279201060533524, 0.2922278344631195, -0.23866723477840424, 0.09624148905277252, -0.5637154579162598, 0.0709877610206604, -0.2885975241661072, -0.13038353621959686, 0.007215520367026329, -0.4439607858657837, -0.21197134256362915, 0.0941520407795906, -0.23600605130195618, 0.2182343304157257, -0.1610497534275055, -0.15978217124938965, -0.15046250820159912, -0.28893718123435974, 0.09865123778581619, -0.23461346328258514, -0.2234228104352951, -0.08643988519906998, 0.12882229685783386, 0.12238095700740814, 0.2256278544664383, 0.3576846122741699, -0.4277693033218384, -0.34537526965141296, -0.28616148233413696, 0.3642108738422394, -0.167160764336586, 0.12165622413158417, 0.36457452178001404, -0.2108633816242218, -0.07228502631187439, 0.15103381872177124, 0.3195462226867676, -0.10602486878633499, -0.1192036122083664, -0.15033645927906036, 0.277375727891922, 0.02400040812790394, -0.028316324576735497, 0.014470412395894527, -0.17064280807971954, -0.057648226618766785, 0.3715692162513733, -0.15956461429595947, 0.08714565634727478, 0.16744177043437958, 0.044090721756219864, 0.2306469976902008, -0.10440907627344131, -0.2606276571750641, -0.43920302391052246, -0.09853184223175049, 0.16474352777004242, -0.1962970346212387, -0.12573979794979095, -0.03666521608829498, -0.10954618453979492, 0.16133490204811096, 0.041704341769218445, -0.23590238392353058, 0.08998007327318192, -0.004336793906986713, 0.388319194316864, -0.20898647606372833, 0.11808444559574127, 0.3752020299434662, 0.16850735247135162, 0.0596243217587471, -0.15732471644878387, -0.20618565380573273, 0.18140138685703278, 0.38659408688545227, 0.21564291417598724, 0.18958218395709991, 0.24439632892608643, 0.15978749096393585, 0.8500332832336426, 0.31933003664016724, -0.4346620738506317, 0.12059742957353592, -0.05809397995471954, -0.06442428380250931, -0.07623686641454697, -0.3137790560722351, -0.0662493035197258, -0.24335268139839172, -0.12011310458183289, -0.12522614002227783, -0.2128135710954666, 0.1224449872970581, 0.17188744246959686, 0.07384566217660904, -0.02322220243513584, -0.476381778717041, 0.184498593211174, -0.2536953091621399, 0.14348536729812622, 0.15853999555110931, 0.37904804944992065, -0.19344677031040192, 0.31325826048851013, 0.2337399274110794, -0.09904015809297562, 0.4059720039367676, 0.09167980402708054, -0.5711541175842285, -0.2006433755159378, -0.34278517961502075, 0.44404900074005127, 0.254760205745697, 0.17552658915519714, -0.09011707454919815, -0.08576270192861557, -0.14311546087265015, 0.1859128624200821, 0.3545984625816345, -0.44384101033210754, -0.031231451779603958, 0.3080913722515106, -0.16998592019081116, -0.17829056084156036, -0.08582276850938797, 0.2033347189426422, 0.6135461330413818, 0.06068398803472519, 0.5777104496955872, -0.13267245888710022, -0.0017203327734023333, -0.18484041094779968, 0.09971842914819717, -0.09730799496173859, -0.18139134347438812, -0.041636254638433456, 0.04431718960404396, -0.2571536600589752, 0.13071434199810028, 0.17882347106933594, -0.031146837398409843, 0.25152164697647095, 0.03757230564951897, -0.11305519193410873, -0.24862971901893616, -0.06708351522684097, 0.020454473793506622, 0.22220617532730103, 0.001984855392947793, 0.1563674956560135, 0.23342251777648926, -0.0332227423787117, 0.20500709116458893, 0.3170371949672699, -0.15541785955429077, 0.019160881638526917, -0.2010469287633896, 0.02379211038351059, 0.35753417015075684, 0.07553520053625107, -0.05679522454738617, 0.30185338854789734, -0.013497908599674702, -0.10008605569601059, -0.2922605574131012, 0.25888577103614807, 0.19773685932159424, 0.097498320043087, -0.13095030188560486, -0.5797994136810303, 0.061070915311574936, 0.0986432358622551, -0.17722709476947784, 0.3608715534210205, 0.042708538472652435, -0.29186245799064636, 0.2905969023704529, 0.17745010554790497, 0.8005263209342957, 0.16540591418743134, 0.014834715984761715, 0.3365233540534973, 0.1808236539363861, 0.3699224293231964, 0.23551899194717407, -0.06569357216358185, -0.3427855670452118, 0.3571147918701172, -0.18385040760040283, -0.2929324507713318, 0.002491338411346078, 0.005259879864752293, -0.191290020942688, 0.24985642731189728, -0.013108223676681519, 0.15577611327171326, -0.18240688741207123, 0.14643095433712006, 0.31415504217147827, -0.21153469383716583, -0.034584250301122665, 0.15031301975250244, -0.07391836494207382, 0.2885684370994568, -0.035755302757024765, 0.1344926804304123, -0.14748229086399078, -0.007897787727415562, -0.24406179785728455, 0.144413560628891, -0.5116115808486938, 0.3974110186100006, 0.08362817019224167, -0.08395231515169144, 0.2956174612045288, 0.08216848224401474, -0.07009703665971756, 0.16538171470165253, -0.05454304441809654, 0.12420110404491425, 0.23464126884937286, 0.2012883722782135, 0.12402145564556122, -0.33335813879966736, 0.26357170939445496, 0.22540850937366486, -0.10461999475955963, -0.003839142620563507, -0.1554676592350006, -0.22562921047210693, -0.1773543655872345, 0.2104775309562683, 0.22592033445835114, -0.3565041422843933, -0.23085545003414154, -0.03488726541399956, 0.09603200107812881, -0.19571007788181305, 0.020374152809381485, 0.12065354734659195, 0.13061918318271637, 0.23726055026054382, -0.38427725434303284, -0.15750832855701447, 0.04430648684501648, 0.4637594223022461, -0.27505385875701904, 0.2132607102394104, 0.4285076856613159, -0.0054327333346009254, -0.04312978312373161, -0.12088309973478317, 0.12676389515399933, 0.04375789687037468, 0.21061971783638, 0.162366583943367, -0.3165006637573242, -0.06293690949678421, -0.26801159977912903, 0.3825359046459198, -0.04195990040898323, -0.20746131241321564, -0.06525153666734695, -0.22407419979572296, -0.4679107069969177, -0.054444923996925354, 0.24773018062114716, 0.1402743011713028, 0.09236685931682587, 0.5768776535987854, -0.35869476199150085, 0.18367165327072144, -0.18211670219898224, 0.09477324038743973, 0.029332339763641357, 0.08528565615415573, 0.0898129940032959, 0.03728492558002472, -0.02222977764904499, -0.2665497958660126, -0.0872107669711113, 0.45016637444496155, 0.009886506013572216, -0.09261643886566162, -0.42765262722969055, 0.17318442463874817, 0.5592159032821655, -0.18240733444690704, 0.07406427711248398, -0.2170208841562271, -0.0007079424685798585, -0.35931524634361267, -0.025179240852594376, 0.27785852551460266, 0.030726132914423943, 0.2733374238014221, 0.18936362862586975, 0.116305410861969, 0.004188396967947483, -0.015499837696552277, -0.0967455580830574, -0.06437081098556519, 0.017632173374295235, 0.05479035899043083, 0.034339699894189835, -0.07344324141740799, -0.08076443523168564, 0.22193719446659088, 0.29702115058898926, 0.2084835171699524, 0.24012981355190277, -0.045540861785411835, -0.22811563313007355, -0.1336228847503662, 0.35152071714401245, 0.35704100131988525, -0.20131288468837738, -0.24378563463687897, 0.511156439781189, 0.08368044346570969, -0.09427785128355026, 0.13512606918811798, 0.2759711742401123, 0.034715332090854645, 0.23943036794662476, 0.17323718965053558, -0.23262880742549896, 0.2811647057533264, -0.4663682281970978, -0.08754229545593262, 0.2715710997581482, -0.046773601323366165, 0.04084169492125511, 0.08094357699155807, -0.18053679168224335, 0.29333996772766113, 0.27704477310180664, 0.1332242339849472, 0.33002299070358276, 0.23037151992321014, 0.09322308748960495, 0.1252531260251999, 0.1260305494070053, 0.09452274441719055, 0.19893811643123627, -0.4628060758113861, 0.32196244597435, 0.24264121055603027, -0.005586451385170221, 0.19447150826454163, 0.1545814424753189, 0.48531028628349304, -0.5250402092933655, -0.27743998169898987, 0.23163773119449615, 0.4182744324207306, -0.20757164061069489, -0.04142367094755173, -0.4448896050453186, 0.06417698413133621, -0.02327793650329113, -0.019185062497854233, -0.08467333018779755, 0.004049243405461311, 0.1793668270111084, -0.14101456105709076, -0.06083354353904724, -0.20407912135124207, -0.4670405983924866, -0.11982136964797974, 0.3051193654537201, -0.23994779586791992, -0.10561094433069229, -0.10890595614910126, 0.0585189051926136, -0.21501484513282776, -0.12643131613731384, 0.26449382305145264, 0.2069675624370575, -0.38260790705680847, -0.10495492070913315, 0.01284027099609375, 0.11485406011343002, -0.12204893678426743, 0.2308775782585144, -0.28409090638160706, -0.3314356207847595, 0.3611929416656494, -0.02685193158686161, -0.09760941565036774, -0.15022513270378113, 0.19640813767910004, 0.6410107016563416, 0.00015183407231234014, 0.23104771971702576, -0.025150736793875694, -0.03459569439291954, -0.13897311687469482, 0.05277203768491745, 0.07531477510929108, 0.16618932783603668, 0.15701405704021454, 0.14772164821624756, 0.4005224108695984, 0.004388079047203064, 0.050076697021722794, 0.0997287780046463, 0.257255882024765, 0.35555312037467957, -0.3640000820159912, -0.5150119662284851, 0.050731997936964035, -0.5516369342803955, 0.17806681990623474, -0.2801927626132965, -0.3762616515159607, -0.16202887892723083, -0.08286865055561066, 0.31118351221084595, 0.03223201259970665, -0.09385430067777634, 0.1567063182592392, 0.11198587715625763, 0.1879044473171234, 0.12259235233068466, -0.24370083212852478, -0.4694603383541107, -0.30194759368896484, 0.3355238437652588, -0.2901151478290558, 0.2659895420074463, 0.2904401421546936, -0.01633245125412941, -0.07166349142789841, -0.30887115001678467, -0.06867735087871552, 0.07463058829307556, 0.696888267993927, 0.31985437870025635, 0.18662722408771515, -0.09400440007448196, 0.09945773333311081, -0.023253658786416054, 0.20762339234352112, -0.25977882742881775, 0.17135635018348694, -0.4841795563697815, 0.3901791572570801, 0.00034638852230273187, 0.2632506787776947, -0.6178388595581055, 0.006223265081644058, 0.1685733199119568, -0.062083642929792404, -0.5151697397232056, 0.2684658169746399, -0.17149245738983154, 0.1405555009841919, -0.15226082503795624, 0.5060011148452759, -0.16236940026283264, 0.5561702251434326, -0.24207144975662231, -0.1725636124610901, 0.6069844961166382, -0.5967276096343994, -0.2871374487876892, 0.08811969310045242, -0.020446201786398888, -0.0478137731552124, -0.35172343254089355, -0.40750229358673096, -0.25453752279281616, 0.3183050751686096, -0.10058204084634781, -0.2755891680717468, -0.1272735595703125, 0.03814464434981346, 0.11818167567253113, -0.08276422321796417, 0.7448388338088989, 0.08606315404176712, -0.05791042745113373, 0.36634859442710876, -0.00875785667449236 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
@lhoestq because if I try to pickle my custom tokenizer (it contains a pure python pretokenization step in an otherwise rust backed tokenizer) I get > Exception: Error while attempting to pickle Tokenizer: Custom PreTokenizer cannot be serialized So I remove the Custom PreTokenizer in `__getstate__` and then restore it in `__setstate__` (since it doesn't contain any state). This is what my `__getstate__` / `__setstate__` looks like: def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") out = self.__dict__.copy() logger.debug("Detaching pre_tokenizer") out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) return out def __setstate__(self, d): """ Reinstates pre_tokenizer """ logger.debug("Reattaching pre_tokenizer") self.__dict__ = d self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer() If this is the case can you think of another way of avoiding my issue?
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
121
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples @lhoestq because if I try to pickle my custom tokenizer (it contains a pure python pretokenization step in an otherwise rust backed tokenizer) I get > Exception: Error while attempting to pickle Tokenizer: Custom PreTokenizer cannot be serialized So I remove the Custom PreTokenizer in `__getstate__` and then restore it in `__setstate__` (since it doesn't contain any state). This is what my `__getstate__` / `__setstate__` looks like: def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") out = self.__dict__.copy() logger.debug("Detaching pre_tokenizer") out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) return out def __setstate__(self, d): """ Reinstates pre_tokenizer """ logger.debug("Reattaching pre_tokenizer") self.__dict__ = d self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer() If this is the case can you think of another way of avoiding my issue?
[ -0.22488734126091003, 0.19312112033367157, 0.1127530038356781, 0.028775125741958618, 0.03419579938054085, -0.32377052307128906, 0.13853639364242554, 0.19508472084999084, 0.346808522939682, -0.10001835227012634, 0.19218143820762634, 0.7253856658935547, -0.19296035170555115, 0.20866984128952026, -0.00161908776499331, 0.059579089283943176, 0.0705188438296318, -0.03540755435824394, -0.005137900356203318, -0.06401285529136658, -0.21730101108551025, 0.050916366279125214, -0.35797572135925293, 0.15361285209655762, -0.27659502625465393, -0.17681507766246796, 0.02593889646232128, 0.11868830025196075, -0.02998497150838375, -0.27113649249076843, 0.20454564690589905, -0.07879405468702316, -0.027705511078238487, 0.24116568267345428, -0.00012316943320911378, -0.08011501282453537, 0.01619364693760872, -0.08638346195220947, -0.004162499215453863, -0.21759970486164093, -0.22309590876102448, -0.12397710233926773, -0.12354390323162079, -0.2294130027294159, 0.07815724611282349, 0.002462665317580104, -0.2965724766254425, -0.38138142228126526, 0.6342014670372009, 0.4318728744983673, 0.11990705877542496, 0.36486896872520447, -0.06786814332008362, -0.034679364413022995, -0.13554894924163818, 0.31001877784729004, 0.05284783989191055, 0.223302960395813, 0.12532703578472137, -0.39181169867515564, -0.0012150539550930262, 0.09562967717647552, -0.1981259435415268, -0.21600981056690216, 0.15275079011917114, 0.059106774628162384, 0.18381048738956451, 0.010621432214975357, -0.008678345009684563, 0.09299485385417938, 0.2169976532459259, -0.35737496614456177, -0.2120290845632553, -0.3761958181858063, -0.05751387029886246, -0.15050049126148224, 0.34020355343818665, -0.21683953702449799, 0.13164880871772766, 0.14275935292243958, -0.04848417267203331, -0.10448601096868515, 0.22394081950187683, 0.3518485128879547, -0.03908213600516319, 0.25717827677726746, -0.01660947874188423, 0.3984132707118988, -0.053679224103689194, -0.10632327198982239, -0.18072597682476044, -0.1033441498875618, 0.10165431350469589, 0.45161691308021545, -0.011211344040930271, -0.23849092423915863, 0.2105509340763092, -0.21233083307743073, -0.024308189749717712, 0.21151089668273926, -0.16386432945728302, 0.12254893779754639, -0.3641282916069031, 0.26401758193969727, 0.47084030508995056, 0.22121864557266235, 0.12371264398097992, 0.6363037824630737, 0.19857057929039001, -0.16029275953769684, -0.30004552006721497, 0.07452613115310669, 0.31024834513664246, -0.10113576799631119, -0.03733976557850838, 0.17564794421195984, -0.1027165874838829, -0.1286521703004837, -0.0738532766699791, 0.27302250266075134, -0.7321614623069763, 0.008305598981678486, 0.18209092319011688, 0.12161965668201447, -0.0009523012558929622, -0.22241048514842987, -0.08313731849193573, 0.07775545120239258, -0.2158571034669876, 0.11480877548456192, -0.11857537925243378, 0.12424886971712112, -0.34277766942977905, 0.11042258143424988, -0.04326014593243599, 0.056945428252220154, 0.3175237476825714, 0.1256696581840515, -0.16883856058120728, -0.05965094268321991, 0.15125082433223724, -0.2294480949640274, 0.40169721841812134, -0.019704248756170273, -0.23601487278938293, 0.0424857996404171, 0.306940495967865, -0.44203194975852966, -0.25557491183280945, -0.059226926416158676, -0.15265673398971558, -0.14126329123973846, -0.038634903728961945, 0.03472553938627243, -0.23729616403579712, -0.004718092270195484, -0.30469051003456116, 0.10288961231708527, 0.3713429570198059, -0.20585303008556366, 0.09886566549539566, -0.5015791058540344, -0.3563106656074524, -0.20766381919384003, 0.008802086114883423, 0.17747803032398224, -0.43865102529525757, -0.24340380728244781, -0.09803219884634018, 0.15207849442958832, 0.3357070982456207, 0.12456773966550827, -0.26133888959884644, 0.6007255911827087, -0.49625009298324585, 0.8756874203681946, 0.2869647741317749, -0.14862658083438873, -0.40101128816604614, 0.03295399621129036, -0.17289471626281738, 0.23207536339759827, -0.6788752675056458, -0.1038571447134018, 0.16501542925834656, -0.07975811511278152, 0.11381687223911285, 0.33886396884918213, 0.1549205183982849, -0.09533259272575378, -0.12822012603282928, 0.0644305944442749, 0.3268658220767975, -0.28375959396362305, 0.07034888118505478, -0.009695252403616905, 0.16244390606880188, -0.2167634814977646, 0.21740300953388214, 0.034307319670915604, 0.18434280157089233, -0.11258946359157562, 0.4559537470340729, 0.17644372582435608, -0.1205102875828743, -0.31562507152557373, -0.18376821279525757, 0.32532259821891785, -0.028087200596928596, -0.026879219338297844, -0.11929532140493393, -0.08291007578372955, -0.11312627792358398, 0.056021906435489655, -0.33992499113082886, -0.24335640668869019, 0.029902398586273193, 0.024314124137163162, 0.23357664048671722, 0.17532935738563538, -0.08356519788503647, -0.24794533848762512, -0.05061448737978935, 0.060971084982156754, -0.05589332804083824, 0.05688369646668434, 0.12517836689949036, -0.2686153054237366, -0.31788957118988037, 0.16740378737449646, 0.40873536467552185, -0.09793613106012344, -0.18483813107013702, 0.27618658542633057, 0.5985626578330994, -0.2991659343242645, -0.3962603211402893, -0.18160809576511383, -0.10411584377288818, 0.12906286120414734, -0.23568858206272125, 0.17175059020519257, -0.002784482669085264, -0.23090070486068726, -0.025696707889437675, 0.5132231712341309, 0.24769368767738342, 0.3112366497516632, -0.4027121067047119, 0.2516181766986847, -0.012304892763495445, -0.08680547773838043, -0.14821752905845642, -0.33737725019454956, -0.2627914547920227, 0.03733240067958832, 0.3305850028991699, -0.13446247577667236, -0.036491651087999344, 0.040744487196207047, 0.3557880222797394, -0.07353571057319641, 0.3257075846195221, -0.06443073600530624, -0.19810637831687927, -0.19068050384521484, 0.2980230748653412, 0.37408438324928284, 0.5166622996330261, -0.10923225432634354, -0.05722501128911972, 0.08503744751214981, -0.04589052125811577, -0.04900113120675087, 0.016840562224388123, -0.1722276359796524, -0.03786466270685196, 0.198848158121109, 0.04858946055173874, -0.09989828616380692, -0.18129177391529083, 0.009794548153877258, 0.056279201060533524, 0.2922278344631195, -0.23866723477840424, 0.09624148905277252, -0.5637154579162598, 0.0709877610206604, -0.2885975241661072, -0.13038353621959686, 0.007215520367026329, -0.4439607858657837, -0.21197134256362915, 0.0941520407795906, -0.23600605130195618, 0.2182343304157257, -0.1610497534275055, -0.15978217124938965, -0.15046250820159912, -0.28893718123435974, 0.09865123778581619, -0.23461346328258514, -0.2234228104352951, -0.08643988519906998, 0.12882229685783386, 0.12238095700740814, 0.2256278544664383, 0.3576846122741699, -0.4277693033218384, -0.34537526965141296, -0.28616148233413696, 0.3642108738422394, -0.167160764336586, 0.12165622413158417, 0.36457452178001404, -0.2108633816242218, -0.07228502631187439, 0.15103381872177124, 0.3195462226867676, -0.10602486878633499, -0.1192036122083664, -0.15033645927906036, 0.277375727891922, 0.02400040812790394, -0.028316324576735497, 0.014470412395894527, -0.17064280807971954, -0.057648226618766785, 0.3715692162513733, -0.15956461429595947, 0.08714565634727478, 0.16744177043437958, 0.044090721756219864, 0.2306469976902008, -0.10440907627344131, -0.2606276571750641, -0.43920302391052246, -0.09853184223175049, 0.16474352777004242, -0.1962970346212387, -0.12573979794979095, -0.03666521608829498, -0.10954618453979492, 0.16133490204811096, 0.041704341769218445, -0.23590238392353058, 0.08998007327318192, -0.004336793906986713, 0.388319194316864, -0.20898647606372833, 0.11808444559574127, 0.3752020299434662, 0.16850735247135162, 0.0596243217587471, -0.15732471644878387, -0.20618565380573273, 0.18140138685703278, 0.38659408688545227, 0.21564291417598724, 0.18958218395709991, 0.24439632892608643, 0.15978749096393585, 0.8500332832336426, 0.31933003664016724, -0.4346620738506317, 0.12059742957353592, -0.05809397995471954, -0.06442428380250931, -0.07623686641454697, -0.3137790560722351, -0.0662493035197258, -0.24335268139839172, -0.12011310458183289, -0.12522614002227783, -0.2128135710954666, 0.1224449872970581, 0.17188744246959686, 0.07384566217660904, -0.02322220243513584, -0.476381778717041, 0.184498593211174, -0.2536953091621399, 0.14348536729812622, 0.15853999555110931, 0.37904804944992065, -0.19344677031040192, 0.31325826048851013, 0.2337399274110794, -0.09904015809297562, 0.4059720039367676, 0.09167980402708054, -0.5711541175842285, -0.2006433755159378, -0.34278517961502075, 0.44404900074005127, 0.254760205745697, 0.17552658915519714, -0.09011707454919815, -0.08576270192861557, -0.14311546087265015, 0.1859128624200821, 0.3545984625816345, -0.44384101033210754, -0.031231451779603958, 0.3080913722515106, -0.16998592019081116, -0.17829056084156036, -0.08582276850938797, 0.2033347189426422, 0.6135461330413818, 0.06068398803472519, 0.5777104496955872, -0.13267245888710022, -0.0017203327734023333, -0.18484041094779968, 0.09971842914819717, -0.09730799496173859, -0.18139134347438812, -0.041636254638433456, 0.04431718960404396, -0.2571536600589752, 0.13071434199810028, 0.17882347106933594, -0.031146837398409843, 0.25152164697647095, 0.03757230564951897, -0.11305519193410873, -0.24862971901893616, -0.06708351522684097, 0.020454473793506622, 0.22220617532730103, 0.001984855392947793, 0.1563674956560135, 0.23342251777648926, -0.0332227423787117, 0.20500709116458893, 0.3170371949672699, -0.15541785955429077, 0.019160881638526917, -0.2010469287633896, 0.02379211038351059, 0.35753417015075684, 0.07553520053625107, -0.05679522454738617, 0.30185338854789734, -0.013497908599674702, -0.10008605569601059, -0.2922605574131012, 0.25888577103614807, 0.19773685932159424, 0.097498320043087, -0.13095030188560486, -0.5797994136810303, 0.061070915311574936, 0.0986432358622551, -0.17722709476947784, 0.3608715534210205, 0.042708538472652435, -0.29186245799064636, 0.2905969023704529, 0.17745010554790497, 0.8005263209342957, 0.16540591418743134, 0.014834715984761715, 0.3365233540534973, 0.1808236539363861, 0.3699224293231964, 0.23551899194717407, -0.06569357216358185, -0.3427855670452118, 0.3571147918701172, -0.18385040760040283, -0.2929324507713318, 0.002491338411346078, 0.005259879864752293, -0.191290020942688, 0.24985642731189728, -0.013108223676681519, 0.15577611327171326, -0.18240688741207123, 0.14643095433712006, 0.31415504217147827, -0.21153469383716583, -0.034584250301122665, 0.15031301975250244, -0.07391836494207382, 0.2885684370994568, -0.035755302757024765, 0.1344926804304123, -0.14748229086399078, -0.007897787727415562, -0.24406179785728455, 0.144413560628891, -0.5116115808486938, 0.3974110186100006, 0.08362817019224167, -0.08395231515169144, 0.2956174612045288, 0.08216848224401474, -0.07009703665971756, 0.16538171470165253, -0.05454304441809654, 0.12420110404491425, 0.23464126884937286, 0.2012883722782135, 0.12402145564556122, -0.33335813879966736, 0.26357170939445496, 0.22540850937366486, -0.10461999475955963, -0.003839142620563507, -0.1554676592350006, -0.22562921047210693, -0.1773543655872345, 0.2104775309562683, 0.22592033445835114, -0.3565041422843933, -0.23085545003414154, -0.03488726541399956, 0.09603200107812881, -0.19571007788181305, 0.020374152809381485, 0.12065354734659195, 0.13061918318271637, 0.23726055026054382, -0.38427725434303284, -0.15750832855701447, 0.04430648684501648, 0.4637594223022461, -0.27505385875701904, 0.2132607102394104, 0.4285076856613159, -0.0054327333346009254, -0.04312978312373161, -0.12088309973478317, 0.12676389515399933, 0.04375789687037468, 0.21061971783638, 0.162366583943367, -0.3165006637573242, -0.06293690949678421, -0.26801159977912903, 0.3825359046459198, -0.04195990040898323, -0.20746131241321564, -0.06525153666734695, -0.22407419979572296, -0.4679107069969177, -0.054444923996925354, 0.24773018062114716, 0.1402743011713028, 0.09236685931682587, 0.5768776535987854, -0.35869476199150085, 0.18367165327072144, -0.18211670219898224, 0.09477324038743973, 0.029332339763641357, 0.08528565615415573, 0.0898129940032959, 0.03728492558002472, -0.02222977764904499, -0.2665497958660126, -0.0872107669711113, 0.45016637444496155, 0.009886506013572216, -0.09261643886566162, -0.42765262722969055, 0.17318442463874817, 0.5592159032821655, -0.18240733444690704, 0.07406427711248398, -0.2170208841562271, -0.0007079424685798585, -0.35931524634361267, -0.025179240852594376, 0.27785852551460266, 0.030726132914423943, 0.2733374238014221, 0.18936362862586975, 0.116305410861969, 0.004188396967947483, -0.015499837696552277, -0.0967455580830574, -0.06437081098556519, 0.017632173374295235, 0.05479035899043083, 0.034339699894189835, -0.07344324141740799, -0.08076443523168564, 0.22193719446659088, 0.29702115058898926, 0.2084835171699524, 0.24012981355190277, -0.045540861785411835, -0.22811563313007355, -0.1336228847503662, 0.35152071714401245, 0.35704100131988525, -0.20131288468837738, -0.24378563463687897, 0.511156439781189, 0.08368044346570969, -0.09427785128355026, 0.13512606918811798, 0.2759711742401123, 0.034715332090854645, 0.23943036794662476, 0.17323718965053558, -0.23262880742549896, 0.2811647057533264, -0.4663682281970978, -0.08754229545593262, 0.2715710997581482, -0.046773601323366165, 0.04084169492125511, 0.08094357699155807, -0.18053679168224335, 0.29333996772766113, 0.27704477310180664, 0.1332242339849472, 0.33002299070358276, 0.23037151992321014, 0.09322308748960495, 0.1252531260251999, 0.1260305494070053, 0.09452274441719055, 0.19893811643123627, -0.4628060758113861, 0.32196244597435, 0.24264121055603027, -0.005586451385170221, 0.19447150826454163, 0.1545814424753189, 0.48531028628349304, -0.5250402092933655, -0.27743998169898987, 0.23163773119449615, 0.4182744324207306, -0.20757164061069489, -0.04142367094755173, -0.4448896050453186, 0.06417698413133621, -0.02327793650329113, -0.019185062497854233, -0.08467333018779755, 0.004049243405461311, 0.1793668270111084, -0.14101456105709076, -0.06083354353904724, -0.20407912135124207, -0.4670405983924866, -0.11982136964797974, 0.3051193654537201, -0.23994779586791992, -0.10561094433069229, -0.10890595614910126, 0.0585189051926136, -0.21501484513282776, -0.12643131613731384, 0.26449382305145264, 0.2069675624370575, -0.38260790705680847, -0.10495492070913315, 0.01284027099609375, 0.11485406011343002, -0.12204893678426743, 0.2308775782585144, -0.28409090638160706, -0.3314356207847595, 0.3611929416656494, -0.02685193158686161, -0.09760941565036774, -0.15022513270378113, 0.19640813767910004, 0.6410107016563416, 0.00015183407231234014, 0.23104771971702576, -0.025150736793875694, -0.03459569439291954, -0.13897311687469482, 0.05277203768491745, 0.07531477510929108, 0.16618932783603668, 0.15701405704021454, 0.14772164821624756, 0.4005224108695984, 0.004388079047203064, 0.050076697021722794, 0.0997287780046463, 0.257255882024765, 0.35555312037467957, -0.3640000820159912, -0.5150119662284851, 0.050731997936964035, -0.5516369342803955, 0.17806681990623474, -0.2801927626132965, -0.3762616515159607, -0.16202887892723083, -0.08286865055561066, 0.31118351221084595, 0.03223201259970665, -0.09385430067777634, 0.1567063182592392, 0.11198587715625763, 0.1879044473171234, 0.12259235233068466, -0.24370083212852478, -0.4694603383541107, -0.30194759368896484, 0.3355238437652588, -0.2901151478290558, 0.2659895420074463, 0.2904401421546936, -0.01633245125412941, -0.07166349142789841, -0.30887115001678467, -0.06867735087871552, 0.07463058829307556, 0.696888267993927, 0.31985437870025635, 0.18662722408771515, -0.09400440007448196, 0.09945773333311081, -0.023253658786416054, 0.20762339234352112, -0.25977882742881775, 0.17135635018348694, -0.4841795563697815, 0.3901791572570801, 0.00034638852230273187, 0.2632506787776947, -0.6178388595581055, 0.006223265081644058, 0.1685733199119568, -0.062083642929792404, -0.5151697397232056, 0.2684658169746399, -0.17149245738983154, 0.1405555009841919, -0.15226082503795624, 0.5060011148452759, -0.16236940026283264, 0.5561702251434326, -0.24207144975662231, -0.1725636124610901, 0.6069844961166382, -0.5967276096343994, -0.2871374487876892, 0.08811969310045242, -0.020446201786398888, -0.0478137731552124, -0.35172343254089355, -0.40750229358673096, -0.25453752279281616, 0.3183050751686096, -0.10058204084634781, -0.2755891680717468, -0.1272735595703125, 0.03814464434981346, 0.11818167567253113, -0.08276422321796417, 0.7448388338088989, 0.08606315404176712, -0.05791042745113373, 0.36634859442710876, -0.00875785667449236 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
Actually, maybe I need to deep copy `self.__dict__`? That way `self` isn't modified. That was my intention and I thought it was working - I'll double-check after the weekend.
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
29
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples Actually, maybe I need to deep copy `self.__dict__`? That way `self` isn't modified. That was my intention and I thought it was working - I'll double-check after the weekend.
[ -0.22488734126091003, 0.19312112033367157, 0.1127530038356781, 0.028775125741958618, 0.03419579938054085, -0.32377052307128906, 0.13853639364242554, 0.19508472084999084, 0.346808522939682, -0.10001835227012634, 0.19218143820762634, 0.7253856658935547, -0.19296035170555115, 0.20866984128952026, -0.00161908776499331, 0.059579089283943176, 0.0705188438296318, -0.03540755435824394, -0.005137900356203318, -0.06401285529136658, -0.21730101108551025, 0.050916366279125214, -0.35797572135925293, 0.15361285209655762, -0.27659502625465393, -0.17681507766246796, 0.02593889646232128, 0.11868830025196075, -0.02998497150838375, -0.27113649249076843, 0.20454564690589905, -0.07879405468702316, -0.027705511078238487, 0.24116568267345428, -0.00012316943320911378, -0.08011501282453537, 0.01619364693760872, -0.08638346195220947, -0.004162499215453863, -0.21759970486164093, -0.22309590876102448, -0.12397710233926773, -0.12354390323162079, -0.2294130027294159, 0.07815724611282349, 0.002462665317580104, -0.2965724766254425, -0.38138142228126526, 0.6342014670372009, 0.4318728744983673, 0.11990705877542496, 0.36486896872520447, -0.06786814332008362, -0.034679364413022995, -0.13554894924163818, 0.31001877784729004, 0.05284783989191055, 0.223302960395813, 0.12532703578472137, -0.39181169867515564, -0.0012150539550930262, 0.09562967717647552, -0.1981259435415268, -0.21600981056690216, 0.15275079011917114, 0.059106774628162384, 0.18381048738956451, 0.010621432214975357, -0.008678345009684563, 0.09299485385417938, 0.2169976532459259, -0.35737496614456177, -0.2120290845632553, -0.3761958181858063, -0.05751387029886246, -0.15050049126148224, 0.34020355343818665, -0.21683953702449799, 0.13164880871772766, 0.14275935292243958, -0.04848417267203331, -0.10448601096868515, 0.22394081950187683, 0.3518485128879547, -0.03908213600516319, 0.25717827677726746, -0.01660947874188423, 0.3984132707118988, -0.053679224103689194, -0.10632327198982239, -0.18072597682476044, -0.1033441498875618, 0.10165431350469589, 0.45161691308021545, -0.011211344040930271, -0.23849092423915863, 0.2105509340763092, -0.21233083307743073, -0.024308189749717712, 0.21151089668273926, -0.16386432945728302, 0.12254893779754639, -0.3641282916069031, 0.26401758193969727, 0.47084030508995056, 0.22121864557266235, 0.12371264398097992, 0.6363037824630737, 0.19857057929039001, -0.16029275953769684, -0.30004552006721497, 0.07452613115310669, 0.31024834513664246, -0.10113576799631119, -0.03733976557850838, 0.17564794421195984, -0.1027165874838829, -0.1286521703004837, -0.0738532766699791, 0.27302250266075134, -0.7321614623069763, 0.008305598981678486, 0.18209092319011688, 0.12161965668201447, -0.0009523012558929622, -0.22241048514842987, -0.08313731849193573, 0.07775545120239258, -0.2158571034669876, 0.11480877548456192, -0.11857537925243378, 0.12424886971712112, -0.34277766942977905, 0.11042258143424988, -0.04326014593243599, 0.056945428252220154, 0.3175237476825714, 0.1256696581840515, -0.16883856058120728, -0.05965094268321991, 0.15125082433223724, -0.2294480949640274, 0.40169721841812134, -0.019704248756170273, -0.23601487278938293, 0.0424857996404171, 0.306940495967865, -0.44203194975852966, -0.25557491183280945, -0.059226926416158676, -0.15265673398971558, -0.14126329123973846, -0.038634903728961945, 0.03472553938627243, -0.23729616403579712, -0.004718092270195484, -0.30469051003456116, 0.10288961231708527, 0.3713429570198059, -0.20585303008556366, 0.09886566549539566, -0.5015791058540344, -0.3563106656074524, -0.20766381919384003, 0.008802086114883423, 0.17747803032398224, -0.43865102529525757, -0.24340380728244781, -0.09803219884634018, 0.15207849442958832, 0.3357070982456207, 0.12456773966550827, -0.26133888959884644, 0.6007255911827087, -0.49625009298324585, 0.8756874203681946, 0.2869647741317749, -0.14862658083438873, -0.40101128816604614, 0.03295399621129036, -0.17289471626281738, 0.23207536339759827, -0.6788752675056458, -0.1038571447134018, 0.16501542925834656, -0.07975811511278152, 0.11381687223911285, 0.33886396884918213, 0.1549205183982849, -0.09533259272575378, -0.12822012603282928, 0.0644305944442749, 0.3268658220767975, -0.28375959396362305, 0.07034888118505478, -0.009695252403616905, 0.16244390606880188, -0.2167634814977646, 0.21740300953388214, 0.034307319670915604, 0.18434280157089233, -0.11258946359157562, 0.4559537470340729, 0.17644372582435608, -0.1205102875828743, -0.31562507152557373, -0.18376821279525757, 0.32532259821891785, -0.028087200596928596, -0.026879219338297844, -0.11929532140493393, -0.08291007578372955, -0.11312627792358398, 0.056021906435489655, -0.33992499113082886, -0.24335640668869019, 0.029902398586273193, 0.024314124137163162, 0.23357664048671722, 0.17532935738563538, -0.08356519788503647, -0.24794533848762512, -0.05061448737978935, 0.060971084982156754, -0.05589332804083824, 0.05688369646668434, 0.12517836689949036, -0.2686153054237366, -0.31788957118988037, 0.16740378737449646, 0.40873536467552185, -0.09793613106012344, -0.18483813107013702, 0.27618658542633057, 0.5985626578330994, -0.2991659343242645, -0.3962603211402893, -0.18160809576511383, -0.10411584377288818, 0.12906286120414734, -0.23568858206272125, 0.17175059020519257, -0.002784482669085264, -0.23090070486068726, -0.025696707889437675, 0.5132231712341309, 0.24769368767738342, 0.3112366497516632, -0.4027121067047119, 0.2516181766986847, -0.012304892763495445, -0.08680547773838043, -0.14821752905845642, -0.33737725019454956, -0.2627914547920227, 0.03733240067958832, 0.3305850028991699, -0.13446247577667236, -0.036491651087999344, 0.040744487196207047, 0.3557880222797394, -0.07353571057319641, 0.3257075846195221, -0.06443073600530624, -0.19810637831687927, -0.19068050384521484, 0.2980230748653412, 0.37408438324928284, 0.5166622996330261, -0.10923225432634354, -0.05722501128911972, 0.08503744751214981, -0.04589052125811577, -0.04900113120675087, 0.016840562224388123, -0.1722276359796524, -0.03786466270685196, 0.198848158121109, 0.04858946055173874, -0.09989828616380692, -0.18129177391529083, 0.009794548153877258, 0.056279201060533524, 0.2922278344631195, -0.23866723477840424, 0.09624148905277252, -0.5637154579162598, 0.0709877610206604, -0.2885975241661072, -0.13038353621959686, 0.007215520367026329, -0.4439607858657837, -0.21197134256362915, 0.0941520407795906, -0.23600605130195618, 0.2182343304157257, -0.1610497534275055, -0.15978217124938965, -0.15046250820159912, -0.28893718123435974, 0.09865123778581619, -0.23461346328258514, -0.2234228104352951, -0.08643988519906998, 0.12882229685783386, 0.12238095700740814, 0.2256278544664383, 0.3576846122741699, -0.4277693033218384, -0.34537526965141296, -0.28616148233413696, 0.3642108738422394, -0.167160764336586, 0.12165622413158417, 0.36457452178001404, -0.2108633816242218, -0.07228502631187439, 0.15103381872177124, 0.3195462226867676, -0.10602486878633499, -0.1192036122083664, -0.15033645927906036, 0.277375727891922, 0.02400040812790394, -0.028316324576735497, 0.014470412395894527, -0.17064280807971954, -0.057648226618766785, 0.3715692162513733, -0.15956461429595947, 0.08714565634727478, 0.16744177043437958, 0.044090721756219864, 0.2306469976902008, -0.10440907627344131, -0.2606276571750641, -0.43920302391052246, -0.09853184223175049, 0.16474352777004242, -0.1962970346212387, -0.12573979794979095, -0.03666521608829498, -0.10954618453979492, 0.16133490204811096, 0.041704341769218445, -0.23590238392353058, 0.08998007327318192, -0.004336793906986713, 0.388319194316864, -0.20898647606372833, 0.11808444559574127, 0.3752020299434662, 0.16850735247135162, 0.0596243217587471, -0.15732471644878387, -0.20618565380573273, 0.18140138685703278, 0.38659408688545227, 0.21564291417598724, 0.18958218395709991, 0.24439632892608643, 0.15978749096393585, 0.8500332832336426, 0.31933003664016724, -0.4346620738506317, 0.12059742957353592, -0.05809397995471954, -0.06442428380250931, -0.07623686641454697, -0.3137790560722351, -0.0662493035197258, -0.24335268139839172, -0.12011310458183289, -0.12522614002227783, -0.2128135710954666, 0.1224449872970581, 0.17188744246959686, 0.07384566217660904, -0.02322220243513584, -0.476381778717041, 0.184498593211174, -0.2536953091621399, 0.14348536729812622, 0.15853999555110931, 0.37904804944992065, -0.19344677031040192, 0.31325826048851013, 0.2337399274110794, -0.09904015809297562, 0.4059720039367676, 0.09167980402708054, -0.5711541175842285, -0.2006433755159378, -0.34278517961502075, 0.44404900074005127, 0.254760205745697, 0.17552658915519714, -0.09011707454919815, -0.08576270192861557, -0.14311546087265015, 0.1859128624200821, 0.3545984625816345, -0.44384101033210754, -0.031231451779603958, 0.3080913722515106, -0.16998592019081116, -0.17829056084156036, -0.08582276850938797, 0.2033347189426422, 0.6135461330413818, 0.06068398803472519, 0.5777104496955872, -0.13267245888710022, -0.0017203327734023333, -0.18484041094779968, 0.09971842914819717, -0.09730799496173859, -0.18139134347438812, -0.041636254638433456, 0.04431718960404396, -0.2571536600589752, 0.13071434199810028, 0.17882347106933594, -0.031146837398409843, 0.25152164697647095, 0.03757230564951897, -0.11305519193410873, -0.24862971901893616, -0.06708351522684097, 0.020454473793506622, 0.22220617532730103, 0.001984855392947793, 0.1563674956560135, 0.23342251777648926, -0.0332227423787117, 0.20500709116458893, 0.3170371949672699, -0.15541785955429077, 0.019160881638526917, -0.2010469287633896, 0.02379211038351059, 0.35753417015075684, 0.07553520053625107, -0.05679522454738617, 0.30185338854789734, -0.013497908599674702, -0.10008605569601059, -0.2922605574131012, 0.25888577103614807, 0.19773685932159424, 0.097498320043087, -0.13095030188560486, -0.5797994136810303, 0.061070915311574936, 0.0986432358622551, -0.17722709476947784, 0.3608715534210205, 0.042708538472652435, -0.29186245799064636, 0.2905969023704529, 0.17745010554790497, 0.8005263209342957, 0.16540591418743134, 0.014834715984761715, 0.3365233540534973, 0.1808236539363861, 0.3699224293231964, 0.23551899194717407, -0.06569357216358185, -0.3427855670452118, 0.3571147918701172, -0.18385040760040283, -0.2929324507713318, 0.002491338411346078, 0.005259879864752293, -0.191290020942688, 0.24985642731189728, -0.013108223676681519, 0.15577611327171326, -0.18240688741207123, 0.14643095433712006, 0.31415504217147827, -0.21153469383716583, -0.034584250301122665, 0.15031301975250244, -0.07391836494207382, 0.2885684370994568, -0.035755302757024765, 0.1344926804304123, -0.14748229086399078, -0.007897787727415562, -0.24406179785728455, 0.144413560628891, -0.5116115808486938, 0.3974110186100006, 0.08362817019224167, -0.08395231515169144, 0.2956174612045288, 0.08216848224401474, -0.07009703665971756, 0.16538171470165253, -0.05454304441809654, 0.12420110404491425, 0.23464126884937286, 0.2012883722782135, 0.12402145564556122, -0.33335813879966736, 0.26357170939445496, 0.22540850937366486, -0.10461999475955963, -0.003839142620563507, -0.1554676592350006, -0.22562921047210693, -0.1773543655872345, 0.2104775309562683, 0.22592033445835114, -0.3565041422843933, -0.23085545003414154, -0.03488726541399956, 0.09603200107812881, -0.19571007788181305, 0.020374152809381485, 0.12065354734659195, 0.13061918318271637, 0.23726055026054382, -0.38427725434303284, -0.15750832855701447, 0.04430648684501648, 0.4637594223022461, -0.27505385875701904, 0.2132607102394104, 0.4285076856613159, -0.0054327333346009254, -0.04312978312373161, -0.12088309973478317, 0.12676389515399933, 0.04375789687037468, 0.21061971783638, 0.162366583943367, -0.3165006637573242, -0.06293690949678421, -0.26801159977912903, 0.3825359046459198, -0.04195990040898323, -0.20746131241321564, -0.06525153666734695, -0.22407419979572296, -0.4679107069969177, -0.054444923996925354, 0.24773018062114716, 0.1402743011713028, 0.09236685931682587, 0.5768776535987854, -0.35869476199150085, 0.18367165327072144, -0.18211670219898224, 0.09477324038743973, 0.029332339763641357, 0.08528565615415573, 0.0898129940032959, 0.03728492558002472, -0.02222977764904499, -0.2665497958660126, -0.0872107669711113, 0.45016637444496155, 0.009886506013572216, -0.09261643886566162, -0.42765262722969055, 0.17318442463874817, 0.5592159032821655, -0.18240733444690704, 0.07406427711248398, -0.2170208841562271, -0.0007079424685798585, -0.35931524634361267, -0.025179240852594376, 0.27785852551460266, 0.030726132914423943, 0.2733374238014221, 0.18936362862586975, 0.116305410861969, 0.004188396967947483, -0.015499837696552277, -0.0967455580830574, -0.06437081098556519, 0.017632173374295235, 0.05479035899043083, 0.034339699894189835, -0.07344324141740799, -0.08076443523168564, 0.22193719446659088, 0.29702115058898926, 0.2084835171699524, 0.24012981355190277, -0.045540861785411835, -0.22811563313007355, -0.1336228847503662, 0.35152071714401245, 0.35704100131988525, -0.20131288468837738, -0.24378563463687897, 0.511156439781189, 0.08368044346570969, -0.09427785128355026, 0.13512606918811798, 0.2759711742401123, 0.034715332090854645, 0.23943036794662476, 0.17323718965053558, -0.23262880742549896, 0.2811647057533264, -0.4663682281970978, -0.08754229545593262, 0.2715710997581482, -0.046773601323366165, 0.04084169492125511, 0.08094357699155807, -0.18053679168224335, 0.29333996772766113, 0.27704477310180664, 0.1332242339849472, 0.33002299070358276, 0.23037151992321014, 0.09322308748960495, 0.1252531260251999, 0.1260305494070053, 0.09452274441719055, 0.19893811643123627, -0.4628060758113861, 0.32196244597435, 0.24264121055603027, -0.005586451385170221, 0.19447150826454163, 0.1545814424753189, 0.48531028628349304, -0.5250402092933655, -0.27743998169898987, 0.23163773119449615, 0.4182744324207306, -0.20757164061069489, -0.04142367094755173, -0.4448896050453186, 0.06417698413133621, -0.02327793650329113, -0.019185062497854233, -0.08467333018779755, 0.004049243405461311, 0.1793668270111084, -0.14101456105709076, -0.06083354353904724, -0.20407912135124207, -0.4670405983924866, -0.11982136964797974, 0.3051193654537201, -0.23994779586791992, -0.10561094433069229, -0.10890595614910126, 0.0585189051926136, -0.21501484513282776, -0.12643131613731384, 0.26449382305145264, 0.2069675624370575, -0.38260790705680847, -0.10495492070913315, 0.01284027099609375, 0.11485406011343002, -0.12204893678426743, 0.2308775782585144, -0.28409090638160706, -0.3314356207847595, 0.3611929416656494, -0.02685193158686161, -0.09760941565036774, -0.15022513270378113, 0.19640813767910004, 0.6410107016563416, 0.00015183407231234014, 0.23104771971702576, -0.025150736793875694, -0.03459569439291954, -0.13897311687469482, 0.05277203768491745, 0.07531477510929108, 0.16618932783603668, 0.15701405704021454, 0.14772164821624756, 0.4005224108695984, 0.004388079047203064, 0.050076697021722794, 0.0997287780046463, 0.257255882024765, 0.35555312037467957, -0.3640000820159912, -0.5150119662284851, 0.050731997936964035, -0.5516369342803955, 0.17806681990623474, -0.2801927626132965, -0.3762616515159607, -0.16202887892723083, -0.08286865055561066, 0.31118351221084595, 0.03223201259970665, -0.09385430067777634, 0.1567063182592392, 0.11198587715625763, 0.1879044473171234, 0.12259235233068466, -0.24370083212852478, -0.4694603383541107, -0.30194759368896484, 0.3355238437652588, -0.2901151478290558, 0.2659895420074463, 0.2904401421546936, -0.01633245125412941, -0.07166349142789841, -0.30887115001678467, -0.06867735087871552, 0.07463058829307556, 0.696888267993927, 0.31985437870025635, 0.18662722408771515, -0.09400440007448196, 0.09945773333311081, -0.023253658786416054, 0.20762339234352112, -0.25977882742881775, 0.17135635018348694, -0.4841795563697815, 0.3901791572570801, 0.00034638852230273187, 0.2632506787776947, -0.6178388595581055, 0.006223265081644058, 0.1685733199119568, -0.062083642929792404, -0.5151697397232056, 0.2684658169746399, -0.17149245738983154, 0.1405555009841919, -0.15226082503795624, 0.5060011148452759, -0.16236940026283264, 0.5561702251434326, -0.24207144975662231, -0.1725636124610901, 0.6069844961166382, -0.5967276096343994, -0.2871374487876892, 0.08811969310045242, -0.020446201786398888, -0.0478137731552124, -0.35172343254089355, -0.40750229358673096, -0.25453752279281616, 0.3183050751686096, -0.10058204084634781, -0.2755891680717468, -0.1272735595703125, 0.03814464434981346, 0.11818167567253113, -0.08276422321796417, 0.7448388338088989, 0.08606315404176712, -0.05791042745113373, 0.36634859442710876, -0.00875785667449236 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
Doing a deep copy results in the warning: > 06/20/2021 16:02:15 - WARNING - datasets.fingerprint - Parameter 'function'=<function tokenize_function at 0x7f1e95f05d40> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed. ``` def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") out = copy.deepcopy(self.__dict__) logger.debug("Detaching pre_tokenizer") out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) return out ```
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
114
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples Doing a deep copy results in the warning: > 06/20/2021 16:02:15 - WARNING - datasets.fingerprint - Parameter 'function'=<function tokenize_function at 0x7f1e95f05d40> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed. ``` def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") out = copy.deepcopy(self.__dict__) logger.debug("Detaching pre_tokenizer") out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) return out ```
[ -0.22488734126091003, 0.19312112033367157, 0.1127530038356781, 0.028775125741958618, 0.03419579938054085, -0.32377052307128906, 0.13853639364242554, 0.19508472084999084, 0.346808522939682, -0.10001835227012634, 0.19218143820762634, 0.7253856658935547, -0.19296035170555115, 0.20866984128952026, -0.00161908776499331, 0.059579089283943176, 0.0705188438296318, -0.03540755435824394, -0.005137900356203318, -0.06401285529136658, -0.21730101108551025, 0.050916366279125214, -0.35797572135925293, 0.15361285209655762, -0.27659502625465393, -0.17681507766246796, 0.02593889646232128, 0.11868830025196075, -0.02998497150838375, -0.27113649249076843, 0.20454564690589905, -0.07879405468702316, -0.027705511078238487, 0.24116568267345428, -0.00012316943320911378, -0.08011501282453537, 0.01619364693760872, -0.08638346195220947, -0.004162499215453863, -0.21759970486164093, -0.22309590876102448, -0.12397710233926773, -0.12354390323162079, -0.2294130027294159, 0.07815724611282349, 0.002462665317580104, -0.2965724766254425, -0.38138142228126526, 0.6342014670372009, 0.4318728744983673, 0.11990705877542496, 0.36486896872520447, -0.06786814332008362, -0.034679364413022995, -0.13554894924163818, 0.31001877784729004, 0.05284783989191055, 0.223302960395813, 0.12532703578472137, -0.39181169867515564, -0.0012150539550930262, 0.09562967717647552, -0.1981259435415268, -0.21600981056690216, 0.15275079011917114, 0.059106774628162384, 0.18381048738956451, 0.010621432214975357, -0.008678345009684563, 0.09299485385417938, 0.2169976532459259, -0.35737496614456177, -0.2120290845632553, -0.3761958181858063, -0.05751387029886246, -0.15050049126148224, 0.34020355343818665, -0.21683953702449799, 0.13164880871772766, 0.14275935292243958, -0.04848417267203331, -0.10448601096868515, 0.22394081950187683, 0.3518485128879547, -0.03908213600516319, 0.25717827677726746, -0.01660947874188423, 0.3984132707118988, -0.053679224103689194, -0.10632327198982239, -0.18072597682476044, -0.1033441498875618, 0.10165431350469589, 0.45161691308021545, -0.011211344040930271, -0.23849092423915863, 0.2105509340763092, -0.21233083307743073, -0.024308189749717712, 0.21151089668273926, -0.16386432945728302, 0.12254893779754639, -0.3641282916069031, 0.26401758193969727, 0.47084030508995056, 0.22121864557266235, 0.12371264398097992, 0.6363037824630737, 0.19857057929039001, -0.16029275953769684, -0.30004552006721497, 0.07452613115310669, 0.31024834513664246, -0.10113576799631119, -0.03733976557850838, 0.17564794421195984, -0.1027165874838829, -0.1286521703004837, -0.0738532766699791, 0.27302250266075134, -0.7321614623069763, 0.008305598981678486, 0.18209092319011688, 0.12161965668201447, -0.0009523012558929622, -0.22241048514842987, -0.08313731849193573, 0.07775545120239258, -0.2158571034669876, 0.11480877548456192, -0.11857537925243378, 0.12424886971712112, -0.34277766942977905, 0.11042258143424988, -0.04326014593243599, 0.056945428252220154, 0.3175237476825714, 0.1256696581840515, -0.16883856058120728, -0.05965094268321991, 0.15125082433223724, -0.2294480949640274, 0.40169721841812134, -0.019704248756170273, -0.23601487278938293, 0.0424857996404171, 0.306940495967865, -0.44203194975852966, -0.25557491183280945, -0.059226926416158676, -0.15265673398971558, -0.14126329123973846, -0.038634903728961945, 0.03472553938627243, -0.23729616403579712, -0.004718092270195484, -0.30469051003456116, 0.10288961231708527, 0.3713429570198059, -0.20585303008556366, 0.09886566549539566, -0.5015791058540344, -0.3563106656074524, -0.20766381919384003, 0.008802086114883423, 0.17747803032398224, -0.43865102529525757, -0.24340380728244781, -0.09803219884634018, 0.15207849442958832, 0.3357070982456207, 0.12456773966550827, -0.26133888959884644, 0.6007255911827087, -0.49625009298324585, 0.8756874203681946, 0.2869647741317749, -0.14862658083438873, -0.40101128816604614, 0.03295399621129036, -0.17289471626281738, 0.23207536339759827, -0.6788752675056458, -0.1038571447134018, 0.16501542925834656, -0.07975811511278152, 0.11381687223911285, 0.33886396884918213, 0.1549205183982849, -0.09533259272575378, -0.12822012603282928, 0.0644305944442749, 0.3268658220767975, -0.28375959396362305, 0.07034888118505478, -0.009695252403616905, 0.16244390606880188, -0.2167634814977646, 0.21740300953388214, 0.034307319670915604, 0.18434280157089233, -0.11258946359157562, 0.4559537470340729, 0.17644372582435608, -0.1205102875828743, -0.31562507152557373, -0.18376821279525757, 0.32532259821891785, -0.028087200596928596, -0.026879219338297844, -0.11929532140493393, -0.08291007578372955, -0.11312627792358398, 0.056021906435489655, -0.33992499113082886, -0.24335640668869019, 0.029902398586273193, 0.024314124137163162, 0.23357664048671722, 0.17532935738563538, -0.08356519788503647, -0.24794533848762512, -0.05061448737978935, 0.060971084982156754, -0.05589332804083824, 0.05688369646668434, 0.12517836689949036, -0.2686153054237366, -0.31788957118988037, 0.16740378737449646, 0.40873536467552185, -0.09793613106012344, -0.18483813107013702, 0.27618658542633057, 0.5985626578330994, -0.2991659343242645, -0.3962603211402893, -0.18160809576511383, -0.10411584377288818, 0.12906286120414734, -0.23568858206272125, 0.17175059020519257, -0.002784482669085264, -0.23090070486068726, -0.025696707889437675, 0.5132231712341309, 0.24769368767738342, 0.3112366497516632, -0.4027121067047119, 0.2516181766986847, -0.012304892763495445, -0.08680547773838043, -0.14821752905845642, -0.33737725019454956, -0.2627914547920227, 0.03733240067958832, 0.3305850028991699, -0.13446247577667236, -0.036491651087999344, 0.040744487196207047, 0.3557880222797394, -0.07353571057319641, 0.3257075846195221, -0.06443073600530624, -0.19810637831687927, -0.19068050384521484, 0.2980230748653412, 0.37408438324928284, 0.5166622996330261, -0.10923225432634354, -0.05722501128911972, 0.08503744751214981, -0.04589052125811577, -0.04900113120675087, 0.016840562224388123, -0.1722276359796524, -0.03786466270685196, 0.198848158121109, 0.04858946055173874, -0.09989828616380692, -0.18129177391529083, 0.009794548153877258, 0.056279201060533524, 0.2922278344631195, -0.23866723477840424, 0.09624148905277252, -0.5637154579162598, 0.0709877610206604, -0.2885975241661072, -0.13038353621959686, 0.007215520367026329, -0.4439607858657837, -0.21197134256362915, 0.0941520407795906, -0.23600605130195618, 0.2182343304157257, -0.1610497534275055, -0.15978217124938965, -0.15046250820159912, -0.28893718123435974, 0.09865123778581619, -0.23461346328258514, -0.2234228104352951, -0.08643988519906998, 0.12882229685783386, 0.12238095700740814, 0.2256278544664383, 0.3576846122741699, -0.4277693033218384, -0.34537526965141296, -0.28616148233413696, 0.3642108738422394, -0.167160764336586, 0.12165622413158417, 0.36457452178001404, -0.2108633816242218, -0.07228502631187439, 0.15103381872177124, 0.3195462226867676, -0.10602486878633499, -0.1192036122083664, -0.15033645927906036, 0.277375727891922, 0.02400040812790394, -0.028316324576735497, 0.014470412395894527, -0.17064280807971954, -0.057648226618766785, 0.3715692162513733, -0.15956461429595947, 0.08714565634727478, 0.16744177043437958, 0.044090721756219864, 0.2306469976902008, -0.10440907627344131, -0.2606276571750641, -0.43920302391052246, -0.09853184223175049, 0.16474352777004242, -0.1962970346212387, -0.12573979794979095, -0.03666521608829498, -0.10954618453979492, 0.16133490204811096, 0.041704341769218445, -0.23590238392353058, 0.08998007327318192, -0.004336793906986713, 0.388319194316864, -0.20898647606372833, 0.11808444559574127, 0.3752020299434662, 0.16850735247135162, 0.0596243217587471, -0.15732471644878387, -0.20618565380573273, 0.18140138685703278, 0.38659408688545227, 0.21564291417598724, 0.18958218395709991, 0.24439632892608643, 0.15978749096393585, 0.8500332832336426, 0.31933003664016724, -0.4346620738506317, 0.12059742957353592, -0.05809397995471954, -0.06442428380250931, -0.07623686641454697, -0.3137790560722351, -0.0662493035197258, -0.24335268139839172, -0.12011310458183289, -0.12522614002227783, -0.2128135710954666, 0.1224449872970581, 0.17188744246959686, 0.07384566217660904, -0.02322220243513584, -0.476381778717041, 0.184498593211174, -0.2536953091621399, 0.14348536729812622, 0.15853999555110931, 0.37904804944992065, -0.19344677031040192, 0.31325826048851013, 0.2337399274110794, -0.09904015809297562, 0.4059720039367676, 0.09167980402708054, -0.5711541175842285, -0.2006433755159378, -0.34278517961502075, 0.44404900074005127, 0.254760205745697, 0.17552658915519714, -0.09011707454919815, -0.08576270192861557, -0.14311546087265015, 0.1859128624200821, 0.3545984625816345, -0.44384101033210754, -0.031231451779603958, 0.3080913722515106, -0.16998592019081116, -0.17829056084156036, -0.08582276850938797, 0.2033347189426422, 0.6135461330413818, 0.06068398803472519, 0.5777104496955872, -0.13267245888710022, -0.0017203327734023333, -0.18484041094779968, 0.09971842914819717, -0.09730799496173859, -0.18139134347438812, -0.041636254638433456, 0.04431718960404396, -0.2571536600589752, 0.13071434199810028, 0.17882347106933594, -0.031146837398409843, 0.25152164697647095, 0.03757230564951897, -0.11305519193410873, -0.24862971901893616, -0.06708351522684097, 0.020454473793506622, 0.22220617532730103, 0.001984855392947793, 0.1563674956560135, 0.23342251777648926, -0.0332227423787117, 0.20500709116458893, 0.3170371949672699, -0.15541785955429077, 0.019160881638526917, -0.2010469287633896, 0.02379211038351059, 0.35753417015075684, 0.07553520053625107, -0.05679522454738617, 0.30185338854789734, -0.013497908599674702, -0.10008605569601059, -0.2922605574131012, 0.25888577103614807, 0.19773685932159424, 0.097498320043087, -0.13095030188560486, -0.5797994136810303, 0.061070915311574936, 0.0986432358622551, -0.17722709476947784, 0.3608715534210205, 0.042708538472652435, -0.29186245799064636, 0.2905969023704529, 0.17745010554790497, 0.8005263209342957, 0.16540591418743134, 0.014834715984761715, 0.3365233540534973, 0.1808236539363861, 0.3699224293231964, 0.23551899194717407, -0.06569357216358185, -0.3427855670452118, 0.3571147918701172, -0.18385040760040283, -0.2929324507713318, 0.002491338411346078, 0.005259879864752293, -0.191290020942688, 0.24985642731189728, -0.013108223676681519, 0.15577611327171326, -0.18240688741207123, 0.14643095433712006, 0.31415504217147827, -0.21153469383716583, -0.034584250301122665, 0.15031301975250244, -0.07391836494207382, 0.2885684370994568, -0.035755302757024765, 0.1344926804304123, -0.14748229086399078, -0.007897787727415562, -0.24406179785728455, 0.144413560628891, -0.5116115808486938, 0.3974110186100006, 0.08362817019224167, -0.08395231515169144, 0.2956174612045288, 0.08216848224401474, -0.07009703665971756, 0.16538171470165253, -0.05454304441809654, 0.12420110404491425, 0.23464126884937286, 0.2012883722782135, 0.12402145564556122, -0.33335813879966736, 0.26357170939445496, 0.22540850937366486, -0.10461999475955963, -0.003839142620563507, -0.1554676592350006, -0.22562921047210693, -0.1773543655872345, 0.2104775309562683, 0.22592033445835114, -0.3565041422843933, -0.23085545003414154, -0.03488726541399956, 0.09603200107812881, -0.19571007788181305, 0.020374152809381485, 0.12065354734659195, 0.13061918318271637, 0.23726055026054382, -0.38427725434303284, -0.15750832855701447, 0.04430648684501648, 0.4637594223022461, -0.27505385875701904, 0.2132607102394104, 0.4285076856613159, -0.0054327333346009254, -0.04312978312373161, -0.12088309973478317, 0.12676389515399933, 0.04375789687037468, 0.21061971783638, 0.162366583943367, -0.3165006637573242, -0.06293690949678421, -0.26801159977912903, 0.3825359046459198, -0.04195990040898323, -0.20746131241321564, -0.06525153666734695, -0.22407419979572296, -0.4679107069969177, -0.054444923996925354, 0.24773018062114716, 0.1402743011713028, 0.09236685931682587, 0.5768776535987854, -0.35869476199150085, 0.18367165327072144, -0.18211670219898224, 0.09477324038743973, 0.029332339763641357, 0.08528565615415573, 0.0898129940032959, 0.03728492558002472, -0.02222977764904499, -0.2665497958660126, -0.0872107669711113, 0.45016637444496155, 0.009886506013572216, -0.09261643886566162, -0.42765262722969055, 0.17318442463874817, 0.5592159032821655, -0.18240733444690704, 0.07406427711248398, -0.2170208841562271, -0.0007079424685798585, -0.35931524634361267, -0.025179240852594376, 0.27785852551460266, 0.030726132914423943, 0.2733374238014221, 0.18936362862586975, 0.116305410861969, 0.004188396967947483, -0.015499837696552277, -0.0967455580830574, -0.06437081098556519, 0.017632173374295235, 0.05479035899043083, 0.034339699894189835, -0.07344324141740799, -0.08076443523168564, 0.22193719446659088, 0.29702115058898926, 0.2084835171699524, 0.24012981355190277, -0.045540861785411835, -0.22811563313007355, -0.1336228847503662, 0.35152071714401245, 0.35704100131988525, -0.20131288468837738, -0.24378563463687897, 0.511156439781189, 0.08368044346570969, -0.09427785128355026, 0.13512606918811798, 0.2759711742401123, 0.034715332090854645, 0.23943036794662476, 0.17323718965053558, -0.23262880742549896, 0.2811647057533264, -0.4663682281970978, -0.08754229545593262, 0.2715710997581482, -0.046773601323366165, 0.04084169492125511, 0.08094357699155807, -0.18053679168224335, 0.29333996772766113, 0.27704477310180664, 0.1332242339849472, 0.33002299070358276, 0.23037151992321014, 0.09322308748960495, 0.1252531260251999, 0.1260305494070053, 0.09452274441719055, 0.19893811643123627, -0.4628060758113861, 0.32196244597435, 0.24264121055603027, -0.005586451385170221, 0.19447150826454163, 0.1545814424753189, 0.48531028628349304, -0.5250402092933655, -0.27743998169898987, 0.23163773119449615, 0.4182744324207306, -0.20757164061069489, -0.04142367094755173, -0.4448896050453186, 0.06417698413133621, -0.02327793650329113, -0.019185062497854233, -0.08467333018779755, 0.004049243405461311, 0.1793668270111084, -0.14101456105709076, -0.06083354353904724, -0.20407912135124207, -0.4670405983924866, -0.11982136964797974, 0.3051193654537201, -0.23994779586791992, -0.10561094433069229, -0.10890595614910126, 0.0585189051926136, -0.21501484513282776, -0.12643131613731384, 0.26449382305145264, 0.2069675624370575, -0.38260790705680847, -0.10495492070913315, 0.01284027099609375, 0.11485406011343002, -0.12204893678426743, 0.2308775782585144, -0.28409090638160706, -0.3314356207847595, 0.3611929416656494, -0.02685193158686161, -0.09760941565036774, -0.15022513270378113, 0.19640813767910004, 0.6410107016563416, 0.00015183407231234014, 0.23104771971702576, -0.025150736793875694, -0.03459569439291954, -0.13897311687469482, 0.05277203768491745, 0.07531477510929108, 0.16618932783603668, 0.15701405704021454, 0.14772164821624756, 0.4005224108695984, 0.004388079047203064, 0.050076697021722794, 0.0997287780046463, 0.257255882024765, 0.35555312037467957, -0.3640000820159912, -0.5150119662284851, 0.050731997936964035, -0.5516369342803955, 0.17806681990623474, -0.2801927626132965, -0.3762616515159607, -0.16202887892723083, -0.08286865055561066, 0.31118351221084595, 0.03223201259970665, -0.09385430067777634, 0.1567063182592392, 0.11198587715625763, 0.1879044473171234, 0.12259235233068466, -0.24370083212852478, -0.4694603383541107, -0.30194759368896484, 0.3355238437652588, -0.2901151478290558, 0.2659895420074463, 0.2904401421546936, -0.01633245125412941, -0.07166349142789841, -0.30887115001678467, -0.06867735087871552, 0.07463058829307556, 0.696888267993927, 0.31985437870025635, 0.18662722408771515, -0.09400440007448196, 0.09945773333311081, -0.023253658786416054, 0.20762339234352112, -0.25977882742881775, 0.17135635018348694, -0.4841795563697815, 0.3901791572570801, 0.00034638852230273187, 0.2632506787776947, -0.6178388595581055, 0.006223265081644058, 0.1685733199119568, -0.062083642929792404, -0.5151697397232056, 0.2684658169746399, -0.17149245738983154, 0.1405555009841919, -0.15226082503795624, 0.5060011148452759, -0.16236940026283264, 0.5561702251434326, -0.24207144975662231, -0.1725636124610901, 0.6069844961166382, -0.5967276096343994, -0.2871374487876892, 0.08811969310045242, -0.020446201786398888, -0.0478137731552124, -0.35172343254089355, -0.40750229358673096, -0.25453752279281616, 0.3183050751686096, -0.10058204084634781, -0.2755891680717468, -0.1272735595703125, 0.03814464434981346, 0.11818167567253113, -0.08276422321796417, 0.7448388338088989, 0.08606315404176712, -0.05791042745113373, 0.36634859442710876, -0.00875785667449236 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
Looks like there is still an object that is not pickable in your `tokenize_function` function. You can test if an object can be pickled and hashed by using ```python from datasets.fingerprint import Hasher Hasher.hash(my_object) ``` Under the hood it pickles the object to compute its hash, so it calls `__getstate__` when applicable.
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
52
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples Looks like there is still an object that is not pickable in your `tokenize_function` function. You can test if an object can be pickled and hashed by using ```python from datasets.fingerprint import Hasher Hasher.hash(my_object) ``` Under the hood it pickles the object to compute its hash, so it calls `__getstate__` when applicable.
[ -0.22488734126091003, 0.19312112033367157, 0.1127530038356781, 0.028775125741958618, 0.03419579938054085, -0.32377052307128906, 0.13853639364242554, 0.19508472084999084, 0.346808522939682, -0.10001835227012634, 0.19218143820762634, 0.7253856658935547, -0.19296035170555115, 0.20866984128952026, -0.00161908776499331, 0.059579089283943176, 0.0705188438296318, -0.03540755435824394, -0.005137900356203318, -0.06401285529136658, -0.21730101108551025, 0.050916366279125214, -0.35797572135925293, 0.15361285209655762, -0.27659502625465393, -0.17681507766246796, 0.02593889646232128, 0.11868830025196075, -0.02998497150838375, -0.27113649249076843, 0.20454564690589905, -0.07879405468702316, -0.027705511078238487, 0.24116568267345428, -0.00012316943320911378, -0.08011501282453537, 0.01619364693760872, -0.08638346195220947, -0.004162499215453863, -0.21759970486164093, -0.22309590876102448, -0.12397710233926773, -0.12354390323162079, -0.2294130027294159, 0.07815724611282349, 0.002462665317580104, -0.2965724766254425, -0.38138142228126526, 0.6342014670372009, 0.4318728744983673, 0.11990705877542496, 0.36486896872520447, -0.06786814332008362, -0.034679364413022995, -0.13554894924163818, 0.31001877784729004, 0.05284783989191055, 0.223302960395813, 0.12532703578472137, -0.39181169867515564, -0.0012150539550930262, 0.09562967717647552, -0.1981259435415268, -0.21600981056690216, 0.15275079011917114, 0.059106774628162384, 0.18381048738956451, 0.010621432214975357, -0.008678345009684563, 0.09299485385417938, 0.2169976532459259, -0.35737496614456177, -0.2120290845632553, -0.3761958181858063, -0.05751387029886246, -0.15050049126148224, 0.34020355343818665, -0.21683953702449799, 0.13164880871772766, 0.14275935292243958, -0.04848417267203331, -0.10448601096868515, 0.22394081950187683, 0.3518485128879547, -0.03908213600516319, 0.25717827677726746, -0.01660947874188423, 0.3984132707118988, -0.053679224103689194, -0.10632327198982239, -0.18072597682476044, -0.1033441498875618, 0.10165431350469589, 0.45161691308021545, -0.011211344040930271, -0.23849092423915863, 0.2105509340763092, -0.21233083307743073, -0.024308189749717712, 0.21151089668273926, -0.16386432945728302, 0.12254893779754639, -0.3641282916069031, 0.26401758193969727, 0.47084030508995056, 0.22121864557266235, 0.12371264398097992, 0.6363037824630737, 0.19857057929039001, -0.16029275953769684, -0.30004552006721497, 0.07452613115310669, 0.31024834513664246, -0.10113576799631119, -0.03733976557850838, 0.17564794421195984, -0.1027165874838829, -0.1286521703004837, -0.0738532766699791, 0.27302250266075134, -0.7321614623069763, 0.008305598981678486, 0.18209092319011688, 0.12161965668201447, -0.0009523012558929622, -0.22241048514842987, -0.08313731849193573, 0.07775545120239258, -0.2158571034669876, 0.11480877548456192, -0.11857537925243378, 0.12424886971712112, -0.34277766942977905, 0.11042258143424988, -0.04326014593243599, 0.056945428252220154, 0.3175237476825714, 0.1256696581840515, -0.16883856058120728, -0.05965094268321991, 0.15125082433223724, -0.2294480949640274, 0.40169721841812134, -0.019704248756170273, -0.23601487278938293, 0.0424857996404171, 0.306940495967865, -0.44203194975852966, -0.25557491183280945, -0.059226926416158676, -0.15265673398971558, -0.14126329123973846, -0.038634903728961945, 0.03472553938627243, -0.23729616403579712, -0.004718092270195484, -0.30469051003456116, 0.10288961231708527, 0.3713429570198059, -0.20585303008556366, 0.09886566549539566, -0.5015791058540344, -0.3563106656074524, -0.20766381919384003, 0.008802086114883423, 0.17747803032398224, -0.43865102529525757, -0.24340380728244781, -0.09803219884634018, 0.15207849442958832, 0.3357070982456207, 0.12456773966550827, -0.26133888959884644, 0.6007255911827087, -0.49625009298324585, 0.8756874203681946, 0.2869647741317749, -0.14862658083438873, -0.40101128816604614, 0.03295399621129036, -0.17289471626281738, 0.23207536339759827, -0.6788752675056458, -0.1038571447134018, 0.16501542925834656, -0.07975811511278152, 0.11381687223911285, 0.33886396884918213, 0.1549205183982849, -0.09533259272575378, -0.12822012603282928, 0.0644305944442749, 0.3268658220767975, -0.28375959396362305, 0.07034888118505478, -0.009695252403616905, 0.16244390606880188, -0.2167634814977646, 0.21740300953388214, 0.034307319670915604, 0.18434280157089233, -0.11258946359157562, 0.4559537470340729, 0.17644372582435608, -0.1205102875828743, -0.31562507152557373, -0.18376821279525757, 0.32532259821891785, -0.028087200596928596, -0.026879219338297844, -0.11929532140493393, -0.08291007578372955, -0.11312627792358398, 0.056021906435489655, -0.33992499113082886, -0.24335640668869019, 0.029902398586273193, 0.024314124137163162, 0.23357664048671722, 0.17532935738563538, -0.08356519788503647, -0.24794533848762512, -0.05061448737978935, 0.060971084982156754, -0.05589332804083824, 0.05688369646668434, 0.12517836689949036, -0.2686153054237366, -0.31788957118988037, 0.16740378737449646, 0.40873536467552185, -0.09793613106012344, -0.18483813107013702, 0.27618658542633057, 0.5985626578330994, -0.2991659343242645, -0.3962603211402893, -0.18160809576511383, -0.10411584377288818, 0.12906286120414734, -0.23568858206272125, 0.17175059020519257, -0.002784482669085264, -0.23090070486068726, -0.025696707889437675, 0.5132231712341309, 0.24769368767738342, 0.3112366497516632, -0.4027121067047119, 0.2516181766986847, -0.012304892763495445, -0.08680547773838043, -0.14821752905845642, -0.33737725019454956, -0.2627914547920227, 0.03733240067958832, 0.3305850028991699, -0.13446247577667236, -0.036491651087999344, 0.040744487196207047, 0.3557880222797394, -0.07353571057319641, 0.3257075846195221, -0.06443073600530624, -0.19810637831687927, -0.19068050384521484, 0.2980230748653412, 0.37408438324928284, 0.5166622996330261, -0.10923225432634354, -0.05722501128911972, 0.08503744751214981, -0.04589052125811577, -0.04900113120675087, 0.016840562224388123, -0.1722276359796524, -0.03786466270685196, 0.198848158121109, 0.04858946055173874, -0.09989828616380692, -0.18129177391529083, 0.009794548153877258, 0.056279201060533524, 0.2922278344631195, -0.23866723477840424, 0.09624148905277252, -0.5637154579162598, 0.0709877610206604, -0.2885975241661072, -0.13038353621959686, 0.007215520367026329, -0.4439607858657837, -0.21197134256362915, 0.0941520407795906, -0.23600605130195618, 0.2182343304157257, -0.1610497534275055, -0.15978217124938965, -0.15046250820159912, -0.28893718123435974, 0.09865123778581619, -0.23461346328258514, -0.2234228104352951, -0.08643988519906998, 0.12882229685783386, 0.12238095700740814, 0.2256278544664383, 0.3576846122741699, -0.4277693033218384, -0.34537526965141296, -0.28616148233413696, 0.3642108738422394, -0.167160764336586, 0.12165622413158417, 0.36457452178001404, -0.2108633816242218, -0.07228502631187439, 0.15103381872177124, 0.3195462226867676, -0.10602486878633499, -0.1192036122083664, -0.15033645927906036, 0.277375727891922, 0.02400040812790394, -0.028316324576735497, 0.014470412395894527, -0.17064280807971954, -0.057648226618766785, 0.3715692162513733, -0.15956461429595947, 0.08714565634727478, 0.16744177043437958, 0.044090721756219864, 0.2306469976902008, -0.10440907627344131, -0.2606276571750641, -0.43920302391052246, -0.09853184223175049, 0.16474352777004242, -0.1962970346212387, -0.12573979794979095, -0.03666521608829498, -0.10954618453979492, 0.16133490204811096, 0.041704341769218445, -0.23590238392353058, 0.08998007327318192, -0.004336793906986713, 0.388319194316864, -0.20898647606372833, 0.11808444559574127, 0.3752020299434662, 0.16850735247135162, 0.0596243217587471, -0.15732471644878387, -0.20618565380573273, 0.18140138685703278, 0.38659408688545227, 0.21564291417598724, 0.18958218395709991, 0.24439632892608643, 0.15978749096393585, 0.8500332832336426, 0.31933003664016724, -0.4346620738506317, 0.12059742957353592, -0.05809397995471954, -0.06442428380250931, -0.07623686641454697, -0.3137790560722351, -0.0662493035197258, -0.24335268139839172, -0.12011310458183289, -0.12522614002227783, -0.2128135710954666, 0.1224449872970581, 0.17188744246959686, 0.07384566217660904, -0.02322220243513584, -0.476381778717041, 0.184498593211174, -0.2536953091621399, 0.14348536729812622, 0.15853999555110931, 0.37904804944992065, -0.19344677031040192, 0.31325826048851013, 0.2337399274110794, -0.09904015809297562, 0.4059720039367676, 0.09167980402708054, -0.5711541175842285, -0.2006433755159378, -0.34278517961502075, 0.44404900074005127, 0.254760205745697, 0.17552658915519714, -0.09011707454919815, -0.08576270192861557, -0.14311546087265015, 0.1859128624200821, 0.3545984625816345, -0.44384101033210754, -0.031231451779603958, 0.3080913722515106, -0.16998592019081116, -0.17829056084156036, -0.08582276850938797, 0.2033347189426422, 0.6135461330413818, 0.06068398803472519, 0.5777104496955872, -0.13267245888710022, -0.0017203327734023333, -0.18484041094779968, 0.09971842914819717, -0.09730799496173859, -0.18139134347438812, -0.041636254638433456, 0.04431718960404396, -0.2571536600589752, 0.13071434199810028, 0.17882347106933594, -0.031146837398409843, 0.25152164697647095, 0.03757230564951897, -0.11305519193410873, -0.24862971901893616, -0.06708351522684097, 0.020454473793506622, 0.22220617532730103, 0.001984855392947793, 0.1563674956560135, 0.23342251777648926, -0.0332227423787117, 0.20500709116458893, 0.3170371949672699, -0.15541785955429077, 0.019160881638526917, -0.2010469287633896, 0.02379211038351059, 0.35753417015075684, 0.07553520053625107, -0.05679522454738617, 0.30185338854789734, -0.013497908599674702, -0.10008605569601059, -0.2922605574131012, 0.25888577103614807, 0.19773685932159424, 0.097498320043087, -0.13095030188560486, -0.5797994136810303, 0.061070915311574936, 0.0986432358622551, -0.17722709476947784, 0.3608715534210205, 0.042708538472652435, -0.29186245799064636, 0.2905969023704529, 0.17745010554790497, 0.8005263209342957, 0.16540591418743134, 0.014834715984761715, 0.3365233540534973, 0.1808236539363861, 0.3699224293231964, 0.23551899194717407, -0.06569357216358185, -0.3427855670452118, 0.3571147918701172, -0.18385040760040283, -0.2929324507713318, 0.002491338411346078, 0.005259879864752293, -0.191290020942688, 0.24985642731189728, -0.013108223676681519, 0.15577611327171326, -0.18240688741207123, 0.14643095433712006, 0.31415504217147827, -0.21153469383716583, -0.034584250301122665, 0.15031301975250244, -0.07391836494207382, 0.2885684370994568, -0.035755302757024765, 0.1344926804304123, -0.14748229086399078, -0.007897787727415562, -0.24406179785728455, 0.144413560628891, -0.5116115808486938, 0.3974110186100006, 0.08362817019224167, -0.08395231515169144, 0.2956174612045288, 0.08216848224401474, -0.07009703665971756, 0.16538171470165253, -0.05454304441809654, 0.12420110404491425, 0.23464126884937286, 0.2012883722782135, 0.12402145564556122, -0.33335813879966736, 0.26357170939445496, 0.22540850937366486, -0.10461999475955963, -0.003839142620563507, -0.1554676592350006, -0.22562921047210693, -0.1773543655872345, 0.2104775309562683, 0.22592033445835114, -0.3565041422843933, -0.23085545003414154, -0.03488726541399956, 0.09603200107812881, -0.19571007788181305, 0.020374152809381485, 0.12065354734659195, 0.13061918318271637, 0.23726055026054382, -0.38427725434303284, -0.15750832855701447, 0.04430648684501648, 0.4637594223022461, -0.27505385875701904, 0.2132607102394104, 0.4285076856613159, -0.0054327333346009254, -0.04312978312373161, -0.12088309973478317, 0.12676389515399933, 0.04375789687037468, 0.21061971783638, 0.162366583943367, -0.3165006637573242, -0.06293690949678421, -0.26801159977912903, 0.3825359046459198, -0.04195990040898323, -0.20746131241321564, -0.06525153666734695, -0.22407419979572296, -0.4679107069969177, -0.054444923996925354, 0.24773018062114716, 0.1402743011713028, 0.09236685931682587, 0.5768776535987854, -0.35869476199150085, 0.18367165327072144, -0.18211670219898224, 0.09477324038743973, 0.029332339763641357, 0.08528565615415573, 0.0898129940032959, 0.03728492558002472, -0.02222977764904499, -0.2665497958660126, -0.0872107669711113, 0.45016637444496155, 0.009886506013572216, -0.09261643886566162, -0.42765262722969055, 0.17318442463874817, 0.5592159032821655, -0.18240733444690704, 0.07406427711248398, -0.2170208841562271, -0.0007079424685798585, -0.35931524634361267, -0.025179240852594376, 0.27785852551460266, 0.030726132914423943, 0.2733374238014221, 0.18936362862586975, 0.116305410861969, 0.004188396967947483, -0.015499837696552277, -0.0967455580830574, -0.06437081098556519, 0.017632173374295235, 0.05479035899043083, 0.034339699894189835, -0.07344324141740799, -0.08076443523168564, 0.22193719446659088, 0.29702115058898926, 0.2084835171699524, 0.24012981355190277, -0.045540861785411835, -0.22811563313007355, -0.1336228847503662, 0.35152071714401245, 0.35704100131988525, -0.20131288468837738, -0.24378563463687897, 0.511156439781189, 0.08368044346570969, -0.09427785128355026, 0.13512606918811798, 0.2759711742401123, 0.034715332090854645, 0.23943036794662476, 0.17323718965053558, -0.23262880742549896, 0.2811647057533264, -0.4663682281970978, -0.08754229545593262, 0.2715710997581482, -0.046773601323366165, 0.04084169492125511, 0.08094357699155807, -0.18053679168224335, 0.29333996772766113, 0.27704477310180664, 0.1332242339849472, 0.33002299070358276, 0.23037151992321014, 0.09322308748960495, 0.1252531260251999, 0.1260305494070053, 0.09452274441719055, 0.19893811643123627, -0.4628060758113861, 0.32196244597435, 0.24264121055603027, -0.005586451385170221, 0.19447150826454163, 0.1545814424753189, 0.48531028628349304, -0.5250402092933655, -0.27743998169898987, 0.23163773119449615, 0.4182744324207306, -0.20757164061069489, -0.04142367094755173, -0.4448896050453186, 0.06417698413133621, -0.02327793650329113, -0.019185062497854233, -0.08467333018779755, 0.004049243405461311, 0.1793668270111084, -0.14101456105709076, -0.06083354353904724, -0.20407912135124207, -0.4670405983924866, -0.11982136964797974, 0.3051193654537201, -0.23994779586791992, -0.10561094433069229, -0.10890595614910126, 0.0585189051926136, -0.21501484513282776, -0.12643131613731384, 0.26449382305145264, 0.2069675624370575, -0.38260790705680847, -0.10495492070913315, 0.01284027099609375, 0.11485406011343002, -0.12204893678426743, 0.2308775782585144, -0.28409090638160706, -0.3314356207847595, 0.3611929416656494, -0.02685193158686161, -0.09760941565036774, -0.15022513270378113, 0.19640813767910004, 0.6410107016563416, 0.00015183407231234014, 0.23104771971702576, -0.025150736793875694, -0.03459569439291954, -0.13897311687469482, 0.05277203768491745, 0.07531477510929108, 0.16618932783603668, 0.15701405704021454, 0.14772164821624756, 0.4005224108695984, 0.004388079047203064, 0.050076697021722794, 0.0997287780046463, 0.257255882024765, 0.35555312037467957, -0.3640000820159912, -0.5150119662284851, 0.050731997936964035, -0.5516369342803955, 0.17806681990623474, -0.2801927626132965, -0.3762616515159607, -0.16202887892723083, -0.08286865055561066, 0.31118351221084595, 0.03223201259970665, -0.09385430067777634, 0.1567063182592392, 0.11198587715625763, 0.1879044473171234, 0.12259235233068466, -0.24370083212852478, -0.4694603383541107, -0.30194759368896484, 0.3355238437652588, -0.2901151478290558, 0.2659895420074463, 0.2904401421546936, -0.01633245125412941, -0.07166349142789841, -0.30887115001678467, -0.06867735087871552, 0.07463058829307556, 0.696888267993927, 0.31985437870025635, 0.18662722408771515, -0.09400440007448196, 0.09945773333311081, -0.023253658786416054, 0.20762339234352112, -0.25977882742881775, 0.17135635018348694, -0.4841795563697815, 0.3901791572570801, 0.00034638852230273187, 0.2632506787776947, -0.6178388595581055, 0.006223265081644058, 0.1685733199119568, -0.062083642929792404, -0.5151697397232056, 0.2684658169746399, -0.17149245738983154, 0.1405555009841919, -0.15226082503795624, 0.5060011148452759, -0.16236940026283264, 0.5561702251434326, -0.24207144975662231, -0.1725636124610901, 0.6069844961166382, -0.5967276096343994, -0.2871374487876892, 0.08811969310045242, -0.020446201786398888, -0.0478137731552124, -0.35172343254089355, -0.40750229358673096, -0.25453752279281616, 0.3183050751686096, -0.10058204084634781, -0.2755891680717468, -0.1272735595703125, 0.03814464434981346, 0.11818167567253113, -0.08276422321796417, 0.7448388338088989, 0.08606315404176712, -0.05791042745113373, 0.36634859442710876, -0.00875785667449236 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
I figured it out, the problem is deep copy itself uses pickle (unless you implement `__deepcopy__`). So when I changed `__getstate__` it started throwing an error. I'm sure there's a better way of doing this, but in order to return the `__dict__` without the non-pikelable pre-tokeniser and without modifying self I removed the pre-tokenizers, did a deep copy and then re-generated it. It does work - although I noticed Hasher doesn't call `__hash__` if the object being hashed implements it which I feel it should? If it did I could return a hash of the tokenizers.json file instead. ``` def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") self.backend_tokenizer.pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) out = copy.deepcopy(self.__dict__) #self.__dict__.copy() self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer() return out ```
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
126
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples I figured it out, the problem is deep copy itself uses pickle (unless you implement `__deepcopy__`). So when I changed `__getstate__` it started throwing an error. I'm sure there's a better way of doing this, but in order to return the `__dict__` without the non-pikelable pre-tokeniser and without modifying self I removed the pre-tokenizers, did a deep copy and then re-generated it. It does work - although I noticed Hasher doesn't call `__hash__` if the object being hashed implements it which I feel it should? If it did I could return a hash of the tokenizers.json file instead. ``` def __getstate__(self): """ Removes pre_tokenizer since it cannot be pickled """ logger.debug("Copy state dict") self.backend_tokenizer.pre_tokenizer = tokenizers.pre_tokenizers.Sequence([]) out = copy.deepcopy(self.__dict__) #self.__dict__.copy() self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer() return out ```
[ -0.22488734126091003, 0.19312112033367157, 0.1127530038356781, 0.028775125741958618, 0.03419579938054085, -0.32377052307128906, 0.13853639364242554, 0.19508472084999084, 0.346808522939682, -0.10001835227012634, 0.19218143820762634, 0.7253856658935547, -0.19296035170555115, 0.20866984128952026, -0.00161908776499331, 0.059579089283943176, 0.0705188438296318, -0.03540755435824394, -0.005137900356203318, -0.06401285529136658, -0.21730101108551025, 0.050916366279125214, -0.35797572135925293, 0.15361285209655762, -0.27659502625465393, -0.17681507766246796, 0.02593889646232128, 0.11868830025196075, -0.02998497150838375, -0.27113649249076843, 0.20454564690589905, -0.07879405468702316, -0.027705511078238487, 0.24116568267345428, -0.00012316943320911378, -0.08011501282453537, 0.01619364693760872, -0.08638346195220947, -0.004162499215453863, -0.21759970486164093, -0.22309590876102448, -0.12397710233926773, -0.12354390323162079, -0.2294130027294159, 0.07815724611282349, 0.002462665317580104, -0.2965724766254425, -0.38138142228126526, 0.6342014670372009, 0.4318728744983673, 0.11990705877542496, 0.36486896872520447, -0.06786814332008362, -0.034679364413022995, -0.13554894924163818, 0.31001877784729004, 0.05284783989191055, 0.223302960395813, 0.12532703578472137, -0.39181169867515564, -0.0012150539550930262, 0.09562967717647552, -0.1981259435415268, -0.21600981056690216, 0.15275079011917114, 0.059106774628162384, 0.18381048738956451, 0.010621432214975357, -0.008678345009684563, 0.09299485385417938, 0.2169976532459259, -0.35737496614456177, -0.2120290845632553, -0.3761958181858063, -0.05751387029886246, -0.15050049126148224, 0.34020355343818665, -0.21683953702449799, 0.13164880871772766, 0.14275935292243958, -0.04848417267203331, -0.10448601096868515, 0.22394081950187683, 0.3518485128879547, -0.03908213600516319, 0.25717827677726746, -0.01660947874188423, 0.3984132707118988, -0.053679224103689194, -0.10632327198982239, -0.18072597682476044, -0.1033441498875618, 0.10165431350469589, 0.45161691308021545, -0.011211344040930271, -0.23849092423915863, 0.2105509340763092, -0.21233083307743073, -0.024308189749717712, 0.21151089668273926, -0.16386432945728302, 0.12254893779754639, -0.3641282916069031, 0.26401758193969727, 0.47084030508995056, 0.22121864557266235, 0.12371264398097992, 0.6363037824630737, 0.19857057929039001, -0.16029275953769684, -0.30004552006721497, 0.07452613115310669, 0.31024834513664246, -0.10113576799631119, -0.03733976557850838, 0.17564794421195984, -0.1027165874838829, -0.1286521703004837, -0.0738532766699791, 0.27302250266075134, -0.7321614623069763, 0.008305598981678486, 0.18209092319011688, 0.12161965668201447, -0.0009523012558929622, -0.22241048514842987, -0.08313731849193573, 0.07775545120239258, -0.2158571034669876, 0.11480877548456192, -0.11857537925243378, 0.12424886971712112, -0.34277766942977905, 0.11042258143424988, -0.04326014593243599, 0.056945428252220154, 0.3175237476825714, 0.1256696581840515, -0.16883856058120728, -0.05965094268321991, 0.15125082433223724, -0.2294480949640274, 0.40169721841812134, -0.019704248756170273, -0.23601487278938293, 0.0424857996404171, 0.306940495967865, -0.44203194975852966, -0.25557491183280945, -0.059226926416158676, -0.15265673398971558, -0.14126329123973846, -0.038634903728961945, 0.03472553938627243, -0.23729616403579712, -0.004718092270195484, -0.30469051003456116, 0.10288961231708527, 0.3713429570198059, -0.20585303008556366, 0.09886566549539566, -0.5015791058540344, -0.3563106656074524, -0.20766381919384003, 0.008802086114883423, 0.17747803032398224, -0.43865102529525757, -0.24340380728244781, -0.09803219884634018, 0.15207849442958832, 0.3357070982456207, 0.12456773966550827, -0.26133888959884644, 0.6007255911827087, -0.49625009298324585, 0.8756874203681946, 0.2869647741317749, -0.14862658083438873, -0.40101128816604614, 0.03295399621129036, -0.17289471626281738, 0.23207536339759827, -0.6788752675056458, -0.1038571447134018, 0.16501542925834656, -0.07975811511278152, 0.11381687223911285, 0.33886396884918213, 0.1549205183982849, -0.09533259272575378, -0.12822012603282928, 0.0644305944442749, 0.3268658220767975, -0.28375959396362305, 0.07034888118505478, -0.009695252403616905, 0.16244390606880188, -0.2167634814977646, 0.21740300953388214, 0.034307319670915604, 0.18434280157089233, -0.11258946359157562, 0.4559537470340729, 0.17644372582435608, -0.1205102875828743, -0.31562507152557373, -0.18376821279525757, 0.32532259821891785, -0.028087200596928596, -0.026879219338297844, -0.11929532140493393, -0.08291007578372955, -0.11312627792358398, 0.056021906435489655, -0.33992499113082886, -0.24335640668869019, 0.029902398586273193, 0.024314124137163162, 0.23357664048671722, 0.17532935738563538, -0.08356519788503647, -0.24794533848762512, -0.05061448737978935, 0.060971084982156754, -0.05589332804083824, 0.05688369646668434, 0.12517836689949036, -0.2686153054237366, -0.31788957118988037, 0.16740378737449646, 0.40873536467552185, -0.09793613106012344, -0.18483813107013702, 0.27618658542633057, 0.5985626578330994, -0.2991659343242645, -0.3962603211402893, -0.18160809576511383, -0.10411584377288818, 0.12906286120414734, -0.23568858206272125, 0.17175059020519257, -0.002784482669085264, -0.23090070486068726, -0.025696707889437675, 0.5132231712341309, 0.24769368767738342, 0.3112366497516632, -0.4027121067047119, 0.2516181766986847, -0.012304892763495445, -0.08680547773838043, -0.14821752905845642, -0.33737725019454956, -0.2627914547920227, 0.03733240067958832, 0.3305850028991699, -0.13446247577667236, -0.036491651087999344, 0.040744487196207047, 0.3557880222797394, -0.07353571057319641, 0.3257075846195221, -0.06443073600530624, -0.19810637831687927, -0.19068050384521484, 0.2980230748653412, 0.37408438324928284, 0.5166622996330261, -0.10923225432634354, -0.05722501128911972, 0.08503744751214981, -0.04589052125811577, -0.04900113120675087, 0.016840562224388123, -0.1722276359796524, -0.03786466270685196, 0.198848158121109, 0.04858946055173874, -0.09989828616380692, -0.18129177391529083, 0.009794548153877258, 0.056279201060533524, 0.2922278344631195, -0.23866723477840424, 0.09624148905277252, -0.5637154579162598, 0.0709877610206604, -0.2885975241661072, -0.13038353621959686, 0.007215520367026329, -0.4439607858657837, -0.21197134256362915, 0.0941520407795906, -0.23600605130195618, 0.2182343304157257, -0.1610497534275055, -0.15978217124938965, -0.15046250820159912, -0.28893718123435974, 0.09865123778581619, -0.23461346328258514, -0.2234228104352951, -0.08643988519906998, 0.12882229685783386, 0.12238095700740814, 0.2256278544664383, 0.3576846122741699, -0.4277693033218384, -0.34537526965141296, -0.28616148233413696, 0.3642108738422394, -0.167160764336586, 0.12165622413158417, 0.36457452178001404, -0.2108633816242218, -0.07228502631187439, 0.15103381872177124, 0.3195462226867676, -0.10602486878633499, -0.1192036122083664, -0.15033645927906036, 0.277375727891922, 0.02400040812790394, -0.028316324576735497, 0.014470412395894527, -0.17064280807971954, -0.057648226618766785, 0.3715692162513733, -0.15956461429595947, 0.08714565634727478, 0.16744177043437958, 0.044090721756219864, 0.2306469976902008, -0.10440907627344131, -0.2606276571750641, -0.43920302391052246, -0.09853184223175049, 0.16474352777004242, -0.1962970346212387, -0.12573979794979095, -0.03666521608829498, -0.10954618453979492, 0.16133490204811096, 0.041704341769218445, -0.23590238392353058, 0.08998007327318192, -0.004336793906986713, 0.388319194316864, -0.20898647606372833, 0.11808444559574127, 0.3752020299434662, 0.16850735247135162, 0.0596243217587471, -0.15732471644878387, -0.20618565380573273, 0.18140138685703278, 0.38659408688545227, 0.21564291417598724, 0.18958218395709991, 0.24439632892608643, 0.15978749096393585, 0.8500332832336426, 0.31933003664016724, -0.4346620738506317, 0.12059742957353592, -0.05809397995471954, -0.06442428380250931, -0.07623686641454697, -0.3137790560722351, -0.0662493035197258, -0.24335268139839172, -0.12011310458183289, -0.12522614002227783, -0.2128135710954666, 0.1224449872970581, 0.17188744246959686, 0.07384566217660904, -0.02322220243513584, -0.476381778717041, 0.184498593211174, -0.2536953091621399, 0.14348536729812622, 0.15853999555110931, 0.37904804944992065, -0.19344677031040192, 0.31325826048851013, 0.2337399274110794, -0.09904015809297562, 0.4059720039367676, 0.09167980402708054, -0.5711541175842285, -0.2006433755159378, -0.34278517961502075, 0.44404900074005127, 0.254760205745697, 0.17552658915519714, -0.09011707454919815, -0.08576270192861557, -0.14311546087265015, 0.1859128624200821, 0.3545984625816345, -0.44384101033210754, -0.031231451779603958, 0.3080913722515106, -0.16998592019081116, -0.17829056084156036, -0.08582276850938797, 0.2033347189426422, 0.6135461330413818, 0.06068398803472519, 0.5777104496955872, -0.13267245888710022, -0.0017203327734023333, -0.18484041094779968, 0.09971842914819717, -0.09730799496173859, -0.18139134347438812, -0.041636254638433456, 0.04431718960404396, -0.2571536600589752, 0.13071434199810028, 0.17882347106933594, -0.031146837398409843, 0.25152164697647095, 0.03757230564951897, -0.11305519193410873, -0.24862971901893616, -0.06708351522684097, 0.020454473793506622, 0.22220617532730103, 0.001984855392947793, 0.1563674956560135, 0.23342251777648926, -0.0332227423787117, 0.20500709116458893, 0.3170371949672699, -0.15541785955429077, 0.019160881638526917, -0.2010469287633896, 0.02379211038351059, 0.35753417015075684, 0.07553520053625107, -0.05679522454738617, 0.30185338854789734, -0.013497908599674702, -0.10008605569601059, -0.2922605574131012, 0.25888577103614807, 0.19773685932159424, 0.097498320043087, -0.13095030188560486, -0.5797994136810303, 0.061070915311574936, 0.0986432358622551, -0.17722709476947784, 0.3608715534210205, 0.042708538472652435, -0.29186245799064636, 0.2905969023704529, 0.17745010554790497, 0.8005263209342957, 0.16540591418743134, 0.014834715984761715, 0.3365233540534973, 0.1808236539363861, 0.3699224293231964, 0.23551899194717407, -0.06569357216358185, -0.3427855670452118, 0.3571147918701172, -0.18385040760040283, -0.2929324507713318, 0.002491338411346078, 0.005259879864752293, -0.191290020942688, 0.24985642731189728, -0.013108223676681519, 0.15577611327171326, -0.18240688741207123, 0.14643095433712006, 0.31415504217147827, -0.21153469383716583, -0.034584250301122665, 0.15031301975250244, -0.07391836494207382, 0.2885684370994568, -0.035755302757024765, 0.1344926804304123, -0.14748229086399078, -0.007897787727415562, -0.24406179785728455, 0.144413560628891, -0.5116115808486938, 0.3974110186100006, 0.08362817019224167, -0.08395231515169144, 0.2956174612045288, 0.08216848224401474, -0.07009703665971756, 0.16538171470165253, -0.05454304441809654, 0.12420110404491425, 0.23464126884937286, 0.2012883722782135, 0.12402145564556122, -0.33335813879966736, 0.26357170939445496, 0.22540850937366486, -0.10461999475955963, -0.003839142620563507, -0.1554676592350006, -0.22562921047210693, -0.1773543655872345, 0.2104775309562683, 0.22592033445835114, -0.3565041422843933, -0.23085545003414154, -0.03488726541399956, 0.09603200107812881, -0.19571007788181305, 0.020374152809381485, 0.12065354734659195, 0.13061918318271637, 0.23726055026054382, -0.38427725434303284, -0.15750832855701447, 0.04430648684501648, 0.4637594223022461, -0.27505385875701904, 0.2132607102394104, 0.4285076856613159, -0.0054327333346009254, -0.04312978312373161, -0.12088309973478317, 0.12676389515399933, 0.04375789687037468, 0.21061971783638, 0.162366583943367, -0.3165006637573242, -0.06293690949678421, -0.26801159977912903, 0.3825359046459198, -0.04195990040898323, -0.20746131241321564, -0.06525153666734695, -0.22407419979572296, -0.4679107069969177, -0.054444923996925354, 0.24773018062114716, 0.1402743011713028, 0.09236685931682587, 0.5768776535987854, -0.35869476199150085, 0.18367165327072144, -0.18211670219898224, 0.09477324038743973, 0.029332339763641357, 0.08528565615415573, 0.0898129940032959, 0.03728492558002472, -0.02222977764904499, -0.2665497958660126, -0.0872107669711113, 0.45016637444496155, 0.009886506013572216, -0.09261643886566162, -0.42765262722969055, 0.17318442463874817, 0.5592159032821655, -0.18240733444690704, 0.07406427711248398, -0.2170208841562271, -0.0007079424685798585, -0.35931524634361267, -0.025179240852594376, 0.27785852551460266, 0.030726132914423943, 0.2733374238014221, 0.18936362862586975, 0.116305410861969, 0.004188396967947483, -0.015499837696552277, -0.0967455580830574, -0.06437081098556519, 0.017632173374295235, 0.05479035899043083, 0.034339699894189835, -0.07344324141740799, -0.08076443523168564, 0.22193719446659088, 0.29702115058898926, 0.2084835171699524, 0.24012981355190277, -0.045540861785411835, -0.22811563313007355, -0.1336228847503662, 0.35152071714401245, 0.35704100131988525, -0.20131288468837738, -0.24378563463687897, 0.511156439781189, 0.08368044346570969, -0.09427785128355026, 0.13512606918811798, 0.2759711742401123, 0.034715332090854645, 0.23943036794662476, 0.17323718965053558, -0.23262880742549896, 0.2811647057533264, -0.4663682281970978, -0.08754229545593262, 0.2715710997581482, -0.046773601323366165, 0.04084169492125511, 0.08094357699155807, -0.18053679168224335, 0.29333996772766113, 0.27704477310180664, 0.1332242339849472, 0.33002299070358276, 0.23037151992321014, 0.09322308748960495, 0.1252531260251999, 0.1260305494070053, 0.09452274441719055, 0.19893811643123627, -0.4628060758113861, 0.32196244597435, 0.24264121055603027, -0.005586451385170221, 0.19447150826454163, 0.1545814424753189, 0.48531028628349304, -0.5250402092933655, -0.27743998169898987, 0.23163773119449615, 0.4182744324207306, -0.20757164061069489, -0.04142367094755173, -0.4448896050453186, 0.06417698413133621, -0.02327793650329113, -0.019185062497854233, -0.08467333018779755, 0.004049243405461311, 0.1793668270111084, -0.14101456105709076, -0.06083354353904724, -0.20407912135124207, -0.4670405983924866, -0.11982136964797974, 0.3051193654537201, -0.23994779586791992, -0.10561094433069229, -0.10890595614910126, 0.0585189051926136, -0.21501484513282776, -0.12643131613731384, 0.26449382305145264, 0.2069675624370575, -0.38260790705680847, -0.10495492070913315, 0.01284027099609375, 0.11485406011343002, -0.12204893678426743, 0.2308775782585144, -0.28409090638160706, -0.3314356207847595, 0.3611929416656494, -0.02685193158686161, -0.09760941565036774, -0.15022513270378113, 0.19640813767910004, 0.6410107016563416, 0.00015183407231234014, 0.23104771971702576, -0.025150736793875694, -0.03459569439291954, -0.13897311687469482, 0.05277203768491745, 0.07531477510929108, 0.16618932783603668, 0.15701405704021454, 0.14772164821624756, 0.4005224108695984, 0.004388079047203064, 0.050076697021722794, 0.0997287780046463, 0.257255882024765, 0.35555312037467957, -0.3640000820159912, -0.5150119662284851, 0.050731997936964035, -0.5516369342803955, 0.17806681990623474, -0.2801927626132965, -0.3762616515159607, -0.16202887892723083, -0.08286865055561066, 0.31118351221084595, 0.03223201259970665, -0.09385430067777634, 0.1567063182592392, 0.11198587715625763, 0.1879044473171234, 0.12259235233068466, -0.24370083212852478, -0.4694603383541107, -0.30194759368896484, 0.3355238437652588, -0.2901151478290558, 0.2659895420074463, 0.2904401421546936, -0.01633245125412941, -0.07166349142789841, -0.30887115001678467, -0.06867735087871552, 0.07463058829307556, 0.696888267993927, 0.31985437870025635, 0.18662722408771515, -0.09400440007448196, 0.09945773333311081, -0.023253658786416054, 0.20762339234352112, -0.25977882742881775, 0.17135635018348694, -0.4841795563697815, 0.3901791572570801, 0.00034638852230273187, 0.2632506787776947, -0.6178388595581055, 0.006223265081644058, 0.1685733199119568, -0.062083642929792404, -0.5151697397232056, 0.2684658169746399, -0.17149245738983154, 0.1405555009841919, -0.15226082503795624, 0.5060011148452759, -0.16236940026283264, 0.5561702251434326, -0.24207144975662231, -0.1725636124610901, 0.6069844961166382, -0.5967276096343994, -0.2871374487876892, 0.08811969310045242, -0.020446201786398888, -0.0478137731552124, -0.35172343254089355, -0.40750229358673096, -0.25453752279281616, 0.3183050751686096, -0.10058204084634781, -0.2755891680717468, -0.1272735595703125, 0.03814464434981346, 0.11818167567253113, -0.08276422321796417, 0.7448388338088989, 0.08606315404176712, -0.05791042745113373, 0.36634859442710876, -0.00875785667449236 ]
https://github.com/huggingface/datasets/issues/2516
datasets.map pickle issue resulting in invalid mapping function
I'm glad you figured something out :) Regarding hashing: we're not using hashing for the same purpose as the python `__hash__` purpose (which is in general for dictionary lookups). For example it is allowed for python hashing to not return the same hash across sessions, while our hashing must return the same hashes across sessions for the caching to work properly.
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples
61
datasets.map pickle issue resulting in invalid mapping function I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts. The following reproduces the issue - most likely I'm missing something A simulated tokeniser which can be pickled ``` class CustomTokenizer: def __init__(self): self.state = "init" def __getstate__(self): print("__getstate__ called") out = self.__dict__.copy() self.state = "pickled" return out def __setstate__(self, d): print("__setstate__ called") self.__dict__ = d self.state = "restored" tokenizer = CustomTokenizer() ``` Test that it actually works - prints "__getstate__ called" and "__setstate__ called" ``` import pickle serialized = pickle.dumps(tokenizer) restored = pickle.loads(serialized) assert restored.state == "restored" ``` Simulate a function that tokenises examples, when dataset.map is called, this function ``` def tokenize_function(examples): assert tokenizer.state == "restored" # this shouldn't fail but it does output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer return output ``` Use map to simulate tokenization ``` import glob from datasets import load_dataset assert tokenizer.state == "restored" train_files = glob.glob('train*.csv') validation_files = glob.glob('validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) tokenized_datasets = datasets.map( tokenize_function, batched=True, ) ``` What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well? --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-22-a2aef4f74aaa> in <module> 8 tokenized_datasets = datasets.map( 9 tokenize_function, ---> 10 batched=True, 11 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 487 desc=desc, 488 ) --> 489 for k, dataset in self.items() 490 } 491 ) ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc) 1633 fn_kwargs=fn_kwargs, 1634 new_fingerprint=new_fingerprint, -> 1635 desc=desc, 1636 ) 1637 else: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 184 } 185 # apply actual function --> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 188 # re-apply format to the output ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 395 # Call actual function 396 --> 397 out = func(self, *args, **kwargs) 398 399 # Update fingerprint of in-place transforms + update in-place history of transforms ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc) 1961 indices, 1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0, -> 1963 offset=offset, 1964 ) 1965 except NumExamplesMismatch: ~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1854 processed_inputs = ( -> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1856 ) 1857 if update_data is None: <ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples) 1 def tokenize_function(examples): ----> 2 assert tokenizer.state == "restored" 3 tokenizer(examples) 4 return examples I'm glad you figured something out :) Regarding hashing: we're not using hashing for the same purpose as the python `__hash__` purpose (which is in general for dictionary lookups). For example it is allowed for python hashing to not return the same hash across sessions, while our hashing must return the same hashes across sessions for the caching to work properly.
[ -0.22488734126091003, 0.19312112033367157, 0.1127530038356781, 0.028775125741958618, 0.03419579938054085, -0.32377052307128906, 0.13853639364242554, 0.19508472084999084, 0.346808522939682, -0.10001835227012634, 0.19218143820762634, 0.7253856658935547, -0.19296035170555115, 0.20866984128952026, -0.00161908776499331, 0.059579089283943176, 0.0705188438296318, -0.03540755435824394, -0.005137900356203318, -0.06401285529136658, -0.21730101108551025, 0.050916366279125214, -0.35797572135925293, 0.15361285209655762, -0.27659502625465393, -0.17681507766246796, 0.02593889646232128, 0.11868830025196075, -0.02998497150838375, -0.27113649249076843, 0.20454564690589905, -0.07879405468702316, -0.027705511078238487, 0.24116568267345428, -0.00012316943320911378, -0.08011501282453537, 0.01619364693760872, -0.08638346195220947, -0.004162499215453863, -0.21759970486164093, -0.22309590876102448, -0.12397710233926773, -0.12354390323162079, -0.2294130027294159, 0.07815724611282349, 0.002462665317580104, -0.2965724766254425, -0.38138142228126526, 0.6342014670372009, 0.4318728744983673, 0.11990705877542496, 0.36486896872520447, -0.06786814332008362, -0.034679364413022995, -0.13554894924163818, 0.31001877784729004, 0.05284783989191055, 0.223302960395813, 0.12532703578472137, -0.39181169867515564, -0.0012150539550930262, 0.09562967717647552, -0.1981259435415268, -0.21600981056690216, 0.15275079011917114, 0.059106774628162384, 0.18381048738956451, 0.010621432214975357, -0.008678345009684563, 0.09299485385417938, 0.2169976532459259, -0.35737496614456177, -0.2120290845632553, -0.3761958181858063, -0.05751387029886246, -0.15050049126148224, 0.34020355343818665, -0.21683953702449799, 0.13164880871772766, 0.14275935292243958, -0.04848417267203331, -0.10448601096868515, 0.22394081950187683, 0.3518485128879547, -0.03908213600516319, 0.25717827677726746, -0.01660947874188423, 0.3984132707118988, -0.053679224103689194, -0.10632327198982239, -0.18072597682476044, -0.1033441498875618, 0.10165431350469589, 0.45161691308021545, -0.011211344040930271, -0.23849092423915863, 0.2105509340763092, -0.21233083307743073, -0.024308189749717712, 0.21151089668273926, -0.16386432945728302, 0.12254893779754639, -0.3641282916069031, 0.26401758193969727, 0.47084030508995056, 0.22121864557266235, 0.12371264398097992, 0.6363037824630737, 0.19857057929039001, -0.16029275953769684, -0.30004552006721497, 0.07452613115310669, 0.31024834513664246, -0.10113576799631119, -0.03733976557850838, 0.17564794421195984, -0.1027165874838829, -0.1286521703004837, -0.0738532766699791, 0.27302250266075134, -0.7321614623069763, 0.008305598981678486, 0.18209092319011688, 0.12161965668201447, -0.0009523012558929622, -0.22241048514842987, -0.08313731849193573, 0.07775545120239258, -0.2158571034669876, 0.11480877548456192, -0.11857537925243378, 0.12424886971712112, -0.34277766942977905, 0.11042258143424988, -0.04326014593243599, 0.056945428252220154, 0.3175237476825714, 0.1256696581840515, -0.16883856058120728, -0.05965094268321991, 0.15125082433223724, -0.2294480949640274, 0.40169721841812134, -0.019704248756170273, -0.23601487278938293, 0.0424857996404171, 0.306940495967865, -0.44203194975852966, -0.25557491183280945, -0.059226926416158676, -0.15265673398971558, -0.14126329123973846, -0.038634903728961945, 0.03472553938627243, -0.23729616403579712, -0.004718092270195484, -0.30469051003456116, 0.10288961231708527, 0.3713429570198059, -0.20585303008556366, 0.09886566549539566, -0.5015791058540344, -0.3563106656074524, -0.20766381919384003, 0.008802086114883423, 0.17747803032398224, -0.43865102529525757, -0.24340380728244781, -0.09803219884634018, 0.15207849442958832, 0.3357070982456207, 0.12456773966550827, -0.26133888959884644, 0.6007255911827087, -0.49625009298324585, 0.8756874203681946, 0.2869647741317749, -0.14862658083438873, -0.40101128816604614, 0.03295399621129036, -0.17289471626281738, 0.23207536339759827, -0.6788752675056458, -0.1038571447134018, 0.16501542925834656, -0.07975811511278152, 0.11381687223911285, 0.33886396884918213, 0.1549205183982849, -0.09533259272575378, -0.12822012603282928, 0.0644305944442749, 0.3268658220767975, -0.28375959396362305, 0.07034888118505478, -0.009695252403616905, 0.16244390606880188, -0.2167634814977646, 0.21740300953388214, 0.034307319670915604, 0.18434280157089233, -0.11258946359157562, 0.4559537470340729, 0.17644372582435608, -0.1205102875828743, -0.31562507152557373, -0.18376821279525757, 0.32532259821891785, -0.028087200596928596, -0.026879219338297844, -0.11929532140493393, -0.08291007578372955, -0.11312627792358398, 0.056021906435489655, -0.33992499113082886, -0.24335640668869019, 0.029902398586273193, 0.024314124137163162, 0.23357664048671722, 0.17532935738563538, -0.08356519788503647, -0.24794533848762512, -0.05061448737978935, 0.060971084982156754, -0.05589332804083824, 0.05688369646668434, 0.12517836689949036, -0.2686153054237366, -0.31788957118988037, 0.16740378737449646, 0.40873536467552185, -0.09793613106012344, -0.18483813107013702, 0.27618658542633057, 0.5985626578330994, -0.2991659343242645, -0.3962603211402893, -0.18160809576511383, -0.10411584377288818, 0.12906286120414734, -0.23568858206272125, 0.17175059020519257, -0.002784482669085264, -0.23090070486068726, -0.025696707889437675, 0.5132231712341309, 0.24769368767738342, 0.3112366497516632, -0.4027121067047119, 0.2516181766986847, -0.012304892763495445, -0.08680547773838043, -0.14821752905845642, -0.33737725019454956, -0.2627914547920227, 0.03733240067958832, 0.3305850028991699, -0.13446247577667236, -0.036491651087999344, 0.040744487196207047, 0.3557880222797394, -0.07353571057319641, 0.3257075846195221, -0.06443073600530624, -0.19810637831687927, -0.19068050384521484, 0.2980230748653412, 0.37408438324928284, 0.5166622996330261, -0.10923225432634354, -0.05722501128911972, 0.08503744751214981, -0.04589052125811577, -0.04900113120675087, 0.016840562224388123, -0.1722276359796524, -0.03786466270685196, 0.198848158121109, 0.04858946055173874, -0.09989828616380692, -0.18129177391529083, 0.009794548153877258, 0.056279201060533524, 0.2922278344631195, -0.23866723477840424, 0.09624148905277252, -0.5637154579162598, 0.0709877610206604, -0.2885975241661072, -0.13038353621959686, 0.007215520367026329, -0.4439607858657837, -0.21197134256362915, 0.0941520407795906, -0.23600605130195618, 0.2182343304157257, -0.1610497534275055, -0.15978217124938965, -0.15046250820159912, -0.28893718123435974, 0.09865123778581619, -0.23461346328258514, -0.2234228104352951, -0.08643988519906998, 0.12882229685783386, 0.12238095700740814, 0.2256278544664383, 0.3576846122741699, -0.4277693033218384, -0.34537526965141296, -0.28616148233413696, 0.3642108738422394, -0.167160764336586, 0.12165622413158417, 0.36457452178001404, -0.2108633816242218, -0.07228502631187439, 0.15103381872177124, 0.3195462226867676, -0.10602486878633499, -0.1192036122083664, -0.15033645927906036, 0.277375727891922, 0.02400040812790394, -0.028316324576735497, 0.014470412395894527, -0.17064280807971954, -0.057648226618766785, 0.3715692162513733, -0.15956461429595947, 0.08714565634727478, 0.16744177043437958, 0.044090721756219864, 0.2306469976902008, -0.10440907627344131, -0.2606276571750641, -0.43920302391052246, -0.09853184223175049, 0.16474352777004242, -0.1962970346212387, -0.12573979794979095, -0.03666521608829498, -0.10954618453979492, 0.16133490204811096, 0.041704341769218445, -0.23590238392353058, 0.08998007327318192, -0.004336793906986713, 0.388319194316864, -0.20898647606372833, 0.11808444559574127, 0.3752020299434662, 0.16850735247135162, 0.0596243217587471, -0.15732471644878387, -0.20618565380573273, 0.18140138685703278, 0.38659408688545227, 0.21564291417598724, 0.18958218395709991, 0.24439632892608643, 0.15978749096393585, 0.8500332832336426, 0.31933003664016724, -0.4346620738506317, 0.12059742957353592, -0.05809397995471954, -0.06442428380250931, -0.07623686641454697, -0.3137790560722351, -0.0662493035197258, -0.24335268139839172, -0.12011310458183289, -0.12522614002227783, -0.2128135710954666, 0.1224449872970581, 0.17188744246959686, 0.07384566217660904, -0.02322220243513584, -0.476381778717041, 0.184498593211174, -0.2536953091621399, 0.14348536729812622, 0.15853999555110931, 0.37904804944992065, -0.19344677031040192, 0.31325826048851013, 0.2337399274110794, -0.09904015809297562, 0.4059720039367676, 0.09167980402708054, -0.5711541175842285, -0.2006433755159378, -0.34278517961502075, 0.44404900074005127, 0.254760205745697, 0.17552658915519714, -0.09011707454919815, -0.08576270192861557, -0.14311546087265015, 0.1859128624200821, 0.3545984625816345, -0.44384101033210754, -0.031231451779603958, 0.3080913722515106, -0.16998592019081116, -0.17829056084156036, -0.08582276850938797, 0.2033347189426422, 0.6135461330413818, 0.06068398803472519, 0.5777104496955872, -0.13267245888710022, -0.0017203327734023333, -0.18484041094779968, 0.09971842914819717, -0.09730799496173859, -0.18139134347438812, -0.041636254638433456, 0.04431718960404396, -0.2571536600589752, 0.13071434199810028, 0.17882347106933594, -0.031146837398409843, 0.25152164697647095, 0.03757230564951897, -0.11305519193410873, -0.24862971901893616, -0.06708351522684097, 0.020454473793506622, 0.22220617532730103, 0.001984855392947793, 0.1563674956560135, 0.23342251777648926, -0.0332227423787117, 0.20500709116458893, 0.3170371949672699, -0.15541785955429077, 0.019160881638526917, -0.2010469287633896, 0.02379211038351059, 0.35753417015075684, 0.07553520053625107, -0.05679522454738617, 0.30185338854789734, -0.013497908599674702, -0.10008605569601059, -0.2922605574131012, 0.25888577103614807, 0.19773685932159424, 0.097498320043087, -0.13095030188560486, -0.5797994136810303, 0.061070915311574936, 0.0986432358622551, -0.17722709476947784, 0.3608715534210205, 0.042708538472652435, -0.29186245799064636, 0.2905969023704529, 0.17745010554790497, 0.8005263209342957, 0.16540591418743134, 0.014834715984761715, 0.3365233540534973, 0.1808236539363861, 0.3699224293231964, 0.23551899194717407, -0.06569357216358185, -0.3427855670452118, 0.3571147918701172, -0.18385040760040283, -0.2929324507713318, 0.002491338411346078, 0.005259879864752293, -0.191290020942688, 0.24985642731189728, -0.013108223676681519, 0.15577611327171326, -0.18240688741207123, 0.14643095433712006, 0.31415504217147827, -0.21153469383716583, -0.034584250301122665, 0.15031301975250244, -0.07391836494207382, 0.2885684370994568, -0.035755302757024765, 0.1344926804304123, -0.14748229086399078, -0.007897787727415562, -0.24406179785728455, 0.144413560628891, -0.5116115808486938, 0.3974110186100006, 0.08362817019224167, -0.08395231515169144, 0.2956174612045288, 0.08216848224401474, -0.07009703665971756, 0.16538171470165253, -0.05454304441809654, 0.12420110404491425, 0.23464126884937286, 0.2012883722782135, 0.12402145564556122, -0.33335813879966736, 0.26357170939445496, 0.22540850937366486, -0.10461999475955963, -0.003839142620563507, -0.1554676592350006, -0.22562921047210693, -0.1773543655872345, 0.2104775309562683, 0.22592033445835114, -0.3565041422843933, -0.23085545003414154, -0.03488726541399956, 0.09603200107812881, -0.19571007788181305, 0.020374152809381485, 0.12065354734659195, 0.13061918318271637, 0.23726055026054382, -0.38427725434303284, -0.15750832855701447, 0.04430648684501648, 0.4637594223022461, -0.27505385875701904, 0.2132607102394104, 0.4285076856613159, -0.0054327333346009254, -0.04312978312373161, -0.12088309973478317, 0.12676389515399933, 0.04375789687037468, 0.21061971783638, 0.162366583943367, -0.3165006637573242, -0.06293690949678421, -0.26801159977912903, 0.3825359046459198, -0.04195990040898323, -0.20746131241321564, -0.06525153666734695, -0.22407419979572296, -0.4679107069969177, -0.054444923996925354, 0.24773018062114716, 0.1402743011713028, 0.09236685931682587, 0.5768776535987854, -0.35869476199150085, 0.18367165327072144, -0.18211670219898224, 0.09477324038743973, 0.029332339763641357, 0.08528565615415573, 0.0898129940032959, 0.03728492558002472, -0.02222977764904499, -0.2665497958660126, -0.0872107669711113, 0.45016637444496155, 0.009886506013572216, -0.09261643886566162, -0.42765262722969055, 0.17318442463874817, 0.5592159032821655, -0.18240733444690704, 0.07406427711248398, -0.2170208841562271, -0.0007079424685798585, -0.35931524634361267, -0.025179240852594376, 0.27785852551460266, 0.030726132914423943, 0.2733374238014221, 0.18936362862586975, 0.116305410861969, 0.004188396967947483, -0.015499837696552277, -0.0967455580830574, -0.06437081098556519, 0.017632173374295235, 0.05479035899043083, 0.034339699894189835, -0.07344324141740799, -0.08076443523168564, 0.22193719446659088, 0.29702115058898926, 0.2084835171699524, 0.24012981355190277, -0.045540861785411835, -0.22811563313007355, -0.1336228847503662, 0.35152071714401245, 0.35704100131988525, -0.20131288468837738, -0.24378563463687897, 0.511156439781189, 0.08368044346570969, -0.09427785128355026, 0.13512606918811798, 0.2759711742401123, 0.034715332090854645, 0.23943036794662476, 0.17323718965053558, -0.23262880742549896, 0.2811647057533264, -0.4663682281970978, -0.08754229545593262, 0.2715710997581482, -0.046773601323366165, 0.04084169492125511, 0.08094357699155807, -0.18053679168224335, 0.29333996772766113, 0.27704477310180664, 0.1332242339849472, 0.33002299070358276, 0.23037151992321014, 0.09322308748960495, 0.1252531260251999, 0.1260305494070053, 0.09452274441719055, 0.19893811643123627, -0.4628060758113861, 0.32196244597435, 0.24264121055603027, -0.005586451385170221, 0.19447150826454163, 0.1545814424753189, 0.48531028628349304, -0.5250402092933655, -0.27743998169898987, 0.23163773119449615, 0.4182744324207306, -0.20757164061069489, -0.04142367094755173, -0.4448896050453186, 0.06417698413133621, -0.02327793650329113, -0.019185062497854233, -0.08467333018779755, 0.004049243405461311, 0.1793668270111084, -0.14101456105709076, -0.06083354353904724, -0.20407912135124207, -0.4670405983924866, -0.11982136964797974, 0.3051193654537201, -0.23994779586791992, -0.10561094433069229, -0.10890595614910126, 0.0585189051926136, -0.21501484513282776, -0.12643131613731384, 0.26449382305145264, 0.2069675624370575, -0.38260790705680847, -0.10495492070913315, 0.01284027099609375, 0.11485406011343002, -0.12204893678426743, 0.2308775782585144, -0.28409090638160706, -0.3314356207847595, 0.3611929416656494, -0.02685193158686161, -0.09760941565036774, -0.15022513270378113, 0.19640813767910004, 0.6410107016563416, 0.00015183407231234014, 0.23104771971702576, -0.025150736793875694, -0.03459569439291954, -0.13897311687469482, 0.05277203768491745, 0.07531477510929108, 0.16618932783603668, 0.15701405704021454, 0.14772164821624756, 0.4005224108695984, 0.004388079047203064, 0.050076697021722794, 0.0997287780046463, 0.257255882024765, 0.35555312037467957, -0.3640000820159912, -0.5150119662284851, 0.050731997936964035, -0.5516369342803955, 0.17806681990623474, -0.2801927626132965, -0.3762616515159607, -0.16202887892723083, -0.08286865055561066, 0.31118351221084595, 0.03223201259970665, -0.09385430067777634, 0.1567063182592392, 0.11198587715625763, 0.1879044473171234, 0.12259235233068466, -0.24370083212852478, -0.4694603383541107, -0.30194759368896484, 0.3355238437652588, -0.2901151478290558, 0.2659895420074463, 0.2904401421546936, -0.01633245125412941, -0.07166349142789841, -0.30887115001678467, -0.06867735087871552, 0.07463058829307556, 0.696888267993927, 0.31985437870025635, 0.18662722408771515, -0.09400440007448196, 0.09945773333311081, -0.023253658786416054, 0.20762339234352112, -0.25977882742881775, 0.17135635018348694, -0.4841795563697815, 0.3901791572570801, 0.00034638852230273187, 0.2632506787776947, -0.6178388595581055, 0.006223265081644058, 0.1685733199119568, -0.062083642929792404, -0.5151697397232056, 0.2684658169746399, -0.17149245738983154, 0.1405555009841919, -0.15226082503795624, 0.5060011148452759, -0.16236940026283264, 0.5561702251434326, -0.24207144975662231, -0.1725636124610901, 0.6069844961166382, -0.5967276096343994, -0.2871374487876892, 0.08811969310045242, -0.020446201786398888, -0.0478137731552124, -0.35172343254089355, -0.40750229358673096, -0.25453752279281616, 0.3183050751686096, -0.10058204084634781, -0.2755891680717468, -0.1272735595703125, 0.03814464434981346, 0.11818167567253113, -0.08276422321796417, 0.7448388338088989, 0.08606315404176712, -0.05791042745113373, 0.36634859442710876, -0.00875785667449236 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
Hi ! For now this is probably the best option. We might add a feature like this in the feature as well. Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ? Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
63
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no Hi ! For now this is probably the best option. We might add a feature like this in the feature as well. Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ? Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases
[ 0.14068499207496643, -0.16548238694667816, -0.16508835554122925, 0.15400472283363342, 0.0489431768655777, 0.23949095606803894, 0.27690914273262024, 0.06343916058540344, -0.33765140175819397, 0.019205207005143166, -0.03411052003502846, 0.23469799757003784, 0.11909009516239166, 0.20621468126773834, -0.08168400824069977, 0.010252365842461586, 0.09784093499183655, 0.172718808054924, -0.08509748429059982, 0.03569130226969719, -0.07406993210315704, -0.2448657751083374, -0.2372235357761383, -0.1401374638080597, -0.4883825182914734, -0.07013203203678131, -0.37931886315345764, -0.05238478258252144, -0.18778292834758759, -0.05633211135864258, 0.17698702216148376, 0.5257619023323059, -0.01592280901968479, 0.31085941195487976, -0.00010153789480682462, -0.35723116993904114, 0.02283131144940853, 0.15965422987937927, -0.3186167776584625, 0.16422414779663086, -0.3713808059692383, -0.07322613894939423, 0.04189474880695343, -0.02572423778474331, 0.02564075216650963, -0.28024834394454956, -0.26488006114959717, -0.22341366112232208, 0.15878476202487946, 0.09408906102180481, 0.2888641357421875, -0.027758141979575157, -0.2481735348701477, -0.01616733707487583, 0.0297319944947958, 0.49351659417152405, -0.14040561020374298, 0.2517940402030945, 0.4525958001613617, -0.09405022859573364, 0.15952040255069733, 0.10836179554462433, -0.02248413674533367, 0.23510420322418213, 0.1676219254732132, -0.170230895280838, -0.20573440194129944, -0.1909145712852478, 0.20197473466396332, 0.30559271574020386, 0.7380335330963135, -0.411479651927948, -0.30872267484664917, -0.24452291429042816, 0.4246826469898224, -0.012592545710504055, -0.08077798038721085, 0.03839670866727829, -0.018862923607230186, 0.0967521220445633, -0.35414043068885803, -0.54055255651474, -0.10781587660312653, -0.207558736205101, -0.028380371630191803, -0.5066344738006592, 0.07460865378379822, -0.11458875238895416, 0.07823645323514938, -0.025959663093090057, 0.42613816261291504, -0.14968860149383545, 0.20138022303581238, 0.3944004774093628, -0.3874802887439728, -0.31271815299987793, -0.19661109149456024, -0.08395612984895706, 0.2826721966266632, 0.12052582204341888, 0.3587395250797272, -0.03939523175358772, -0.10546763986349106, 0.25168243050575256, 0.31066206097602844, 0.0013535043690353632, -0.13744604587554932, 0.03650517016649246, 0.05274248123168945, -0.20879147946834564, -0.27186068892478943, -0.10243534296751022, 0.01558765396475792, 0.23373213410377502, 0.3121538758277893, -0.07341158390045166, 0.21978509426116943, -0.31457945704460144, -0.369615375995636, 0.03950263559818268, -0.2582022547721863, -0.13382798433303833, -0.1559179723262787, -0.11586935818195343, 0.10433537513017654, -0.07423862814903259, -0.13985511660575867, -0.0562562495470047, -0.26858267188072205, -0.35360124707221985, -0.05246488004922867, 0.09230245649814606, -0.192451611161232, 0.02738119289278984, 0.33809396624565125, -0.16899056732654572, -0.045946765691041946, 0.23781506717205048, 0.17351983487606049, -0.14293895661830902, 0.30214473605155945, -0.26838943362236023, 0.05806046351790428, -0.1268218755722046, -0.19463059306144714, -0.2599048316478729, -0.17692555487155914, 0.16866624355316162, -0.06779681146144867, 0.4203226566314697, 0.12228216230869293, -0.08900907635688782, -0.026075154542922974, 0.30756834149360657, 0.03802340477705002, -0.17207786440849304, -0.26574012637138367, 0.2884066104888916, -0.1524931639432907, 0.13317030668258667, 0.0765211433172226, 0.03401021286845207, -0.012935802340507507, -0.2317592352628708, -0.06721783429384232, 0.17379586398601532, -0.4373747408390045, -0.007802457083016634, -0.19611306488513947, -0.326972097158432, -0.11530335247516632, 0.3891499638557434, -0.007587570231407881, 0.1604727953672409, 0.014076213352382183, -0.04537079483270645, 0.04633259028196335, 0.09083892405033112, -0.15029634535312653, 0.2502065896987915, -0.02824544906616211, 0.24786904454231262, -0.13194453716278076, 0.3640058636665344, 0.36632096767425537, -0.012433375231921673, 0.14156150817871094, 0.001443494576960802, -0.27788007259368896, -0.37649625539779663, -0.21611987054347992, -0.41659900546073914, 0.11947410553693771, 0.10595983266830444, 0.14780879020690918, 0.05976211652159691, 0.16662755608558655, -0.17105409502983093, 0.15538115799427032, -0.06318008154630661, -0.11823428422212601, -0.056508321315050125, 0.4424175024032593, 0.10029929131269455, 0.10014896094799042, -0.38358184695243835, -0.41974472999572754, 0.11714324355125427, -0.18400338292121887, -0.11749807000160217, 0.24601875245571136, -0.6625519394874573, 0.09030698984861374, -0.08961106836795807, -0.07946446537971497, 0.1624140739440918, 0.23748551309108734, -0.3466382622718811, 0.031168611720204353, -0.27861228585243225, -0.23571883141994476, 0.3210315406322479, -0.2857348918914795, 0.029597286134958267, -0.103114053606987, 0.3592187762260437, 0.15913549065589905, -0.01082918606698513, 0.19670863449573517, 0.3669463098049164, -0.015445109456777573, 0.12015179544687271, 0.004044541623443365, 0.10936211794614792, 0.11138956993818283, 0.046827532351017, 0.20530441403388977, 0.1967705488204956, 0.1637277603149414, -0.02498157136142254, -0.03289275988936424, 0.30013251304626465, 0.09416725486516953, 0.00906387995928526, -0.4436185359954834, 0.18905259668827057, -0.39687982201576233, -0.14337128400802612, 0.07153545320034027, -0.07114013284444809, 0.035045117139816284, -0.18692918121814728, 0.13682222366333008, -0.2567850649356842, 0.1241660937666893, 0.17115461826324463, -0.17052282392978668, 0.3658865690231323, -0.4551764726638794, 0.1549886167049408, -0.1446322500705719, -0.12763231992721558, 0.10364348441362381, -0.027899304404854774, -0.02133823186159134, -0.1337423324584961, 0.28787150979042053, 0.3261108696460724, 0.35454127192497253, 0.24291372299194336, 0.2274254709482193, 0.20563767850399017, 0.23145195841789246, 0.10315489768981934, 0.08541803061962128, -0.12050968408584595, 0.0236359853297472, -0.18025901913642883, -0.09628530591726303, 0.1669262796640396, -0.32659247517585754, 0.10674997419118881, 0.2158191204071045, 0.17357848584651947, -0.08687514811754227, -0.34501171112060547, -0.5039239525794983, -0.5576463341712952, -0.06957494467496872, 0.2795042395591736, -0.09232857823371887, 0.03390463441610336, 0.4795563519001007, 0.11935168504714966, 0.09906460344791412, -0.04229091480374336, -0.24149464070796967, 0.6234965324401855, -0.2915302515029907, 0.014295212924480438, -0.01684115268290043, -0.10141398757696152, -0.028120428323745728, 0.32107555866241455, 0.13915282487869263, 0.30408915877342224, 0.7592912316322327, 0.15774782001972198, 0.07966002821922302, -0.6362703442573547, -0.19322386384010315, -0.07858115434646606, 0.09074337780475616, 0.18426363170146942, 0.004484998993575573, 0.053058870136737823, -0.1311347633600235, 0.1233927458524704, -0.16170379519462585, -0.016722112894058228, -0.19757796823978424, -0.2556273341178894, 0.23307649791240692, 0.1756502240896225, -0.06810552626848221, -0.2742837965488434, 0.04579022526741028, -0.19809433817863464, 0.26952114701271057, -0.26222464442253113, 0.09513047337532043, -0.37550342082977295, -0.0681842491030693, -0.1175013929605484, 0.12130924314260483, 0.05280030518770218, -0.34827229380607605, -0.2078990638256073, -0.08308267593383789, 0.03974762186408043, -0.16916906833648682, -0.11804948002099991, 0.28182047605514526, -0.062263522297143936, 0.3909326195716858, -0.13279499113559723, -0.22125974297523499, 0.02761496976017952, 0.1558004468679428, 0.016326937824487686, -0.05226414278149605, 0.2613498568534851, 0.2835831940174103, -0.15113286674022675, 0.04057500511407852, -0.04367482289671898, -0.12154901027679443, 0.07416511327028275, -0.026868615299463272, 0.174027681350708, 0.22423729300498962, 0.2291262149810791, 0.3919927775859833, 0.4572182893753052, 0.01205543801188469, 0.10447072982788086, 0.10642160475254059, 0.19438764452934265, 0.01518869586288929, -0.39349693059921265, -0.06315720081329346, -0.25282323360443115, 0.15169988572597504, 0.4256209135055542, 0.1379578709602356, -0.20580890774726868, 0.029468635097146034, -0.3817225992679596, -0.23878535628318787, -0.23246581852436066, -0.08450283855199814, -0.4879083037376404, 0.34772172570228577, -0.0017104399157688022, -0.2861219644546509, 0.04418421909213066, -0.0023837171029299498, -0.09176948666572571, -0.08109234273433685, 0.2863121032714844, -0.2717479467391968, -0.27900177240371704, -0.23901081085205078, -0.17837299406528473, 0.24779461324214935, 0.1335839331150055, 0.1735505312681198, 0.030921872705221176, 0.2605939209461212, 0.1744631975889206, 0.14753174781799316, 0.44698047637939453, -0.22093231976032257, -0.2941139042377472, -0.07699412107467651, -0.15009275078773499, 0.15284501016139984, 0.18823133409023285, -0.0595770925283432, 0.19631822407245636, -0.00773834902793169, -0.00783695001155138, -0.12920056283473969, -0.23211686313152313, 0.38213619589805603, 0.39251381158828735, -0.22308635711669922, -0.30862441658973694, 0.20069029927253723, -0.15094386041164398, -0.30831125378608704, 0.11827344447374344, 0.08333022892475128, -0.20344635844230652, -0.03526501730084419, -0.2010384052991867, -0.18890781700611115, -0.05746068060398102, 0.5008255243301392, -0.19319306313991547, -0.06771177798509598, -0.05853208526968956, 0.39804917573928833, 0.012942878529429436, -0.06582707166671753, 0.5238158106803894, 0.47036033868789673, -0.2744765281677246, -0.2046435922384262, -0.43852168321609497, -0.4762161076068878, 0.4185965657234192, 0.10514847934246063, 0.05753830075263977, 0.4906478822231293, -0.176918163895607, -0.09645524621009827, -0.2603181004524231, -0.3278203010559082, 0.16100701689720154, -0.0771322175860405, -0.28669655323028564, -0.41264283657073975, 0.15691973268985748, 0.2747710943222046, -0.16965855658054352, 0.31885236501693726, 0.2740944027900696, -0.2063531130552292, 0.008220543153584003, 0.060280926525592804, 0.7813104391098022, -0.05726179480552673, -0.015208602882921696, -0.4095434844493866, -0.2641255855560303, 0.20272240042686462, 0.10191915929317474, 0.0460519939661026, 0.0212357547134161, -0.38086584210395813, -0.08666857331991196, 0.10766354203224182, 0.2176419496536255, 0.3884305953979492, 0.039284225553274155, 0.28410565853118896, -0.0924634039402008, -0.00054358592024073, 0.2943620979785919, 0.3750172555446625, 0.0731346607208252, 0.13935276865959167, 0.09926268458366394, 0.19938327372074127, 0.1266743242740631, -0.4207126796245575, -0.141389861702919, 0.17197315394878387, 0.4786083400249481, 0.055830277502536774, -0.06383782625198364, -0.35292261838912964, -0.11266395449638367, 0.2513096332550049, -0.24624331295490265, -0.16112345457077026, 0.203520268201828, -0.19796167314052582, 0.1111251562833786, 0.06543153524398804, -0.04343162849545479, -0.037481967359781265, 0.4285082519054413, 0.3341979384422302, -0.10325418412685394, -0.1048060804605484, 0.2820323705673218, -0.013926555402576923, -0.1866951435804367, 0.01770145446062088, 0.26041409373283386, -0.3278183043003082, -0.29370978474617004, 0.1115783229470253, -0.28775161504745483, -0.19489142298698425, -0.07119844853878021, -0.03619969263672829, -0.16908936202526093, -0.26396772265434265, 0.22274333238601685, 0.23211072385311127, -0.08865796774625778, 0.5801398158073425, 0.09657308459281921, 0.11455467343330383, -0.2845460772514343, 0.05146615207195282, 0.6038421988487244, -0.294262558221817, 0.020312178879976273, -0.04504312947392464, -0.3466794192790985, -0.3113831877708435, 0.04952863231301308, -0.043997906148433685, -0.12769228219985962, 0.2685387432575226, -0.23811669647693634, 0.26528674364089966, 0.23555049300193787, -0.29995086789131165, -0.10056701302528381, 0.04605097696185112, -0.09218395501375198, 0.04750154912471771, -0.20610164105892181, 0.146244078874588, 0.22922402620315552, 0.41247183084487915, 0.07089629769325256, -0.04687107726931572, -0.12855570018291473, 0.28883397579193115, -0.4000200629234314, 0.39935973286628723, 0.09455913305282593, 0.17676424980163574, 0.08244666457176208, 0.19485272467136383, -0.2577296197414398, -0.2160283327102661, 0.1403774470090866, -0.017815615981817245, 0.37046530842781067, -0.32782378792762756, -0.022552955895662308, 0.06001037731766701, -0.14766888320446014, 0.2092430293560028, 0.10082625597715378, -0.0661531612277031, -0.09863736480474472, -0.06516736000776291, 0.15381170809268951, 0.08073991537094116, 0.07218804210424423, 0.013038095086812973, 0.39847037196159363, -0.4098280966281891, -0.35089659690856934, 0.21211783587932587, 0.1171257495880127, 0.015338477678596973, 0.20298416912555695, -0.053828053176403046, 0.04072212055325508, 0.0347624346613884, -0.2113344818353653, 0.0822407677769661, 0.21768774092197418, -0.3976353704929352, 0.13522112369537354, 0.09039746969938278, -0.006513205356895924, 0.02806045301258564, 0.3131865859031677, 0.023755062371492386, -0.09548560529947281, -0.07358323037624359, 0.10230309516191483, 0.2557310461997986, -0.47351038455963135, -0.05183529481291771, 0.38169094920158386, -0.269406795501709, 0.12850379943847656, 0.32369911670684814, 0.10774517804384232, 0.30828720331192017, 0.07598837465047836, -0.14866158366203308, 0.09524694830179214, -0.3077055811882019, 0.24546970427036285, 0.1432371735572815, 0.37049615383148193, -0.24052536487579346, 0.1277177631855011, 0.14597563445568085, -0.07622342556715012, 0.2074321210384369, 0.0497039370238781, 0.24432061612606049, 0.2103809267282486, 0.08278463035821915, 0.32240697741508484, 0.0005858361255377531, 0.15281639993190765, 0.4286256432533264, -0.10785174369812012, 0.04417828097939491, 0.2797583341598511, -0.1247081458568573, 0.193839892745018, -0.13526561856269836, -0.11237581819295883, 0.1474459320306778, -0.08933958411216736, 0.15840525925159454, 0.12590210139751434, -0.24189366400241852, -0.12805594503879547, -0.023635517805814743, -0.06018145754933357, -0.09718011319637299, 0.288966566324234, -0.07416152954101562, 0.053100358694791794, -0.19786646962165833, 0.5029253959655762, 0.08637681603431702, 0.2710229158401489, -0.15008185803890228, -0.37481358647346497, 0.015113772824406624, 0.06258618086576462, 0.1371517777442932, 0.5981578230857849, 0.05852905288338661, 0.03407341241836548, -0.08152364194393158, 0.014475077390670776, -0.21620216965675354, 0.02858455292880535, 0.04674925282597542, 0.20415547490119934, -0.1509692370891571, -0.10522811859846115, -0.011582478880882263, 0.17152267694473267, -0.04473688453435898, 0.03869715705513954, 0.19641540944576263, -0.14362867176532745, -0.7924933433532715, 0.35065555572509766, 0.23319536447525024, -0.3567837178707123, 0.10864825546741486, -0.00576438196003437, -0.024692470207810402, -0.06359419226646423, 0.5445170402526855, -0.08590441942214966, -0.11506140977144241, -0.018531449139118195, 0.15198974311351776, -0.14418072998523712, 0.18150465190410614, 0.34206339716911316, 0.1265692263841629, -0.1513134390115738, -0.04637995362281799, -0.5696836113929749, -0.10186950862407684, -0.2204757183790207, 0.10269603878259659, 0.4844149053096771, 0.04412740096449852, -0.06743250042200089, 0.1358664184808731, 0.007042794954031706, -0.25460290908813477, -0.013201072812080383, 0.2133857160806656, -0.32350146770477295, -0.0227957796305418, -0.006837944034487009, -0.138300821185112, -0.10809320211410522, -0.3611948788166046, 0.15888069570064545, -0.15540070831775665, -0.008933298289775848, -0.034031789749860764, 0.04694280028343201, 0.3325406312942505, 0.15857645869255066, 0.0870799720287323, 0.07021075487136841, 0.28803640604019165, 0.18091295659542084, 0.0711492970585823, 0.15655048191547394, 0.25940069556236267, -0.21205440163612366, 0.3363722860813141, 0.3618614971637726, -0.122453473508358, -0.18583419919013977, -0.15221469104290009, 0.2615295648574829, 0.22563181817531586, -0.10410498082637787, 0.0013000158360227942, -0.20957313477993011, -0.10426678508520126, 0.06741481274366379, 0.08194238692522049, 0.08230756223201752, 0.2622487545013428, -0.2664479911327362, 0.13507552444934845, -0.21091657876968384, -0.13550980389118195, 0.133135586977005, -0.07221495360136032, -0.06302566081285477, -0.3058520555496216, 0.2632054388523102, 0.09857393801212311, -0.2345581203699112, -0.3781545162200928, -0.14967888593673706, 0.4653112292289734, -0.16931039094924927, 0.15916496515274048, 0.5180373191833496, 0.07630030810832977, -0.00000851407185109565, -0.13898466527462006, -0.006003952585160732, 0.01721082627773285, 0.09254008531570435, 0.219602569937706, -0.2579993009567261 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
Yes, I'd like to work on this feature once I'm done with #2500, but first I have to do some research, and see if the implementation wouldn't be too complex. In the meantime, maybe [this lib](https://github.com/TomScheffers/pyarrow_ops) can help. However, note that this lib operates directly on pyarrow tables and relies only on `hash` to find duplicates (e.g. `-1` and `-2` have the same hash in Python 3, so this lib will treat them as duplicates), which doesn't make much sense.
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
80
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no Yes, I'd like to work on this feature once I'm done with #2500, but first I have to do some research, and see if the implementation wouldn't be too complex. In the meantime, maybe [this lib](https://github.com/TomScheffers/pyarrow_ops) can help. However, note that this lib operates directly on pyarrow tables and relies only on `hash` to find duplicates (e.g. `-1` and `-2` have the same hash in Python 3, so this lib will treat them as duplicates), which doesn't make much sense.
[ 0.10441092401742935, 0.01838838681578636, -0.1353912502527237, 0.0949539914727211, 0.033135101199150085, 0.14071302115917206, 0.3450477421283722, 0.2536356747150421, -0.6958327293395996, 0.0018973195692524314, -0.0936519131064415, 0.37214285135269165, 0.03419315442442894, 0.1650429219007492, 0.19424119591712952, 0.02863224782049656, 0.12868312001228333, 0.24658536911010742, -0.11249551177024841, 0.11629271507263184, -0.18959085643291473, -0.22311002016067505, -0.3207569718360901, 0.03510240092873573, -0.3403730094432831, 0.01347085926681757, -0.37001895904541016, -0.04736185818910599, -0.20801278948783875, -0.22084639966487885, 0.2427174299955368, 0.5297171473503113, 0.018326707184314728, 0.21036018431186676, -0.00010626095900079235, -0.2848939895629883, 0.018051158636808395, 0.16285747289657593, -0.3009912371635437, 0.01221759244799614, -0.09742989391088486, -0.12365353852510452, 0.15035738050937653, -0.07113613933324814, 0.03992646560072899, -0.48896583914756775, -0.2355794906616211, 0.12846021354198456, 0.19143030047416687, 0.12222324311733246, 0.2542186975479126, 0.21708358824253082, -0.07217160612344742, 0.12956027686595917, 0.2810859978199005, 0.3251204192638397, -0.1984838992357254, 0.44078385829925537, 0.44953274726867676, -0.14977210760116577, 0.3157268464565277, 0.06263180822134018, -0.16246363520622253, 0.1453370898962021, 0.13733509182929993, 0.0009986867662519217, -0.13389313220977783, -0.08359234780073166, 0.03993220254778862, 0.28345465660095215, 0.552753746509552, -0.6672783493995667, -0.34177520871162415, -0.35003381967544556, 0.4291493892669678, -0.2890276312828064, -0.053208157420158386, 0.07050959020853043, -0.06238994747400284, 0.16913345456123352, -0.4275593161582947, -0.288896381855011, -0.1135680302977562, -0.055303312838077545, -0.0859844833612442, -0.24371379613876343, 0.21261177957057953, 0.004613889846950769, 0.15120898187160492, -0.022321077063679695, 0.46322712302207947, -0.07443200051784515, 0.22059467434883118, 0.4448763132095337, -0.44442448019981384, -0.22127433121204376, -0.10276829451322556, 0.1373487412929535, 0.33106428384780884, 0.1832377165555954, 0.27578186988830566, 0.03480524197220802, 0.05367475375533104, 0.21141807734966278, 0.22532260417938232, -0.00030116888228803873, -0.07162643224000931, 0.10724765062332153, -0.04848182946443558, -0.17148245871067047, -0.19034315645694733, 0.10945634543895721, 0.06881678104400635, 0.12452103942632675, 0.42258375883102417, -0.09730444103479385, 0.2560533285140991, -0.17237190902233124, -0.35651999711990356, 0.037506476044654846, -0.5191218852996826, -0.20631767809391022, -0.06850307434797287, -0.13727247714996338, 0.10913623124361038, -0.25228023529052734, -0.127927765250206, 0.09595368057489395, -0.33022594451904297, -0.2666727602481842, -0.02822578325867653, 0.07205461710691452, -0.1864466816186905, -0.0160294771194458, 0.35456398129463196, -0.2653108239173889, -0.11582738161087036, 0.29771408438682556, 0.16643013060092926, 0.052876975387334824, 0.28046080470085144, -0.0771172046661377, -0.09250813722610474, 0.002487208927050233, -0.14939779043197632, -0.23664265871047974, -0.1870189607143402, 0.06219664216041565, -0.13776493072509766, 0.522392988204956, 0.1237039864063263, -0.09236398339271545, -0.12272976338863373, 0.281255841255188, -0.14917156100273132, -0.18536439538002014, -0.151161327958107, 0.15681521594524384, -0.09475956857204437, 0.00865514948964119, 0.12227184325456619, -0.14310210943222046, 0.07373122125864029, -0.34646371006965637, -0.1126493439078331, 0.06481295824050903, -0.467002272605896, -0.05629744008183479, -0.06849080324172974, -0.2799329459667206, -0.1742830127477646, 0.3257150948047638, -0.05798014625906944, 0.19043588638305664, 0.13094282150268555, 0.09745801985263824, 0.009212866425514221, 0.09784814715385437, -0.26939043402671814, 0.030833162367343903, 0.004631795454770327, 0.24817876517772675, -0.14552490413188934, 0.2779865562915802, 0.33454442024230957, -0.04854733869433403, 0.006109402980655432, 0.020881056785583496, -0.22293439507484436, -0.4015348255634308, -0.1754588931798935, -0.3120459318161011, 0.24020692706108093, 0.2327382117509842, 0.011830874718725681, -0.12964555621147156, 0.1328345239162445, -0.36759817600250244, 0.3119073212146759, -0.1483108103275299, -0.1385406106710434, -0.19387416541576385, 0.4634329080581665, 0.08241555839776993, 0.13292591273784637, -0.3347443640232086, -0.44171249866485596, 0.1908193826675415, -0.3296414315700531, -0.06249943748116493, -0.06730978190898895, -0.6913439035415649, 0.04008524492383003, 0.04452136158943176, -0.11228737980127335, 0.20887893438339233, 0.17109908163547516, -0.4651971757411957, 0.10419870167970657, -0.20039182901382446, -0.39636531472206116, 0.15346290171146393, -0.22867442667484283, 0.21428687870502472, -0.08424297720193863, 0.4892994165420532, 0.03660276532173157, -0.1764853298664093, 0.06901818513870239, 0.40561801195144653, 0.04764691740274429, 0.06492642313241959, 0.19949205219745636, 0.20822171866893768, -0.10046442598104477, -0.09535374492406845, -0.03119329735636711, 0.23002898693084717, 0.14096702635288239, 0.00569960568100214, -0.05795980617403984, 0.17896491289138794, 0.026816992089152336, 0.06310506910085678, -0.37330690026283264, 0.4113069772720337, -0.3832029104232788, -0.15378260612487793, 0.01860256865620613, -0.12283779680728912, -0.07437217980623245, -0.15075789391994476, 0.1481107771396637, -0.1434399038553238, 0.15852269530296326, 0.30841249227523804, -0.10173430293798447, 0.37476614117622375, -0.35401245951652527, 0.2607422471046448, -0.14755547046661377, -0.2778930068016052, 0.12605871260166168, 0.007866433821618557, 0.06482286006212234, -0.04560873284935951, 0.22051221132278442, 0.1937393695116043, 0.29556694626808167, 0.23320676386356354, 0.1198238804936409, 0.27882254123687744, 0.04006372392177582, 0.09928814321756363, 0.08584429323673248, -0.11987358331680298, 0.009249759837985039, -0.1813761293888092, 0.022215602919459343, 0.23179177939891815, -0.36268913745880127, 0.1437011957168579, 0.20261980593204498, 0.2773588299751282, -0.22062796354293823, -0.19106823205947876, -0.5655444860458374, -0.45315730571746826, -0.07620297372341156, 0.04535970836877823, -0.17805559933185577, 0.09151715785264969, 0.5150851011276245, 0.10386011004447937, 0.013792473822832108, 0.11036258190870285, -0.07464144378900528, 0.394148051738739, -0.27928173542022705, -0.03947456181049347, -0.13176394999027252, -0.17659956216812134, 0.020345283672213554, 0.27727124094963074, 0.1195710152387619, 0.10935591161251068, 0.5857252478599548, 0.07443507015705109, 0.06959614902734756, -0.6109537482261658, -0.29836809635162354, -0.03113652393221855, 0.03726748749613762, 0.14954227209091187, 0.08542249351739883, -0.027060694992542267, -0.3043859899044037, 0.03254999965429306, -0.041754432022571564, -0.09850489348173141, -0.19365665316581726, -0.10428635030984879, 0.13570411503314972, 0.2669229507446289, -0.13132847845554352, -0.24558433890342712, -0.11220405995845795, -0.005250419955700636, 0.3367559313774109, -0.11366501450538635, 0.1626638025045395, -0.30239391326904297, 0.016721466556191444, -0.13215263187885284, -0.0836811289191246, -0.12810061872005463, -0.2123141586780548, -0.28691351413726807, 0.021360361948609352, 0.01625574752688408, -0.14658361673355103, -0.15331241488456726, 0.18514138460159302, -0.2005358189344406, 0.40181592106819153, 0.011475701816380024, -0.3118756413459778, 0.1534091681241989, 0.5076433420181274, 0.04891534149646759, 0.05206736922264099, 0.3560238778591156, 0.35353121161460876, -0.07410094141960144, 0.02465055324137211, 0.031023452058434486, -0.15917663276195526, 0.16339410841464996, 0.002598887076601386, 0.07697714120149612, 0.1382024586200714, 0.28605756163597107, 0.47218671441078186, 0.20668859779834747, -0.09520269185304642, 0.12651054561138153, -0.06937327235937119, 0.21815423667430878, 0.04555787891149521, -0.31024032831192017, -0.16627024114131927, -0.30742135643959045, 0.18747922778129578, 0.4478248655796051, 0.17488083243370056, -0.23377466201782227, 0.1441049575805664, -0.23321127891540527, -0.5569918155670166, -0.21964137256145477, -0.0079383859410882, -0.16780254244804382, 0.32602423429489136, 0.08460358530282974, -0.3632078468799591, 0.009063901379704475, -0.1497916728258133, -0.09404420852661133, -0.1068410873413086, 0.2615230977535248, -0.2522053122520447, -0.15102019906044006, -0.42401862144470215, -0.12470335513353348, 0.2552506923675537, 0.1949155628681183, -0.07510723173618317, 0.20088820159435272, 0.18266737461090088, 0.2519545555114746, 0.09843327105045319, 0.6468616724014282, -0.1492334008216858, -0.2107221931219101, -0.06038571521639824, 0.010938090272247791, -0.05721355974674225, 0.0634218156337738, -0.07636965811252594, 0.06608457118272781, -0.09499131143093109, -0.11924469470977783, -0.19997696578502655, -0.08218611776828766, 0.5210835337638855, 0.39125415682792664, -0.1593157798051834, -0.35968002676963806, 0.03580361232161522, -0.3132455348968506, -0.2835782766342163, 0.11391671001911163, 0.021758271381258965, -0.05577728524804115, -0.09765816479921341, 0.05255076289176941, -0.016430629417300224, 0.030041517689824104, 0.37277963757514954, -0.08675742894411087, -0.005588158033788204, -0.09234663844108582, 0.2851482629776001, 0.05046583712100983, -0.23624500632286072, 0.5697203874588013, 0.49871018528938293, -0.15595711767673492, -0.2272203266620636, -0.5975428223609924, -0.407441645860672, 0.40836799144744873, 0.05448612570762634, 0.011114840395748615, 0.4816342294216156, -0.2928215563297272, -0.0611237958073616, 0.01855606958270073, -0.4915015697479248, 0.19854572415351868, -0.14837895333766937, -0.2121211141347885, -0.28901153802871704, 0.29514119029045105, 0.24909380078315735, -0.19994981586933136, 0.0702202171087265, 0.2622959315776825, -0.17592045664787292, 0.1031375452876091, 0.026872817426919937, 0.8997116088867188, -0.15378686785697937, 0.03913899511098862, -0.12919023633003235, -0.27648526430130005, 0.3032194972038269, -0.05982694402337074, 0.04545721411705017, -0.18901614844799042, -0.26739823818206787, -0.07786460220813751, 0.09257672727108002, 0.2458871454000473, 0.4782503843307495, 0.11299814283847809, 0.1543111503124237, -0.13175401091575623, 0.14197306334972382, 0.3370569050312042, 0.21298404037952423, 0.03252773731946945, 0.1623697727918625, -0.169706329703331, 0.1479339748620987, 0.12161516398191452, -0.44523534178733826, -0.18772046267986298, 0.16765183210372925, 0.3555830717086792, -0.0666627362370491, 0.04452736675739288, -0.31741589307785034, -0.03476106375455856, 0.24463459849357605, -0.007186264265328646, -0.30550771951675415, -0.017085015773773193, -0.08739960193634033, 0.023243730887770653, -0.14316464960575104, 0.03865618258714676, -0.022484758868813515, 0.4205988347530365, 0.4071328043937683, 0.029815776273608208, -0.0848461464047432, 0.257012277841568, 0.009452748112380505, -0.2883400619029999, 0.09977377951145172, 0.34971505403518677, -0.3559153378009796, -0.21471890807151794, 0.1591344028711319, -0.21842241287231445, -0.18049585819244385, 0.15517204999923706, -0.07124031335115433, -0.05805864557623863, -0.3316577970981598, 0.1704319566488266, 0.1180436760187149, -0.0996864065527916, 0.6222677230834961, -0.14515703916549683, 0.07753866910934448, -0.2983396649360657, 0.032479796558618546, 0.5118440389633179, -0.2031547874212265, -0.0017206183401867747, 0.11073791980743408, -0.31599918007850647, -0.18275129795074463, 0.2060249149799347, -0.00382026843726635, -0.34404876828193665, 0.11511991173028946, -0.08653193712234497, 0.4295634329319, 0.2392296940088272, -0.22747661173343658, -0.09827382117509842, 0.01130923256278038, -0.07163574546575546, 0.018730465322732925, -0.11991520971059799, 0.1719381958246231, 0.4926503598690033, 0.27914121747016907, 0.18936213850975037, 0.225490540266037, -0.010536378249526024, 0.1215110570192337, -0.3703795373439789, 0.44814249873161316, 0.10958047211170197, 0.3079472780227661, -0.0832730159163475, 0.15839119255542755, -0.2954144775867462, -0.34570226073265076, 0.1549721509218216, 0.020154470577836037, 0.3334087133407593, -0.33548787236213684, -0.11860981583595276, 0.07781828939914703, -0.11219774186611176, 0.1648177206516266, 0.1211889311671257, 0.07086305320262909, 0.031024659052491188, -0.006448220461606979, 0.1450165957212448, 0.19542023539543152, 0.1516328603029251, 0.021990597248077393, 0.6954910159111023, -0.3684905469417572, -0.3162461817264557, 0.04670880362391472, -0.10046049952507019, -0.008543519303202629, 0.2305116504430771, 0.0072729019448161125, -0.08766791224479675, 0.1252838373184204, 0.05932292342185974, -0.029662784188985825, 0.16545002162456512, -0.42296814918518066, 0.24783062934875488, -0.06880321353673935, -0.12744569778442383, -0.15670202672481537, 0.5310272574424744, -0.019212976098060608, -0.13775664567947388, -0.13619013130664825, 0.18653510510921478, 0.21133539080619812, -0.5376396179199219, -0.07724306732416153, 0.3420597016811371, -0.16565561294555664, 0.0484611913561821, 0.30493226647377014, 0.03207608312368393, 0.21976356208324432, -0.018464483320713043, -0.08354528248310089, 0.2788001596927643, -0.14966052770614624, 0.13791947066783905, 0.24001288414001465, 0.28256210684776306, -0.21722333133220673, 0.28840190172195435, 0.04955647513270378, -0.05386079102754593, 0.13684651255607605, -0.11090477555990219, 0.1620570421218872, 0.05653867870569229, 0.01298376265913248, 0.27990296483039856, 0.01693347655236721, 0.061624493449926376, 0.24465617537498474, 0.043448492884635925, -0.09717636555433273, 0.3055139482021332, 0.15654289722442627, 0.34163907170295715, -0.026482822373509407, 0.021728504449129105, 0.2720404267311096, 0.0625353679060936, 0.1540866494178772, -0.07408049702644348, -0.21361979842185974, -0.07821838557720184, -0.06460358202457428, -0.1890469193458557, -0.31066322326660156, 0.3977767527103424, 0.1065496876835823, 0.12598179280757904, -0.38964420557022095, 0.3826608955860138, -0.07355482131242752, 0.21799764037132263, -0.08608084917068481, -0.35784098505973816, 0.19430428743362427, -0.0324578694999218, 0.08803892880678177, 0.4262213408946991, 0.24879994988441467, -0.04392736032605171, -0.2069271355867386, 0.049228236079216, -0.45957598090171814, 0.12204597145318985, 0.07603640109300613, 0.1318109780550003, -0.07490913569927216, -0.01744401641190052, -0.12944793701171875, 0.16880172491073608, -0.07436712831258774, 0.10674797743558884, 0.22906765341758728, -0.10148020833730698, -0.7163106203079224, 0.19474957883358002, 0.21688488125801086, -0.43720486760139465, 0.21042655408382416, -0.06657847762107849, -0.06752989441156387, -0.0037528984248638153, 0.43380048871040344, 0.1405685544013977, -0.15212216973304749, -0.05159592255949974, 0.10710647702217102, -0.017961664125323296, 0.2052423655986786, 0.3779186010360718, 0.18355658650398254, -0.21553249657154083, 0.01328972727060318, -0.5778458118438721, -0.06912882626056671, -0.41579964756965637, 0.02958797477185726, 0.5652519464492798, -0.04844789206981659, -0.048468492925167084, 0.30985701084136963, 0.07990798354148865, 0.013831833377480507, -0.1534743756055832, 0.26666027307510376, -0.300799161195755, -0.02902984619140625, -0.06547825783491135, -0.13260193169116974, -0.21077510714530945, -0.2510818541049957, 0.18139728903770447, -0.38368213176727295, -0.017537211999297142, -0.24161595106124878, -0.05661355331540108, 0.45301035046577454, 0.14865964651107788, 0.2132156640291214, 0.034243930131196976, 0.40561896562576294, 0.26094555854797363, 0.06366592645645142, 0.18524688482284546, 0.17117716372013092, -0.24304626882076263, 0.47069278359413147, 0.16660743951797485, -0.17853136360645294, -0.06177402287721634, -0.33755096793174744, 0.24450522661209106, 0.26030778884887695, -0.11949743330478668, 0.06886360049247742, -0.11944074183702469, -0.13587598502635956, 0.11321742832660675, 0.08880741149187088, -0.15498220920562744, 0.1614750623703003, -0.24819707870483398, 0.3061467409133911, -0.22630275785923004, -0.30503854155540466, 0.23268243670463562, -0.2734934985637665, -0.034900788217782974, -0.2624465823173523, 0.17665797472000122, -0.06430064886808395, -0.23010675609111786, -0.36502382159233093, -0.10188033431768417, 0.4784153699874878, -0.07846055179834366, 0.12061087042093277, 0.4608333706855774, 0.03311384841799736, -0.03992040455341339, -0.09325172007083893, -0.05370310693979263, -0.03451067581772804, 0.11753743141889572, 0.101629838347435, -0.35631972551345825 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
> Hi ! For now this is probably the best option. > We might add a feature like this in the feature as well. > > Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ? > Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases Great if this is can be done. Thanks!! Not sure if you are asking me. In any case I don't know of any unfortunately :( in practice if data is really large we normally do it with spark (only for info. I understand this is not useful in developing this library..)
**Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no
119
Can datasets remove duplicated rows? **Is your feature request related to a problem? Please describe.** i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that.. **Describe the solution you'd like** have a functionality of " remove duplicated rows" **Describe alternatives you've considered** convert dataset to pandas, remove duplicate, and convert back... **Additional context** no > Hi ! For now this is probably the best option. > We might add a feature like this in the feature as well. > > Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ? > Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases Great if this is can be done. Thanks!! Not sure if you are asking me. In any case I don't know of any unfortunately :( in practice if data is really large we normally do it with spark (only for info. I understand this is not useful in developing this library..)
[ 0.10129871219396591, -0.19105306267738342, -0.13927024602890015, 0.28646939992904663, 0.07518839836120605, 0.20366136729717255, 0.2715584337711334, 0.09866946190595627, -0.33350053429603577, -0.016334347426891327, -0.0008099075639620423, 0.28262972831726074, 0.040186598896980286, 0.19777171313762665, -0.024946311488747597, -0.029798518866300583, 0.10263398289680481, 0.13065291941165924, -0.10367248952388763, 0.05012543499469757, -0.02565865032374859, -0.1465701311826706, -0.270499587059021, -0.1782129406929016, -0.44711047410964966, -0.06171198561787605, -0.48296597599983215, -0.058831311762332916, -0.15877901017665863, 0.01862441375851631, 0.24961690604686737, 0.5069916248321533, 0.008140557445585728, 0.3449679911136627, -0.00010656906670192257, -0.4029149115085602, -0.007138937246054411, 0.11328881978988647, -0.19676794111728668, 0.057706013321876526, -0.20645485818386078, -0.03783619403839111, 0.081113301217556, -0.09239139407873154, 0.0455436147749424, -0.27103978395462036, -0.30923494696617126, -0.2610730528831482, 0.1535584032535553, 0.07555084675550461, 0.25749272108078003, -0.06424012035131454, -0.2274293601512909, 0.042754437774419785, 0.19631120562553406, 0.5021438598632812, -0.1407865285873413, 0.298849880695343, 0.5304869413375854, -0.04459528625011444, 0.14335377514362335, 0.06729939579963684, -0.11134888976812363, 0.13866464793682098, 0.2907043397426605, -0.19523216784000397, -0.29260122776031494, -0.19283434748649597, 0.20410792529582977, 0.32462838292121887, 0.8173852562904358, -0.49106261134147644, -0.2823202908039093, -0.1588139832019806, 0.4048904478549957, 0.03921124339103699, -0.08834704011678696, 0.09934266656637192, -0.008549668826162815, 0.06957472860813141, -0.35320013761520386, -0.5799799561500549, -0.16400104761123657, -0.18281258642673492, 0.07339361310005188, -0.44175800681114197, 0.09955170750617981, -0.04482276365160942, 0.18412166833877563, -0.07819242775440216, 0.38137704133987427, -0.1632513403892517, 0.15930350124835968, 0.4425400197505951, -0.4141802191734314, -0.3620016276836395, -0.20039770007133484, -0.09434138983488083, 0.32966920733451843, 0.1987355351448059, 0.34667566418647766, -0.0675840899348259, -0.11328622698783875, 0.27218201756477356, 0.3223300576210022, 0.01959698460996151, -0.15584003925323486, 0.011316968128085136, 0.11283466219902039, -0.19933822751045227, -0.26044923067092896, -0.041546229273080826, -0.03004523552954197, 0.22800764441490173, 0.30021169781684875, -0.0754929929971695, 0.07759249955415726, -0.39002519845962524, -0.2964452803134918, 0.09314906597137451, -0.29866039752960205, -0.14956477284431458, -0.09941546618938446, -0.12950147688388824, 0.08681436628103256, -0.1445709764957428, -0.06615439802408218, -0.15513363480567932, -0.29720786213874817, -0.22714966535568237, -0.025630317628383636, 0.15973059833049774, -0.22350376844406128, -0.006686423439532518, 0.3262162506580353, -0.2521711587905884, -0.057528432458639145, 0.24209055304527283, 0.19992926716804504, -0.13018590211868286, 0.34195369482040405, -0.28482702374458313, 0.08347532898187637, -0.09065648913383484, -0.25679245591163635, -0.25230351090431213, -0.20645976066589355, 0.14171265065670013, -0.09167703241109848, 0.4854808747768402, 0.12968100607395172, -0.09322763979434967, -0.1475786566734314, 0.2590629756450653, -0.046709150075912476, -0.10655232518911362, -0.2730347514152527, 0.24720120429992676, -0.13629025220870972, 0.014916373416781425, 0.1113038882613182, -0.00925031304359436, 0.11344791948795319, -0.29674944281578064, -0.04823337122797966, 0.20494715869426727, -0.5000967979431152, 0.04299304634332657, -0.17765764892101288, -0.2942425012588501, -0.09860873222351074, 0.4649658203125, -0.05013742670416832, 0.056442998349666595, 0.013820528984069824, -0.07341523468494415, 0.08005069941282272, 0.07238683104515076, -0.16464288532733917, 0.338524729013443, 0.01675437018275261, 0.1923590451478958, -0.1407323032617569, 0.44064629077911377, 0.3836035132408142, -0.0312124602496624, 0.10317721962928772, 0.0156770758330822, -0.2498229593038559, -0.38834497332572937, -0.23448432981967926, -0.46166038513183594, 0.21573685109615326, 0.09393972903490067, 0.14876782894134521, -0.0323660783469677, 0.19577570259571075, -0.09638680517673492, 0.18393652141094208, -0.06874038279056549, -0.09467179328203201, -0.0008342528017237782, 0.448630690574646, 0.1039019450545311, 0.1751071959733963, -0.3972979187965393, -0.37107422947883606, 0.0808524414896965, -0.19254277646541595, -0.10537293553352356, 0.2508816123008728, -0.657538652420044, 0.17105329036712646, -0.11750823259353638, -0.022081395611166954, 0.12457592040300369, 0.129258930683136, -0.4144189953804016, 0.0347936674952507, -0.3078159689903259, -0.2813328504562378, 0.22985152900218964, -0.3113637864589691, 0.03247532993555069, -0.22534899413585663, 0.4157767593860626, 0.17452099919319153, -0.017905602231621742, 0.19032803177833557, 0.36612045764923096, -0.03459939733147621, 0.07537790387868881, -0.009381219744682312, 0.10280320048332214, 0.14763164520263672, -0.0036965887993574142, 0.18747098743915558, 0.2373097985982895, 0.21511287987232208, -0.07311622053384781, 0.011031116358935833, 0.331247478723526, 0.1400052309036255, -0.022834232077002525, -0.4782252013683319, 0.1685679852962494, -0.5081926584243774, -0.14619548618793488, 0.0462404303252697, -0.08865524083375931, 0.020186908543109894, -0.16400352120399475, 0.17152412235736847, -0.12825103104114532, 0.1904502809047699, 0.16972659528255463, -0.12960301339626312, 0.38157397508621216, -0.447543740272522, 0.06418231129646301, -0.14063377678394318, -0.11855398118495941, 0.03777970373630524, 0.04182731360197067, -0.018564345315098763, -0.11509951949119568, 0.3880046606063843, 0.31940364837646484, 0.38597914576530457, 0.20761799812316895, 0.16284698247909546, 0.2141687572002411, 0.31353312730789185, 0.09563516080379486, 0.10160933434963226, -0.10035093873739243, 0.007190557662397623, -0.18432171642780304, -0.10233799368143082, 0.21576489508152008, -0.34737950563430786, 0.011186514049768448, 0.2527470886707306, 0.20585861802101135, -0.046260420233011246, -0.29688650369644165, -0.5272916555404663, -0.6229698061943054, -0.10584917664527893, 0.25582975149154663, -0.178913414478302, 0.15306194126605988, 0.42575594782829285, 0.122029609978199, 0.12689639627933502, -0.04637964442372322, -0.11357616633176804, 0.6114587783813477, -0.29473012685775757, -0.11774812638759613, -0.057832278311252594, -0.0651276633143425, -0.01941458135843277, 0.27633777260780334, 0.1898471713066101, 0.3241822123527527, 0.7310891151428223, 0.28176018595695496, 0.10691626369953156, -0.6828424334526062, -0.31009918451309204, -0.15484124422073364, 0.022071050480008125, 0.21221663057804108, 0.10460799932479858, 0.007358825299888849, -0.1370043307542801, 0.0865819975733757, -0.18913878500461578, -0.03571586310863495, -0.1473560780286789, -0.2665335237979889, 0.20265698432922363, 0.18014082312583923, -0.19817012548446655, -0.27604958415031433, -0.006243410054594278, -0.22331678867340088, 0.3453076183795929, -0.21871234476566315, 0.161830335855484, -0.4644887149333954, -0.08773096650838852, -0.07009303569793701, 0.17997299134731293, 0.013425629585981369, -0.28044140338897705, -0.27592697739601135, -0.037496212869882584, 0.059081465005874634, -0.20524083077907562, -0.09427832067012787, 0.2906416952610016, -0.01659889705479145, 0.359182208776474, -0.2501956820487976, -0.2154519110918045, 0.05089524760842323, 0.1491319239139557, 0.05744350701570511, -0.006402649451047182, 0.24118071794509888, 0.22586539387702942, -0.06416905671358109, 0.04767410457134247, -0.1351563036441803, -0.10798811912536621, 0.07968508452177048, 0.09205891937017441, 0.21044878661632538, 0.2346978485584259, 0.18688645958900452, 0.398666650056839, 0.43639445304870605, -0.030467089265584946, 0.10083302110433578, 0.1341678351163864, 0.1313815712928772, -0.004236132837831974, -0.3950914740562439, -0.02406039461493492, -0.28112512826919556, 0.07781092822551727, 0.4160500168800354, 0.17267653346061707, -0.2761065661907196, 0.010827586054801941, -0.43553629517555237, -0.17434227466583252, -0.20665782690048218, -0.08302609622478485, -0.5281800627708435, 0.2518496513366699, -0.058476824313402176, -0.2659347951412201, 0.021899260580539703, -0.06754469126462936, -0.09276309609413147, 0.015309183858335018, 0.3267207145690918, -0.23188036680221558, -0.1968442052602768, -0.31754860281944275, -0.1894104927778244, 0.24901729822158813, 0.12734031677246094, 0.12606821954250336, 0.0645545944571495, 0.28629037737846375, 0.28490638732910156, 0.09445340931415558, 0.5072614550590515, -0.1550370156764984, -0.37474435567855835, -0.029764406383037567, -0.19183334708213806, 0.14236034452915192, 0.1936911642551422, -0.03454246744513512, 0.15906348824501038, 0.04623090848326683, 0.010422056540846825, -0.2269628942012787, -0.22461220622062683, 0.3740513324737549, 0.42230379581451416, -0.20488061010837555, -0.3847649395465851, 0.2303042858839035, -0.2099766731262207, -0.38562506437301636, 0.1169314906001091, -0.0015918909339234233, -0.18183749914169312, -0.05451270192861557, -0.23089352250099182, -0.0752635970711708, -0.05349348485469818, 0.553411066532135, -0.24944716691970825, -0.045238129794597626, -0.1618761271238327, 0.4126780331134796, -0.04619152098894119, -0.0647726058959961, 0.5135990381240845, 0.4399627447128296, -0.2340792417526245, -0.09550666064023972, -0.3327075242996216, -0.4687213897705078, 0.41544079780578613, 0.06326019018888474, -0.010544738732278347, 0.6419351696968079, -0.20695503056049347, -0.10504572093486786, -0.19515486061573029, -0.36307644844055176, 0.1463475227355957, -0.06161976233124733, -0.298764169216156, -0.4916353225708008, 0.17424838244915009, 0.2544904947280884, -0.154475599527359, 0.40540528297424316, 0.20267575979232788, -0.13840150833129883, 0.0683060809969902, 0.06263525784015656, 0.8880190849304199, -0.13154467940330505, -0.021064409986138344, -0.5048201680183411, -0.21820197999477386, 0.32032954692840576, 0.11012391746044159, 0.036902062594890594, -0.15330000221729279, -0.3402651250362396, -0.0973493680357933, 0.08671111613512039, 0.24989545345306396, 0.3294866681098938, 0.03193508833646774, 0.2788453698158264, -0.06345617771148682, -0.01705387979745865, 0.20266345143318176, 0.4478134512901306, 0.04203299805521965, 0.1184317022562027, 0.02729787677526474, 0.15201176702976227, 0.08432886004447937, -0.3738180696964264, -0.15543122589588165, 0.11787847429513931, 0.49241185188293457, -0.014302381314337254, -0.1616538017988205, -0.3362332582473755, -0.06611178070306778, 0.303823322057724, -0.1971488893032074, -0.18460245430469513, 0.29875048995018005, -0.17567139863967896, 0.0282928254455328, 0.1860213577747345, -0.04973665252327919, -0.033816203474998474, 0.37427154183387756, 0.3428647518157959, -0.04488816484808922, -0.03471611067652702, 0.3155069649219513, -0.024045158177614212, -0.17757317423820496, 0.03288613632321358, 0.2792315185070038, -0.43030086159706116, -0.20209568738937378, 0.10699556022882462, -0.14548629522323608, -0.15057532489299774, -0.08169926702976227, 0.0012094858102500439, -0.2756046950817108, -0.2018071711063385, 0.16827833652496338, 0.30914756655693054, -0.08424872905015945, 0.6608373522758484, 0.06790095567703247, 0.08439440280199051, -0.32402467727661133, 0.08018185198307037, 0.616825520992279, -0.34809231758117676, -0.01584584265947342, 0.07646780461072922, -0.35897302627563477, -0.27947473526000977, 0.04171315208077431, -0.15069985389709473, -0.21339184045791626, 0.2705879509449005, -0.2612150311470032, 0.29857736825942993, 0.2992023527622223, -0.30481794476509094, -0.06826665252447128, 0.11923518776893616, -0.08297621458768845, 0.04526550695300102, -0.30977290868759155, 0.115244559943676, 0.16272257268428802, 0.4415407180786133, 0.13041740655899048, -0.09596764296293259, -0.11385879665613174, 0.30057013034820557, -0.34385019540786743, 0.4714668095111847, 0.06884822249412537, 0.19049371778964996, 0.07829855382442474, 0.2368115782737732, -0.3214195966720581, -0.18110492825508118, 0.06663896888494492, 0.07949180901050568, 0.38104528188705444, -0.2554198205471039, -0.07925809174776077, 0.09592778980731964, -0.17769424617290497, 0.18489697575569153, 0.06978689134120941, -0.15653374791145325, -0.12528811395168304, -0.04966892674565315, 0.2326224148273468, 0.042848892509937286, 0.07938637584447861, -0.06354697048664093, 0.41344693303108215, -0.45363399386405945, -0.4365440011024475, 0.25880560278892517, 0.11934415251016617, 0.031615547835826874, 0.20708619058132172, -0.054318323731422424, 0.09824802726507187, -0.027325723320245743, -0.27769696712493896, 0.07227150350809097, 0.21296212077140808, -0.4306279122829437, 0.21429353952407837, 0.1544848382472992, -0.025642361491918564, -0.0029883384704589844, 0.34907066822052, 0.055706147104501724, -0.01636786200106144, -0.06797940284013748, 0.13780924677848816, 0.17613422870635986, -0.42828577756881714, -0.07417387515306473, 0.3166077733039856, -0.17872345447540283, 0.012357021681964397, 0.2967844307422638, 0.09645961225032806, 0.3377547860145569, 0.0042387028224766254, -0.15605317056179047, 0.18864880502223969, -0.2589983344078064, 0.22076810896396637, 0.19897738099098206, 0.2766292989253998, -0.23985978960990906, 0.17411983013153076, 0.14630699157714844, -0.042025692760944366, 0.23557986319065094, 0.04159338027238846, 0.2634003460407257, 0.3026794493198395, 0.04521075636148453, 0.3227913975715637, -0.03493276983499527, 0.07398531585931778, 0.44282492995262146, 0.06829138100147247, 0.05804067105054855, 0.2874361574649811, -0.06833935528993607, 0.23847006261348724, -0.1309802085161209, -0.0871748998761177, 0.23523764312267303, -0.056508906185626984, 0.19072774052619934, 0.14858657121658325, -0.20841963589191437, -0.15046389400959015, -0.008080953732132912, -0.13951385021209717, -0.055951379239559174, 0.3512403666973114, -0.015634411945939064, 0.10960052907466888, -0.21977713704109192, 0.5052935481071472, 0.026691146194934845, 0.2342054694890976, -0.18776440620422363, -0.31793197989463806, 0.07193703204393387, 0.07764974981546402, 0.11119939386844635, 0.47497016191482544, 0.06329338252544403, 0.02717115357518196, -0.057073503732681274, -0.033196717500686646, -0.276020348072052, 0.12774617969989777, 0.10487138479948044, 0.3314172625541687, -0.10794569551944733, -0.0018260033102706075, 0.030067699030041695, 0.09674087166786194, -0.005343856755644083, 0.08939005434513092, 0.183160662651062, -0.09310392290353775, -0.7865316271781921, 0.3493582308292389, 0.2298717349767685, -0.3472643792629242, 0.022521601989865303, 0.00562118086963892, -0.05175745114684105, -0.10727394372224808, 0.5509380102157593, -0.0814046710729599, -0.14377768337726593, -0.051346175372600555, 0.11843359470367432, -0.2014712244272232, 0.24285529553890228, 0.3888442814350128, 0.15311186015605927, -0.18226715922355652, -0.07707381248474121, -0.6075683832168579, -0.10028444230556488, -0.1485254168510437, 0.20649804174900055, 0.4242289960384369, 0.0686703696846962, -0.016048133373260498, 0.10100875794887543, -0.039028871804475784, -0.2488710582256317, 0.0020465392153710127, 0.21559686958789825, -0.33441561460494995, 0.021590720862150192, -0.12293867766857147, -0.13795685768127441, -0.1229776069521904, -0.3416822552680969, 0.12835197150707245, -0.22216840088367462, -0.073239766061306, -0.10795444250106812, -0.02767135761678219, 0.34661421179771423, 0.14213615655899048, 0.11507444828748703, 0.03564830869436264, 0.3848187327384949, 0.2009037733078003, 0.06435754150152206, 0.2148556262254715, 0.2523735463619232, -0.1405181735754013, 0.31379571557044983, 0.356880247592926, -0.07430152595043182, -0.15403588116168976, -0.06689877808094025, 0.23393620550632477, 0.3083658218383789, -0.2212504893541336, 0.03824919834733009, -0.2708306610584259, -0.18472877144813538, 0.008430274203419685, 0.05942149460315704, 0.08633163571357727, 0.3143298923969269, -0.24902626872062683, 0.13054537773132324, -0.22273364663124084, -0.061335574835538864, 0.21621699631214142, -0.14438511431217194, -0.03993939980864525, -0.3423178195953369, 0.2046397477388382, 0.12017782777547836, -0.2263675332069397, -0.4386419653892517, -0.15852290391921997, 0.4443908929824829, -0.13249513506889343, 0.13830742239952087, 0.49383482336997986, 0.009845667518675327, 0.05609729886054993, -0.16181956231594086, -0.10149369388818741, 0.03714849799871445, 0.09188630431890488, 0.2818922996520996, -0.30226224660873413 ]
https://github.com/huggingface/datasets/issues/2511
Add C4
Update on this: I'm computing the checksums of the data files. It will be available soon
## Adding a Dataset - **Name:** *C4* - **Description:** *https://github.com/allenai/allennlp/discussions/5056* - **Paper:** *https://arxiv.org/abs/1910.10683* - **Data:** *https://huggingface.co/datasets/allenai/c4* - **Motivation:** *Used a lot for pretraining* Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Should fix https://github.com/huggingface/datasets/issues/1710
16
Add C4 ## Adding a Dataset - **Name:** *C4* - **Description:** *https://github.com/allenai/allennlp/discussions/5056* - **Paper:** *https://arxiv.org/abs/1910.10683* - **Data:** *https://huggingface.co/datasets/allenai/c4* - **Motivation:** *Used a lot for pretraining* Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Should fix https://github.com/huggingface/datasets/issues/1710 Update on this: I'm computing the checksums of the data files. It will be available soon
[ -0.2586114704608917, -0.23689334094524384, -0.2156256139278412, 0.07441923022270203, 0.20855382084846497, -0.087480328977108, 0.1077217236161232, 0.30312982201576233, 0.06430105119943619, 0.32313570380210876, -0.21327082812786102, 0.06667786091566086, -0.15428952872753143, 0.4332844913005829, -0.07344890385866165, 0.030804933980107307, 0.005563266575336456, 0.24548538029193878, -0.25166481733322144, -0.06123872101306915, -0.12370597571134567, 0.16009555757045746, 0.1151486188173294, -0.3427097201347351, -0.23706844449043274, -0.02823738567531109, -0.012636084109544754, 0.23994816839694977, -0.2678382694721222, -0.22209283709526062, 0.11059080064296722, 0.2579701840877533, -0.13013257086277008, 0.31928199529647827, -0.0001002747449092567, -0.02445393055677414, -0.0022873717825859785, -0.11048651486635208, -0.06924928724765778, 0.24994641542434692, -0.023054687306284904, -0.03289487957954407, -0.062033940106630325, -0.10479996353387833, -0.3629559576511383, 0.01265458669513464, 0.06222621724009514, -0.1381945163011551, 0.3689250648021698, 0.22718779742717743, 0.3632344603538513, 0.3869171738624573, -0.01940745674073696, -0.16299158334732056, 0.1113213449716568, 0.01676955446600914, -0.08710401505231857, 0.2593567669391632, 0.2584521770477295, 0.12090568989515305, -0.20024330914020538, 0.28410136699676514, 0.18478064239025116, 0.07397335022687912, 0.1756889373064041, 0.02544267103075981, -0.05504710227251053, 0.06292080879211426, 0.018719708546996117, 0.08537931740283966, 0.12152993679046631, -0.283124178647995, -0.3110688328742981, -0.17563287913799286, 0.07415575534105301, -0.38093075156211853, 0.14682279527187347, 0.023649806156754494, 0.00826787669211626, -0.021516282111406326, -0.17067500948905945, 0.02408844418823719, -0.19688928127288818, -0.051615528762340546, 0.10055571049451828, 0.06802720576524734, -0.2644311189651489, -0.2472829967737198, 0.2497016340494156, 0.033575817942619324, -0.3803050220012665, 0.11216211318969727, -0.06707433611154556, -0.058975156396627426, -0.09074679762125015, -0.2901786267757416, 0.038239240646362305, 0.25462162494659424, 0.3078460693359375, 0.126214399933815, 0.1025286391377449, 0.24849411845207214, -0.02341907098889351, 0.10003328323364258, -0.12769712507724762, -0.07826105505228043, 0.0358932800590992, -0.258576363325119, 0.30958157777786255, 0.19441360235214233, -0.1259981095790863, -0.14244665205478668, 0.02896735444664955, -0.1575794219970703, -0.09860969334840775, 0.05208699777722359, -0.16779254376888275, -0.2475498765707016, -0.22141969203948975, 0.07718420773744583, 0.08888189494609833, 0.007709729019552469, 0.11760615557432175, 0.5735186338424683, -0.06182980537414551, -0.19446676969528198, 0.004639035556465387, 0.2758074700832367, -0.12138188630342484, -0.14463374018669128, -0.31230899691581726, -0.05467432364821434, -0.28952232003211975, 0.02273714542388916, 0.3508206903934479, -0.06560653448104858, 0.3327206075191498, 0.05340667441487312, 0.28646108508110046, 0.12028224766254425, 0.10826470702886581, 0.01886700466275215, 0.17334461212158203, 0.0356120727956295, -0.0004557998909149319, -0.23640009760856628, 0.12093739956617355, -0.0725720152258873, -0.04170883819460869, -0.47239935398101807, 0.07080022990703583, 0.0765201598405838, -0.21882499754428864, 0.3166133463382721, 0.0024369803722947836, -0.009268372319638729, -0.04224738851189613, 0.056176234036684036, -0.07122945040464401, -0.18646079301834106, 0.014460878446698189, 0.18566249310970306, -0.09024093300104141, -0.18523196876049042, 0.16045677661895752, 0.25049731135368347, 0.03488748148083687, -0.13831818103790283, 0.2225315272808075, -0.18012702465057373, 0.005303042940795422, 0.11214496195316315, 0.05465763807296753, -0.13187624514102936, -0.2068517804145813, 0.08684972673654556, -0.07572320848703384, -0.1791612207889557, -0.2858583629131317, 0.06916481256484985, -0.18407957255840302, -0.011853895150125027, 0.17421112954616547, 0.13496989011764526, 0.002592259319499135, -0.10639315098524094, -0.047125719487667084, 0.05937338247895241, 0.013482083566486835, 0.1410411298274994, -0.21269646286964417, -0.23633433878421783, -0.15479737520217896, 0.12162541598081589, 0.14234158396720886, -0.12735585868358612, 0.2024531066417694, -0.12522977590560913, 0.32565659284591675, -0.3942755460739136, 0.061558157205581665, 0.1828734576702118, 0.40153566002845764, 0.02190704457461834, -0.19326165318489075, -0.18275314569473267, -0.25746849179267883, 0.006263871677219868, -0.059028930962085724, 0.14515183866024017, 0.029711496084928513, -0.35817858576774597, -0.08834356814622879, -0.21952764689922333, -0.13058926165103912, -0.08491255342960358, 0.3844878673553467, 0.28997817635536194, 0.08790747821331024, -0.0343080498278141, 0.02019469626247883, 0.3061673939228058, -0.19015169143676758, 0.09763721376657486, -0.07893060892820358, 0.19601093232631683, -0.11007028818130493, -0.14176328480243683, 0.3407817780971527, 0.1319139450788498, -0.060800157487392426, -0.11084868758916855, 0.14436183869838715, 0.30132997035980225, -0.03957860544323921, 0.21335382759571075, 0.22704000771045685, 0.491459459066391, 0.03382299840450287, -0.15893606841564178, 0.0062977769412100315, 0.15319424867630005, -0.010462388396263123, 0.06469112634658813, -0.18880826234817505, 0.5184319615364075, 0.03018331341445446, -0.16056153178215027, 0.2123943269252777, -0.1512405425310135, 0.22637788951396942, -0.17371588945388794, -0.06068876385688782, -0.34939610958099365, 0.19808430969715118, -0.0980958342552185, 0.25945889949798584, -0.13163939118385315, -0.4100785553455353, 0.048789676278829575, 0.23382213711738586, 0.16636009514331818, 0.17038685083389282, -0.04051337391138077, -0.03633425384759903, 0.08029691874980927, 0.1401967704296112, 0.1761389672756195, 0.21340790390968323, 0.5047035813331604, 0.13313376903533936, 0.05889734998345375, -0.1254734992980957, -0.18639154732227325, 0.13831153512001038, -0.2588725686073303, -0.06428178399801254, 0.23514394462108612, 0.021916154772043228, -0.17019037902355194, -0.6001666784286499, 0.03724828362464905, -0.24977830052375793, -0.03945375606417656, -0.2543346583843231, -0.07524184882640839, -0.1240680068731308, -0.24923336505889893, -0.12421725690364838, 0.02692538872361183, -0.11308591067790985, -0.18180762231349945, 0.19951669871807098, 0.1633024364709854, -0.38518983125686646, 0.05915889889001846, -0.27874094247817993, 0.2953506112098694, 0.026985812932252884, 0.008584239520132542, 0.03700139746069908, 0.0854821503162384, 0.040805842727422714, 0.2772706151008606, 0.29073065519332886, 0.06653613597154617, 0.6287950873374939, -0.3146468997001648, 0.1830504685640335, -0.21875907480716705, -0.5036547780036926, 0.16650380194187164, -0.15426738560199738, 0.1319328248500824, 0.21562175452709198, 0.17237605154514313, -0.09997673332691193, -0.33962661027908325, 0.15672025084495544, -0.3860035240650177, -0.33198386430740356, -0.04647012799978256, -0.05429179593920708, 0.013893621042370796, -0.33153706789016724, -0.17708741128444672, -0.03269830718636513, -0.27623292803764343, 0.4101894497871399, 0.11994156986474991, 0.013964571058750153, 0.15506456792354584, 0.09944695979356766, 0.1597025841474533, -0.3217942714691162, 0.26711827516555786, -0.3387696146965027, -0.4841819405555725, 0.23189544677734375, -0.39255377650260925, -0.41235291957855225, -0.1928909868001938, -0.10431479662656784, 0.3161994218826294, -0.053086113184690475, -0.2953403890132904, -0.2839134633541107, -0.12512266635894775, 0.256299763917923, 0.06909100711345673, 0.07942859828472137, 0.28653281927108765, -0.036067888140678406, -0.31482139229774475, -0.28699052333831787, 0.009124214760959148, 0.3432369828224182, -0.2602676749229431, 0.0930614098906517, -0.37818771600723267, 0.019349079579114914, 0.05910995230078697, 0.3250524699687958, 0.180475652217865, -0.22836662828922272, 0.3548695147037506, -0.1520235687494278, 0.5535256862640381, 0.06953930854797363, -0.18838903307914734, 0.2312796413898468, -0.004539533983916044, 0.12521477043628693, 0.4402046799659729, 0.10306357592344284, 0.09411904215812683, -0.040825605392456055, 0.029680274426937103, -0.36761268973350525, -0.32074403762817383, 0.06203024834394455, 0.10892145335674286, 0.16173407435417175, -0.12500695884227753, 0.05863577499985695, -0.1335465908050537, -0.13952282071113586, 0.13392993807792664, 0.2203105241060257, -0.04879651218652725, -0.28488269448280334, -0.3441629409790039, 0.01005394384264946, -0.41936194896698, 0.2949056923389435, 0.15922503173351288, -0.059281665831804276, -0.15735819935798645, -0.19763554632663727, -0.14586304128170013, -0.19305698573589325, 0.3951095640659332, 0.023937176913022995, 0.13954992592334747, -0.06578271090984344, -0.13501180708408356, -0.13071200251579285, 0.2956535816192627, -0.39067891240119934, -0.10588830709457397, 0.2813069224357605, 0.3926398754119873, -0.47023773193359375, -0.07066808640956879, 0.07761938869953156, 0.1879817247390747, -0.0025737471878528595, 0.013699577189981937, -0.1803116351366043, -0.09844955801963806, -0.1680196076631546, 0.20984354615211487, -0.12098686397075653, 0.1346728652715683, -0.09373056888580322, -0.12815234065055847, 0.08984347432851791, -0.0872650146484375, 0.3720998764038086, 0.29086142778396606, 0.27141255140304565, 0.18563801050186157, 0.10814017057418823, 0.048406049609184265, 0.16585884988307953, 0.356621652841568, 0.35927122831344604, -0.11868567764759064, 0.0882532075047493, -0.17350420355796814, -0.22143803536891937, 0.301419734954834, 0.20301131904125214, 0.1486733853816986, 0.141575425863266, 0.016374001279473305, 0.17712414264678955, -0.30325421690940857, 0.3258422017097473, 0.14575959742069244, 0.0752539411187172, -0.052499059587717056, -0.020620904862880707, 0.19414635002613068, -0.14151474833488464, -0.03738510236144066, 0.26115137338638306, 0.4078724980354309, -0.30119824409484863, 0.0937327891588211, 0.24438118934631348, 0.87774658203125, -0.004666830413043499, 0.21769683063030243, 0.2962684631347656, -0.3105142414569855, 0.10502880066633224, -0.11647556722164154, 0.05138071998953819, -0.13653554022312164, -0.3590018153190613, 0.052587661892175674, 0.048221271485090256, 0.06916248053312302, -0.0005927375750616193, -0.1677505373954773, -0.06891180574893951, 0.09361866861581802, 0.16284984350204468, -0.1722351759672165, 0.09501446038484573, -0.16194142401218414, -0.18699759244918823, -0.23684750497341156, 0.33490073680877686, 0.15590351819992065, -0.194041907787323, -0.15834137797355652, -0.2405659705400467, -0.09012199193239212, -0.15321291983127594, -0.03173739090561867, -0.08579449355602264, -0.20661015808582306, -0.10150006413459778, 0.08339990675449371, -0.06229928135871887, -0.0720379501581192, 0.05824899300932884, 0.38715967535972595, 0.383889764547348, -0.26780813932418823, 0.10370694845914841, 0.034954093396663666, 0.019225621595978737, -0.11530236154794693, 0.10062391310930252, -0.0004588525043800473, -0.15329916775226593, -0.004864350892603397, -0.09065930545330048, 0.19959533214569092, -0.3959476947784424, 0.0739670917391777, -0.06942660361528397, -0.37528541684150696, -0.2290606051683426, 0.03893833979964256, 0.11175365746021271, -0.13672631978988647, -0.2934674024581909, 0.278750479221344, 0.10510960221290588, -0.11439356207847595, 0.015720389783382416, 0.3547438979148865, -0.1251772940158844, -0.25278952717781067, 0.3834080696105957, -0.15219250321388245, -0.13808543980121613, 0.2241641879081726, 0.06766431033611298, -0.276164174079895, -0.47855302691459656, -0.2041911482810974, 0.14261411130428314, -0.23389841616153717, 0.032852232456207275, 0.09208603948354721, -0.2548292577266693, 0.08803748339414597, 0.2719169855117798, 0.30567604303359985, -0.020509276539087296, 0.20510709285736084, -0.09581595659255981, -0.6194849610328674, 0.2811791002750397, -0.07657361030578613, 0.42943841218948364, -0.026386616751551628, 0.441427618265152, -0.21097445487976074, 0.056509438902139664, -0.5384541153907776, -0.02102680131793022, -0.31814098358154297, -0.07985980808734894, 0.14333923161029816, -0.1306786835193634, 0.30841225385665894, -0.09286629408597946, 0.32572776079177856, 0.09146232157945633, -0.3117186427116394, -0.3644774854183197, -0.1320674568414688, 0.05114945024251938, -0.09963048994541168, 0.010685525834560394, 0.32143256068229675, 0.1851661503314972, -0.13806979358196259, -0.16655021905899048, 0.143197163939476, 0.0987849161028862, 0.03466303274035454, 0.22427721321582794, 0.23744319379329681, 0.05274788662791252, 0.10887033492326736, -0.28803905844688416, 0.08403895050287247, -0.0015568669186905026, -0.07544340193271637, -0.12136968225240707, -0.32903632521629333, -0.11178095638751984, 0.5154303908348083, 0.31747859716415405, 0.18260057270526886, 0.07613655924797058, 0.18189255893230438, 0.026196293532848358, -0.21949806809425354, 0.35107868909835815, 0.43366920948028564, -0.04029325768351555, -0.08916404098272324, 0.11073800176382065, 0.18403147161006927, 0.45344385504722595, -0.3457513749599457, 0.06809971481561661, 0.05521363765001297, -0.061362408101558685, 0.37491580843925476, 0.25732019543647766, 0.08391837030649185, -0.24349048733711243, 0.17409393191337585, 0.1419278085231781, -0.14425447583198547, -0.021044621244072914, 0.010024470277130604, 0.19066698849201202, 0.06872715801000595, -0.136788472533226, 0.26942208409309387, 0.026740150526165962, 0.19271765649318695, 0.1791888177394867, -0.12620678544044495, 0.22547021508216858, -0.34006011486053467, 0.058101359754800797, 0.03773254156112671, -0.08174517005681992, 0.09689488261938095, 0.22721374034881592, 0.04929765313863754, 0.18360090255737305, 0.11717679351568222, 0.5696304440498352, -0.15657822787761688, -0.20257878303527832, -0.3596155643463135, 0.17605964839458466, -0.20359206199645996, -0.08365002274513245, -0.13763557374477386, -0.22247526049613953, -0.17054088413715363, 0.04113426432013512, 0.07987650483846664, -0.0019958186894655228, 0.1915551871061325, -0.03546815738081932, 0.06586548686027527, -0.20868368446826935, -0.0682743489742279, 0.1018466204404831, 0.25790441036224365, -0.17904655635356903, 0.16223011910915375, 0.31937459111213684, 0.028183022513985634, 0.2234220802783966, 0.3514074385166168, 0.24121136963367462, -0.08719980716705322, 0.08933320641517639, 0.16269831359386444, -0.1762310415506363, -0.03113698959350586, -0.3607545495033264, 0.2241186648607254, 0.3361489474773407, 0.1975807547569275, 0.3792404234409332, 0.2971458435058594, -0.35500383377075195, -0.04022698476910591, -0.08420208096504211, -0.06797586381435394, -0.07055780291557312, 0.16202887892723083, 0.021259814500808716, -0.08453013002872467, -0.1829674243927002, -0.16264274716377258, -0.46183374524116516, 0.06020694598555565, -0.006987641099840403, -0.1328730583190918, 0.20820996165275574, -0.04724609851837158, 0.16343148052692413, 0.1856045424938202, 0.5502732396125793, 0.025593839585781097, 0.12026870995759964, -0.16980352997779846, -0.48895999789237976, -0.52103191614151, 0.22356051206588745, 0.06294966489076614, 0.0278373584151268, -0.3625487685203552, 0.07030390948057175, 0.44427457451820374, -0.06352008134126663, 0.23737211525440216, -0.035265691578388214, 0.12187135964632034, -0.09820680320262909, -0.41151300072669983, 0.15122674405574799, -0.048800185322761536, -0.11518505215644836, 0.25643324851989746, -0.14793699979782104, 0.014548269100487232, 0.03332086279988289, 0.31103065609931946, 0.0052455030381679535, 0.17411161959171295, -0.2488556057214737, -0.12338883429765701, 0.3204122483730316, 0.008249220438301563, 0.43286505341529846, -0.5732755064964294, -0.23789304494857788, -0.10873919725418091, -0.01369768287986517, -0.17552436888217926, 0.03371988609433174, 0.13923697173595428, 0.5417930483818054, -0.02984180673956871, -0.19665919244289398, -0.024292094632983208, 0.319647878408432, 0.30399078130722046, 0.028704531490802765, -0.1446598768234253, 0.36470988392829895, -0.00039124477189034224, -0.2065257579088211, -0.051616866141557693, 0.49152010679244995, -0.06580022722482681, -0.015352415852248669, -0.16395936906337738, -0.3880121409893036, 0.5056561827659607, -0.320793092250824, -0.026680320501327515, -0.034434426575899124, 0.35569843649864197, 0.18342916667461395, -0.2193896323442459, -0.5304564237594604, 0.24424193799495697, 0.08327189832925797, 0.10258888453245163, -0.1924140453338623, 0.3654031455516815, -0.16867536306381226, -0.1641024649143219, -0.0059415362775325775, 0.4586779773235321, 0.24165046215057373, -0.284921258687973, -0.046581681817770004, -0.3411107659339905 ]
https://github.com/huggingface/datasets/issues/2508
Load Image Classification Dataset from Local
Hi ! Is this folder structure a standard, a bit like imagenet ? In this case maybe we can consider having a dataset loader for cifar-like, imagenet-like, squad-like, conll-like etc. datasets ? ```python from datasets import load_dataset my_custom_cifar = load_dataset("cifar_like", data_dir="path/to/data/dir") ``` Let me know what you think
**Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset
48
Load Image Classification Dataset from Local **Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset Hi ! Is this folder structure a standard, a bit like imagenet ? In this case maybe we can consider having a dataset loader for cifar-like, imagenet-like, squad-like, conll-like etc. datasets ? ```python from datasets import load_dataset my_custom_cifar = load_dataset("cifar_like", data_dir="path/to/data/dir") ``` Let me know what you think
[ -0.17115196585655212, -0.1667463779449463, 0.03135296329855919, 0.45320066809654236, 0.26325491070747375, -0.0811183974146843, 0.22850817441940308, 0.05178449675440788, 0.31946441531181335, 0.26813292503356934, -0.19803541898727417, 0.09343159943819046, -0.3347459137439728, 0.39439234137535095, 0.03784643113613129, -0.20311641693115234, -0.227997824549675, 0.29425549507141113, -0.19178207218647003, -0.2173050493001938, -0.05298931524157524, -0.11123412102460861, 0.12361674755811691, 0.019518619403243065, -0.2421070784330368, 0.1486360728740692, -0.2809579372406006, 0.49198687076568604, -0.14515119791030884, -0.1026543378829956, 0.48928001523017883, 0.033760327845811844, 0.3682650923728943, 0.6073810458183289, -0.00011156164691783488, 0.10822408646345139, -0.12464310228824615, -0.29129910469055176, -0.1220242828130722, -0.318471759557724, -0.0028070001862943172, -0.12939707934856415, 0.28401005268096924, -0.2369062602519989, -0.459067165851593, -0.031031670048832893, 0.04542692005634308, -0.38365525007247925, 0.40922117233276367, 0.21364504098892212, 0.1300622820854187, 0.07144075632095337, -0.4090711772441864, 0.04862073436379433, -0.22430507838726044, 0.5681048035621643, -0.14895029366016388, 0.43935346603393555, 0.34599900245666504, -0.21176032721996307, -0.09515939652919769, 0.17549103498458862, 0.08138683438301086, -0.01218491978943348, 0.6244926452636719, 0.3267001807689667, -0.20126298069953918, -0.22791562974452972, -0.179352268576622, 0.16795268654823303, 0.2916373312473297, -0.1329026222229004, -0.15209177136421204, -0.15287332236766815, 0.1039552092552185, -0.11917739361524582, 0.05716501176357269, 0.151765838265419, -0.4100267291069031, 0.26158323884010315, -0.23542477190494537, -0.14853248000144958, -0.4728708267211914, 0.1664528250694275, -0.015712546184659004, -0.31081026792526245, -0.109682597219944, -0.033508315682411194, 0.11070474237203598, -0.030202079564332962, -0.06378822028636932, -0.022558031603693962, 0.17269361019134521, 0.5213356018066406, -0.14835414290428162, -0.24486428499221802, -0.06240139529109001, 0.1635788232088089, 0.08547070622444153, -0.15679946541786194, 0.13233204185962677, -0.06575575470924377, -0.42733684182167053, 0.07660096883773804, 0.17424997687339783, 0.08526605367660522, -0.06946617364883423, 0.3597373366355896, -0.11670286953449249, 0.009934651665389538, -0.40188857913017273, -0.10228325426578522, -0.3766006529331207, -0.005997415632009506, -0.16495729982852936, -0.08802707493305206, -0.08296513557434082, -0.05140340328216553, 0.23106321692466736, -0.21276256442070007, 0.13158254325389862, 0.17828185856342316, 0.22599324584007263, 0.22447364032268524, 0.0003825185995083302, -0.022453241050243378, 0.10430057346820831, -0.0969308465719223, -0.1879051923751831, -0.011245922185480595, -0.15397702157497406, 0.14921601116657257, -0.28463035821914673, 0.1611146479845047, 0.05933484435081482, -0.24048997461795807, 0.02394033968448639, -0.22323594987392426, 0.4601970613002777, 0.1644296944141388, -0.03326239064335823, -0.19456225633621216, 0.27851518988609314, 0.2013731747865677, -0.3364458978176117, -0.1555517315864563, 0.3225756883621216, -0.12449883669614792, -0.292746365070343, 0.0910836011171341, -0.4155611991882324, -0.30236586928367615, 0.1320979744195938, 0.12751612067222595, 0.05418369174003601, -0.11856099218130112, -0.4537299573421478, 0.04714435338973999, -0.3906649947166443, -0.03768957033753395, -0.20059481263160706, 0.0031110520940274, -0.38441237807273865, -0.11220668256282806, 0.3255612552165985, 0.4995100796222687, -0.35371658205986023, -0.19350305199623108, -0.2759789526462555, -0.12263336032629013, -0.04054989293217659, 0.35829246044158936, -0.2825184464454651, 0.3609904646873474, -0.23162241280078888, -0.00047218025429174304, 0.3596024215221405, -0.6408894658088684, -0.16024604439735413, 0.36112314462661743, -0.14685355126857758, 0.08347935974597931, -0.11066693812608719, 0.4675810635089874, 0.05732082575559616, -0.0437316969037056, -0.1097145825624466, 0.7292589545249939, -0.2461506724357605, 0.10039601475000381, 0.07839121669530869, -0.34449467062950134, -0.059519942849874496, 0.3862072229385376, -0.025586707517504692, 0.26123353838920593, 0.08776219934225082, -0.12027352303266525, 0.11051201075315475, -0.24009327590465546, -0.016725149005651474, -0.06607260555028915, 0.21490812301635742, 0.2525715231895447, -0.03561537340283394, 0.0856860801577568, -0.38533979654312134, 0.3809305429458618, 0.013766269199550152, 0.2332106977701187, -0.089456707239151, -0.07757245749235153, -0.10497935861349106, -0.17977099120616913, -0.29357659816741943, -0.07404734194278717, -0.0191341545432806, 0.09748704731464386, -0.08794349431991577, -0.198237806558609, -0.36467763781547546, 0.3607046604156494, -0.4032908082008362, 0.14608950912952423, 0.1556634157896042, 0.187236025929451, 0.1924533098936081, 0.06632621586322784, -0.22588254511356354, 0.030402500182390213, -0.17105607688426971, -0.21633504331111908, -0.09010560810565948, 0.17415064573287964, 0.13178503513336182, 0.22554387152194977, 0.21038083732128143, 0.19114075601100922, 0.2752167284488678, -0.25691065192222595, 0.0800209790468216, -0.09539832919836044, 0.30308088660240173, 0.05047578737139702, -0.2693999111652374, 0.47338712215423584, -0.03461899235844612, 0.26508647203445435, 0.12306280434131622, -0.18078124523162842, 0.038839004933834076, -0.11778345704078674, 0.007415906060487032, -0.06953264772891998, 0.11194439232349396, 0.45861372351646423, 0.33275696635246277, 0.24330326914787292, -0.1677212119102478, -0.2217969298362732, -0.08801089227199554, 0.007638661190867424, 0.013918600045144558, 0.29516276717185974, 0.05423769727349281, 0.30939981341362, -0.027290906757116318, -0.10970231145620346, 0.522064745426178, 0.09713570773601532, -0.14856919646263123, 0.19683153927326202, 0.17404267191886902, 0.04497883468866348, 0.006672309711575508, -0.003707979340106249, 0.1470157653093338, 0.010973216034471989, -0.019259754568338394, 0.1900917887687683, -0.32615911960601807, -0.2001761496067047, -0.22500672936439514, -0.042920034378767014, -0.018886564299464226, 0.3271229565143585, -0.028452428057789803, -0.4352131485939026, -0.22291208803653717, -0.1485520601272583, -0.056431952863931656, 0.4121333360671997, -0.02655750885605812, -0.14377710223197937, -0.011405978351831436, 0.006125487852841616, 0.018856188282370567, 0.7483348250389099, -0.02735256217420101, -0.5523809194564819, 0.12489007413387299, 0.01924985460937023, -0.14532500505447388, 0.08160139620304108, 0.22550439834594727, -0.059997547417879105, 0.3380979597568512, -0.05578726902604103, 0.029719479382038116, -0.2399783581495285, -0.20191232860088348, 0.23417547345161438, -0.0794292613863945, 0.32943058013916016, 0.034218184649944305, 0.22608458995819092, 0.015108514577150345, -0.23021581768989563, 0.2885739505290985, -0.061915744096040726, -0.27013206481933594, -0.34025970101356506, 0.16755881905555725, 0.3559238016605377, -0.18293273448944092, -0.2913973331451416, -0.6088710427284241, -0.32067248225212097, 0.2787877321243286, 0.4164882004261017, 0.25210726261138916, 0.23076745867729187, 0.15150186419487, -0.0546729676425457, -0.16986490786075592, 0.06966016441583633, 0.11673419922590256, -0.5177239775657654, 0.035861771553754807, -0.210063636302948, -0.22049938142299652, -0.23878371715545654, -0.24666056036949158, 0.14577710628509521, 0.0720839872956276, -0.38451653718948364, -0.2613418400287628, -0.040832072496414185, 0.159283846616745, -0.061820272356271744, -0.0013887925306335092, 0.16729308664798737, -0.0954543724656105, -0.023528389632701874, 0.03895564004778862, 0.24769729375839233, 0.07944388687610626, 0.009400689974427223, -0.18648001551628113, 0.1917174607515335, 0.15556764602661133, -0.12753194570541382, 0.41025885939598083, -0.06906210631132126, -0.20883378386497498, 0.4698214828968048, -0.21833276748657227, 0.2523118555545807, -0.5016577839851379, -0.5047839283943176, 0.2008979767560959, 0.2034909576177597, -0.37916940450668335, 0.2592872083187103, 0.3521590828895569, -0.007107173092663288, -0.3364821672439575, -0.12871472537517548, -0.06979762017726898, -0.24193456768989563, 0.35361677408218384, 0.28390422463417053, 0.3354140520095825, -0.41792839765548706, -0.19297826290130615, -0.19434647262096405, -0.056797754019498825, -0.040687043219804764, 0.6717272400856018, 0.16092641651630402, 0.009462004527449608, -0.32189682126045227, 0.23314662277698517, -0.009169003926217556, -0.03326968848705292, 0.19919821619987488, -0.15522100031375885, -0.1863545924425125, -0.050049927085638046, 0.061695124953985214, 0.16468511521816254, 0.30632728338241577, 0.07458586990833282, 0.10108639299869537, 0.1251387745141983, -0.4726448655128479, -0.16903293132781982, 0.09577196091413498, 0.10850481688976288, -0.16053777933120728, -0.23021824657917023, 0.6902584433555603, 0.07564572989940643, -0.3655421733856201, 0.1751873791217804, 0.17503885924816132, -0.3738023340702057, -0.10138651728630066, -0.1717064082622528, 0.03599345311522484, -0.2495567351579666, -0.03823143243789673, 0.0375482477247715, 0.24717846512794495, 0.3213496804237366, 0.10704019665718079, -0.19045236706733704, -0.04738467186689377, 0.14187292754650116, -0.0774635300040245, 0.03568222001194954, 0.2747863233089447, 0.20584221184253693, 0.2150743454694748, 0.31994134187698364, -0.055234167724847794, 0.5318436622619629, -0.20672209560871124, -0.44844597578048706, -0.008283179253339767, 0.09926437586545944, 0.37003597617149353, 0.35514384508132935, 0.1360485851764679, -0.0077105299569666386, 0.023809760808944702, -0.05584997683763504, -0.7978024482727051, 0.5541276931762695, 0.07840022444725037, -0.17196454107761383, 0.0020039817318320274, -0.4529389441013336, 0.5468375086784363, -0.05329916998744011, -0.08428413420915604, 0.18397566676139832, 0.22372673451900482, -0.34849268198013306, 0.130499929189682, 0.3636850118637085, 1.003621220588684, -0.2000189572572708, 0.5979272723197937, 0.18825650215148926, 0.316578209400177, 0.18715859949588776, 0.2571655213832855, -0.11894207447767258, -0.19893065094947815, -0.39506691694259644, -0.13183683156967163, -0.13301126658916473, 0.14888624846935272, 0.11904395371675491, 0.10536658018827438, 0.10675667971372604, -0.1086648628115654, -0.03923102095723152, 0.04644365981221199, 0.218354731798172, 0.020884385332465172, -0.5506278276443481, -0.266824871301651, 0.13976943492889404, 0.16308294236660004, 0.37754949927330017, -0.05525173246860504, -0.04294109344482422, -0.07729993760585785, 0.009942972101271152, -0.004394472111016512, -0.13919495046138763, -0.17400233447551727, 0.033531803637742996, 0.01269436813890934, -0.23282453417778015, -0.050298891961574554, 0.3883974254131317, 0.23440496623516083, 0.09642262756824493, -0.03833911940455437, 0.13552816212177277, -0.3317181169986725, 0.1921805888414383, -0.07056831568479538, -0.220210462808609, 0.39995986223220825, 0.042843546718358994, 0.026604672893881798, -0.10411032289266586, -0.04292790964245796, -0.43457871675491333, -0.030589327216148376, -0.08446254581212997, 0.6611812710762024, -0.22106212377548218, -0.18064448237419128, -0.17034800350666046, 0.014989404007792473, 0.20418564975261688, 0.11528708040714264, 0.20150338113307953, 0.09005371481180191, -0.06563816219568253, 0.20745204389095306, -0.25632426142692566, 0.06534954905509949, 0.197935089468956, 0.08605730533599854, -0.430083304643631, 0.26447242498397827, 0.028217336162924767, 0.10345929861068726, -0.2177564650774002, 0.5871706604957581, 0.6104699969291687, -0.05570390820503235, 0.09968555718660355, 0.26357486844062805, -0.14791996777057648, -0.1274322271347046, 0.7271060347557068, 0.3650839924812317, -0.39102017879486084, -0.23158973455429077, -0.20751917362213135, -0.5043409466743469, 0.18778760731220245, -0.20773589611053467, 0.2692267596721649, -0.009611772373318672, 0.02233310043811798, 0.1949768215417862, -0.004062260035425425, -0.31214872002601624, 0.14859706163406372, -0.1957099586725235, 0.04609525948762894, 0.44597959518432617, 0.20564812421798706, 0.3248226046562195, 0.002192683285102248, 0.06785516440868378, -0.08650408685207367, -0.13294513523578644, -0.11388985812664032, -0.2136785387992859, 0.16442447900772095, 0.08220740407705307, 0.1318349987268448, 0.032537441700696945, -0.23563724756240845, -0.1330018937587738, -0.11400958150625229, 0.10530684143304825, -0.09798277914524078, -0.11273857951164246, 0.1572508066892624, -0.20522360503673553, 0.04629165679216385, -0.16042602062225342, 0.29526960849761963, 0.008954217657446861, 0.3124406933784485, 0.2140687257051468, -0.31429341435432434, -0.18736636638641357, -0.2776602804660797, 0.24085582792758942, 0.16740143299102783, 0.17924298346042633, -0.030755149200558662, 0.21054662764072418, 0.1559765487909317, 0.2315230518579483, 0.08175850659608841, 0.33807137608528137, -0.14546868205070496, -0.21254493296146393, 0.15474647283554077, 0.4487447142601013, 0.18921403586864471, -0.16923685371875763, -0.24118611216545105, -0.10999053716659546, -0.15592505037784576, 0.18972571194171906, 0.3677540123462677, -0.2745053768157959, 0.3570899963378906, -0.22247613966464996, -0.1835070550441742, 0.22735856473445892, 0.13857156038284302, -0.07095718383789062, 0.1136435717344284, -0.26010188460350037, 0.08365650475025177, 0.15711194276809692, 0.20504391193389893, 0.1487438827753067, 0.44925835728645325, -0.49878430366516113, 0.21040254831314087, -0.4103270173072815, 0.05329177901148796, 0.36939123272895813, -0.3706345558166504, 0.09090941399335861, 0.005235038232058287, 0.16927359998226166, 0.06788534671068192, -0.37747642397880554, 0.24271321296691895, -0.20505940914154053, -0.29989778995513916, 0.04581848159432411, 0.0883684903383255, -0.08547510951757431, 0.033792879432439804, -0.4702094495296478, -0.041239332407712936, -0.1352410763502121, 0.14716650545597076, -0.10111568123102188, -0.2601192891597748, 0.04510391876101494, 0.14020243287086487, 0.2343096286058426, 0.2619282603263855, -0.1562952995300293, 0.24965621531009674, 0.0728597491979599, -0.09852558374404907, 0.17052775621414185, 0.014076772145926952, 0.1973770707845688, 0.2325737476348877, 0.3065911829471588, -0.2564781904220581, 0.42073389887809753, 0.062200043350458145, 0.24700064957141876, -0.12525394558906555, -0.11602635681629181, -0.06639014929533005, -0.13223980367183685, -0.2821482717990875, 0.27170270681381226, 0.15267977118492126, 0.15081550180912018, -0.159150630235672, 0.16889728605747223, -0.1398804783821106, 0.1339808851480484, -0.5048723816871643, 0.3854016363620758, 0.33950093388557434, 0.12749899923801422, -0.20409731566905975, 0.287466436624527, -0.3802793323993683, 0.16607226431369781, 0.2698228657245636, 0.06666950136423111, 0.13989736139774323, 0.24885796010494232, 0.030734539031982422, 0.10641704499721527, 0.6256430149078369, 0.15653401613235474, 0.05806250497698784, -0.4024638235569, -0.23864489793777466, -0.5080851912498474, 0.07199473679065704, 0.08851168304681778, -0.31295815110206604, -0.007391213905066252, 0.053294237703084946, 0.23658384382724762, 0.3540361523628235, -0.1684103161096573, -0.25771498680114746, 0.13317227363586426, -0.054511863738298416, -0.28384092450141907, -0.11304084211587906, 0.23173397779464722, 0.29619458317756653, 0.06275378912687302, -0.37751004099845886, 0.12648123502731323, -0.2398352026939392, 0.06681472808122635, 0.25093480944633484, -0.10736468434333801, -0.20661750435829163, -0.1168394684791565, 0.35518577694892883, -0.18140944838523865, 0.10296505689620972, 0.033270083367824554, -0.09831184148788452, -0.11116284877061844, -0.08309254795312881, -0.24926559627056122, 0.00405157869681716, 0.08837459236383438, 0.4344707131385803, -0.4324680268764496, 0.1266244351863861, -0.5154182314872742, -0.18088750541210175, 0.1386326104402542, -0.1103629544377327, -0.20505984127521515, 0.037108346819877625, 0.030258402228355408, -0.031200973317027092, 0.009301177226006985, 0.4774013161659241, -0.27499574422836304, -0.2616231441497803, -0.2650993764400482, -0.1257019340991974, 0.5387346148490906, -0.39541834592819214, -0.10030034184455872, -0.028226425871253014, -0.032440345734357834, -0.04262934625148773, 0.17890454828739166, -0.09986357390880585, 0.21475455164909363, 0.27956056594848633, 0.08393974602222443, -0.17486289143562317, 0.2535271644592285, 0.14910970628261566, -0.09453826397657394, -0.08244416117668152, 0.16465458273887634, -0.08353543281555176, 0.10624050348997116, -0.09352609515190125, -0.3627170920372009 ]
https://github.com/huggingface/datasets/issues/2508
Load Image Classification Dataset from Local
@lhoestq I think we'll want a generic `image-folder` dataset (same as 'imagenet-like'). This is like `torchvision.datasets.ImageFolder`, and is something vision folks are used to seeing.
**Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset
25
Load Image Classification Dataset from Local **Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset @lhoestq I think we'll want a generic `image-folder` dataset (same as 'imagenet-like'). This is like `torchvision.datasets.ImageFolder`, and is something vision folks are used to seeing.
[ -0.2203829437494278, -0.17356444895267487, 0.037992410361766815, 0.46598926186561584, 0.19796615839004517, -0.05095729976892471, 0.18018637597560883, 0.07256569713354111, 0.3113460838794708, 0.24052415788173676, -0.14534765481948853, 0.1418924778699875, -0.2927549481391907, 0.2843792736530304, 0.08485609292984009, -0.2747693955898285, -0.24717079102993011, 0.33131515979766846, -0.20568153262138367, -0.19570131599903107, -0.044920116662979126, -0.12572041153907776, 0.14487743377685547, 0.004187656566500664, -0.2547867000102997, 0.12772881984710693, -0.24681313335895538, 0.49817171692848206, -0.07975141704082489, -0.08459156006574631, 0.4612983465194702, -0.009337746538221836, 0.37705379724502563, 0.4620998203754425, -0.00010864347859751433, 0.08189842849969864, -0.0611456036567688, -0.2880571186542511, -0.07632020115852356, -0.1762280911207199, -0.014972731471061707, -0.07907240837812424, 0.2707417905330658, -0.16276860237121582, -0.4990907907485962, -0.014790784567594528, 0.0881994292140007, -0.417305052280426, 0.4179806113243103, 0.14685730636119843, 0.143450528383255, 0.11187662929296494, -0.3733752965927124, 0.03507709875702858, -0.17789894342422485, 0.5875380039215088, -0.18754594027996063, 0.3944592773914337, 0.4111528992652893, -0.1405939757823944, -0.18945258855819702, 0.2388450801372528, 0.09907933324575424, -0.03896139934659004, 0.6692719459533691, 0.2804871201515198, -0.26176467537879944, -0.1706676185131073, -0.23996904492378235, 0.20665274560451508, 0.31815847754478455, 0.0006300712702795863, -0.044747572392225266, -0.10670018196105957, 0.08019029349088669, -0.06097446754574776, 0.10266304761171341, 0.10485579073429108, -0.4013630747795105, 0.21542641520500183, -0.31547802686691284, -0.2255513221025467, -0.5069891810417175, 0.11978306621313095, 0.0038080308586359024, -0.42131054401397705, -0.06348741799592972, -0.005000992212444544, 0.1666988730430603, -0.05444074422121048, -0.09939692914485931, 0.1049673780798912, 0.08112218230962753, 0.4228811264038086, -0.15362142026424408, -0.21874023973941803, -0.05599555745720863, 0.15744920074939728, 0.09806925803422928, -0.200521782040596, 0.21937596797943115, -0.02419508993625641, -0.4958963692188263, 0.12779924273490906, 0.13267812132835388, 0.09801407158374786, -0.012329522520303726, 0.3163384199142456, -0.1417284607887268, -0.03999045491218567, -0.33847296237945557, -0.08429336547851562, -0.3632296621799469, 0.044750116765499115, -0.26709529757499695, -0.08914413303136826, -0.11567939072847366, -0.10653409361839294, 0.15916281938552856, -0.22017839550971985, 0.12317577004432678, 0.21078068017959595, 0.16920122504234314, 0.22190414369106293, -0.02505558170378208, -0.07703911513090134, 0.17145435512065887, -0.1723676323890686, -0.19782736897468567, -0.14103205502033234, -0.1429930031299591, 0.10340824723243713, -0.32449761033058167, 0.19159846007823944, 0.08783148229122162, -0.25934821367263794, 0.06465743482112885, -0.2324136197566986, 0.36784252524375916, 0.2796498239040375, -0.033675722777843475, -0.11196676641702652, 0.32587486505508423, 0.13666455447673798, -0.39146968722343445, -0.24331311881542206, 0.25974151492118835, 0.04652402922511101, -0.2552483081817627, 0.1332138329744339, -0.37242618203163147, -0.25562986731529236, 0.05466650053858757, 0.12165024131536484, 0.1061294749379158, -0.15014322102069855, -0.33135107159614563, 0.1637575775384903, -0.47548672556877136, -0.05140615254640579, -0.1621990203857422, -0.014872569590806961, -0.3337171673774719, -0.06511221826076508, 0.3065494894981384, 0.4737495183944702, -0.4164995849132538, -0.17933465540409088, -0.23163731396198273, -0.15841151773929596, -0.10638529062271118, 0.34550121426582336, -0.2947668433189392, 0.277990460395813, -0.2246076762676239, -0.005077046807855368, 0.27058935165405273, -0.5349381566047668, -0.06017441302537918, 0.30365586280822754, -0.21194329857826233, 0.030514471232891083, -0.16403542459011078, 0.5342693328857422, 0.05014699697494507, -0.041998788714408875, -0.17459894716739655, 0.6611355543136597, -0.3526689410209656, 0.0466846264898777, 0.07806585729122162, -0.3422691524028778, -0.06446269899606705, 0.41221654415130615, -0.07974043488502502, 0.2406914383172989, 0.131822407245636, -0.11936837434768677, -0.02362912707030773, -0.21653670072555542, -0.0034818057902157307, -0.0660732090473175, 0.08113981783390045, 0.24586477875709534, -0.07303234189748764, 0.15299615263938904, -0.39925408363342285, 0.3711700141429901, 0.009705426171422005, 0.19090896844863892, 0.03104965202510357, -0.06211217865347862, -0.0510726124048233, -0.21729956567287445, -0.17213840782642365, -0.14603324234485626, -0.009047269821166992, 0.16794808208942413, -0.14346031844615936, -0.21790991723537445, -0.286390095949173, 0.30250251293182373, -0.42283371090888977, 0.11677826195955276, 0.12822964787483215, 0.1148819699883461, 0.17171421647071838, 0.018277617171406746, -0.19401611387729645, -0.056664496660232544, -0.1676887571811676, -0.23804360628128052, -0.08035124093294144, 0.18656767904758453, 0.007543998770415783, 0.2275129109621048, 0.2719520926475525, 0.19176246225833893, 0.2524002492427826, -0.3821570873260498, 0.15318512916564941, -0.15043821930885315, 0.21512484550476074, 0.06284688413143158, -0.3206402361392975, 0.39801156520843506, -0.04544277861714363, 0.2160474956035614, 0.06680130213499069, -0.11791785061359406, -0.007741075474768877, -0.14409776031970978, 0.09152331203222275, -0.052304983139038086, 0.1271100789308548, 0.4711930751800537, 0.2664763331413269, 0.22434955835342407, -0.21888312697410583, -0.19212335348129272, -0.05959375575184822, 0.07690287381410599, -0.011224327608942986, 0.29013365507125854, -0.0028833486139774323, 0.28984734416007996, 0.10341779887676239, -0.24698348343372345, 0.403518944978714, 0.16002888977527618, -0.171587273478508, 0.12763452529907227, 0.13307613134384155, 0.05374853312969208, -0.04146832227706909, -0.02406151220202446, 0.10061880201101303, -0.0882863700389862, -0.10255187004804611, 0.16205988824367523, -0.3434333801269531, -0.1346260905265808, -0.1863880157470703, -0.06747102737426758, 0.03680989891290665, 0.26445022225379944, -0.03661877289414406, -0.4857853055000305, -0.24207057058811188, -0.030695509165525436, -0.11922135204076767, 0.44292742013931274, 0.09534447640180588, -0.12555988132953644, -0.0598941408097744, 0.03860005736351013, 0.03271102160215378, 0.8698264360427856, -0.017756963148713112, -0.48556628823280334, 0.1011933982372284, 0.012497553601861, -0.23785990476608276, 0.12738847732543945, 0.19680264592170715, -0.10208438336849213, 0.4002474844455719, -0.02519104816019535, 0.15547983348369598, -0.29487916827201843, -0.22647102177143097, 0.2518216669559479, -0.0938105657696724, 0.2748893201351166, 0.02541561797261238, 0.1629117876291275, 0.02689661644399166, -0.22394514083862305, 0.24279282987117767, -0.07284995913505554, -0.2957373559474945, -0.4095211923122406, 0.1939203441143036, 0.3621397614479065, -0.208742156624794, -0.3324578106403351, -0.4163191616535187, -0.3412547707557678, 0.30483129620552063, 0.35396477580070496, 0.2217601239681244, 0.16515980660915375, 0.14718423783779144, 0.004050268325954676, -0.27029427886009216, 0.0946023091673851, 0.11444878578186035, -0.4609878957271576, -0.05908922478556633, -0.18967537581920624, -0.20674043893814087, -0.22033973038196564, -0.17278917133808136, 0.11969815194606781, 0.15682047605514526, -0.45949503779411316, -0.1874852329492569, 0.01450190320611, 0.20228785276412964, -0.06841586530208588, -0.12153199315071106, 0.2696077525615692, -0.06867486238479614, -0.0675724595785141, -0.011354630813002586, 0.19309702515602112, 0.1305381804704666, 0.01509896107017994, -0.07666222006082535, 0.21416035294532776, 0.12008693069219589, -0.12899379432201385, 0.4839245676994324, -0.1341383457183838, -0.2982962727546692, 0.45868831872940063, -0.14829660952091217, 0.29975560307502747, -0.4732165038585663, -0.3920402228832245, 0.25456833839416504, 0.2472582906484604, -0.2930373251438141, 0.287958562374115, 0.3745381832122803, -0.06341244280338287, -0.31452545523643494, -0.16096864640712738, -0.00955627765506506, -0.17707347869873047, 0.40418580174446106, 0.2089851200580597, 0.34102863073349, -0.44032832980155945, -0.12494269013404846, -0.1967133730649948, -0.08694860339164734, 0.005069421138614416, 0.5884594917297363, 0.27646294236183167, 0.02406228706240654, -0.21659110486507416, 0.3037581741809845, 0.03214365988969803, 0.039933063089847565, 0.19482412934303284, -0.12376338988542557, -0.2956554889678955, -0.11228027194738388, 0.08544190973043442, 0.19386950135231018, 0.28487855195999146, 0.09794057160615921, 0.048267606645822525, 0.08277854323387146, -0.4667034447193146, -0.09584720432758331, 0.12186621874570847, 0.15445080399513245, -0.16744951903820038, -0.2894267439842224, 0.5744003057479858, 0.07128434628248215, -0.3223758339881897, 0.17516031861305237, 0.1193184107542038, -0.37544572353363037, -0.02782951295375824, -0.039908163249492645, 0.182968407869339, -0.21039912104606628, 0.017482077702879906, -0.01022397167980671, 0.14869408309459686, 0.3407168686389923, 0.06790763884782791, -0.15546968579292297, -0.07824864238500595, 0.06546978652477264, -0.07175616919994354, -0.02906106784939766, 0.2698785662651062, 0.2421383112668991, 0.3197580873966217, 0.4253333806991577, -0.015142704360187054, 0.5078395009040833, -0.15784919261932373, -0.38384076952934265, 0.01210091169923544, 0.12671156227588654, 0.33344730734825134, 0.3710135519504547, 0.1919391006231308, -0.03843206912279129, 0.018678974360227585, -0.1370510309934616, -0.8158698678016663, 0.5896152257919312, 0.07296960055828094, -0.22319819033145905, 0.04636756330728531, -0.2987622320652008, 0.4696882665157318, -0.10428233444690704, -0.10039824992418289, 0.21214185655117035, 0.1468675285577774, -0.30208665132522583, 0.05952632799744606, 0.4889579713344574, 0.9659134149551392, -0.25652825832366943, 0.5424618124961853, 0.09194351732730865, 0.2645851969718933, 0.2019234299659729, 0.2472119778394699, -0.050773024559020996, -0.21403346955776215, -0.38546475768089294, -0.13269971311092377, -0.1157030463218689, 0.08999611437320709, 0.028009340167045593, 0.1046665608882904, -0.00047908443957567215, 0.031876299530267715, 0.04596920311450958, 0.05550401285290718, 0.18659882247447968, 0.11254550516605377, -0.5767174959182739, -0.0885068029165268, 0.16567252576351166, 0.09787243604660034, 0.3691045641899109, -0.05015089735388756, -0.09385261684656143, -0.0038341255858540535, -0.005517153535038233, 0.011954973451793194, -0.10706773400306702, -0.13355597853660583, 0.002082299906760454, 0.006706598214805126, -0.2064538598060608, -0.03684569522738457, 0.323946475982666, 0.19034700095653534, 0.04620659351348877, -0.1460287719964981, 0.16984842717647552, -0.2683292627334595, 0.14354348182678223, -0.03717269375920296, -0.2572738826274872, 0.427156537771225, 0.06038418784737587, 0.12325745075941086, -0.0871603861451149, -0.03428460285067558, -0.44875481724739075, -0.1154082641005516, -0.14011742174625397, 0.679542601108551, -0.20165973901748657, -0.04418732225894928, -0.17131884396076202, 0.04547813907265663, 0.1947474330663681, 0.13561800122261047, 0.1881376951932907, 0.14648579061031342, -0.14708371460437775, 0.3069869875907898, -0.16325229406356812, 0.04228348657488823, 0.1818501204252243, 0.02069123461842537, -0.48314347863197327, 0.13899849355220795, 0.05715806782245636, 0.13795220851898193, -0.2186935693025589, 0.5137710571289062, 0.6890596747398376, -0.1856100708246231, 0.09501544386148453, 0.25501564145088196, -0.17697054147720337, -0.08096124976873398, 0.7742313146591187, 0.36072486639022827, -0.4379705488681793, -0.21554888784885406, -0.0806494653224945, -0.5159037709236145, 0.18804796040058136, -0.3054278790950775, 0.34261205792427063, -0.06712432950735092, -0.020532576367259026, 0.16776756942272186, 0.04460316523909569, -0.3304334580898285, 0.061592768877744675, -0.24062588810920715, 0.12688352167606354, 0.4618700444698334, 0.2617570459842682, 0.28104323148727417, 0.04870108887553215, 0.04793822392821312, -0.09347660094499588, -0.18094226717948914, -0.08970525860786438, -0.18199719488620758, 0.15694260597229004, 0.09658928960561752, 0.1295960694551468, -0.024712255224585533, -0.2508898079395294, -0.1646745651960373, -0.07659298181533813, 0.11851318180561066, -0.21175454556941986, -0.16170097887516022, 0.1377967894077301, -0.15359513461589813, 0.03597535938024521, -0.13334549963474274, 0.26761922240257263, 0.006911001168191433, 0.35296300053596497, 0.08983974903821945, -0.36572325229644775, -0.24567057192325592, -0.34134581685066223, 0.24445413053035736, 0.24186719954013824, 0.133336141705513, 0.005995084997266531, 0.19237874448299408, 0.2601994574069977, 0.16151881217956543, 0.03549179062247276, 0.3301911950111389, -0.2450646311044693, -0.16395941376686096, 0.13434070348739624, 0.47915148735046387, 0.21196715533733368, -0.13090145587921143, -0.20894287526607513, -0.08899493515491486, -0.2090013027191162, 0.1344103068113327, 0.29510098695755005, -0.23451237380504608, 0.3950612246990204, -0.04755640774965286, -0.1903671771287918, 0.1842793971300125, 0.11069338768720627, -0.062436290085315704, 0.14889423549175262, -0.3155521750450134, 0.0609465055167675, 0.24178047478199005, 0.19078165292739868, 0.1738513559103012, 0.4474366009235382, -0.5088698267936707, 0.2313017100095749, -0.35259532928466797, 0.13279743492603302, 0.437177836894989, -0.3301295042037964, 0.08896373957395554, -0.08135129511356354, 0.2755257189273834, 0.1303030550479889, -0.4082707166671753, 0.26086699962615967, -0.19795319437980652, -0.38858485221862793, -0.007152625825256109, 0.09987594932317734, -0.17697860300540924, 0.1098460927605629, -0.539264440536499, -0.1054767593741417, -0.09678226709365845, 0.21018454432487488, -0.07887803018093109, -0.17323929071426392, 0.13058903813362122, 0.11520837992429733, 0.17595325410366058, 0.2512296438217163, -0.15431082248687744, 0.20875035226345062, 0.060965947806835175, -0.05606954172253609, 0.22936810553073883, -0.051076266914606094, 0.1742602288722992, 0.37242618203163147, 0.37319332361221313, -0.33608773350715637, 0.3672219514846802, 0.10794075578451157, 0.19731813669204712, -0.06042352691292763, -0.11457175761461258, -0.07519787549972534, -0.08536012470722198, -0.27787986397743225, 0.21988850831985474, 0.13205429911613464, 0.13609623908996582, -0.13982434570789337, 0.23059268295764923, -0.28977078199386597, 0.14701104164123535, -0.44134706258773804, 0.2855164706707001, 0.38366007804870605, 0.11161923408508301, -0.2781771123409271, 0.2666490972042084, -0.3031940758228302, 0.1557965874671936, 0.1269330233335495, 0.04708326607942581, 0.05621597543358803, 0.22013692557811737, 0.04916229471564293, 0.04081857204437256, 0.6757800579071045, 0.12306290119886398, -0.0002568970958236605, -0.42201924324035645, -0.2528705894947052, -0.44941285252571106, 0.10869190096855164, 0.14980822801589966, -0.2966710329055786, 0.014645010232925415, 0.019230730831623077, 0.28938132524490356, 0.3351862132549286, -0.13273228704929352, -0.25388234853744507, 0.27438023686408997, -0.07673712074756622, -0.27864590287208557, -0.12928563356399536, 0.34085404872894287, 0.22063477337360382, 0.05678220093250275, -0.28513848781585693, 0.20806264877319336, -0.1478380411863327, 0.0750446617603302, 0.22634944319725037, -0.16681663691997528, -0.16189932823181152, -0.08489233255386353, 0.40187525749206543, -0.16492727398872375, 0.08866269141435623, 0.032363634556531906, -0.1147097498178482, -0.14090317487716675, -0.12374471873044968, -0.29879167675971985, -0.1430526077747345, 0.14656393229961395, 0.4959651231765747, -0.4086171090602875, 0.10195744037628174, -0.5701283812522888, -0.16370846331119537, 0.12768928706645966, 0.011801944114267826, -0.24403022229671478, 0.03649473935365677, -0.08011937886476517, -0.09490082412958145, 0.09797526150941849, 0.47454705834388733, -0.18974873423576355, -0.3523242771625519, -0.36046531796455383, -0.15092988312244415, 0.5336055755615234, -0.36225107312202454, -0.017983712255954742, -0.0006382319261319935, -0.10823795199394226, 0.057923197746276855, 0.130881205201149, -0.13446137309074402, 0.15276794135570526, 0.25431177020072937, 0.10608270019292831, -0.12743976712226868, 0.23315297067165375, 0.1409253031015396, -0.017738081514835358, -0.10208176076412201, 0.18049272894859314, -0.01225380040705204, 0.1106826514005661, -0.09724245220422745, -0.34073692560195923 ]
https://github.com/huggingface/datasets/issues/2508
Load Image Classification Dataset from Local
Opening this back up, since I'm planning on tackling this. Already posted a quick version of it on my account on the hub. ```python from datasets import load_dataset ds = load_dataset('nateraw/image-folder', data_files='PetImages/') ```
**Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset
33
Load Image Classification Dataset from Local **Is your feature request related to a problem? Please describe.** Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader. **Describe the solution you'd like** Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10". **Describe alternatives you've considered** Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path) Write custom data loader logic **Additional context** We're training ViT on custom dataset Opening this back up, since I'm planning on tackling this. Already posted a quick version of it on my account on the hub. ```python from datasets import load_dataset ds = load_dataset('nateraw/image-folder', data_files='PetImages/') ```
[ -0.20274943113327026, -0.18869063258171082, 0.01317841187119484, 0.40116360783576965, 0.2593051493167877, -0.027974193915724754, 0.19759726524353027, 0.1451178640127182, 0.3119896948337555, 0.28576549887657166, -0.19353516399860382, 0.12354744970798492, -0.30474144220352173, 0.3270208239555359, 0.06507790833711624, -0.22926053404808044, -0.22782555222511292, 0.33788153529167175, -0.15620441734790802, -0.2475796788930893, -0.05624262988567352, -0.09633232653141022, 0.16608332097530365, -0.008866283111274242, -0.30983880162239075, 0.1793598234653473, -0.24538233876228333, 0.5447189807891846, -0.11850137263536453, -0.10167582333087921, 0.4887920320034027, 0.033363837748765945, 0.3943757116794586, 0.5124264359474182, -0.00010685518645914271, 0.08726618438959122, -0.12944567203521729, -0.26511722803115845, -0.06088906526565552, -0.2519891858100891, -0.020675061270594597, -0.1543317437171936, 0.24183721840381622, -0.2121085673570633, -0.49971526861190796, -0.055161457508802414, 0.046199675649404526, -0.39649835228919983, 0.46589162945747375, 0.19286833703517914, 0.17464512586593628, 0.12687289714813232, -0.3423510491847992, 0.026652788743376732, -0.22405941784381866, 0.4555782973766327, -0.13813112676143646, 0.40508097410202026, 0.4020671546459198, -0.24227288365364075, -0.05631263554096222, 0.2717683017253876, 0.0958082526922226, -0.0036631771363317966, 0.5949127078056335, 0.32277166843414307, -0.16113275289535522, -0.2097162902355194, -0.18577131628990173, 0.18643726408481598, 0.16504469513893127, -0.07890696078538895, -0.12299363315105438, -0.18922045826911926, 0.10587037354707718, -0.10916806012392044, 0.06453075259923935, 0.11946915090084076, -0.4392840266227722, 0.235085591673851, -0.25824204087257385, -0.17843161523342133, -0.44801822304725647, 0.09942631423473358, 0.026265565305948257, -0.3858403265476227, -0.08957292884588242, -0.05669490620493889, 0.12812945246696472, -0.023398904129862785, -0.1673014760017395, 0.08378947526216507, 0.14295287430286407, 0.49851536750793457, -0.16984696686267853, -0.22420889139175415, 0.01193079724907875, 0.09449324011802673, 0.07475299388170242, -0.16140514612197876, 0.11793552339076996, -0.033783622086048126, -0.4530229866504669, 0.07254525274038315, 0.19356867671012878, 0.11958718299865723, -0.046338021755218506, 0.3049667477607727, -0.10349879413843155, 0.00025658923550508916, -0.4169120490550995, -0.1191151887178421, -0.30126452445983887, -0.034427039325237274, -0.17448045313358307, -0.046803414821624756, -0.01930342987179756, -0.1389567255973816, 0.16125082969665527, -0.1624351441860199, 0.10291852056980133, 0.1908903867006302, 0.15040653944015503, 0.24245895445346832, -0.0482727512717247, -0.003193322801962495, 0.10312823951244354, -0.1202346459031105, -0.22834643721580505, -0.06363873928785324, -0.19175195693969727, 0.1401708424091339, -0.25989291071891785, 0.11193890124559402, 0.07595572620630264, -0.29916873574256897, 0.04138634726405144, -0.21505685150623322, 0.47285550832748413, 0.2309122383594513, -0.058794986456632614, -0.15649248659610748, 0.3177804946899414, 0.1721373200416565, -0.3297012150287628, -0.2200271338224411, 0.34120097756385803, -0.16476596891880035, -0.24466922879219055, 0.09085822105407715, -0.3651208281517029, -0.2542337477207184, 0.09028993546962738, 0.15490320324897766, 0.05807087570428848, -0.13078245520591736, -0.35271769762039185, 0.15043486654758453, -0.4175848960876465, 0.01915203407406807, -0.19445864856243134, -0.007577361073344946, -0.34219828248023987, -0.05169830471277237, 0.34788990020751953, 0.46906858682632446, -0.3932284116744995, -0.165291428565979, -0.16187943518161774, -0.13978947699069977, -0.06414023041725159, 0.3136606216430664, -0.22971606254577637, 0.3035103976726532, -0.16295655071735382, -0.005274122580885887, 0.22359950840473175, -0.5785589218139648, -0.11556987464427948, 0.2601819634437561, -0.1376010626554489, 0.16513073444366455, -0.1817651391029358, 0.4197823107242584, 0.04826643690466881, -0.023476773872971535, -0.11054723709821701, 0.7269153594970703, -0.2688496708869934, 0.08746614307165146, 0.007872484624385834, -0.3116488456726074, -0.09151312708854675, 0.41748538613319397, 0.018892500549554825, 0.27932125329971313, 0.05959552526473999, -0.09819649159908295, 0.08943542093038559, -0.25810927152633667, 0.019927499815821648, -0.04673801362514496, 0.22555464506149292, 0.27702680230140686, -0.0013278091792017221, 0.0582767091691494, -0.32413002848625183, 0.41058549284935, -0.012332410551607609, 0.2917642891407013, -0.11264564841985703, -0.06836595386266708, -0.14588871598243713, -0.1702473759651184, -0.272226482629776, -0.13478362560272217, 0.047026537358760834, 0.08643016219139099, -0.06603171676397324, -0.1581670343875885, -0.3154454529285431, 0.34854063391685486, -0.42568275332450867, 0.1370667666196823, 0.1380571871995926, 0.1380336731672287, 0.18718373775482178, -0.021698854863643646, -0.16577313840389252, -0.0027625872753560543, -0.18125002086162567, -0.17276141047477722, -0.11711691319942474, 0.20029273629188538, 0.07996838539838791, 0.2456364929676056, 0.2190038114786148, 0.14015987515449524, 0.26871511340141296, -0.2863893210887909, -0.007938528433442116, -0.07204333692789078, 0.2825770974159241, 0.08579375594854355, -0.2918453514575958, 0.45477524399757385, -0.020383475348353386, 0.22213716804981232, 0.1012875959277153, -0.11007469147443771, 0.015549023635685444, -0.12118639796972275, 0.050989918410778046, -0.07945546507835388, 0.12321615219116211, 0.4209693372249603, 0.3136689364910126, 0.12994897365570068, -0.17778542637825012, -0.19411295652389526, -0.08125331252813339, 0.05859968066215515, -0.001989044714719057, 0.26398852467536926, 0.023717250674962997, 0.29418784379959106, 0.028450235724449158, -0.1595568209886551, 0.4201910197734833, 0.1286083608865738, -0.14480945467948914, 0.1587541699409485, 0.07808995246887207, 0.044938284903764725, -0.04981393367052078, -0.010746857151389122, 0.06404752284288406, -0.058643534779548645, -0.007913943380117416, 0.15365971624851227, -0.3867429494857788, -0.1319255530834198, -0.23638105392456055, 0.0018708719871938229, -0.007926439866423607, 0.285234272480011, -0.10098130255937576, -0.3875076174736023, -0.14908261597156525, -0.15533143281936646, -0.10845011472702026, 0.34734994173049927, 0.04786703363060951, -0.13405372202396393, -0.09208789467811584, 0.03237651288509369, 0.0645408183336258, 0.7125996351242065, -0.024851975962519646, -0.4691966772079468, 0.10370010882616043, -0.046753086149692535, -0.18146754801273346, 0.1466982662677765, 0.21568796038627625, -0.0644049346446991, 0.36036771535873413, -0.06692133098840714, 0.06591469794511795, -0.22020357847213745, -0.2478676438331604, 0.19267934560775757, -0.08452331274747849, 0.33983027935028076, 0.022336993366479874, 0.21821074187755585, -0.028224561363458633, -0.16701509058475494, 0.3136243522167206, -0.12519274652004242, -0.22485624253749847, -0.37214788794517517, 0.15396374464035034, 0.3486579656600952, -0.209230437874794, -0.3167016804218292, -0.5308418273925781, -0.31423336267471313, 0.3089395761489868, 0.4514375627040863, 0.20633448660373688, 0.21603094041347504, 0.19251352548599243, 0.02034023590385914, -0.20600666105747223, 0.11678314954042435, 0.07099086046218872, -0.5225772857666016, 0.026053451001644135, -0.24021443724632263, -0.2574024498462677, -0.20382435619831085, -0.18804648518562317, 0.08936861157417297, 0.017909226939082146, -0.37262871861457825, -0.3170894682407379, -0.0948067307472229, 0.1927018016576767, -0.0982365608215332, -0.008915369398891926, 0.1456407606601715, -0.07697650790214539, -0.09270238876342773, -0.038081128150224686, 0.2784571051597595, 0.13741715252399445, 0.022646930068731308, -0.20678885281085968, 0.10488319396972656, 0.04211476817727089, -0.09494569897651672, 0.3632552921772003, -0.11899074912071228, -0.18582318723201752, 0.4987354874610901, -0.21889884769916534, 0.27804893255233765, -0.5007696747779846, -0.47051048278808594, 0.15549184381961823, 0.20242859423160553, -0.31579723954200745, 0.23610559105873108, 0.3836195766925812, 0.041703153401613235, -0.34288644790649414, -0.08299398422241211, -0.01105592679232359, -0.24689921736717224, 0.32236579060554504, 0.34233227372169495, 0.2638840973377228, -0.3573633134365082, -0.14199785888195038, -0.21695052087306976, -0.07887213677167892, -0.004416431300342083, 0.5882697105407715, 0.19839581847190857, 0.005052702967077494, -0.3221975266933441, 0.2321481853723526, -0.08202710002660751, 0.009445006027817726, 0.20026202499866486, -0.11622600257396698, -0.24068129062652588, -0.10602255165576935, 0.058375511318445206, 0.148995503783226, 0.3460448980331421, 0.10161428153514862, 0.06719037145376205, 0.12306611984968185, -0.5372580289840698, -0.14383113384246826, 0.10073543339967728, 0.05972277373075485, -0.20579059422016144, -0.2554805874824524, 0.6490070819854736, 0.06818687170743942, -0.3536732792854309, 0.15852820873260498, 0.09916738420724869, -0.34918972849845886, -0.03281634300947189, -0.16182327270507812, 0.06737315654754639, -0.2876483201980591, -0.003782606218010187, 0.03760442137718201, 0.28751957416534424, 0.2628846764564514, 0.13155679404735565, -0.17344801127910614, -0.017633244395256042, 0.1536102443933487, -0.02931162156164646, 0.027830881997942924, 0.285774290561676, 0.22905445098876953, 0.2562815248966217, 0.32515397667884827, -0.07947250455617905, 0.5093401670455933, -0.21596728265285492, -0.475289523601532, -0.03890445455908775, 0.11177033185958862, 0.3309125304222107, 0.35345569252967834, 0.1149047389626503, 0.0006215526955202222, -0.031412895768880844, -0.018764209002256393, -0.8070135116577148, 0.5762056112289429, 0.0688987597823143, -0.14180682599544525, 0.086675725877285, -0.4121037721633911, 0.48845046758651733, -0.09917523711919785, -0.0336984321475029, 0.1793900430202484, 0.21293260157108307, -0.2754082977771759, 0.10616476833820343, 0.38791173696517944, 0.9502137899398804, -0.2089955061674118, 0.5667913556098938, 0.16774882376194, 0.2664766311645508, 0.2431255728006363, 0.23489230871200562, -0.10476700961589813, -0.1616082340478897, -0.415546715259552, -0.10519800335168839, -0.07668634504079819, 0.1650698184967041, 0.05884995684027672, 0.07655005902051926, 0.03806879371404648, -0.023941725492477417, -0.05125173553824425, 0.01529591716825962, 0.1511949747800827, 0.008729863911867142, -0.5815859436988831, -0.31450262665748596, 0.20947907865047455, 0.15352821350097656, 0.39916396141052246, -0.04692380502820015, -0.06686840951442719, -0.06173595041036606, 0.007363293785601854, 0.026992592960596085, -0.10284163057804108, -0.11251407861709595, 0.03628966212272644, 0.0071027386002242565, -0.23410113155841827, -0.10180628299713135, 0.36089256405830383, 0.2642953395843506, 0.07599758356809616, -0.1297740340232849, 0.19389234483242035, -0.3031800091266632, 0.17490768432617188, -0.08443441987037659, -0.18841488659381866, 0.4033648371696472, 0.03063378669321537, 0.04023966193199158, -0.0778917744755745, -0.0464993380010128, -0.4463988244533539, -0.051501065492630005, -0.0914788544178009, 0.5949822068214417, -0.1436307281255722, -0.1442607343196869, -0.15262869000434875, 0.05576284974813461, 0.11643800139427185, 0.1565445065498352, 0.22117826342582703, 0.05896397680044174, -0.05664018914103508, 0.25800105929374695, -0.24737147986888885, 0.07999347150325775, 0.2593116760253906, 0.07327047735452652, -0.42430105805397034, 0.2710447609424591, 0.13120537996292114, 0.12364361435174942, -0.2333192378282547, 0.47938457131385803, 0.592904806137085, -0.09431108832359314, 0.1389593780040741, 0.2627602517604828, -0.13871406018733978, -0.09826388210058212, 0.7520089745521545, 0.3514801561832428, -0.42761513590812683, -0.17810237407684326, -0.18496225774288177, -0.5113024711608887, 0.1392212212085724, -0.1715734452009201, 0.33888471126556396, 0.00485459016636014, 0.07195916026830673, 0.19595378637313843, 0.02115153893828392, -0.36290499567985535, 0.11498319357633591, -0.27954158186912537, 0.07819951325654984, 0.3643580377101898, 0.22435113787651062, 0.35020866990089417, -0.008417824283242226, 0.08530718088150024, -0.026258667930960655, -0.15960988402366638, -0.16164815425872803, -0.2193170189857483, 0.13571619987487793, 0.07672067731618881, 0.12132138013839722, 0.044762108474969864, -0.1669972985982895, -0.1648412048816681, -0.08506312221288681, 0.15923312306404114, -0.08061069250106812, -0.14873048663139343, 0.19324100017547607, -0.14174184203147888, 0.010405967012047768, -0.10491885989904404, 0.2175503820180893, 0.015971053391695023, 0.29047080874443054, 0.13888268172740936, -0.3403908312320709, -0.23932619392871857, -0.26673588156700134, 0.3110297620296478, 0.1864568144083023, 0.12961570918560028, -0.01709088869392872, 0.19882440567016602, 0.17548397183418274, 0.1664516180753708, 0.043294452130794525, 0.3626081347465515, -0.20049093663692474, -0.22120942175388336, 0.22354482114315033, 0.46676114201545715, 0.2406204491853714, -0.1922973096370697, -0.2187252640724182, -0.08077241480350494, -0.180143341422081, 0.2173096239566803, 0.30762526392936707, -0.25529244542121887, 0.38368263840675354, -0.17840273678302765, -0.12800240516662598, 0.1589684635400772, 0.10560069233179092, -0.06708290427923203, 0.16689130663871765, -0.29202455282211304, 0.07530344277620316, 0.14008523523807526, 0.1639074981212616, 0.15058645606040955, 0.4241305887699127, -0.5359811782836914, 0.20329393446445465, -0.42836135625839233, 0.10268866270780563, 0.38705211877822876, -0.38398224115371704, 0.09441583603620529, 0.022355999797582626, 0.18999391794204712, 0.16335487365722656, -0.39740651845932007, 0.36311960220336914, -0.24559742212295532, -0.33433282375335693, -0.015243679285049438, 0.1304396092891693, -0.11918788403272629, 0.035759903490543365, -0.44166678190231323, -0.061372093856334686, -0.15142349898815155, 0.17021657526493073, -0.06522504985332489, -0.21508927643299103, 0.012494191527366638, 0.0824306458234787, 0.18490207195281982, 0.2537664473056793, -0.25654783844947815, 0.2063063234090805, 0.13199163973331451, -0.06578952819108963, 0.11269433051347733, 0.04142902046442032, 0.1676037758588791, 0.27876612544059753, 0.37830448150634766, -0.2263227105140686, 0.4136289656162262, 0.06329142302274704, 0.21889515221118927, -0.03347539156675339, -0.12379798293113708, -0.08262035250663757, -0.04447997361421585, -0.25868695974349976, 0.2596137821674347, 0.20828983187675476, 0.1723279058933258, -0.20080140233039856, 0.1348542720079422, -0.1885300725698471, 0.23332078754901886, -0.5136281251907349, 0.3722878098487854, 0.3565177321434021, 0.11054978519678116, -0.22044427692890167, 0.23794245719909668, -0.35085341334342957, 0.1727730929851532, 0.19168399274349213, 0.06681277602910995, 0.10187939554452896, 0.1869107484817505, 0.060096267610788345, 0.06173596531152725, 0.6641269326210022, 0.1494380086660385, 0.021015498787164688, -0.40507689118385315, -0.2557224631309509, -0.5360121726989746, 0.08164951205253601, 0.10624450445175171, -0.2939189374446869, 0.008479832671582699, 0.030625443905591965, 0.2576010227203369, 0.39802128076553345, -0.11944351345300674, -0.31557074189186096, 0.16355185210704803, -0.04189175367355347, -0.2796112596988678, -0.11194363236427307, 0.24544739723205566, 0.21006706357002258, 0.08102316409349442, -0.3084847033023834, 0.18343527615070343, -0.21360334753990173, 0.11777664721012115, 0.2491156905889511, -0.10128249228000641, -0.19141772389411926, -0.11908931285142899, 0.3701430857181549, -0.13826437294483185, 0.07338976114988327, -0.0025672006886452436, -0.1067173033952713, -0.12259574234485626, -0.13005581498146057, -0.2726759910583496, -0.0744350478053093, 0.07214003801345825, 0.5224916934967041, -0.4053120017051697, 0.08760428428649902, -0.48864850401878357, -0.09441160410642624, 0.18753281235694885, -0.06869379431009293, -0.2719264626502991, 0.04538785666227341, 0.07303865998983383, -0.0700625330209732, 0.010300921276211739, 0.5261640548706055, -0.23777459561824799, -0.2638460695743561, -0.3279537856578827, -0.1958242803812027, 0.5588268637657166, -0.4133073687553406, -0.13756829500198364, -0.06331196427345276, -0.047528792172670364, -0.04373160004615784, 0.07300904393196106, -0.16225095093250275, 0.2003907710313797, 0.2113155871629715, 0.1249169260263443, -0.21200688183307648, 0.3038727641105652, 0.13361306488513947, -0.058835484087467194, -0.08380255103111267, 0.14373084902763367, -0.028081754222512245, 0.14666442573070526, -0.060199737548828125, -0.36509978771209717 ]
https://github.com/huggingface/datasets/issues/2503
SubjQA wrong boolean values in entries
@arnaudstiegler I have just checked that these mismatches are already present in the original dataset: https://github.com/megagonlabs/SubjQA We are going to contact the dataset owners to report this.
## Describe the bug SubjQA seems to have a boolean that's consistently wrong. It defines: - question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective). - is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective) However, `is_ques_subjective` seems to have wrong values in the entire dataset. For instance, in the example in the dataset card, we have: - "question_subj_level": 2 - "is_ques_subjective": false However, according to the description, the question should be subjective since the `question_subj_level` is below 4
27
SubjQA wrong boolean values in entries ## Describe the bug SubjQA seems to have a boolean that's consistently wrong. It defines: - question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective). - is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective) However, `is_ques_subjective` seems to have wrong values in the entire dataset. For instance, in the example in the dataset card, we have: - "question_subj_level": 2 - "is_ques_subjective": false However, according to the description, the question should be subjective since the `question_subj_level` is below 4 @arnaudstiegler I have just checked that these mismatches are already present in the original dataset: https://github.com/megagonlabs/SubjQA We are going to contact the dataset owners to report this.
[ 0.1235659047961235, 0.06930442899465561, 0.027031617239117622, 0.16452011466026306, -0.33659592270851135, -0.006898868829011917, 0.086507149040699, 0.045239534229040146, -0.09279773384332657, 0.18643911182880402, -0.09195936471223831, 0.4202955663204193, 0.21497048437595367, 0.254909873008728, -0.21842673420906067, 0.12297321856021881, 0.22864896059036255, 0.1842409372329712, -0.1363600641489029, -0.1547207236289978, -0.4317787289619446, 0.26057589054107666, -0.5335964560508728, -0.011904846876859665, -0.12751390039920807, -0.20236603915691376, -0.13335824012756348, -0.142206072807312, -0.2238849550485611, -0.29324615001678467, 0.0730004534125328, -0.033539120107889175, -0.08117668330669403, 0.12340910732746124, -0.0001093274840968661, -0.20345866680145264, 0.052636537700891495, 0.016232674941420555, -0.21767956018447876, 0.07691755145788193, -0.2617805600166321, -0.041756175458431244, -0.19781476259231567, 0.04866917431354523, -0.3357686400413513, -0.44701963663101196, -0.20890246331691742, -0.2683669328689575, 0.38990822434425354, 0.009100032038986683, 0.17203013598918915, 0.06109701097011566, -0.16620412468910217, 0.24745646119117737, 0.35396507382392883, -0.1808389127254486, -0.049236878752708435, 0.2432311773300171, -0.04377681761980057, -0.046364925801754, 0.1507539302110672, 0.3817000985145569, 0.08788822591304779, 0.07928776741027832, 0.11952733248472214, -0.13141992688179016, -0.06438326835632324, -0.24493475258350372, 0.2853112816810608, 0.24337677657604218, 0.3400312662124634, -0.14749641716480255, -0.43723663687705994, -0.08656217157840729, -0.06885138154029846, -0.11942222714424133, 0.2729387581348419, 0.026780184358358383, 0.13243435323238373, -0.046557918190956116, 0.10462463647127151, 0.3983646333217621, 0.10855430364608765, -0.041074976325035095, -0.11356428265571594, 0.1411965936422348, -0.12439713627099991, -0.028229668736457825, -0.1896747499704361, -0.11828289180994034, 0.016792437061667442, 0.0029048470314592123, -0.635251522064209, 0.10342617332935333, -0.47202959656715393, -0.05522928014397621, -0.06515440344810486, 0.15203675627708435, -0.15406948328018188, -0.33750060200691223, 0.2958488464355469, -0.050364818423986435, 0.20317354798316956, 0.1381499469280243, 0.5345704555511475, 0.25543347001075745, 0.3524949848651886, -0.20063553750514984, -0.09164536744356155, -0.25440874695777893, 0.04281799495220184, 0.06384903937578201, 0.19854609668254852, -0.27885904908180237, -0.0028029645327478647, 0.08877857774496078, 0.10842286050319672, -0.30411267280578613, -0.5812082290649414, 0.15725694596767426, -0.4001149535179138, -0.045035600662231445, 0.13402119278907776, 0.09278497844934464, 0.04765346646308899, -0.22272935509681702, -0.09906646609306335, 0.02095247432589531, -0.13459211587905884, -0.4782004654407501, -0.12395203858613968, -0.023846512660384178, -0.1999012976884842, 0.054494112730026245, 0.019470443949103355, -0.018034223467111588, -0.0020736365113407373, 0.37193015217781067, -0.19799073040485382, -0.22391825914382935, 0.00915233138948679, -0.28844964504241943, 0.2214835286140442, 0.20325519144535065, -0.24966619908809662, 0.20088037848472595, 0.04937192052602768, -0.05211492255330086, -0.014767508953809738, 0.3387773931026459, 0.08916956931352615, 0.18195892870426178, -0.03698428347706795, 0.18043851852416992, -0.08917522430419922, -0.05787450447678566, 0.14108577370643616, 0.3233657777309418, 0.2153366357088089, 0.038241397589445114, 0.06313205510377884, -0.20672371983528137, -0.1559421271085739, -0.09162300080060959, -0.03643021360039711, 0.1502397060394287, -0.675310492515564, -0.10317765176296234, -0.008157491683959961, 0.23791295289993286, 0.011878052726387978, 0.18061627447605133, 0.19111599028110504, 0.2914661765098572, 0.0767868235707283, -0.08618681132793427, -0.2743885815143585, 0.19276295602321625, -0.425207257270813, 0.09993929415941238, 0.4220338463783264, -0.08126328140497208, -0.23457227647304535, 0.20562893152236938, 0.17051346600055695, 0.034827932715415955, 0.18625250458717346, 0.0711834579706192, 0.09806441515684128, -0.1092921793460846, -0.4336033761501312, -0.0682205855846405, -0.019869960844516754, 0.2016846388578415, -0.18399587273597717, -0.07026243209838867, 0.05195526033639908, -0.48572838306427, 0.1369778960943222, 0.17610310018062592, -0.2915922701358795, 0.0750328078866005, 0.45790907740592957, -0.3810139298439026, 0.2863348722457886, 0.037702757865190506, 0.11688171327114105, 0.19428114593029022, -0.405864417552948, 0.002586370799690485, 0.5612459778785706, -0.09352897852659225, -0.1990174800157547, 0.10169515758752823, 0.04799079895019531, -0.18118993937969208, 0.12318114936351776, 0.14439332485198975, -0.34422439336776733, -0.031230702996253967, -0.28290262818336487, -0.061852119863033295, 0.11431338638067245, -0.06969951093196869, 0.13980479538440704, -0.1327400654554367, -0.077132448554039, 0.0567474290728569, 0.45959728956222534, 0.34036076068878174, 0.4474404454231262, 0.06925535202026367, -0.09828881919384003, 0.17804662883281708, 0.08166626840829849, -0.10032887756824493, -0.13978780806064606, -0.21588104963302612, -0.09324175119400024, -0.10094127058982849, 0.04860047623515129, 0.5878676176071167, -0.09767130017280579, 0.34598222374916077, 0.15444231033325195, 0.4633137583732605, 0.0811571404337883, -0.14658264815807343, -0.3019922375679016, 0.20433993637561798, -0.030488168820738792, -0.1946275383234024, -0.17291302978992462, -0.4056318700313568, 0.23564687371253967, 0.05240490660071373, -0.08954665809869766, 0.24771930277347565, 0.14113809168338776, 0.2954144775867462, 0.31672585010528564, -0.18549838662147522, 0.2649506628513336, -0.2104395031929016, -0.020296946167945862, -0.06528504192829132, 0.24694789946079254, 0.4416826665401459, 0.11517693847417831, 0.19547241926193237, -0.09817737340927124, -0.06250198185443878, -0.16931650042533875, -0.045424532145261765, 0.21418002247810364, 0.16796818375587463, -0.25506114959716797, -0.008373426273465157, 0.05599451810121536, 0.15833677351474762, -0.2140285223722458, 0.7436456084251404, -0.056171949952840805, 0.04292136803269386, -0.3219943046569824, 0.3840668797492981, -0.3165830671787262, -0.30227118730545044, 0.006539519410580397, -0.5269257426261902, 0.028216859325766563, -0.22704598307609558, 0.46890172362327576, -0.39127930998802185, -0.4067312777042389, 0.3903203308582306, 0.4209657609462738, 0.6782057881355286, -0.14898836612701416, 0.1956745982170105, -0.02830611728131771, -0.05630124732851982, -0.5697386860847473, 0.07571591436862946, 0.03661157563328743, -0.23676878213882446, 0.05959683284163475, -0.13793139159679413, -0.13686800003051758, -0.007209941279143095, -0.2768763303756714, 0.11925921589136124, 0.0006520817405544221, 1.0724871158599854, -0.2695174217224121, -0.1467302441596985, -0.11903459578752518, 0.11935402452945709, -0.15747393667697906, 0.15902867913246155, -0.05399065837264061, 0.09066932648420334, -0.1739587038755417, -0.16750773787498474, -0.12466800957918167, -0.35159561038017273, 0.03825800120830536, 0.004620480351150036, -0.14376750588417053, -0.20554764568805695, 0.26745718717575073, 0.4465823471546173, -0.16141276061534882, -0.39937111735343933, 0.07139363139867783, -0.01734098605811596, -0.3348316550254822, -0.26317474246025085, 0.33404454588890076, 0.05222540348768234, -0.5183653235435486, -0.09259027987718582, -0.1297246813774109, 0.40315306186676025, -0.26574739813804626, -0.3338995575904846, 0.3003414273262024, 0.06765145808458328, -0.22141727805137634, 0.3181123733520508, -0.3968440890312195, -0.14733517169952393, -0.2791084945201874, -0.12106730788946152, -0.15482337772846222, -0.6240270137786865, 0.13611295819282532, 0.17354035377502441, 0.4568224847316742, -0.04876447468996048, 0.14952369034290314, 0.15563611686229706, -0.0425293892621994, 0.3412081003189087, 0.16516821086406708, 0.3119771480560303, 0.31864306330680847, 0.3356916308403015, 0.08319156616926193, -0.2547817528247833, 0.3756682574748993, -0.02739904448390007, -0.21273918449878693, 0.38958635926246643, 0.05990539491176605, -0.22885951399803162, -0.12770311534404755, -0.1800573617219925, -0.30491793155670166, -0.04357064887881279, -0.2200165092945099, -0.19133585691452026, -0.08325345069169998, 0.2246248424053192, 0.3975693881511688, 0.0006996123120188713, -0.11591726541519165, 0.004276682157069445, 0.027291420847177505, 0.11277104914188385, 0.007455575745552778, -0.12311489135026932, -0.2056865692138672, 0.12326747924089432, 0.25218382477760315, -0.21219925582408905, 0.4180154502391815, 0.04515847563743591, -0.009737507440149784, 0.0432472750544548, -0.061841513961553574, 0.33638036251068115, 0.10824152082204819, 0.1873941570520401, 0.16635508835315704, 0.2925170660018921, -0.37216174602508545, -0.2798997163772583, 0.02996871806681156, 0.052657514810562134, 0.3983994126319885, -0.24954929947853088, 0.03456287831068039, 0.1566704660654068, 0.15289521217346191, -0.2442188858985901, -0.3942863643169403, -0.39825841784477234, -0.5250513553619385, -0.06740817427635193, 0.07311968505382538, -0.21327856183052063, -0.08598314225673676, -0.04576829820871353, 0.03692002221941948, -0.2266894429922104, -0.09521346539258957, -0.20533187687397003, 0.1177324578166008, 0.36156585812568665, 0.17255175113677979, -0.1322091966867447, 0.3831833600997925, 0.05722244828939438, 0.41391491889953613, 0.013375813141465187, 0.2656075060367584, -0.001958721550181508, 0.16442285478115082, 0.015755319967865944, -0.13113641738891602, -0.021649572998285294, 0.011955724097788334, -0.11180649697780609, 0.1419660896062851, 0.07806568592786789, -0.0004623934510163963, -0.29044628143310547, -0.23819983005523682, 0.19093826413154602, 0.29209262132644653, 0.1383163034915924, -0.22429753839969635, 0.5193614959716797, -0.26954758167266846, -0.3641125559806824, 0.14062905311584473, 0.15547986328601837, 0.04879618063569069, 0.43079543113708496, 0.5219876766204834, 0.7752367854118347, 0.024950824677944183, -0.199474036693573, 0.023231174796819687, -0.5342604517936707, 0.2276938557624817, 0.18810953199863434, 0.06588874012231827, -0.32784518599510193, -0.022209474816918373, 0.04158228635787964, 0.051227670162916183, 0.08640183508396149, -0.07821092754602432, -0.23843823373317719, 0.24361351132392883, -0.061431534588336945, 0.2418658286333084, 0.19699952006340027, -0.42353594303131104, 0.04831711947917938, 0.20416992902755737, 0.07956467568874359, 0.1667337268590927, 0.050510987639427185, 0.2443150132894516, -0.13791869580745697, 0.043409932404756546, 0.013646473176777363, -0.033852215856313705, -0.2221967726945877, -0.06915980577468872, -0.06499684602022171, -0.17926663160324097, 0.5730496048927307, 0.04419172182679176, -0.14023463428020477, 0.35587912797927856, 0.7642987966537476, 0.03354428708553314, -0.13019132614135742, 0.24233202636241913, 0.035024017095565796, 0.13537533581256866, -0.024363085627555847, -0.03339291736483574, 0.3863113522529602, -0.16369923949241638, -0.25129029154777527, -0.05706529691815376, 0.25847235321998596, 0.13363969326019287, -0.5338664650917053, 0.18520842492580414, 0.15054088830947876, -0.06883613765239716, 0.2695310413837433, -0.37627583742141724, 0.48788052797317505, -0.331337034702301, 0.16497112810611725, -0.047471530735492706, 0.1532193422317505, 0.27492475509643555, -0.26332297921180725, -0.1157359629869461, -0.24743695557117462, 0.04086216166615486, 0.12184250354766846, 0.43155479431152344, 0.2313307374715805, -0.19391858577728271, 0.009841350838541985, -0.17579986155033112, 0.17534290254116058, 0.12736265361309052, 0.1977408230304718, -0.10554251819849014, -0.1823631078004837, -0.38720986247062683, -0.11938461661338806, 0.4147987961769104, 0.3592255711555481, 0.10231039673089981, -0.06352731585502625, -0.45720160007476807, -0.011848040856420994, 0.17011046409606934, -0.2586507201194763, 0.02496177703142166, 0.04140220582485199, -0.009909559972584248, 0.04542339965701103, 0.47278520464897156, -0.294655978679657, -0.28489261865615845, -0.1437341719865799, -0.11454056203365326, -0.07920173555612564, -0.15563757717609406, -0.06097250059247017, 0.013185260817408562, 0.08099333941936493, -0.25462615489959717, -0.09117833524942398, -0.1349460780620575, -0.23785069584846497, 0.07599646598100662, 0.18582549691200256, 0.1357617825269699, -0.24102845788002014, -0.09685720503330231, -0.052846759557724, -0.03841070458292961, -0.08517282456159592, -0.14011995494365692, 0.1708897352218628, 0.5099929571151733, -0.256796658039093, -0.06652775406837463, -0.06876817345619202, 0.11678560823202133, 0.16966824233531952, -0.09223179519176483, 0.060390274971723557, -0.024142270907759666, -0.03748175874352455, -0.09158486127853394, -0.0986882820725441, 0.11595965921878815, -0.3026841878890991, 0.025761866942048073, 0.12229215353727341, -0.1805090457201004, 0.23523147404193878, 0.01322802435606718, 0.06678533554077148, -0.041105255484580994, -0.06709476560354233, -0.16205091774463654, -0.0609438419342041, 0.1795121431350708, -0.36090126633644104, -0.2859719395637512, -0.5163062214851379, 0.07936625927686691, -0.025765813887119293, 0.16782693564891815, 0.09591592103242874, -0.1292792111635208, -0.08631057292222977, -0.049019038677215576, 0.14146488904953003, -0.08609949797391891, -0.09712819755077362, 0.1656467616558075, -0.1560973823070526, 0.05254444479942322, 0.3499755859375, 0.05128435045480728, 0.008799810893833637, 0.6680774688720703, -0.03681541234254837, 0.2858699560165405, 0.3955478072166443, 0.1617472618818283, -0.02362421527504921, 0.05408793315291405, 0.7669576406478882, 0.7463681101799011, 0.06612509489059448, -0.07790323346853256, 0.13202619552612305, -0.18196187913417816, 0.0664946436882019, -0.32911908626556396, -0.3671010434627533, -0.20426833629608154, -0.14627143740653992, -0.25673744082450867, -0.7162514925003052, -0.15720319747924805, 0.02450534701347351, -0.15849725902080536, -0.20331357419490814, -0.14674296975135803, -0.1335705667734146, 0.01062234491109848, -0.2728753983974457, -0.06993365287780762, -0.33883002400398254, 0.31554755568504333, -0.024283451959490776, -0.0999641865491867, 0.4305460751056671, -0.023444831371307373, 0.23843154311180115, 0.4121886193752289, 0.20023636519908905, 0.18856872618198395, 0.3959139585494995, -0.345479816198349, 0.08068053424358368, -0.0005040453979745507, -0.25427815318107605, 0.038881171494722366, 0.17940758168697357, -0.13216756284236908, 0.4886133074760437, 0.24901685118675232, 0.05780864879488945, -0.06443168967962265, 0.24688225984573364, 0.04448751360177994, 0.735317051410675, -0.3102242946624756, 0.07694178074598312, -0.2547958493232727, 0.019819924607872963, 0.1025855764746666, 0.008966810069978237, -0.24939510226249695, -0.2108241617679596, -0.10927660763263702, 0.013548118062317371, 0.15337598323822021, 0.1415676325559616, 0.11175559461116791, -0.11675909906625748, 0.36740583181381226, 0.009289017878472805, 0.3763061463832855, -0.20926357805728912, 0.033728279173374176, -0.6373873949050903, 0.008873551152646542, 0.33277255296707153, 0.09586882591247559, 0.22323372960090637, -0.039626818150281906, 0.1314702332019806, 0.31735631823539734, 0.2348478138446808, 0.4174257218837738, -0.00005236996730673127, -0.3034646809101105, -0.5666860938072205, -0.11907538771629333, 0.24426357448101044, 0.15386566519737244, -0.007622583769261837, -0.06591412425041199, 0.3218995928764343, 0.09298288077116013, 0.018221016973257065, 0.31799834966659546, -0.3438114821910858, 0.2634427845478058, 0.07506062090396881, 0.10028842091560364, 0.2569549083709717, 0.03464965522289276, 0.04829053953289986, -0.09144046157598495, 0.051326934248209, 0.08391452580690384, -0.32726070284843445, -0.1908600777387619, -0.13390754163265228, 0.45773249864578247, 0.16185562312602997, -0.10289996862411499, 0.07809686660766602, 0.15821553766727448, 0.1992509663105011, -0.30025795102119446, -0.3078491985797882, 0.21935012936592102, 0.26223328709602356, 0.09816659241914749, -0.024988774210214615, 0.07752972096204758, 0.017936905845999718, 0.3035351037979126, -0.26553207635879517, -0.1424577534198761, 0.4916682243347168, -0.5384700894355774, 0.24424472451210022, -0.016452481970191002, 0.49954846501350403, 0.1762416511774063, -0.137093648314476, -0.10338649153709412, -0.11875805258750916, 0.36829644441604614, -0.16111156344413757, -0.12322752922773361, 0.08270534127950668, -0.031024184077978134, 0.1907951533794403, -0.01754913106560707, 0.15479323267936707, 0.316371351480484, -0.16366030275821686, 0.3270505666732788, -0.1499863564968109 ]
https://github.com/huggingface/datasets/issues/2503
SubjQA wrong boolean values in entries
I have: - opened an issue in their repo: https://github.com/megagonlabs/SubjQA/issues/3 - written an email to all the paper authors
## Describe the bug SubjQA seems to have a boolean that's consistently wrong. It defines: - question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective). - is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective) However, `is_ques_subjective` seems to have wrong values in the entire dataset. For instance, in the example in the dataset card, we have: - "question_subj_level": 2 - "is_ques_subjective": false However, according to the description, the question should be subjective since the `question_subj_level` is below 4
19
SubjQA wrong boolean values in entries ## Describe the bug SubjQA seems to have a boolean that's consistently wrong. It defines: - question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective). - is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective) However, `is_ques_subjective` seems to have wrong values in the entire dataset. For instance, in the example in the dataset card, we have: - "question_subj_level": 2 - "is_ques_subjective": false However, according to the description, the question should be subjective since the `question_subj_level` is below 4 I have: - opened an issue in their repo: https://github.com/megagonlabs/SubjQA/issues/3 - written an email to all the paper authors
[ 0.1710737645626068, 0.058735623955726624, 0.044212210923433304, 0.09914498031139374, -0.3185442090034485, -0.10436014086008072, 0.09934596717357635, 0.024408308789134026, -0.14664700627326965, 0.22348684072494507, -0.061402592808008194, 0.3840121924877167, 0.22751615941524506, 0.22797347605228424, -0.2728489935398102, 0.11014172434806824, 0.24796946346759796, 0.16666114330291748, -0.07002250105142593, -0.18006178736686707, -0.4520646631717682, 0.25996333360671997, -0.6040436029434204, -0.040531810373067856, -0.12444375455379486, -0.23899227380752563, -0.12357234954833984, -0.1611761897802353, -0.31973373889923096, -0.2684788703918457, 0.022894492372870445, -0.002461323281750083, -0.0706963986158371, 0.11735328286886215, -0.00011124741286039352, -0.19526778161525726, 0.07515138387680054, 0.01766810566186905, -0.22461988031864166, 0.08561096340417862, -0.19559772312641144, -0.09285169839859009, -0.22468572854995728, 0.040088895708322525, -0.3261656165122986, -0.44194087386131287, -0.20200224220752716, -0.2190367430448532, 0.35370761156082153, 0.025561967864632607, 0.1417028307914734, 0.015805041417479515, -0.1125527173280716, 0.2566837668418884, 0.3405130207538605, -0.24264129996299744, -0.10258231312036514, 0.2494194209575653, -0.01945483684539795, -0.045755643397569656, 0.11296441406011581, 0.3713187277317047, 0.10744796693325043, 0.09997685998678207, 0.0808563232421875, -0.0649046003818512, -0.001437386847101152, -0.25290682911872864, 0.26937565207481384, 0.2289806604385376, 0.3289313018321991, -0.1468621790409088, -0.4584597945213318, -0.09658262133598328, -0.08553238213062286, -0.09768063575029373, 0.2790673077106476, 0.03828439116477966, 0.11279654502868652, -0.026404015719890594, 0.17414015531539917, 0.40218809247016907, 0.08610041439533234, -0.011823388747870922, -0.11401896923780441, 0.11758986860513687, -0.17912016808986664, -0.04281044751405716, -0.11246724426746368, -0.13376042246818542, -0.04953179508447647, 0.010883969254791737, -0.6033583283424377, 0.12035398930311203, -0.49704888463020325, -0.023889482021331787, 0.036881040781736374, 0.11412627249956131, -0.14819079637527466, -0.3702000081539154, 0.30331581830978394, -0.05320950597524643, 0.20162664353847504, 0.21209831535816193, 0.516777753829956, 0.21399427950382233, 0.3768240213394165, -0.21538957953453064, -0.05886172875761986, -0.21953797340393066, 0.06174906715750694, 0.01863766647875309, 0.160797581076622, -0.2832610011100769, 0.03608718514442444, 0.049417879432439804, 0.13755549490451813, -0.2750585973262787, -0.5347525477409363, 0.11727643013000488, -0.40851831436157227, -0.035643987357616425, 0.15202905237674713, 0.08247267454862595, 0.052299194037914276, -0.21827764809131622, -0.12426385283470154, -0.01427520252764225, -0.18097266554832458, -0.46639135479927063, -0.10261226445436478, -0.012675466947257519, -0.24218997359275818, 0.07046714425086975, 0.009584983810782433, -0.005173088051378727, -0.03266090154647827, 0.3610462248325348, -0.1792062371969223, -0.23111478984355927, -0.04554468393325806, -0.31920358538627625, 0.21024630963802338, 0.15663035213947296, -0.25756919384002686, 0.1769368052482605, 0.01846083626151085, -0.08858530223369598, 0.011378941126167774, 0.30681413412094116, 0.13143229484558105, 0.21601395308971405, -0.026499921455979347, 0.15290158987045288, -0.04883139207959175, -0.019424812868237495, 0.13057993352413177, 0.34278199076652527, 0.2295733541250229, 0.07665778696537018, 0.09789931029081345, -0.12460040301084518, -0.10844694823026657, -0.12016617506742477, -0.007498010527342558, 0.09307648241519928, -0.5938056707382202, -0.09565554559230804, 0.002828781958669424, 0.25630515813827515, 0.006007728166878223, 0.16146263480186462, 0.2352575957775116, 0.3217531442642212, 0.10386677831411362, -0.06968236714601517, -0.2798699140548706, 0.17832933366298676, -0.45631951093673706, 0.10512258112430573, 0.4366207420825958, -0.12204374372959137, -0.22182665765285492, 0.20335721969604492, 0.14728929102420807, 0.07212458550930023, 0.14846132695674896, 0.0606570690870285, 0.09197672456502914, -0.09786291420459747, -0.42956018447875977, -0.01887924037873745, -0.046156127005815506, 0.1946667730808258, -0.18814194202423096, -0.06674964725971222, 0.0751228779554367, -0.4497663676738739, 0.13885946571826935, 0.20895610749721527, -0.2969645857810974, 0.06513165682554245, 0.4925534129142761, -0.45218154788017273, 0.29076075553894043, 0.028488878160715103, 0.1424674540758133, 0.18904706835746765, -0.4601026773452759, 0.01877899281680584, 0.53863126039505, -0.08748892694711685, -0.21669335663318634, 0.09646537899971008, 0.07628600299358368, -0.1828973889350891, 0.12644122540950775, 0.09423787891864777, -0.32069462537765503, 0.04401108995079994, -0.24634772539138794, -0.07239499688148499, 0.11738530546426773, -0.05388236790895462, 0.16549363732337952, -0.12312924116849899, -0.0828997939825058, 0.010214684531092644, 0.5004789233207703, 0.3310026228427887, 0.4476000666618347, 0.08240075409412384, -0.08407669514417648, 0.17008230090141296, 0.09187052398920059, -0.0996953472495079, -0.14697109162807465, -0.21267297863960266, -0.1487465649843216, -0.045117344707250595, 0.01767357997596264, 0.5685976147651672, -0.09613481909036636, 0.3559566140174866, 0.1158236414194107, 0.4205284118652344, 0.06816732883453369, -0.1510513573884964, -0.2987358868122101, 0.17341655492782593, -0.01585763692855835, -0.21662570536136627, -0.23649737238883972, -0.3514861464500427, 0.1823423057794571, 0.07841670513153076, -0.11229764670133591, 0.22937151789665222, 0.21494102478027344, 0.24027907848358154, 0.3250105381011963, -0.1460171341896057, 0.30746445059776306, -0.19753941893577576, 0.013595594093203545, -0.06153492629528046, 0.2345060557126999, 0.3891461491584778, 0.041577279567718506, 0.15500299632549286, -0.1160537376999855, -0.08614906668663025, -0.13979098200798035, -0.03104383498430252, 0.166127011179924, 0.20367856323719025, -0.2768191695213318, -0.05340898409485817, 0.04035582020878792, 0.13672564923763275, -0.18041464686393738, 0.7738115787506104, -0.06619630008935928, 0.06290959566831589, -0.28416410088539124, 0.40800797939300537, -0.3262367248535156, -0.3555268943309784, 0.06515280902385712, -0.5793980360031128, 0.042990535497665405, -0.18765220046043396, 0.41974076628685, -0.34219610691070557, -0.3711317181587219, 0.38454505801200867, 0.43214643001556396, 0.7168490290641785, -0.08357661217451096, 0.19793155789375305, 0.03557918965816498, -0.0012885668547824025, -0.5488744378089905, 0.0704205185174942, -0.001402605208568275, -0.2150140255689621, 0.02729133516550064, -0.13567836582660675, -0.09082738310098648, 0.039735209196805954, -0.2662622928619385, 0.10433140397071838, 0.0013374083209782839, 1.0558432340621948, -0.2724153697490692, -0.1538785696029663, -0.10185373574495316, 0.15663322806358337, -0.09176552295684814, 0.1692703366279602, -0.008326167240738869, 0.13735371828079224, -0.12997221946716309, -0.17731624841690063, -0.12177763879299164, -0.3256252408027649, 0.12160021811723709, -0.007337666116654873, -0.17553144693374634, -0.22549603879451752, 0.2760753333568573, 0.4957951009273529, -0.0990770161151886, -0.376902312040329, 0.08173766732215881, -0.028282731771469116, -0.24699416756629944, -0.22657299041748047, 0.34887614846229553, 0.0640420988202095, -0.5016040205955505, -0.09533784538507462, -0.16882695257663727, 0.4532334804534912, -0.29416581988334656, -0.2607147991657257, 0.3030190169811249, 0.10405762493610382, -0.21909800171852112, 0.38391050696372986, -0.3634412884712219, -0.1291661411523819, -0.3180088698863983, -0.12276552617549896, -0.15398696064949036, -0.6412749290466309, 0.10943451523780823, 0.1728314608335495, 0.494953989982605, 0.031201759353280067, 0.12308827042579651, 0.21590138971805573, -0.11577427387237549, 0.41569724678993225, 0.18083757162094116, 0.29635685682296753, 0.3292667269706726, 0.3150511384010315, 0.1459965705871582, -0.3184504508972168, 0.40765124559402466, -0.013140123337507248, -0.22255338728427887, 0.3915550112724304, 0.10709961503744125, -0.2039831280708313, -0.12519778311252594, -0.2320004403591156, -0.293008953332901, -0.09539022296667099, -0.22250093519687653, -0.17375557124614716, -0.08045869320631027, 0.14781196415424347, 0.41910040378570557, 0.01858668215572834, -0.04964343085885048, 0.00725580845028162, 0.06531426310539246, 0.1636180281639099, -0.03732214868068695, -0.06495034694671631, -0.14528939127922058, 0.08659376204013824, 0.22246193885803223, -0.19677110016345978, 0.4460463225841522, 0.09817555546760559, 0.06125304102897644, 0.04297624155879021, -0.07205244898796082, 0.2515118420124054, 0.08199892938137054, 0.19023343920707703, 0.1813405156135559, 0.22191020846366882, -0.3612619936466217, -0.2554587125778198, 0.04540839418768883, 0.03734998777508736, 0.4311310946941376, -0.32068735361099243, -0.0464966781437397, 0.1578715592622757, 0.10755851864814758, -0.3169368803501129, -0.35421222448349, -0.434924453496933, -0.565066397190094, -0.07006865739822388, 0.09108447283506393, -0.2530291676521301, -0.06878016144037247, -0.005894909147173166, 0.044294629245996475, -0.26593905687332153, -0.045998819172382355, -0.2791159451007843, 0.08034326881170273, 0.3241611123085022, 0.1375291645526886, -0.18151631951332092, 0.3898333013057709, 0.08327163010835648, 0.3620140850543976, -0.019158076494932175, 0.22223922610282898, -0.004175160080194473, 0.14618852734565735, 0.0003621709474828094, -0.10016779601573944, -0.025741027668118477, -0.04710438847541809, -0.14575937390327454, 0.17568114399909973, 0.1380995512008667, 0.005161691457033157, -0.29817840456962585, -0.22800271213054657, 0.1883990615606308, 0.2918303906917572, 0.19234482944011688, -0.19860166311264038, 0.5775854587554932, -0.25358912348747253, -0.3238763213157654, 0.16436046361923218, 0.16832751035690308, 0.05285481736063957, 0.3784896433353424, 0.4539307653903961, 0.6912425756454468, 0.03400130942463875, -0.2650206983089447, 0.003518327372148633, -0.49625450372695923, 0.1727016121149063, 0.195456400513649, 0.10800798237323761, -0.33013996481895447, 0.0022251647897064686, 0.03196437284350395, 0.05545959249138832, 0.11384548246860504, -0.1201774850487709, -0.24935702979564667, 0.228140726685524, -0.07648155838251114, 0.238253653049469, 0.20214137434959412, -0.4176892936229706, 0.02961934171617031, 0.14987996220588684, 0.06131197512149811, 0.13912735879421234, 0.07934017479419708, 0.27108970284461975, -0.1377519965171814, 0.009885591454803944, 0.008247017860412598, -0.01241255085915327, -0.2050178200006485, -0.11988110840320587, -0.06365294009447098, -0.2108403593301773, 0.6007063388824463, 0.04969063028693199, -0.16215640306472778, 0.34435486793518066, 0.7612618207931519, 0.041460298001766205, -0.1690540611743927, 0.1809292435646057, -0.006354902405291796, 0.05394019931554794, -0.05235733091831207, -0.024229956790804863, 0.3899330198764801, -0.1600637286901474, -0.2672145962715149, -0.035423438996076584, 0.2512816786766052, 0.12086237221956253, -0.49435943365097046, 0.16661255061626434, 0.16270208358764648, -0.050436850637197495, 0.3389602303504944, -0.3811139166355133, 0.44135263562202454, -0.3024432957172394, 0.1571769416332245, 0.05963960662484169, 0.18611419200897217, 0.2916509509086609, -0.248647540807724, -0.031085465103387833, -0.22505566477775574, 0.00863284058868885, 0.07058951258659363, 0.44746077060699463, 0.14696411788463593, -0.19633184373378754, 0.001198177458718419, -0.13529400527477264, 0.16031749546527863, 0.10215487331151962, 0.29375800490379333, -0.08954901993274689, -0.17349942028522491, -0.373955100774765, -0.11345064640045166, 0.4546182453632355, 0.33249732851982117, 0.03490655869245529, -0.08101380616426468, -0.427914559841156, 0.00979328341782093, 0.189789280295372, -0.3191976845264435, -0.01863475888967514, 0.05350085720419884, -0.006030959542840719, 0.12077527493238449, 0.46144551038742065, -0.27349650859832764, -0.330218106508255, -0.18409301340579987, -0.13643166422843933, -0.031759437173604965, -0.16063353419303894, -0.06491566449403763, 0.019514475017786026, 0.058275215327739716, -0.2366170883178711, -0.05807635188102722, -0.11019029468297958, -0.23816713690757751, 0.07389295101165771, 0.22229154407978058, 0.13101547956466675, -0.2087089866399765, -0.1066550761461258, -0.09515973180532455, -0.0650416910648346, -0.11916501820087433, -0.16715897619724274, 0.17840786278247833, 0.5427191257476807, -0.31804579496383667, -0.07277324795722961, -0.0946560874581337, 0.134908989071846, 0.1783764362335205, -0.1064404845237732, 0.04572392627596855, -0.01956949196755886, -0.06045687571167946, -0.07339145243167877, -0.14290548861026764, 0.10149519145488739, -0.32491767406463623, -0.032407257705926895, 0.1791350245475769, -0.1792757213115692, 0.25571927428245544, -0.048132672905921936, 0.06875091046094894, -0.10878217965364456, -0.08069786429405212, -0.10582967847585678, -0.0837048813700676, 0.15772776305675507, -0.29392024874687195, -0.27514711022377014, -0.5780191421508789, 0.08106290549039841, 0.025918107479810715, 0.24215349555015564, 0.06582039594650269, -0.16078639030456543, -0.11544723808765411, -0.08428522199392319, 0.12616808712482452, -0.07432898133993149, -0.16997858881950378, 0.10356726497411728, -0.14242275059223175, 0.062213316559791565, 0.40216806530952454, 0.016279317438602448, 0.011418878100812435, 0.6619752645492554, 0.006464148871600628, 0.27066993713378906, 0.38297292590141296, 0.1991981863975525, -0.07448209077119827, 0.14420968294143677, 0.7489557862281799, 0.7794594764709473, 0.08778047561645508, -0.15469485521316528, 0.09226252138614655, -0.24610136449337006, 0.06894044578075409, -0.26042747497558594, -0.3266119360923767, -0.1921120136976242, -0.10996043682098389, -0.23577338457107544, -0.709088146686554, -0.1479441523551941, 0.06147807091474533, -0.22989489138126373, -0.16546416282653809, -0.1609169840812683, -0.13097387552261353, -0.016616584733128548, -0.24930141866207123, -0.034295666962862015, -0.3071189224720001, 0.3857826888561249, 0.025728784501552582, -0.09131017327308655, 0.40633052587509155, -0.07809584587812424, 0.2709384262561798, 0.3368433713912964, 0.21801744401454926, 0.20856431126594543, 0.4107736051082611, -0.36201542615890503, 0.034245651215314865, 0.0007555232150480151, -0.25956544280052185, 0.05855613946914673, 0.21096357703208923, -0.17156648635864258, 0.5173901319503784, 0.18917228281497955, 0.04025924205780029, -0.057114358991384506, 0.23974163830280304, 0.057312145829200745, 0.715569019317627, -0.30116328597068787, 0.11964021623134613, -0.24803638458251953, 0.04136548563838005, 0.08410166949033737, 0.008915003389120102, -0.2025250494480133, -0.18393577635288239, -0.16010823845863342, -0.025551101192831993, 0.1391831934452057, 0.0968237966299057, 0.09958778321743011, -0.057967666536569595, 0.3223221004009247, -0.0431692935526371, 0.46403419971466064, -0.20752231776714325, 0.05188946798443794, -0.5853192210197449, -0.09002330154180527, 0.32769885659217834, 0.0366399846971035, 0.27944695949554443, 0.031109783798456192, 0.10667118430137634, 0.4072139859199524, 0.23938487470149994, 0.43122607469558716, -0.005528982263058424, -0.31660011410713196, -0.5569551587104797, -0.1463940292596817, 0.22378087043762207, 0.1129155308008194, -0.027798650786280632, -0.1004464253783226, 0.3361707925796509, 0.07467254996299744, 0.03999655321240425, 0.34531426429748535, -0.29675960540771484, 0.254128098487854, 0.056951623409986496, 0.11006532609462738, 0.270162969827652, -0.02242450602352619, 0.0659557655453682, -0.1521826684474945, 0.0002192795800510794, 0.18629711866378784, -0.3042445480823517, -0.2631473243236542, -0.10383870452642441, 0.45823934674263, 0.14688313007354736, -0.1342570185661316, 0.05560598522424698, 0.19607071578502655, 0.2331262081861496, -0.36192575097084045, -0.22659702599048615, 0.2175062745809555, 0.31378862261772156, 0.08977033197879791, -0.05263715237379074, 0.023625748232007027, -0.04884413629770279, 0.2905327081680298, -0.31442734599113464, -0.1801203340291977, 0.43882447481155396, -0.5293755531311035, 0.2906624674797058, -0.009794481098651886, 0.531271755695343, 0.16587471961975098, -0.13086196780204773, -0.11093530803918839, -0.09465886652469635, 0.33027559518814087, -0.11057069152593613, -0.15255768597126007, 0.02443724498152733, 0.011988711543381214, 0.18981020152568817, 0.003670073812827468, 0.1343383938074112, 0.26341694593429565, -0.09793488681316376, 0.34156349301338196, -0.1324797123670578 ]
https://github.com/huggingface/datasets/issues/2499
Python Programming Puzzles
Thanks @VictorSanh! There's also a [notebook](https://aka.ms/python_puzzles) and [demo](https://aka.ms/python_puzzles_study) available now to try out some of the puzzles
## Adding a Dataset - **Name:** Python Programming Puzzles - **Description:** Programming challenge called programming puzzles, as an objective and comprehensive evaluation of program synthesis - **Paper:** https://arxiv.org/pdf/2106.05784.pdf - **Data:** https://github.com/microsoft/PythonProgrammingPuzzles ([Scrolling through the data](https://github.com/microsoft/PythonProgrammingPuzzles/blob/main/problems/README.md)) - **Motivation:** Spans a large range of difficulty, problems, and domains. A useful resource for evaluation as we don't have a clear understanding of the abilities and skills of extremely large LMs. Note: it's a growing dataset (contributions are welcome), so we'll need careful versioning for this dataset. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
17
Python Programming Puzzles ## Adding a Dataset - **Name:** Python Programming Puzzles - **Description:** Programming challenge called programming puzzles, as an objective and comprehensive evaluation of program synthesis - **Paper:** https://arxiv.org/pdf/2106.05784.pdf - **Data:** https://github.com/microsoft/PythonProgrammingPuzzles ([Scrolling through the data](https://github.com/microsoft/PythonProgrammingPuzzles/blob/main/problems/README.md)) - **Motivation:** Spans a large range of difficulty, problems, and domains. A useful resource for evaluation as we don't have a clear understanding of the abilities and skills of extremely large LMs. Note: it's a growing dataset (contributions are welcome), so we'll need careful versioning for this dataset. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Thanks @VictorSanh! There's also a [notebook](https://aka.ms/python_puzzles) and [demo](https://aka.ms/python_puzzles_study) available now to try out some of the puzzles
[ -0.0690370425581932, -0.1561272144317627, -0.27598685026168823, -0.052750758826732635, -0.00064777274383232, 0.0701649859547615, 0.01956307888031006, 0.2562190890312195, 0.003462387016043067, 0.12764178216457367, 0.03861632198095322, 0.3095811903476715, -0.3876287043094635, 0.35757455229759216, 0.2331801801919937, -0.34801769256591797, -0.042529746890068054, -0.004457009024918079, -0.09909207373857498, 0.04900151118636131, -0.1924678534269333, 0.2509900629520416, -0.14735047519207, -0.07994645088911057, 0.04599892348051071, -0.26552101969718933, -0.18279434740543365, 0.2118450552225113, -0.09623169898986816, -0.3995169997215271, -0.3597232401371002, 0.038053110241889954, -0.1506151258945465, 0.3561880886554718, -0.00009468572534387931, -0.4483577609062195, 0.15807180106639862, -0.03283218294382095, -0.49889320135116577, -0.052306290715932846, 0.1360362321138382, -0.23787115514278412, -0.19419798254966736, -0.17235471308231354, -0.11471815407276154, -0.010592697188258171, -0.05512749031186104, -0.3561471998691559, 0.4866495132446289, 0.25863659381866455, 0.3744765520095825, 0.2904418408870697, 0.22130537033081055, -0.037972573190927505, 0.149257093667984, -0.12863482534885406, -0.15743587911128998, 0.20816907286643982, 0.5029333233833313, -0.18218690156936646, -0.010411176830530167, 0.050556838512420654, 0.0969826802611351, -0.12749232351779938, 0.0570480041205883, -0.27809852361679077, 0.09931565076112747, -0.5485327839851379, -0.1464284062385559, 0.100387342274189, 0.13504010438919067, -0.1140141561627388, -0.25436604022979736, -0.38783782720565796, -0.021435150876641273, -0.113471619784832, -0.30325573682785034, 0.20306147634983063, -0.222785085439682, 0.018185056746006012, 0.04161825031042099, -0.13411417603492737, -0.016990575939416885, -0.09636808186769485, 0.09128289669752121, 0.2131260335445404, -0.02263021469116211, -0.16266493499279022, 0.10816981643438339, -0.11937513947486877, -0.15270623564720154, 0.03144247084856033, 0.11352033913135529, 0.2347506284713745, -0.08680840581655502, -0.26097527146339417, 0.2708578109741211, 0.12392311543226242, 0.017795616760849953, 0.33556491136550903, 0.14806391298770905, -0.006074352655559778, 0.3773309588432312, -0.10289600491523743, 0.10933368653059006, 0.09280016273260117, -0.16377286612987518, -0.01967272162437439, -0.034446485340595245, 0.11256739497184753, -0.2922191321849823, 0.0885629653930664, -0.08669432252645493, -0.1023690402507782, 0.056346260011196136, 0.14421582221984863, -0.0840298980474472, 0.18208523094654083, -0.17164026200771332, 0.20336008071899414, -0.22732874751091003, 0.02991657704114914, -0.0007511790608987212, 0.01075013354420662, -0.10669036209583282, 0.026017852127552032, -0.030321402475237846, 0.05749662593007088, -0.2994653284549713, -0.005629768129438162, -0.15622515976428986, 0.05814055725932121, -0.3145742416381836, -0.17955373227596283, 0.3554587960243225, 0.087075375020504, 0.041604746133089066, 0.1689746230840683, 0.012569109909236431, -0.28265637159347534, 0.30625292658805847, -0.004567916039377451, 0.1723780632019043, -0.01713762991130352, -0.07842738926410675, -0.3076547682285309, 0.010073027573525906, -0.27256932854652405, -0.28089919686317444, 0.1333916038274765, 0.2779684364795685, 0.04492020606994629, -0.09490182995796204, 0.3816743493080139, -0.15509046614170074, 0.10567765682935715, 0.2967669367790222, 0.3964274823665619, -0.1516934484243393, 0.3133293390274048, -0.020608652383089066, -0.10800991952419281, 0.22930166125297546, -0.17704996466636658, 0.21924713253974915, 0.2873533070087433, -0.054166726768016815, 0.098506860435009, -0.01980656571686268, -0.022054608911275864, -0.3745415210723877, 0.15869595110416412, 0.12155912071466446, 0.4654800593852997, -0.18465976417064667, 0.002468633698299527, 0.37730637192726135, -0.20765900611877441, 0.1459483951330185, 0.03200089931488037, -0.1530906856060028, 0.03651898726820946, 0.02532878704369068, 0.25882285833358765, 0.05561774969100952, -0.02005358226597309, 0.18403968214988708, 0.3140406012535095, -0.04066188260912895, -0.08315347880125046, -0.2736200988292694, 0.02884571999311447, -0.14195014536380768, 0.12714360654354095, 0.15292271971702576, -0.1347585916519165, 0.032384056597948074, -0.10647888481616974, 0.1668424904346466, -0.15404431521892548, -0.28475210070610046, 0.10165370255708694, 0.1968061625957489, 0.17047575116157532, 0.10618046671152115, -0.494840145111084, -0.09545715153217316, -0.0782223716378212, 0.2154524326324463, 0.20925681293010712, 0.11788870394229889, -0.06785561889410019, -0.1630568504333496, 0.19547335803508759, 0.07713155448436737, -0.2147097885608673, 0.3580569922924042, -0.18309132754802704, 0.15559802949428558, -0.1312410980463028, -0.13214541971683502, 0.3327611982822418, 0.09835328906774521, -0.032826993614435196, -0.2939337193965912, 0.06508433818817139, -0.1366574913263321, -0.1322999894618988, 0.16773571074008942, 0.48086678981781006, -0.03489260375499725, 0.1765158772468567, 0.15276481211185455, 0.009134681895375252, 0.16836737096309662, -0.23243442177772522, 0.08121946454048157, 0.33877211809158325, -0.1564701944589615, -0.2968171238899231, 0.12514008581638336, 0.3188967704772949, -0.022004729136824608, 0.12813864648342133, 0.33376625180244446, 0.3432987928390503, -0.06282829493284225, 0.11985345929861069, 0.32736000418663025, 0.06079189106822014, -0.046717818826436996, -0.015749625861644745, -0.3352227807044983, -0.17809806764125824, 0.4403578042984009, -0.003823574399575591, 0.23704326152801514, -0.07174725830554962, -0.3317885994911194, 0.18784771859645844, 0.4561131000518799, -0.02911345101892948, 0.24738840758800507, -0.16121335327625275, -0.11262675374746323, 0.05857251212000847, -0.22324968874454498, 0.21602915227413177, 0.02777346782386303, 0.3220367133617401, 0.2059086263179779, 0.22308358550071716, -0.27320754528045654, -0.2321784943342209, 0.17808854579925537, 0.06397410482168198, -0.23331236839294434, 0.1899661123752594, 0.12423525750637054, 0.11440827697515488, -0.0533994659781456, -0.28260570764541626, -0.26269257068634033, -0.08109264075756073, -0.2464057058095932, 0.2295689880847931, -0.11311069875955582, -0.19713178277015686, -0.24956108629703522, 0.012755993753671646, -0.08883365988731384, -0.4756059944629669, 0.18303793668746948, 0.11652299761772156, -0.24638080596923828, -0.03904233127832413, 0.041554275900125504, 0.28507623076438904, -0.26864051818847656, 0.1312718689441681, 0.17590145766735077, -0.2556349039077759, -0.045175470411777496, 0.33352354168891907, 0.1024491935968399, 0.04517913609743118, 0.7545123100280762, -0.4607820212841034, 0.3017047941684723, -0.11645074933767319, -0.5321434140205383, 0.05177052691578865, -0.0727221816778183, 0.6607952117919922, 0.3045019805431366, -0.026544006541371346, -0.01864049769937992, -0.17032718658447266, 0.06313294917345047, -0.19592604041099548, -0.05071860924363136, -0.1848328709602356, 0.185078427195549, -0.16056838631629944, -0.2132176011800766, -0.1860857903957367, -0.046530917286872864, -0.37055861949920654, 0.39026615023612976, 0.20634062588214874, 0.219536691904068, 0.08112825453281403, -0.07104502618312836, 0.19067825376987457, 0.06975748389959335, 0.15497438609600067, -0.02329154498875141, -0.15199925005435944, 0.09689753502607346, -0.34748178720474243, -0.23068659007549286, -0.19153523445129395, -0.4439186751842499, 0.11477948725223541, 0.00016522369696758687, -0.015054800547659397, 0.03788535296916962, -0.08186810463666916, 0.2155011147260666, -0.026353539898991585, 0.3032609224319458, -0.2600446343421936, 0.1974382996559143, -0.2345321923494339, -0.2070157825946808, -0.19314301013946533, 0.18998007476329803, 0.13692107796669006, 0.07377176731824875, -0.1756889820098877, 0.0039855497889220715, -0.06460665911436081, 0.5416693687438965, 0.14449048042297363, 0.09658648818731308, 0.17752662301063538, -0.03959675878286362, 0.23683607578277588, -0.03565983101725578, -0.3107917308807373, 0.009679676964879036, 0.1647159904241562, -0.14369508624076843, 0.2343011349439621, 0.2779715359210968, -0.010676337406039238, -0.04413847625255585, 0.052684154361486435, -0.22589457035064697, -0.03884604573249817, 0.30630171298980713, -0.15875093638896942, 0.12833376228809357, -0.0737074613571167, 0.026201317086815834, -0.3611784875392914, -0.015942202880978584, -0.1870710700750351, 0.03899705782532692, 0.050521645694971085, -0.040950361639261246, 0.03476439416408539, -0.24940304458141327, -0.3102257549762726, 0.14553749561309814, 0.16858606040477753, -0.008224938064813614, 0.08123131096363068, -0.3296036720275879, -0.18159812688827515, -0.043476104736328125, 0.14255434274673462, -0.011950761079788208, -0.07857117801904678, 0.36685803532600403, 0.009608592838048935, -0.03757621347904205, -0.030976856127381325, -0.3742429316043854, -0.01764642633497715, 0.1927548050880432, 0.34190717339515686, 0.015098795294761658, 0.0027152427937835455, 0.04092496261000633, 0.33115246891975403, -0.0868283212184906, -0.08995519578456879, -0.2745039463043213, -0.4378645122051239, -0.30915918946266174, 0.10359179228544235, 0.25436681509017944, 0.1961684376001358, -0.02512718178331852, -0.03076101653277874, 0.03620630130171776, -0.11057239770889282, 0.29381176829338074, 0.10535614937543869, -0.005982249975204468, -0.08220098912715912, 0.14368751645088196, -0.24200227856636047, -0.09847836941480637, -0.08506334573030472, 0.1693284809589386, -0.3131100535392761, 0.18896779417991638, 0.03294181078672409, -0.04839424416422844, 0.3921133577823639, 0.21571743488311768, 0.03492838889360428, -0.03505559265613556, -0.2584018409252167, 0.334283709526062, -0.3643997609615326, -0.08166639506816864, 0.09172031283378601, 0.22048211097717285, -0.2457791417837143, -0.3512533903121948, 0.031087085604667664, -0.12199683487415314, -0.1132732629776001, 0.12577848136425018, -0.20435558259487152, -0.09378280490636826, 0.13826580345630646, 0.13940130174160004, 0.7695464491844177, -0.24238242208957672, 0.1440495103597641, 0.24650675058364868, -0.3516133427619934, 0.47812142968177795, 0.0819472000002861, 0.1643393486738205, -0.3154323995113373, -0.030869660899043083, 0.0982629731297493, -0.307647705078125, 0.1232840046286583, 0.06703643500804901, -0.15597641468048096, 0.2217409908771515, -0.1696433275938034, -0.1114576905965805, 0.07527855783700943, 0.46309760212898254, 0.01731039211153984, 0.0861428752541542, -0.44289204478263855, 0.3158777356147766, 0.05282783880829811, 0.023963019251823425, -0.283901572227478, 0.006236567161977291, -0.1343146562576294, -0.009388183243572712, -0.378508985042572, 0.09111306071281433, -0.10660748183727264, 0.02130165696144104, -0.015566485933959484, -0.18679757416248322, 0.20887833833694458, -0.12061633169651031, 0.3245628774166107, 0.476195752620697, 0.09715273976325989, 0.0018042924348264933, 0.21710143983364105, -0.1232542097568512, 0.2538086771965027, 0.1527247577905655, 0.4604760408401489, -0.2643863558769226, -0.0798589214682579, -0.0852976068854332, 0.25361159443855286, -0.1232154369354248, -0.3077406585216522, -0.08374015241861343, 0.07088209688663483, -0.011985084041953087, 0.04791140556335449, 0.031201599165797234, -0.1383458822965622, -0.05624925345182419, 0.29171493649482727, 0.11550234258174896, -0.12299644947052002, 0.1712292581796646, -0.043992359191179276, -0.0851934626698494, -0.012080429121851921, -0.31010106205940247, 0.077205590903759, -0.07637777179479599, 0.18735113739967346, 0.2989390194416046, -0.19598574936389923, -0.49839985370635986, -0.0272514745593071, -0.06206662207841873, 0.027731401845812798, 0.25276070833206177, -0.10063141584396362, -0.1459801197052002, -0.011941063217818737, 0.008839130401611328, 0.26689913868904114, 0.040358614176511765, -0.041474565863609314, 0.013655731454491615, -0.28344079852104187, 0.03843015059828758, 0.13141915202140808, 0.18510383367538452, -0.3328627347946167, 0.22437375783920288, 0.11723125725984573, 0.2479752153158188, -0.5505170822143555, 0.0041108811274170876, -0.3728106617927551, -0.00015160285693127662, 0.07444214075803757, -0.3020961284637451, -0.4391438663005829, 0.056721851229667664, 0.37434589862823486, -0.06886287778615952, -0.4298592805862427, -0.4343462884426117, -0.28673991560935974, -0.022349482402205467, -0.21072083711624146, -0.0016589682782068849, 0.1870345026254654, 0.00861071702092886, 0.041539475321769714, -0.18803845345973969, -0.11116931587457657, -0.06760548800230026, 0.11368363350629807, 0.1113969087600708, 0.09596335887908936, 0.14046066999435425, 0.09504237771034241, 0.09878525882959366, 0.08495879173278809, 0.19624176621437073, 0.0901593416929245, 0.11856331676244736, 0.07942800968885422, 0.05074413865804672, -0.1370890736579895, 0.05024382844567299, -0.01236396562308073, 0.1506475806236267, -0.051555097103118896, 0.026763953268527985, -0.22119086980819702, 0.12163765728473663, 0.10037513077259064, 0.2775798439979553, -0.028370007872581482, -0.0733618438243866, 0.24028684198856354, 0.38979655504226685, -0.1823672652244568, 0.22771240770816803, 0.19282206892967224, -0.2348293960094452, 0.23180367052555084, 0.3255150318145752, -0.0016312097432091832, 0.024411926046013832, -0.1715514212846756, -0.1144249439239502, 0.1474415808916092, 0.18069307506084442, 0.32620295882225037, 0.18190626800060272, 0.15659144520759583, -0.037913039326667786, 0.04039400815963745, -0.07853823155164719, 0.05124698579311371, 0.07845062762498856, -0.10343002527952194, 0.1659887284040451, 0.23158612847328186, 0.07403413951396942, 0.2153995931148529, 0.28522148728370667, 0.25424760580062866, 0.12754859030246735, 0.10800357162952423, 0.23086592555046082, 0.018512532114982605, 0.007452092133462429, -0.2453175187110901, 0.08218847215175629, -0.07528464496135712, 0.27790069580078125, -0.2056856006383896, -0.07192409038543701, 0.3132879137992859, -0.2913527488708496, -0.23427169024944305, -0.11080906540155411, 0.05240846797823906, -0.28130096197128296, -0.008915137499570847, -0.0062077720649540424, 0.2553602457046509, -0.11429934203624725, -0.14993104338645935, 0.005470082629472017, 0.3869016766548157, -0.2155783474445343, 0.14327865839004517, 0.13678161799907684, 0.13424786925315857, 0.025364654138684273, 0.1762515753507614, 0.4440717101097107, 0.12538355588912964, -0.41799888014793396, 0.07757631689310074, -0.21725957095623016, -0.06951860338449478, -0.22134198248386383, 0.17247943580150604, 0.11156856268644333, 0.19960860908031464, 0.2587204575538635, 0.27009665966033936, -0.30194348096847534, -0.28270161151885986, 0.05899030715227127, -0.3771441876888275, -0.2978941798210144, 0.3868867754936218, -0.10451269149780273, -0.1454063355922699, -0.04395366832613945, 0.10120182484388351, -0.48623138666152954, -0.1802123486995697, 0.3434891700744629, -0.08491625636816025, -0.05050536245107651, -0.05942903086543083, 0.19330202043056488, -0.0597740039229393, 0.5083770155906677, 0.3308282494544983, 0.660434901714325, -0.09874119609594345, -0.12566494941711426, -0.5089101791381836, 0.027406569570302963, -0.06791301816701889, -0.20852778851985931, -0.028837626799941063, 0.15557733178138733, 0.024219626560807228, 0.23061300814151764, -0.020453661680221558, 0.24521858990192413, -0.11695540696382523, -0.05531696975231171, -0.42030489444732666, 0.20210963487625122, 0.0966741144657135, -0.07897517085075378, -0.0023822085931897163, -0.015794314444065094, -0.04222822189331055, -0.2822074294090271, 0.2868259847164154, -0.04805564507842064, 0.03568375110626221, 0.2877693474292755, 0.044380731880664825, 0.14150676131248474, 0.10299552232027054, 0.3527122437953949, -0.014393620193004608, -0.5512966513633728, -0.041005052626132965, -0.03390335664153099, -0.11009228974580765, 0.18878234922885895, 0.21823309361934662, 0.2595933973789215, -0.06300776451826096, -0.0017135168891400099, 0.08189323544502258, 0.11975797265768051, 0.24250809848308563, 0.1526298224925995, -0.023105906322598457, -0.06923845410346985, 0.1991020143032074, -0.027071649208664894, 0.0771508663892746, 0.45726925134658813, -0.17054782807826996, 0.13092301785945892, -0.08836285024881363, -0.23117023706436157, 0.251657634973526, -0.16412344574928284, -0.40075236558914185, -0.25919869542121887, 0.18494822084903717, 0.04761047661304474, 0.11286825686693192, -0.49099865555763245, -0.07920735329389572, 0.2659676671028137, -0.10396473109722137, -0.01582319289445877, 0.44360771775245667, -0.19853389263153076, 0.032236482948064804, 0.024687131866812706, 0.035249073058366776, -0.1705409288406372, 0.0034699575044214725, -0.03746124356985092, -0.22899535298347473 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
That’s interesting thanks, let’s see what we can do. Can you detail your last sentence? I’m not sure I understand it well.
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
22
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. That’s interesting thanks, let’s see what we can do. Can you detail your last sentence? I’m not sure I understand it well.
[ -0.35013502836227417, -0.2402968555688858, -0.07366806268692017, 0.19035720825195312, 0.10275429487228394, 0.14770673215389252, 0.2599892020225525, 0.6868165135383606, -0.1211305633187294, -0.06412012130022049, -0.3566420376300812, 0.24314066767692566, -0.11459874361753464, -0.03322210535407066, 0.06633539497852325, -0.31011107563972473, 0.0007661504205316305, 0.10030759871006012, -0.06789635866880417, -0.1308620274066925, -0.10192389786243439, -0.42416369915008545, 0.05567821115255356, -0.23089267313480377, -0.17646470665931702, 0.14338846504688263, -0.07297057658433914, 0.004990238230675459, -0.01477809902280569, -0.39140796661376953, -0.016802623867988586, 0.20411241054534912, 0.1916380673646927, 0.23665572702884674, -0.00010873939754674211, -0.021962596103549004, 0.10556352883577347, 0.029854923486709595, -0.3094555735588074, 0.26161715388298035, 0.3262716233730316, -0.3157899081707001, 0.054560042917728424, -0.2053413689136505, -0.4622156322002411, -0.20446546375751495, -0.011553972028195858, -0.3079184293746948, 0.043709781020879745, 0.03249484673142433, 0.15432792901992798, 0.25674086809158325, -0.3000166416168213, 0.18780508637428284, 0.3291626274585724, 0.4852654039859772, -0.17528603971004486, 0.09861963987350464, 0.30015191435813904, 0.029167788103222847, -0.5153073668479919, 0.6179620027542114, -0.17225775122642517, -0.03250325471162796, 0.17719502747058868, 0.06036928668618202, -0.2424560785293579, -0.11644986271858215, -0.08242101967334747, 0.40601953864097595, 0.03252507001161575, -0.24459008872509003, -0.5007597804069519, -0.4453505277633667, -0.030953001230955124, -0.5959246754646301, -0.10014688223600388, 0.11138800531625748, -0.28344228863716125, 0.14668843150138855, -0.06803422421216965, 0.03688087314367294, -0.12036439031362534, -0.0961364209651947, -0.05475905165076256, 0.2587931156158447, 0.24107308685779572, -0.22259606420993805, 0.09051378071308136, 0.19611382484436035, 0.45580002665519714, -0.11577942967414856, 0.2760973870754242, -0.004552865866571665, -0.3522317409515381, -0.16664119064807892, -0.023671945556998253, -0.18670837581157684, -0.15297454595565796, -0.06688877940177917, 0.12647967040538788, 0.5531221628189087, -0.09119223058223724, -0.019700851291418076, -0.2372613549232483, 0.03756023570895195, -0.10326092690229416, 0.21059228479862213, 0.19669963419437408, -0.1186811700463295, 0.0677642896771431, 0.19367553293704987, -0.07801699638366699, -0.04930747300386429, -0.31201067566871643, 0.14273659884929657, -0.4815458357334137, -0.08429009467363358, -0.1862221509218216, 0.025211220607161522, -0.13065584003925323, -0.13335020840168, 0.04096149653196335, 0.3111972212791443, -0.28630754351615906, 0.19483385980129242, 0.1680845320224762, -0.14746175706386566, -0.24756157398223877, -0.267926424741745, 0.05119398608803749, 0.17039579153060913, -0.28935298323631287, 0.006973403971642256, 0.2033197432756424, -0.24583031237125397, -0.0934310257434845, -0.07095485180616379, 0.07478596270084381, 0.38875988125801086, 0.02003239095211029, -0.22809676826000214, 0.47664499282836914, -0.02710232511162758, -0.06796304881572723, 0.013656022027134895, 0.18137024343013763, 0.5773717761039734, -0.27960941195487976, 0.15739957988262177, -0.19168256223201752, -0.20621617138385773, -0.1592077612876892, 0.10195880383253098, 0.07004474103450775, 0.007334951311349869, 0.06688392162322998, 0.342428058385849, 0.13319182395935059, 0.07672039419412613, 0.12647250294685364, -0.24908116459846497, -0.335659384727478, -0.11782256513834, 0.3001018762588501, 0.30322447419166565, -0.19894106686115265, -0.04738602787256241, 0.47587329149246216, 0.34417903423309326, 0.42208805680274963, 0.4858787953853607, -0.30004432797431946, 0.1179690733551979, -0.029024114832282066, 0.007255817297846079, 0.3716585040092468, -0.3697827160358429, -0.12970757484436035, 0.3484440743923187, 0.07491343468427658, 0.2708401083946228, 0.16083942353725433, 0.19488313794136047, 0.40462997555732727, -0.005936773959547281, 0.0729745551943779, 0.395488440990448, 0.00821998156607151, -0.04994760453701019, -0.48246461153030396, -0.17390605807304382, 0.44338110089302063, 0.39572638273239136, 0.05743395537137985, -0.3865260183811188, -0.118864506483078, -0.10473856329917908, 0.40310561656951904, -0.3227180540561676, 0.1457480937242508, 0.10898637026548386, -0.1720588207244873, 0.15341337025165558, 0.015173672698438168, 0.2190544307231903, -0.11219500005245209, 0.22420945763587952, -0.3645496070384979, 0.3796462118625641, 0.04791222885251045, -0.19506436586380005, 0.3231685161590576, -0.03614582493901253, -0.003983111586421728, -0.25541967153549194, 0.040707726031541824, -0.04461820051074028, -0.20460306107997894, 0.025376632809638977, 0.0424455888569355, 0.37194696068763733, -0.2666929066181183, 0.11531219631433487, -0.23192980885505676, 0.11067304015159607, 0.05290605500340462, -0.052873313426971436, -0.053453098982572556, 0.2816495895385742, 0.06501001119613647, -0.04305165633559227, -0.07917815446853638, 0.12981708347797394, -0.13434143364429474, 0.20282450318336487, -0.21587970852851868, 0.17737771570682526, 0.4185040295124054, -0.12596213817596436, 0.29379570484161377, 0.17013823986053467, -0.02487948164343834, -0.12089461833238602, -0.4223830997943878, 0.7661339640617371, 0.4835483431816101, 0.15578420460224152, -0.11615703254938126, -0.21867723762989044, -0.22210381925106049, 0.14841759204864502, 0.05607042461633682, 0.0844040960073471, 0.5234328508377075, 0.13681963086128235, 0.17340469360351562, 0.08097925782203674, -0.4177885353565216, 0.3712823987007141, 0.34115758538246155, 0.00513443211093545, -0.13743609189987183, 0.4363705813884735, -0.0785389244556427, -0.36627885699272156, 0.338037371635437, -0.5506460070610046, -0.0050994944758713245, 0.23303887248039246, 0.2333679348230362, 0.02353234775364399, -0.017760125920176506, -0.03146413341164589, 0.09837689250707626, 0.010549815371632576, -0.054277244955301285, 0.012683560140430927, 0.21903596818447113, 0.25331488251686096, -0.073250912129879, -0.09442078322172165, -0.13243000209331512, 0.023658372461795807, -0.15722084045410156, 0.12378590553998947, -0.41272082924842834, -0.1031663715839386, -0.15537582337856293, -0.336269348859787, -0.0705450028181076, -0.17990992963314056, 0.03007371351122856, 0.1377863734960556, -0.02850492112338543, 0.1710876077413559, 0.021794553846120834, 0.046973761171102524, 0.05702967941761017, -0.22337673604488373, -0.1739787608385086, -0.19699904322624207, -0.03078438527882099, 0.033853769302368164, 0.14755915105342865, -0.03262906149029732, 0.3699896037578583, -0.006935081910341978, 0.10596281290054321, 0.07633829861879349, -0.27659308910369873, 0.04859471321105957, -0.13361158967018127, -0.255121648311615, 0.049609191715717316, -0.12589730322360992, -0.22807878255844116, -0.1208019107580185, 0.09727273136377335, 0.0017799012130126357, 0.05872400104999542, -0.155365988612175, -0.09026351571083069, 0.18178166449069977, -0.019236180931329727, -0.22558097541332245, -0.24595893919467926, -0.30734920501708984, -0.04960606247186661, -0.16775672137737274, 0.1565367579460144, -0.2041860669851303, -0.028364453464746475, 0.13088281452655792, 0.2082248479127884, 0.0456591434776783, 0.023680835962295532, -0.42927679419517517, 0.4179669916629791, -0.2306930273771286, -0.16887840628623962, -0.40110936760902405, -0.0202503465116024, 0.000050823182391468436, 0.3673449456691742, -0.4472310245037079, 0.2142149657011032, -0.06474298983812332, 0.1862565279006958, -0.2460256814956665, -0.11651895940303802, 0.14454935491085052, 0.24861568212509155, -0.09356911480426788, 0.00809976551681757, 0.07200409471988678, -0.1541752964258194, -0.2329794019460678, 0.10221605747938156, -0.07459978759288788, 0.30419760942459106, 0.3246071934700012, 0.6840352416038513, -0.061722494661808014, -0.34579330682754517, 0.10292664915323257, 0.12350215017795563, 0.1042315661907196, -0.09333684295415878, -0.2323143631219864, 0.1221761703491211, -0.2074720412492752, 0.3181699216365814, 0.3299957513809204, -0.05358630791306496, -0.21739181876182556, -0.01385748665779829, -0.22037923336029053, 0.14594650268554688, -0.24292021989822388, 0.6411697864532471, -0.4819492995738983, 0.28053712844848633, -0.09434421360492706, 0.4774986505508423, -0.2672185003757477, -0.2383502572774887, 0.29150599241256714, -0.0068227313458919525, 0.2728032171726227, -0.17760097980499268, 0.10382381826639175, -0.17983485758304596, -0.4914887547492981, 0.24443550407886505, 0.3847653269767761, 0.19534815847873688, 0.033088795840740204, -0.012956288643181324, 0.19633443653583527, -0.05674463137984276, 0.2656690180301666, 0.006643273402005434, -0.17946988344192505, 0.1652773916721344, -0.5235356092453003, -0.19511981308460236, 0.009396686218678951, -0.0036708891857415438, -0.0709712952375412, -0.07673551142215729, 0.27617016434669495, -0.11872396618127823, -0.39650917053222656, 0.29413744807243347, -0.05354875326156616, -0.059853196144104004, -0.0008519382681697607, 0.05153598636388779, -0.011456861160695553, -0.1247611865401268, 0.16677182912826538, 0.076572947204113, -0.010711987502872944, -0.21172723174095154, -0.05749518424272537, -0.11023319512605667, 0.2859821915626526, 0.34949588775634766, 0.025546154007315636, -0.10263799130916595, 0.021712327376008034, 0.11759792268276215, 0.0775161013007164, 0.33610641956329346, 0.47614097595214844, 0.07305523753166199, -0.3765411376953125, 0.046518970280885696, -0.03454190120100975, -0.09407086670398712, 0.2185598909854889, 0.5431832075119019, 0.09415299445390701, 0.35724732279777527, -0.2959463596343994, 0.0031486949883401394, -0.44047263264656067, 0.12412223219871521, 0.07991085201501846, 0.01646086759865284, -0.5305219292640686, -0.5308511853218079, 0.44491347670555115, 0.09528901427984238, -0.007360393181443214, 0.30800238251686096, -0.1986231952905655, -0.17226600646972656, 0.43405818939208984, 0.46194154024124146, 1.0132726430892944, 0.01846279390156269, 0.437116801738739, 0.07837948203086853, -0.30312812328338623, -0.010950441472232342, -0.6706629395484924, 0.2412649542093277, -0.3993290364742279, -0.22910551726818085, -0.01665329746901989, 0.0206780806183815, 0.1523991972208023, -0.06725743412971497, 0.020589832216501236, 0.03182273730635643, 0.15620580315589905, 0.09961488097906113, -0.05272224545478821, 0.1821584403514862, 0.2133355587720871, -0.7044994235038757, -0.20400361716747284, 0.11375054717063904, 0.09074971079826355, 0.11755798757076263, -0.04896043613553047, -0.2579955756664276, -0.16638235747814178, 0.19056588411331177, -0.138358011841774, -0.04506179690361023, -0.21009501814842224, 0.09555229544639587, -0.2639065682888031, -0.8112207055091858, 0.3461894690990448, 0.11804499477148056, 0.17771190404891968, 0.1102318987250328, 0.00897553376853466, 0.1276237666606903, 0.11280893534421921, 0.3375873565673828, 0.19162224233150482, -0.3779067397117615, 0.3423674702644348, -0.018887432292103767, 0.003991719800978899, 0.20391340553760529, 0.04537926986813545, -0.1885494440793991, -0.03059154376387596, -0.04270634055137634, 0.2833446264266968, -0.16243061423301697, 0.08990607410669327, -0.11142119765281677, -0.05001657083630562, -0.2463735044002533, 0.11213358491659164, 0.13389652967453003, -0.0950404703617096, 0.24689242243766785, -0.0048646521754562855, -0.26272785663604736, -0.260115385055542, 0.5095310211181641, 0.1535366326570511, -0.11777006834745407, 0.16912680864334106, 0.3207576274871826, -0.5200852751731873, -0.152025505900383, 0.2127372771501541, 0.45299696922302246, -0.31429076194763184, -0.13947169482707977, -0.1035798192024231, -0.08572937548160553, -0.0949096754193306, -0.11065226793289185, -0.0858021005988121, -0.17949886620044708, -0.10170076042413712, 0.1357046216726303, -0.4016145169734955, -0.08848094940185547, -0.20727969706058502, 0.26217490434646606, 0.00598439434543252, 0.45047813653945923, -0.20523615181446075, 0.25692322850227356, -0.3582395911216736, -0.11573688685894012, 0.18900157511234283, 0.2031717598438263, -0.12233263999223709, 0.11050406098365784, 0.10153357684612274, 0.23654663562774658, 0.04701260104775429, 0.38061562180519104, -0.013310662470757961, -0.14378435909748077, -0.21117354929447174, 0.1359448879957199, -0.1630239635705948, -0.20400401949882507, 0.1853446364402771, 0.07138187438249588, -0.2378404140472412, -0.39862769842147827, 0.20836356282234192, 0.12159580737352371, 0.0794299989938736, 0.2650214731693268, 0.1749061644077301, 0.1456356942653656, -0.011683212593197823, 0.16143549978733063, 0.04361100122332573, 0.3500569462776184, -0.1312398612499237, -0.033134859055280685, -0.15472325682640076, -0.1816767156124115, 0.01940932497382164, 0.1629772037267685, 0.4281505346298218, 0.09542284160852432, 0.33209875226020813, 0.027959810569882393, 0.02676539495587349, -0.18606363236904144, 0.3409811854362488, -0.08448964357376099, -0.06208125501871109, -0.2638731002807617, 0.34565606713294983, 0.13651566207408905, -0.09071410447359085, -0.06269524991512299, -0.1355544775724411, -0.4172331988811493, 0.15794329345226288, 0.1829022467136383, 0.551147997379303, 0.45522263646125793, 0.161376953125, -0.06117405742406845, 0.04121697321534157, -0.215776264667511, -0.16084368526935577, 0.4734090268611908, 0.25229182839393616, -0.015894418582320213, 0.29460659623146057, 0.06074833497405052, 0.1728648543357849, 0.1979302167892456, 0.166909858584404, 0.5242633819580078, 0.4437015950679779, 0.22663310170173645, -0.16032616794109344, -0.2803913950920105, -0.276070237159729, 0.07497595995664597, 0.09503986686468124, 0.4341542422771454, -0.16329540312290192, 0.2683144807815552, -0.012611709535121918, -0.46388930082321167, 0.18484950065612793, 0.5748339295387268, -0.24232520163059235, -0.07486443966627121, 0.21023714542388916, -0.019163828343153, -0.3495027720928192, 0.09301412850618362, -0.10507240891456604, -0.07510082423686981, -0.015653332695364952, 0.31382066011428833, 0.03484075516462326, 0.019151385873556137, 0.11644317954778671, -0.16677340865135193, 0.43281498551368713, -0.21308833360671997, -0.05874646455049515, 0.034081608057022095, 0.005026351194828749, -0.06483415514230728, -0.05554915964603424, 0.2003888338804245, -0.09766363352537155, -0.3771408498287201, -0.03799949213862419, -0.20765654742717743, 0.11538089066743851, 0.17506712675094604, 0.08639456331729889, -0.04718661680817604, -0.22251248359680176, 0.33770954608917236, 0.027160413563251495, -0.1881805956363678, 0.06818106770515442, 0.02100931480526924, -0.07886143773794174, -0.06442343443632126, 0.19694854319095612, 0.36741816997528076, -0.1713653802871704, -0.21732671558856964, -0.3684089183807373, -0.2444453090429306, -0.19971585273742676, 0.5486779808998108, -0.08734674751758575, -0.03353331238031387, 0.09559376537799835, 0.10148152709007263, 0.08621752262115479, 0.6552402973175049, 0.0800398588180542, 0.10044154524803162, -0.30571669340133667, -0.1001811996102333, -0.019847538322210312, -0.034776732325553894, -0.030332747846841812, -0.13634392619132996, 0.06632109731435776, -0.03536372259259224, 0.25373050570487976, -0.01605556719005108, -0.0654061809182167, -0.19823889434337616, 0.25221654772758484, 0.3421797454357147, -0.31514114141464233, 0.19319479167461395, -0.5118902325630188, 0.15018171072006226, -0.1294439435005188, -0.22087673842906952, 0.21895407140254974, 0.2018657922744751, 0.08278875052928925, -0.2830985188484192, -0.15040844678878784, 0.2201899141073227, 0.12713466584682465, 0.46971389651298523, -0.09937398135662079, 0.03842402249574661, -0.16377271711826324, -0.24263103306293488, -0.11561567336320877, 0.1785309761762619, -0.15644080936908722, 0.17888584733009338, 0.1588067263364792, 0.3668152093887329, 0.11205218732357025, -0.5914252996444702, -0.28310972452163696, 0.6362105011940002, 0.1218940019607544, -0.13339054584503174, -0.12978650629520416, 0.3011381924152374, -0.1914130300283432, -0.008940101601183414, 0.11733817309141159, 0.3214927017688751, 0.40397024154663086, 0.11564785987138748, -0.6210436820983887, -0.25915148854255676, 0.33287328481674194, -0.20742884278297424, -0.07195882499217987, -0.1597018837928772, -0.0799209401011467, 0.26900553703308105, 0.5017653107643127, -0.7551472783088684, -0.12310092896223068, 0.12834133207798004, 0.09595794975757599, -0.09908198565244675, 0.3250199556350708, 0.32278716564178467, 0.03672628104686737, -0.3005054295063019, -0.03767721354961395, -0.1567608267068863, -0.01694512739777565, -0.3125457763671875, -0.291781485080719 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Hi ! I just re-ran a quick benchmark and using `to_numpy()` seems to be faster now: ```python import pyarrow as pa # I used pyarrow 3.0.0 import numpy as np n, max_length = 1_000, 512 low, high, size = 0, 2 << 16, (n, max_length) table = pa.Table.from_pydict({ "input_ids": np.random.default_rng(42).integers(low=low, high=high, size=size).tolist() }) %%timeit _ = table.to_pandas()["input_ids"].to_numpy() # 1.44 ms ± 80.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %%timeit _ = table["input_ids"].to_pandas().to_numpy() # 461 µs ± 14.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %%timeit _ = table["input_ids"].to_numpy() # 317 µs ± 5.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) ``` Currently the conversion from arrow to numpy is done in the NumpyArrowExtractor here: https://github.com/huggingface/datasets/blob/d6d0ede9486ffad7944642ca9a326e058b676788/src/datasets/formatting/formatting.py#L143-L166 Let's update the NumpyArrowExtractor to call `to_numpy` directly and see how our github benchmarks evolve ?__
**Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
150
Improve torch formatting performance **Is your feature request related to a problem? Please describe.** It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors. A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs. The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded. **Describe the solution you'd like** Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call. ![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png) As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call. Digging a bit deeper into format_batch we can see the following profiler data: ![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png) Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion. **Describe alternatives you've considered** I am not familiar with pyarrow and have not yet considered the alternatives to the current approach. Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%. Hi ! I just re-ran a quick benchmark and using `to_numpy()` seems to be faster now: ```python import pyarrow as pa # I used pyarrow 3.0.0 import numpy as np n, max_length = 1_000, 512 low, high, size = 0, 2 << 16, (n, max_length) table = pa.Table.from_pydict({ "input_ids": np.random.default_rng(42).integers(low=low, high=high, size=size).tolist() }) %%timeit _ = table.to_pandas()["input_ids"].to_numpy() # 1.44 ms ± 80.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %%timeit _ = table["input_ids"].to_pandas().to_numpy() # 461 µs ± 14.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %%timeit _ = table["input_ids"].to_numpy() # 317 µs ± 5.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) ``` Currently the conversion from arrow to numpy is done in the NumpyArrowExtractor here: https://github.com/huggingface/datasets/blob/d6d0ede9486ffad7944642ca9a326e058b676788/src/datasets/formatting/formatting.py#L143-L166 Let's update the NumpyArrowExtractor to call `to_numpy` directly and see how our github benchmarks evolve ?__
[ -0.35013502836227417, -0.2402968555688858, -0.07366806268692017, 0.19035720825195312, 0.10275429487228394, 0.14770673215389252, 0.2599892020225525, 0.6868165135383606, -0.1211305633187294, -0.06412012130022049, -0.3566420376300812, 0.24314066767692566, -0.11459874361753464, -0.03322210535407066, 0.06633539497852325, -0.31011107563972473, 0.0007661504205316305, 0.10030759871006012, -0.06789635866880417, -0.1308620274066925, -0.10192389786243439, -0.42416369915008545, 0.05567821115255356, -0.23089267313480377, -0.17646470665931702, 0.14338846504688263, -0.07297057658433914, 0.004990238230675459, -0.01477809902280569, -0.39140796661376953, -0.016802623867988586, 0.20411241054534912, 0.1916380673646927, 0.23665572702884674, -0.00010873939754674211, -0.021962596103549004, 0.10556352883577347, 0.029854923486709595, -0.3094555735588074, 0.26161715388298035, 0.3262716233730316, -0.3157899081707001, 0.054560042917728424, -0.2053413689136505, -0.4622156322002411, -0.20446546375751495, -0.011553972028195858, -0.3079184293746948, 0.043709781020879745, 0.03249484673142433, 0.15432792901992798, 0.25674086809158325, -0.3000166416168213, 0.18780508637428284, 0.3291626274585724, 0.4852654039859772, -0.17528603971004486, 0.09861963987350464, 0.30015191435813904, 0.029167788103222847, -0.5153073668479919, 0.6179620027542114, -0.17225775122642517, -0.03250325471162796, 0.17719502747058868, 0.06036928668618202, -0.2424560785293579, -0.11644986271858215, -0.08242101967334747, 0.40601953864097595, 0.03252507001161575, -0.24459008872509003, -0.5007597804069519, -0.4453505277633667, -0.030953001230955124, -0.5959246754646301, -0.10014688223600388, 0.11138800531625748, -0.28344228863716125, 0.14668843150138855, -0.06803422421216965, 0.03688087314367294, -0.12036439031362534, -0.0961364209651947, -0.05475905165076256, 0.2587931156158447, 0.24107308685779572, -0.22259606420993805, 0.09051378071308136, 0.19611382484436035, 0.45580002665519714, -0.11577942967414856, 0.2760973870754242, -0.004552865866571665, -0.3522317409515381, -0.16664119064807892, -0.023671945556998253, -0.18670837581157684, -0.15297454595565796, -0.06688877940177917, 0.12647967040538788, 0.5531221628189087, -0.09119223058223724, -0.019700851291418076, -0.2372613549232483, 0.03756023570895195, -0.10326092690229416, 0.21059228479862213, 0.19669963419437408, -0.1186811700463295, 0.0677642896771431, 0.19367553293704987, -0.07801699638366699, -0.04930747300386429, -0.31201067566871643, 0.14273659884929657, -0.4815458357334137, -0.08429009467363358, -0.1862221509218216, 0.025211220607161522, -0.13065584003925323, -0.13335020840168, 0.04096149653196335, 0.3111972212791443, -0.28630754351615906, 0.19483385980129242, 0.1680845320224762, -0.14746175706386566, -0.24756157398223877, -0.267926424741745, 0.05119398608803749, 0.17039579153060913, -0.28935298323631287, 0.006973403971642256, 0.2033197432756424, -0.24583031237125397, -0.0934310257434845, -0.07095485180616379, 0.07478596270084381, 0.38875988125801086, 0.02003239095211029, -0.22809676826000214, 0.47664499282836914, -0.02710232511162758, -0.06796304881572723, 0.013656022027134895, 0.18137024343013763, 0.5773717761039734, -0.27960941195487976, 0.15739957988262177, -0.19168256223201752, -0.20621617138385773, -0.1592077612876892, 0.10195880383253098, 0.07004474103450775, 0.007334951311349869, 0.06688392162322998, 0.342428058385849, 0.13319182395935059, 0.07672039419412613, 0.12647250294685364, -0.24908116459846497, -0.335659384727478, -0.11782256513834, 0.3001018762588501, 0.30322447419166565, -0.19894106686115265, -0.04738602787256241, 0.47587329149246216, 0.34417903423309326, 0.42208805680274963, 0.4858787953853607, -0.30004432797431946, 0.1179690733551979, -0.029024114832282066, 0.007255817297846079, 0.3716585040092468, -0.3697827160358429, -0.12970757484436035, 0.3484440743923187, 0.07491343468427658, 0.2708401083946228, 0.16083942353725433, 0.19488313794136047, 0.40462997555732727, -0.005936773959547281, 0.0729745551943779, 0.395488440990448, 0.00821998156607151, -0.04994760453701019, -0.48246461153030396, -0.17390605807304382, 0.44338110089302063, 0.39572638273239136, 0.05743395537137985, -0.3865260183811188, -0.118864506483078, -0.10473856329917908, 0.40310561656951904, -0.3227180540561676, 0.1457480937242508, 0.10898637026548386, -0.1720588207244873, 0.15341337025165558, 0.015173672698438168, 0.2190544307231903, -0.11219500005245209, 0.22420945763587952, -0.3645496070384979, 0.3796462118625641, 0.04791222885251045, -0.19506436586380005, 0.3231685161590576, -0.03614582493901253, -0.003983111586421728, -0.25541967153549194, 0.040707726031541824, -0.04461820051074028, -0.20460306107997894, 0.025376632809638977, 0.0424455888569355, 0.37194696068763733, -0.2666929066181183, 0.11531219631433487, -0.23192980885505676, 0.11067304015159607, 0.05290605500340462, -0.052873313426971436, -0.053453098982572556, 0.2816495895385742, 0.06501001119613647, -0.04305165633559227, -0.07917815446853638, 0.12981708347797394, -0.13434143364429474, 0.20282450318336487, -0.21587970852851868, 0.17737771570682526, 0.4185040295124054, -0.12596213817596436, 0.29379570484161377, 0.17013823986053467, -0.02487948164343834, -0.12089461833238602, -0.4223830997943878, 0.7661339640617371, 0.4835483431816101, 0.15578420460224152, -0.11615703254938126, -0.21867723762989044, -0.22210381925106049, 0.14841759204864502, 0.05607042461633682, 0.0844040960073471, 0.5234328508377075, 0.13681963086128235, 0.17340469360351562, 0.08097925782203674, -0.4177885353565216, 0.3712823987007141, 0.34115758538246155, 0.00513443211093545, -0.13743609189987183, 0.4363705813884735, -0.0785389244556427, -0.36627885699272156, 0.338037371635437, -0.5506460070610046, -0.0050994944758713245, 0.23303887248039246, 0.2333679348230362, 0.02353234775364399, -0.017760125920176506, -0.03146413341164589, 0.09837689250707626, 0.010549815371632576, -0.054277244955301285, 0.012683560140430927, 0.21903596818447113, 0.25331488251686096, -0.073250912129879, -0.09442078322172165, -0.13243000209331512, 0.023658372461795807, -0.15722084045410156, 0.12378590553998947, -0.41272082924842834, -0.1031663715839386, -0.15537582337856293, -0.336269348859787, -0.0705450028181076, -0.17990992963314056, 0.03007371351122856, 0.1377863734960556, -0.02850492112338543, 0.1710876077413559, 0.021794553846120834, 0.046973761171102524, 0.05702967941761017, -0.22337673604488373, -0.1739787608385086, -0.19699904322624207, -0.03078438527882099, 0.033853769302368164, 0.14755915105342865, -0.03262906149029732, 0.3699896037578583, -0.006935081910341978, 0.10596281290054321, 0.07633829861879349, -0.27659308910369873, 0.04859471321105957, -0.13361158967018127, -0.255121648311615, 0.049609191715717316, -0.12589730322360992, -0.22807878255844116, -0.1208019107580185, 0.09727273136377335, 0.0017799012130126357, 0.05872400104999542, -0.155365988612175, -0.09026351571083069, 0.18178166449069977, -0.019236180931329727, -0.22558097541332245, -0.24595893919467926, -0.30734920501708984, -0.04960606247186661, -0.16775672137737274, 0.1565367579460144, -0.2041860669851303, -0.028364453464746475, 0.13088281452655792, 0.2082248479127884, 0.0456591434776783, 0.023680835962295532, -0.42927679419517517, 0.4179669916629791, -0.2306930273771286, -0.16887840628623962, -0.40110936760902405, -0.0202503465116024, 0.000050823182391468436, 0.3673449456691742, -0.4472310245037079, 0.2142149657011032, -0.06474298983812332, 0.1862565279006958, -0.2460256814956665, -0.11651895940303802, 0.14454935491085052, 0.24861568212509155, -0.09356911480426788, 0.00809976551681757, 0.07200409471988678, -0.1541752964258194, -0.2329794019460678, 0.10221605747938156, -0.07459978759288788, 0.30419760942459106, 0.3246071934700012, 0.6840352416038513, -0.061722494661808014, -0.34579330682754517, 0.10292664915323257, 0.12350215017795563, 0.1042315661907196, -0.09333684295415878, -0.2323143631219864, 0.1221761703491211, -0.2074720412492752, 0.3181699216365814, 0.3299957513809204, -0.05358630791306496, -0.21739181876182556, -0.01385748665779829, -0.22037923336029053, 0.14594650268554688, -0.24292021989822388, 0.6411697864532471, -0.4819492995738983, 0.28053712844848633, -0.09434421360492706, 0.4774986505508423, -0.2672185003757477, -0.2383502572774887, 0.29150599241256714, -0.0068227313458919525, 0.2728032171726227, -0.17760097980499268, 0.10382381826639175, -0.17983485758304596, -0.4914887547492981, 0.24443550407886505, 0.3847653269767761, 0.19534815847873688, 0.033088795840740204, -0.012956288643181324, 0.19633443653583527, -0.05674463137984276, 0.2656690180301666, 0.006643273402005434, -0.17946988344192505, 0.1652773916721344, -0.5235356092453003, -0.19511981308460236, 0.009396686218678951, -0.0036708891857415438, -0.0709712952375412, -0.07673551142215729, 0.27617016434669495, -0.11872396618127823, -0.39650917053222656, 0.29413744807243347, -0.05354875326156616, -0.059853196144104004, -0.0008519382681697607, 0.05153598636388779, -0.011456861160695553, -0.1247611865401268, 0.16677182912826538, 0.076572947204113, -0.010711987502872944, -0.21172723174095154, -0.05749518424272537, -0.11023319512605667, 0.2859821915626526, 0.34949588775634766, 0.025546154007315636, -0.10263799130916595, 0.021712327376008034, 0.11759792268276215, 0.0775161013007164, 0.33610641956329346, 0.47614097595214844, 0.07305523753166199, -0.3765411376953125, 0.046518970280885696, -0.03454190120100975, -0.09407086670398712, 0.2185598909854889, 0.5431832075119019, 0.09415299445390701, 0.35724732279777527, -0.2959463596343994, 0.0031486949883401394, -0.44047263264656067, 0.12412223219871521, 0.07991085201501846, 0.01646086759865284, -0.5305219292640686, -0.5308511853218079, 0.44491347670555115, 0.09528901427984238, -0.007360393181443214, 0.30800238251686096, -0.1986231952905655, -0.17226600646972656, 0.43405818939208984, 0.46194154024124146, 1.0132726430892944, 0.01846279390156269, 0.437116801738739, 0.07837948203086853, -0.30312812328338623, -0.010950441472232342, -0.6706629395484924, 0.2412649542093277, -0.3993290364742279, -0.22910551726818085, -0.01665329746901989, 0.0206780806183815, 0.1523991972208023, -0.06725743412971497, 0.020589832216501236, 0.03182273730635643, 0.15620580315589905, 0.09961488097906113, -0.05272224545478821, 0.1821584403514862, 0.2133355587720871, -0.7044994235038757, -0.20400361716747284, 0.11375054717063904, 0.09074971079826355, 0.11755798757076263, -0.04896043613553047, -0.2579955756664276, -0.16638235747814178, 0.19056588411331177, -0.138358011841774, -0.04506179690361023, -0.21009501814842224, 0.09555229544639587, -0.2639065682888031, -0.8112207055091858, 0.3461894690990448, 0.11804499477148056, 0.17771190404891968, 0.1102318987250328, 0.00897553376853466, 0.1276237666606903, 0.11280893534421921, 0.3375873565673828, 0.19162224233150482, -0.3779067397117615, 0.3423674702644348, -0.018887432292103767, 0.003991719800978899, 0.20391340553760529, 0.04537926986813545, -0.1885494440793991, -0.03059154376387596, -0.04270634055137634, 0.2833446264266968, -0.16243061423301697, 0.08990607410669327, -0.11142119765281677, -0.05001657083630562, -0.2463735044002533, 0.11213358491659164, 0.13389652967453003, -0.0950404703617096, 0.24689242243766785, -0.0048646521754562855, -0.26272785663604736, -0.260115385055542, 0.5095310211181641, 0.1535366326570511, -0.11777006834745407, 0.16912680864334106, 0.3207576274871826, -0.5200852751731873, -0.152025505900383, 0.2127372771501541, 0.45299696922302246, -0.31429076194763184, -0.13947169482707977, -0.1035798192024231, -0.08572937548160553, -0.0949096754193306, -0.11065226793289185, -0.0858021005988121, -0.17949886620044708, -0.10170076042413712, 0.1357046216726303, -0.4016145169734955, -0.08848094940185547, -0.20727969706058502, 0.26217490434646606, 0.00598439434543252, 0.45047813653945923, -0.20523615181446075, 0.25692322850227356, -0.3582395911216736, -0.11573688685894012, 0.18900157511234283, 0.2031717598438263, -0.12233263999223709, 0.11050406098365784, 0.10153357684612274, 0.23654663562774658, 0.04701260104775429, 0.38061562180519104, -0.013310662470757961, -0.14378435909748077, -0.21117354929447174, 0.1359448879957199, -0.1630239635705948, -0.20400401949882507, 0.1853446364402771, 0.07138187438249588, -0.2378404140472412, -0.39862769842147827, 0.20836356282234192, 0.12159580737352371, 0.0794299989938736, 0.2650214731693268, 0.1749061644077301, 0.1456356942653656, -0.011683212593197823, 0.16143549978733063, 0.04361100122332573, 0.3500569462776184, -0.1312398612499237, -0.033134859055280685, -0.15472325682640076, -0.1816767156124115, 0.01940932497382164, 0.1629772037267685, 0.4281505346298218, 0.09542284160852432, 0.33209875226020813, 0.027959810569882393, 0.02676539495587349, -0.18606363236904144, 0.3409811854362488, -0.08448964357376099, -0.06208125501871109, -0.2638731002807617, 0.34565606713294983, 0.13651566207408905, -0.09071410447359085, -0.06269524991512299, -0.1355544775724411, -0.4172331988811493, 0.15794329345226288, 0.1829022467136383, 0.551147997379303, 0.45522263646125793, 0.161376953125, -0.06117405742406845, 0.04121697321534157, -0.215776264667511, -0.16084368526935577, 0.4734090268611908, 0.25229182839393616, -0.015894418582320213, 0.29460659623146057, 0.06074833497405052, 0.1728648543357849, 0.1979302167892456, 0.166909858584404, 0.5242633819580078, 0.4437015950679779, 0.22663310170173645, -0.16032616794109344, -0.2803913950920105, -0.276070237159729, 0.07497595995664597, 0.09503986686468124, 0.4341542422771454, -0.16329540312290192, 0.2683144807815552, -0.012611709535121918, -0.46388930082321167, 0.18484950065612793, 0.5748339295387268, -0.24232520163059235, -0.07486443966627121, 0.21023714542388916, -0.019163828343153, -0.3495027720928192, 0.09301412850618362, -0.10507240891456604, -0.07510082423686981, -0.015653332695364952, 0.31382066011428833, 0.03484075516462326, 0.019151385873556137, 0.11644317954778671, -0.16677340865135193, 0.43281498551368713, -0.21308833360671997, -0.05874646455049515, 0.034081608057022095, 0.005026351194828749, -0.06483415514230728, -0.05554915964603424, 0.2003888338804245, -0.09766363352537155, -0.3771408498287201, -0.03799949213862419, -0.20765654742717743, 0.11538089066743851, 0.17506712675094604, 0.08639456331729889, -0.04718661680817604, -0.22251248359680176, 0.33770954608917236, 0.027160413563251495, -0.1881805956363678, 0.06818106770515442, 0.02100931480526924, -0.07886143773794174, -0.06442343443632126, 0.19694854319095612, 0.36741816997528076, -0.1713653802871704, -0.21732671558856964, -0.3684089183807373, -0.2444453090429306, -0.19971585273742676, 0.5486779808998108, -0.08734674751758575, -0.03353331238031387, 0.09559376537799835, 0.10148152709007263, 0.08621752262115479, 0.6552402973175049, 0.0800398588180542, 0.10044154524803162, -0.30571669340133667, -0.1001811996102333, -0.019847538322210312, -0.034776732325553894, -0.030332747846841812, -0.13634392619132996, 0.06632109731435776, -0.03536372259259224, 0.25373050570487976, -0.01605556719005108, -0.0654061809182167, -0.19823889434337616, 0.25221654772758484, 0.3421797454357147, -0.31514114141464233, 0.19319479167461395, -0.5118902325630188, 0.15018171072006226, -0.1294439435005188, -0.22087673842906952, 0.21895407140254974, 0.2018657922744751, 0.08278875052928925, -0.2830985188484192, -0.15040844678878784, 0.2201899141073227, 0.12713466584682465, 0.46971389651298523, -0.09937398135662079, 0.03842402249574661, -0.16377271711826324, -0.24263103306293488, -0.11561567336320877, 0.1785309761762619, -0.15644080936908722, 0.17888584733009338, 0.1588067263364792, 0.3668152093887329, 0.11205218732357025, -0.5914252996444702, -0.28310972452163696, 0.6362105011940002, 0.1218940019607544, -0.13339054584503174, -0.12978650629520416, 0.3011381924152374, -0.1914130300283432, -0.008940101601183414, 0.11733817309141159, 0.3214927017688751, 0.40397024154663086, 0.11564785987138748, -0.6210436820983887, -0.25915148854255676, 0.33287328481674194, -0.20742884278297424, -0.07195882499217987, -0.1597018837928772, -0.0799209401011467, 0.26900553703308105, 0.5017653107643127, -0.7551472783088684, -0.12310092896223068, 0.12834133207798004, 0.09595794975757599, -0.09908198565244675, 0.3250199556350708, 0.32278716564178467, 0.03672628104686737, -0.3005054295063019, -0.03767721354961395, -0.1567608267068863, -0.01694512739777565, -0.3125457763671875, -0.291781485080719 ]