html_url
stringlengths
51
51
title
stringlengths
6
280
comments
stringlengths
67
24.7k
body
stringlengths
51
36.2k
comment_length
int64
16
1.45k
text
stringlengths
159
38.3k
embeddings
sequence
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.14324821531772614, 0.06931086629629135, -0.06279647350311279, 0.12031332403421402, 0.11721926182508469, 0.07895287871360779, 0.01462775468826294, 0.09085715562105179, -0.08753762394189835, 0.10783059149980545, -0.11292168498039246, -0.1283714771270752, 0.012341110967099667, -0.11570615321397781, 0.002806107746437192, -0.002937052398920059, -0.027660338208079338, -0.013114896602928638, -0.07899755239486694, -0.1302265077829361, 0.0662628784775734, 0.17251276969909668, 0.29177406430244446, 0.0430574007332325, -0.07306496798992157, -0.14903871715068817, -0.03398102894425392, 0.09764759242534637, -0.04724680259823799, -0.050561316311359406, 0.07867162674665451, -0.1070036068558693, -0.038617588579654694, 0.2948615252971649, 0.000005393384981289273, -0.02037697657942772, 0.07603291422128677, 0.047185953706502914, -0.03458628058433533, 0.1531813144683838, 0.2138543277978897, 0.0012726166751235723, -0.010418269783258438, -0.0007037919713184237, 0.0010480814380571246, -0.12983247637748718, -0.033487699925899506, -0.07658722996711731, 0.06064207851886749, -0.06998445838689804, 0.008073451928794384, -0.03159894421696663, -0.05037294700741768, 0.011677623726427555, 0.06054035946726799, -0.04576517641544342, -0.011245276778936386, -0.0005557325785048306, -0.15621572732925415, -0.09892112761735916, 0.0518011674284935, 0.1467972993850708, 0.07551035284996033, -0.008418825455009937, 0.18805119395256042, 0.20505940914154053, -0.13830707967281342, -0.042050573974847794, 0.15698948502540588, 0.11360280960798264, 0.08683111518621445, -0.0955745056271553, -0.12860222160816193, 0.04010260850191116, -0.08868290483951569, -0.10049275308847427, 0.01054698508232832, 0.10629181563854218, -0.09334398061037064, -0.17483781278133392, 0.005005645100027323, -0.04690437763929367, 0.014258907176554203, 0.05718015506863594, -0.2303774207830429, -0.21464000642299652, -0.09252479672431946, 0.08563462644815445, 0.05872911959886551, -0.01867658644914627, 0.123556949198246, 0.06692642718553543, 0.056266285479068756, -0.11890016496181488, -0.031041085720062256, 0.07027813792228699, 0.105289526283741, 0.12026230245828629, -0.028275039047002792, -0.13437899947166443, 0.22568313777446747, -0.07688917964696884, 0.04967654496431351, 0.010255051776766777, -0.01335669681429863, -0.05839107558131218, -0.16677209734916687, -0.16216948628425598, 0.07095324993133545, 0.040459975600242615, -0.09711366146802902, -0.05320395156741142, -0.08789614588022232, -0.15678654611110687, 0.2417125105857849, -0.00631535891443491, 0.1451963633298874, 0.0073404316790401936, 0.0967959314584732, -0.01793586276471615, 0.01065343152731657, 0.255548357963562, -0.08476043492555618, 0.027787648141384125, 0.05799077823758125, 0.23769895732402802, -0.13385380804538727, -0.06303440034389496, -0.2228812873363495, 0.05964961275458336, 0.01176193542778492, -0.07515696436166763, 0.15166790783405304, 0.006240419577807188, 0.049909524619579315, -0.07368738204240799, -0.01692073792219162, -0.10340463370084763, 0.056982919573783875, -0.12803128361701965, 0.13176357746124268, -0.12765495479106903, 0.0640329122543335, 0.03976815193891525, -0.07309485971927643, -0.007082018535584211, 0.09001509100198746, 0.10614657402038574, -0.10685314238071442, 0.08665503561496735, -0.07794907689094543, 0.08470302820205688, -0.19734595715999603, -0.04924434795975685, 0.15058894455432892, 0.011894392780959606, 0.08570902794599533, -0.013503272086381912, 0.008982987143099308, -0.0799003541469574, -0.0680074542760849, -0.030421750620007515, -0.12009170651435852, 0.07134374976158142, -0.029922975227236748, -0.04832442104816437, 0.13751134276390076, 0.1743515282869339, 0.004553237464278936, 0.0519484244287014, 0.0028897642623633146, 0.10806311666965485, -0.08051182329654694, -0.026611534878611565, -0.14456726610660553, 0.0764036476612091, -0.18891319632530212, -0.11588577181100845, -0.2715578079223633, -0.07216104120016098, 0.15078236162662506, -0.07845574617385864, 0.05297059938311577, 0.07219579815864563, 0.06381670385599136, -0.10467826575040817, 0.03480827435851097, 0.025943825021386147, -0.017253410071134567, -0.11782056093215942, -0.10343487560749054, -0.16892261803150177, 0.04234027490019798, -0.0058705247938632965, 0.01508165244013071, -0.13469980657100677, 0.10772334039211273, 0.02557668834924698, -0.06486078351736069, -0.17631737887859344, 0.08727487921714783, 0.07126148790121078, -0.01375175267457962, 0.0457364097237587, 0.030794324353337288, 0.034279171377420425, -0.12392676621675491, 0.046334683895111084, -0.0769931748509407, -0.2091854214668274, -0.14439424872398376, 0.03762362524867058, 0.08873844891786575, -0.06932834535837173, 0.02193770371377468, -0.12007592618465424, -0.25135233998298645, -0.032750628888607025, 0.022128932178020477, -0.07263088971376419, -0.02923167496919632, 0.10860759764909744, 0.1349073201417923, -0.06726489961147308, -0.14350049197673798, 0.07216234505176544, 0.13766634464263916, -0.01313925813883543, 0.09497711807489395, 0.046369921416044235, -0.08338437229394913, -0.0019526233663782477, 0.16029521822929382, -0.06989586353302002, 0.03773362189531326, 0.05166379362344742, -0.05103669688105583, -0.18869946897029877, 0.15815432369709015, 0.06137749180197716, 0.015030859038233757, 0.02738933637738228, -0.13363127410411835, 0.09182553738355637, -0.0036108961794525385, -0.1690489500761032, -0.01838184893131256, 0.20474080741405487, 0.0788809210062027, -0.02333550527691841, 0.24129639565944672, 0.15880577266216278, -0.15027299523353577, -0.10072600096464157, 0.03774772956967354, -0.0234075915068388, 0.22922088205814362, 0.2593456208705902, 0.03025643527507782, 0.036073874682188034, 0.31356102228164673, 0.05506507679820061, 0.16095510125160217, 0.1728583574295044, 0.09494100511074066, 0.008704966865479946, 0.06721046566963196, -0.004506895784288645, -0.07212257385253906, 0.16604788601398468, 0.19969435036182404, -0.054881054908037186, 0.007285362109541893, -0.0664551705121994, -0.1255561262369156, -0.01873035356402397, -0.10087747871875763, -0.05832691490650177, 0.10313863307237625, -0.12459605932235718, -0.09359800815582275, 0.1382695436477661, 0.1638990044593811, -0.019267436116933823, 0.2007954716682434, 0.16934973001480103, -0.021801745519042015, -0.07892026752233505, -0.12412221729755402, 0.16347116231918335, -0.14997641742229462, -0.023720167577266693, 0.10125383734703064, -0.02325534075498581, 0.012514026835560799, 0.01245852280408144, 0.0823339894413948, -0.06782569736242294, -0.11873225122690201, -0.1574498414993286, 0.044807612895965576, 0.07209669798612595, -0.059435877948999405, -0.23756606876850128, 0.14164255559444427, -0.17267641425132751, 0.0010242150165140629, 0.05952085182070732, -0.22232864797115326, -0.12575651705265045, 0.11399707943201065, -0.08538679033517838, 0.09088616818189621, 0.1154353991150856, -0.06091191619634628, -0.07320747524499893, -0.06920310109853745, -0.2130843698978424, 0.058613646775484085, -0.0692223533987999, 0.025071989744901657, 0.015568546019494534, -0.1055789440870285, 0.08502515405416489, 0.013756494969129562, -0.015701159834861755, -0.08636104315519333, -0.19147047400474548, 0.040661077946424484, -0.08095919340848923, 0.004099841695278883, -0.036911241710186005, -0.08992350101470947, -0.07332192361354828, -0.16237977147102356, -0.12382930517196655, -0.13601398468017578, -0.1522304117679596, 0.19465957581996918, 0.19320206344127655, 0.08730465173721313, 0.01687953621149063, -0.044172558933496475, 0.05388057231903076, 0.02440626733005047, -0.18725448846817017, -0.1346312165260315, -0.13170774281024933, 0.228105366230011, -0.013493628241121769, 0.03381183370947838, 0.025249583646655083, -0.0012146573280915618, -0.12676651775836945, -0.014263911172747612, 0.08298174291849136, -0.03431247919797897, 0.19990207254886627, 0.04741205647587776, -0.04904944822192192, 0.046034909784793854, 0.137421652674675, 0.17540055513381958, 0.057504210621118546, -0.20810618996620178, 0.032558027654886246, 0.23125304281711578, 0.18088886141777039, -0.05929289758205414, -0.16134360432624817, 0.06626978516578674, -0.1613273173570633, -0.16552205383777618, -0.0983758419752121, 0.09536813199520111, 0.022070633247494698, -0.009239102713763714, -0.10167122632265091, 0.0640801414847374, -0.045011382550001144, 0.18213005363941193, -0.09058734774589539, -0.04085749760270119, 0.054614853113889694, 0.027083560824394226, -0.09345918893814087, -0.04572213441133499, -0.010076979175209999, -0.181783989071846, 0.23264750838279724, 0.16508904099464417, 0.07649186253547668, 0.0058815148659050465, 0.028411801904439926, -0.12677934765815735, -0.10560892522335052, 0.08996936678886414, -0.0794253721833229, 0.05330013111233711, 0.0024945742916315794, 0.018159838393330574, 0.15433408319950104, 0.1436615139245987, 0.106903076171875, 0.03957481309771538, -0.12965697050094604, 0.018198847770690918, -0.03138606250286102, 0.21633954346179962, -0.08565936982631683, 0.005984813440591097, -0.11842722445726395, 0.11776933073997498, -0.027452023699879646, 0.0993632972240448, -0.022612543776631355, -0.04765791818499565, -0.006755081936717033, 0.06399752199649811, -0.16213896870613098, -0.16342033445835114, -0.08465452492237091, -0.022524135187268257, -0.1181814968585968, -0.003649163991212845, 0.04558175802230835, 0.08272190392017365, -0.23314456641674042, 0.05382320284843445, -0.034809015691280365, 0.19268269836902618, 0.17195352911949158, -0.04346592724323273, 0.06966075301170349, 0.177995964884758, -0.02965249866247177, 0.18175797164440155, 0.034502238035202026, -0.06847663223743439, 0.1077660471200943, -0.07872479408979416, 0.019016770645976067, 0.13620033860206604, -0.15223221480846405, 0.14362628757953644, -0.00583224231377244, 0.03542486950755119, -0.21446819603443146, 0.1569438874721527, -0.02253209799528122, 0.029624726623296738, 0.15470775961875916, -0.049191415309906006, -0.09546750038862228, 0.13704584538936615, 0.09242837876081467, 0.15802349150180817, -0.17063802480697632, -0.037816520780324936, -0.03766736760735512, 0.01764519326388836, -0.020979944616556168, 0.2379280924797058, 0.16233675181865692, -0.1763944774866104, 0.14217042922973633, 0.20002008974552155, -0.37497514486312866, 0.22499972581863403, 0.03991156071424484, -0.04595860466361046, 0.12881894409656525, 0.004062884487211704, -0.03168457746505737, -0.019460247829556465, -0.05320906639099121, 0.033274851739406586, 0.011516932398080826, 0.04273155704140663, -0.06684379279613495, -0.031687211245298386, -0.12690016627311707, -0.1404770016670227, -0.301108717918396, -0.030429020524024963, 0.1972617208957672, 0.035004761070013046, 0.07240371406078339, 0.0043095811270177364, -0.0190894715487957, -0.013756392523646355, -0.07592271268367767, -0.10069039463996887, -0.0183701328933239, 0.16575980186462402, -0.1215122789144516, -0.02876182831823826, -0.11502575874328613, 0.06561176478862762, -0.07080996781587601, 0.14188967645168304, 0.03924136981368065, 0.021687189117074013, -0.07402701675891876, -0.036476679146289825, -0.1809030920267105, 0.06999396532773972, -0.16499102115631104, 0.044088296592235565, 0.022127464413642883, 0.002075966214761138, 0.08976780623197556, -0.1550287902355194, -0.07157299667596817, 0.06714736670255661, -0.027687441557645798, -0.08007240295410156, 0.013684124685823917, -0.10562063008546829, -0.043112482875585556, 0.07733745872974396, 0.01767411082983017, 0.07580652832984924, -0.07615099847316742, 0.10348860919475555, -0.12668976187705994, -0.07577072829008102, -0.02575264871120453, 0.2109726071357727, -0.00247493339702487, 0.10009994357824326, 0.23930597305297852, -0.07801083475351334, -0.03472988307476044, -0.16061417758464813, 0.09415275603532791, 0.030617527663707733, -0.10092492401599884, 0.04303360730409622, -0.1577589064836502, -0.13170823454856873, -0.3456558287143707, -0.1377541869878769, 0.08192066103219986, -0.07361752539873123, -0.07853381335735321, 0.09716039150953293, -0.16067731380462646, -0.02266089804470539, -0.1045423299074173, 0.014141617342829704, 0.19918662309646606, -0.19664371013641357, -0.007563600782305002, 0.037909310311079025, -2.7119213033286813e-32, -0.08096077293157578, -0.16080518066883087, -0.07593473047018051, -0.1415676772594452, -0.1783389300107956, 0.13634991645812988, -0.08710706233978271, -0.26880064606666565, 0.0006191012798808515, -0.02339700236916542, 0.037747275084257126, 0.02465507574379444, 0.05241016671061516, -0.01554764062166214, -0.1332542598247528, -0.0578458271920681, 0.03455296531319618, -0.03149180859327316, -0.0180344358086586, 0.17378853261470795, 0.1212942972779274, 0.16036783158779144, -0.006443014368414879, -0.07142576575279236, -0.1732817143201828, 0.06085804104804993, 0.029839232563972473, -0.10207293182611465, -0.05947950854897499, 0.04033121094107628, -0.09750249236822128, 0.1606835424900055, -0.02565651386976242, -0.0459858663380146, -0.049074236303567886, -0.030750777572393417, -0.10926643013954163, 0.06908729672431946, -0.01910286396741867, -0.11652858555316925, 0.0642009750008583, 0.026988310739398003, 0.05566520243883133, -0.0474274642765522, -0.08428412675857544, 0.02960154041647911, 0.08164370059967041, -0.061627212911844254, -0.12165666371583939, -0.18011054396629333, -0.04392679035663605, 0.0792551264166832, 0.040504418313503265, 0.14148260653018951, -0.008708931505680084, -0.1297231912612915, 0.1265454888343811, 0.12298646569252014, -0.23452331125736237, 0.035339947789907455, 0.04925380274653435, 0.11103746294975281, 0.07670800387859344, 0.008294625207781792, 0.15100787580013275, 0.08915659040212631, 0.34277594089508057, 0.05677241459488869, 0.04278704524040222, 0.014979951083660126, 0.02488083392381668, -0.13224419951438904, -0.10627996921539307, -0.1483318954706192, 0.029087359085679054, -0.03089677169919014, 0.14105479419231415, -0.0913456603884697, -0.17449603974819183, 0.08933510631322861, -0.021235916763544083, -0.1678449660539627, -0.031685542315244675, -0.034533463418483734, -0.08283055573701859, 0.21946056187152863, 0.046228278428316116, 0.252108097076416, -0.020657876506447792, -0.050174251198768616, -0.055525925010442734, 0.07891818881034851, -0.006689148023724556, -0.1417785882949829, -0.0008029136224649847, 0.13056769967079163, -0.018455758690834045, 0.12047774344682693, 0.018041808158159256, 0.13790389895439148, 0.08157946914434433, -0.05881120264530182, -0.10644147545099258, -0.02424405887722969, 0.07224082201719284, 0.15224634110927582, 0.03594857454299927, 0.11942365020513535, -0.09775346517562866, 0.0029299738816916943, -0.26619020104408264, -0.10825777798891068, 0.14085066318511963, 0.103202685713768, 0.10775787383317947, 0.06454257667064667, 0.09967783838510513, 0.17212553322315216, 0.1005108579993248, 0.023913536220788956, 0.11340539157390594, -0.13395823538303375, 0.08607625961303711, 0.13264314830303192, -0.048440441489219666, 0.016423935070633888, -0.13944649696350098, 0.020324179902672768, 0.07960809767246246, -0.1614515483379364, -0.024029400199651718, 0.05936768651008606, 7.133128292480251e-7, -0.20702578127384186, 0.2142653614282608, 0.041431982070207596, -0.047288473695516586, -0.08677919954061508, 0.058751270174980164, -0.002289010211825371, 0.007751269266009331, -0.0754798948764801, 0.13075324892997742, 0.028199829161167145, 0.08476655930280685, 0.17765577137470245, -0.07467259466648102, 0.05355207622051239, -0.004822940565645695, -0.02816116437315941, -0.07193252444267273, -0.04447543993592262, 0.07945354282855988, 0.0707831084728241, 0.17082904279232025, 0.010992216877639294, -0.08863260596990585, 0.0008594878599978983, -0.16351477801799774, -0.007747663650661707, 0.0791609063744545, 0.01834077760577202, -0.10526279360055923, 0.08732108771800995, -0.1296200007200241, 0.008271117694675922, -0.10654892772436142, 0.056796226650476456, 0.019611792638897896, -0.17835402488708496, -0.17384470999240875, -0.022097932174801826, -0.034735292196273804, 0.15374545753002167, 0.04227624833583832, -0.09087896347045898, -0.06280616670846939, 0.05330103263258934, 0.09650561958551407, -0.13669191300868988, -0.01204347237944603, 0.05849169194698334, 0.03576129674911499, -0.0034667456056922674, -0.09747762233018875, 0.01340489648282528, 0.2832859754562378, -0.10279891639947891, -0.1304740309715271, 0.009971125051379204, -0.08639942109584808, 0.006081951316446066, -0.05222524330019951, -0.14062483608722687, -0.0977419763803482, -0.0625232607126236, 0.15343214571475983, 0.06789068877696991, -0.10993211716413498, -0.04217664897441864, 5.602959958855225e-35, 0.09424329549074173, -0.06741633266210556, 0.004733615554869175, -0.032449815422296524, 0.06970418989658356, -0.00958153698593378, 0.27299728989601135, 0.20712950825691223, -0.0026816949248313904, -0.22731725871562958, -0.16537629067897797 ]
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.14324821531772614, 0.06931086629629135, -0.06279647350311279, 0.12031332403421402, 0.11721926182508469, 0.07895287871360779, 0.01462775468826294, 0.09085715562105179, -0.08753762394189835, 0.10783059149980545, -0.11292168498039246, -0.1283714771270752, 0.012341110967099667, -0.11570615321397781, 0.002806107746437192, -0.002937052398920059, -0.027660338208079338, -0.013114896602928638, -0.07899755239486694, -0.1302265077829361, 0.0662628784775734, 0.17251276969909668, 0.29177406430244446, 0.0430574007332325, -0.07306496798992157, -0.14903871715068817, -0.03398102894425392, 0.09764759242534637, -0.04724680259823799, -0.050561316311359406, 0.07867162674665451, -0.1070036068558693, -0.038617588579654694, 0.2948615252971649, 0.000005393384981289273, -0.02037697657942772, 0.07603291422128677, 0.047185953706502914, -0.03458628058433533, 0.1531813144683838, 0.2138543277978897, 0.0012726166751235723, -0.010418269783258438, -0.0007037919713184237, 0.0010480814380571246, -0.12983247637748718, -0.033487699925899506, -0.07658722996711731, 0.06064207851886749, -0.06998445838689804, 0.008073451928794384, -0.03159894421696663, -0.05037294700741768, 0.011677623726427555, 0.06054035946726799, -0.04576517641544342, -0.011245276778936386, -0.0005557325785048306, -0.15621572732925415, -0.09892112761735916, 0.0518011674284935, 0.1467972993850708, 0.07551035284996033, -0.008418825455009937, 0.18805119395256042, 0.20505940914154053, -0.13830707967281342, -0.042050573974847794, 0.15698948502540588, 0.11360280960798264, 0.08683111518621445, -0.0955745056271553, -0.12860222160816193, 0.04010260850191116, -0.08868290483951569, -0.10049275308847427, 0.01054698508232832, 0.10629181563854218, -0.09334398061037064, -0.17483781278133392, 0.005005645100027323, -0.04690437763929367, 0.014258907176554203, 0.05718015506863594, -0.2303774207830429, -0.21464000642299652, -0.09252479672431946, 0.08563462644815445, 0.05872911959886551, -0.01867658644914627, 0.123556949198246, 0.06692642718553543, 0.056266285479068756, -0.11890016496181488, -0.031041085720062256, 0.07027813792228699, 0.105289526283741, 0.12026230245828629, -0.028275039047002792, -0.13437899947166443, 0.22568313777446747, -0.07688917964696884, 0.04967654496431351, 0.010255051776766777, -0.01335669681429863, -0.05839107558131218, -0.16677209734916687, -0.16216948628425598, 0.07095324993133545, 0.040459975600242615, -0.09711366146802902, -0.05320395156741142, -0.08789614588022232, -0.15678654611110687, 0.2417125105857849, -0.00631535891443491, 0.1451963633298874, 0.0073404316790401936, 0.0967959314584732, -0.01793586276471615, 0.01065343152731657, 0.255548357963562, -0.08476043492555618, 0.027787648141384125, 0.05799077823758125, 0.23769895732402802, -0.13385380804538727, -0.06303440034389496, -0.2228812873363495, 0.05964961275458336, 0.01176193542778492, -0.07515696436166763, 0.15166790783405304, 0.006240419577807188, 0.049909524619579315, -0.07368738204240799, -0.01692073792219162, -0.10340463370084763, 0.056982919573783875, -0.12803128361701965, 0.13176357746124268, -0.12765495479106903, 0.0640329122543335, 0.03976815193891525, -0.07309485971927643, -0.007082018535584211, 0.09001509100198746, 0.10614657402038574, -0.10685314238071442, 0.08665503561496735, -0.07794907689094543, 0.08470302820205688, -0.19734595715999603, -0.04924434795975685, 0.15058894455432892, 0.011894392780959606, 0.08570902794599533, -0.013503272086381912, 0.008982987143099308, -0.0799003541469574, -0.0680074542760849, -0.030421750620007515, -0.12009170651435852, 0.07134374976158142, -0.029922975227236748, -0.04832442104816437, 0.13751134276390076, 0.1743515282869339, 0.004553237464278936, 0.0519484244287014, 0.0028897642623633146, 0.10806311666965485, -0.08051182329654694, -0.026611534878611565, -0.14456726610660553, 0.0764036476612091, -0.18891319632530212, -0.11588577181100845, -0.2715578079223633, -0.07216104120016098, 0.15078236162662506, -0.07845574617385864, 0.05297059938311577, 0.07219579815864563, 0.06381670385599136, -0.10467826575040817, 0.03480827435851097, 0.025943825021386147, -0.017253410071134567, -0.11782056093215942, -0.10343487560749054, -0.16892261803150177, 0.04234027490019798, -0.0058705247938632965, 0.01508165244013071, -0.13469980657100677, 0.10772334039211273, 0.02557668834924698, -0.06486078351736069, -0.17631737887859344, 0.08727487921714783, 0.07126148790121078, -0.01375175267457962, 0.0457364097237587, 0.030794324353337288, 0.034279171377420425, -0.12392676621675491, 0.046334683895111084, -0.0769931748509407, -0.2091854214668274, -0.14439424872398376, 0.03762362524867058, 0.08873844891786575, -0.06932834535837173, 0.02193770371377468, -0.12007592618465424, -0.25135233998298645, -0.032750628888607025, 0.022128932178020477, -0.07263088971376419, -0.02923167496919632, 0.10860759764909744, 0.1349073201417923, -0.06726489961147308, -0.14350049197673798, 0.07216234505176544, 0.13766634464263916, -0.01313925813883543, 0.09497711807489395, 0.046369921416044235, -0.08338437229394913, -0.0019526233663782477, 0.16029521822929382, -0.06989586353302002, 0.03773362189531326, 0.05166379362344742, -0.05103669688105583, -0.18869946897029877, 0.15815432369709015, 0.06137749180197716, 0.015030859038233757, 0.02738933637738228, -0.13363127410411835, 0.09182553738355637, -0.0036108961794525385, -0.1690489500761032, -0.01838184893131256, 0.20474080741405487, 0.0788809210062027, -0.02333550527691841, 0.24129639565944672, 0.15880577266216278, -0.15027299523353577, -0.10072600096464157, 0.03774772956967354, -0.0234075915068388, 0.22922088205814362, 0.2593456208705902, 0.03025643527507782, 0.036073874682188034, 0.31356102228164673, 0.05506507679820061, 0.16095510125160217, 0.1728583574295044, 0.09494100511074066, 0.008704966865479946, 0.06721046566963196, -0.004506895784288645, -0.07212257385253906, 0.16604788601398468, 0.19969435036182404, -0.054881054908037186, 0.007285362109541893, -0.0664551705121994, -0.1255561262369156, -0.01873035356402397, -0.10087747871875763, -0.05832691490650177, 0.10313863307237625, -0.12459605932235718, -0.09359800815582275, 0.1382695436477661, 0.1638990044593811, -0.019267436116933823, 0.2007954716682434, 0.16934973001480103, -0.021801745519042015, -0.07892026752233505, -0.12412221729755402, 0.16347116231918335, -0.14997641742229462, -0.023720167577266693, 0.10125383734703064, -0.02325534075498581, 0.012514026835560799, 0.01245852280408144, 0.0823339894413948, -0.06782569736242294, -0.11873225122690201, -0.1574498414993286, 0.044807612895965576, 0.07209669798612595, -0.059435877948999405, -0.23756606876850128, 0.14164255559444427, -0.17267641425132751, 0.0010242150165140629, 0.05952085182070732, -0.22232864797115326, -0.12575651705265045, 0.11399707943201065, -0.08538679033517838, 0.09088616818189621, 0.1154353991150856, -0.06091191619634628, -0.07320747524499893, -0.06920310109853745, -0.2130843698978424, 0.058613646775484085, -0.0692223533987999, 0.025071989744901657, 0.015568546019494534, -0.1055789440870285, 0.08502515405416489, 0.013756494969129562, -0.015701159834861755, -0.08636104315519333, -0.19147047400474548, 0.040661077946424484, -0.08095919340848923, 0.004099841695278883, -0.036911241710186005, -0.08992350101470947, -0.07332192361354828, -0.16237977147102356, -0.12382930517196655, -0.13601398468017578, -0.1522304117679596, 0.19465957581996918, 0.19320206344127655, 0.08730465173721313, 0.01687953621149063, -0.044172558933496475, 0.05388057231903076, 0.02440626733005047, -0.18725448846817017, -0.1346312165260315, -0.13170774281024933, 0.228105366230011, -0.013493628241121769, 0.03381183370947838, 0.025249583646655083, -0.0012146573280915618, -0.12676651775836945, -0.014263911172747612, 0.08298174291849136, -0.03431247919797897, 0.19990207254886627, 0.04741205647587776, -0.04904944822192192, 0.046034909784793854, 0.137421652674675, 0.17540055513381958, 0.057504210621118546, -0.20810618996620178, 0.032558027654886246, 0.23125304281711578, 0.18088886141777039, -0.05929289758205414, -0.16134360432624817, 0.06626978516578674, -0.1613273173570633, -0.16552205383777618, -0.0983758419752121, 0.09536813199520111, 0.022070633247494698, -0.009239102713763714, -0.10167122632265091, 0.0640801414847374, -0.045011382550001144, 0.18213005363941193, -0.09058734774589539, -0.04085749760270119, 0.054614853113889694, 0.027083560824394226, -0.09345918893814087, -0.04572213441133499, -0.010076979175209999, -0.181783989071846, 0.23264750838279724, 0.16508904099464417, 0.07649186253547668, 0.0058815148659050465, 0.028411801904439926, -0.12677934765815735, -0.10560892522335052, 0.08996936678886414, -0.0794253721833229, 0.05330013111233711, 0.0024945742916315794, 0.018159838393330574, 0.15433408319950104, 0.1436615139245987, 0.106903076171875, 0.03957481309771538, -0.12965697050094604, 0.018198847770690918, -0.03138606250286102, 0.21633954346179962, -0.08565936982631683, 0.005984813440591097, -0.11842722445726395, 0.11776933073997498, -0.027452023699879646, 0.0993632972240448, -0.022612543776631355, -0.04765791818499565, -0.006755081936717033, 0.06399752199649811, -0.16213896870613098, -0.16342033445835114, -0.08465452492237091, -0.022524135187268257, -0.1181814968585968, -0.003649163991212845, 0.04558175802230835, 0.08272190392017365, -0.23314456641674042, 0.05382320284843445, -0.034809015691280365, 0.19268269836902618, 0.17195352911949158, -0.04346592724323273, 0.06966075301170349, 0.177995964884758, -0.02965249866247177, 0.18175797164440155, 0.034502238035202026, -0.06847663223743439, 0.1077660471200943, -0.07872479408979416, 0.019016770645976067, 0.13620033860206604, -0.15223221480846405, 0.14362628757953644, -0.00583224231377244, 0.03542486950755119, -0.21446819603443146, 0.1569438874721527, -0.02253209799528122, 0.029624726623296738, 0.15470775961875916, -0.049191415309906006, -0.09546750038862228, 0.13704584538936615, 0.09242837876081467, 0.15802349150180817, -0.17063802480697632, -0.037816520780324936, -0.03766736760735512, 0.01764519326388836, -0.020979944616556168, 0.2379280924797058, 0.16233675181865692, -0.1763944774866104, 0.14217042922973633, 0.20002008974552155, -0.37497514486312866, 0.22499972581863403, 0.03991156071424484, -0.04595860466361046, 0.12881894409656525, 0.004062884487211704, -0.03168457746505737, -0.019460247829556465, -0.05320906639099121, 0.033274851739406586, 0.011516932398080826, 0.04273155704140663, -0.06684379279613495, -0.031687211245298386, -0.12690016627311707, -0.1404770016670227, -0.301108717918396, -0.030429020524024963, 0.1972617208957672, 0.035004761070013046, 0.07240371406078339, 0.0043095811270177364, -0.0190894715487957, -0.013756392523646355, -0.07592271268367767, -0.10069039463996887, -0.0183701328933239, 0.16575980186462402, -0.1215122789144516, -0.02876182831823826, -0.11502575874328613, 0.06561176478862762, -0.07080996781587601, 0.14188967645168304, 0.03924136981368065, 0.021687189117074013, -0.07402701675891876, -0.036476679146289825, -0.1809030920267105, 0.06999396532773972, -0.16499102115631104, 0.044088296592235565, 0.022127464413642883, 0.002075966214761138, 0.08976780623197556, -0.1550287902355194, -0.07157299667596817, 0.06714736670255661, -0.027687441557645798, -0.08007240295410156, 0.013684124685823917, -0.10562063008546829, -0.043112482875585556, 0.07733745872974396, 0.01767411082983017, 0.07580652832984924, -0.07615099847316742, 0.10348860919475555, -0.12668976187705994, -0.07577072829008102, -0.02575264871120453, 0.2109726071357727, -0.00247493339702487, 0.10009994357824326, 0.23930597305297852, -0.07801083475351334, -0.03472988307476044, -0.16061417758464813, 0.09415275603532791, 0.030617527663707733, -0.10092492401599884, 0.04303360730409622, -0.1577589064836502, -0.13170823454856873, -0.3456558287143707, -0.1377541869878769, 0.08192066103219986, -0.07361752539873123, -0.07853381335735321, 0.09716039150953293, -0.16067731380462646, -0.02266089804470539, -0.1045423299074173, 0.014141617342829704, 0.19918662309646606, -0.19664371013641357, -0.007563600782305002, 0.037909310311079025, -2.7119213033286813e-32, -0.08096077293157578, -0.16080518066883087, -0.07593473047018051, -0.1415676772594452, -0.1783389300107956, 0.13634991645812988, -0.08710706233978271, -0.26880064606666565, 0.0006191012798808515, -0.02339700236916542, 0.037747275084257126, 0.02465507574379444, 0.05241016671061516, -0.01554764062166214, -0.1332542598247528, -0.0578458271920681, 0.03455296531319618, -0.03149180859327316, -0.0180344358086586, 0.17378853261470795, 0.1212942972779274, 0.16036783158779144, -0.006443014368414879, -0.07142576575279236, -0.1732817143201828, 0.06085804104804993, 0.029839232563972473, -0.10207293182611465, -0.05947950854897499, 0.04033121094107628, -0.09750249236822128, 0.1606835424900055, -0.02565651386976242, -0.0459858663380146, -0.049074236303567886, -0.030750777572393417, -0.10926643013954163, 0.06908729672431946, -0.01910286396741867, -0.11652858555316925, 0.0642009750008583, 0.026988310739398003, 0.05566520243883133, -0.0474274642765522, -0.08428412675857544, 0.02960154041647911, 0.08164370059967041, -0.061627212911844254, -0.12165666371583939, -0.18011054396629333, -0.04392679035663605, 0.0792551264166832, 0.040504418313503265, 0.14148260653018951, -0.008708931505680084, -0.1297231912612915, 0.1265454888343811, 0.12298646569252014, -0.23452331125736237, 0.035339947789907455, 0.04925380274653435, 0.11103746294975281, 0.07670800387859344, 0.008294625207781792, 0.15100787580013275, 0.08915659040212631, 0.34277594089508057, 0.05677241459488869, 0.04278704524040222, 0.014979951083660126, 0.02488083392381668, -0.13224419951438904, -0.10627996921539307, -0.1483318954706192, 0.029087359085679054, -0.03089677169919014, 0.14105479419231415, -0.0913456603884697, -0.17449603974819183, 0.08933510631322861, -0.021235916763544083, -0.1678449660539627, -0.031685542315244675, -0.034533463418483734, -0.08283055573701859, 0.21946056187152863, 0.046228278428316116, 0.252108097076416, -0.020657876506447792, -0.050174251198768616, -0.055525925010442734, 0.07891818881034851, -0.006689148023724556, -0.1417785882949829, -0.0008029136224649847, 0.13056769967079163, -0.018455758690834045, 0.12047774344682693, 0.018041808158159256, 0.13790389895439148, 0.08157946914434433, -0.05881120264530182, -0.10644147545099258, -0.02424405887722969, 0.07224082201719284, 0.15224634110927582, 0.03594857454299927, 0.11942365020513535, -0.09775346517562866, 0.0029299738816916943, -0.26619020104408264, -0.10825777798891068, 0.14085066318511963, 0.103202685713768, 0.10775787383317947, 0.06454257667064667, 0.09967783838510513, 0.17212553322315216, 0.1005108579993248, 0.023913536220788956, 0.11340539157390594, -0.13395823538303375, 0.08607625961303711, 0.13264314830303192, -0.048440441489219666, 0.016423935070633888, -0.13944649696350098, 0.020324179902672768, 0.07960809767246246, -0.1614515483379364, -0.024029400199651718, 0.05936768651008606, 7.133128292480251e-7, -0.20702578127384186, 0.2142653614282608, 0.041431982070207596, -0.047288473695516586, -0.08677919954061508, 0.058751270174980164, -0.002289010211825371, 0.007751269266009331, -0.0754798948764801, 0.13075324892997742, 0.028199829161167145, 0.08476655930280685, 0.17765577137470245, -0.07467259466648102, 0.05355207622051239, -0.004822940565645695, -0.02816116437315941, -0.07193252444267273, -0.04447543993592262, 0.07945354282855988, 0.0707831084728241, 0.17082904279232025, 0.010992216877639294, -0.08863260596990585, 0.0008594878599978983, -0.16351477801799774, -0.007747663650661707, 0.0791609063744545, 0.01834077760577202, -0.10526279360055923, 0.08732108771800995, -0.1296200007200241, 0.008271117694675922, -0.10654892772436142, 0.056796226650476456, 0.019611792638897896, -0.17835402488708496, -0.17384470999240875, -0.022097932174801826, -0.034735292196273804, 0.15374545753002167, 0.04227624833583832, -0.09087896347045898, -0.06280616670846939, 0.05330103263258934, 0.09650561958551407, -0.13669191300868988, -0.01204347237944603, 0.05849169194698334, 0.03576129674911499, -0.0034667456056922674, -0.09747762233018875, 0.01340489648282528, 0.2832859754562378, -0.10279891639947891, -0.1304740309715271, 0.009971125051379204, -0.08639942109584808, 0.006081951316446066, -0.05222524330019951, -0.14062483608722687, -0.0977419763803482, -0.0625232607126236, 0.15343214571475983, 0.06789068877696991, -0.10993211716413498, -0.04217664897441864, 5.602959958855225e-35, 0.09424329549074173, -0.06741633266210556, 0.004733615554869175, -0.032449815422296524, 0.06970418989658356, -0.00958153698593378, 0.27299728989601135, 0.20712950825691223, -0.0026816949248313904, -0.22731725871562958, -0.16537629067897797 ]
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.08515441417694092, 0.022348511964082718, -0.014499522745609283, 0.15996478497982025, 0.2271539866924286, 0.010760017670691013, 0.04487210139632225, 0.026983365416526794, -0.22211261093616486, 0.06770399957895279, -0.07158982753753662, -0.1922173649072647, 0.019615735858678818, 0.0011665638303384185, -0.055696502327919006, 0.17138884961605072, 0.04227373003959656, -0.09224791824817657, 0.07538934797048569, -0.02685905061662197, 0.011225536465644836, 0.08060134947299957, -0.05744491517543793, -0.04066937044262886, -0.12670738995075226, -0.10139527916908264, -0.06050882861018181, 0.1509278267621994, 0.11392243951559067, -0.22489912807941437, 0.14900465309619904, 0.03576365485787392, -0.12258663773536682, 0.05592121556401253, 0.000005367842277337331, -0.0245643500238657, 0.12515823543071747, -0.052083976566791534, -0.06996853649616241, 0.14718438684940338, -0.08440687507390976, 0.1378811001777649, -0.12465232610702515, 0.008280856534838676, -0.10386998951435089, 0.16724446415901184, 0.1541586071252823, -0.09367157518863678, 0.07163645327091217, 0.028830576688051224, -0.004809367936104536, 0.0021238464396446943, -0.07041875272989273, -0.1696210503578186, 0.11406353861093521, -0.04133161902427673, 0.08133728057146072, 0.04996193200349808, -0.019010161980986595, 0.0936412513256073, -0.12884385883808136, 0.03286876529455185, -0.06703750789165497, 0.010493816807866096, -0.05682782083749771, 0.1009044349193573, -0.06463965773582458, -0.035427164286375046, 0.02097001112997532, 0.31983745098114014, 0.029510175809264183, 0.030296891927719116, -0.14304225146770477, 0.06869393587112427, -0.0759996846318245, -0.049463506788015366, -0.07660699635744095, 0.04215807095170021, -0.049565233290195465, -0.007640188559889793, 0.036542490124702454, 0.07473496347665787, -0.00010915224265772849, -0.05489995330572128, -0.23507057130336761, 0.043427977710962296, -0.13099347054958344, 0.06784827262163162, -0.12535904347896576, -0.11559218168258667, -0.019241144880652428, -0.06554572284221649, -0.07133621722459793, 0.05452459678053856, -0.1597580462694168, 0.0724656879901886, -0.10523976385593414, -0.10341759026050568, 0.046441756188869476, 0.0532292015850544, -0.23252539336681366, 0.03873783349990845, -0.0035634583327919245, 0.07392366230487823, 0.012909965589642525, 0.05253451690077782, -0.0026820418424904346, -0.025459865108132362, 0.009098131209611893, 0.025464264675974846, 0.05370189994573593, 0.03354545682668686, 0.12452027201652527, 0.029430661350488663, -0.14811159670352936, -0.030087199062108994, -0.05024733021855354, 0.1237749233841896, -0.04774913191795349, 0.1597510725259781, -0.1014377698302269, 0.21629251539707184, -0.05332529917359352, 0.15771803259849548, 0.007365449331700802, 0.034942563623189926, 0.04805294796824455, 0.20530039072036743, -0.09714295715093613, 0.03655989468097687, -0.09813582897186279, -0.03846248984336853, 0.12972024083137512, -0.03283771499991417, 0.03680375590920448, 0.09958171099424362, -0.05417077615857124, 0.04277399182319641, 0.19317777454853058, 0.02793186716735363, -0.12579204142093658, -0.0077596851624548435, 0.06764975935220718, -0.02023283578455448, 0.16127876937389374, -0.019323108717799187, -0.012432643212378025, -0.044351350516080856, 0.1995762139558792, -0.011067970655858517, -0.1039481982588768, 0.2391348034143448, -0.1860063672065735, 0.21766971051692963, -0.15845683217048645, 0.052444688975811005, 0.12005625665187836, -0.020188085734844208, -0.05283437296748161, -0.15127156674861908, 0.19555678963661194, 0.06515582650899887, 0.050136663019657135, -0.03878520056605339, 0.17621886730194092, 0.055380359292030334, -0.019745638594031334, 0.0061550685204565525, 0.01979793794453144, 0.05236174166202545, 0.06517556309700012, 0.07313539832830429, -0.013822321780025959, -0.06382368505001068, -0.10780294984579086, 0.2580374777317047, -0.06337381899356842, -0.16900105774402618, -0.2627902030944824, -0.22248417139053345, 0.029319820925593376, -0.15883569419384003, -0.22422029078006744, -0.05697337165474892, 0.0016057250322774053, 0.05908546224236488, -0.014687501825392246, 0.07907409220933914, 0.009178705513477325, 0.030902612954378128, -0.18624021112918854, 0.02979111298918724, 0.030959339812397957, -0.0765160396695137, -0.08430175483226776, -0.22678355872631073, -0.05453072115778923, -0.07563290745019913, -0.08070927113294601, -0.1829158514738083, 0.0036039771512150764, -0.008270001038908958, 0.2805435359477997, -0.017621899023652077, 0.14693088829517365, -0.29342737793922424, -0.2659662961959839, 0.04875205084681511, -0.11379029601812363, -0.09963618963956833, -0.19206854701042175, 0.027349410578608513, -0.020195845514535904, -0.008084769360721111, -0.21477217972278595, 0.07256289571523666, -0.06346762925386429, -0.03962520509958267, -0.10447628796100616, 0.11178191006183624, -0.12323418259620667, -0.008169127628207207, 0.006195104215294123, 0.07586879283189774, 0.14961190521717072, -0.08130775392055511, 0.00889229029417038, 0.1185142919421196, 0.1480356901884079, 0.1954648494720459, -0.02821950428187847, -0.010739072225987911, 0.06865551322698593, 0.10772724449634552, -0.022159326821565628, 0.06952719390392303, -0.133509561419487, -0.23944245278835297, 0.16726930439472198, -0.027128251269459724, -0.03798649087548256, 0.09300574660301208, -0.09082289040088654, -0.0013579543447121978, -0.13581854104995728, -0.006332625634968281, -0.1099926233291626, 0.13564246892929077, 0.0457327775657177, -0.053218137472867966, 0.14746080338954926, 0.052757225930690765, -0.08940836042165756, 0.05115515738725662, -0.031098870560526848, -0.0008188814972527325, 0.2420101761817932, 0.06209174543619156, -0.013535737991333008, 0.04544977471232414, 0.1560317724943161, -0.00038351965486072004, 0.02527701109647751, 0.019992265850305557, 0.20654861629009247, -0.0899595320224762, 0.0967893972992897, -0.08168738335371017, -0.0382554717361927, 0.06769459694623947, 0.04472383111715317, 0.09251949936151505, -0.15273550152778625, -0.0034523264039307833, -0.1274728924036026, -0.23552365601062775, -0.19214573502540588, 0.16126789152622223, 0.11860477924346924, 0.0913265272974968, -0.16711094975471497, 0.12938319146633148, -0.18559934198856354, -0.015257574617862701, 0.0396721214056015, 0.059620656073093414, -0.015016450546681881, 0.07213578373193741, -0.10754751414060593, 0.1220419704914093, -0.11888628453016281, 0.07242578268051147, 0.009154442697763443, -0.15663941204547882, -0.0766044333577156, 0.051790978759527206, -0.06880877166986465, 0.015139439143240452, 0.04040100798010826, 0.033993691205978394, -0.07250452786684036, 0.05181517079472542, 0.07837483286857605, 0.09009318798780441, 0.052168428897857666, 0.02021021768450737, 0.07993145287036896, -0.032785672694444656, -0.21337811648845673, 0.013363244011998177, 0.02613009512424469, 0.033447809517383575, 0.02333047240972519, 0.14732366800308228, 0.11384037882089615, 0.0639273002743721, -0.1568744033575058, -0.22098496556282043, 0.025373227894306183, 0.17611096799373627, -0.09183675795793533, 0.06131990626454353, -0.09108413755893707, -0.1060788705945015, -0.06832517683506012, -0.06678552180528641, -0.07986608147621155, -0.14613577723503113, 0.007795142009854317, -0.15950681269168854, 0.054490599781274796, 0.041854530572891235, -0.05327033996582031, -0.15742237865924835, -0.031066259369254112, -0.09788423776626587, -0.19086265563964844, 0.13974443078041077, 0.09639506787061691, 0.10009991377592087, -0.16635000705718994, -0.044374678283929825, -0.09462785720825195, -0.008111675269901752, 0.027738142758607864, -0.09810958057641983, 0.007006478030234575, -0.08281421661376953, 0.16888396441936493, -0.08133679628372192, 0.11035457998514175, -0.038180045783519745, -0.18223825097084045, 0.12877799570560455, -0.10991283506155014, 0.14183738827705383, -0.006377788260579109, 0.25277918577194214, -0.010221834294497967, -0.02496219240128994, 0.07250627130270004, 0.03481409326195717, 0.15116310119628906, 0.0800972655415535, 0.10800391435623169, 0.0017910550814121962, 0.06236986070871353, 0.0891292542219162, -0.018955199047923088, -0.11292390525341034, 0.2684992551803589, 0.0929974764585495, -0.08277915418148041, 0.06909017264842987, 0.03411436080932617, 0.13784442842006683, 0.12185729295015335, 0.10569633543491364, -0.07095510512590408, 0.002227883553132415, -0.0841447114944458, -0.11339789628982544, -0.17280809581279755, 0.01571396179497242, 0.13723500072956085, 0.04647054150700569, -0.005443944130092859, 0.00033037090906873345, -0.17826294898986816, 0.0628499984741211, 0.11118638515472412, -0.46546971797943115, -0.2612779438495636, 0.012743284925818443, 0.1196930781006813, 0.027446944266557693, 0.17861054837703705, 0.17969542741775513, -0.10956884920597076, 0.11668804287910461, 0.10632486641407013, 0.2023920714855194, 0.05361240729689598, 0.18323199450969696, -0.03873594477772713, 0.2189907729625702, 0.1533183455467224, 0.008335459977388382, 0.019769398495554924, -0.04699089378118515, 0.11664067953824997, -0.26029446721076965, -0.019400710240006447, 0.08151311427354813, 0.1801181137561798, -0.03566800802946091, -0.10875894874334335, 0.08402585238218307, 0.06474774330854416, -0.22082014381885529, -0.0710659921169281, 0.0013492378639057279, 0.16155262291431427, 0.19552579522132874, 0.21165838837623596, -0.09160295128822327, 0.1539245992898941, -0.09423203766345978, -0.026905586943030357, -0.017366819083690643, 0.07710789144039154, -0.10681325197219849, -0.02804536186158657, 0.16714909672737122, 0.08580148965120316, -0.035866476595401764, 0.1704907864332199, -0.06600183993577957, 0.012841230258345604, -0.08409494906663895, -0.3012215495109558, 0.003027362981811166, 0.08916828036308289, 0.02169574797153473, 0.1498558074235916, -0.1536865085363388, -0.062062542885541916, -0.011842194013297558, -0.04465026408433914, 0.16701440513134003, 0.11373481154441833, -0.027707861736416817, 0.050547100603580475, -0.18820255994796753, -0.04275985434651375, -0.00196567689999938, -0.10377202183008194, -0.02383560687303543, -0.033324163407087326, 0.17265450954437256, -0.15073338150978088, -0.05283075571060181, 0.10451541841030121, 0.02327258326113224, 0.06522290408611298, 0.14315415918827057, 0.17563721537590027, -0.128409743309021, 0.0425012931227684, -0.1042994037270546, 0.1153041198849678, 0.11790502071380615, 0.006753637455403805, -0.10729900747537613, 0.03809500113129616, 0.22417302429676056, 0.07572198659181595, 0.008374704979360104, 0.004746366757899523, -0.12141473591327667, 0.08791572600603104, 0.034326739609241486, 0.15389351546764374, -0.19230327010154724, -0.10499165952205658, 0.10601932555437088, -0.05301849916577339, 0.03415985032916069, 0.03637741133570671, -0.02633184939622879, -0.1267758160829544, -0.18189266324043274, 0.0809273049235344, -0.02767949365079403, 0.0457797572016716, 0.060749758034944534, 0.09408235549926758, 0.03269312530755997, 0.10657703876495361, 0.09155146032571793, 0.028163718059659004, 0.047205813229084015, 0.07416392862796783, 0.02894006483256817, -0.03133797273039818, -0.0816226676106453, 0.16310961544513702, 0.1486985683441162, 0.07214201241731644, -0.24571242928504944, -0.06178814172744751, 0.17214474081993103, -0.18884949386119843, 0.035898350179195404, -0.033249616622924805, 0.002359283622354269, -0.06258298456668854, -0.05679376795887947, -0.0225828867405653, 0.1831110566854477, 0.07720057666301727, -0.028863804414868355, 0.027907144278287888, -0.14078256487846375, 0.1320715844631195, 0.2571156322956085, 0.04797356575727463, -0.033373795449733734, 0.16914573311805725, 0.03259219974279404, 0.011189637705683708, 0.09165078401565552, 0.19754433631896973, -0.15530309081077576, 0.057163387537002563, 0.1585044413805008, 0.08760327845811844, -0.09896204620599747, -0.15808530151844025, -0.05352545529603958, -0.07543956488370895, -0.1615520417690277, 0.018347689881920815, 0.12466892600059509, -0.06394820660352707, 0.001689651980996132, -0.005386587232351303, -0.041415151208639145, -0.06267540901899338, 0.020989619195461273, -0.014821846038103104, 0.11909645795822144, -0.1303642839193344, -0.19929426908493042, -0.017084434628486633, -2.6894534920542395e-32, -0.027117479592561722, -0.08778737485408783, -0.03895917534828186, -0.2155885100364685, -0.17001622915267944, 0.10408077389001846, -0.008622115477919579, -0.045221034437417984, -0.12503041326999664, -0.044162675738334656, -0.09880611300468445, -0.009496938437223434, 0.09500901401042938, -0.13961438834667206, -0.09760703891515732, 0.020092984661459923, 0.051562774926424026, 0.03152582794427872, -0.057005129754543304, 0.05836823210120201, 0.10614847391843796, 0.11307663470506668, 0.06559067964553833, -0.14719098806381226, -0.0022538984194397926, 0.14431101083755493, -0.03921118751168251, -0.04288271814584732, -0.11486170440912247, 0.05357690155506134, -0.11784585565328598, 0.15315568447113037, -0.058269958943128586, 0.14924770593643188, -0.011995223350822926, 0.009117117151618004, -0.039763808250427246, -0.1177009791135788, 0.000964345526881516, 0.030560599640011787, -0.03164484724402428, 0.06376564502716064, 0.1258406639099121, -0.10615545511245728, -0.04187248647212982, -0.038875240832567215, 0.043999940156936646, -0.04828299582004547, 0.10239354521036148, -0.03787919506430626, -0.19162635505199432, -0.035253915935754776, -0.016814323142170906, 0.018777916207909584, -0.11345797777175903, -0.08468892425298691, 0.19969600439071655, 0.15160907804965973, -0.11522194743156433, -0.08810621500015259, 0.1326581835746765, -0.005451299250125885, 0.2406303584575653, 0.12077551335096359, -0.07501642405986786, 0.09999372810125351, 0.2446788251399994, -0.04882467910647392, 0.035872314125299454, -0.11820558458566666, -0.13230429589748383, 0.043562304228544235, 0.08544890582561493, 0.06865813583135605, -0.1659374237060547, 0.011004269123077393, -0.13666653633117676, 0.04272865131497383, -0.11831620335578918, -0.04853355512022972, -0.03262628614902496, 0.0374780148267746, -0.04013904929161072, 0.00983270164579153, 0.012095395475625992, -0.006626605987548828, -0.03302188962697983, -0.0256832055747509, 0.04547981917858124, -0.1668900102376938, -0.11639666557312012, 0.05831747502088547, -0.05220292881131172, -0.05992930382490158, -0.13370034098625183, 0.020568912848830223, -0.10492419451475143, -0.0055183665826916695, -0.1210436075925827, 0.06908266991376877, -0.0014124924782663584, -0.08052349835634232, 0.2066720426082611, 0.06787142902612686, 0.06880207359790802, -0.008836612105369568, -0.02957518957555294, 0.07451260089874268, -0.31430599093437195, -0.06897231936454773, -0.04773635044693947, -0.022419117391109467, 0.03213857486844063, -0.08108671754598618, 0.11792393028736115, -0.00034014772973023355, 0.05816851556301117, -0.07967598736286163, 0.15166933834552765, 0.06884124130010605, -0.03254295885562897, -0.14888936281204224, -0.221143901348114, 0.06478375941514969, -0.13937105238437653, -0.011603246442973614, -0.010456987656652927, -0.00279522268101573, -0.16131992638111115, -0.08545632660388947, 0.03288347274065018, -0.05561124160885811, 7.305658300538198e-7, -0.03568709269165993, 0.08351416885852814, 0.08518289774656296, -0.1874508261680603, 0.09208003431558609, 0.2763528823852539, -0.12090911716222763, 0.1077030673623085, -0.03643844276666641, 0.21297624707221985, 0.0321677140891552, -0.2296651154756546, -0.06571073085069656, 0.009401360526680946, 0.23052673041820526, -0.037801411002874374, -0.058275122195482254, 0.042763952165842056, -0.24904422461986542, 0.017006851732730865, 0.16865088045597076, 0.22196395695209503, -0.010694197379052639, -0.061613745987415314, 0.02680707722902298, 0.03520425409078598, -0.1762763112783432, -0.05881493166089058, 0.05174613371491432, -0.10069923102855682, -0.15814784169197083, -0.1656922847032547, 0.10850197821855545, 0.06244596466422081, 0.014019612222909927, 0.0761963501572609, -0.02353021502494812, -0.0291939377784729, -0.2157725691795349, 0.006407234817743301, -0.16757148504257202, 0.13293875753879547, 0.07980525493621826, -0.23692737519741058, 0.19204066693782806, 0.17906056344509125, 0.034327249974012375, -0.0694572925567627, -0.1536865234375, 0.03034335747361183, -0.07442173361778259, 0.04819153994321823, 0.02914503589272499, 0.07207588851451874, -0.08945576101541519, 0.05269992724061012, -0.013364809565246105, -0.16059201955795288, 0.10630056262016296, -0.023033449426293373, 0.022466372698545456, -0.1358000785112381, 0.12297382205724716, 0.1927974820137024, 0.0034027716610580683, -0.1045806035399437, -0.04144257307052612, 5.568149140064688e-35, -0.0875852108001709, -0.11962214857339859, 0.03557175397872925, -0.01468859426677227, -0.05448712408542633, -0.0819929838180542, 0.060433629900217056, 0.08647800236940384, 0.030553007498383522, -0.01333921030163765, -0.1568080633878708 ]
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.08515441417694092, 0.022348511964082718, -0.014499522745609283, 0.15996478497982025, 0.2271539866924286, 0.010760017670691013, 0.04487210139632225, 0.026983365416526794, -0.22211261093616486, 0.06770399957895279, -0.07158982753753662, -0.1922173649072647, 0.019615735858678818, 0.0011665638303384185, -0.055696502327919006, 0.17138884961605072, 0.04227373003959656, -0.09224791824817657, 0.07538934797048569, -0.02685905061662197, 0.011225536465644836, 0.08060134947299957, -0.05744491517543793, -0.04066937044262886, -0.12670738995075226, -0.10139527916908264, -0.06050882861018181, 0.1509278267621994, 0.11392243951559067, -0.22489912807941437, 0.14900465309619904, 0.03576365485787392, -0.12258663773536682, 0.05592121556401253, 0.000005367842277337331, -0.0245643500238657, 0.12515823543071747, -0.052083976566791534, -0.06996853649616241, 0.14718438684940338, -0.08440687507390976, 0.1378811001777649, -0.12465232610702515, 0.008280856534838676, -0.10386998951435089, 0.16724446415901184, 0.1541586071252823, -0.09367157518863678, 0.07163645327091217, 0.028830576688051224, -0.004809367936104536, 0.0021238464396446943, -0.07041875272989273, -0.1696210503578186, 0.11406353861093521, -0.04133161902427673, 0.08133728057146072, 0.04996193200349808, -0.019010161980986595, 0.0936412513256073, -0.12884385883808136, 0.03286876529455185, -0.06703750789165497, 0.010493816807866096, -0.05682782083749771, 0.1009044349193573, -0.06463965773582458, -0.035427164286375046, 0.02097001112997532, 0.31983745098114014, 0.029510175809264183, 0.030296891927719116, -0.14304225146770477, 0.06869393587112427, -0.0759996846318245, -0.049463506788015366, -0.07660699635744095, 0.04215807095170021, -0.049565233290195465, -0.007640188559889793, 0.036542490124702454, 0.07473496347665787, -0.00010915224265772849, -0.05489995330572128, -0.23507057130336761, 0.043427977710962296, -0.13099347054958344, 0.06784827262163162, -0.12535904347896576, -0.11559218168258667, -0.019241144880652428, -0.06554572284221649, -0.07133621722459793, 0.05452459678053856, -0.1597580462694168, 0.0724656879901886, -0.10523976385593414, -0.10341759026050568, 0.046441756188869476, 0.0532292015850544, -0.23252539336681366, 0.03873783349990845, -0.0035634583327919245, 0.07392366230487823, 0.012909965589642525, 0.05253451690077782, -0.0026820418424904346, -0.025459865108132362, 0.009098131209611893, 0.025464264675974846, 0.05370189994573593, 0.03354545682668686, 0.12452027201652527, 0.029430661350488663, -0.14811159670352936, -0.030087199062108994, -0.05024733021855354, 0.1237749233841896, -0.04774913191795349, 0.1597510725259781, -0.1014377698302269, 0.21629251539707184, -0.05332529917359352, 0.15771803259849548, 0.007365449331700802, 0.034942563623189926, 0.04805294796824455, 0.20530039072036743, -0.09714295715093613, 0.03655989468097687, -0.09813582897186279, -0.03846248984336853, 0.12972024083137512, -0.03283771499991417, 0.03680375590920448, 0.09958171099424362, -0.05417077615857124, 0.04277399182319641, 0.19317777454853058, 0.02793186716735363, -0.12579204142093658, -0.0077596851624548435, 0.06764975935220718, -0.02023283578455448, 0.16127876937389374, -0.019323108717799187, -0.012432643212378025, -0.044351350516080856, 0.1995762139558792, -0.011067970655858517, -0.1039481982588768, 0.2391348034143448, -0.1860063672065735, 0.21766971051692963, -0.15845683217048645, 0.052444688975811005, 0.12005625665187836, -0.020188085734844208, -0.05283437296748161, -0.15127156674861908, 0.19555678963661194, 0.06515582650899887, 0.050136663019657135, -0.03878520056605339, 0.17621886730194092, 0.055380359292030334, -0.019745638594031334, 0.0061550685204565525, 0.01979793794453144, 0.05236174166202545, 0.06517556309700012, 0.07313539832830429, -0.013822321780025959, -0.06382368505001068, -0.10780294984579086, 0.2580374777317047, -0.06337381899356842, -0.16900105774402618, -0.2627902030944824, -0.22248417139053345, 0.029319820925593376, -0.15883569419384003, -0.22422029078006744, -0.05697337165474892, 0.0016057250322774053, 0.05908546224236488, -0.014687501825392246, 0.07907409220933914, 0.009178705513477325, 0.030902612954378128, -0.18624021112918854, 0.02979111298918724, 0.030959339812397957, -0.0765160396695137, -0.08430175483226776, -0.22678355872631073, -0.05453072115778923, -0.07563290745019913, -0.08070927113294601, -0.1829158514738083, 0.0036039771512150764, -0.008270001038908958, 0.2805435359477997, -0.017621899023652077, 0.14693088829517365, -0.29342737793922424, -0.2659662961959839, 0.04875205084681511, -0.11379029601812363, -0.09963618963956833, -0.19206854701042175, 0.027349410578608513, -0.020195845514535904, -0.008084769360721111, -0.21477217972278595, 0.07256289571523666, -0.06346762925386429, -0.03962520509958267, -0.10447628796100616, 0.11178191006183624, -0.12323418259620667, -0.008169127628207207, 0.006195104215294123, 0.07586879283189774, 0.14961190521717072, -0.08130775392055511, 0.00889229029417038, 0.1185142919421196, 0.1480356901884079, 0.1954648494720459, -0.02821950428187847, -0.010739072225987911, 0.06865551322698593, 0.10772724449634552, -0.022159326821565628, 0.06952719390392303, -0.133509561419487, -0.23944245278835297, 0.16726930439472198, -0.027128251269459724, -0.03798649087548256, 0.09300574660301208, -0.09082289040088654, -0.0013579543447121978, -0.13581854104995728, -0.006332625634968281, -0.1099926233291626, 0.13564246892929077, 0.0457327775657177, -0.053218137472867966, 0.14746080338954926, 0.052757225930690765, -0.08940836042165756, 0.05115515738725662, -0.031098870560526848, -0.0008188814972527325, 0.2420101761817932, 0.06209174543619156, -0.013535737991333008, 0.04544977471232414, 0.1560317724943161, -0.00038351965486072004, 0.02527701109647751, 0.019992265850305557, 0.20654861629009247, -0.0899595320224762, 0.0967893972992897, -0.08168738335371017, -0.0382554717361927, 0.06769459694623947, 0.04472383111715317, 0.09251949936151505, -0.15273550152778625, -0.0034523264039307833, -0.1274728924036026, -0.23552365601062775, -0.19214573502540588, 0.16126789152622223, 0.11860477924346924, 0.0913265272974968, -0.16711094975471497, 0.12938319146633148, -0.18559934198856354, -0.015257574617862701, 0.0396721214056015, 0.059620656073093414, -0.015016450546681881, 0.07213578373193741, -0.10754751414060593, 0.1220419704914093, -0.11888628453016281, 0.07242578268051147, 0.009154442697763443, -0.15663941204547882, -0.0766044333577156, 0.051790978759527206, -0.06880877166986465, 0.015139439143240452, 0.04040100798010826, 0.033993691205978394, -0.07250452786684036, 0.05181517079472542, 0.07837483286857605, 0.09009318798780441, 0.052168428897857666, 0.02021021768450737, 0.07993145287036896, -0.032785672694444656, -0.21337811648845673, 0.013363244011998177, 0.02613009512424469, 0.033447809517383575, 0.02333047240972519, 0.14732366800308228, 0.11384037882089615, 0.0639273002743721, -0.1568744033575058, -0.22098496556282043, 0.025373227894306183, 0.17611096799373627, -0.09183675795793533, 0.06131990626454353, -0.09108413755893707, -0.1060788705945015, -0.06832517683506012, -0.06678552180528641, -0.07986608147621155, -0.14613577723503113, 0.007795142009854317, -0.15950681269168854, 0.054490599781274796, 0.041854530572891235, -0.05327033996582031, -0.15742237865924835, -0.031066259369254112, -0.09788423776626587, -0.19086265563964844, 0.13974443078041077, 0.09639506787061691, 0.10009991377592087, -0.16635000705718994, -0.044374678283929825, -0.09462785720825195, -0.008111675269901752, 0.027738142758607864, -0.09810958057641983, 0.007006478030234575, -0.08281421661376953, 0.16888396441936493, -0.08133679628372192, 0.11035457998514175, -0.038180045783519745, -0.18223825097084045, 0.12877799570560455, -0.10991283506155014, 0.14183738827705383, -0.006377788260579109, 0.25277918577194214, -0.010221834294497967, -0.02496219240128994, 0.07250627130270004, 0.03481409326195717, 0.15116310119628906, 0.0800972655415535, 0.10800391435623169, 0.0017910550814121962, 0.06236986070871353, 0.0891292542219162, -0.018955199047923088, -0.11292390525341034, 0.2684992551803589, 0.0929974764585495, -0.08277915418148041, 0.06909017264842987, 0.03411436080932617, 0.13784442842006683, 0.12185729295015335, 0.10569633543491364, -0.07095510512590408, 0.002227883553132415, -0.0841447114944458, -0.11339789628982544, -0.17280809581279755, 0.01571396179497242, 0.13723500072956085, 0.04647054150700569, -0.005443944130092859, 0.00033037090906873345, -0.17826294898986816, 0.0628499984741211, 0.11118638515472412, -0.46546971797943115, -0.2612779438495636, 0.012743284925818443, 0.1196930781006813, 0.027446944266557693, 0.17861054837703705, 0.17969542741775513, -0.10956884920597076, 0.11668804287910461, 0.10632486641407013, 0.2023920714855194, 0.05361240729689598, 0.18323199450969696, -0.03873594477772713, 0.2189907729625702, 0.1533183455467224, 0.008335459977388382, 0.019769398495554924, -0.04699089378118515, 0.11664067953824997, -0.26029446721076965, -0.019400710240006447, 0.08151311427354813, 0.1801181137561798, -0.03566800802946091, -0.10875894874334335, 0.08402585238218307, 0.06474774330854416, -0.22082014381885529, -0.0710659921169281, 0.0013492378639057279, 0.16155262291431427, 0.19552579522132874, 0.21165838837623596, -0.09160295128822327, 0.1539245992898941, -0.09423203766345978, -0.026905586943030357, -0.017366819083690643, 0.07710789144039154, -0.10681325197219849, -0.02804536186158657, 0.16714909672737122, 0.08580148965120316, -0.035866476595401764, 0.1704907864332199, -0.06600183993577957, 0.012841230258345604, -0.08409494906663895, -0.3012215495109558, 0.003027362981811166, 0.08916828036308289, 0.02169574797153473, 0.1498558074235916, -0.1536865085363388, -0.062062542885541916, -0.011842194013297558, -0.04465026408433914, 0.16701440513134003, 0.11373481154441833, -0.027707861736416817, 0.050547100603580475, -0.18820255994796753, -0.04275985434651375, -0.00196567689999938, -0.10377202183008194, -0.02383560687303543, -0.033324163407087326, 0.17265450954437256, -0.15073338150978088, -0.05283075571060181, 0.10451541841030121, 0.02327258326113224, 0.06522290408611298, 0.14315415918827057, 0.17563721537590027, -0.128409743309021, 0.0425012931227684, -0.1042994037270546, 0.1153041198849678, 0.11790502071380615, 0.006753637455403805, -0.10729900747537613, 0.03809500113129616, 0.22417302429676056, 0.07572198659181595, 0.008374704979360104, 0.004746366757899523, -0.12141473591327667, 0.08791572600603104, 0.034326739609241486, 0.15389351546764374, -0.19230327010154724, -0.10499165952205658, 0.10601932555437088, -0.05301849916577339, 0.03415985032916069, 0.03637741133570671, -0.02633184939622879, -0.1267758160829544, -0.18189266324043274, 0.0809273049235344, -0.02767949365079403, 0.0457797572016716, 0.060749758034944534, 0.09408235549926758, 0.03269312530755997, 0.10657703876495361, 0.09155146032571793, 0.028163718059659004, 0.047205813229084015, 0.07416392862796783, 0.02894006483256817, -0.03133797273039818, -0.0816226676106453, 0.16310961544513702, 0.1486985683441162, 0.07214201241731644, -0.24571242928504944, -0.06178814172744751, 0.17214474081993103, -0.18884949386119843, 0.035898350179195404, -0.033249616622924805, 0.002359283622354269, -0.06258298456668854, -0.05679376795887947, -0.0225828867405653, 0.1831110566854477, 0.07720057666301727, -0.028863804414868355, 0.027907144278287888, -0.14078256487846375, 0.1320715844631195, 0.2571156322956085, 0.04797356575727463, -0.033373795449733734, 0.16914573311805725, 0.03259219974279404, 0.011189637705683708, 0.09165078401565552, 0.19754433631896973, -0.15530309081077576, 0.057163387537002563, 0.1585044413805008, 0.08760327845811844, -0.09896204620599747, -0.15808530151844025, -0.05352545529603958, -0.07543956488370895, -0.1615520417690277, 0.018347689881920815, 0.12466892600059509, -0.06394820660352707, 0.001689651980996132, -0.005386587232351303, -0.041415151208639145, -0.06267540901899338, 0.020989619195461273, -0.014821846038103104, 0.11909645795822144, -0.1303642839193344, -0.19929426908493042, -0.017084434628486633, -2.6894534920542395e-32, -0.027117479592561722, -0.08778737485408783, -0.03895917534828186, -0.2155885100364685, -0.17001622915267944, 0.10408077389001846, -0.008622115477919579, -0.045221034437417984, -0.12503041326999664, -0.044162675738334656, -0.09880611300468445, -0.009496938437223434, 0.09500901401042938, -0.13961438834667206, -0.09760703891515732, 0.020092984661459923, 0.051562774926424026, 0.03152582794427872, -0.057005129754543304, 0.05836823210120201, 0.10614847391843796, 0.11307663470506668, 0.06559067964553833, -0.14719098806381226, -0.0022538984194397926, 0.14431101083755493, -0.03921118751168251, -0.04288271814584732, -0.11486170440912247, 0.05357690155506134, -0.11784585565328598, 0.15315568447113037, -0.058269958943128586, 0.14924770593643188, -0.011995223350822926, 0.009117117151618004, -0.039763808250427246, -0.1177009791135788, 0.000964345526881516, 0.030560599640011787, -0.03164484724402428, 0.06376564502716064, 0.1258406639099121, -0.10615545511245728, -0.04187248647212982, -0.038875240832567215, 0.043999940156936646, -0.04828299582004547, 0.10239354521036148, -0.03787919506430626, -0.19162635505199432, -0.035253915935754776, -0.016814323142170906, 0.018777916207909584, -0.11345797777175903, -0.08468892425298691, 0.19969600439071655, 0.15160907804965973, -0.11522194743156433, -0.08810621500015259, 0.1326581835746765, -0.005451299250125885, 0.2406303584575653, 0.12077551335096359, -0.07501642405986786, 0.09999372810125351, 0.2446788251399994, -0.04882467910647392, 0.035872314125299454, -0.11820558458566666, -0.13230429589748383, 0.043562304228544235, 0.08544890582561493, 0.06865813583135605, -0.1659374237060547, 0.011004269123077393, -0.13666653633117676, 0.04272865131497383, -0.11831620335578918, -0.04853355512022972, -0.03262628614902496, 0.0374780148267746, -0.04013904929161072, 0.00983270164579153, 0.012095395475625992, -0.006626605987548828, -0.03302188962697983, -0.0256832055747509, 0.04547981917858124, -0.1668900102376938, -0.11639666557312012, 0.05831747502088547, -0.05220292881131172, -0.05992930382490158, -0.13370034098625183, 0.020568912848830223, -0.10492419451475143, -0.0055183665826916695, -0.1210436075925827, 0.06908266991376877, -0.0014124924782663584, -0.08052349835634232, 0.2066720426082611, 0.06787142902612686, 0.06880207359790802, -0.008836612105369568, -0.02957518957555294, 0.07451260089874268, -0.31430599093437195, -0.06897231936454773, -0.04773635044693947, -0.022419117391109467, 0.03213857486844063, -0.08108671754598618, 0.11792393028736115, -0.00034014772973023355, 0.05816851556301117, -0.07967598736286163, 0.15166933834552765, 0.06884124130010605, -0.03254295885562897, -0.14888936281204224, -0.221143901348114, 0.06478375941514969, -0.13937105238437653, -0.011603246442973614, -0.010456987656652927, -0.00279522268101573, -0.16131992638111115, -0.08545632660388947, 0.03288347274065018, -0.05561124160885811, 7.305658300538198e-7, -0.03568709269165993, 0.08351416885852814, 0.08518289774656296, -0.1874508261680603, 0.09208003431558609, 0.2763528823852539, -0.12090911716222763, 0.1077030673623085, -0.03643844276666641, 0.21297624707221985, 0.0321677140891552, -0.2296651154756546, -0.06571073085069656, 0.009401360526680946, 0.23052673041820526, -0.037801411002874374, -0.058275122195482254, 0.042763952165842056, -0.24904422461986542, 0.017006851732730865, 0.16865088045597076, 0.22196395695209503, -0.010694197379052639, -0.061613745987415314, 0.02680707722902298, 0.03520425409078598, -0.1762763112783432, -0.05881493166089058, 0.05174613371491432, -0.10069923102855682, -0.15814784169197083, -0.1656922847032547, 0.10850197821855545, 0.06244596466422081, 0.014019612222909927, 0.0761963501572609, -0.02353021502494812, -0.0291939377784729, -0.2157725691795349, 0.006407234817743301, -0.16757148504257202, 0.13293875753879547, 0.07980525493621826, -0.23692737519741058, 0.19204066693782806, 0.17906056344509125, 0.034327249974012375, -0.0694572925567627, -0.1536865234375, 0.03034335747361183, -0.07442173361778259, 0.04819153994321823, 0.02914503589272499, 0.07207588851451874, -0.08945576101541519, 0.05269992724061012, -0.013364809565246105, -0.16059201955795288, 0.10630056262016296, -0.023033449426293373, 0.022466372698545456, -0.1358000785112381, 0.12297382205724716, 0.1927974820137024, 0.0034027716610580683, -0.1045806035399437, -0.04144257307052612, 5.568149140064688e-35, -0.0875852108001709, -0.11962214857339859, 0.03557175397872925, -0.01468859426677227, -0.05448712408542633, -0.0819929838180542, 0.060433629900217056, 0.08647800236940384, 0.030553007498383522, -0.01333921030163765, -0.1568080633878708 ]
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.08655445277690887, 0.05041512846946716, 0.0071555194444954395, -0.18298326432704926, 0.20275433361530304, 0.10949910432100296, 0.2727736830711365, 0.00709152314811945, -0.07346538454294205, 0.2760328948497772, 0.033771250396966934, -0.03916288539767265, -0.09793592989444733, -0.17798760533332825, -0.16937297582626343, -0.14016413688659668, -0.02569052018225193, -0.10663466900587082, -0.05647435039281845, -0.15618295967578888, 0.01863955147564411, 0.046854499727487564, 0.05775045230984688, -0.11854127049446106, 0.025979820638895035, -0.09650497883558273, -0.09539724886417389, -0.027775917202234268, -0.07634168118238449, -0.1603851318359375, 0.1315954178571701, 0.013775333762168884, 0.0774860680103302, 0.18224042654037476, 0.0000052336677072162274, 0.06338745355606079, 0.16681379079818726, -0.011817798018455505, -0.11988603323698044, -0.04073901101946831, 0.1792062371969223, 0.1022222563624382, 0.07533271610736847, 0.01927170902490616, 0.049107007682323456, -0.06018947809934616, -0.007889052852988243, -0.05398356541991234, 0.10708470642566681, 0.016324928030371666, 0.004549884237349033, 0.07063032686710358, -0.14053095877170563, -0.18746048212051392, 0.03897738456726074, -0.026751089841127396, 0.0829862579703331, 0.14774052798748016, 0.12234047800302505, -0.02018696628510952, -0.13280516862869263, 0.004764019511640072, -0.010797562077641487, 0.13674959540367126, -0.14460019767284393, -0.13161921501159668, -0.10224421322345734, -0.10005541145801544, -0.06572870910167694, 0.09247234463691711, 0.0668128952383995, -0.04622742906212807, -0.17326277494430542, 0.009235764853656292, 0.0026807941030710936, -0.13796308636665344, -0.020085548982024193, 0.08400115370750427, -0.2913808524608612, 0.13237033784389496, -0.10957671701908112, 0.11908918619155884, -0.014751498587429523, -0.032989874482154846, -0.1985844075679779, 0.04019112139940262, -0.114051453769207, 0.034684304147958755, 0.07634992897510529, -0.08430078625679016, 0.22506245970726013, 0.012908488512039185, 0.10685765743255615, -0.12527428567409515, -0.22218047082424164, 0.07433472573757172, -0.10004893690347672, -0.1475837677717209, -0.07227560132741928, 0.1135198324918747, 0.03118748776614666, -0.2838824987411499, 0.019985664635896683, 0.17873984575271606, 0.16924381256103516, -0.07907184958457947, -0.05179080739617348, 0.04603799432516098, -0.06428080797195435, -0.016336116939783096, 0.07009437680244446, -0.04246804863214493, -0.07344873249530792, -0.0464753732085228, 0.0020008834544569254, -0.042721956968307495, 0.20575343072414398, 0.06247334182262421, -0.22762297093868256, 0.017403293401002884, -0.0606536902487278, 0.0050266701728105545, 0.04313371330499649, 0.07224302738904953, 0.13827519118785858, 0.009712941013276577, -0.06368101388216019, 0.13372284173965454, 0.08512820303440094, -0.062184326350688934, 0.007189289666712284, -0.044273629784584045, -0.03228228539228439, -0.04271998628973961, 0.15396720170974731, -0.13462118804454803, -0.022346746176481247, -0.11462514847517014, 0.07617293298244476, 0.14164046943187714, 0.11415038257837296, -0.1885419338941574, -0.014024844393134117, -0.08152740448713303, 0.026136619970202446, 0.05079470947384834, 0.09046102315187454, 0.156192347407341, 0.06730455905199051, -0.10595528781414032, -0.12841181457042694, 0.21914352476596832, -0.18980693817138672, 0.09565958380699158, -0.12169241160154343, 0.16339601576328278, 0.04447123780846596, -0.1562228798866272, -0.20377051830291748, -0.1517324000597, 0.10320023447275162, 0.09017134457826614, 0.02763456478714943, -0.11221738904714584, -0.11090797930955887, -0.01235131174325943, -0.02092132903635502, -0.022407280281186104, -0.04104964807629585, 0.018980979919433594, 0.10155297815799713, 0.06561242043972015, -0.16981858015060425, 0.08618774265050888, -0.1351378709077835, 0.10714241117238998, -0.15926781296730042, -0.014966120943427086, -0.3186980187892914, 0.0009477292187511921, 0.0390431173145771, -0.10437973588705063, 0.03538950905203819, -0.1724979281425476, 0.1816142350435257, -0.14321765303611755, 0.17569732666015625, -0.05506674572825432, -0.23111021518707275, -0.019164875149726868, 0.033407196402549744, 0.06396982073783875, 0.07420875132083893, 0.0032791707199066877, 0.13936108350753784, 0.02409038320183754, -0.13663151860237122, -0.13202835619449615, 0.06899035722017288, -0.22989508509635925, -0.02226116694509983, -0.00690707890316844, 0.028643174096941948, 0.08277878165245056, -0.017232898622751236, -0.13698197901248932, -0.07121407985687256, 0.11230804771184921, 0.10626614093780518, -0.29450318217277527, -0.12674714624881744, -0.0013363328762352467, -0.010739149525761604, 0.05271703749895096, -0.1596788465976715, 0.053414810448884964, 0.0028574601747095585, 0.19959254562854767, -0.11815482378005981, 0.022000184282660484, -0.1586149036884308, 0.036475878208875656, -0.0004434038419276476, -0.06244931370019913, -0.08873485028743744, 0.003928385674953461, -0.008628807961940765, -0.10734468698501587, 0.08083291351795197, -0.015354656614363194, -0.057119790464639664, -0.0155935725197196, 0.04135620966553688, 0.05886358022689819, -0.06615599244832993, -0.15940029919147491, 0.07603076845407486, -0.17573344707489014, 0.10520346462726593, -0.07148213684558868, -0.14340071380138397, 0.1197521984577179, -0.16462284326553345, -0.10282277315855026, -0.03565685451030731, 0.09066526591777802, -0.03820185363292694, 0.1951814442873001, 0.020225031301379204, -0.1509847790002823, 0.11728162318468094, -0.026828985661268234, -0.32468166947364807, 0.0758882611989975, 0.012704399414360523, -0.08190456032752991, 0.06997872143983841, -0.13867825269699097, -0.038107965141534805, -0.0979825034737587, 0.10964147746562958, -0.08864572644233704, -0.019371656700968742, 0.1341482251882553, 0.10033666342496872, -0.04996068403124809, 0.11817438155412674, -0.07478860765695572, 0.03237148001790047, 0.007106800563633442, 0.06178409978747368, 0.023997260257601738, 0.029461458325386047, -0.07359756529331207, -0.012162774801254272, -0.007381764706224203, 0.0014905852731317282, -0.022407442331314087, 0.07169802486896515, 0.001096751424483955, -0.11743197590112686, -0.11325284093618393, 0.07152062654495239, -0.14517971873283386, 0.03945578634738922, 0.03524298220872879, -0.010891037993133068, -0.049850985407829285, -0.19660724699497223, -0.059639640152454376, 0.05851791426539421, 0.0840054526925087, -0.12093904614448547, 0.03084343858063221, 0.016832156106829643, 0.02149888500571251, 0.10398620367050171, -0.12084291130304337, 0.22630269825458527, 0.07988419383764267, -0.14729470014572144, -0.08859937638044357, 0.032049696892499924, -0.025444436818361282, 0.1021304726600647, -0.0662846490740776, 0.13250811398029327, 0.2721257507801056, -0.07127776741981506, -0.21175651252269745, 0.013809728436172009, -0.06482043862342834, 0.06489815562963486, 0.08073350042104721, 0.19208742678165436, -0.07537369430065155, 0.0037530174013227224, -0.11526310443878174, 0.05320433899760246, -0.006281094625592232, 0.05489952117204666, 0.1550389528274536, 0.0131992744281888, 0.02147129364311695, 0.08163078129291534, -0.01979989930987358, -0.19630549848079681, 0.008454686962068081, -0.05250200629234314, -0.02144440822303295, -0.02784685604274273, 0.07251191884279251, -0.11031228303909302, 0.10356827825307846, 0.06984665244817734, -0.06857045739889145, -0.09942115098237991, 0.0083113769069314, 0.21296244859695435, -0.039118316024541855, -0.024851558730006218, -0.01305150892585516, -0.17086035013198853, -0.037334002554416656, 0.14794346690177917, -0.1569690853357315, 0.014631198719143867, 0.11513407528400421, -0.08743616938591003, -0.13925331830978394, 0.06415420025587082, 0.11948691308498383, 0.017085500061511993, -0.1649949699640274, -0.12065161019563675, 0.17077304422855377, -0.16479361057281494, -0.0036553184036165476, -0.05941496416926384, 0.045896634459495544, 0.20185942947864532, 0.03420136868953705, 0.2533259093761444, 0.055220358073711395, -0.11954780668020248, 0.16382750868797302, 0.16458232700824738, -0.09351345896720886, -0.035878218710422516, -0.27811354398727417, 0.147586390376091, -0.10042328387498856, -0.05277561768889427, -0.04401950165629387, -0.002156665315851569, -0.03019692935049534, 0.03516323119401932, 0.04704465717077255, 0.08735594898462296, 0.07936234772205353, -0.005012937821447849, -0.14967641234397888, -0.020825384184718132, 0.2033175677061081, 0.2325529158115387, -0.003653347957879305, 0.06328770518302917, -0.029833883047103882, -0.09056022018194199, 0.08181584626436234, 0.08048371970653534, -0.016720259562134743, 0.014511959627270699, -0.17195463180541992, -0.06287352740764618, -0.04325886443257332, 0.23669219017028809, 0.3150700628757477, -0.04374638944864273, 0.017214335501194, 0.09492000937461853, 0.13707362115383148, -0.16973502933979034, 0.08761681616306305, 0.12312687188386917, 0.01625552587211132, -0.03152390196919441, -0.19553203880786896, -0.0612228661775589, 0.16753482818603516, 0.14904846251010895, 0.007926231250166893, -0.02421923354268074, 0.04577656090259552, 0.18221105635166168, 0.013149537146091461, -0.05895674228668213, -0.09575711190700531, 0.08451415598392487, -0.2098652571439743, -0.15542292594909668, -0.14143003523349762, 0.10240490734577179, 0.25292107462882996, -0.03680834919214249, 0.07657414674758911, -0.07522585988044739, 0.036162666976451874, 0.0020789068657904863, -0.010504030622541904, -0.00023646836052648723, -0.06533320248126984, 0.17621243000030518, 0.036612898111343384, 0.14118868112564087, 0.14707928895950317, 0.10864682495594025, -0.026605205610394478, -0.05203654617071152, 0.14039094746112823, -0.1821569800376892, -0.11104337871074677, 0.1675678789615631, -0.19232787191867828, -0.061351027339696884, -0.11945311725139618, -0.07081104815006256, -0.0249574426561594, 0.08972220867872238, 0.1361815482378006, -0.16107714176177979, -0.2394772320985794, -0.14222939312458038, -0.20973409712314606, 0.1722104698419571, 0.09810629487037659, 0.25136733055114746, -0.20463161170482635, 0.01721845753490925, 0.11214777082204819, 0.02750614657998085, -0.058848652988672256, 0.005567894782871008, 0.023443957790732384, 0.1145276129245758, 0.14442069828510284, 0.1613754779100418, 0.06666195392608643, -0.015693901106715202, 0.12620626389980316, -0.04118138924241066, 0.07425746321678162, 0.059252068400382996, 0.02352474071085453, 0.18091855943202972, -0.08729051798582077, 0.07677541673183441, -0.09321539103984833, -0.07818298041820526, 0.10592008382081985, 0.09693336486816406, -0.17328189313411713, 0.03734850138425827, -0.05346818268299103, -0.04006585106253624, 0.09388524293899536, -0.010296070948243141, -0.001244708546437323, -0.12944984436035156, -0.026705194264650345, -0.02408282645046711, -0.14789070188999176, -0.06649396568536758, -0.08491699397563934, 0.04377259314060211, -0.027365224435925484, -0.0018829243490472436, 0.1241539716720581, -0.010109519585967064, 0.1432398557662964, -0.15853948891162872, -0.052238743752241135, -0.11299754679203033, -0.022827455773949623, 0.009740790352225304, -0.07392466813325882, 0.026460207998752594, 0.09465479105710983, -0.03301060199737549, -0.05291059613227844, 0.03548769652843475, 0.0010771844536066055, -0.10554680973291397, -0.007295371498912573, 0.0664481669664383, 0.12777966260910034, -0.1752166450023651, -0.013726518489420414, 0.0054219383746385574, -0.013624829240143299, 0.051506005227565765, -0.053908735513687134, -0.0041984738782048225, -0.19218355417251587, -0.019238833338022232, -0.03525250405073166, 0.18861380219459534, 0.136428102850914, 0.3133218586444855, 0.2698332667350769, 0.009676742367446423, 0.09159161895513535, 0.2426275610923767, 0.005050179082900286, -0.0741581991314888, 0.02116166241466999, 0.12748464941978455, -0.18708071112632751, 0.03364497423171997, -0.14625318348407745, 0.05898397043347359, -0.005973604507744312, -0.012973412871360779, -0.007522821892052889, 0.0896923691034317, 0.07885713130235672, -0.01843135990202427, -0.03520422801375389, -0.12959182262420654, -0.04935222119092941, 0.04725335165858269, 0.19419150054454803, 0.05975675582885742, -0.0041594053618609905, 0.1394919902086258, -2.443067084322805e-32, -0.04964664578437805, 0.05604981258511543, 0.01240737084299326, 0.03568591922521591, -0.1660001575946808, -0.05951489508152008, 0.00004983197140973061, 0.035540621727705, 0.01815127022564411, -0.01602371223270893, -0.14266550540924072, -0.0682595893740654, 0.05381723493337631, -0.03188787400722504, 0.08294542878866196, 0.019768957048654556, 0.13083110749721527, 0.11037172377109528, -0.051262907683849335, 0.03934876620769501, 0.15270040929317474, 0.24327823519706726, 0.09521040320396423, 0.10471189767122269, -0.02846159227192402, 0.166413351893425, -0.12259908765554428, -0.1287519335746765, 0.07079962641000748, -0.15771247446537018, -0.10982625186443329, 0.24533891677856445, -0.03867826610803604, -0.11212097108364105, -0.17455430328845978, -0.0005088555626571178, -0.2611927390098572, -0.18988575041294098, -0.07828155905008316, 0.2002072036266327, 0.00960085541009903, 0.21260814368724823, 0.1511642038822174, -0.21706895530223846, 0.08197376132011414, 0.14304275810718536, 0.07057622820138931, -0.04950866848230362, -0.03166232630610466, -0.15990646183490753, 0.09572983533143997, 0.1328391432762146, -0.10327095538377762, 0.044740933924913406, 0.07985172420740128, -0.11915979534387589, -0.06236761063337326, 0.05690610781311989, -0.12511378526687622, 0.051766395568847656, 0.19473965466022491, 0.045692916959524155, 0.037125129252672195, 0.007549810688942671, 0.20306192338466644, 0.010731004178524017, 0.33396488428115845, 0.0064761023968458176, 0.23557201027870178, -0.04129612073302269, -0.17268016934394836, -0.03288056701421738, -0.13095328211784363, 0.014438117854297161, -0.11438503116369247, 0.1021747812628746, -0.07882246375083923, -0.08627262711524963, -0.016499871388077736, -0.12544630467891693, 0.014370357617735863, 0.01796218752861023, 0.06377441436052322, 0.08141715079545975, -0.02699524164199829, -0.003087302204221487, 0.021427428349852562, 0.05874571576714516, -0.09580693393945694, 0.019532008096575737, 0.02806154638528824, 0.20676350593566895, -0.1145232617855072, -0.050524838268756866, -0.1987801045179367, 0.12487293034791946, -0.02411036752164364, 0.039317965507507324, -0.0732099711894989, -0.03321986645460129, -0.0550498403608799, -0.003146236063912511, -0.0974024161696434, 0.10994336754083633, 0.08270716667175293, 0.008670197799801826, -0.009407800622284412, 0.10436360538005829, -0.21595819294452667, -0.030675044283270836, 0.1272565871477127, 0.08143997937440872, 0.012290822342038155, 0.09031526744365692, 0.2648722529411316, -0.16757291555404663, 0.07270034402608871, 0.025489339604973793, 0.1766662746667862, -0.03200025483965874, -0.04759978875517845, -0.040275946259498596, -0.27362948656082153, -0.07034755498170853, -0.005559584591537714, -0.02609873004257679, -0.20137111842632294, -0.04038262739777565, -0.04933631420135498, -0.07374876737594604, 0.030587071552872658, -0.06658677756786346, 7.144448090912192e-7, -0.26642298698425293, 0.12352009117603302, 0.11083396524190903, 0.004155042581260204, -0.11005289852619171, -0.015261344611644745, -0.09808417409658432, 0.06574510037899017, -0.10618884116411209, 0.22438767552375793, 0.19816811382770538, -0.10300423204898834, -0.044555485248565674, 0.10704091936349869, 0.17673036456108093, 0.0511295460164547, -0.03745851293206215, 0.20684422552585602, -0.00452463561668992, -0.14308229088783264, 0.10845287889242172, 0.14092524349689484, 0.2370768040418625, -0.12264538556337357, 0.06944049149751663, -0.016503317281603813, -0.0326092503964901, -0.10770858079195023, -0.003442303743213415, 0.08616278320550919, 0.038180626928806305, -0.014640907756984234, 0.03716030716896057, 0.03722751513123512, 0.09604354947805405, -0.020161205902695656, -0.17671920359134674, -0.03667842596769333, 0.11647112667560577, -0.08077874779701233, 0.09692747890949249, 0.043152667582035065, -0.003074832959100604, -0.07889720052480698, 0.02378673478960991, 0.1273900866508484, -0.01536248903721571, 0.1519124060869217, -0.15197314321994781, -0.055003076791763306, 0.023025214672088623, 0.19735302031040192, 0.05942748486995697, 0.1407143622636795, -0.08956313133239746, 0.018462317064404488, -0.008432066068053246, -0.23472461104393005, 0.24426372349262238, -0.22427164018154144, -0.15674209594726562, 0.050871722400188446, 0.025181936100125313, 0.05212109163403511, 0.011920780874788761, -0.0431160144507885, -0.024579761549830437, 1.2405639324475514e-34, 0.09892355650663376, 0.07212331891059875, -0.010099905543029308, -0.12581181526184082, -0.10509686172008514, -0.05525778606534004, 0.07567208260297775, 0.09701646119356155, 0.054363641887903214, -0.1908341944217682, -0.16506220400333405 ]
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.08655445277690887, 0.05041512846946716, 0.0071555194444954395, -0.18298326432704926, 0.20275433361530304, 0.10949910432100296, 0.2727736830711365, 0.00709152314811945, -0.07346538454294205, 0.2760328948497772, 0.033771250396966934, -0.03916288539767265, -0.09793592989444733, -0.17798760533332825, -0.16937297582626343, -0.14016413688659668, -0.02569052018225193, -0.10663466900587082, -0.05647435039281845, -0.15618295967578888, 0.01863955147564411, 0.046854499727487564, 0.05775045230984688, -0.11854127049446106, 0.025979820638895035, -0.09650497883558273, -0.09539724886417389, -0.027775917202234268, -0.07634168118238449, -0.1603851318359375, 0.1315954178571701, 0.013775333762168884, 0.0774860680103302, 0.18224042654037476, 0.0000052336677072162274, 0.06338745355606079, 0.16681379079818726, -0.011817798018455505, -0.11988603323698044, -0.04073901101946831, 0.1792062371969223, 0.1022222563624382, 0.07533271610736847, 0.01927170902490616, 0.049107007682323456, -0.06018947809934616, -0.007889052852988243, -0.05398356541991234, 0.10708470642566681, 0.016324928030371666, 0.004549884237349033, 0.07063032686710358, -0.14053095877170563, -0.18746048212051392, 0.03897738456726074, -0.026751089841127396, 0.0829862579703331, 0.14774052798748016, 0.12234047800302505, -0.02018696628510952, -0.13280516862869263, 0.004764019511640072, -0.010797562077641487, 0.13674959540367126, -0.14460019767284393, -0.13161921501159668, -0.10224421322345734, -0.10005541145801544, -0.06572870910167694, 0.09247234463691711, 0.0668128952383995, -0.04622742906212807, -0.17326277494430542, 0.009235764853656292, 0.0026807941030710936, -0.13796308636665344, -0.020085548982024193, 0.08400115370750427, -0.2913808524608612, 0.13237033784389496, -0.10957671701908112, 0.11908918619155884, -0.014751498587429523, -0.032989874482154846, -0.1985844075679779, 0.04019112139940262, -0.114051453769207, 0.034684304147958755, 0.07634992897510529, -0.08430078625679016, 0.22506245970726013, 0.012908488512039185, 0.10685765743255615, -0.12527428567409515, -0.22218047082424164, 0.07433472573757172, -0.10004893690347672, -0.1475837677717209, -0.07227560132741928, 0.1135198324918747, 0.03118748776614666, -0.2838824987411499, 0.019985664635896683, 0.17873984575271606, 0.16924381256103516, -0.07907184958457947, -0.05179080739617348, 0.04603799432516098, -0.06428080797195435, -0.016336116939783096, 0.07009437680244446, -0.04246804863214493, -0.07344873249530792, -0.0464753732085228, 0.0020008834544569254, -0.042721956968307495, 0.20575343072414398, 0.06247334182262421, -0.22762297093868256, 0.017403293401002884, -0.0606536902487278, 0.0050266701728105545, 0.04313371330499649, 0.07224302738904953, 0.13827519118785858, 0.009712941013276577, -0.06368101388216019, 0.13372284173965454, 0.08512820303440094, -0.062184326350688934, 0.007189289666712284, -0.044273629784584045, -0.03228228539228439, -0.04271998628973961, 0.15396720170974731, -0.13462118804454803, -0.022346746176481247, -0.11462514847517014, 0.07617293298244476, 0.14164046943187714, 0.11415038257837296, -0.1885419338941574, -0.014024844393134117, -0.08152740448713303, 0.026136619970202446, 0.05079470947384834, 0.09046102315187454, 0.156192347407341, 0.06730455905199051, -0.10595528781414032, -0.12841181457042694, 0.21914352476596832, -0.18980693817138672, 0.09565958380699158, -0.12169241160154343, 0.16339601576328278, 0.04447123780846596, -0.1562228798866272, -0.20377051830291748, -0.1517324000597, 0.10320023447275162, 0.09017134457826614, 0.02763456478714943, -0.11221738904714584, -0.11090797930955887, -0.01235131174325943, -0.02092132903635502, -0.022407280281186104, -0.04104964807629585, 0.018980979919433594, 0.10155297815799713, 0.06561242043972015, -0.16981858015060425, 0.08618774265050888, -0.1351378709077835, 0.10714241117238998, -0.15926781296730042, -0.014966120943427086, -0.3186980187892914, 0.0009477292187511921, 0.0390431173145771, -0.10437973588705063, 0.03538950905203819, -0.1724979281425476, 0.1816142350435257, -0.14321765303611755, 0.17569732666015625, -0.05506674572825432, -0.23111021518707275, -0.019164875149726868, 0.033407196402549744, 0.06396982073783875, 0.07420875132083893, 0.0032791707199066877, 0.13936108350753784, 0.02409038320183754, -0.13663151860237122, -0.13202835619449615, 0.06899035722017288, -0.22989508509635925, -0.02226116694509983, -0.00690707890316844, 0.028643174096941948, 0.08277878165245056, -0.017232898622751236, -0.13698197901248932, -0.07121407985687256, 0.11230804771184921, 0.10626614093780518, -0.29450318217277527, -0.12674714624881744, -0.0013363328762352467, -0.010739149525761604, 0.05271703749895096, -0.1596788465976715, 0.053414810448884964, 0.0028574601747095585, 0.19959254562854767, -0.11815482378005981, 0.022000184282660484, -0.1586149036884308, 0.036475878208875656, -0.0004434038419276476, -0.06244931370019913, -0.08873485028743744, 0.003928385674953461, -0.008628807961940765, -0.10734468698501587, 0.08083291351795197, -0.015354656614363194, -0.057119790464639664, -0.0155935725197196, 0.04135620966553688, 0.05886358022689819, -0.06615599244832993, -0.15940029919147491, 0.07603076845407486, -0.17573344707489014, 0.10520346462726593, -0.07148213684558868, -0.14340071380138397, 0.1197521984577179, -0.16462284326553345, -0.10282277315855026, -0.03565685451030731, 0.09066526591777802, -0.03820185363292694, 0.1951814442873001, 0.020225031301379204, -0.1509847790002823, 0.11728162318468094, -0.026828985661268234, -0.32468166947364807, 0.0758882611989975, 0.012704399414360523, -0.08190456032752991, 0.06997872143983841, -0.13867825269699097, -0.038107965141534805, -0.0979825034737587, 0.10964147746562958, -0.08864572644233704, -0.019371656700968742, 0.1341482251882553, 0.10033666342496872, -0.04996068403124809, 0.11817438155412674, -0.07478860765695572, 0.03237148001790047, 0.007106800563633442, 0.06178409978747368, 0.023997260257601738, 0.029461458325386047, -0.07359756529331207, -0.012162774801254272, -0.007381764706224203, 0.0014905852731317282, -0.022407442331314087, 0.07169802486896515, 0.001096751424483955, -0.11743197590112686, -0.11325284093618393, 0.07152062654495239, -0.14517971873283386, 0.03945578634738922, 0.03524298220872879, -0.010891037993133068, -0.049850985407829285, -0.19660724699497223, -0.059639640152454376, 0.05851791426539421, 0.0840054526925087, -0.12093904614448547, 0.03084343858063221, 0.016832156106829643, 0.02149888500571251, 0.10398620367050171, -0.12084291130304337, 0.22630269825458527, 0.07988419383764267, -0.14729470014572144, -0.08859937638044357, 0.032049696892499924, -0.025444436818361282, 0.1021304726600647, -0.0662846490740776, 0.13250811398029327, 0.2721257507801056, -0.07127776741981506, -0.21175651252269745, 0.013809728436172009, -0.06482043862342834, 0.06489815562963486, 0.08073350042104721, 0.19208742678165436, -0.07537369430065155, 0.0037530174013227224, -0.11526310443878174, 0.05320433899760246, -0.006281094625592232, 0.05489952117204666, 0.1550389528274536, 0.0131992744281888, 0.02147129364311695, 0.08163078129291534, -0.01979989930987358, -0.19630549848079681, 0.008454686962068081, -0.05250200629234314, -0.02144440822303295, -0.02784685604274273, 0.07251191884279251, -0.11031228303909302, 0.10356827825307846, 0.06984665244817734, -0.06857045739889145, -0.09942115098237991, 0.0083113769069314, 0.21296244859695435, -0.039118316024541855, -0.024851558730006218, -0.01305150892585516, -0.17086035013198853, -0.037334002554416656, 0.14794346690177917, -0.1569690853357315, 0.014631198719143867, 0.11513407528400421, -0.08743616938591003, -0.13925331830978394, 0.06415420025587082, 0.11948691308498383, 0.017085500061511993, -0.1649949699640274, -0.12065161019563675, 0.17077304422855377, -0.16479361057281494, -0.0036553184036165476, -0.05941496416926384, 0.045896634459495544, 0.20185942947864532, 0.03420136868953705, 0.2533259093761444, 0.055220358073711395, -0.11954780668020248, 0.16382750868797302, 0.16458232700824738, -0.09351345896720886, -0.035878218710422516, -0.27811354398727417, 0.147586390376091, -0.10042328387498856, -0.05277561768889427, -0.04401950165629387, -0.002156665315851569, -0.03019692935049534, 0.03516323119401932, 0.04704465717077255, 0.08735594898462296, 0.07936234772205353, -0.005012937821447849, -0.14967641234397888, -0.020825384184718132, 0.2033175677061081, 0.2325529158115387, -0.003653347957879305, 0.06328770518302917, -0.029833883047103882, -0.09056022018194199, 0.08181584626436234, 0.08048371970653534, -0.016720259562134743, 0.014511959627270699, -0.17195463180541992, -0.06287352740764618, -0.04325886443257332, 0.23669219017028809, 0.3150700628757477, -0.04374638944864273, 0.017214335501194, 0.09492000937461853, 0.13707362115383148, -0.16973502933979034, 0.08761681616306305, 0.12312687188386917, 0.01625552587211132, -0.03152390196919441, -0.19553203880786896, -0.0612228661775589, 0.16753482818603516, 0.14904846251010895, 0.007926231250166893, -0.02421923354268074, 0.04577656090259552, 0.18221105635166168, 0.013149537146091461, -0.05895674228668213, -0.09575711190700531, 0.08451415598392487, -0.2098652571439743, -0.15542292594909668, -0.14143003523349762, 0.10240490734577179, 0.25292107462882996, -0.03680834919214249, 0.07657414674758911, -0.07522585988044739, 0.036162666976451874, 0.0020789068657904863, -0.010504030622541904, -0.00023646836052648723, -0.06533320248126984, 0.17621243000030518, 0.036612898111343384, 0.14118868112564087, 0.14707928895950317, 0.10864682495594025, -0.026605205610394478, -0.05203654617071152, 0.14039094746112823, -0.1821569800376892, -0.11104337871074677, 0.1675678789615631, -0.19232787191867828, -0.061351027339696884, -0.11945311725139618, -0.07081104815006256, -0.0249574426561594, 0.08972220867872238, 0.1361815482378006, -0.16107714176177979, -0.2394772320985794, -0.14222939312458038, -0.20973409712314606, 0.1722104698419571, 0.09810629487037659, 0.25136733055114746, -0.20463161170482635, 0.01721845753490925, 0.11214777082204819, 0.02750614657998085, -0.058848652988672256, 0.005567894782871008, 0.023443957790732384, 0.1145276129245758, 0.14442069828510284, 0.1613754779100418, 0.06666195392608643, -0.015693901106715202, 0.12620626389980316, -0.04118138924241066, 0.07425746321678162, 0.059252068400382996, 0.02352474071085453, 0.18091855943202972, -0.08729051798582077, 0.07677541673183441, -0.09321539103984833, -0.07818298041820526, 0.10592008382081985, 0.09693336486816406, -0.17328189313411713, 0.03734850138425827, -0.05346818268299103, -0.04006585106253624, 0.09388524293899536, -0.010296070948243141, -0.001244708546437323, -0.12944984436035156, -0.026705194264650345, -0.02408282645046711, -0.14789070188999176, -0.06649396568536758, -0.08491699397563934, 0.04377259314060211, -0.027365224435925484, -0.0018829243490472436, 0.1241539716720581, -0.010109519585967064, 0.1432398557662964, -0.15853948891162872, -0.052238743752241135, -0.11299754679203033, -0.022827455773949623, 0.009740790352225304, -0.07392466813325882, 0.026460207998752594, 0.09465479105710983, -0.03301060199737549, -0.05291059613227844, 0.03548769652843475, 0.0010771844536066055, -0.10554680973291397, -0.007295371498912573, 0.0664481669664383, 0.12777966260910034, -0.1752166450023651, -0.013726518489420414, 0.0054219383746385574, -0.013624829240143299, 0.051506005227565765, -0.053908735513687134, -0.0041984738782048225, -0.19218355417251587, -0.019238833338022232, -0.03525250405073166, 0.18861380219459534, 0.136428102850914, 0.3133218586444855, 0.2698332667350769, 0.009676742367446423, 0.09159161895513535, 0.2426275610923767, 0.005050179082900286, -0.0741581991314888, 0.02116166241466999, 0.12748464941978455, -0.18708071112632751, 0.03364497423171997, -0.14625318348407745, 0.05898397043347359, -0.005973604507744312, -0.012973412871360779, -0.007522821892052889, 0.0896923691034317, 0.07885713130235672, -0.01843135990202427, -0.03520422801375389, -0.12959182262420654, -0.04935222119092941, 0.04725335165858269, 0.19419150054454803, 0.05975675582885742, -0.0041594053618609905, 0.1394919902086258, -2.443067084322805e-32, -0.04964664578437805, 0.05604981258511543, 0.01240737084299326, 0.03568591922521591, -0.1660001575946808, -0.05951489508152008, 0.00004983197140973061, 0.035540621727705, 0.01815127022564411, -0.01602371223270893, -0.14266550540924072, -0.0682595893740654, 0.05381723493337631, -0.03188787400722504, 0.08294542878866196, 0.019768957048654556, 0.13083110749721527, 0.11037172377109528, -0.051262907683849335, 0.03934876620769501, 0.15270040929317474, 0.24327823519706726, 0.09521040320396423, 0.10471189767122269, -0.02846159227192402, 0.166413351893425, -0.12259908765554428, -0.1287519335746765, 0.07079962641000748, -0.15771247446537018, -0.10982625186443329, 0.24533891677856445, -0.03867826610803604, -0.11212097108364105, -0.17455430328845978, -0.0005088555626571178, -0.2611927390098572, -0.18988575041294098, -0.07828155905008316, 0.2002072036266327, 0.00960085541009903, 0.21260814368724823, 0.1511642038822174, -0.21706895530223846, 0.08197376132011414, 0.14304275810718536, 0.07057622820138931, -0.04950866848230362, -0.03166232630610466, -0.15990646183490753, 0.09572983533143997, 0.1328391432762146, -0.10327095538377762, 0.044740933924913406, 0.07985172420740128, -0.11915979534387589, -0.06236761063337326, 0.05690610781311989, -0.12511378526687622, 0.051766395568847656, 0.19473965466022491, 0.045692916959524155, 0.037125129252672195, 0.007549810688942671, 0.20306192338466644, 0.010731004178524017, 0.33396488428115845, 0.0064761023968458176, 0.23557201027870178, -0.04129612073302269, -0.17268016934394836, -0.03288056701421738, -0.13095328211784363, 0.014438117854297161, -0.11438503116369247, 0.1021747812628746, -0.07882246375083923, -0.08627262711524963, -0.016499871388077736, -0.12544630467891693, 0.014370357617735863, 0.01796218752861023, 0.06377441436052322, 0.08141715079545975, -0.02699524164199829, -0.003087302204221487, 0.021427428349852562, 0.05874571576714516, -0.09580693393945694, 0.019532008096575737, 0.02806154638528824, 0.20676350593566895, -0.1145232617855072, -0.050524838268756866, -0.1987801045179367, 0.12487293034791946, -0.02411036752164364, 0.039317965507507324, -0.0732099711894989, -0.03321986645460129, -0.0550498403608799, -0.003146236063912511, -0.0974024161696434, 0.10994336754083633, 0.08270716667175293, 0.008670197799801826, -0.009407800622284412, 0.10436360538005829, -0.21595819294452667, -0.030675044283270836, 0.1272565871477127, 0.08143997937440872, 0.012290822342038155, 0.09031526744365692, 0.2648722529411316, -0.16757291555404663, 0.07270034402608871, 0.025489339604973793, 0.1766662746667862, -0.03200025483965874, -0.04759978875517845, -0.040275946259498596, -0.27362948656082153, -0.07034755498170853, -0.005559584591537714, -0.02609873004257679, -0.20137111842632294, -0.04038262739777565, -0.04933631420135498, -0.07374876737594604, 0.030587071552872658, -0.06658677756786346, 7.144448090912192e-7, -0.26642298698425293, 0.12352009117603302, 0.11083396524190903, 0.004155042581260204, -0.11005289852619171, -0.015261344611644745, -0.09808417409658432, 0.06574510037899017, -0.10618884116411209, 0.22438767552375793, 0.19816811382770538, -0.10300423204898834, -0.044555485248565674, 0.10704091936349869, 0.17673036456108093, 0.0511295460164547, -0.03745851293206215, 0.20684422552585602, -0.00452463561668992, -0.14308229088783264, 0.10845287889242172, 0.14092524349689484, 0.2370768040418625, -0.12264538556337357, 0.06944049149751663, -0.016503317281603813, -0.0326092503964901, -0.10770858079195023, -0.003442303743213415, 0.08616278320550919, 0.038180626928806305, -0.014640907756984234, 0.03716030716896057, 0.03722751513123512, 0.09604354947805405, -0.020161205902695656, -0.17671920359134674, -0.03667842596769333, 0.11647112667560577, -0.08077874779701233, 0.09692747890949249, 0.043152667582035065, -0.003074832959100604, -0.07889720052480698, 0.02378673478960991, 0.1273900866508484, -0.01536248903721571, 0.1519124060869217, -0.15197314321994781, -0.055003076791763306, 0.023025214672088623, 0.19735302031040192, 0.05942748486995697, 0.1407143622636795, -0.08956313133239746, 0.018462317064404488, -0.008432066068053246, -0.23472461104393005, 0.24426372349262238, -0.22427164018154144, -0.15674209594726562, 0.050871722400188446, 0.025181936100125313, 0.05212109163403511, 0.011920780874788761, -0.0431160144507885, -0.024579761549830437, 1.2405639324475514e-34, 0.09892355650663376, 0.07212331891059875, -0.010099905543029308, -0.12581181526184082, -0.10509686172008514, -0.05525778606534004, 0.07567208260297775, 0.09701646119356155, 0.054363641887903214, -0.1908341944217682, -0.16506220400333405 ]
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.08914966136217117, 0.13362693786621094, -0.013602175749838352, 0.18333318829536438, 0.03763493523001671, -0.08754192292690277, 0.038034453988075256, 0.03783930465579033, 0.1467134952545166, 0.06416381895542145, 0.2304224669933319, -0.18397991359233856, -0.035388875752687454, 0.023466937243938446, -0.04912618547677994, -0.12513741850852966, -0.009934893809258938, 0.06758526712656021, 0.1301821619272232, 0.06257141381502151, -0.0869114026427269, 0.008741204626858234, 0.030006755143404007, -0.07168304175138474, 0.1616894155740738, -0.08035708218812943, -0.010975485667586327, -0.005552873481065035, 0.06325628608465195, -0.21364229917526245, -0.040041498839855194, -0.07028039544820786, 0.00988391786813736, 0.10062991827726364, 0.000006844636573077878, -0.056684814393520355, 0.08119471371173859, -0.00504837092012167, -0.042079612612724304, 0.10002020001411438, 0.1516435295343399, -0.3498091399669647, 0.005144220311194658, 0.01389358937740326, 0.008852642960846424, -0.11466830968856812, -0.038702592253685, -0.02584352158010006, 0.05323871597647667, -0.08701442927122116, -0.046808186918497086, -0.12506817281246185, -0.04803525656461716, -0.019281486049294472, -0.009351949207484722, -0.11890646815299988, 0.1477261334657669, 0.11555947363376617, 0.030736079439520836, 0.19109852612018585, -0.17657087743282318, -0.06776558607816696, 0.02495703101158142, 0.007489247713238001, -0.030121315270662308, -0.11105901747941971, 0.03779512271285057, -0.04925234988331795, 0.054853782057762146, 0.023616699501872063, 0.2012622207403183, 0.19268488883972168, -0.096221424639225, -0.09976962953805923, -0.15163230895996094, -0.08013872057199478, -0.022321481257677078, -0.018109362572431564, -0.07766138762235641, -0.12502577900886536, -0.14969657361507416, 0.03351825848221779, -0.03881022334098816, -0.08351843059062958, -0.21100333333015442, 0.11232505738735199, -0.14215397834777832, 0.03710377961397171, 0.026957755908370018, -0.029475539922714233, -0.04551780968904495, -0.05677875876426697, -0.14549461007118225, -0.19495245814323425, 0.15974648296833038, -0.17883825302124023, 0.1418796330690384, -0.18587975203990936, 0.07695408910512924, 0.04834751412272453, 0.10671303421258926, 0.03189420700073242, -0.059470102190971375, -0.07164091616868973, 0.1304020881652832, -0.04369545727968216, -0.000011671988431771751, -0.1878678947687149, 0.009955418296158314, 0.101463183760643, 0.1337345689535141, 0.07031556218862534, -0.08489619940519333, -0.13947492837905884, 0.014636748470366001, -0.03209187462925911, 0.002242826856672764, 0.00731241749599576, 0.06462061405181885, 0.07226850092411041, -0.10206356644630432, 0.04959922656416893, -0.009921358898282051, -0.04614460840821266, -0.11062410473823547, -0.00023349605908151716, -0.055675771087408066, -0.027586868032813072, -0.1204940527677536, 0.019208231940865517, 0.08605288714170456, -0.02021847665309906, 0.17035633325576782, -0.14821787178516388, 0.11229436099529266, 0.06608419865369797, 0.08035630732774734, -0.15209205448627472, -0.02670983597636223, -0.02397255040705204, -0.12601760029792786, 0.010323485359549522, 0.009644296951591969, 0.23081514239311218, 0.008530845865607262, -0.09477981925010681, -0.08074118942022324, -0.02802945487201214, -0.07449778914451599, 0.07183676958084106, -0.12890096008777618, 0.13386270403862, -0.06408234685659409, -0.06273439526557922, -0.10491558164358139, -0.0766129195690155, -0.21125704050064087, -0.08181202411651611, -0.13628770411014557, 0.09864847362041473, 0.031774986535310745, -0.10471562296152115, 0.13297683000564575, -0.0570022352039814, 0.02122490294277668, 0.016520937904715538, -0.14540112018585205, -0.02664314955472946, 0.06256497651338577, 0.013921876437962055, 0.08667715638875961, -0.014311903156340122, -0.026203015819191933, 0.06778757274150848, -0.02375110052525997, -0.00387228443287313, 0.06841456145048141, 0.05229540169239044, 0.0009158661705441773, 0.21671530604362488, 0.08403337746858597, -0.0020264359191060066, -0.0011911795008927584, -0.03884464502334595, 0.069999098777771, 0.08987528085708618, 0.2089599221944809, 0.2948094606399536, 0.17003434896469116, -0.05702435225248337, -0.12279875576496124, 0.06156452000141144, -0.16414837539196014, 0.008776973001658916, -0.06591355055570602, -0.27045121788978577, -0.07312678545713425, -0.21979613602161407, 0.11561855673789978, 0.03320232778787613, -0.062223173677921295, 0.05629720166325569, -0.05350368469953537, 0.09392933547496796, 0.1479121297597885, 0.06043420359492302, -0.09806250035762787, -0.000847341027110815, 0.02543885074555874, -0.09720427542924881, -0.06285328418016434, 0.14128413796424866, 0.035851843655109406, -0.021815359592437744, 0.05745149776339531, 0.19704419374465942, 0.01684136688709259, 0.053874459117650986, 0.009870839305222034, -0.04196285083889961, 0.00606880197301507, 0.0021975624840706587, 0.04118403419852257, 0.06728609651327133, -0.023396123200654984, -0.023743996396660805, 0.15678879618644714, -0.029768016189336777, 0.07109110057353973, 0.08287528902292252, -0.04277230426669121, -0.08835483342409134, 0.019500335678458214, -0.03561745584011078, 0.022101646289229393, 0.0768968015909195, -0.0810147076845169, 0.06250999122858047, -0.08258695155382156, 0.17668932676315308, 0.121660977602005, 0.25200605392456055, 0.025667378678917885, 0.043335556983947754, 0.005524310749024153, -0.05788707733154297, -0.07697279751300812, 0.13916531205177307, -0.0781189575791359, -0.17597155272960663, 0.12029361724853516, 0.06567952781915665, -0.09329286217689514, 0.010923665016889572, 0.018974564969539642, 0.17447540163993835, -0.17026308178901672, 0.02749505639076233, 0.014329055324196815, -0.17240433394908905, 0.0599910244345665, -0.029986457899212837, -0.007804665248841047, 0.17656250298023224, 0.09536569565534592, -0.01752147078514099, -0.009589003399014473, 0.0837058275938034, 0.02477293089032173, 0.13115814328193665, 0.10090131312608719, -0.10483656823635101, 0.07144009321928024, -0.09129767119884491, -0.11510936915874481, -0.0721307173371315, -0.04337839037179947, -0.115254707634449, 0.0781964585185051, 0.021810410544276237, 0.014224117621779442, -0.1915113776922226, -0.22029775381088257, -0.019509460777044296, 0.0223385002464056, 0.14361433684825897, 0.05464760586619377, -0.028018152341246605, -0.09224658459424973, 0.014670301228761673, 0.09459132701158524, -0.030141662806272507, 0.044644955545663834, -0.19046840071678162, -0.016438879072666168, -0.17112888395786285, -0.0727696567773819, 0.17972810566425323, 0.037232331931591034, 0.03818061575293541, -0.008747651241719723, 0.03337319567799568, -0.05751834064722061, 0.00647392263635993, 0.059764329344034195, 0.14299684762954712, 0.1438778191804886, -0.15664808452129364, -0.048250436782836914, 0.1604846566915512, 0.058255452662706375, -0.015026227571070194, 0.08588770031929016, 0.051179662346839905, 0.010059572756290436, 0.24765552580356598, 0.023783652111887932, -0.020204616710543633, -0.0683479979634285, 0.1958947330713272, 0.10279075801372528, 0.10084117949008942, -0.078892283141613, -0.11430712044239044, 0.03187773376703262, 0.02865559235215187, 0.04386882856488228, -0.0006976043805480003, 0.026211434975266457, 0.17661046981811523, 0.019991828128695488, -0.14592066407203674, -0.1002092957496643, -0.032268695533275604, 0.03904721513390541, 0.0745534747838974, -0.033284030854701996, -0.1303352564573288, 0.12289890646934509, 0.07036112248897552, -0.01609911024570465, -0.017207587137818336, -0.03550988435745239, -0.06973379850387573, -0.14136596024036407, -0.1049097552895546, 0.268580824136734, -0.11044874042272568, -0.10343804210424423, -0.12285486608743668, 0.18941402435302734, 0.08082636445760727, 0.0421295166015625, -0.04758641868829727, -0.0562824122607708, -0.08294633775949478, -0.10127174109220505, 0.1865822672843933, 0.08163321018218994, 0.05661902204155922, 0.14750158786773682, -0.06638931483030319, -0.08908475935459137, 0.23132452368736267, -0.12716782093048096, -0.05003874748945236, 0.10719580203294754, 0.014756969176232815, 0.02873758040368557, 0.22152622044086456, 0.115324005484581, -0.007160032633692026, -0.05631507933139801, 0.07661357522010803, 0.014953640289604664, -0.0933782234787941, 0.0134858638048172, -0.10878543555736542, -0.08023398369550705, 0.0028976392932236195, 0.11189305037260056, -0.18236294388771057, -0.11469541490077972, -0.010509194806218147, 0.07166092097759247, -0.03318306431174278, -0.0953008159995079, -0.038942623883485794, -0.032778725028038025, 0.04379316419363022, 0.031368598341941833, 0.18839837610721588, 0.051036834716796875, 0.07681988924741745, -0.011408197693526745, -0.05398767068982124, 0.031107502058148384, 0.11406877636909485, -0.1279975324869156, 0.022783519700169563, -0.06308107078075409, -0.06133953854441643, -0.08544257283210754, 0.03554750233888626, 0.050517864525318146, 0.13327030837535858, -0.014754283241927624, -0.004194211680442095, 0.07087293267250061, -0.07032196968793869, 0.0712570771574974, 0.018318910151720047, -0.05965133383870125, 0.04301805421710014, 0.07597661763429642, 0.08005541563034058, -0.057697974145412445, -0.1493941694498062, 0.014374716207385063, -0.08536456525325775, -0.1236831322312355, -0.11457531899213791, -0.040622662752866745, 0.21428994834423065, 0.05659641698002815, 0.016168544068932533, 0.28616663813591003, 0.00779782235622406, 0.02211003378033638, 0.17083051800727844, -0.018288856372237206, -0.1459990292787552, -0.036008499562740326, 0.027281301096081734, -0.1842157244682312, 0.005941190291196108, 0.2122688740491867, 0.12735220789909363, 0.16509103775024414, 0.06469807028770447, -0.016987323760986328, -0.0146936709061265, 0.01183229498565197, 0.0761328637599945, 0.037060219794511795, -0.026927165687084198, 0.0015377450035884976, 0.07571569830179214, -0.18513725697994232, 0.0337279736995697, -0.08317774534225464, -0.14709526300430298, 0.03653032332658768, -0.10055147856473923, -0.058510564267635345, -0.062303729355335236, 0.014753974042832851, -0.04834908992052078, -0.006060055457055569, 0.109309121966362, -0.12463091313838959, -0.04439375549554825, -0.014639976434409618, 0.016571449115872383, 0.007803509011864662, -0.20924203097820282, 0.1283731907606125, -0.42092248797416687, 0.008065213449299335, 0.11056637763977051, 0.18257863819599152, 0.12309526652097702, -0.059530600905418396, 0.10204330086708069, 0.08225387334823608, -0.015656279399991035, -0.02704152651131153, 0.011965050362050533, -0.13466033339500427, -0.13482226431369781, 0.18343746662139893, -0.22179102897644043, -0.022390281781554222, -0.04408518970012665, -0.07331720739603043, 0.024742204695940018, 0.011130697093904018, 0.007093902211636305, -0.07683966308832169, -0.12800247967243195, 0.06618209183216095, -0.06035559996962547, 0.03058519959449768, 0.21784593164920807, 0.02284657023847103, 0.06212766095995903, -0.0018654240993782878, -0.04897678270936012, -0.14683787524700165, 0.04618045315146446, 0.08360733836889267, 0.0007226476445794106, 0.0055234371684491634, -0.15713268518447876, -0.04797547310590744, 0.11480914801359177, 0.03600229695439339, 0.11128488928079605, -0.05103060230612755, -0.07268686592578888, -0.0422523096203804, 0.12993891537189484, -0.018003979697823524, 0.021520428359508514, -0.11286523193120956, -0.19790898263454437, -0.009555733762681484, -0.17886410653591156, 0.11054101586341858, 0.16890735924243927, 0.1657974123954773, 0.03856932371854782, 0.017548728734254837, -0.061266086995601654, -0.08505633473396301, -0.11362115293741226, 0.02353632263839245, -0.0923197865486145, -0.1575251817703247, 0.16113363206386566, 0.08633635193109512, -0.047367163002491, 0.07595306634902954, 0.02959001064300537, 0.03498455882072449, 0.21073995530605316, 0.15348786115646362, 0.12612901628017426, -0.1274901032447815, 0.028996344655752182, -0.13772498071193695, -0.10217148065567017, -0.16308051347732544, 0.02299322932958603, 0.037370577454566956, 0.06895370781421661, -0.1418064832687378, -0.08904150128364563, 0.06007934734225273, 0.016728533431887627, 0.045917510986328125, 0.014718505553901196, 0.019585832953453064, 0.006202511489391327, -0.03529121354222298, -2.4319532260461617e-32, 0.03470059856772423, 0.0008732509450055659, 0.0011488921009004116, -0.21363194286823273, 0.0025053848512470722, -0.0723494365811348, 0.08591797202825546, -0.04115920141339302, -0.14113745093345642, -0.07667984813451767, 0.015457039698958397, -0.059843070805072784, -0.02125888131558895, 0.07711809873580933, 0.06033412367105484, -0.021805807948112488, 0.017062373459339142, 0.023187199607491493, 0.0037636137567460537, -0.05904947593808174, -0.0028168202843517065, -0.000618192832916975, 0.033280227333307266, 0.06833260506391525, 0.02453838288784027, 0.10737134516239166, 0.053808167576789856, 0.021712616086006165, 0.21061721444129944, -0.010647660121321678, -0.018853770568966866, -0.09764136373996735, -0.004914115183055401, -0.07897030562162399, -0.014142555184662342, -0.029608961194753647, -0.14679011702537537, -0.0570032112300396, 0.1002429872751236, 0.15317320823669434, -0.07044489681720734, -0.12726664543151855, 0.01580696739256382, -0.05431155115365982, 0.0942319855093956, -0.11776880919933319, -0.08238157629966736, 0.05340685695409775, -0.13260051608085632, 0.013493051752448082, 0.003638749709352851, -0.015515772625803947, 0.009386595338582993, 0.018528899177908897, 0.10423871874809265, -0.045977216213941574, 0.1230899766087532, 0.028312496840953827, -0.047262873500585556, -0.21827095746994019, 0.014486920088529587, -0.030536461621522903, 0.011543365195393562, -0.049834951758384705, -0.03511622175574303, 0.22023972868919373, -0.006350202020257711, 0.034967951476573944, -0.096769317984581, 0.05888129770755768, 0.04725932329893112, -0.06794927269220352, -0.09405121207237244, 0.09005848318338394, 0.06068798899650574, 0.09408676624298096, -0.01732092723250389, -0.03598292917013168, -0.08465611189603806, 0.05381481349468231, 0.10995718091726303, -0.07567303627729416, 0.030232055112719536, -0.05435045808553696, -0.10662486404180527, -0.11235310137271881, -0.12907716631889343, -0.07494158297777176, 0.12125600874423981, -0.13712064921855927, -0.1556066870689392, -0.13013683259487152, -0.001687329262495041, -0.15433645248413086, 0.08237401396036148, -0.006666197441518307, -0.15814308822155, -0.01579013466835022, -0.04650234058499336, -0.03096138685941696, -0.050504039973020554, -0.1151985451579094, 0.01647060178220272, -0.15608623623847961, 0.17554551362991333, 0.10610081255435944, 0.0809466540813446, -0.10456806421279907, -0.08900953829288483, -0.11815113574266434, -0.10064087063074112, -0.0435188002884388, 0.05147111415863037, -0.005627396050840616, 0.04865071177482605, 0.2524678707122803, -0.028114749118685722, 0.032341424375772476, 0.13914784789085388, 0.1210060566663742, 0.046918902546167374, -0.11397232860326767, 0.01582403853535652, 0.1523304283618927, -0.005679977126419544, -0.09613267332315445, -0.09212584048509598, -0.15110860764980316, -0.060086265206336975, 0.0687626376748085, -0.030378608033061028, -0.004777696914970875, 7.959420713632426e-7, 0.023175928741693497, 0.15268801152706146, -0.029031669721007347, 0.01693085953593254, -0.047086890786886215, 0.07902861386537552, -0.008663843385875225, -0.02297881431877613, -0.17357946932315826, -0.04023350030183792, -0.0034725372679531574, -0.11402342468500137, 0.026467200368642807, 0.0691482201218605, -0.06636613607406616, 0.11073503643274307, -0.08869172632694244, 0.038067951798439026, -0.09507820755243301, -0.10372840613126755, 0.2926129400730133, 0.07446853071451187, -0.1564241498708725, 0.02582092583179474, 0.0033203938510268927, -0.15074889361858368, -0.04260949417948723, -0.007877078838646412, 0.04469645023345947, -0.012096365913748741, 0.022727081552147865, -0.11164034157991409, -0.05309383571147919, 0.10477431863546371, 0.07411794364452362, -0.046750809997320175, -0.18850316107273102, -0.0717620924115181, 0.12626534700393677, 0.190819650888443, -0.0190308578312397, 0.13596832752227783, -0.03477714955806732, -0.00606133509427309, 0.17559251189231873, 0.050399817526340485, -0.11175917834043503, -0.011919934302568436, 0.03802471235394478, -0.1338672786951065, -0.07561378180980682, 0.09166509658098221, 0.232443705201149, 0.13977792859077454, 0.026840897276997566, -0.08911286294460297, 0.10963813215494156, 0.11272213608026505, 0.04543478414416313, 0.08395209163427353, -0.06184137612581253, 0.043151963502168655, -0.08919686824083328, -0.16624125838279724, 0.014650999568402767, -0.020321443676948547, 0.18362636864185333, 2.3583816886740337e-34, -0.03738969936966896, -0.0700477808713913, 0.09860190004110336, -0.05270771682262421, -0.004354401491582394, -0.0659501701593399, 0.06982414424419403, 0.11326032131910324, -0.050984758883714676, -0.06255566328763962, 0.001118288142606616 ]
https://github.com/huggingface/datasets/issues/2572
Support Zstandard compressed files
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook. ``` !pip install zstandard from datasets import load_dataset lds = load_dataset( "json", data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", split="train", streaming=True, ) WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module> 6 ) 7 ----> 8 next(iter(law_dataset_streamed)) 17 frames [/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression) 485 compression = infer_compression(urlpath) 486 if compression is not None and compression not in compr: --> 487 raise ValueError("Compression type %s not supported" % compression) 488 return compression 489 ValueError: Compression type zstd not supported ```
Add support for Zstandard compressed files: https://facebook.github.io/zstd/
115
Support Zstandard compressed files Add support for Zstandard compressed files: https://facebook.github.io/zstd/ I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook. ``` !pip install zstandard from datasets import load_dataset lds = load_dataset( "json", data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", split="train", streaming=True, ) WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module> 6 ) 7 ----> 8 next(iter(law_dataset_streamed)) 17 frames [/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression) 485 compression = infer_compression(urlpath) 486 if compression is not None and compression not in compr: --> 487 raise ValueError("Compression type %s not supported" % compression) 488 return compression 489 ValueError: Compression type zstd not supported ```
[ -0.11244416981935501, 0.12847548723220825, 0.007344345562160015, -0.01170218363404274, 0.20917369425296783, 0.06698824465274811, 0.07520293444395065, 0.06962640583515167, -0.0843905434012413, 0.033263206481933594, 0.056464530527591705, 0.09226371347904205, -0.02591773495078087, 0.12338952720165253, 0.11840873956680298, 0.030893750488758087, -0.07297590374946594, 0.1383148431777954, 0.15499185025691986, 0.13423003256320953, 0.07593350857496262, 0.13437210023403168, 0.1134791225194931, -0.10380702465772629, 0.056919705122709274, -0.053127069026231766, -0.08921777456998825, 0.032351408153772354, -0.03947802260518074, -0.10412991046905518, 0.04469258338212967, 0.12030986696481705, 0.1479085385799408, 0.0502253882586956, 0.0000054082033784652594, 0.052872925996780396, -0.06573043018579483, -0.013387142680585384, -0.07339280843734741, -0.04752466827630997, 0.1941990852355957, -0.2685735821723938, -0.17239287495613098, 0.011602189391851425, -0.06497108936309814, -0.09983860701322556, -0.045593004673719406, -0.06358815729618073, 0.1302555799484253, 0.1038011983036995, 0.01633148267865181, 0.21810775995254517, -0.04832065850496292, -0.2270253747701645, -0.05182787403464317, 0.0974055603146553, -0.10526985675096512, 0.022111976519227028, -0.2184964269399643, 0.08603477478027344, 0.0013021943159401417, -0.054361674934625626, -0.04145536199212074, 0.07360795140266418, -0.11600936204195023, -0.08645568788051605, -0.03775733709335327, -0.1720024198293686, 0.002284148707985878, 0.09082519263029099, 0.09751498699188232, -0.011152539402246475, -0.25078263878822327, -0.051995065063238144, 0.05400404334068298, -0.039173681288957596, -0.044900160282850266, 0.06593890488147736, -0.05119675025343895, 0.019126083701848984, -0.0767829567193985, 0.06515573710203171, 0.024125203490257263, -0.002933292416855693, -0.13344049453735352, 0.07594115287065506, -0.1370183527469635, 0.00663298973813653, 0.04717886820435524, -0.11468508094549179, 0.08767121285200119, 0.03650614619255066, 0.028818279504776, -0.15821316838264465, 0.13617250323295593, -0.03694344311952591, -0.15453819930553436, -0.2393992841243744, 0.18140801787376404, -0.04835401475429535, 0.03648512437939644, 0.04447459056973457, 0.04625776410102844, 0.017347251996397972, 0.044753026217222214, 0.0158489141613245, 0.06553925573825836, -0.18610894680023193, 0.0930495336651802, 0.0821957215666771, 0.1504659354686737, 0.19387874007225037, -0.13840992748737335, -0.16369417309761047, -0.0999460220336914, 0.03816349431872368, -0.02480607107281685, 0.058030229061841965, 0.021643327549099922, -0.033438533544540405, 0.03777698054909706, 0.09724412113428116, -0.007992049679160118, 0.09379283338785172, 0.11229370534420013, -0.013791587203741074, 0.005990705918520689, 0.2015973925590515, 0.011835562996566296, 0.01658211089670658, -0.04273596778512001, -0.0058688148856163025, 0.1987818479537964, 0.03855966404080391, 0.1736569106578827, -0.1562289446592331, 0.0382087267935276, -0.1832743138074875, 0.10419299453496933, 0.1260455697774887, 0.00021393399219959974, 0.11562702804803848, -0.05546512082219124, 0.0775933489203453, 0.012999915517866611, 0.038891639560461044, 0.14695008099079132, 0.043026749044656754, -0.14712370932102203, 0.0739215537905693, -0.25363433361053467, 0.15282849967479706, -0.21022240817546844, -0.05015205219388008, -0.18931080400943756, -0.04541729390621185, 0.052502214908599854, -0.20301449298858643, -0.25895828008651733, -0.3112301230430603, -0.05166157707571983, -0.023874232545495033, -0.033536382019519806, -0.014794123359024525, 0.17707820236682892, 0.055545125156641006, -0.14485745131969452, -0.048960015177726746, -0.1350930780172348, -0.20940756797790527, 0.25720980763435364, -0.0496516115963459, -0.0169613528996706, -0.26604101061820984, -0.16241341829299927, 0.20989128947257996, -0.0008906111470423639, 0.10260728001594543, -0.19220109283924103, -0.043869223445653915, 0.10958272963762283, -0.04793184995651245, 0.15641146898269653, -0.021330958232283592, -0.05273393541574478, 0.0117063382640481, 0.009484420530498028, 0.1901671290397644, -0.01167094986885786, -0.10609039664268494, -0.13564899563789368, -0.08953484892845154, 0.31540435552597046, 0.03297044709324837, -0.05821402743458748, 0.09972549974918365, 0.14181305468082428, -0.06575758010149002, 0.004536198917776346, -0.10689006000757217, -0.07992301136255264, -0.03507351502776146, 0.06310951709747314, -0.004876014310866594, 0.11201553791761398, 0.0013967774575576186, -0.02375548705458641, 0.0003178854240104556, -0.022991396486759186, 0.032373297959566116, -0.05245589092373848, -0.00993406306952238, 0.03928085416555405, -0.1916416734457016, -0.03802976384758949, 0.011475271545350552, -0.050833072513341904, -0.011873391456902027, 0.041330717504024506, 0.14648470282554626, -0.09709975123405457, 0.03897884488105774, 0.1240440309047699, -0.10619167983531952, 0.06188987195491791, 0.09082703292369843, -0.11400218307971954, -0.09199107438325882, 0.04515713080763817, 0.11827661842107773, -0.13627327978610992, -0.04487055167555809, 0.1165941134095192, 0.008738582022488117, -0.1109333336353302, -0.06861793249845505, -0.18967244029045105, -0.103146992623806, 0.035521943122148514, -0.10667973756790161, 0.008489049039781094, 0.06457556039094925, -0.023127024993300438, 0.05970689281821251, 0.19306476414203644, -0.07901036739349365, -0.04242587462067604, -0.18673193454742432, 0.03569892793893814, 0.06760217249393463, 0.42153385281562805, 0.13498221337795258, -0.2041407972574234, -0.036274880170822144, 0.0387008860707283, -0.024273056536912918, -0.0319177620112896, -0.06255039572715759, 0.09696535766124725, -0.18889448046684265, 0.2791168689727783, -0.11646083742380142, -0.065022312104702, 0.16442158818244934, 0.11467774957418442, 0.036504440009593964, 0.14064018428325653, -0.07969144731760025, 0.12879563868045807, 0.08782165497541428, 0.09801662713289261, -0.09424864500761032, -0.016286779195070267, -0.06573852151632309, 0.04325217008590698, -0.1586228758096695, 0.19932249188423157, 0.14527660608291626, 0.00819110032171011, 0.09121835976839066, -0.18633057177066803, 0.14272287487983704, -0.02986164763569832, -0.02007332071661949, -0.05781548470258713, -0.044918905943632126, -0.24214515089988708, -0.12747088074684143, 0.04311442747712135, 0.15005476772785187, -0.023295579478144646, 0.1324787437915802, 0.06589490920305252, -0.15148276090621948, 0.05073092505335808, 0.02272290550172329, 0.014067012816667557, 0.0754786878824234, 0.10353081673383713, -0.09723241627216339, -0.2275424301624298, 0.039016950875520706, -0.011150245554745197, 0.018029725179076195, -0.0387820228934288, -0.15204684436321259, 0.08895692229270935, 0.10354699194431305, -0.0738767683506012, -0.1081022098660469, 0.038005515933036804, 0.02631022036075592, -0.09375505149364471, 0.0375029519200325, 0.03497352451086044, 0.04483328014612198, 0.13720326125621796, -0.10980039089918137, 0.19043199717998505, -0.13559657335281372, 0.04503370076417923, 0.07061862200498581, 0.04801305755972862, 0.1008313000202179, -0.20173698663711548, 0.16664358973503113, -0.3066829442977905, -0.19442002475261688, -0.12486163526773453, -0.0008582255686633289, 0.01765207201242447, 0.2219795435667038, -0.008097387850284576, 0.002273307414725423, 0.12298913300037384, -0.05611800774931908, -0.11071692407131195, -0.08357182145118713, 0.3279394209384918, -0.04284541681408882, -0.09069659560918808, -0.04638974368572235, 0.03366517275571823, -0.10611864924430847, 0.08231063932180405, -0.09595393389463425, 0.04020831733942032, 0.0060209790244698524, -0.021147403866052628, -0.08360651880502701, -0.07750488817691803, 0.1451084464788437, 0.17896535992622375, -0.1536383479833603, -0.08772099018096924, -0.03829865902662277, -0.0200386680662632, 0.1611672043800354, 0.08051187545061111, 0.10903429239988327, 0.12747909128665924, 0.15536513924598694, -0.06197395175695419, -0.045141302049160004, -0.14387354254722595, 0.2682726979255676, 0.14321894943714142, 0.1644386500120163, -0.00349584617651999, -0.04508209228515625, -0.030924759805202484, -0.0701075941324234, 0.16115893423557281, 0.05776260420680046, 0.11150791496038437, -0.026014642789959908, -0.11019784957170486, -0.17315863072872162, 0.12010981142520905, 0.1949509233236313, -0.16388064622879028, -0.17604295909404755, -0.060227468609809875, -0.17432017624378204, -0.13340002298355103, -0.035064447671175, -0.004342327825725079, 0.05598151683807373, -0.034925397485494614, 0.11112768203020096, 0.125522643327713, 0.1576673835515976, 0.07231243699789047, -0.11507241427898407, 0.07281781733036041, -0.05254195258021355, 0.1372871696949005, -0.09793722629547119, -0.011530077084898949, -0.03261808305978775, 0.059710338711738586, -0.011342019774019718, 0.02869834005832672, 0.01495655719190836, 0.09978518635034561, 0.10084562748670578, 0.050907425582408905, -0.15184971690177917, -0.009709561243653297, -0.0939231812953949, -0.050979990512132645, 0.07796383649110794, -0.050577256828546524, -0.003482335014268756, -0.020826075226068497, -0.0339735746383667, 0.144631490111351, 0.05392817407846451, 0.022324765101075172, -0.10193202644586563, -0.1457255631685257, -0.2341441661119461, 0.24511992931365967, 0.13249477744102478, -0.031272049993276596, -0.07239054143428802, -0.059608981013298035, -0.1450960338115692, 0.23248352110385895, -0.0192509014159441, 0.11751289665699005, -0.04848473146557808, -0.029711788520216942, 0.02747896872460842, 0.03607003390789032, 0.00795044656842947, 0.2510911226272583, 0.09231399744749069, -0.22364668548107147, 0.09208916872739792, -0.02222367189824581, 0.07994160801172256, -0.0031878799200057983, -0.132699117064476, -0.026172438636422157, -0.16299238801002502, -0.13562577962875366, -0.1463530957698822, -0.06564675271511078, 0.0451769158244133, -0.16927404701709747, -0.16000168025493622, 0.035681236535310745, -0.18679912388324738, 0.04889410734176636, 0.06884928047657013, 0.037561673671007156, 0.043917808681726456, -0.1799095869064331, 0.00402911938726902, 0.009915291331708431, -0.04639972373843193, -0.10030511021614075, -0.030941514298319817, -0.07027357071638107, 0.07259688526391983, 0.2856689691543579, -0.11992374807596207, 0.06812884658575058, 0.1720442771911621, -0.16570842266082764, 0.1302562654018402, -0.0005858861259184778, 0.18549752235412598, 0.17441166937351227, -0.2546810209751129, -0.07929451763629913, 0.01971544697880745, -0.23524494469165802, -0.006326392758637667, 0.1845538169145584, -0.09712617099285126, 0.08352724462747574, -0.15324528515338898, 0.09752101451158524, 0.023055357858538628, -0.10270579159259796, 0.21079859137535095, -0.1466682404279709, -0.019509905949234962, 0.029416022822260857, -0.10592241585254669, -0.0013903204817324877, 0.1542450487613678, 0.044733814895153046, -0.055201295763254166, 0.024853553622961044, 0.026594575494527817, 0.013045051135122776, -0.13385127484798431, 0.0037351089995354414, -0.11421504616737366, 0.10251175612211227, -0.05230030044913292, -0.06069570779800415, -0.057564664632081985, 0.03137856721878052, 0.05315382033586502, -0.06109977141022682, 0.034699421375989914, -0.04043798893690109, 0.10544820129871368, 0.028252270072698593, 0.0904705822467804, -0.15271668136119843, 0.05035845562815666, -0.004932343028485775, -0.026297463104128838, -0.0007002114434726536, -0.015405310317873955, 0.06874412298202515, 0.024545293301343918, -0.10054830461740494, -0.03281967341899872, -0.08593862503767014, 0.03772611543536186, -0.05767056718468666, -0.03323371335864067, 0.06610400974750519, 0.06173449382185936, 0.1967114508152008, 0.1194809153676033, 0.07594909518957138, -0.08944667875766754, -0.05490019544959068, 0.05306021496653557, 0.06271672993898392, 0.11117307096719742, -0.0671672374010086, 0.0657903328537941, -0.023376304656267166, -0.16412484645843506, -0.017833756282925606, 0.18442128598690033, 0.06808580458164215, -0.01713830791413784, -0.07954190671443939, -0.0746782198548317, -0.073088139295578, -0.08567068725824356, 0.1536388248205185, 0.11565122753381729, 0.0276096910238266, -0.0829312801361084, -0.044176895171403885, -2.7260992345675367e-32, -0.020732171833515167, 0.1670411080121994, -0.052596159279346466, -0.0862087607383728, -0.10075172036886215, -0.08175432682037354, -0.0732155591249466, -0.01822601445019245, -0.07677243649959564, -0.0629199743270874, -0.022879118099808693, 0.04267561063170433, 0.019798249006271362, 0.04093201458454132, -0.020553868263959885, 0.039645228534936905, -0.005009068176150322, -0.09780708700418472, 0.01975102350115776, -0.06999392807483673, 0.007514831610023975, -0.12494407594203949, 0.2306525558233261, 0.18978092074394226, -0.19269457459449768, 0.10905342549085617, -0.17886199057102203, -0.1019894927740097, 0.13937050104141235, -0.02344069816172123, 0.040742017328739166, 0.013230930082499981, -0.0025255968794226646, -0.07887668162584305, 0.048704762011766434, 0.1900300234556198, -0.2018023431301117, 0.0059732357040047646, -0.14414861798286438, -0.07655981183052063, 0.05017458274960518, 0.05207709223031998, 0.021526359021663666, -0.012808709405362606, 0.020602816715836525, 0.12268092483282089, -0.06050565466284752, -0.16538116335868835, -0.029953811317682266, 0.04097449406981468, 0.07020808011293411, -0.04408344626426697, -0.08035415410995483, 0.04456628859043121, 0.08423903584480286, 0.11241263896226883, 0.1161206066608429, 0.25138163566589355, 0.1555878221988678, -0.005845518782734871, -0.008414012379944324, 0.05815238505601883, 0.10199522227048874, -0.14079314470291138, -0.07391680032014847, 0.003759315237402916, 0.0498468391597271, -0.06100742518901825, 0.09299612790346146, 0.003937840461730957, 0.01885136216878891, 0.07501845806837082, -0.007453781086951494, 0.1504184752702713, -0.12713086605072021, -0.09921926259994507, -0.14584442973136902, 0.023498907685279846, 0.08914501219987869, -0.16889363527297974, -0.05044570192694664, -0.06962844729423523, -0.0653509572148323, -0.09467439353466034, 0.08899694681167603, 0.13941757380962372, 0.005109788849949837, -0.027532676234841347, -0.06360868364572525, 0.08181847631931305, 0.016758767887949944, 0.0023720806930214167, 0.03705286607146263, -0.012502619996666908, 0.07368863373994827, 0.06126336753368378, -0.0458134301006794, -0.07111487537622452, -0.06911405920982361, 0.11321592330932617, 0.0030001061968505383, 0.041087813675403595, 0.12268708646297455, -0.017811933532357216, 0.17571939527988434, 0.02477196604013443, 0.15737593173980713, 0.0919010117650032, -0.18926960229873657, -0.07631637901067734, 0.04054461419582367, 0.01686866767704487, 0.17043952643871307, 0.08321184664964676, 0.13859614729881287, 0.02250848151743412, -0.07454456388950348, -0.13675908744335175, -0.013228554278612137, 0.1060735434293747, -0.0438753105700016, -0.12037411332130432, -0.017757339403033257, -0.08395639806985855, 0.03374907001852989, -0.09623809158802032, -0.13380062580108643, -0.18190839886665344, -0.13418978452682495, 0.00747238053008914, -0.07288090139627457, -0.04257039353251457, 7.360845302173402e-7, -0.23624001443386078, 0.204616978764534, -0.032002560794353485, 0.04671451449394226, 0.08824030309915543, 0.09348849952220917, -0.10488653928041458, 0.06637893617153168, -0.04978146776556969, 0.10755819827318192, 0.0547032468020916, -0.07280600816011429, -0.08319330215454102, -0.0197558905929327, -0.04569166898727417, -0.10452906042337418, 0.08680355548858643, -0.013055684976279736, -0.01347270980477333, -0.0010011481354013085, 0.2548040449619293, 0.24436312913894653, -0.07536105811595917, -0.06972721219062805, 0.2156122475862503, -0.044538501650094986, -0.014559535309672356, 0.03156666085124016, -0.07866111397743225, -0.07275430113077164, -0.07560783624649048, 0.1000073105096817, 0.053933341056108475, 0.08295939117670059, -0.17948278784751892, 0.10268816351890564, -0.12813778221607208, 0.09055215120315552, 0.005493524018675089, 0.028700951486825943, -0.0706283375620842, -0.03601905703544617, -0.015271797776222229, 0.07089504599571228, -0.0030682021751999855, 0.21660006046295166, -0.09580832719802856, 0.027705030515789986, -0.19771789014339447, 0.03484119847416878, -0.0035832214634865522, -0.05461887642741203, 0.1821466088294983, -0.03132038936018944, 0.022428052499890327, -0.01812117174267769, -0.04877406731247902, -0.037311144173145294, 0.028159737586975098, -0.08785326778888702, 0.013989711180329323, -0.015720373019576073, -0.05146804451942444, -0.0022897308226674795, 0.14868956804275513, -0.013545243069529533, -0.03401138633489609, 1.898913204155627e-34, 0.013425079174339771, 0.12008484452962875, 0.07880119234323502, -0.012423812411725521, -0.0069002192467451096, -0.07179709523916245, 0.025422360748052597, -0.039416298270225525, 0.0701156035065651, -0.17634396255016327, -0.1036989614367485 ]
https://github.com/huggingface/datasets/issues/2572
Support Zstandard compressed files
I just tried on google colab and this works: ```python !pip install zstandard !pip install datasets from datasets import load_dataset lds = load_dataset( "json", data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", split="train", streaming=True, ) next(iter(lds)) ``` Can you check that you have a correct installation of `zstandard` ?
Add support for Zstandard compressed files: https://facebook.github.io/zstd/
42
Support Zstandard compressed files Add support for Zstandard compressed files: https://facebook.github.io/zstd/ I just tried on google colab and this works: ```python !pip install zstandard !pip install datasets from datasets import load_dataset lds = load_dataset( "json", data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", split="train", streaming=True, ) next(iter(lds)) ``` Can you check that you have a correct installation of `zstandard` ?
[ -0.04203619807958603, 0.13007760047912598, 0.03681011497974396, -0.030789243057370186, 0.1582680195569992, 0.05610388517379761, 0.0023500039242208004, 0.10685429722070694, -0.14560745656490326, 0.033518534153699875, 0.032776083797216415, 0.15414102375507355, -0.036015599966049194, 0.06842027604579926, 0.05888168141245842, 0.02674926444888115, -0.10781779140233994, 0.17712120711803436, 0.13866619765758514, 0.13757875561714172, 0.07188364118337631, 0.14281588792800903, 0.1194349005818367, -0.02938714250922203, 0.11279711872339249, -0.06200796738266945, -0.06963589042425156, -0.023633450269699097, -0.0873267725110054, -0.11467058211565018, 0.08997906744480133, 0.08435684442520142, 0.13185001909732819, 0.09763317555189133, 0.000005469888492370956, 0.02161930315196514, -0.13521458208560944, 0.026904864236712456, -0.08298183977603912, -0.11091388761997223, 0.2347140908241272, -0.31968748569488525, -0.1431279331445694, 0.014139099977910519, -0.05280280113220215, -0.12231648713350296, -0.03312312811613083, -0.004778189118951559, 0.13692304491996765, 0.033302485942840576, 0.0432511568069458, 0.18368996679782867, -0.06030021980404854, -0.22980135679244995, -0.12894661724567413, 0.010780987329781055, -0.1294688731431961, 0.018455740064382553, -0.20704585313796997, 0.10962394624948502, -0.0084626330062747, -0.0675862729549408, -0.03220438212156296, 0.0925503671169281, -0.16851240396499634, -0.07340268045663834, -0.06878188997507095, -0.14993056654930115, -0.03618304058909416, 0.1284564733505249, 0.18219846487045288, -0.06135876104235649, -0.28093627095222473, -0.028022995218634605, 0.05915657803416252, -0.10204550623893738, -0.07509305328130722, 0.16645337641239166, -0.055328838527202606, 0.06304153054952621, -0.04895344749093056, 0.08128301799297333, 0.04866623133420944, 0.014970554038882256, -0.09627548605203629, 0.13480405509471893, -0.13879366219043732, -0.1010790467262268, 0.10274334251880646, -0.10518458485603333, 0.16263309121131897, 0.03001759573817253, 0.04078957065939903, -0.14244037866592407, 0.1348595917224884, -0.03825276717543602, -0.1290971040725708, -0.33005863428115845, 0.15104146301746368, -0.042265042662620544, 0.11012955009937286, 0.06900683045387268, 0.0479765422642231, 0.01864226534962654, 0.041865214705467224, 0.08337926119565964, 0.04884558171033859, -0.20457592606544495, 0.11010733246803284, 0.030995549634099007, 0.14005473256111145, 0.12712934613227844, -0.1748681366443634, -0.10355180501937866, -0.1240171417593956, 0.050209105014801025, -0.007531566545367241, 0.026117520406842232, 0.03693702444434166, -0.07803677022457123, 0.016438815742731094, 0.1051872968673706, -0.12564058601856232, 0.04700950160622597, 0.10568203777074814, -0.03591875359416008, -0.04338505119085312, 0.20547334849834442, 0.02001546137034893, 0.004099879879504442, -0.0002851137251127511, 0.0197252556681633, 0.13863293826580048, 0.02087368443608284, 0.1479351669549942, -0.14922775328159332, 0.031352199614048004, -0.14606976509094238, 0.11062920093536377, 0.12703150510787964, 0.038738347589969635, 0.1106201708316803, -0.07108967006206512, 0.063151516020298, 0.03311232849955559, 0.012891832739114761, 0.1544560343027115, -0.00034674376365728676, -0.1535883992910385, 0.08133915811777115, -0.250844269990921, 0.15800593793392181, -0.24031217396259308, -0.09652198851108551, -0.21502910554409027, -0.04762107878923416, 0.0825510174036026, -0.213018536567688, -0.21673299372196198, -0.3055360019207001, -0.09867966175079346, -0.043181437999010086, 0.0005792100564576685, -0.05329430103302002, 0.16308729350566864, 0.0337090790271759, -0.1881144493818283, -0.009221086278557777, -0.140181764960289, -0.1316663771867752, 0.31497257947921753, 0.03288838267326355, -0.037562575191259384, -0.24143001437187195, -0.18924029171466827, 0.2197674959897995, 0.03496285900473595, 0.14063619077205658, -0.15599623322486877, 0.013339321129024029, 0.09892822057008743, 0.01068116631358862, 0.08140700310468674, -0.02774910256266594, -0.09487370401620865, -0.021620573475956917, -0.016464900225400925, 0.16309626400470734, 0.05531485378742218, -0.12604790925979614, -0.08924651145935059, -0.11359360069036484, 0.28884974122047424, -0.019918162375688553, -0.037004027515649796, 0.11132871359586716, 0.15486688911914825, -0.05322389677166939, 0.04133980721235275, -0.14057406783103943, -0.06321075558662415, -0.1048940122127533, 0.037986814975738525, -0.03495005518198013, 0.1225314810872078, 0.022134682163596153, -0.023218385875225067, -0.009943309240043163, 0.007311471737921238, 0.04915078729391098, -0.10902569442987442, -0.03385844826698303, 0.029521595686674118, -0.1692095696926117, -0.044551510363817215, -0.02686610259115696, -0.019611451774835587, -0.06628583371639252, -0.01449036505073309, 0.12035525590181351, -0.020526153966784477, 0.033354051411151886, 0.1181914359331131, -0.06706429272890091, 0.09173665940761566, 0.11506097763776779, -0.12368801981210709, -0.09141790866851807, 0.0699298158288002, 0.11648230254650116, -0.1935502141714096, -0.05458498001098633, 0.11919164657592773, -0.007168265990912914, -0.08589321374893188, -0.028173066675662994, -0.16758683323860168, -0.08655250072479248, 0.05858343094587326, -0.10831301659345627, 0.06621391326189041, 0.12043575942516327, -0.047808509320020676, 0.10811677575111389, 0.1664845198392868, -0.09711672365665436, 0.027482422068715096, -0.1718083769083023, 0.03661317378282547, 0.06318037956953049, 0.4550759792327881, 0.12084149569272995, -0.21272923052310944, -0.04142047092318535, 0.09421335160732269, 0.0273003987967968, -0.06207801774144173, -0.059101205319166183, 0.1226205974817276, -0.0753604918718338, 0.32056599855422974, -0.08889517188072205, -0.1053151935338974, 0.1875680536031723, 0.12947693467140198, 0.07862285524606705, 0.08886399120092392, -0.03458300977945328, 0.12117737531661987, 0.04060795530676842, 0.14060848951339722, -0.09065384417772293, -0.013944024220108986, -0.05841181054711342, -0.010380982421338558, -0.10982033610343933, 0.1689147800207138, 0.09241591393947601, -0.02217768505215645, 0.08439512550830841, -0.1570078432559967, 0.15048623085021973, -0.04118625447154045, -0.030335502699017525, -0.00315971695818007, -0.05171109735965729, -0.25021740794181824, -0.1419796198606491, -0.015307134948670864, 0.13423895835876465, -0.030759431421756744, 0.08352768421173096, 0.06804361939430237, -0.11801354587078094, 0.028931962326169014, -0.000018468745111022145, 0.09398937225341797, 0.061683159321546555, 0.062491267919540405, -0.05027367174625397, -0.19553837180137634, 0.023978644981980324, -0.07718758285045624, 0.013982373289763927, -0.022005999460816383, -0.1541760116815567, 0.04319966584444046, -0.018778644502162933, 0.002593999495729804, -0.08400925993919373, -0.026544231921434402, 0.05874794349074364, -0.07016601413488388, 0.03895866498351097, 0.00861827377229929, 0.00109077466186136, 0.13157328963279724, -0.07071392983198166, 0.1673714965581894, -0.15920454263687134, -0.013549905270338058, 0.05940135195851326, 0.026799550279974937, 0.030296437442302704, -0.1898180991411209, 0.10414732992649078, -0.34684455394744873, -0.17218400537967682, -0.12201615422964096, 0.0561094656586647, 0.02979726903140545, 0.21203573048114777, -0.00733944633975625, -0.03813108801841736, 0.10134989768266678, -0.09048044681549072, -0.09163939207792282, -0.12597283720970154, 0.33690205216407776, -0.07336694002151489, -0.10749409347772598, -0.05450985208153725, 0.016650071367621422, -0.14764860272407532, 0.02471664361655712, -0.03408427536487579, 0.047904811799526215, -0.042092908173799515, -0.05056004598736763, -0.09425322711467743, -0.05940024182200432, 0.14395612478256226, 0.19402369856834412, -0.16657306253910065, -0.05245385691523552, -0.06329460442066193, -0.010978184640407562, 0.19045677781105042, 0.17310084402561188, 0.13562104105949402, 0.08823920041322708, 0.1904730498790741, 0.03196031227707863, -0.05343618988990784, -0.13251909613609314, 0.192381352186203, 0.10271475464105606, 0.1800675243139267, 0.006850828882306814, 0.0008559739799238741, -0.026411429047584534, -0.060729268938302994, 0.12245402485132217, 0.0750957727432251, 0.08808137476444244, -0.03324900567531586, -0.12441682070493698, -0.12319360673427582, 0.10878904163837433, 0.12819263339042664, -0.09482812881469727, -0.15582650899887085, -0.09659544378519058, -0.09000906348228455, -0.05615375563502312, -0.07355271279811859, -0.06421984732151031, 0.06598005443811417, -0.08325168490409851, 0.11948253959417343, 0.06364534795284271, 0.15533626079559326, -0.005635662470012903, -0.08033037930727005, 0.07445237040519714, -0.05103135108947754, 0.12106620520353317, -0.06405726820230484, 0.00968964770436287, 0.0444549098610878, 0.08576150983572006, 0.035320185124874115, 0.012116643600165844, -0.048886917531490326, 0.08259333670139313, 0.18572065234184265, 0.043611638247966766, -0.14664292335510254, -0.030812127515673637, -0.022475864738225937, -0.05185388773679733, 0.0800342932343483, -0.06516719609498978, 0.02729894407093525, -0.03437717258930206, 0.047103576362133026, 0.1625950187444687, 0.03145177289843559, -0.006765009369701147, -0.1217760220170021, -0.1320924311876297, -0.28425830602645874, 0.1764637529850006, 0.0721273273229599, -0.07155334204435349, -0.050964899361133575, -0.01622539758682251, -0.05082375183701515, 0.2360651195049286, -0.0003302420664113015, 0.1505836695432663, -0.03152245283126831, -0.08309134840965271, 0.020807843655347824, -0.013824987225234509, 0.043351154774427414, 0.20836274325847626, 0.12133452296257019, -0.18317793309688568, 0.039843447506427765, -0.061407670378685, 0.043514858931303024, -0.044389206916093826, -0.11232539266347885, -0.03863733634352684, -0.19415852427482605, -0.09532199054956436, -0.13689832389354706, -0.007194956764578819, 0.0321468710899353, -0.1297043412923813, -0.20959189534187317, 0.012644125148653984, -0.16689050197601318, 0.04069221019744873, 0.07346412539482117, 0.12438249588012695, -0.028827330097556114, -0.11099559813737869, 0.039480146020650864, 0.0184625256806612, -0.05419651046395302, -0.10238167643547058, -0.002234096173197031, -0.07831373810768127, 0.09553000330924988, 0.3156987726688385, -0.18939466774463654, 0.10573401302099228, 0.15628264844417572, -0.20500123500823975, 0.11482889950275421, 0.036626268178224564, 0.17272624373435974, 0.10435792803764343, -0.18821977078914642, -0.0728302150964737, 0.02913430891931057, -0.23963633179664612, 0.0562116913497448, 0.12546153366565704, -0.06543385237455368, 0.05377759784460068, -0.09310697764158249, 0.11746738851070404, -0.017832471057772636, -0.038033850491046906, 0.17774522304534912, -0.1629222184419632, -0.01245428528636694, 0.08646873384714127, -0.10198657214641571, 0.061771269887685776, 0.2189558893442154, 0.06321030855178833, -0.08060259371995926, 0.007313278038054705, 0.03740754351019859, 0.0375082790851593, -0.18255649507045746, 0.07734134048223495, -0.029019031673669815, 0.14623761177062988, -0.034514106810092926, -0.08655734360218048, 0.007727759890258312, 0.020496351644396782, 0.01032441109418869, -0.0235392265021801, 0.012312745675444603, -0.08328035473823547, 0.09242178499698639, 0.04389534890651703, 0.17951470613479614, -0.18076516687870026, 0.06769207119941711, 0.04318208247423172, -0.01932760700583458, -0.014277374371886253, -0.04916364327073097, 0.05303343012928963, 0.015130892395973206, -0.0807117223739624, 0.03055504895746708, -0.04420934244990349, -0.0001386586664011702, -0.07030174881219864, -0.006906823255121708, 0.06211407855153084, 0.11971103399991989, 0.1775830239057541, 0.1777738779783249, 0.02715516835451126, -0.10962693393230438, -0.03253883868455887, -0.008107537403702736, -0.08663232624530792, 0.1379091590642929, -0.056105196475982666, 0.059031810611486435, -0.024843962863087654, -0.18125717341899872, 0.0005890559987165034, 0.16729924082756042, 0.05038534104824066, -0.0281330905854702, -0.0927572175860405, -0.05836358293890953, -0.08796022087335587, -0.04324179142713547, 0.1329624503850937, 0.15396858751773834, -0.020081687718629837, -0.09191641211509705, -0.08155199140310287, -2.6356320138339026e-32, -0.03589765727519989, 0.2008100152015686, -0.07763871550559998, -0.11348408460617065, -0.07748552411794662, -0.09013092517852783, -0.08088819682598114, -0.014816006645560265, -0.08347543329000473, -0.07506375014781952, -0.06233551353216171, 0.08611072599887848, 0.010079311206936836, -0.0132924048230052, -0.004496783949434757, 0.09445469081401825, 0.024987313896417618, -0.1294410079717636, -0.03635750710964203, -0.08368968963623047, 0.008146507665514946, -0.08345561474561691, 0.22127926349639893, 0.09522490203380585, -0.17813612520694733, 0.11456749588251114, -0.15528109669685364, -0.051966577768325806, 0.11753122508525848, -0.003227116307243705, 0.07988159358501434, 0.02200072444975376, 0.044768668711185455, -0.08298391103744507, -0.00611197529360652, 0.2092820703983307, -0.17497524619102478, 0.06996116787195206, -0.1524600386619568, -0.04001479968428612, 0.04518677294254303, 0.000050546197599032894, 0.05892014876008034, -0.01500122994184494, 0.012108063325285912, 0.15254485607147217, -0.07151571661233902, -0.2165977507829666, 0.030758017674088478, 0.0759333148598671, 0.07824849337339401, -0.06064777821302414, -0.12603838741779327, 0.018374131992459297, 0.11348769068717957, 0.02204783819615841, 0.05184200778603554, 0.3232778310775757, 0.13162918388843536, 0.02512899413704872, 0.014933370985090733, 0.050271134823560715, 0.14314542710781097, -0.12636423110961914, -0.11045480519533157, -0.000001053302639775211, 0.03866403549909592, -0.10515083372592926, 0.06826423853635788, 0.0655374601483345, -0.050258055329322815, -0.0368102602660656, -0.01892612874507904, 0.14734889566898346, -0.035078369081020355, -0.07984275370836258, -0.1118265688419342, 0.04817630350589752, 0.07283026725053787, -0.12652535736560822, -0.06832029670476913, -0.08513173460960388, -0.04264303669333458, -0.05219011753797531, 0.07267285138368607, 0.16473522782325745, 0.022257283329963684, 0.014098946005105972, -0.07312681525945663, 0.08534200489521027, 0.032804038375616074, 0.042666222900152206, 0.0548589825630188, -0.025270923972129822, 0.06347595155239105, 0.02991490438580513, -0.04076782241463661, -0.0775090679526329, -0.06439881026744843, 0.08108293265104294, -0.07107021659612656, 0.07634162157773972, 0.0904843807220459, -0.05250490456819534, 0.1474027931690216, 0.022132156416773796, 0.19842706620693207, 0.07278956472873688, -0.1488621085882187, -0.02299717254936695, 0.05669919773936272, -0.0022022256162017584, 0.21130304038524628, 0.09914864599704742, 0.10287663340568542, 0.022772077471017838, -0.07268422842025757, -0.17002417147159576, 0.03130299597978592, 0.08860666304826736, -0.003566314000636339, -0.17063267529010773, -0.012887253426015377, -0.13996201753616333, 0.06235827878117561, -0.10133058577775955, -0.09938070923089981, -0.11671777069568634, -0.1290110945701599, 0.02244875766336918, -0.08343502879142761, -0.00808568112552166, 7.340206025219231e-7, -0.17269696295261383, 0.16345413029193878, -0.0010256011737510562, -0.011083069257438183, 0.07134678214788437, 0.05463960021734238, -0.19435475766658783, 0.07561267167329788, -0.11444001644849777, 0.09667918086051941, -0.010461636818945408, -0.0863463506102562, -0.006308306474238634, -0.04722583666443825, -0.03758663311600685, -0.037532538175582886, 0.05056806653738022, -0.016244756057858467, -0.0331658236682415, -0.022059958428144455, 0.26179787516593933, 0.2651025354862213, -0.08167436718940735, -0.13440735638141632, 0.1183667927980423, -0.09089802950620651, -0.037742093205451965, 0.035335008054971695, -0.019745061174035072, -0.04910579323768616, -0.03834878280758858, 0.09576638042926788, 0.026051292195916176, 0.04210488498210907, -0.14721006155014038, 0.07917527854442596, -0.08621746301651001, 0.050972189754247665, 0.02330825664103031, 0.06444135308265686, -0.04685334488749504, -0.0369684174656868, -0.013908639550209045, 0.200550839304924, -0.0252161156386137, 0.1820816844701767, -0.07758792489767075, 0.08538351207971573, -0.1806246042251587, 0.039495110511779785, -0.02994794398546219, -0.0447566993534565, 0.19676673412322998, -0.09262754768133163, -0.015318739227950573, 0.01618703454732895, -0.034937988966703415, -0.05837326496839523, 0.020423922687768936, -0.09025193750858307, 0.01272739190608263, -0.005528656300157309, -0.07258094102144241, -0.11398681998252869, 0.11999227851629257, 0.05058719590306282, 0.028426099568605423, 1.7384466310369948e-34, 0.010792271234095097, 0.16574165225028992, 0.117447130382061, -0.023570312187075615, 0.002035990124568343, -0.1212158277630806, 0.10060416162014008, -0.040668684989213943, -0.024240542203187943, -0.17697469890117645, -0.102664053440094 ]
https://github.com/huggingface/datasets/issues/2572
Support Zstandard compressed files
> I just tried on google colab and this works: > > ```python > !pip install zstandard > !pip install datasets > from datasets import load_dataset > > lds = load_dataset( > "json", > data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", > split="train", > streaming=True, > ) > next(iter(lds)) > ``` > > Can you check that you have a correct installation of `zstandard` ? I was downloading datasets first then was doing zstandard installation and that was causing the issue. This was highlighted by the Hugging Face staff and that helped. Now the issue is resolved. Thank you.
Add support for Zstandard compressed files: https://facebook.github.io/zstd/
93
Support Zstandard compressed files Add support for Zstandard compressed files: https://facebook.github.io/zstd/ > I just tried on google colab and this works: > > ```python > !pip install zstandard > !pip install datasets > from datasets import load_dataset > > lds = load_dataset( > "json", > data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", > split="train", > streaming=True, > ) > next(iter(lds)) > ``` > > Can you check that you have a correct installation of `zstandard` ? I was downloading datasets first then was doing zstandard installation and that was causing the issue. This was highlighted by the Hugging Face staff and that helped. Now the issue is resolved. Thank you.
[ -0.06338480859994888, 0.14809384942054749, 0.024947531521320343, 0.012579967267811298, 0.16849254071712494, 0.051100172102451324, 0.013116054236888885, 0.08032086491584778, -0.11370719224214554, 0.06554481387138367, 0.017542868852615356, 0.16539709270000458, -0.03146737813949585, 0.10662300884723663, 0.08550743013620377, 0.02981463447213173, -0.10687486827373505, 0.17271551489830017, 0.0992770865559578, 0.1333470344543457, 0.05479089170694351, 0.13837981224060059, 0.10128612071275711, -0.06114443764090538, 0.09117848426103592, -0.048651598393917084, -0.07682434469461441, -0.012111317366361618, -0.09189221262931824, -0.14214885234832764, 0.10071122646331787, 0.09604240208864212, 0.12851428985595703, 0.10847853124141693, 0.0000054000320233171806, 0.015171537175774574, -0.09593673795461655, 0.06221436709165573, -0.11968918144702911, -0.12182129174470901, 0.24340088665485382, -0.31229111552238464, -0.122006855905056, 0.01688573509454727, -0.019542349502444267, -0.11772488057613373, -0.02698173187673092, -0.0021869007032364607, 0.15570512413978577, 0.04097013548016548, 0.04204616695642471, 0.1875450760126114, -0.026932314038276672, -0.25241297483444214, -0.09791047126054764, 0.08321411907672882, -0.11578832566738129, 0.04465850442647934, -0.214658722281456, 0.04784490540623665, -0.0018023703014478087, -0.04335034266114235, -0.03279866278171539, 0.1170930564403534, -0.18718254566192627, -0.08030375838279724, -0.08257149904966354, -0.19182123243808746, -0.02777182310819626, 0.15325717628002167, 0.21640673279762268, -0.011818916536867619, -0.2654699981212616, -0.029282346367836, 0.0837133601307869, -0.06018742918968201, -0.07885308563709259, 0.12446808815002441, -0.09221905469894409, 0.03208101540803909, -0.047575999051332474, 0.10052690654993057, 0.034754641354084015, 0.033928874880075455, -0.12181778252124786, 0.1174473986029625, -0.15837416052818298, -0.10415047407150269, 0.10253696888685226, -0.13462527096271515, 0.18806467950344086, 0.04963509738445282, 0.029065638780593872, -0.1472194343805313, 0.1372726559638977, -0.004320606589317322, -0.14834482967853546, -0.293435662984848, 0.14010541141033173, -0.03359956294298172, 0.10809572041034698, 0.061920907348394394, 0.029487596824765205, 0.013493482023477554, 0.030855843797326088, 0.07772959023714066, 0.03556036204099655, -0.2062939554452896, 0.12595823407173157, 0.05507645010948181, 0.13687969744205475, 0.140903040766716, -0.1730354130268097, -0.12833638489246368, -0.0996878519654274, 0.05047745257616043, -0.01742716133594513, 0.029493151232600212, 0.03779444098472595, -0.08287204802036285, 0.06337522715330124, 0.09994210302829742, -0.11546516418457031, 0.07868538796901703, 0.11037249863147736, -0.021106582134962082, -0.049912843853235245, 0.19264920055866241, 0.034250300377607346, -0.030269192531704903, -0.016272081062197685, 0.009877071715891361, 0.15753108263015747, 0.009891965426504612, 0.12991169095039368, -0.08743160963058472, 0.032158154994249344, -0.1550297737121582, 0.1280680149793625, 0.11059878021478653, 0.03763687238097191, 0.10040967166423798, -0.050790511071681976, 0.07306899130344391, 0.06397659331560135, 0.03285882994532585, 0.1702612340450287, 0.050090350210666656, -0.12672920525074005, 0.07480210810899734, -0.24081707000732422, 0.1753176599740982, -0.2584773898124695, -0.053673163056373596, -0.1903262734413147, -0.043094463646411896, 0.04547505080699921, -0.21222878992557526, -0.26480036973953247, -0.2876932621002197, -0.06956581026315689, -0.05651092156767845, -0.00595805374905467, -0.02366342954337597, 0.1850624978542328, 0.05268038809299469, -0.19787795841693878, -0.001117687439545989, -0.15049465000629425, -0.17184871435165405, 0.3141545355319977, 0.016689321026206017, -0.051487505435943604, -0.2055315375328064, -0.20412112772464752, 0.2442355751991272, 0.03011166863143444, 0.09460492432117462, -0.2006065994501114, 0.00022629932209383696, 0.10155212134122849, -0.026243828237056732, 0.06538423150777817, -0.05699347332119942, -0.0899803414940834, 0.00047597719822078943, -0.01049056276679039, 0.18285466730594635, 0.05881360173225403, -0.12494003772735596, -0.09796052426099777, -0.15081341564655304, 0.30061712861061096, 0.025364384055137634, -0.03783944994211197, 0.11740121245384216, 0.133909210562706, -0.006501928437501192, 0.038813862949609756, -0.17189891636371613, -0.06650771200656891, -0.10974632203578949, 0.025223972275853157, -0.031787898391485214, 0.14015035331249237, 0.023000208660960197, -0.06212997809052467, 0.03005998767912388, 0.04654298722743988, 0.009357990697026253, -0.13204224407672882, -0.0356859415769577, 0.005970880854874849, -0.16661444306373596, -0.0686718299984932, -0.06251699477434158, -0.013370861299335957, -0.057473767548799515, 0.0003921781899407506, 0.1467893272638321, -0.027994193136692047, 0.06191959232091904, 0.087742879986763, -0.0587087944149971, 0.06958699971437454, 0.11436064541339874, -0.1224081888794899, -0.08211982250213623, 0.08975186944007874, 0.12289335578680038, -0.18687114119529724, -0.03397877886891365, 0.11447113007307053, -0.02777891978621483, -0.09742601960897446, -0.03224584087729454, -0.14218157529830933, -0.0983990803360939, 0.08355500549077988, -0.11629099398851395, 0.03886432200670242, 0.09773855656385422, -0.049844369292259216, 0.09085407853126526, 0.18757693469524384, -0.14148034155368805, -0.008871654979884624, -0.12460798025131226, 0.04825125262141228, 0.06306669116020203, 0.4762629270553589, 0.11933965981006622, -0.1966286450624466, -0.04498264566063881, 0.1013999655842781, -0.006199235562235117, -0.042228564620018005, -0.06794379651546478, 0.11835130304098129, -0.05054933950304985, 0.33647602796554565, -0.09192177653312683, -0.05843439698219299, 0.17298609018325806, 0.11737049371004105, 0.053721681237220764, 0.11141038686037064, -0.035937484353780746, 0.11701180040836334, 0.061843499541282654, 0.14657625555992126, -0.0927378237247467, -0.014651883393526077, -0.07178229093551636, 0.022798914462327957, -0.1307603120803833, 0.17630377411842346, 0.12465856224298477, 0.007573983166366816, 0.05961218476295471, -0.20366476476192474, 0.15204884111881256, -0.024655941873788834, -0.021400993689894676, 0.013390234671533108, -0.0338410921394825, -0.24986843764781952, -0.1514473408460617, 0.014371252618730068, 0.14108072221279144, -0.049158088862895966, 0.058291591703891754, 0.061351384967565536, -0.11690036952495575, 0.005280309822410345, 0.005830537062138319, 0.07817565649747849, 0.07362452149391174, 0.07996507734060287, -0.05928712338209152, -0.20859436690807343, 0.012517531402409077, -0.07374443113803864, -0.021843336522579193, -0.03225244954228401, -0.11208746582269669, 0.016338523477315903, 0.018989233300089836, 0.006657455116510391, -0.14981476962566376, 0.010357600636780262, 0.06804204732179642, -0.05461404100060463, 0.05159943178296089, 0.007891879417002201, 0.012999217957258224, 0.14877080917358398, -0.09990426152944565, 0.1296667903661728, -0.15641528367996216, -0.028394009917974472, 0.041353076696395874, 0.02686776965856552, 0.06254730373620987, -0.1882229745388031, 0.11958164721727371, -0.3421686887741089, -0.19721631705760956, -0.11454719305038452, 0.025718694552779198, -0.00335710565559566, 0.1751513034105301, -0.016001494601368904, -0.004577806685119867, 0.10304313898086548, -0.10498521476984024, -0.1367703527212143, -0.07185853272676468, 0.3636125922203064, -0.0930466577410698, -0.11598923802375793, -0.03428800031542778, 0.024057304486632347, -0.14403116703033447, 0.03470471128821373, -0.0762777328491211, 0.0348086953163147, -0.030990593135356903, -0.029306188225746155, -0.09048237651586533, -0.0504329614341259, 0.12614662945270538, 0.19948776066303253, -0.15107369422912598, -0.059952300041913986, -0.08286217600107193, -0.020865602418780327, 0.1806739717721939, 0.17740020155906677, 0.09034312516450882, 0.09762364625930786, 0.1617763489484787, 0.04075736179947853, -0.07077666372060776, -0.1374545693397522, 0.1952543705701828, 0.096330925822258, 0.1850004494190216, 0.013723442330956459, -0.02865421772003174, -0.019144997000694275, -0.07211628556251526, 0.15087424218654633, 0.0979812890291214, 0.07959049195051193, -0.01977163553237915, -0.09725108742713928, -0.10054030269384384, 0.1002739742398262, 0.12843838334083557, -0.11677984148263931, -0.18926097452640533, -0.09430239349603653, -0.10229793190956116, -0.04350462555885315, -0.04635506495833397, -0.07053159177303314, 0.05643877387046814, -0.1218290627002716, 0.11465580016374588, 0.06831724941730499, 0.10867321491241455, -0.013205763883888721, -0.04745166003704071, 0.0804789736866951, -0.07353676110506058, 0.13473792374134064, -0.11552782356739044, -0.0009830654598772526, 0.026504477486014366, 0.10077066719532013, 0.05333215370774269, -0.00047957850620150566, -0.039960023015737534, 0.028419308364391327, 0.13808299601078033, 0.05566972866654396, -0.13341666758060455, -0.005141752772033215, -0.05967557430267334, 0.0005350444698706269, 0.035552434623241425, -0.07239080965518951, 0.06581238657236099, 0.03585001826286316, 0.004835986532270908, 0.17607739567756653, 0.04530887305736542, -0.01799394190311432, -0.16337302327156067, -0.1343868523836136, -0.23300591111183167, 0.14288949966430664, 0.0726168230175972, -0.0646299198269844, -0.03787203133106232, -0.033855948597192764, -0.07331676036119461, 0.22436334192752838, 0.0006637145415879786, 0.14641012251377106, -0.025685779750347137, -0.06731709092855453, 0.05268329009413719, -0.00950256735086441, 0.05822303146123886, 0.23532064259052277, 0.08024352043867111, -0.210439994931221, 0.08440138399600983, -0.07019085437059402, 0.026897575706243515, 0.005768839735537767, -0.12265198677778244, -0.053526896983385086, -0.17352132499217987, -0.12153924256563187, -0.12228251993656158, -0.011539715342223644, 0.028197117149829865, -0.1514710932970047, -0.21078893542289734, 0.019198251888155937, -0.22119489312171936, 0.07446301728487015, 0.09790214151144028, 0.10090526193380356, -0.06393412500619888, -0.11358228325843811, 0.05596090853214264, -0.007989870384335518, -0.057831939309835434, -0.10822410881519318, -0.02360321395099163, -0.0768711045384407, 0.100489042699337, 0.32730716466903687, -0.18677189946174622, 0.06908674538135529, 0.17256207764148712, -0.1649153083562851, 0.1448543667793274, 0.013428385369479656, 0.17433679103851318, 0.14723260700702667, -0.14851006865501404, -0.08084630221128464, 0.016716694459319115, -0.2188108265399933, 0.02089523710310459, 0.15252742171287537, -0.08307309448719025, 0.05311514437198639, -0.10847024619579315, 0.08905290812253952, 0.0025481125339865685, -0.03493703529238701, 0.14780563116073608, -0.18213017284870148, 0.01622137241065502, 0.10613773763179779, -0.10185567289590836, 0.07322712987661362, 0.17544466257095337, 0.10750559717416763, -0.09813842177391052, -0.010143476538360119, 0.05369352549314499, 0.05713631212711334, -0.15702499449253082, 0.0638531893491745, -0.051046304404735565, 0.15311691164970398, 0.0020137825049459934, -0.07280044257640839, -0.03762601688504219, 0.05394160374999046, 0.009144682437181473, -0.015098035335540771, 0.02550037018954754, -0.04565489664673805, 0.09586801379919052, 0.05784846469759941, 0.11254140734672546, -0.1739569902420044, 0.06178995221853256, 0.01228201575577259, -0.011419947259128094, 0.005311833694577217, -0.03745581954717636, 0.0533648245036602, 0.028016777709126472, -0.0947081670165062, 0.018652180209755898, -0.029798701405525208, 0.02813848666846752, -0.05917927995324135, -0.007195306476205587, 0.08896530419588089, 0.11990644037723541, 0.14018258452415466, 0.22956067323684692, 0.042281366884708405, -0.1366838961839676, -0.04198099300265312, -0.0013369462685659528, -0.04258180037140846, 0.10223174095153809, -0.05172550305724144, 0.05659748241305351, -0.01850420981645584, -0.19019684195518494, -0.050309423357248306, 0.14474935829639435, 0.07945997267961502, -0.013476010411977768, -0.06848645955324173, -0.08035267889499664, -0.08806364238262177, -0.08168379217386246, 0.12460054457187653, 0.12447942048311234, 0.006658834405243397, -0.0690862163901329, -0.053516071289777756, -2.5804663578234003e-32, -0.03691134229302406, 0.18168064951896667, -0.10070246458053589, -0.08010828495025635, -0.1464439183473587, -0.045352526009082794, -0.08761332929134369, -0.0420152023434639, -0.07656586915254593, -0.09412848204374313, -0.049845337867736816, 0.11929350346326828, 0.025418587028980255, 0.023741846904158592, 0.013659453950822353, 0.017149409279227257, 0.0071641565300524235, -0.13201136887073517, -0.031239254400134087, -0.0891992598772049, 0.001691571669653058, -0.09196113795042038, 0.17334693670272827, 0.10880386084318161, -0.1681448519229889, 0.14107248187065125, -0.18255245685577393, -0.07093720138072968, 0.1173020601272583, -0.009651880711317062, 0.08289976418018341, 0.007576272822916508, 0.03307413309812546, -0.07531261444091797, -0.03647791966795921, 0.17509907484054565, -0.18648549914360046, 0.05443873628973961, -0.17734992504119873, -0.04586217552423477, 0.0300816148519516, 0.011608102358877659, 0.066627636551857, -0.008733175694942474, 0.031037215143442154, 0.12592872977256775, -0.08187594264745712, -0.18112002313137054, 0.007587493862956762, 0.07232256978750229, 0.047808174043893814, -0.015665849670767784, -0.09899142384529114, 0.029627738520503044, 0.13374091684818268, 0.01508376281708479, 0.07270988076925278, 0.27867400646209717, 0.1269795149564743, 0.023706641048192978, 0.05576207861304283, 0.024455558508634567, 0.11720772832632065, -0.0982968732714653, -0.1001550555229187, -0.015902204439044, 0.13077640533447266, -0.10366314649581909, 0.09094622731208801, 0.030158665031194687, -0.03952912613749504, 0.0004734493268188089, -0.04407264292240143, 0.12190727889537811, -0.08991657197475433, -0.08433660864830017, -0.08569148182868958, 0.007794925011694431, 0.034777961671352386, -0.16614168882369995, -0.05686170235276222, -0.07764052599668503, -0.043863747268915176, -0.09972481429576874, 0.07592088729143143, 0.18012498319149017, 0.029079560190439224, 0.025490622967481613, -0.09055335074663162, 0.1003638431429863, -0.016558624804019928, 0.042441412806510925, 0.03825836628675461, -0.06982433050870895, 0.036233145743608475, 0.030182208865880966, -0.02965685725212097, -0.05651572346687317, -0.07845721393823624, 0.06565991789102554, -0.07576528936624527, 0.041530586779117584, 0.08665179461240768, -0.027015257626771927, 0.16741518676280975, 0.03787197545170784, 0.18785592913627625, 0.07311791926622391, -0.17578953504562378, -0.021673832088708878, 0.059794455766677856, -0.027687812224030495, 0.20677192509174347, 0.11703503876924515, 0.15809106826782227, -0.01259951014071703, -0.08632837235927582, -0.15632474422454834, 0.05325457453727722, 0.10178712010383606, -0.021100981160998344, -0.17956094443798065, -0.0162653811275959, -0.10308130085468292, 0.046679090708494186, -0.10079628974199295, -0.1387881189584732, -0.16917645931243896, -0.11179538816213608, 0.0296519473195076, -0.0960361510515213, -0.05633114278316498, 7.349404427259287e-7, -0.2031850665807724, 0.19704633951187134, 0.0373934768140316, -0.02700018137693405, 0.0954151600599289, 0.05757450312376022, -0.16572782397270203, 0.0657811090350151, -0.1122409924864769, 0.14565643668174744, 0.02907469868659973, -0.07399018108844757, -0.010082850232720375, -0.04949237033724785, -0.02871471829712391, -0.049848876893520355, 0.03861912339925766, -0.015436508692800999, -0.030347807332873344, -0.011691371910274029, 0.2223297357559204, 0.2518080770969391, -0.0523889884352684, -0.11961726099252701, 0.15731962025165558, -0.0970485582947731, -0.07930126041173935, 0.0728674829006195, -0.05767829343676567, -0.044659171253442764, -0.08673271536827087, 0.09294594079256058, 0.022704966366291046, 0.07304506748914719, -0.15563003718852997, 0.04625226557254791, -0.08260170370340347, -0.0005136409890837967, 0.05280062556266785, 0.10695962607860565, -0.05314267799258232, -0.02348475344479084, -0.03283247351646423, 0.18335378170013428, 0.021616239100694656, 0.17125996947288513, -0.11771245300769806, 0.09019900113344193, -0.17464028298854828, 0.016862420365214348, -0.03999877721071243, -0.0005218244041316211, 0.19939427077770233, -0.061339277774095535, -0.022636907175183296, 0.008625559508800507, -0.05322812870144844, -0.06167927011847496, 0.035575177520513535, -0.09424950182437897, 0.032703839242458344, -0.02073514275252819, -0.0552162267267704, -0.06413314491510391, 0.14165563881397247, 0.005796140991151333, 0.0008754206937737763, 2.048031435425276e-34, -0.00805054884403944, 0.15790346264839172, 0.1111607775092125, -0.05485338345170021, 0.048023875802755356, -0.11126641929149628, 0.12214378267526627, -0.04737788811326027, 0.01985201984643936, -0.14127160608768463, -0.11011441051959991 ]
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.051300689578056335, -0.027717797085642815, 0.06509498506784439, -0.011708700098097324, 0.24689511954784393, 0.032208461314439774, -0.07048328965902328, -0.0190046988427639, 0.016614174470305443, 0.10262353718280792, 0.09951581805944443, -0.012298285029828548, 0.11800510436296463, -0.14191003143787384, 0.07475417107343674, 0.06291468441486359, -0.12463093549013138, 0.053337547928094864, -0.124707892537117, -0.06677024066448212, -0.02950742468237877, 0.043575771152973175, -0.03902893513441086, 0.035945601761341095, 0.02182231843471527, -0.06367097795009613, -0.06307081133127213, 0.13774846494197845, 0.07436880469322205, -0.2115006148815155, 0.006186110433191061, 0.11700878292322159, 0.0528443343937397, 0.11435682326555252, 0.0000057873344303516205, -0.023711463436484337, 0.045149728655815125, -0.032797105610370636, -0.06646087020635605, -0.06509819626808167, 0.14294925332069397, 0.01335808914154768, 0.017556222155690193, 0.03981956094503403, -0.08936590701341629, -0.09542486071586609, -0.2807624936103821, 0.07464052736759186, 0.02467847801744938, 0.03262457251548767, 0.028270306065678596, 0.12717337906360626, 0.006159944925457239, -0.06918715685606003, -0.009827807545661926, -0.14220528304576874, 0.016444528475403786, 0.16743488609790802, -0.23318782448768616, -0.09929023683071136, -0.03906543180346489, -0.16699054837226868, 0.017392391338944435, -0.0021800086833536625, -0.08325143158435822, -0.12074173986911774, -0.041187893599271774, -0.10420315712690353, -0.02502712607383728, 0.12682753801345825, -0.07482222467660904, 0.07805777341127396, 0.015139047056436539, 0.01563965529203415, 0.15168896317481995, -0.06474754214286804, 0.024209195747971535, 0.009624360129237175, -0.08510605245828629, 0.18798044323921204, -0.11623481661081314, -0.0023873362224549055, 0.062238629907369614, -0.15990209579467773, 0.007964645512402058, 0.012783701531589031, -0.0037421775050461292, 0.1719970554113388, 0.1714034229516983, -0.0007437490858137608, -0.0019649553578346968, -0.0663277804851532, 0.011487270705401897, 0.006685318890959024, 0.030255718156695366, -0.009965652599930763, 0.08272642642259598, 0.11336282640695572, 0.10858244448900223, -0.09864349663257599, 0.04062672331929207, 0.0033639392349869013, -0.1685493290424347, 0.07157712429761887, -0.04108473286032677, 0.12403172254562378, -0.05184630677103996, -0.1866190880537033, 0.07186716049909592, 0.1286161243915558, -0.01042209006845951, 0.08692514151334763, -0.16930188238620758, -0.022164173424243927, 0.22675099968910217, -0.09299277514219284, -0.0032974453642964363, 0.14895716309547424, 0.022517049685120583, -0.05065223202109337, 0.18620194494724274, -0.0774618461728096, 0.061212170869112015, 0.05860346555709839, -0.02299490012228489, 0.15507139265537262, -0.05982128158211708, 0.055629927664995193, -0.06087718531489372, -0.1497795581817627, -0.10738960653543472, -0.06737296283245087, -0.12841732800006866, 0.010266507044434547, 0.10645005851984024, -0.11408893764019012, 0.07191918790340424, 0.021625284105539322, 0.09003147482872009, -0.025245685130357742, 0.12922360002994537, -0.13903610408306122, -0.07154597342014313, 0.10662422329187393, -0.022497719153761864, 0.0990830808877945, 0.181399866938591, 0.04749931022524834, 0.01405858900398016, -0.055902253836393356, -0.16010037064552307, 0.1004214733839035, -0.002092903247103095, -0.004957437980920076, -0.12447447329759598, -0.003819286124780774, -0.1676105260848999, 0.055887192487716675, -0.10135718435049057, 0.0759081244468689, -0.019144438207149506, 0.1359744668006897, -0.008831504732370377, 0.06814004480838776, 0.14390838146209717, 0.03343052789568901, -0.14029575884342194, -0.05659140646457672, -0.012216135859489441, -0.025853855535387993, 0.07476571947336197, 0.06703435629606247, -0.13866282999515533, 0.26754096150398254, -0.11080069094896317, 0.029068665578961372, -0.021365860477089882, 0.053106047213077545, -0.1683640480041504, -0.14825189113616943, 0.0820394977927208, 0.04929377883672714, -0.045341312885284424, -0.18914563953876495, -0.19581104815006256, -0.08595327287912369, -0.09210015833377838, 0.06803712993860245, -0.05328303575515747, 0.017035316675901413, -0.015336550772190094, -0.018721245229244232, -0.0509425587952137, -0.08750057220458984, 0.03458286449313164, 0.04449039697647095, -0.1586407572031021, -0.021807076409459114, -0.03821764513850212, -0.17560580372810364, 0.15043452382087708, 0.02171178348362446, 0.049414534121751785, -0.01005505584180355, 0.03937983885407448, -0.12317362427711487, -0.10392608493566513, 0.12218257039785385, 0.09693406522274017, -0.054920002818107605, -0.03385462611913681, 0.15006427466869354, -0.024869007989764214, -0.19288289546966553, -0.14213110506534576, -0.02269439958035946, -0.03440552204847336, -0.14723360538482666, -0.11009638756513596, 0.17028647661209106, -0.2614973187446594, -0.04149002581834793, -0.13072983920574188, 0.09115412086248398, -0.004957844037562609, -0.004967996384948492, 0.059645876288414, -0.053769081830978394, -0.0708349198102951, 0.020037250593304634, 0.023310823366045952, -0.08162683993577957, 0.11883119493722916, 0.06403950601816177, -0.0576404370367527, -0.02137746661901474, 0.0951460674405098, -0.1991708129644394, 0.107161745429039, 0.06776072084903717, -0.05353812873363495, 0.04698127135634422, -0.03930101916193962, 0.012670407071709633, 0.06566870212554932, 0.031869418919086456, 0.01127693708986044, 0.002088222187012434, 0.18070338666439056, -0.08783842623233795, 0.30517739057540894, 0.06775034964084625, 0.04346725717186928, -0.028497081249952316, -0.06465867906808853, -0.02430962584912777, 0.04917755722999573, 0.07999642193317413, -0.04343210533261299, -0.14527295529842377, 0.10468529909849167, 0.06362481415271759, 0.0020274450071156025, 0.05563092231750488, -0.02181130461394787, -0.032656680792570114, -0.09104909747838974, -0.26135703921318054, 0.29469379782676697, 0.13613469898700714, 0.018239235505461693, -0.17423675954341888, 0.004474913235753775, -0.05211089551448822, -0.07437039166688919, -0.1005338728427887, 0.04838354140520096, -0.020956946536898613, -0.033338528126478195, 0.02051190659403801, -0.14050604403018951, 0.03709225356578827, 0.06791289895772934, -0.12454736232757568, 0.06230682507157326, 0.23981688916683197, 0.060373950749635696, 0.03438885137438774, -0.2006908506155014, -0.1880142241716385, 0.01646130159497261, 0.04157446697354317, -0.002162853954359889, -0.09869963675737381, 0.02530146948993206, 0.003816136159002781, 0.17299218475818634, 0.18141712248325348, 0.13316230475902557, 0.11909248679876328, -0.16176734864711761, 0.1370665282011032, -0.0698946937918663, 0.021192485466599464, -0.11086265742778778, -0.07100307941436768, -0.060442328453063965, -0.003906753845512867, -0.07583270967006683, 0.08203519135713577, -0.0824713185429573, 0.03630845621228218, -0.10658741742372513, 0.06344465911388397, -0.0059176282957196236, 0.12219639867544174, 0.01808536984026432, -0.18679264187812805, 0.11199039220809937, 0.014664625748991966, 0.10271535068750381, 0.10944334417581558, 0.03933541476726532, 0.03633091598749161, -0.02565206028521061, -0.0989951491355896, -0.029275156557559967, 0.03818387910723686, -0.1073630079627037, -0.05032937973737717, -0.04911128804087639, 0.023321516811847687, 0.08893515169620514, 0.07501551508903503, -0.0746975988149643, 0.07577940821647644, 0.014420873485505581, -0.2922534644603729, 0.2353738397359848, 0.010820109397172928, -0.028358539566397667, -0.049877118319272995, 0.004461977165192366, 0.0958116352558136, -0.0006652811425738037, -0.06785017997026443, -0.016175484284758568, -0.0024177245795726776, -0.013820928521454334, 0.1382085531949997, 0.09036876261234283, -0.17723609507083893, -0.10938107222318649, -0.04348982498049736, -0.08034349977970123, 0.01125419046729803, 0.06368047744035721, -0.05971810594201088, 0.07033005356788635, -0.1942138820886612, 0.08803101629018784, -0.24282146990299225, 0.08462999016046524, 0.06201908737421036, -0.11466583609580994, 0.09109687060117722, 0.10945755243301392, 0.060394108295440674, -0.07285326719284058, -0.025637824088335037, -0.005234051495790482, 0.08123783767223358, 0.054244428873062134, 0.021391194313764572, -0.0401514396071434, -0.09306517243385315, -0.023421648889780045, -0.15211741626262665, 0.18700700998306274, 0.029512519016861916, -0.08797827363014221, -0.018794221803545952, -0.1317613124847412, 0.0324576199054718, 0.051657598465681076, -0.007956965826451778, -0.08215735852718353, 0.09293583780527115, 0.005246038548648357, 0.0006568278768099844, -0.07861743122339249, -0.12404391914606094, 0.214769184589386, -0.10059529542922974, -0.08405760675668716, -0.16052773594856262, 0.061024535447359085, 0.05695418268442154, -0.06794038414955139, 0.16979670524597168, 0.10482281446456909, 0.008162049576640129, 0.15652433037757874, 0.05106974393129349, -0.098766028881073, 0.07824423909187317, -0.004167560487985611, -0.08378239721059799, -0.05473795905709267, -0.09937259554862976, 0.2680336833000183, 0.09688853472471237, -0.05217676982283592, -0.0005194008117541671, 0.009159919805824757, -0.06704709678888321, -0.15171681344509125, -0.08954090625047684, -0.1924314796924591, -0.10846294462680817, -0.09755342453718185, -0.10839827358722687, -0.04433538392186165, 0.17586371302604675, -0.012095012702047825, 0.08788622915744781, 0.08201272040605545, -0.13417193293571472, 0.27303609251976013, 0.021396446973085403, -0.0750049576163292, 0.10538296401500702, 0.05345432087779045, 0.15690717101097107, 0.05686251074075699, 0.024163128808140755, 0.23667381703853607, 0.002142655896022916, -0.09450351446866989, 0.05113149806857109, -0.012158558703958988, -0.12669473886489868, 0.19564378261566162, 0.0076760705560445786, 0.0304423701018095, 0.08729108422994614, -0.07048102468252182, -0.1303161233663559, 0.1636047214269638, -0.07867085188627243, -0.11841040849685669, -0.13057446479797363, 0.01524159125983715, -0.036540959030389786, -0.012626443058252335, 0.03037608414888382, 0.05302562564611435, 0.03785422816872597, 0.05689249560236931, 0.07321944832801819, 0.016109725460410118, -0.0139319384470582, -0.24318119883537292, -0.004636480938643217, 0.014407501555979252, 0.1855059266090393, 0.06651698797941208, -0.011082303710281849, 0.024173831567168236, 0.03305874392390251, -0.12797142565250397, 0.06916866451501846, 0.03983817249536514, -0.09599247574806213, 0.10917632281780243, 0.03270804509520531, 0.21411804854869843, 0.05279327183961868, -0.21216166019439697, -0.11225077509880066, 0.10294445604085922, 0.054550573229789734, 0.05580039322376251, -0.17292480170726776, -0.0033219745382666588, 0.08907998353242874, 0.08424894511699677, -0.06257428973913193, -0.23027248680591583, 0.030083071440458298, 0.06926261633634567, 0.15065541863441467, 0.01767817698419094, 0.2100323885679245, 0.0675165206193924, 0.14594291150569916, 0.08354578912258148, -0.0027171606197953224, 0.0049966261722147465, 0.2878095805644989, 0.08771725744009018, -0.0862816870212555, 0.03195856884121895, -0.053674280643463135, 0.012365881353616714, -0.16968880593776703, 0.16304729878902435, 0.11636119335889816, 0.14368699491024017, 0.003813557792454958, -0.07705581933259964, 0.10252726078033447, -0.035512469708919525, -0.12344778329133987, -0.07504203170537949, -0.06524964421987534, -0.061314426362514496, 0.10551804304122925, 0.1907050609588623, 0.24573369324207306, 0.0780390202999115, -0.02742978371679783, 0.08065018057823181, 0.012337878346443176, 0.05017627030611038, 0.10750527679920197, -0.08491946011781693, -0.05482644587755203, 0.20628824830055237, -0.01867862418293953, -0.11386800557374954, 0.16073183715343475, 0.10952240228652954, 0.006660824175924063, 0.017888478934764862, -0.03299073129892349, 0.2665254771709442, -0.2068227231502533, -0.015653938055038452, -0.010773643851280212, 0.053545136004686356, -0.08959092944860458, 0.11244382709264755, 0.1377040296792984, 0.04793308302760124, 0.017074666917324066, 0.06804493814706802, -0.2090529501438141, -0.04926609620451927, -0.14064912497997284, 0.10033680498600006, 0.05783582478761673, -0.026972483843564987, 0.073099784553051, 0.17951804399490356, -2.701795888864286e-32, -0.03819733485579491, 0.06694594770669937, -0.05960123613476753, 0.0862007662653923, -0.09938948601484299, 0.08694137632846832, -0.05365046113729477, -0.025241946801543236, -0.020401667803525925, -0.006193800363689661, -0.12020890414714813, -0.03964387625455856, 0.06630777567625046, -0.1447303146123886, -0.0922916829586029, 0.07730035483837128, 0.00004494913810049184, -0.027092786505818367, -0.20271199941635132, 0.09399694949388504, -0.16568101942539215, 0.04550279676914215, -0.05278570577502251, 0.10987941175699234, -0.042064469307661057, -0.01853202097117901, -0.12029610574245453, 0.023143498227000237, 0.04029948636889458, 0.03389020636677742, -0.21313610672950745, -0.0568661205470562, -0.03424272686243057, -0.030225032940506935, -0.10704314708709717, -0.054375577718019485, -0.06052083894610405, -0.19323065876960754, 0.1330288201570511, 0.07325643301010132, -0.08406217396259308, 0.1015443354845047, -0.026586929336190224, -0.027417276054620743, -0.07283568382263184, 0.12210825830698013, 0.05166694521903992, 0.05736902356147766, -0.09234440326690674, -0.06685704737901688, 0.1360659897327423, -0.023207174614071846, 0.09821487218141556, -0.09840241819620132, 0.11895040422677994, -0.2182026505470276, 0.06845486909151077, 0.05908560752868652, 0.04240086302161217, -0.1956331580877304, -0.06431804597377777, -0.05780470371246338, -0.07916481047868729, 0.11755260825157166, 0.1404840350151062, 0.12328654527664185, 0.3504568338394165, 0.10399512946605682, 0.07804702967405319, -0.274891197681427, 0.07720937579870224, -0.08794683963060379, -0.09312640875577927, -0.031522464007139206, -0.14605671167373657, 0.03276806324720383, -0.1734948754310608, -0.06148018687963486, 0.2041633278131485, 0.055779483169317245, 0.10853148251771927, 0.06440059840679169, 0.06028703227639198, -0.0036948551423847675, -0.12233384698629379, -0.12726204097270966, -0.1225266382098198, 0.07820816338062286, -0.1715170294046402, 0.10343167185783386, 0.024740198627114296, 0.07718709111213684, -0.24724216759204865, -0.020514288917183876, -0.05809734761714935, -0.05424883961677551, 0.013116572983562946, -0.060866210609674454, 0.03211979940533638, 0.04850523918867111, 0.10671812295913696, -0.10002873837947845, 0.10806182771921158, 0.11064662784337997, 0.049306340515613556, 0.18297043442726135, 0.272868812084198, 0.09710102528333664, -0.08554040640592575, -0.03343385457992554, -0.10611587017774582, 0.10694211721420288, 0.15151984989643097, 0.18515530228614807, 0.09464211016893387, -0.05954990163445473, -0.07531557977199554, 0.02528771571815014, -0.025415997952222824, 0.3073139488697052, -0.12164759635925293, 0.08516200631856918, 0.057792291045188904, 0.1521805375814438, -0.25743159651756287, -0.038523729890584946, -0.0929439440369606, 0.2306486964225769, -0.02548305317759514, -0.08976001292467117, -0.020210133865475655, -0.13550764322280884, 7.551020075879933e-7, -0.06792047619819641, 0.20319850742816925, 0.08120791614055634, -0.1357368528842926, -0.06695626676082611, 0.07049904763698578, -0.22582142055034637, 0.10312732309103012, 0.10726169496774673, 0.18890661001205444, -0.054521333426237106, 0.062064241617918015, -0.06628798693418503, -0.09517539292573929, -0.016990894451737404, -0.16313627362251282, -0.08354790508747101, -0.09603916853666306, -0.16919700801372528, 0.029234573245048523, -0.07190847396850586, 0.0893062949180603, -0.010141739621758461, 0.002407068619504571, 0.01598185859620571, -0.04923052713274956, 0.031391438096761703, -0.012844516895711422, -0.031576529145240784, -0.0159780103713274, 0.1204347312450409, -0.09702464938163757, -0.16294968128204346, 0.1295011192560196, 0.07231242954730988, 0.13723328709602356, -0.1298549771308899, -0.10233300179243088, -0.006469150073826313, -0.06310044974088669, 0.07289092242717743, 0.03143220394849777, 0.003222990082576871, -0.04760364443063736, 0.02798294834792614, 0.012820742093026638, -0.10247820615768433, 0.015484717674553394, -0.10805120319128036, -0.0821303054690361, 0.1489865779876709, 0.043517641723155975, -0.007566316518932581, 0.19884392619132996, 0.04935969412326813, 0.11877620965242386, -0.10851271450519562, -0.20974546670913696, 0.16600972414016724, -0.23453840613365173, 0.017053550109267235, -0.23431739211082458, 0.015373563393950462, 0.014936940744519234, -0.13413821160793304, -0.2007816731929779, 0.13244812190532684, 1.4636790739239824e-34, 0.06721717119216919, -0.16173002123832703, 0.0026998829562216997, -0.3214719891548157, 0.044054221361875534, -0.08783514052629471, 0.14706380665302277, 0.044384460896253586, 0.023260876536369324, -0.2788066565990448, -0.12232273072004318 ]
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.04090658202767372, -0.022075049579143524, 0.07577769458293915, -0.004850491881370544, 0.22695939242839813, 0.04337943717837334, -0.08893273025751114, -0.0237675029784441, 0.029468802735209465, 0.11188219487667084, 0.09277281910181046, -0.012840370647609234, 0.12775199115276337, -0.13935339450836182, 0.0836733803153038, 0.06882037967443466, -0.1330634206533432, 0.05829956755042076, -0.10836023837327957, -0.06333110481500626, -0.04051031172275543, 0.04374836012721062, -0.03663695231080055, 0.029354047030210495, 0.06050623208284378, -0.05701127275824547, -0.05881890282034874, 0.14717258512973785, 0.06742303818464279, -0.2327946573495865, 0.014593550004065037, 0.10509961098432541, 0.04705594852566719, 0.10238981992006302, 0.000005822554157930426, -0.014567675068974495, 0.022497454658150673, -0.02635936811566353, -0.06007053330540657, -0.05459029600024223, 0.1268761157989502, 0.05485811457037926, 0.029461218044161797, 0.04204266145825386, -0.07323695719242096, -0.056303929537534714, -0.2753896415233612, 0.04650087282061577, -0.011181050911545753, 0.025839846581220627, 0.030615853145718575, 0.14964990317821503, 0.007481666281819344, -0.06646270304918289, 0.008350389078259468, -0.13239379227161407, 0.00672312593087554, 0.21647869050502777, -0.23529262840747833, -0.07916255295276642, -0.029937680810689926, -0.15262335538864136, 0.0007422950002364814, 0.024988284334540367, -0.06321941316127777, -0.12977229058742523, -0.03478926792740822, -0.09981942176818848, -0.0068200938403606415, 0.13021977245807648, -0.06702776253223419, 0.06050729751586914, 0.025180278345942497, 0.020261209458112717, 0.15919005870819092, -0.08465582132339478, 0.030648253858089447, -0.010911892168223858, -0.07532257586717606, 0.17944692075252533, -0.09578439593315125, -0.0045736562460660934, 0.05956554785370827, -0.14976069331169128, 0.020763255655765533, 0.026469122618436813, 0.0057336254976689816, 0.16541646420955658, 0.15819941461086273, -0.014352040365338326, -0.004948952700942755, -0.09564729779958725, 0.007733885198831558, 0.021681183949112892, 0.059842970222234726, -0.020921969786286354, 0.09276869893074036, 0.12071840465068817, 0.126943901181221, -0.1077076867222786, 0.05284477397799492, 0.035164881497621536, -0.1841360181570053, 0.07773688435554504, -0.04372970387339592, 0.10350748896598816, -0.04494139924645424, -0.22827059030532837, 0.09318803995847702, 0.13330595195293427, 0.006654575001448393, 0.07615496963262558, -0.14690138399600983, -0.016738520935177803, 0.21089714765548706, -0.09577282518148422, -0.002438923576846719, 0.16778826713562012, 0.007783410605043173, -0.07298264652490616, 0.17245998978614807, -0.0742248147726059, 0.038194794207811356, 0.057898636907339096, -0.040373217314481735, 0.1770516037940979, -0.08292180299758911, 0.0540960356593132, -0.05553597956895828, -0.1413358747959137, -0.1044149100780487, -0.06584013998508453, -0.11044985800981522, 0.029513539746403694, 0.10428699851036072, -0.13029925525188446, 0.08197149634361267, 0.03618144616484642, 0.0801151841878891, -0.03961216285824776, 0.13914422690868378, -0.1338748037815094, -0.08491698652505875, 0.0973622128367424, -0.009021797217428684, 0.09361838549375534, 0.156206876039505, 0.050361622124910355, -0.00917602889239788, -0.06635018438100815, -0.1784386932849884, 0.09075131267309189, -0.014284871518611908, -0.0015461344737559557, -0.10789820551872253, -0.020472191274166107, -0.19198401272296906, 0.08642181754112244, -0.10439417511224747, 0.08075752854347229, -0.024468054994940758, 0.12133616209030151, -0.0393080934882164, 0.059798941016197205, 0.1542920619249344, 0.04724457859992981, -0.1443939059972763, -0.042397286742925644, 0.01576140895485878, -0.034408729523420334, 0.07460854947566986, 0.033087316900491714, -0.13286957144737244, 0.26697012782096863, -0.09516890347003937, 0.0428759939968586, 0.0031958813779056072, 0.01769287697970867, -0.13265086710453033, -0.1417066901922226, 0.0887046530842781, 0.0723467692732811, -0.033493708819150925, -0.20450027287006378, -0.1995575726032257, -0.07234084606170654, -0.02341165952384472, 0.06989629566669464, -0.03101511485874653, 0.02047770470380783, -0.019538702443242073, -0.008588326163589954, -0.07943876832723618, -0.0688311830163002, 0.016991309821605682, 0.04398046061396599, -0.16011595726013184, -0.06134726479649544, -0.007231439463794231, -0.14565564692020416, 0.17540128529071808, 0.022055232897400856, 0.06052079424262047, 0.0014055796200409532, 0.025888415053486824, -0.1276163011789322, -0.0975193902850151, 0.10752277076244354, 0.13556452095508575, -0.06125858798623085, -0.011966925114393234, 0.1511785387992859, -0.023802487179636955, -0.18599846959114075, -0.15849705040454865, -0.004254926927387714, -0.0456748828291893, -0.13744956254959106, -0.09953776746988297, 0.17796620726585388, -0.2650753855705261, -0.029125744476914406, -0.15187156200408936, 0.0938534215092659, 0.0036021838895976543, -0.007880756631493568, 0.05113237723708153, -0.07642890512943268, -0.07389222830533981, 0.003040539799258113, 0.02900206856429577, -0.07952938228845596, 0.1174241229891777, 0.08652866631746292, -0.06238254904747009, -0.009657797403633595, 0.09950541704893112, -0.2194271981716156, 0.1087433248758316, 0.0936550498008728, -0.04611210525035858, 0.012744300998747349, -0.03356628865003586, 0.03549320623278618, 0.06814558058977127, 0.05559903755784035, 0.014944776892662048, -0.011614350602030754, 0.1858443319797516, -0.09509498625993729, 0.27553534507751465, 0.06676178425550461, 0.05235734581947327, -0.04406169056892395, -0.053303055465221405, -0.02855026349425316, 0.0651889368891716, 0.05269509553909302, -0.05696370080113411, -0.11647072434425354, 0.11335232108831406, 0.09260550886392593, 0.0020885737612843513, 0.059476688504219055, -0.02983798086643219, -0.027424337342381477, -0.08830475062131882, -0.2521968185901642, 0.305719256401062, 0.14697644114494324, 0.043745625764131546, -0.15079914033412933, 0.006133679300546646, -0.054525211453437805, -0.0809694230556488, -0.11861231923103333, 0.016525907441973686, -0.00478914612904191, -0.008935004472732544, 0.007298847194761038, -0.1395178735256195, 0.05354377627372742, 0.07503744959831238, -0.11124759167432785, 0.06553559750318527, 0.22476314008235931, 0.04823729395866394, 0.02678796648979187, -0.20472785830497742, -0.17644698917865753, -0.009365296922624111, 0.028107333928346634, 0.00037628921563737094, -0.08359872549772263, 0.05277979001402855, -0.022769112139940262, 0.14217986166477203, 0.17822027206420898, 0.11894700676202774, 0.10722362250089645, -0.1351185142993927, 0.1514052450656891, -0.07222917675971985, 0.025855213403701782, -0.11319148540496826, -0.05351445823907852, -0.05511607229709625, -0.0015750983729958534, -0.1138334572315216, 0.07563749700784683, -0.08108758181333542, 0.04101615771651268, -0.08282271027565002, 0.07098711282014847, -0.01574087142944336, 0.11848659068346024, 0.011122679337859154, -0.15560615062713623, 0.1019761711359024, 0.027385884895920753, 0.09697502851486206, 0.07279708981513977, 0.0399935245513916, 0.0400635190308094, -0.02275463379919529, -0.11350218951702118, -0.025099951773881912, 0.04028403013944626, -0.11716894805431366, -0.02606237307190895, -0.02624564990401268, -0.010145379230380058, 0.10767330974340439, 0.0605587475001812, -0.07602600753307343, 0.09209084510803223, -0.004017236176878214, -0.3326384425163269, 0.23266413807868958, 0.004225199576467276, -0.011089158244431019, -0.024658143520355225, 0.035547249019145966, 0.08713869750499725, -0.001698588370345533, -0.07820931822061539, -0.0403323695063591, -0.004622765816748142, 0.03666141256690025, 0.14051136374473572, 0.10437093675136566, -0.18147316575050354, -0.12523944675922394, -0.041281331330537796, -0.09184354543685913, 0.011071819812059402, 0.05967314541339874, -0.08772960305213928, 0.0682867020368576, -0.1848946511745453, 0.0646623969078064, -0.24701325595378876, 0.09532471001148224, 0.05240355804562569, -0.10843861848115921, 0.09811309725046158, 0.10832817107439041, 0.06758158653974533, -0.06000330671668053, 0.01315888948738575, 0.022719796746969223, 0.07018838077783585, 0.08268138766288757, 0.037842076271772385, -0.054604530334472656, -0.0714804008603096, -0.04312823340296745, -0.1496109962463379, 0.193523570895195, 0.021949047222733498, -0.0976007878780365, -0.03109043836593628, -0.13832363486289978, 0.02789510041475296, 0.038059938699007034, -0.024915745481848717, -0.08616747707128525, 0.0710906907916069, 0.0058561707846820354, -0.013703884556889534, -0.07622022181749344, -0.12074939161539078, 0.22931154072284698, -0.09526044130325317, -0.09507087618112564, -0.14601218700408936, 0.03614963963627815, 0.07278810441493988, -0.07278120517730713, 0.20911388099193573, 0.09916821122169495, -0.003367131110280752, 0.15243534743785858, 0.026977820321917534, -0.1173645406961441, 0.10978755354881287, -0.0016550649888813496, -0.08502022176980972, -0.06256496906280518, -0.07428867369890213, 0.26801154017448425, 0.08874689787626266, -0.0633927658200264, -0.019033124670386314, 0.013264602050185204, -0.06216391175985336, -0.14439788460731506, -0.08036607503890991, -0.1878347545862198, -0.09401378035545349, -0.0736713707447052, -0.10324963182210922, -0.0579499751329422, 0.14836859703063965, 0.008283331990242004, 0.09211757034063339, 0.08672802895307541, -0.11119858920574188, 0.3014548420906067, 0.03987507522106171, -0.08698919415473938, 0.11978916823863983, 0.05217175930738449, 0.14977428317070007, 0.05147689953446388, 0.06787890195846558, 0.2012874335050583, -0.006575101055204868, -0.08539825677871704, 0.024561170488595963, -0.014744928106665611, -0.1156848818063736, 0.1994200348854065, 0.0003199298807885498, 0.05452292785048485, 0.06550957262516022, -0.08264897018671036, -0.13999329507350922, 0.16687040030956268, -0.08854345232248306, -0.1346941888332367, -0.11391448229551315, 0.010544763877987862, -0.027644310146570206, -0.00803788285702467, 0.02176392637193203, 0.07009229063987732, 0.026522260159254074, 0.03919918090105057, 0.036625780165195465, 0.0012934126425534487, -0.020432239398360252, -0.21321183443069458, -0.0016943732043728232, 0.0038199627306312323, 0.1822541356086731, 0.0414922796189785, -0.016970884054899216, 0.015476229600608349, 0.012692248448729515, -0.12015125900506973, 0.06951769441366196, 0.039513926953077316, -0.0927097499370575, 0.10480306297540665, 0.036376968026161194, 0.19806213676929474, 0.057505231350660324, -0.18911655247211456, -0.11403292417526245, 0.10810667276382446, 0.02256309799849987, 0.06658955663442612, -0.16767843067646027, -0.026526646688580513, 0.08361593633890152, 0.08884448558092117, -0.06556472927331924, -0.23503246903419495, 0.028899773955345154, 0.05251893401145935, 0.1558840274810791, 0.007842246443033218, 0.21672724187374115, 0.059548601508140564, 0.14441560208797455, 0.06189732626080513, -0.02389329858124256, -0.009005787782371044, 0.29376357793807983, 0.0851600170135498, -0.09989576786756516, 0.019899830222129822, -0.015373876318335533, -0.01725354976952076, -0.17314991354942322, 0.1472550481557846, 0.10003718733787537, 0.1402074694633484, 0.00013739721907768399, -0.07005717605352402, 0.12288478016853333, -0.05692373961210251, -0.13760672509670258, -0.07393015921115875, -0.056924138218164444, -0.05815616250038147, 0.1072368323802948, 0.18521270155906677, 0.27492862939834595, 0.051449574530124664, -0.03550297021865845, 0.07622328400611877, 0.027609307318925858, 0.06208140403032303, 0.08440879732370377, -0.07965031266212463, -0.0849020853638649, 0.20839275419712067, -0.01197696290910244, -0.11058247834444046, 0.16731388866901398, 0.08071262389421463, -0.0006354994839057326, 0.044949959963560104, -0.029270516708493233, 0.24619032442569733, -0.16570012271404266, -0.009880037978291512, -0.008454722352325916, 0.0658608004450798, -0.08546258509159088, 0.08636870235204697, 0.1095815971493721, 0.02335367165505886, 0.014947351068258286, 0.052472539246082306, -0.20119278132915497, -0.05383553355932236, -0.12076622247695923, 0.094509057700634, 0.04919959977269173, -0.03715147078037262, 0.06511767208576202, 0.16546644270420074, -2.737897377493152e-32, -0.030571753159165382, 0.07680534571409225, -0.07240145653486252, 0.06931757926940918, -0.05157539248466492, 0.09255429357290268, -0.033797770738601685, -0.04162777587771416, -0.04066385328769684, -0.01157038938254118, -0.11981765925884247, -0.04133875295519829, 0.06510822474956512, -0.14643330872058868, -0.0899985283613205, 0.0908835306763649, -0.004571821074932814, -0.040953293442726135, -0.18871299922466278, 0.10438676923513412, -0.14774039387702942, 0.05638420954346657, -0.057936519384384155, 0.13574738800525665, -0.020194778218865395, -0.022950701415538788, -0.11265052109956741, 0.030221231281757355, 0.036980144679546356, 0.02540569379925728, -0.20213426649570465, -0.06304506212472916, -0.02679167501628399, -0.04303880035877228, -0.125180184841156, -0.0698351040482521, -0.048707474023103714, -0.19516818225383759, 0.11678917706012726, 0.043875500559806824, -0.0955670103430748, 0.08061549812555313, -0.011931883171200752, -0.034269779920578, -0.05875322222709656, 0.1014876514673233, 0.03799637034535408, 0.0633312538266182, -0.08249659836292267, -0.06700248271226883, 0.12959878146648407, -0.02181374281644821, 0.09056560695171356, -0.09659812599420547, 0.1415327936410904, -0.22692054510116577, 0.05972348153591156, 0.04328477755188942, 0.053669530898332596, -0.1847381889820099, -0.046404026448726654, -0.0618065744638443, -0.10304638743400574, 0.13133803009986877, 0.12933743000030518, 0.12173609435558319, 0.3269379734992981, 0.10545529425144196, 0.10030827671289444, -0.25256630778312683, 0.060716964304447174, -0.10084127634763718, -0.08474437147378922, -0.045113399624824524, -0.1357303261756897, 0.03476392477750778, -0.18044044077396393, -0.060749221593141556, 0.212119922041893, 0.0364401750266552, 0.0965307429432869, 0.059104446321725845, 0.04715608432888985, -0.009682114236056805, -0.13180162012577057, -0.16563211381435394, -0.13128115236759186, 0.08805990219116211, -0.1514892578125, 0.08981310576200485, 0.02171347662806511, 0.09266474097967148, -0.24354824423789978, -0.022571196779608727, -0.056538473814725876, -0.04399784281849861, -0.0023115461226552725, -0.07582056522369385, 0.0468452125787735, 0.053483348339796066, 0.11244675517082214, -0.10068249702453613, 0.1145535334944725, 0.10685034096240997, 0.046664439141750336, 0.1961364895105362, 0.2725416421890259, 0.05643754079937935, -0.09085890650749207, -0.02554672211408615, -0.11921674013137817, 0.09228410571813583, 0.17425943911075592, 0.17717228829860687, 0.0978776291012764, -0.06393462419509888, -0.0725632831454277, 0.05129172280430794, -0.02438940294086933, 0.3062297999858856, -0.13148514926433563, 0.06488333642482758, 0.05011942982673645, 0.16758771240711212, -0.25392797589302063, -0.033608876168727875, -0.06388554722070694, 0.24471637606620789, -0.029622625559568405, -0.05428941175341606, -0.02291722409427166, -0.1493939459323883, 7.586314723084797e-7, -0.052997492253780365, 0.17952647805213928, 0.0746397152543068, -0.150558739900589, -0.04569964110851288, 0.081581249833107, -0.22749784588813782, 0.10885237902402878, 0.10274374485015869, 0.1789119690656662, -0.07038570195436478, 0.06516747921705246, -0.06661907583475113, -0.10361503064632416, -0.013695977628231049, -0.16122430562973022, -0.06699466705322266, -0.08285458385944366, -0.1680220365524292, 0.016106251627206802, -0.10771582275629044, 0.08762338012456894, -0.013619746081531048, -0.00048535963287577033, 0.018763436004519463, -0.08868659287691116, 0.01808616891503334, -0.010478874668478966, -0.035060469061136246, -0.01905452087521553, 0.11713762581348419, -0.09096367657184601, -0.1779908984899521, 0.12190520018339157, 0.06661827862262726, 0.13150450587272644, -0.1205441802740097, -0.08881252259016037, -0.024706026539206505, -0.04051358625292778, 0.06518014520406723, 0.020093301311135292, -0.005382472649216652, -0.05401404947042465, 0.03651711344718933, 0.03147624805569649, -0.11026409268379211, 0.00005678192974301055, -0.08709884434938431, -0.09100965410470963, 0.15357591211795807, 0.048893097788095474, -0.002025455003604293, 0.2044871300458908, 0.02778806909918785, 0.10495150089263916, -0.11085104197263718, -0.18257367610931396, 0.16367508471012115, -0.23337261378765106, 0.04365738108754158, -0.2508205473423004, 0.006476887967437506, 0.02909490279853344, -0.13752354681491852, -0.2282896786928177, 0.16214606165885925, 1.4479638394383164e-34, 0.06057887151837349, -0.1684471219778061, 0.006982145365327597, -0.30833739042282104, 0.0474146343767643, -0.08655072003602982, 0.1430310606956482, 0.038863565772771835, 0.017512492835521698, -0.2688276171684265, -0.10915286839008331 ]
https://github.com/huggingface/datasets/issues/2564
concatenate_datasets for iterable datasets
It is probably worth noting here that the [documentation](https://huggingface.co/docs/datasets/process#concatenate) is misleading (indicating that it does work for IterableDatasets): > You can also mix several datasets together by taking alternating examples from each one to create a new dataset. This is known as interleaving, and you can use it with [interleave_datasets()](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.interleave_datasets). **Both [interleave_datasets()](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.interleave_datasets) and [concatenate_datasets()](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.concatenate_datasets) will work with regular [Dataset](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.Dataset) and [IterableDataset](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.IterableDataset) objects**. Refer to the [Stream](https://huggingface.co/docs/datasets/stream#interleave) section for an example of how it’s used.
Currently `concatenate_datasets` only works for map-style `Dataset`. It would be nice to have it work for `IterableDataset` objects as well. It would simply chain the iterables of the iterable datasets.
74
concatenate_datasets for iterable datasets Currently `concatenate_datasets` only works for map-style `Dataset`. It would be nice to have it work for `IterableDataset` objects as well. It would simply chain the iterables of the iterable datasets. It is probably worth noting here that the [documentation](https://huggingface.co/docs/datasets/process#concatenate) is misleading (indicating that it does work for IterableDatasets): > You can also mix several datasets together by taking alternating examples from each one to create a new dataset. This is known as interleaving, and you can use it with [interleave_datasets()](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.interleave_datasets). **Both [interleave_datasets()](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.interleave_datasets) and [concatenate_datasets()](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.concatenate_datasets) will work with regular [Dataset](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.Dataset) and [IterableDataset](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/main_classes#datasets.IterableDataset) objects**. Refer to the [Stream](https://huggingface.co/docs/datasets/stream#interleave) section for an example of how it’s used.
[ 0.017285576090216637, -0.04789164662361145, -0.01062247809022665, 0.056197501718997955, 0.1705806404352188, 0.12865610420703888, 0.09026983380317688, -0.06208961829543114, -0.019063297659158707, 0.22674091160297394, -0.13013164699077606, -0.04088211432099342, 0.0504654198884964, 0.04867970570921898, 0.05206601694226265, -0.26505959033966064, 0.005436432082206011, 0.019220726564526558, -0.2536739110946655, 0.03649291768670082, 0.016901444643735886, 0.1463259756565094, 0.11131293326616287, -0.051115214824676514, 0.04244430363178253, -0.05020992457866669, -0.1030665934085846, 0.061210162937641144, 0.03289659321308136, -0.03327930346131325, 0.09175846725702286, 0.20183797180652618, 0.17596136033535004, 0.1665315479040146, 0.000005514150416274788, 0.11257117241621017, 0.19950632750988007, -0.11229214072227478, 0.006502082571387291, -0.044755153357982635, 0.04950258508324623, 0.003406449221074581, 0.1416897177696228, -0.0074810003861784935, 0.03819137066602707, -0.2172003984451294, 0.047271888703107834, -0.02895580790936947, 0.21720963716506958, -0.17603030800819397, -0.0497591607272625, 0.06483540683984756, -0.043586742132902145, -0.15744060277938843, -0.045099932700395584, 0.16932560503482819, 0.04098830372095108, 0.07883147150278091, -0.08876977115869522, 0.0658961683511734, 0.04635044187307358, -0.013106011785566807, 0.13818320631980896, -0.05886194482445717, 0.007449035532772541, -0.006566594820469618, -0.11760330200195312, -0.13348060846328735, -0.027021566405892372, 0.2353064864873886, -0.012321898713707924, 0.05189555510878563, 0.0272404532879591, 0.07105491310358047, -0.011586991138756275, -0.08387474715709686, -0.12388966232538223, -0.11025073379278183, 0.036607254296541214, 0.008503923192620277, -0.17679853737354279, 0.08340360969305038, -0.005597240757197142, -0.018216406926512718, -0.06029948964715004, 0.015462853945791721, -0.09178232401609421, 0.21578888595104218, -0.008473990485072136, -0.067753866314888, 0.13977190852165222, -0.13167820870876312, -0.12771953642368317, 0.013988147489726543, -0.08626921474933624, -0.04206220433115959, -0.06915479898452759, -0.04057968780398369, 0.11418688297271729, 0.11127588897943497, -0.02513749711215496, -0.0830782949924469, -0.028256135061383247, -0.0006326364236883819, -0.12652257084846497, -0.07800862938165665, -0.11300039291381836, -0.1289258450269699, -0.05878879502415657, 0.027328215539455414, 0.04751112312078476, -0.012011121958494186, 0.19354070723056793, -0.03634700924158096, -0.051125530153512955, -0.05280711501836777, -0.06674183160066605, 0.2717244625091553, 0.03576846048235893, -0.11177323758602142, 0.012283340096473694, -0.11386111378669739, 0.02876509726047516, 0.05245336517691612, 0.09611105173826218, -0.09376652538776398, 0.06045389547944069, 0.05955241620540619, 0.09404692053794861, -0.03186067193746567, -0.07414830476045609, 0.019403694197535515, 0.18982651829719543, -0.04502425715327263, 0.09045781940221786, -0.18061457574367523, -0.06395521014928818, -0.00862573366612196, 0.058022189885377884, -0.0003295963688287884, 0.0673125609755516, -0.05010395497083664, 0.12194587290287018, -0.09738750755786896, 0.11603651195764542, -0.14284922182559967, 0.08468756079673767, 0.09929653257131577, -0.007184398360550404, -0.11063680052757263, -0.015059571713209152, 0.13112084567546844, -0.19170723855495453, 0.07069873064756393, -0.11272979527711868, 0.050146885216236115, 0.06979557871818542, 0.144882470369339, -0.2610519826412201, 0.010061723180115223, -0.04747088998556137, 0.03048037923872471, -0.11878873407840729, -0.03800536319613457, 0.17573733627796173, 0.150138720870018, 0.0189822930842638, -0.10100530833005905, 0.031333278864622116, -0.1670076996088028, 0.05135279893875122, 0.12103620171546936, -0.14582134783267975, 0.06303515285253525, -0.17987628281116486, 0.010059044696390629, -0.0705232173204422, 0.056665364652872086, -0.004874330013990402, -0.07022802531719208, 0.02243177406489849, 0.07278627902269363, 0.06371601670980453, -0.08196477591991425, -0.1188589558005333, 0.019674381241202354, 0.07725617289543152, -0.0012383077992126346, -0.08531076461076736, -0.21777145564556122, 0.051414430141448975, 0.025106528773903847, 0.0789528414607048, 0.050041090697050095, -0.11391069740056992, 0.014659393578767776, 0.05711886286735535, -0.2597830891609192, -0.026549503207206726, -0.14244617521762848, 0.07977782189846039, -0.025345079600811005, 0.013808906078338623, 0.041320085525512695, -0.09686405211687088, -0.1719077229499817, -0.3133016526699066, -0.0109791848808527, 0.25611892342567444, -0.14685191214084625, -0.10682297497987747, -0.014883607625961304, 0.05545588582754135, -0.03127262368798256, -0.19298133254051208, 0.05267449468374252, -0.1404561698436737, 0.06702347099781036, 0.037075892090797424, 0.10954684019088745, 0.003311287146061659, 0.052795976400375366, 0.10514409840106964, 0.03644411265850067, -0.1374848186969757, 0.09486425668001175, 0.0632111057639122, 0.05006527900695801, 0.15323087573051453, 0.18696211278438568, 0.03913978859782219, -0.057142697274684906, 0.211165189743042, 0.03709465265274048, -0.4134937524795532, 0.1287624090909958, 0.15106596052646637, -0.18368396162986755, 0.14665105938911438, 0.0849524587392807, -0.23694543540477753, -0.14229853451251984, -0.19591975212097168, -0.08638785779476166, -0.19312584400177002, 0.06129119172692299, -0.11074560135602951, 0.03772251680493355, 0.0415964275598526, -0.05365059897303581, 0.09596311300992966, 0.020576974377036095, -0.09198156744241714, -0.08745469897985458, 0.014670604839920998, -0.09260286390781403, 0.19376641511917114, 0.07476036995649338, 0.06484609842300415, 0.05580940842628479, 0.08818261325359344, 0.09572713822126389, -0.26534897089004517, 0.06730480492115021, 0.08006861805915833, -0.08861848711967468, 0.033587951213121414, 0.10838079452514648, 0.04512941464781761, 0.14522218704223633, 0.21765026450157166, -0.08241980522871017, 0.05029185116291046, 0.04596279561519623, 0.03143883869051933, -0.0399373322725296, -0.004545082803815603, 0.1775878667831421, 0.07829409092664719, -0.014240407384932041, -0.07613341510295868, 0.025132233276963234, 0.10167243331670761, -0.12138047069311142, 0.06763824075460434, 0.027560222893953323, -0.06555280089378357, -0.03346240893006325, -0.14397968351840973, -0.14747221767902374, -0.044533997774124146, -0.05936429649591446, -0.06131935864686966, -0.05500183627009392, 0.0248798206448555, 0.025026237592101097, 0.09768931567668915, 0.03949727863073349, 0.07048730552196503, -0.00849454291164875, -0.1743728220462799, -0.022907696664333344, 0.047612834721803665, 0.09109734743833542, 0.04057314246892929, -0.017352143302559853, 0.08495668321847916, 0.16036367416381836, -0.14926818013191223, -0.17261044681072235, -0.12861548364162445, 0.11623451858758926, -0.0559656098484993, -0.0860719159245491, 0.2534055709838867, -0.04814941808581352, -0.006967946421355009, -0.2602950632572174, 0.2162356823682785, 0.063390351831913, -0.14124245941638947, 0.1815319061279297, 0.02504706010222435, -0.03318792209029198, 0.08005154132843018, 0.057672008872032166, -0.0893949344754219, -0.2578820586204529, 0.24017822742462158, -0.1699448525905609, -0.03223942965269089, 0.06060053035616875, 0.00009110948303714395, -0.0798778384923935, 0.1273779571056366, -0.08159562200307846, -0.048831380903720856, -0.022006284445524216, 0.06182076036930084, -0.013386478647589684, 0.06910936534404755, -0.049125272780656815, -0.03722545877099037, 0.04708879441022873, 0.11035598814487457, -0.12551754713058472, 0.10879956930875778, -0.03175928443670273, 0.014420540072023869, -0.10512829571962357, -0.04327039793133736, -0.0465351939201355, -0.002161678858101368, -0.013212873600423336, -0.07186798006296158, 0.004273213911801577, -0.03705967590212822, -0.017690662294626236, -0.16972291469573975, 0.08360786736011505, -0.041843876242637634, -0.02686505764722824, 0.10795413702726364, 0.05259339138865471, 0.06778896600008011, 0.002679437166079879, 0.22929786145687103, 0.10428956896066666, -0.06480886787176132, -0.3030829131603241, 0.0007259947014972568, -0.04942850023508072, 0.23577025532722473, 0.04791135713458061, -0.11385931819677353, 0.1509586125612259, 0.010856588371098042, -0.030892135575413704, 0.23964832723140717, -0.03626279532909393, -0.01280942466109991, -0.07920359820127487, 0.04530598968267441, 0.13808755576610565, -0.04028740152716637, 0.1284630447626114, 0.09126193821430206, 0.02185859903693199, -0.10682117193937302, 0.09249847382307053, 0.11463721096515656, -0.12862060964107513, -0.02346794866025448, -0.3054421544075012, 0.05248057469725609, 0.042109739035367966, 0.15881508588790894, 0.07635726034641266, 0.08283017575740814, -0.0038423901423811913, -0.060533829033374786, 0.2240784764289856, -0.025339411571621895, -0.14299315214157104, 0.09633772075176239, -0.02490554377436638, 0.06214887648820877, 0.17100279033184052, 0.16392120718955994, 0.07613836228847504, 0.06149769201874733, 0.15555471181869507, -0.09670437127351761, -0.08774939179420471, 0.04341575875878334, 0.012754412367939949, -0.03921395540237427, 0.0352596677839756, 0.1857181191444397, -0.006856665946543217, -0.028624355792999268, -0.15484042465686798, -0.013385859318077564, 0.3093143105506897, 0.08684014528989792, 0.026271365582942963, -0.12803585827350616, 0.1264583170413971, 0.018396863713860512, -0.008948304690420628, 0.10133480280637741, 0.13810443878173828, 0.11697137355804443, 0.09652049094438553, 0.19632242619991302, 0.05061838775873184, 0.10341902822256088, -0.14126531779766083, -0.2592926621437073, -0.08624503761529922, -0.09904660284519196, 0.00966331921517849, 0.31091010570526123, -0.02282528392970562, 0.07938233762979507, 0.014748710207641125, 0.01228809542953968, 0.0331420823931694, 0.10878355801105499, 0.10397326946258545, -0.050607871264219284, -0.10723823308944702, -0.043744537979364395, -0.1505468338727951, 0.1998460590839386, -0.058688048273324966, 0.18428418040275574, -0.0018892125226557255, -0.12991267442703247, -0.09921342134475708, -0.06435443460941315, -0.08730649203062057, 0.0718240961432457, 0.07831551879644394, -0.20678509771823883, 0.07137461006641388, 0.2802940607070923, 0.05813654884696007, -0.18655596673488617, 0.05807819217443466, -0.103476382791996, 0.11957544833421707, 0.07592283189296722, -0.13768111169338226, 0.2056855857372284, 0.020480090752243996, -0.03693290054798126, -0.09354005008935928, 0.0880766436457634, 0.010211057029664516, 0.14024119079113007, -0.06165017932653427, -0.02722456119954586, -0.11539099365472794, -0.08921121060848236, 0.047177642583847046, -0.10016802698373795, -0.050317104905843735, -0.1416633427143097, 0.16269218921661377, -0.10009148716926575, -0.17491886019706726, -0.04509224742650986, -0.09127797931432724, 0.07284002006053925, 0.018752573058009148, -0.04436184838414192, -0.04007570445537567, -0.14743074774742126, 0.13324925303459167, 0.007485979236662388, -0.04168115556240082, 0.07901886850595474, -0.06513626873493195, -0.11538663506507874, -0.20148952305316925, -0.0453556589782238, -0.15724751353263855, 0.14422067999839783, 0.004803239833563566, 0.08348549157381058, 0.1429731845855713, -0.10867025703191757, -0.023481382057070732, 0.13690431416034698, -0.1326189935207367, -0.13244041800498962, 0.08551003783941269, 0.13115136325359344, -0.015191908925771713, 0.0163775272667408, -0.10450447350740433, 0.03275495395064354, -0.11541539430618286, -0.1565571427345276, -0.0018394503276795149, 0.026902038604021072, -0.11820146441459656, 0.10169917345046997, 0.1087413802742958, -0.03623690456151962, 0.05386146903038025, 0.09954086691141129, 0.06324026733636856, 0.08376333117485046, -0.1543075293302536, 0.06065516546368599, -0.05505486950278282, 0.1575489193201065, 0.07284940034151077, 0.08884753286838531, -0.13664977252483368, -0.008743041194975376, 0.010799243114888668, 0.020713619887828827, 0.04284489527344704, -0.018408721312880516, -0.016482271254062653, -0.0983375832438469, 0.03819496929645538, 0.09320633858442307, 0.12676621973514557, 0.05866510048508644, -0.13554126024246216, 0.025085261091589928, -2.703397793790869e-32, -0.08057713508605957, 0.15255635976791382, -0.10587870329618454, 0.07156950235366821, -0.20497725903987885, 0.08709412068128586, 0.02193402126431465, -0.06256964057683945, 0.01576530560851097, -0.03967353329062462, -0.162164568901062, 0.1083398386836052, 0.04464131221175194, 0.03945554792881012, -0.15207532048225403, -0.026340557262301445, 0.07669129222631454, -0.023676205426454544, -0.008942285552620888, 0.15934985876083374, 0.09196880459785461, -0.1190149188041687, -0.012505082413554192, -0.08491723239421844, -0.07261498272418976, 0.17138971388339996, -0.14040961861610413, 0.03128375485539436, -0.05878964066505432, -0.11345020681619644, -0.05464424565434456, 0.07276184111833572, -0.059127483516931534, 0.09704341739416122, -0.09354329109191895, 0.1963336020708084, -0.27366796135902405, -0.10191753506660461, -0.06101110950112343, 0.022217389196157455, -0.04654616862535477, 0.08180872350931168, 0.183725044131279, -0.12309832125902176, 0.25694018602371216, -0.08317448198795319, -0.14177227020263672, 0.04772791266441345, -0.14237043261528015, -0.13398079574108124, 0.10183210670948029, -0.04105029255151749, 0.012891347520053387, 0.0049295187927782536, 0.12193448841571808, 0.10661789774894714, -0.028362134471535683, -0.06348620355129242, -0.007607656065374613, 0.20429307222366333, -0.06347525864839554, 0.014932912774384022, -0.030850449576973915, 0.020996328443288803, 0.22198379039764404, 0.12466390430927277, 0.07754076272249222, -0.021175270900130272, 0.09772468358278275, -0.07352554053068161, -0.0019542761147022247, 0.08456728607416153, -0.03559885919094086, 0.0075622424483299255, -0.15140178799629211, -0.02913845330476761, -0.10354918241500854, -0.056667983531951904, 0.09198866784572601, -0.13406440615653992, -0.1677199751138687, 0.0010144492844119668, 0.05663321539759636, -0.04471549019217491, -0.053122296929359436, 0.03716244921088219, 0.11549488455057144, -0.001964158844202757, -0.09202545136213303, 0.09375068545341492, -0.2486477792263031, 0.1755155473947525, -0.145915225148201, 0.08714819699525833, -0.2496383935213089, 0.15021619200706482, 0.08380712568759918, 0.14033573865890503, 0.08245619386434555, -0.02101914957165718, 0.05477011576294899, -0.10718978941440582, 0.16176682710647583, 0.12750683724880219, 0.023106053471565247, 0.005778034683316946, 0.23367023468017578, 0.05284687131643295, -0.1660342961549759, -0.03590414300560951, -0.07841143757104874, 0.01160492468625307, 0.0617954395711422, -0.07618556171655655, 0.22025750577449799, -0.07289864867925644, 0.0803435668349266, -0.15884147584438324, -0.021317558363080025, 0.07090608030557632, -0.2382369339466095, -0.0960649773478508, -0.21273984014987946, 0.08029484003782272, 0.07855983823537827, 0.012057333253324032, -0.1090954914689064, -0.16173654794692993, 0.08156789839267731, -0.08796041458845139, -0.017513485625386238, -0.11127263307571411, 7.240388413265464e-7, -0.17457304894924164, -0.1771196722984314, -0.07472430169582367, 0.03426593914628029, -0.06686562299728394, -0.05343160405755043, 0.0220537967979908, -0.06976091116666794, 0.06490005552768707, 0.19547274708747864, 0.05885427072644234, -0.02711007557809353, 0.025155289098620415, -0.16281335055828094, -0.04620753228664398, 0.01042898464947939, -0.1167515367269516, 0.11452683061361313, -0.07588927447795868, -0.1570863425731659, 0.08992204815149307, 0.054946109652519226, 0.12683531641960144, -0.029179640114307404, -0.0034665516577661037, -0.0395033098757267, -0.10882025957107544, -0.05958106741309166, 0.13061967492103577, 0.06835095584392548, -0.04449768736958504, -0.11228574067354202, 0.0695442408323288, 0.04152727127075195, -0.12193326652050018, 0.028826717287302017, -0.0037329376209527254, -0.007448370102792978, -0.12758836150169373, 0.038902297616004944, 0.08552376180887222, -0.042606279253959656, -0.03702974319458008, -0.07881292700767517, 0.1493510901927948, 0.09675654023885727, 0.021502021700143814, 0.14327622950077057, -0.14497441053390503, 0.10343629121780396, 0.07789406180381775, 0.0804264098405838, -0.052330534905195236, 0.27132996916770935, -0.05297515168786049, -0.02713753841817379, 0.042210813611745834, -0.1278432309627533, -0.08202699571847916, -0.11529678106307983, -0.09891767054796219, 0.019587116315960884, -0.12931200861930847, 0.18414349853992462, -0.17884930968284607, 0.025726111605763435, -0.05152393504977226, 1.8577625218878225e-34, -0.02568989247083664, -0.005713173188269138, 0.013952956534922123, -0.06559091806411743, -0.0209878571331501, 0.05711637809872627, 0.07844895869493484, 0.22540956735610962, -0.10138444602489471, 0.046548642218112946, -0.038999639451503754 ]
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.02197011187672615, 0.23481319844722748, -0.07372375577688217, 0.09669255465269089, 0.18389420211315155, 0.04825432226061821, 0.07201527059078217, 0.020829500630497932, 0.016620174050331116, 0.168108731508255, 0.054427798837423325, -0.047524336725473404, 0.048333458602428436, -0.19683057069778442, 0.048591334372758865, 0.2587945759296417, -0.013433287851512432, 0.013391641899943352, 0.06293144822120667, -0.10715917497873306, -0.11910692602396011, 0.050327274948358536, 0.20759931206703186, -0.07800724357366562, -0.07516435533761978, 0.021693410351872444, -0.08017489314079285, 0.0532618910074234, -0.018772173672914505, -0.11877213418483734, 0.1386251449584961, 0.03282381221652031, -0.09025127440690994, 0.19968295097351074, 0.000005585850431089057, -0.005051239859312773, 0.15547144412994385, 0.0330829881131649, -0.17609167098999023, -0.03955133259296417, -0.025350671261548996, -0.054234910756349564, 0.07536053657531738, 0.0020981605630367994, -0.09148188680410385, -0.10066165030002594, -0.08870349079370499, -0.0913744643330574, 0.11155906319618225, -0.0009513878030702472, 0.032105572521686554, 0.030405879020690918, -0.0814434364438057, -0.062459301203489304, 0.14026571810245514, 0.05610927194356918, 0.057649239897727966, 0.03096100501716137, -0.2620035707950592, -0.061386335641145706, -0.028633963316679, 0.05569496378302574, -0.024582725018262863, 0.04129386320710182, -0.06578390300273895, -0.13108888268470764, -0.13065668940544128, -0.0714629665017128, 0.10693897306919098, 0.12189798802137375, 0.07594737410545349, -0.10587198287248611, -0.054524850100278854, 0.026450976729393005, -0.09765336662530899, 0.003953074105083942, 0.034726954996585846, -0.0575249083340168, -0.08261962980031967, -0.07445882260799408, -0.09589003026485443, -0.09967636317014694, 0.06226728484034538, -0.05993736535310745, -0.1561809927225113, -0.09870512038469315, -0.03450524061918259, -0.10488389432430267, -0.17776978015899658, 0.010493826121091843, 0.22894668579101562, -0.1695280373096466, -0.05803561210632324, 0.034615639597177505, -0.040119852870702744, 0.08892195671796799, 0.054003868252038956, 0.15329484641551971, 0.021693233400583267, -0.003583727404475212, -0.10334109514951706, -0.004355818498879671, -0.0491192489862442, 0.02281288616359234, -0.008348212577402592, -0.014238104224205017, -0.002427710685878992, -0.16724537312984467, 0.08013422787189484, 0.12242331355810165, -0.17878633737564087, 0.07824987918138504, -0.08780214190483093, -0.047842781990766525, 0.30771997570991516, 0.06258576363325119, 0.11942379921674728, 0.010352457873523235, 0.09314977377653122, 0.17537549138069153, 0.07643590867519379, 0.09059231728315353, 0.00025866812211461365, 0.2304341197013855, -0.12193594872951508, 0.08653655648231506, -0.04232649877667427, -0.0871305912733078, -0.1802244484424591, -0.07843626290559769, -0.09309061616659164, -0.19691964983940125, 0.07793371379375458, 0.18385595083236694, 0.10001909732818604, -0.11779816448688507, 0.09822901338338852, -0.0286501944065094, -0.0566365085542202, -0.06944989413022995, 0.11391693353652954, -0.19070786237716675, 0.06823465973138809, 0.017497504130005836, 0.00973186269402504, 0.07654780894517899, 0.0652337372303009, -0.07061753422021866, -0.04491675645112991, 0.10587970167398453, -0.027935612946748734, -0.025817980989813805, -0.16234007477760315, 0.06950338929891586, -0.009479445405304432, 0.09734103083610535, 0.18293702602386475, 0.07724197953939438, -0.04108403995633125, -0.19652137160301208, -0.011267101392149925, -0.0554594062268734, 0.0122909527271986, -0.012662403285503387, 0.10524852573871613, 0.29065755009651184, -0.04800429195165634, 0.08501936495304108, -0.07440268248319626, -0.023378757759928703, -0.03171097859740257, -0.1821955144405365, -0.1068476140499115, 0.04070885851979256, -0.09749408066272736, -0.036186978220939636, 0.01622786931693554, -0.11594761908054352, -0.3261231482028961, 0.06184558570384979, 0.19435951113700867, 0.08631874620914459, 0.03718092665076256, -0.07346244156360626, 0.00941614992916584, -0.11038324981927872, -0.05346481874585152, 0.013400021009147167, -0.06424329429864883, -0.07591826468706131, -0.08863314241170883, 0.02091488242149353, 0.02424352988600731, 0.037615254521369934, -0.026438714936375618, 0.023254748433828354, 0.05044613406062126, 0.09991345554590225, 0.09626423567533493, -0.18555258214473724, -0.06537558883428574, 0.12422873824834824, -0.07851547747850418, 0.10905266553163528, 0.13249844312667847, 0.022734059020876884, -0.25658491253852844, 0.21390588581562042, -0.10239894688129425, -0.07162266969680786, -0.03387128561735153, 0.01705925725400448, -0.0033047518227249384, -0.028071707114577293, -0.16352349519729614, -0.10784470289945602, -0.09101458638906479, 0.033697742968797684, 0.0008418902871198952, 0.058670852333307266, -0.07668035477399826, 0.22918114066123962, -0.012048737145960331, 0.06593682616949081, -0.03586031123995781, 0.000027021156711271033, 0.0256318598985672, -0.04381394758820534, -0.024314282462000847, -0.033357806503772736, -0.04031502828001976, -0.042790383100509644, 0.003160125808790326, 0.1928143948316574, 0.012399449944496155, -0.014489315450191498, -0.0541200116276741, -0.23064792156219482, 0.08489306271076202, 0.17687425017356873, -0.08163618296384811, -0.08192500472068787, -0.009309127926826477, 0.02773209474980831, 0.0777026116847992, -0.03091379813849926, -0.011024786159396172, 0.2938169240951538, 0.03643890470266342, -0.1543516367673874, 0.17565083503723145, 0.12121989578008652, -0.07893330603837967, -0.0021725075785070658, -0.0644754022359848, 0.045384183526039124, 0.2795412838459015, 0.22628998756408691, 0.07382041215896606, -0.010965587571263313, 0.28651735186576843, 0.08370360732078552, -0.017391173169016838, -0.05050736665725708, 0.09499841928482056, -0.06985887140035629, 0.08307044953107834, 0.04831821471452713, -0.03797592967748642, 0.13729321956634521, 0.2065248340368271, 0.040844082832336426, -0.11768056452274323, -0.09782934188842773, -0.08597012609243393, -0.07832346856594086, -0.09288173168897629, 0.012409823015332222, 0.05072447657585144, -0.04412585124373436, -0.24503883719444275, 0.07746007293462753, 0.10406463593244553, -0.05847903713583946, 0.1486208140850067, 0.22070929408073425, -0.14097438752651215, 0.0038499387446790934, -0.0556534118950367, 0.08860799670219421, -0.1374339461326599, -0.14603589475154877, 0.08158880472183228, -0.007290082983672619, 0.08453879505395889, 0.025065621361136436, 0.041178710758686066, -0.18650861084461212, -0.09361650794744492, -0.228690505027771, 0.0021775122731924057, -0.04855915904045105, -0.030893217772245407, -0.20786914229393005, 0.1951550543308258, -0.045667994767427444, 0.10258135944604874, 0.060470789670944214, -0.2584565281867981, -0.07637112587690353, 0.04449738189578056, -0.031928274780511856, 0.17431946098804474, 0.16946518421173096, -0.05011783540248871, -0.05646633729338646, -0.07039070129394531, -0.21264499425888062, 0.08495419472455978, -0.019210560247302055, -0.057327937334775925, -0.10988801717758179, 0.046509161591529846, -0.015908164903521538, -0.06366607546806335, -0.04797820374369621, 0.09734443575143814, -0.03650596737861633, -0.1629706174135208, 0.028175434097647667, -0.025371672585606575, 0.05724417790770531, -0.0645117238163948, -0.13501058518886566, -0.03798789903521538, -0.06606780737638474, -0.22228381037712097, -0.15832936763763428, 0.09431128203868866, 0.017935629934072495, 0.11631997674703598, 0.11113538593053818, -0.1501760184764862, 0.18118661642074585, 0.12762042880058289, -0.1688135862350464, -0.0025287815369665623, -0.1373947411775589, 0.2408367544412613, -0.08502260595560074, 0.09154555201530457, 0.06918396055698395, -0.08956895023584366, -0.14724449813365936, -0.10923115909099579, 0.08622562140226364, -0.17890222370624542, 0.09008617699146271, -0.01621786318719387, 0.009616306982934475, -0.0501827709376812, 0.05612519755959511, 0.07038172334432602, -0.07597047835588455, -0.1237463429570198, 0.15619660913944244, 0.10111790895462036, 0.23708073794841766, 0.05152379348874092, -0.09932199865579605, 0.016492366790771484, -0.09394075721502304, -0.21477553248405457, -0.17930062115192413, 0.02463415451347828, 0.05919960141181946, 0.02849898859858513, 0.008682063780725002, 0.007984808646142483, 0.022172601893544197, 0.10730357468128204, -0.27214208245277405, -0.07857171446084976, 0.13142184913158417, 0.006358567625284195, -0.12288932502269745, 0.08520929515361786, -0.030952386558055878, -0.1423182338476181, 0.11377900093793869, 0.058955397456884384, 0.09216569364070892, 0.14915789663791656, -0.03687991574406624, -0.06389474868774414, 0.04040465131402016, -0.036442819982767105, 0.08705239742994308, 0.13631097972393036, -0.015348450280725956, -0.05201287567615509, 0.07538209110498428, 0.013295791111886501, 0.15289147198200226, 0.13082565367221832, -0.07319307327270508, 0.07214412093162537, -0.11182402074337006, 0.20325368642807007, -0.021591797471046448, -0.034390442073345184, 0.06398177146911621, 0.08380504697561264, -0.043519388884305954, 0.12146899849176407, 0.13032189011573792, -0.09563013911247253, -0.10143923759460449, -0.04875887185335159, -0.1252061277627945, -0.14856889843940735, 0.03625907748937607, -0.11857447773218155, 0.02801702357828617, -0.029276814311742783, 0.033578090369701385, -0.07163609564304352, -0.05477897822856903, -0.10534724593162537, -0.028439464047551155, 0.11361268907785416, 0.030589818954467773, 0.0903206616640091, 0.07154299318790436, 0.17459359765052795, -0.04879724606871605, 0.22988872230052948, -0.1390233337879181, -0.18038438260555267, -0.02497558854520321, -0.08176016807556152, 0.05217074975371361, -0.0076831430196762085, -0.023069532588124275, 0.02707393653690815, -0.08410662412643433, -0.035467665642499924, -0.04765797406435013, 0.12475073337554932, -0.03903118148446083, -0.2119988203048706, 0.0716414675116539, -0.19102580845355988, -0.10730519145727158, 0.10144075751304626, 0.05157814174890518, 0.12767381966114044, -0.23871910572052002, 0.05420946329832077, 0.019909828901290894, -0.14160305261611938, -0.01275780238211155, 0.031980112195014954, 0.10172219574451447, -0.11000510305166245, 0.11109878122806549, 0.19353020191192627, -0.2334127128124237, 0.1710561215877533, 0.049257487058639526, -0.1708206981420517, 0.030019596219062805, -0.11377903074026108, 0.06028853729367256, 0.141890749335289, 0.0922253429889679, 0.045491188764572144, -0.018553035333752632, 0.07681473344564438, -0.06276998668909073, 0.08279640227556229, -0.07791954278945923, 0.09002778679132462, -0.08695220947265625, -0.05592835694551468, 0.20859315991401672, 0.2323838323354721, -0.04332403093576431, 0.019506989046931267, 0.08513867110013962, 0.03627939522266388, 0.13354994356632233, 0.037881411612033844, -0.02312607690691948, -0.11544138938188553, 0.03472387045621872, -0.011595119722187519, -0.07462210208177567, 0.039897069334983826, 0.08530730754137039, 0.1073940321803093, -0.05392220988869667, 0.04558559134602547, 0.0686182826757431, 0.0686570256948471, -0.2858038544654846, 0.028794685378670692, -0.06449036300182343, -0.04259563609957695, 0.028431447222828865, -0.03306400403380394, -0.08593257516622543, -0.1948668211698532, 0.17264293134212494, 0.0023308650124818087, -0.03709753230214119, -0.14280416071414948, 0.1048579141497612, 0.008589725010097027, 0.07652296870946884, 0.03311043605208397, 0.009269979782402515, -0.02673550322651863, -0.029153896495699883, 0.05058038607239723, -0.1981526017189026, -0.02792258746922016, -0.018928611651062965, 0.16639021039009094, 0.1780482530593872, 0.043684929609298706, 0.2597597539424896, -0.009390240535140038, 0.09609046578407288, -0.09167627990245819, -0.035635385662317276, 0.15309278666973114, -0.1073058694601059, 0.03681260719895363, -0.10804499685764313, -0.0631590262055397, -0.11156874150037766, -0.12418101727962494, 0.03317501023411751, 0.10388899594545364, -0.09603427350521088, 0.03502516448497772, -0.05398795008659363, -0.1547778844833374, -0.18012069165706635, 0.08424536883831024, 0.07574248313903809, 0.08486168831586838, 0.05824017897248268, 0.04702728986740112, -2.5776166656434194e-32, -0.0041659860871732235, -0.16646191477775574, -0.027490396052598953, -0.21851159632205963, 0.00864497572183609, 0.06067463010549545, -0.008820218965411186, -0.15805970132350922, 0.026732610538601875, -0.2495529055595398, -0.1406535506248474, 0.09606193751096725, 0.07668332755565643, -0.04731371998786926, 0.02451532892882824, -0.1424417346715927, 0.09640035778284073, 0.0021094870753586292, 0.02049006149172783, 0.130677729845047, 0.07492513954639435, 0.07914132624864578, 0.0016761573497205973, -0.056967269629240036, 0.024401023983955383, -0.01686948724091053, -0.0472530759871006, -0.2174483835697174, -0.1987437605857849, 0.020485665649175644, -0.024289175868034363, 0.1749255508184433, 0.007952876389026642, -0.022377733141183853, -0.27377215027809143, -0.23239347338676453, -0.02655063010752201, 0.017868749797344208, -0.2075943648815155, -0.08514760434627533, 0.06097322702407837, 0.061009667813777924, 0.1849277764558792, -0.014826159924268723, -0.22202205657958984, 0.14699892699718475, -0.03257252275943756, 0.030705228447914124, -0.08410502225160599, -0.11631409078836441, -0.014733894728124142, 0.025105543434619904, 0.030378561466932297, 0.06712647527456284, -0.01051767636090517, -0.10280505567789078, 0.059283699840307236, 0.06227445602416992, -0.23763056099414825, 0.062057770788669586, 0.2224188596010208, 0.09148958325386047, 0.05609815940260887, 0.029925156384706497, 0.08582951128482819, -0.04200844466686249, 0.4508396089076996, 0.019765516743063927, 0.12171223759651184, -0.016628963872790337, 0.14314135909080505, 0.006926245521754026, -0.0696856677532196, -0.04180864244699478, 0.02165522240102291, -0.0436115637421608, -0.005040365736931562, -0.17540960013866425, -0.12487643212080002, 0.05842337757349014, 0.029156580567359924, -0.13462260365486145, 0.07452953606843948, -0.07850456982851028, -0.06653652340173721, 0.11201311647891998, 0.013404888100922108, 0.19796250760555267, -0.07699454575777054, 0.045589324086904526, 0.07215690612792969, 0.07220475375652313, -0.1358645260334015, -0.08972130715847015, -0.12915197014808655, 0.1520683467388153, -0.09553911536931992, -0.060484908521175385, 0.029974468052387238, 0.15294961631298065, 0.0791868045926094, -0.16054768860340118, 0.008252901956439018, 0.060083601623773575, 0.05818304792046547, 0.0694006085395813, -0.01583520695567131, 0.013705338351428509, -0.19705094397068024, 0.06384245306253433, -0.17786633968353271, -0.1071280688047409, 0.11423605680465698, -0.01795620284974575, 0.1420460343360901, -0.04356878250837326, -0.00838615745306015, 0.10638176649808884, 0.06660567224025726, 0.06533233076334, -0.10402770340442657, -0.0033836488146334887, 0.11160436272621155, 0.10529369115829468, 0.0077512022107839584, 0.0864495262503624, -0.1257084608078003, -0.15271343290805817, 0.22133050858974457, -0.058291058987379074, 0.05399705842137337, -0.16449441015720367, 7.576010716547898e-7, -0.28292304277420044, 0.21317675709724426, 0.11411413550376892, -0.0873679518699646, -0.05257290229201317, 0.0822240486741066, -0.15824434161186218, 0.07055352628231049, 0.006662661675363779, 0.1477789729833603, 0.09303457289934158, 0.034483835101127625, -0.05173502117395401, 0.00751439668238163, 0.078866146504879, -0.03004533052444458, 0.015151634812355042, -0.0601913183927536, -0.11043516546487808, 0.04165651649236679, -0.06457817554473877, 0.0002787153935059905, -0.016997596248984337, -0.0464160330593586, 0.1191415935754776, -0.04831498861312866, 0.06628331542015076, 0.05648861825466156, 0.030505727976560593, 0.07635556906461716, 0.12246672064065933, 0.03265897557139397, 0.1079697534441948, -0.011078985407948494, 0.07332497090101242, -0.05119115859270096, -0.1474173367023468, 0.0003030237858183682, 0.08353646844625473, -0.011749559082090855, 0.08584579080343246, 0.09585120528936386, -0.16703884303569794, 0.1761232614517212, 0.08651196211576462, 0.028720278292894363, -0.029592297971248627, -0.09472416341304779, 0.09894450008869171, -0.10504010319709778, -0.04120277240872383, 0.18049083650112152, 0.06363634765148163, 0.1885211020708084, -0.0015321613755077124, 0.008101169019937515, -0.05512489005923271, -0.0856110006570816, 0.02312464453279972, -0.1139577329158783, -0.1084623709321022, -0.12319602817296982, 0.05446469038724899, 0.0696609765291214, 0.02737800031900406, -0.061288103461265564, 0.04842989519238472, 1.9029271041039524e-34, -0.014190562069416046, 0.05271052196621895, 0.045702382922172546, -0.12470269203186035, 0.12537860870361328, -0.12865516543388367, 0.08743344992399216, 0.07133259624242783, 0.09957793354988098, -0.16605013608932495, -0.08163389563560486 ]
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.03852714225649834, 0.21572527289390564, -0.07104716449975967, 0.11597459763288498, 0.19315005838871002, 0.06758438795804977, 0.06161530688405037, 0.020787928253412247, 0.05603601038455963, 0.15783120691776276, 0.03504178300499916, -0.03607535734772682, 0.03458936884999275, -0.21215659379959106, 0.05402999371290207, 0.24575763940811157, -0.01080551277846098, 0.011391796171665192, 0.022209588438272476, -0.11175448447465897, -0.13536086678504944, 0.07717715948820114, 0.23185418546199799, -0.10353660583496094, -0.06221611797809601, 0.003616213332861662, -0.05433015525341034, 0.048644762486219406, -0.016147630289196968, -0.11191166937351227, 0.1585759073495865, 0.025037964805960655, -0.07316920161247253, 0.21584905683994293, 0.000005647546913678525, 0.0028720602858811617, 0.1302313506603241, 0.02344054915010929, -0.14507658779621124, -0.03261542692780495, -0.008366142399609089, -0.034960467368364334, 0.06997983157634735, -0.012464111670851707, -0.0965607613325119, -0.05176112428307533, -0.06444879621267319, -0.13779808580875397, 0.11754142493009567, -0.00941381324082613, 0.04675876721739769, 0.03939508646726608, -0.11623968929052353, -0.07220864295959473, 0.1548042595386505, 0.06763530522584915, 0.0525362603366375, 0.019710181280970573, -0.2953593134880066, -0.10401260107755661, -0.021353961899876595, 0.09762769937515259, -0.03413790836930275, 0.03871387243270874, -0.07771534472703934, -0.12435398995876312, -0.14985480904579163, -0.062322378158569336, 0.10875897109508514, 0.1240818053483963, 0.0885825976729393, -0.11271100491285324, -0.04569222778081894, 0.029899924993515015, -0.10024159401655197, 0.00802091509103775, 0.04883680120110512, -0.07046506553888321, -0.061907414346933365, -0.06552837789058685, -0.09659593552350998, -0.08533670008182526, 0.06901499629020691, -0.06419846415519714, -0.16409306228160858, -0.111778624355793, -0.03353377431631088, -0.11529786139726639, -0.16057851910591125, 0.007649948820471764, 0.20910657942295074, -0.15096722543239594, -0.05391965061426163, 0.026200003921985626, -0.049994032829999924, 0.0903027206659317, 0.06150372698903084, 0.12497502565383911, 0.046378523111343384, -0.01305029634386301, -0.07898245751857758, -0.012121511623263359, -0.04985663667321205, 0.025689654052257538, -0.01712125353515148, -0.01129532977938652, -0.01169301476329565, -0.16669496893882751, 0.08896998316049576, 0.11964414268732071, -0.11920005828142166, 0.06539583206176758, -0.06308765709400177, -0.06632927805185318, 0.29233378171920776, 0.08214445412158966, 0.12832669913768768, 0.029913268983364105, 0.088015116751194, 0.15137286484241486, 0.061572954058647156, 0.09133785218000412, -0.027637584134936333, 0.2151169776916504, -0.09977016597986221, 0.10581191629171371, -0.029814358800649643, -0.08585793524980545, -0.179188534617424, -0.06090988218784332, -0.08862366527318954, -0.16320757567882538, 0.07719069719314575, 0.18106450140476227, 0.10533595085144043, -0.08173848688602448, 0.08703099191188812, -0.05039472132921219, -0.04546887427568436, -0.0677427425980568, 0.10648121684789658, -0.19619038701057434, 0.11388889700174332, 0.021281452849507332, 0.012801936827600002, 0.06721866130828857, 0.10227499902248383, -0.05607227608561516, -0.06579973548650742, 0.11209864914417267, -0.03616844862699509, -0.010589486919343472, -0.14994099736213684, 0.04000561684370041, -0.00818176381289959, 0.09588580578565598, 0.19801214337348938, 0.05535539239645004, -0.026196038350462914, -0.20013433694839478, 0.014794469811022282, -0.04971882328391075, -0.015740152448415756, -0.018552400171756744, 0.11852187663316727, 0.27143678069114685, -0.05020119994878769, 0.06387735158205032, -0.0706343874335289, -0.038981303572654724, -0.04014304652810097, -0.17565904557704926, -0.09938167035579681, -0.010747566819190979, -0.140510693192482, -0.020632941275835037, -0.004173485562205315, -0.1381763070821762, -0.28178510069847107, 0.052836839109659195, 0.19039613008499146, 0.12499621510505676, 0.048740070313215256, -0.06878040730953217, 0.01931791752576828, -0.091413214802742, -0.05269820988178253, -0.008099105209112167, -0.05444682016968727, -0.08192875981330872, -0.11167244613170624, -0.0016212896443903446, 0.043602943420410156, 0.02736883983016014, -0.027486449107527733, 0.0392967164516449, 0.05601472780108452, 0.09932893514633179, 0.10139654576778412, -0.17036831378936768, -0.05719969794154167, 0.12293153256177902, -0.04550478979945183, 0.11758455634117126, 0.13825535774230957, 0.01842821203172207, -0.2546599507331848, 0.19404588639736176, -0.10644349455833435, -0.06784825026988983, -0.032704684883356094, 0.005606368649750948, 0.004026096314191818, -0.04603123292326927, -0.14268521964550018, -0.10047836601734161, -0.08839314430952072, 0.05012508109211922, 0.027049753814935684, 0.05380154401063919, -0.060467351227998734, 0.2698115408420563, -0.018591316416859627, 0.04292084649205208, -0.06630676239728928, -0.023227637633681297, 0.0358603410422802, -0.021305356174707413, -0.027557458728551865, -0.021527303382754326, -0.03681562468409538, -0.024273386225104332, -0.002096037147566676, 0.19615592062473297, -0.0027176199946552515, -0.025451747700572014, -0.0483492873609066, -0.2215208262205124, 0.07951553910970688, 0.13829825818538666, -0.10848495364189148, -0.07842659205198288, -0.008607679046690464, 0.04767834395170212, 0.06726556271314621, -0.04083709046244621, -0.015433094464242458, 0.27602192759513855, 0.024897953495383263, -0.1498982161283493, 0.17111286520957947, 0.11724203079938889, -0.08834688365459442, -0.02172841876745224, -0.059926941990852356, 0.04721366986632347, 0.28929153084754944, 0.2078133374452591, 0.05341346561908722, -0.011738806031644344, 0.26699215173721313, 0.09753657132387161, 0.008808025158941746, -0.039231251925230026, 0.130956768989563, -0.06923219561576843, 0.06595958769321442, 0.05411212146282196, -0.04339734464883804, 0.1554548144340515, 0.21465235948562622, 0.03253128379583359, -0.12334096431732178, -0.08109451830387115, -0.08160272985696793, -0.07545699179172516, -0.10743118077516556, 0.022652767598628998, 0.04243747889995575, -0.05167689174413681, -0.2681378126144409, 0.06600628793239594, 0.12934084236621857, -0.06102491542696953, 0.15681211650371552, 0.2150319218635559, -0.13927975296974182, -0.03687618672847748, -0.07035195082426071, 0.08513005077838898, -0.13120821118354797, -0.15878649055957794, 0.06856266409158707, -0.0030157461296766996, 0.07932864874601364, 0.012201196514070034, -0.014703606255352497, -0.18393860757350922, -0.08964116126298904, -0.21683895587921143, 0.005389065947383642, -0.04572268947958946, -0.02893921732902527, -0.21612857282161713, 0.1824105829000473, -0.056069258600473404, 0.15041734278202057, 0.07415883988142014, -0.22178328037261963, -0.08681949973106384, 0.031039845198392868, -0.030028024688363075, 0.1579430252313614, 0.13277141749858856, -0.06243905425071716, -0.06698422878980637, -0.08495710045099258, -0.21497829258441925, 0.05906654894351959, -0.056620340794324875, -0.04620276018977165, -0.11186444014310837, 0.05141255632042885, -0.007921479642391205, -0.060354042798280716, -0.07376103103160858, 0.0946265161037445, -0.03870958089828491, -0.1643032431602478, 0.0004847981908824295, -0.022295387461781502, 0.06301049888134003, -0.06621704995632172, -0.13700982928276062, -0.03244675695896149, -0.05741025134921074, -0.2248545140028, -0.16486623883247375, 0.10539441555738449, 0.010891012847423553, 0.141634002327919, 0.12252628803253174, -0.14523015916347504, 0.14005300402641296, 0.1415037214756012, -0.1826985478401184, -0.04312893748283386, -0.1316438466310501, 0.20760338008403778, -0.09338559210300446, 0.08567407727241516, 0.09016978740692139, -0.08331610262393951, -0.1525760143995285, -0.11301746964454651, 0.09702219814062119, -0.1580708622932434, 0.056321416050195694, -0.0017067508306354284, 0.003839264390990138, -0.058570221066474915, 0.09347596019506454, 0.07170051336288452, -0.07474658638238907, -0.07190485298633575, 0.17120355367660522, 0.11922907084226608, 0.26471754908561707, 0.06925684958696365, -0.07761462777853012, -0.018719790503382683, -0.0998358204960823, -0.2384188324213028, -0.15505696833133698, 0.024741794914007187, 0.04818161576986313, 0.03027382120490074, 0.0308365598320961, 0.020505640655755997, 0.010589984245598316, 0.10162919759750366, -0.2785983979701996, -0.09401623904705048, 0.11638212949037552, 0.02079164981842041, -0.1243806928396225, 0.07407423853874207, -0.028777098283171654, -0.13142120838165283, 0.11672335863113403, 0.09974047541618347, 0.06610216200351715, 0.14387938380241394, -0.043466001749038696, -0.08912965655326843, 0.04420030862092972, 0.011359120719134808, 0.06054665520787239, 0.12458202242851257, -0.04420982301235199, -0.060210760682821274, 0.07655445486307144, -0.017205266281962395, 0.12037115544080734, 0.1372303068637848, -0.06748367846012115, 0.08564179390668869, -0.09924495220184326, 0.19583383202552795, -0.038422852754592896, -0.023510878905653954, 0.035252247005701065, 0.06349736452102661, -0.021568169817328453, 0.11916696280241013, 0.0847780704498291, -0.07797360420227051, -0.10266700387001038, -0.027272474020719528, -0.1256083846092224, -0.15441931784152985, 0.002886708825826645, -0.09222107380628586, -0.0012682853266596794, -0.021689515560865402, 0.0623871348798275, -0.07917792350053787, -0.04318302124738693, -0.07064960151910782, -0.03582146018743515, 0.11611897498369217, 0.046909596771001816, 0.11214546114206314, 0.05398339405655861, 0.16376279294490814, -0.029145246371626854, 0.2354809194803238, -0.18547789752483368, -0.17792664468288422, -0.04728104546666145, -0.09191431850194931, 0.04389693960547447, -0.00800162274390459, -0.039313361048698425, 0.01045268401503563, -0.059261493384838104, -0.052382826805114746, -0.04994034022092819, 0.11299601942300797, -0.07450130581855774, -0.2238539457321167, 0.06267049908638, -0.19996578991413116, -0.12451460212469101, 0.13920776546001434, 0.039676234126091, 0.14750133454799652, -0.23154865205287933, 0.051794424653053284, 0.03155677765607834, -0.13371805846691132, -0.009808254428207874, 0.0162657443434, 0.10896294564008713, -0.11736313253641129, 0.1354578733444214, 0.24607641994953156, -0.25919491052627563, 0.1612924039363861, 0.04989360645413399, -0.1809484213590622, 0.032508522272109985, -0.11465118825435638, 0.04908401891589165, 0.12512804567813873, 0.09829258173704147, 0.04263870790600777, -0.0089346282184124, 0.07323777675628662, -0.07593253999948502, 0.07013650983572006, -0.08875373005867004, 0.0630331039428711, -0.07348516583442688, -0.04233293980360031, 0.21835783123970032, 0.2155531942844391, -0.04661555215716362, 0.016338225454092026, 0.07093729823827744, 0.008365156129002571, 0.1209314689040184, 0.03649384528398514, -0.02807501330971718, -0.09724482148885727, 0.026509251445531845, -0.059798553586006165, -0.12198635190725327, 0.04555883631110191, 0.10946239531040192, 0.08774891495704651, -0.06273238360881805, 0.020048469305038452, 0.0778045505285263, 0.05358028784394264, -0.27456900477409363, 0.0365891233086586, -0.07847656309604645, -0.017616691067814827, 0.014729642309248447, -0.03535209223628044, -0.07365554571151733, -0.20395596325397491, 0.15257051587104797, 0.0024591905530542135, -0.03430476412177086, -0.10498887300491333, 0.08423811197280884, 0.03657982870936394, 0.07941166311502457, 0.024253230541944504, 0.022284790873527527, -0.021639997139573097, -0.012044974602758884, 0.05728030204772949, -0.2165249139070511, -0.026341456919908524, -0.012846475467085838, 0.1524285525083542, 0.1564098596572876, 0.021669713780283928, 0.25553181767463684, -0.03942743316292763, 0.05619717761874199, -0.10216658562421799, -0.047391779720783234, 0.1003187745809555, -0.09978686273097992, 0.043616533279418945, -0.11798176169395447, -0.07241270691156387, -0.13449141383171082, -0.13124223053455353, 0.045685894787311554, 0.10227347910404205, -0.06935117393732071, 0.02716524340212345, -0.06119343638420105, -0.1559489220380783, -0.15982069075107574, 0.12062838673591614, 0.1282394379377365, 0.051954466849565506, 0.04170192405581474, 0.054962340742349625, -2.6093967431650754e-32, -0.009771794080734253, -0.14719051122665405, -0.05575491487979889, -0.20672963559627533, 0.009809369221329689, 0.06600362062454224, -0.011574266478419304, -0.17986434698104858, 0.060285042971372604, -0.23427581787109375, -0.11285506188869476, 0.05827614665031433, 0.08176760375499725, -0.03952381759881973, 0.010569293983280659, -0.15085113048553467, 0.09008564054965973, 0.023176642134785652, 0.014628548175096512, 0.14770027995109558, 0.11934247612953186, 0.06738758087158203, 0.021652908995747566, -0.03286465257406235, 0.019329268485307693, -0.031962133944034576, -0.014901156537234783, -0.21513740718364716, -0.21575531363487244, 0.029370959848165512, -0.030592530965805054, 0.1485482156276703, 0.0009874922689050436, -0.014943583868443966, -0.2734606862068176, -0.20924019813537598, -0.022489136084914207, -0.027576833963394165, -0.20291973650455475, -0.08090502768754959, 0.0741281509399414, 0.07875227928161621, 0.1305936574935913, -0.013356146402657032, -0.20854143798351288, 0.1558663547039032, -0.030237890779972076, 0.03705386444926262, -0.07122364640235901, -0.09935107827186584, 0.008187892846763134, 0.025324445217847824, 0.06643877178430557, 0.10139277577400208, -0.011365273036062717, -0.044114455580711365, 0.06221988797187805, 0.0881386324763298, -0.26750338077545166, 0.08191235363483429, 0.21471437811851501, 0.07584372907876968, 0.0795181542634964, 0.012435576878488064, 0.08148262649774551, -0.019592808559536934, 0.414415568113327, -0.002933894284069538, 0.12088872492313385, -0.02189381793141365, 0.13397468626499176, -0.014232202433049679, -0.0908920019865036, -0.023878447711467743, 0.006935067009180784, -0.038071855902671814, -0.007892774417996407, -0.1655506044626236, -0.11903739720582962, 0.0649627298116684, 0.038589268922805786, -0.13300219178199768, 0.07521271705627441, -0.10725469887256622, -0.062362316995859146, 0.14023077487945557, 0.005702787544578314, 0.22235126793384552, -0.07580309361219406, 0.0442926250398159, 0.05986980348825455, 0.10980577766895294, -0.10283180326223373, -0.08450202643871307, -0.1250912994146347, 0.1606781929731369, -0.07905429601669312, -0.061800118535757065, 0.018669623881578445, 0.14811985194683075, 0.09557047486305237, -0.1746094971895218, 0.026318669319152832, 0.037797052413225174, 0.06175411492586136, 0.07022679597139359, 0.01544592622667551, 0.02108454704284668, -0.19270841777324677, 0.08241086453199387, -0.17912867665290833, -0.1060166209936142, 0.13223665952682495, -0.03890083357691765, 0.13728868961334229, -0.03811799734830856, 0.00012260086077731103, 0.11566731333732605, 0.06850995868444443, 0.05467725545167923, -0.09776376932859421, -0.0008862100658006966, 0.1310604065656662, 0.10392571240663528, 0.00018331238243263215, 0.11084165424108505, -0.11101440340280533, -0.13436353206634521, 0.21635758876800537, -0.05178294703364372, 0.0669514387845993, -0.17478343844413757, 7.608144869664102e-7, -0.27869662642478943, 0.18298450112342834, 0.1206812635064125, -0.10730230063199997, -0.03999333828687668, 0.10995133966207504, -0.162316232919693, 0.06644830107688904, -0.008224097080528736, 0.12933646142482758, 0.08698364347219467, 0.010009173303842545, -0.040122199803590775, 0.0046846154145896435, 0.08600979298353195, -0.017950739711523056, -0.007759380154311657, -0.047311194241046906, -0.10713478922843933, 0.023062758147716522, -0.05742290988564491, -0.005997516680508852, 0.018950963392853737, -0.05372997373342514, 0.09212999045848846, -0.006389102432876825, 0.05621645972132683, 0.052432745695114136, 0.028885414823889732, 0.0637325569987297, 0.12060961127281189, 0.015779845416545868, 0.12557314336299896, -0.013618767261505127, 0.037092480808496475, -0.06055194512009621, -0.16409362852573395, -0.009274857118725777, 0.10554547607898712, -0.026787884533405304, 0.1193169504404068, 0.10748923569917679, -0.17382636666297913, 0.13571114838123322, 0.07466592639684677, 0.025118373334407806, -0.03289702534675598, -0.10187443345785141, 0.07416068017482758, -0.08746463805437088, -0.03675432130694389, 0.17495593428611755, 0.05894408002495766, 0.1974286288022995, 0.010885298252105713, 0.03237603232264519, -0.03463641554117203, -0.09606894105672836, 0.010782544501125813, -0.10987772047519684, -0.10952572524547577, -0.12609942257404327, 0.044683318585157394, 0.06353063881397247, 0.03597584739327431, -0.07354608923196793, 0.060888372361660004, 1.99914900794156e-34, -0.01510432455688715, 0.0715077593922615, 0.04570813477039337, -0.13162930309772491, 0.11575157195329666, -0.1201355904340744, 0.09294424951076508, 0.07718631625175476, 0.10947076231241226, -0.1558617651462555, -0.08599596470594406 ]
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.015426987782120705, 0.25091952085494995, -0.08974751085042953, 0.13132227957248688, 0.18292513489723206, 0.05998988449573517, 0.07095701992511749, 0.006401460617780685, 0.05407913774251938, 0.157596156001091, 0.05946158617734909, -0.06387818604707718, 0.039534032344818115, -0.14844413101673126, 0.05419021472334862, 0.22479312121868134, 0.010759755037724972, 0.019244883209466934, 0.030058857053518295, -0.1147179827094078, -0.14302851259708405, 0.0623631626367569, 0.22947977483272552, -0.13115458190441132, -0.04259231314063072, 0.010426903143525124, -0.07060237228870392, 0.07515610754489899, -0.040511660277843475, -0.09861156344413757, 0.13104794919490814, 0.01443147100508213, -0.1094411313533783, 0.2088170200586319, 0.000005563402282859897, -0.0008441960671916604, 0.1593666821718216, 0.004426274448633194, -0.1135566234588623, -0.019762929528951645, -0.01063265185803175, -0.03778490424156189, 0.04248841851949692, 0.001686452771537006, -0.0856093168258667, -0.023483434692025185, -0.11329306662082672, -0.13742822408676147, 0.12138129025697708, 0.007423460949212313, 0.039776939898729324, 0.03163791447877884, -0.10755172371864319, -0.06208312511444092, 0.1460443139076233, 0.07321922481060028, 0.04255858063697815, 0.07358557730913162, -0.32726889848709106, -0.06275986135005951, -0.03877122327685356, 0.06276051700115204, 0.0027561935130506754, 0.05289794132113457, -0.0670003667473793, -0.11257820576429367, -0.19345307350158691, -0.06556987762451172, 0.08254387229681015, 0.08946336060762405, 0.04516983777284622, -0.10254614800214767, -0.052190151065588, 0.030133577063679695, -0.09490679204463959, -0.04082687944173813, 0.08833416551351547, -0.07391215115785599, -0.05927436426281929, -0.0677138939499855, -0.091653972864151, -0.08056400716304779, 0.06463682651519775, -0.036760248243808746, -0.22538423538208008, -0.09990847110748291, -0.02407011389732361, -0.11871021240949631, -0.12762846052646637, 0.029285717755556107, 0.18349231779575348, -0.16859620809555054, -0.07999914884567261, -0.006533314939588308, -0.06056484207510948, 0.09351226687431335, 0.03953149914741516, 0.11871222406625748, 0.024338457733392715, -0.0051563396118581295, -0.08352881669998169, 0.010197066701948643, -0.057132188230752945, 0.02755647525191307, -0.004584154114127159, -0.04635366052389145, -0.003936450462788343, -0.1275406926870346, 0.10721201449632645, 0.15516509115695953, -0.10596098005771637, 0.06378064304590225, -0.035536009818315506, -0.06050199642777443, 0.25590765476226807, 0.08634816110134125, 0.12380315363407135, 0.03370623663067818, 0.05490581691265106, 0.1599523425102234, 0.05506941303610802, 0.0988086387515068, -0.004127458669245243, 0.2255985587835312, -0.10029193013906479, 0.0707775205373764, -0.0910104289650917, -0.11632156372070312, -0.1758837252855301, -0.06362291425466537, -0.08165588974952698, -0.15714101493358612, 0.03560416027903557, 0.19210761785507202, 0.15079478919506073, -0.11489348858594894, 0.07985049486160278, -0.06642323732376099, 0.001577709917910397, -0.06472714245319366, 0.09824831038713455, -0.18521557748317719, 0.10338342934846878, 0.03713950514793396, 0.017414752393960953, 0.0654904693365097, 0.07954030483961105, -0.04378465935587883, -0.081528440117836, 0.12158961594104767, -0.07911988347768784, 0.008470054715871811, -0.1393652856349945, 0.058053284883499146, -0.0649428516626358, 0.08807606995105743, 0.17389152944087982, 0.021565737202763557, -0.03452630713582039, -0.19609619677066803, 0.04080874100327492, -0.06735512614250183, -0.003495344892144203, -0.007113751024007797, 0.09616445004940033, 0.2737373113632202, -0.05102868378162384, 0.08583862334489822, -0.08523735404014587, -0.08316352218389511, -0.0906357541680336, -0.18119856715202332, -0.074983611702919, 0.01590004377067089, -0.15267708897590637, 0.014439333230257034, -0.0003365581505931914, -0.08030443638563156, -0.3242815136909485, 0.025230661034584045, 0.17537757754325867, 0.11302075535058975, 0.049674730747938156, -0.09790650755167007, 0.052239470183849335, -0.10645002871751785, -0.03281712532043457, 0.018410122022032738, -0.07220977544784546, -0.07003992795944214, -0.11666087806224823, 0.03202863037586212, 0.03183889389038086, 0.028764022514224052, 0.007090216036885977, 0.03360781446099281, 0.08566862344741821, 0.10312925279140472, 0.09774318337440491, -0.18647196888923645, -0.02132282964885235, 0.11100377142429352, -0.06268301606178284, 0.11245150864124298, 0.17317721247673035, 0.022551126778125763, -0.23217563331127167, 0.236375629901886, -0.08138160407543182, -0.10113004595041275, -0.06203141435980797, 0.01870357245206833, -0.02284797467291355, -0.052221231162548065, -0.14882183074951172, -0.10812074691057205, -0.10812036693096161, 0.01110797468572855, 0.033440690487623215, 0.06077868491411209, -0.05385651811957359, 0.252621591091156, -0.005366137251257896, 0.03625112026929855, -0.05577879026532173, 0.00756507134065032, 0.02362806349992752, -0.0437450036406517, -0.004037883132696152, -0.04479098692536354, -0.025927284732460976, -0.06392182409763336, 0.00467324024066329, 0.22602537274360657, 0.05902240425348282, -0.0313911996781826, -0.039571721106767654, -0.18744045495986938, 0.10429681837558746, 0.1321706771850586, -0.07133020460605621, -0.08203098922967911, -0.006898338906466961, 0.06946509331464767, 0.09675363451242447, -0.035820700228214264, -0.06978106498718262, 0.296962171792984, 0.06325268000364304, -0.15587997436523438, 0.16543368995189667, 0.15069611370563507, -0.08823315799236298, -0.034513235092163086, -0.059124905616045, 0.030984699726104736, 0.3119103014469147, 0.20555990934371948, 0.1266898363828659, 0.01865057460963726, 0.29555436968803406, 0.07652725279331207, 0.0031216044444590807, -0.050363510847091675, 0.1214054599404335, -0.07521181553602219, 0.05246984213590622, 0.10581355541944504, -0.054602768272161484, 0.1255059838294983, 0.2515084147453308, 0.05943024903535843, -0.1323191523551941, -0.08302951604127884, -0.09200821071863174, -0.07590948790311813, -0.09922464936971664, 0.03109247423708439, 0.019544461742043495, -0.09464728832244873, -0.2662357985973358, 0.09784214943647385, 0.1397865116596222, -0.0867532417178154, 0.1416405737400055, 0.2206653356552124, -0.15519633889198303, -0.0005990323843434453, -0.10638173669576645, 0.06061340868473053, -0.16809900104999542, -0.15151631832122803, 0.061833713203668594, 0.004013402853161097, 0.11274298280477524, -0.022110870108008385, 0.005211538169533014, -0.21125786006450653, -0.07777605950832367, -0.22711554169654846, 0.021866733208298683, -0.041872963309288025, -0.000027331183446221985, -0.22102034091949463, 0.2136230319738388, -0.042233165353536606, 0.10923969000577927, 0.013270284980535507, -0.20929838716983795, -0.08444581925868988, 0.010548768565058708, -0.02340107411146164, 0.11952054500579834, 0.09990274161100388, -0.0453624464571476, -0.09113351255655289, -0.047069743275642395, -0.21277154982089996, 0.05869848281145096, -0.05016837641596794, -0.05774853751063347, -0.06919461488723755, 0.015613570809364319, -0.007986420765519142, -0.09167328476905823, -0.09166909754276276, 0.10008955001831055, -0.02937433309853077, -0.13242840766906738, 0.025285976007580757, -0.03770434111356735, 0.03143341466784477, -0.06915416568517685, -0.16468693315982819, -0.034601666033267975, -0.0746147409081459, -0.23428969085216522, -0.13243357837200165, 0.12994079291820526, -0.0010086152469739318, 0.11425139755010605, 0.13109581172466278, -0.13656026124954224, 0.11546530574560165, 0.17455577850341797, -0.17290185391902924, -0.020489078015089035, -0.1301719844341278, 0.21932896971702576, -0.04633193090558052, 0.053383275866508484, 0.1124749705195427, -0.08879578113555908, -0.1374644637107849, -0.11575432121753693, 0.06713256984949112, -0.1673630177974701, 0.06871147453784943, 0.00970294140279293, -0.017660900950431824, -0.04473361372947693, 0.11092989891767502, 0.09626021981239319, -0.07017645239830017, -0.09192981570959091, 0.1646047979593277, 0.1360022872686386, 0.2660185694694519, 0.07779999822378159, -0.08791913092136383, -0.0029697392601519823, -0.10133311152458191, -0.2426881194114685, -0.148039311170578, 0.03303758427500725, 0.04354165866971016, 0.03197254240512848, -0.0013850980903953314, 0.011827201582491398, 0.012957234866917133, 0.11953079700469971, -0.28509750962257385, -0.07559799402952194, 0.11617442965507507, 0.03495482727885246, -0.10139022767543793, 0.05152894929051399, -0.021682800725102425, -0.1174321174621582, 0.12214116007089615, 0.10333221405744553, 0.07143232226371765, 0.13750353455543518, 0.005555307492613792, -0.06874526292085648, 0.06595015525817871, 0.021710284054279327, 0.08723150193691254, 0.1075502559542656, -0.01714899204671383, -0.0435321070253849, 0.10682495683431625, 0.006595737300813198, 0.16146500408649445, 0.10665244609117508, -0.07274505496025085, 0.13742397725582123, -0.10189499706029892, 0.20500756800174713, -0.03269709274172783, 0.005168676842004061, 0.036891791969537735, 0.0633462443947792, -0.029938554391264915, 0.13929206132888794, 0.08237838000059128, -0.07201623916625977, -0.07410436123609543, -0.025383908301591873, -0.12134316563606262, -0.1719599813222885, 0.01643657498061657, -0.10444223135709763, -0.013313699513673782, -0.05503765121102333, 0.04928136616945267, -0.039765745401382446, -0.08684545755386353, -0.05445331707596779, -0.03081332892179489, 0.11806979775428772, 0.02288910560309887, 0.09354078024625778, 0.05219892039895058, 0.17542479932308197, -0.0219925157725811, 0.23862577974796295, -0.1755279004573822, -0.18087491393089294, -0.007684723939746618, -0.1365676075220108, 0.04284774139523506, 0.013903355225920677, -0.033412475138902664, -0.0293016005307436, -0.08162039518356323, -0.032707106322050095, -0.04481888562440872, 0.10524611175060272, -0.06558850407600403, -0.2153482884168625, 0.05806104093790054, -0.17936037480831146, -0.14300104975700378, 0.14188767969608307, 0.04517446085810661, 0.12512126564979553, -0.19844689965248108, 0.036611318588256836, 0.029857175424695015, -0.11951511353254318, -0.015432004816830158, 0.05307338759303093, 0.06811534613370895, -0.1204070895910263, 0.14385762810707092, 0.20987367630004883, -0.2452009916305542, 0.13423088192939758, 0.011860270984470844, -0.23340576887130737, 0.019310753792524338, -0.13119810819625854, 0.05528640002012253, 0.1457642763853073, 0.12376632541418076, 0.060349419713020325, -0.021452531218528748, 0.08329050242900848, -0.11068752408027649, 0.10807005316019058, -0.10073930770158768, 0.0761638805270195, -0.04609682783484459, -0.03938429430127144, 0.24756966531276703, 0.20254027843475342, -0.022803716361522675, 0.030297689139842987, 0.04742172732949257, 0.01128828153014183, 0.09545167535543442, 0.023661401122808456, 0.03606303781270981, -0.10060079395771027, 0.027969228103756905, -0.07734991610050201, -0.10480441898107529, 0.011594336479902267, 0.1416594386100769, 0.09673912823200226, -0.07169972360134125, 0.047050122171640396, 0.04916397109627724, 0.06912258267402649, -0.2554759085178375, 0.04203091561794281, -0.06938397884368896, -0.02217552624642849, 0.0025904036592692137, -0.07237344235181808, -0.05080343037843704, -0.2185947746038437, 0.15923811495304108, -0.008517717942595482, -0.05464177578687668, -0.12632371485233307, 0.12450915575027466, 0.01767890155315399, 0.06481784582138062, 0.02722073346376419, 0.028871523216366768, -0.04598264768719673, -0.012049907818436623, 0.04475153982639313, -0.20966379344463348, -0.015462706796824932, -0.024796290323138237, 0.1354071944952011, 0.12040267884731293, 0.020690681412816048, 0.20024821162223816, -0.02281107008457184, 0.04760979861021042, -0.1262202113866806, -0.021888455376029015, 0.09250649064779282, -0.08939863741397858, 0.005927943624556065, -0.11651413887739182, -0.0649092048406601, -0.15599854290485382, -0.1505633443593979, 0.05889706313610077, 0.139516681432724, -0.09009445458650589, 0.01344083808362484, -0.002953477669507265, -0.13170930743217468, -0.16046437621116638, 0.10144025087356567, 0.09550143033266068, 0.060361023992300034, 0.04213973134756088, 0.08894108980894089, -2.6188468361249234e-32, 0.020386116579174995, -0.12321039289236069, -0.05134899914264679, -0.2355634719133377, -0.016771893948316574, 0.0465107299387455, -0.051593221724033356, -0.19754166901111603, 0.058776479214429855, -0.23890134692192078, -0.11039760708808899, 0.11673882603645325, 0.09209732711315155, -0.042973026633262634, 0.04207805544137955, -0.15623284876346588, 0.10396162420511246, 0.008078332990407944, 0.00789374765008688, 0.11465498805046082, 0.10318756848573685, 0.0707910880446434, -0.011998887173831463, -0.01555661205202341, 0.020980972796678543, -0.030998600646853447, -0.02045566216111183, -0.22091585397720337, -0.20751908421516418, 0.0093607809394598, -0.00965885166078806, 0.15143536031246185, 0.005072478204965591, -0.030894743278622627, -0.2558726966381073, -0.20113466680049896, -0.06392434239387512, 0.020280374214053154, -0.17602521181106567, -0.0823461040854454, 0.04714171960949898, 0.0919225737452507, 0.142460897564888, 0.00845679733902216, -0.20806899666786194, 0.14481289684772491, -0.045790206640958786, 0.022584283724427223, -0.07785757631063461, -0.10220972448587418, 0.004452704451978207, 0.0021653289441019297, 0.07844691723585129, 0.10416312515735626, 0.031247517094016075, -0.05803999304771423, 0.07969294488430023, 0.08318068087100983, -0.24409815669059753, 0.09377099573612213, 0.28921443223953247, 0.0677461251616478, 0.08253872394561768, 0.0414598286151886, 0.05266780033707619, -0.04749579727649689, 0.40498417615890503, 0.009330777451395988, 0.1393842250108719, -0.05983975902199745, 0.1561756283044815, -0.013690982013940811, -0.06504613161087036, -0.049901191145181656, 0.017897116020321846, -0.031074268743395805, -0.00461181765422225, -0.15601982176303864, -0.1071656346321106, 0.028923168778419495, 0.0480336993932724, -0.1622481495141983, 0.03986627608537674, -0.0757065862417221, -0.04513774812221527, 0.10833651572465897, -0.016845960170030594, 0.18246744573116302, -0.07797814905643463, 0.05796089023351669, 0.039298199117183685, 0.1278820037841797, -0.10110094398260117, -0.08248879015445709, -0.07622147351503372, 0.12566295266151428, -0.11692671477794647, -0.01806679368019104, 0.02271648496389389, 0.1601998656988144, 0.10594800114631653, -0.17161044478416443, 0.05699541047215462, -0.014322087168693542, 0.020869120955467224, 0.06528794020414352, -0.004097757861018181, -0.0031408541835844517, -0.1803709864616394, 0.06857016682624817, -0.16905350983142853, -0.07024653255939484, 0.08610128611326218, -0.02019108273088932, 0.13217049837112427, 0.002035701647400856, 0.011704733595252037, 0.09258542209863663, 0.0520302951335907, 0.04451944679021835, -0.05845601484179497, 0.043290141969919205, 0.12077686935663223, 0.11183308064937592, 0.0032097576186060905, 0.08621526509523392, -0.12371229380369186, -0.2074427604675293, 0.2050120085477829, -0.05720098689198494, 0.052897434681653976, -0.14122897386550903, 7.547332643298432e-7, -0.26947006583213806, 0.21951249241828918, 0.11689147353172302, -0.09048017859458923, -0.04574316740036011, 0.09187104552984238, -0.18460039794445038, 0.057389840483665466, -0.010558323003351688, 0.1150321215391159, 0.09766943007707596, 0.02323361672461033, -0.019214605912566185, 0.01093060802668333, 0.11104228347539902, -0.004691854119300842, 0.003299215342849493, -0.06273805350065231, -0.12765181064605713, 0.027923766523599625, -0.060167573392391205, -0.007547407876700163, -0.012633177451789379, -0.08014778792858124, 0.12732382118701935, 0.005897639784961939, 0.0366114005446434, 0.0758340060710907, 0.011178501881659031, 0.06774836033582687, 0.11101113259792328, 0.018380125984549522, 0.10320886224508286, -0.0041149938479065895, 0.03724761679768562, -0.07945127040147781, -0.18599961698055267, 0.0045087700709700584, 0.10365506261587143, -0.008154019713401794, 0.09678613394498825, 0.09820070117712021, -0.14689083397388458, 0.1524597555398941, 0.08745384216308594, 0.07478010654449463, -0.023494908586144447, -0.10766970366239548, 0.05923917889595032, -0.06754890829324722, -0.06907743960618973, 0.15865135192871094, 0.06174106150865555, 0.2201947569847107, -0.00014040168025530875, 0.006493915803730488, -0.004392128903418779, -0.08713960647583008, 0.027070412412285805, -0.08274943381547928, -0.11676544696092606, -0.12072710692882538, 0.0544656477868557, 0.08821527659893036, 0.01123588252812624, -0.10354480892419815, 0.041210152208805084, 1.879545327604647e-34, 0.007960801012814045, 0.06490994244813919, 0.03947087377309799, -0.1351051926612854, 0.1351207047700882, -0.11884067952632904, 0.06266076862812042, 0.0664951428771019, 0.07386142760515213, -0.12877130508422852, -0.11230619251728058 ]
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.04325849935412407, 0.25830143690109253, -0.08452309668064117, 0.09481841325759888, 0.20226508378982544, 0.07677227258682251, 0.0883791521191597, -0.008818232454359531, 0.055666230618953705, 0.156374990940094, 0.055595360696315765, -0.057997219264507294, 0.03429935500025749, -0.18175625801086426, 0.06410970538854599, 0.24296532571315765, -0.030124524608254433, 0.01405886560678482, 0.017639553174376488, -0.10317765176296234, -0.1616867035627365, 0.05427411571145058, 0.23852817714214325, -0.11505527794361115, -0.06189284101128578, 0.035609811544418335, -0.05580725520849228, 0.039084479212760925, 0.005255316849797964, -0.11090581864118576, 0.11446689069271088, 0.0465279258787632, -0.07997956871986389, 0.2540333569049835, 0.000005678295565303415, -0.00693828659132123, 0.20123013854026794, 0.013329925015568733, -0.13764424622058868, -0.09091032296419144, -0.01363029982894659, -0.021435674279928207, 0.03460834547877312, -0.021218450739979744, -0.082850880920887, -0.04101189598441124, -0.02282184548676014, -0.13146567344665527, 0.09953045845031738, -0.0066539207473397255, 0.03482602536678314, 0.02135973796248436, -0.08502593636512756, -0.07659748196601868, 0.11067233234643936, 0.059947576373815536, 0.07309598475694656, 0.04973607882857323, -0.30235663056373596, -0.10310406237840652, -0.0326317623257637, 0.07136508077383041, -0.008719216100871563, 0.032812945544719696, -0.03978794440627098, -0.08713135868310928, -0.17613384127616882, -0.08873365074396133, 0.09954457730054855, 0.11537225544452667, 0.07436118274927139, -0.13042382895946503, -0.04905933886766434, 0.054399147629737854, -0.11627749353647232, -0.042818762362003326, 0.06172580644488335, -0.08976926654577255, -0.020299607887864113, -0.06285972893238068, -0.09251262992620468, -0.08879838138818741, 0.06436272710561752, -0.05419934168457985, -0.20915140211582184, -0.12338371574878693, -0.014412865974009037, -0.0987018421292305, -0.13308362662792206, 0.03496269881725311, 0.20230309665203094, -0.17601700127124786, -0.05827174708247185, 0.021682405844330788, -0.05235905572772026, 0.08640391379594803, 0.04166225343942642, 0.10154026746749878, 0.01780742034316063, -0.01735435053706169, -0.08175131678581238, -0.03889772668480873, -0.057642437517642975, 0.03461929038167, 0.0023491287138313055, -0.04353829100728035, -0.04004640132188797, -0.15508076548576355, 0.09459478408098221, 0.10741163045167923, -0.12498221546411514, 0.07312920689582825, -0.05455535277724266, -0.04337656497955322, 0.2971651256084442, 0.08038432151079178, 0.1433442234992981, 0.04097987711429596, 0.05541394278407097, 0.18937277793884277, 0.06176900491118431, 0.08039423078298569, -0.05083085969090462, 0.22018977999687195, -0.098504438996315, 0.08164331316947937, -0.0540727861225605, -0.08462899178266525, -0.15988846123218536, -0.04990706592798233, -0.06151171773672104, -0.1427813321352005, 0.07647355645895004, 0.19845981895923615, 0.1306946873664856, -0.10266275703907013, 0.07253661751747131, -0.05295387655496597, -0.00950729288160801, -0.041382450610399246, 0.11331811547279358, -0.186671182513237, 0.08048944920301437, 0.00612345477566123, 0.054512690752744675, 0.038437407463788986, 0.0765630304813385, -0.03445223718881607, -0.05901486426591873, 0.12451229989528656, -0.028186503797769547, 0.022255325689911842, -0.11317043751478195, 0.06045515835285187, -0.00578244449570775, 0.08278386294841766, 0.15847600996494293, 0.0215021762996912, -0.06427028775215149, -0.18620416522026062, -0.018789296969771385, -0.0710558295249939, -0.030368980020284653, -0.011031083762645721, 0.10221938043832779, 0.2848970293998718, -0.03380897641181946, 0.0896461009979248, -0.05100509524345398, -0.0122538385912776, -0.09805583208799362, -0.17700764536857605, -0.09522449970245361, -0.0048080007545650005, -0.14420747756958008, -0.007380511611700058, 0.0034691132605075836, -0.1334616094827652, -0.28179731965065, 0.020478632301092148, 0.14407508075237274, 0.09348995983600616, 0.033729877322912216, -0.09269869327545166, 0.008820226415991783, -0.11250337213277817, -0.059810250997543335, 0.001999245723709464, -0.03241422772407532, -0.08207552880048752, -0.11087529361248016, 0.022672411054372787, 0.0545208640396595, 0.036066167056560516, -0.005438316147774458, 0.01205943152308464, 0.05177287012338638, 0.05279596522450447, 0.07736784964799881, -0.139499232172966, -0.04665706679224968, 0.10393835604190826, -0.0488254614174366, 0.07160112261772156, 0.14223811030387878, 0.0270223431289196, -0.26493510603904724, 0.1923280507326126, -0.04387234151363373, -0.10967840999364853, -0.08376671373844147, -0.0005202835309319198, 0.003733475226908922, -0.0337764173746109, -0.14546239376068115, -0.08410944789648056, -0.10961496829986572, 0.05221705138683319, 0.004068412818014622, 0.020644569769501686, -0.06870995461940765, 0.2732268273830414, 0.023289276286959648, 0.03380841016769409, -0.08092091977596283, -0.009037108160555363, 0.022722482681274414, -0.04860299825668335, 0.023617442697286606, -0.03668083995580673, -0.011955877766013145, -0.04675212875008583, -0.019093213602900505, 0.19002102315425873, 0.0002940553240478039, -0.04335646703839302, -0.04147932305932045, -0.1998033970594406, 0.08801251649856567, 0.12638898193836212, -0.09307835251092911, -0.1005091592669487, 0.0015669510466977954, 0.03812780976295471, 0.05652147904038429, -0.029604056850075722, -0.042234551161527634, 0.3054009974002838, 0.0492364726960659, -0.14894434809684753, 0.19060012698173523, 0.11058942973613739, -0.0738862082362175, -0.029999198392033577, -0.07451841980218887, 0.06454373151063919, 0.3151471018791199, 0.21921925246715546, 0.08885454386472702, 0.03632756322622299, 0.29888415336608887, 0.07616418600082397, 0.0020377649925649166, -0.04218674451112747, 0.08176258951425552, -0.06580372154712677, 0.019204918295145035, 0.08078543096780777, -0.048835575580596924, 0.1738435924053192, 0.20902825891971588, 0.047935452312231064, -0.12713178992271423, -0.06656954437494278, -0.06249045208096504, -0.06433219462633133, -0.09874209016561508, 0.003580501303076744, 0.024153176695108414, -0.08743812143802643, -0.23011602461338043, 0.03403405472636223, 0.12041797488927841, -0.07498493045568466, 0.14568912982940674, 0.21172146499156952, -0.13422466814517975, -0.048023536801338196, -0.09138264507055283, 0.06867366284132004, -0.13201084733009338, -0.15680615603923798, 0.0667988583445549, 0.01912926323711872, 0.07056902348995209, 0.008864417672157288, 0.025291286408901215, -0.2040323168039322, -0.09179320931434631, -0.25860753655433655, 0.041006576269865036, -0.05231727287173271, 0.005830508656799793, -0.21738743782043457, 0.18249526619911194, -0.03882838413119316, 0.12019795179367065, 0.06005701795220375, -0.19762763381004333, -0.11759945005178452, 0.06502445042133331, -0.016803205013275146, 0.1099732369184494, 0.1115838810801506, -0.05323604494333267, -0.06894542276859283, -0.06711278855800629, -0.23713494837284088, 0.061347778886556625, -0.0740666389465332, -0.060239266604185104, -0.0885210856795311, 0.06041012331843376, -0.027657143771648407, -0.04349762573838234, -0.09270109236240387, 0.08220318704843521, -0.003967435099184513, -0.16795991361141205, 0.029022151604294777, -0.02196674607694149, 0.04103287309408188, -0.065799780189991, -0.1601468324661255, -0.033447541296482086, -0.062186598777770996, -0.20778530836105347, -0.15493541955947876, 0.13378950953483582, 0.05186369642615318, 0.12607577443122864, 0.15856195986270905, -0.14055176079273224, 0.11018037796020508, 0.13498830795288086, -0.14375244081020355, -0.04244602099061012, -0.14672502875328064, 0.24181677401065826, -0.08434951305389404, 0.06199626252055168, 0.10884922742843628, -0.0465489998459816, -0.1568232625722885, -0.09496411681175232, 0.032912563532590866, -0.1845901906490326, 0.08101720362901688, -0.00016946287360042334, 0.05970970168709755, -0.007996504195034504, 0.08758079260587692, 0.10238602757453918, -0.08766999840736389, -0.1314491629600525, 0.1461186558008194, 0.10980498790740967, 0.2612977921962738, 0.10928428918123245, -0.0733751729130745, -0.032589878886938095, -0.0879102572798729, -0.19118697941303253, -0.152558371424675, 0.0021951994858682156, 0.056512441486120224, 0.03426153212785721, 0.009199285879731178, -0.030871540307998657, -0.003315229434520006, 0.10542575269937515, -0.268390953540802, -0.0735788345336914, 0.13393791019916534, 0.0009617125033400953, -0.12397477775812149, 0.06369535624980927, -0.024039778858423233, -0.1348915547132492, 0.1281946301460266, 0.0813528448343277, 0.08811759203672409, 0.1495455950498581, -0.017938176169991493, -0.056618209928274155, 0.052284929901361465, 0.010585105046629906, 0.06544385850429535, 0.13085217773914337, -0.07509751617908478, -0.04985042288899422, 0.1216580718755722, -0.01854786090552807, 0.13385239243507385, 0.14979837834835052, -0.07734986394643784, 0.10844220221042633, -0.07760638743638992, 0.20282602310180664, -0.00047764135524630547, -0.008664068765938282, 0.036565374583005905, 0.07703527063131332, -0.05047233775258064, 0.1406409740447998, 0.09027117490768433, -0.07958988100290298, -0.0969800129532814, -0.032545141875743866, -0.10531802475452423, -0.17340929806232452, 0.0011012597242370248, -0.08685309439897537, -0.008970087394118309, -0.01943180151283741, 0.06661426275968552, -0.06875547021627426, -0.08335188776254654, -0.05651675909757614, -0.043347012251615524, 0.1473817229270935, 0.07657370716333389, 0.1312054842710495, 0.0447862409055233, 0.18197976052761078, 0.004492449574172497, 0.22629360854625702, -0.169258713722229, -0.20110830664634705, -0.04909496381878853, -0.08207235485315323, 0.04738418012857437, -0.0026268025394529104, -0.027427276596426964, -0.00507794413715601, -0.08091583102941513, -0.0393931083381176, -0.05159492790699005, 0.10312038660049438, -0.06218820810317993, -0.18400751054286957, 0.0327020138502121, -0.20649531483650208, -0.09934929013252258, 0.14650125801563263, 0.046537455171346664, 0.14777572453022003, -0.2377953827381134, 0.03056124970316887, 0.04593277722597122, -0.15137338638305664, -0.0254603810608387, 0.03895086050033569, 0.08545173704624176, -0.1333913803100586, 0.1546168476343155, 0.2306360900402069, -0.23499654233455658, 0.16005799174308777, 0.02843111753463745, -0.2003917098045349, 0.05283121392130852, -0.12587101757526398, 0.03817540407180786, 0.13633908331394196, 0.11252348870038986, 0.06600034236907959, -0.072280153632164, 0.0691334679722786, -0.07058671116828918, 0.10535064339637756, -0.11849021166563034, 0.050639186054468155, -0.05716174468398094, -0.059831660240888596, 0.21937917172908783, 0.1900116503238678, -0.03932654485106468, 0.012322542257606983, 0.03795194253325462, 0.02395302802324295, 0.12157277017831802, 0.05875523388385773, 0.004387846682220697, -0.0919089987874031, -0.031551286578178406, -0.05442393943667412, -0.069837786257267, 0.02558794431388378, 0.1176280602812767, 0.10854507237672806, -0.05934717878699303, 0.03810140863060951, 0.024158379063010216, 0.07698187977075577, -0.24664117395877838, 0.03063570335507393, -0.09445694088935852, -0.0041589937172830105, -0.019747618585824966, -0.0577850379049778, -0.05214712396264076, -0.18649043142795563, 0.11147678643465042, -0.00474603520706296, -0.0714048445224762, -0.10029759258031845, 0.11444362252950668, 0.019067279994487762, 0.03242649883031845, -0.008803488686680794, 0.01315030176192522, -0.02410038374364376, -0.00890591274946928, 0.04650666192173958, -0.19538214802742004, -0.025027256458997726, -0.003836708841845393, 0.16613256931304932, 0.1207762137055397, 0.005065287929028273, 0.23102861642837524, -0.042660415172576904, 0.043940912932157516, -0.12212570011615753, -0.018976161256432533, 0.11634474992752075, -0.09938981384038925, 0.04833564534783363, -0.09426601976156235, -0.06644134968519211, -0.14643245935440063, -0.17213407158851624, 0.0384291410446167, 0.09852702915668488, -0.09226354211568832, 0.025990957394242287, -0.045242954045534134, -0.15156342089176178, -0.1383209526538849, 0.09871130436658859, 0.13421191275119781, 0.06466358155012131, 0.0220999363809824, 0.03464096412062645, -2.640639325894818e-32, -0.0037454620469361544, -0.12356739491224289, -0.06143300607800484, -0.20543687045574188, -0.024198120459914207, 0.05314486846327782, -0.052127812057733536, -0.18058671057224274, 0.037272315472364426, -0.22037890553474426, -0.07904835045337677, 0.06615329533815384, 0.06940894573926926, -0.06708888709545135, 0.00664943503215909, -0.1743745505809784, 0.10861469805240631, 0.0397958941757679, 0.008438964374363422, 0.12206821143627167, 0.1254092901945114, 0.06605914980173111, 0.033606890588998795, -0.057283271104097366, -0.017666980624198914, -0.030604258179664612, -0.031239932402968407, -0.2017175406217575, -0.1777523159980774, 0.03463667258620262, -0.012297220528125763, 0.18669728934764862, -0.029020441696047783, -0.052479058504104614, -0.2632732391357422, -0.19952067732810974, -0.017931845039129257, -0.031860679388046265, -0.19732144474983215, -0.08003890514373779, 0.0854555144906044, 0.07984325289726257, 0.14974498748779297, -0.01837369054555893, -0.21596737205982208, 0.13111460208892822, -0.02050814777612686, 0.020371420308947563, -0.08876795321702957, -0.0913727879524231, 0.009600612334907055, 0.056081030517816544, 0.05289993807673454, 0.0806279107928276, 0.0064461310394108295, -0.12532725930213928, 0.07233590632677078, 0.1024014875292778, -0.24037401378154755, 0.08169475942850113, 0.22080418467521667, 0.07061252743005753, 0.09462317079305649, 0.03768868371844292, 0.09199885278940201, -0.044731538742780685, 0.41972616314888, 0.028970306739211082, 0.15326909720897675, -0.004303567111492157, 0.0848052054643631, -0.018260590732097626, -0.06350134313106537, -0.0004860360058955848, 0.03221297264099121, -0.04150233790278435, 0.001313437125645578, -0.13520017266273499, -0.1376630812883377, 0.08273144066333771, 0.009080079384148121, -0.13786602020263672, 0.053849492222070694, -0.06875766068696976, -0.0438944473862648, 0.17960454523563385, 0.015000195242464542, 0.2094242423772812, -0.08345025777816772, 0.04950147867202759, 0.038814909756183624, 0.14263904094696045, -0.08645718544721603, -0.1059880182147026, -0.09932441264390945, 0.1938457489013672, -0.06932071596384048, -0.04203864187002182, 0.04270084574818611, 0.1024557575583458, 0.1069766953587532, -0.16614125669002533, 0.03261420130729675, 0.03122994303703308, 0.04128549247980118, 0.05200054496526718, -0.019531138241291046, 0.004092520102858543, -0.19673553109169006, 0.05438917502760887, -0.16773484647274017, -0.12282703071832657, 0.08576349169015884, -0.02556062862277031, 0.15080267190933228, -0.01469143945723772, -0.003907203674316406, 0.1074729710817337, 0.07397016137838364, 0.032618261873722076, -0.07392790913581848, 0.04940013960003853, 0.12780478596687317, 0.0961165800690651, -0.0007689124904572964, 0.10443205386400223, -0.12075675278902054, -0.17757713794708252, 0.23289836943149567, -0.035303328186273575, 0.05303843691945076, -0.1650124192237854, 7.634891403540678e-7, -0.2689792513847351, 0.16335181891918182, 0.10994292050600052, -0.10269795358181, -0.0574149414896965, 0.10677492618560791, -0.1441015899181366, 0.04539862647652626, -0.037384022027254105, 0.10763385146856308, 0.10807202011346817, 0.025879699736833572, -0.02254818193614483, 0.010482016950845718, 0.11897936463356018, -0.012669786810874939, -0.0010021766647696495, -0.04594479128718376, -0.1002693772315979, 0.022449536249041557, -0.08064550906419754, 0.018681354820728302, 0.002977343974635005, -0.05710823833942413, 0.09677733480930328, -0.005520862527191639, 0.0452883280813694, 0.05866625905036926, 0.03448372706770897, 0.09727600961923599, 0.10156924277544022, -0.003834756091237068, 0.1078445091843605, -0.012321538291871548, 0.04164329171180725, -0.05167141929268837, -0.18920888006687164, -0.011974198743700981, 0.09144732356071472, 0.012511884793639183, 0.10721033066511154, 0.09578428417444229, -0.14499440789222717, 0.1592206060886383, 0.0468074306845665, 0.031373243778944016, -0.05074455216526985, -0.09078935533761978, 0.0723816528916359, -0.08426398038864136, -0.030617730692029, 0.18049196898937225, 0.060845740139484406, 0.20036228001117706, -0.020770074799656868, 0.022670937702059746, -0.010020012967288494, -0.11402007937431335, 0.02440279722213745, -0.07493209838867188, -0.1414416879415512, -0.12656612694263458, 0.07495056837797165, 0.04570901021361351, 0.05722011625766754, -0.062277741730213165, 0.06282370537519455, 1.983609982814147e-34, -0.004370430484414101, 0.057690974324941635, 0.06607875972986221, -0.11837537586688995, 0.10981204360723495, -0.087558314204216, 0.06599254161119461, 0.06236422061920166, 0.09499256312847137, -0.1432778388261795, -0.0866360142827034 ]
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.14505766332149506, 0.03431820869445801, -0.15589900314807892, 0.03855467587709427, 0.15187419950962067, -0.07680393755435944, -0.0807480439543724, 0.019416794180870056, -0.05749907344579697, 0.20859740674495697, 0.044935937970876694, 0.03209194168448448, -0.11811338365077972, -0.029220091179013252, 0.003486052853986621, -0.05163054168224335, -0.017474260181188583, 0.08109127730131149, -0.044878579676151276, -0.019962690770626068, -0.1702556312084198, 0.0072794584557414055, 0.07306156307458878, -0.054827749729156494, -0.05831209570169449, -0.21362867951393127, -0.07377820461988449, 0.041348040103912354, 0.012768363580107689, -0.11863987892866135, -0.17324082553386688, -0.14496417343616486, -0.09709851443767548, 0.1465243548154831, 0.000005724781658500433, -0.07455863058567047, 0.23470249772071838, 0.0685616135597229, -0.0018291332526132464, 0.23684851825237274, 0.07294577360153198, -0.05765410140156746, 0.12537619471549988, 0.16612911224365234, 0.11186937242746353, 0.019624589011073112, -0.00792230386286974, -0.11525847017765045, 0.0837118998169899, -0.010144175961613655, 0.02952829748392105, -0.032703086733818054, 0.06592712551355362, -0.06288357079029083, 0.18570147454738617, 0.068429134786129, 0.03830839321017265, -0.07843334972858429, -0.1714704930782318, -0.0033563144970685244, -0.03812148794531822, 0.09970742464065552, 0.02106769010424614, 0.10908225923776627, 0.07862711697816849, 0.07993246614933014, -0.05329824984073639, -0.11684435606002808, 0.045175518840551376, 0.07933059334754944, -0.16096852719783783, 0.007540537975728512, 0.04263134300708771, 0.1031741052865982, -0.11228937655687332, -0.11191413551568985, -0.059255581349134445, 0.18776041269302368, -0.02438507229089737, -0.1800665557384491, -0.0033908786717802286, 0.17100746929645538, -0.08397433906793594, 0.018457068130373955, -0.13472221791744232, -0.09884191304445267, -0.10093662142753601, 0.0376458503305912, 0.11012865602970123, -0.03687610104680061, -0.06912543624639511, 0.021342631429433823, -0.04402641952037811, -0.08022388070821762, 0.021512366831302643, 0.14797212183475494, 0.04413639008998871, -0.21714529395103455, 0.04751380532979965, -0.345098078250885, 0.02443675696849823, 0.03226890042424202, 0.012509179301559925, 0.069405697286129, 0.1300152689218521, -0.1743038147687912, -0.10041525959968567, -0.020353879779577255, 0.08864028006792068, -0.06346993148326874, -0.04694840684533119, 0.12318270653486252, 0.06303112208843231, 0.02963387966156006, 0.18160730600357056, -0.13070836663246155, 0.0600932240486145, 0.06907717138528824, 0.029276849702000618, 0.16768358647823334, 0.09482774883508682, 0.10207846760749817, -0.03377951309084892, 0.18078625202178955, -0.04274814575910568, 0.1646193116903305, -0.1686268448829651, -0.12630002200603485, -0.25531044602394104, 0.12265405803918839, -0.11415084451436996, -0.016077786684036255, -0.05815838649868965, 0.005997150670737028, -0.031831417232751846, 0.10640979558229446, 0.12195093929767609, -0.021586941555142403, -0.14792081713676453, -0.22761692106723785, 0.1578943282365799, -0.22204770147800446, 0.22594812512397766, 0.061749882996082306, -0.015113452449440956, 0.10302963107824326, -0.05407930910587311, 0.1266435980796814, 0.12353513389825821, 0.1286221742630005, -0.25002357363700867, 0.09649674594402313, -0.07351484894752502, -0.019789719954133034, 0.10801870375871658, 0.07851649820804596, -0.02294008806347847, -0.07990376651287079, -0.13960610330104828, 0.061857856810092926, 0.09416830539703369, -0.05011532083153725, -0.053329963237047195, -0.13559190928936005, -0.032753054052591324, -0.020856330171227455, -0.0017983405850827694, 0.12031206488609314, -0.05170572176575661, 0.00794505700469017, 0.2558667063713074, 0.05916430428624153, -0.0051986356265842915, 0.15590088069438934, -0.01818530634045601, 0.11541427671909332, -0.10128878057003021, 0.10066327452659607, -0.3010767102241516, 0.19863516092300415, 0.06437458097934723, -0.15526962280273438, -0.11445813626050949, 0.013975827023386955, 0.2257685661315918, 0.02855081297457218, 0.11750324815511703, 0.012059864588081837, -0.018300464376807213, -0.06363951414823532, -0.03794027492403984, -0.05819239839911461, -0.15358436107635498, -0.012878015637397766, 0.04776602238416672, -0.19408239424228668, 0.008525745943188667, -0.026692897081375122, 0.02599906362593174, -0.1779295951128006, 0.033125508576631546, 0.17282326519489288, -0.05235229805111885, -0.015533273108303547, -0.20231322944164276, 0.0457795187830925, -0.08313031494617462, 0.14566364884376526, -0.08274204283952713, -0.23224149644374847, -0.1386401206254959, 0.191056028008461, 0.1257125735282898, 0.07543355226516724, -0.038945529609918594, -0.31231993436813354, -0.09215575456619263, -0.08053980767726898, -0.0552617609500885, 0.10456353425979614, -0.005436580628156662, 0.014315208420157433, 0.09068430960178375, 0.06695471704006195, 0.0540962740778923, 0.03911930322647095, 0.13637398183345795, 0.014106858521699905, -0.07978454977273941, -0.016202811151742935, -0.03667769953608513, -0.014171544462442398, 0.1819472312927246, -0.08688867837190628, 0.010154721327126026, -0.009697895497083664, -0.11484066396951675, -0.15873877704143524, 0.09194773435592651, 0.002673740265890956, 0.024197150021791458, 0.01879546418786049, -0.18692725896835327, -0.08142036199569702, 0.11603066325187683, -0.0834825411438942, 0.0784544125199318, 0.08587505668401718, 0.06911739706993103, 0.00019524987146724015, 0.1696215569972992, 0.03130800276994705, -0.03560540825128555, -0.14013276994228363, -0.15086252987384796, -0.028660360723733902, 0.13765138387680054, 0.03794935718178749, 0.15174463391304016, -0.044998932629823685, 0.25348034501075745, 0.05835979804396629, 0.06356554478406906, 0.023808280006051064, -0.04738674685359001, -0.0585179403424263, -0.034976206719875336, 0.08286412060260773, -0.05764361470937729, 0.09822764992713928, 0.051912058144807816, -0.08228912204504013, 0.03145414963364601, -0.024562831968069077, -0.11261676251888275, 0.04925375431776047, 0.017855329439044, -0.07833264768123627, -0.011878103949129581, -0.02628990262746811, 0.04874036833643913, 0.05778832361102104, 0.12677793204784393, 0.017616787925362587, 0.05160295590758324, 0.08642420917749405, 0.023565026000142097, 0.07475253939628601, -0.07573001086711884, 0.21803145110607147, 0.017542190849781036, -0.10787010192871094, -0.0059395041316747665, -0.09000059962272644, -0.04263417050242424, -0.07354919612407684, 0.015707995742559433, -0.04544450715184212, 0.06129605695605278, -0.02141578495502472, 0.21649980545043945, -0.01640247367322445, -0.0670030266046524, -0.04065141826868057, -0.03376660868525505, -0.1217706948518753, 0.05520456284284592, 0.012093311175704002, -0.18556322157382965, 0.09028054773807526, -0.04707251489162445, 0.10271076112985611, 0.13731873035430908, 0.011894418857991695, 0.0019450865220278502, 0.10097964107990265, -0.02823093719780445, -0.09772385656833649, 0.04109477251768112, -0.03344380855560303, 0.05650255084037781, 0.06348089873790741, -0.21122252941131592, -0.024562880396842957, 0.03275526314973831, 0.005484066903591156, 0.1390116661787033, -0.0953105166554451, -0.006052151322364807, 0.07205135375261307, 0.030176658183336258, 0.08279828727245331, 0.027983685955405235, 0.06751324981451035, 0.031067971140146255, -0.10457713901996613, -0.09398355334997177, 0.03807637095451355, 0.03501678258180618, 0.039474666118621826, 0.06351493299007416, 0.05562557280063629, -0.20017552375793457, 0.003928026650100946, 0.21328656375408173, -0.15224482119083405, 0.06606543809175491, -0.21595408022403717, 0.09947052597999573, -0.03822300583124161, 0.08047570288181305, 0.013723304495215416, 0.1746964156627655, -0.19080804288387299, 0.09571347385644913, 0.06697626411914825, -0.06178375333547592, 0.030973928049206734, -0.11883048713207245, 0.11580544710159302, 0.02200666442513466, 0.09217502921819687, 0.13555343449115753, 0.053349971771240234, -0.010829207487404346, -0.06307125836610794, 0.02850732021033764, 0.06767129898071289, -0.19314739108085632, -0.017098067328333855, -0.09282390028238297, -0.14280526340007782, -0.11397205293178558, 0.00037515253643505275, 0.17201344668865204, -0.16265413165092468, 0.093791164457798, -0.16129948198795319, 0.1222919374704361, 0.08106522262096405, 0.17942892014980316, 0.038102976977825165, -0.06604237109422684, -0.07507672905921936, 0.045965906232595444, 0.0016152248717844486, -0.06385854631662369, -0.10773003846406937, -0.384204238653183, -0.00838469434529543, 0.03228224068880081, 0.09827356040477753, 0.14366331696510315, -0.06333548575639725, -0.09487197548151016, -0.11831071972846985, -0.11176852881908417, -0.08755968511104584, 0.03581506386399269, 0.1175576001405716, 0.16206508874893188, 0.07275113463401794, 0.07212142646312714, 0.005424933973699808, -0.015260429121553898, -0.057946763932704926, -0.23358377814292908, -0.009155101142823696, 0.0015381209086626768, -0.0375024788081646, 0.03272680938243866, 0.1397029310464859, 0.030788574367761612, -0.005350244231522083, 0.26876169443130493, -0.067111536860466, -0.07190869003534317, 0.05797223374247551, 0.019043471664190292, -0.17995233833789825, 0.01409254688769579, 0.020499715581536293, -0.08482623100280762, 0.0015949029475450516, 0.13856908679008484, -0.15179654955863953, 0.11218253523111343, -0.08903560042381287, 0.1295998990535736, 0.12228871136903763, 0.11814497411251068, 0.006656395737081766, 0.010642120614647865, 0.0528382770717144, 0.16505436599254608, -0.016537809744477272, 0.07406563311815262, -0.07920590043067932, -0.11221079528331757, 0.04088534787297249, -0.051547612994909286, 0.05551537498831749, 0.010547483339905739, -0.1254758983850479, -0.021948233246803284, -0.04586353525519371, 0.09613002836704254, -0.08859921246767044, 0.11772421002388, 0.03025011532008648, 0.04238221049308777, -0.06693564355373383, -0.059253375977277756, -0.11755446344614029, 0.21294479072093964, 0.07322175800800323, 0.21791543066501617, -0.43610596656799316, 0.03114050254225731, 0.20424489676952362, 0.09206657856702805, -0.0220720823854208, 0.15551447868347168, 0.1287601739168167, 0.07661677151918411, -0.06932864338159561, -0.048993006348609924, 0.017971210181713104, 0.18696759641170502, 0.0639108195900917, -0.031057076528668404, 0.13667941093444824, 0.04174867644906044, 0.2062850296497345, 0.05965428054332733, 0.16842302680015564, 0.036029886454343796, 0.029409490525722504, 0.09460562467575073, -0.05232387036085129, 0.0699165090918541, 0.10889443755149841, -0.11751389503479004, -0.06933002173900604, 0.1346166729927063, 0.27625706791877747, -0.09780867397785187, 0.01022464968264103, -0.06833741068840027, -0.04840582236647606, -0.11075646430253983, 0.09276469051837921, -0.15057772397994995, -0.07925298810005188, 0.18772561848163605, -0.11190945655107498, 0.2353876680135727, -0.20010913908481598, 0.014971964992582798, -0.2508561611175537, 0.07786667346954346, 0.14744821190834045, -0.069737009704113, 0.04281057417392731, 0.15010154247283936, 0.0640573725104332, 0.07291819155216217, 0.025467118248343468, 0.026239445433020592, -0.07112131267786026, 0.0558631494641304, -0.05706905201077461, 0.009987510740756989, -0.0484190434217453, 0.11524684727191925, -0.02578548714518547, -0.13878655433654785, -0.11425618827342987, -0.017597250640392303, -0.10636534541845322, 0.13858066499233246, 0.019758455455303192, -0.08793691545724869, -0.08133947849273682, 0.11605566740036011, -0.0509854331612587, -0.14163148403167725, -0.018669910728931427, 0.12566488981246948, 0.1474694460630417, 0.1300453543663025, 0.03643590211868286, 0.04487244039773941, -0.05595924332737923, -0.019204547628760338, 0.14088377356529236, 0.14419786632061005, -0.018457140773534775, 0.053943466395139694, -0.061787161976099014, -0.11859752237796783, -0.2325907051563263, -0.07546680420637131, -0.18524615466594696, 0.06187984347343445, -0.06614283472299576, 0.01718057692050934, -0.19011631608009338, -0.12153555452823639, -0.03228364139795303, 0.006567064207047224, 0.10022152215242386, -0.11205501109361649, 0.013935399241745472, 0.0019517630571499467, -2.2800699519651156e-32, -0.018103081732988358, -0.07444723695516586, 0.020426619797945023, -0.10416189581155777, -0.1038329154253006, 0.02660314552485943, -0.07913678139448166, -0.11720053106546402, 0.002458827802911401, -0.16181166470050812, -0.09259036183357239, -0.0065307458862662315, 0.08308504521846771, 0.010922796092927456, -0.00903557799756527, -0.01630762591958046, 0.13957224786281586, 0.021294953301548958, -0.08535381406545639, 0.17806363105773926, 0.1544768512248993, 0.09769387543201447, -0.008838976733386517, 0.011646966449916363, -0.12437411397695541, 0.07047808170318604, 0.046807579696178436, -0.05494958907365799, 0.07666147500276566, -0.14842669665813446, -0.09608116000890732, 0.15891724824905396, -0.10397014766931534, -0.08308005332946777, -0.054666757583618164, -0.1122162789106369, -0.12823107838630676, -0.06546398997306824, 0.13154727220535278, -0.11593960970640182, 0.02936631254851818, -0.019472528249025345, 0.05202942341566086, 0.06133969500660896, 0.09485067427158356, -0.0629146546125412, 0.09331386536359787, 0.12469033151865005, -0.22614769637584686, -0.06693229079246521, -0.01213966403156519, 0.07283821702003479, 0.04423883184790611, 0.08525315672159195, -0.04397943243384361, -0.3254973888397217, 0.09976626187562943, -0.006466872990131378, -0.16652868688106537, -0.0899038314819336, 0.13833478093147278, 0.02232571691274643, 0.06191293150186539, 0.05522659048438072, 0.18876001238822937, -0.021045980975031853, 0.4279138743877411, 0.14414845407009125, 0.0037862835451960564, -0.011189286597073078, 0.06740808486938477, -0.007105342112481594, -0.06507215648889542, -0.2058338075876236, 0.0859522894024849, 0.015344413928687572, 0.049435947090387344, -0.16989047825336456, 0.008773657493293285, 0.19712291657924652, -0.07204794138669968, -0.04352414980530739, -0.04184398427605629, -0.053640853613615036, -0.06166885793209076, 0.07063649594783783, 0.0027751680463552475, 0.11055315285921097, -0.016167331486940384, -0.05403398722410202, -0.13827300071716309, 0.2538420855998993, -0.058126792311668396, -0.05277363955974579, -0.013442162424325943, 0.004280499182641506, -0.005131803452968597, 0.08870873600244522, -0.15160751342773438, 0.014206496067345142, -0.016977639868855476, 0.04471537843346596, -0.12431099265813828, -0.0013998651411384344, 0.13560260832309723, 0.14159566164016724, 0.09316616505384445, -0.037248171865940094, -0.14310993254184723, -0.030765350908041, -0.1692684143781662, -0.03500789776444435, 0.07908548414707184, 0.10139000415802002, 0.016627157106995583, -0.0934155285358429, 0.03256622701883316, -0.018632227554917336, 0.20965830981731415, 0.21484309434890747, 0.017337914556264877, -0.18143565952777863, -0.01461414061486721, -0.0005627601058222353, -0.06220949441194534, 0.03688150271773338, -0.0886431410908699, -0.04154449328780174, 0.14003242552280426, -0.24727590382099152, 0.009323980659246445, -0.10994501411914825, 7.439857654389925e-7, -0.1878342181444168, 0.12291388213634491, -0.08118907362222672, 0.003807945642620325, -0.08537881076335907, 0.10040745884180069, -0.013105964288115501, 0.027058199048042297, -0.21288783848285675, 0.06174641102552414, 0.07428814470767975, -0.08983611315488815, 0.060354627668857574, -0.03830442577600479, 0.20018747448921204, -0.10542313754558563, -0.2642287015914917, -0.09665092825889587, -0.1818239986896515, 0.14535988867282867, -0.08384572714567184, 0.10091136395931244, 0.08413271605968475, -0.10729797184467316, -0.10057825595140457, -0.06576497852802277, -0.029256116598844528, -0.12065783888101578, 0.07773664593696594, -0.14056815207004547, -0.020428374409675598, 0.060230858623981476, -0.10248561203479767, -0.026259731501340866, -0.1334075629711151, -0.13818201422691345, -0.08316535502672195, 0.024292510002851486, 0.04719516262412071, -0.04332437366247177, 0.0972251296043396, -0.00983660202473402, -0.04995483160018921, -0.043250612914562225, 0.07112915068864822, -0.018566738814115524, -0.15414947271347046, 0.22414806485176086, 0.1095113754272461, -0.052368517965078354, 0.08131127059459686, 0.04877598211169243, 0.08325254917144775, 0.19634920358657837, 0.02760443650186062, -0.19905218482017517, 0.09774857014417648, -0.3768559992313385, -0.07404648512601852, -0.1761254072189331, -0.028009971603751183, -0.09163398295640945, -0.03992685303092003, 0.0020105293951928616, 0.011300073005259037, -0.15773488581180573, -0.0969773679971695, 2.7493648850819502e-34, -0.0011452772887423635, -0.024874210357666016, -0.05152818188071251, -0.23129726946353912, 0.057818613946437836, 0.013542217202484608, 0.1671581119298935, 0.11816315352916718, -0.14442411065101624, -0.23250071704387665, -0.03835008293390274 ]
https://github.com/huggingface/datasets/issues/2559
Memory usage consistently increases when processing a dataset with `.map`
This is the same behavior as in #4883, so I'm closing this issue as a duplicate.
## 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
16
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 This is the same behavior as in #4883, so I'm closing this issue as a duplicate.
[ 0.12844976782798767, 0.053041569888591766, -0.1406567245721817, 0.0390770360827446, 0.1507117748260498, -0.07538877427577972, -0.07202919572591782, 0.034831881523132324, -0.08213009685277939, 0.22022736072540283, 0.06466035544872284, 0.03346842899918556, -0.12147292494773865, -0.033454447984695435, 0.0030792958568781614, -0.05519453436136246, -0.028502395376563072, 0.07357553392648697, -0.042983055114746094, -0.018208468332886696, -0.1812552958726883, 0.013703367672860622, 0.0763549953699112, -0.05858637019991875, -0.06593102961778641, -0.21652206778526306, -0.07768379151821136, 0.045111000537872314, 0.017199985682964325, -0.12554092705249786, -0.1676231473684311, -0.12891489267349243, -0.08415286242961884, 0.17214137315750122, 0.000005628221515507903, -0.07263822853565216, 0.24721451103687286, 0.06410015374422073, -0.015226512216031551, 0.24492907524108887, 0.07216690480709076, -0.07189860194921494, 0.14576761424541473, 0.1540832668542862, 0.12547481060028076, 0.007371930871158838, -0.01837150752544403, -0.11135599762201309, 0.0972241684794426, -0.02957448549568653, 0.02503712847828865, -0.011582668870687485, 0.07571648806333542, -0.06765003502368927, 0.19235509634017944, 0.07315877079963684, 0.03979405388236046, -0.0785723477602005, -0.16003602743148804, 0.018608547747135162, -0.03573324531316757, 0.09199868887662888, 0.03448038920760155, 0.09886566549539566, 0.06586943566799164, 0.06475881487131119, -0.05937492474913597, -0.10602729767560959, 0.05277983099222183, 0.08430317789316177, -0.15282602608203888, 0.01921869069337845, 0.044661879539489746, 0.08801072090864182, -0.1050572320818901, -0.11984942853450775, -0.053322479128837585, 0.2027289718389511, -0.036036208271980286, -0.1883106678724289, 0.00487566040828824, 0.1734015941619873, -0.08293430507183075, 0.017604174092411995, -0.1483137309551239, -0.09540101140737534, -0.10155311226844788, 0.03648822754621506, 0.11564809828996658, -0.037748415023088455, -0.05523381009697914, 0.016448974609375, -0.05987938866019249, -0.10228266566991806, 0.02593006007373333, 0.14418724179267883, 0.04822714999318123, -0.2170591652393341, 0.03978108614683151, -0.3404802978038788, 0.042077578604221344, 0.04663753882050514, 0.011146441102027893, 0.06705023348331451, 0.129591166973114, -0.16843633353710175, -0.10914387553930283, -0.035909004509449005, 0.10848808288574219, -0.056998543441295624, -0.045185212045907974, 0.13023826479911804, 0.05113820731639862, 0.006552502512931824, 0.1705358624458313, -0.1319819837808609, 0.0633259117603302, 0.08284685015678406, 0.021404223516583443, 0.15974995493888855, 0.09892240166664124, 0.09726059436798096, -0.03882519528269768, 0.18136031925678253, -0.038405951112508774, 0.17367026209831238, -0.16671809554100037, -0.125611811876297, -0.2552412748336792, 0.11903408169746399, -0.1175738200545311, -0.0063566486351192, -0.05953485891222954, -0.014870157465338707, -0.019892530515789986, 0.08775386214256287, 0.1334313303232193, -0.03368186205625534, -0.13349877297878265, -0.23611804842948914, 0.16494837403297424, -0.22138117253780365, 0.2327067255973816, 0.06913693994283676, -0.008415396325290203, 0.11144345253705978, -0.051889706403017044, 0.1100335642695427, 0.11672203987836838, 0.11858575791120529, -0.2367306500673294, 0.09645877033472061, -0.0601482056081295, -0.016967888921499252, 0.09291378408670425, 0.06925700604915619, -0.03058459237217903, -0.07094386219978333, -0.1272462159395218, 0.07587146759033203, 0.08455747365951538, -0.05857625603675842, -0.045034922659397125, -0.11306003481149673, -0.026296403259038925, -0.037292324006557465, -0.01906660757958889, 0.12237689644098282, -0.056847747415304184, 0.02295457385480404, 0.26503920555114746, 0.053707554936409, -0.00330941891297698, 0.16221335530281067, -0.014932047575712204, 0.11676681041717529, -0.11249876767396927, 0.08464788645505905, -0.2952255606651306, 0.199535071849823, 0.0652974545955658, -0.14938373863697052, -0.11014751344919205, 0.014004279859364033, 0.20039671659469604, 0.03457566350698471, 0.10249640792608261, 0.007009698543697596, -0.014966496266424656, -0.06522547453641891, -0.03838235139846802, -0.06488869339227676, -0.16704049706459045, -0.006237021181732416, 0.054551005363464355, -0.20820188522338867, 0.005708201322704554, -0.03178887069225311, 0.03008754551410675, -0.18179717659950256, 0.028249569237232208, 0.17587707936763763, -0.06302697956562042, -0.004185548517853022, -0.19215084612369537, 0.03694985806941986, -0.10186008363962173, 0.15466415882110596, -0.07840538024902344, -0.2221783697605133, -0.1537848562002182, 0.18939799070358276, 0.1301778107881546, 0.07712403684854507, -0.04573851451277733, -0.32919085025787354, -0.08823287487030029, -0.0887441635131836, -0.055431872606277466, 0.11143903434276581, -0.0007730937795713544, 0.023560062050819397, 0.0674607902765274, 0.08062877506017685, 0.042750611901283264, 0.035854216665029526, 0.1522587239742279, 0.01984155736863613, -0.0833384320139885, -0.01129942201077938, -0.045546889305114746, -0.029220102354884148, 0.18201522529125214, -0.09506607055664062, 0.0016408716328442097, -0.007705634459853172, -0.10508596897125244, -0.1682366579771042, 0.1083366721868515, 0.022096313536167145, 0.023937195539474487, 0.008024388924241066, -0.19099567830562592, -0.07560422271490097, 0.1239357516169548, -0.07946529239416122, 0.07331839948892593, 0.10359656810760498, 0.07466099411249161, 0.004230040591210127, 0.17488443851470947, 0.026284832507371902, -0.035498492419719696, -0.14475993812084198, -0.15867315232753754, -0.032143473625183105, 0.13718512654304504, 0.03211522847414017, 0.14395169913768768, -0.03938965126872063, 0.2551153302192688, 0.05910578370094299, 0.05830354243516922, 0.02474822849035263, -0.03905004262924194, -0.061396896839141846, -0.04890115559101105, 0.08014702051877975, -0.04999332129955292, 0.10984793305397034, 0.06488343328237534, -0.09506874531507492, 0.030734065920114517, -0.02169954404234886, -0.11603953689336777, 0.05974578112363815, 0.01768440753221512, -0.056762177497148514, -0.0159741397947073, -0.037842851132154465, 0.045419614762067795, 0.058959025889635086, 0.14282257854938507, 0.01854097843170166, 0.04838908463716507, 0.07884900271892548, 0.010431939736008644, 0.07304706424474716, -0.06762394309043884, 0.2283427119255066, 0.031112194061279297, -0.11468692868947983, 0.0010523516684770584, -0.0738595500588417, -0.04321857541799545, -0.079971082508564, 0.014183735474944115, -0.03210326284170151, 0.06301575154066086, -0.0049935923889279366, 0.20716850459575653, -0.025403574109077454, -0.0723540186882019, -0.038521409034729004, -0.03172735124826431, -0.13339824974536896, 0.05487888306379318, 0.0002876943617593497, -0.1923956722021103, 0.10002115368843079, -0.08182781934738159, 0.09833472967147827, 0.1371530145406723, 0.025211390107870102, 0.0009406544850207865, 0.1072307899594307, -0.030706411227583885, -0.0962347760796547, 0.05724189430475235, -0.01880474202334881, 0.05094305798411369, 0.0582195520401001, -0.20112265646457672, -0.02972756326198578, 0.03454931452870369, 0.013639859855175018, 0.12728899717330933, -0.10642826557159424, 0.0034377032425254583, 0.07120566815137863, 0.015288857743144035, 0.08196300268173218, 0.032608840614557266, 0.0705539658665657, 0.030268752947449684, -0.10501440614461899, -0.09037362784147263, 0.042851902544498444, 0.03359251096844673, 0.04830523952841759, 0.07073923200368881, 0.04787314310669899, -0.21099618077278137, 0.022749358788132668, 0.2198864370584488, -0.14971809089183807, 0.048567626625299454, -0.24391312897205353, 0.09350547194480896, -0.026364624500274658, 0.0827421322464943, 0.015062526799738407, 0.17155617475509644, -0.19792310893535614, 0.08366509526968002, 0.0734083279967308, -0.05643180385231972, 0.01982518471777439, -0.1340729147195816, 0.11421452462673187, 0.03314203396439552, 0.09163955599069595, 0.15111884474754333, 0.04037226736545563, -0.0028632355388253927, -0.08534559607505798, 0.053876373916864395, 0.07185249030590057, -0.20579107105731964, -0.02353413961827755, -0.08801653236150742, -0.1572096347808838, -0.1271289438009262, 0.009106307290494442, 0.1680639535188675, -0.16875791549682617, 0.09291870146989822, -0.15528444945812225, 0.13031120598316193, 0.08811240643262863, 0.1844382882118225, 0.03093411959707737, -0.06628788262605667, -0.06705789268016815, 0.04584074020385742, 0.011364240199327469, -0.07165317237377167, -0.11342679709196091, -0.38729846477508545, -0.024477044120430946, 0.03258676454424858, 0.07806238532066345, 0.14424701035022736, -0.056939270347356796, -0.0990489274263382, -0.11830756068229675, -0.09632425755262375, -0.08918063342571259, 0.04697362333536148, 0.12171149253845215, 0.16012242436408997, 0.07783063501119614, 0.07332096993923187, 0.005954149179160595, -0.0033002106938511133, -0.06316640973091125, -0.23640453815460205, -0.026380077004432678, 0.00566118024289608, -0.041827477514743805, 0.0332481749355793, 0.11918729543685913, 0.015806859359145164, -0.005492185242474079, 0.2720658779144287, -0.06555303186178207, -0.0764889195561409, 0.06588909775018692, 0.01480986550450325, -0.19292083382606506, 0.011732839047908783, 0.016743898391723633, -0.06031312793493271, 0.007882910780608654, 0.13900448381900787, -0.1596781313419342, 0.10229094326496124, -0.09616715461015701, 0.12682874500751495, 0.11605511605739594, 0.08549592643976212, 0.021667303517460823, 0.012594430707395077, 0.03783155232667923, 0.17232371866703033, 0.009868666529655457, 0.07686400413513184, -0.07474121451377869, -0.1240626871585846, 0.06169541925191879, -0.0638539046049118, 0.05669499933719635, 0.03891080245375633, -0.14499804377555847, -0.011697640642523766, -0.03936472162604332, 0.10083097219467163, -0.0991392433643341, 0.13986293971538544, 0.02203105390071869, 0.04370458796620369, -0.07730791717767715, -0.0554993562400341, -0.12116694450378418, 0.22816452383995056, 0.06715467572212219, 0.21125230193138123, -0.4353274405002594, 0.025807881727814674, 0.2056371569633484, 0.09408945590257645, -0.022011393681168556, 0.14692287147045135, 0.13636614382266998, 0.08067448437213898, -0.07356352359056473, -0.05506547540426254, -0.0052922735922038555, 0.19823573529720306, 0.06701139360666275, -0.03639023378491402, 0.14597518742084503, 0.03910469636321068, 0.20771463215351105, 0.0772990956902504, 0.1731109619140625, 0.046936459839344025, 0.028789257630705833, 0.06515451520681381, -0.047601379454135895, 0.06906545162200928, 0.07814925163984299, -0.1268204301595688, -0.054899655282497406, 0.13078658282756805, 0.29291069507598877, -0.09821156412363052, 0.01562740094959736, -0.07255689054727554, -0.05262257531285286, -0.117589071393013, 0.09942124783992767, -0.15054017305374146, -0.0662689357995987, 0.19850723445415497, -0.09812911599874496, 0.2085803747177124, -0.2061493694782257, 0.007651931140571833, -0.23459039628505707, 0.08418440073728561, 0.142075315117836, -0.051573496311903, 0.03967313840985298, 0.1446649581193924, 0.07185199856758118, 0.07508978992700577, 0.03235984966158867, 0.02428293600678444, -0.07263146340847015, 0.04866001009941101, -0.05527230724692345, 0.015075592324137688, -0.05011555552482605, 0.11169183254241943, -0.022314658388495445, -0.13832157850265503, -0.10868854075670242, -0.023125091567635536, -0.11619864404201508, 0.13103538751602173, 0.026403142139315605, -0.08895951509475708, -0.08003780245780945, 0.09795721620321274, -0.05258553847670555, -0.12839005887508392, -0.020343009382486343, 0.1295338124036789, 0.1513386070728302, 0.13911840319633484, 0.0608503594994545, 0.04317699745297432, -0.05888143926858902, -0.014390449039638042, 0.1343718022108078, 0.14316056668758392, -0.02509372867643833, 0.0735839307308197, -0.05120664834976196, -0.12754756212234497, -0.23474770784378052, -0.07739272713661194, -0.17821964621543884, 0.034823063760995865, -0.08187475055456161, 0.016111234202980995, -0.209699347615242, -0.12539300322532654, -0.044493649154901505, 0.023396646603941917, 0.1001369059085846, -0.10805179923772812, 0.00621412368491292, 0.007808964233845472, -2.2463550107420061e-32, -0.0357491709291935, -0.0640704333782196, 0.020259911194443703, -0.10789848119020462, -0.11987016350030899, 0.02357122302055359, -0.08832685649394989, -0.12175904959440231, -0.011952366679906845, -0.16300776600837708, -0.11400268226861954, 0.0062716989777982235, 0.08003322780132294, 0.012977518141269684, -0.007568479515612125, -0.001782373758032918, 0.14281907677650452, 0.002088378183543682, -0.0995798110961914, 0.20515640079975128, 0.15456342697143555, 0.0933360829949379, -0.01885898970067501, 0.002955893985927105, -0.11999054998159409, 0.08129006624221802, 0.05062779784202576, -0.048793207854032516, 0.0870925784111023, -0.13582511246204376, -0.09524878114461899, 0.13308879733085632, -0.09301763027906418, -0.08594337850809097, -0.05314593017101288, -0.12321414798498154, -0.1253243088722229, -0.0518488846719265, 0.11058588325977325, -0.11182747781276703, 0.019628183916211128, -0.02869660221040249, 0.05392361059784889, 0.07648026198148727, 0.09573023021221161, -0.04584755003452301, 0.08038188517093658, 0.12293124198913574, -0.2127148061990738, -0.0818883404135704, -0.01569485291838646, 0.0660882294178009, 0.03416775166988373, 0.09909094870090485, -0.042416758835315704, -0.34112152457237244, 0.1101054921746254, 0.011256140656769276, -0.17547725141048431, -0.09063214808702469, 0.1367914080619812, 0.03778553754091263, 0.06682870537042618, 0.05380762368440628, 0.1873437911272049, -0.017690584063529968, 0.4323928952217102, 0.15224093198776245, 0.019551435485482216, -0.014388486742973328, 0.0783495232462883, -0.013619081117212772, -0.08224990218877792, -0.23405194282531738, 0.09587369114160538, 0.025173550471663475, 0.05713210627436638, -0.1863071471452713, 0.00962389912456274, 0.1898210346698761, -0.07558058947324753, -0.0585380420088768, -0.03365757316350937, -0.053508128970861435, -0.0783977285027504, 0.07355156540870667, 0.00838940404355526, 0.11509894579648972, -0.006375787314027548, -0.049605485051870346, -0.12586431205272675, 0.23654240369796753, -0.04596816003322601, -0.06013347581028938, -0.017070725560188293, 0.03157365322113037, -0.004283724818378687, 0.08285434544086456, -0.12987667322158813, 0.015089944005012512, -0.019836006686091423, 0.03309578076004982, -0.1331329494714737, 0.011362050659954548, 0.1398375779390335, 0.13854314386844635, 0.10052630305290222, -0.03928981348872185, -0.1638617068529129, -0.026116525754332542, -0.1784505695104599, -0.016602976247668266, 0.08540560305118561, 0.1036631166934967, 0.0270520206540823, -0.10152115672826767, 0.034170087426900864, -0.0032918453216552734, 0.2179555892944336, 0.19371575117111206, 0.024990763515233994, -0.19049133360385895, 0.014929245226085186, 0.004162905737757683, -0.05856030061841011, 0.03282603621482849, -0.09453576058149338, -0.04390795901417732, 0.13722892105579376, -0.2507112920284271, 0.013278151862323284, -0.12677840888500214, 7.388172207356547e-7, -0.20171724259853363, 0.13354407250881195, -0.07226413488388062, -0.0022361117880791426, -0.07457751780748367, 0.1045529842376709, 0.007139195688068867, 0.005001528654247522, -0.2064574807882309, 0.05835599824786186, 0.07841206341981888, -0.0796343982219696, 0.047301746904850006, -0.03919044882059097, 0.19369639456272125, -0.09381626546382904, -0.24871861934661865, -0.07701685279607773, -0.1874045431613922, 0.138111874461174, -0.06564372777938843, 0.08935917913913727, 0.06261973828077316, -0.11440623551607132, -0.1068391352891922, -0.07169804722070694, -0.028085174039006233, -0.10739468038082123, 0.07448774576187134, -0.13056255877017975, -0.01083604246377945, 0.05292286351323128, -0.10262047499418259, -0.01951751299202442, -0.1402093917131424, -0.13209782540798187, -0.10386133939027786, 0.013371921144425869, 0.052263133227825165, -0.04326969012618065, 0.09300016611814499, -0.012770642526447773, -0.052956607192754745, -0.03095678985118866, 0.08109103888273239, -0.024471735581755638, -0.16022874414920807, 0.23103348910808563, 0.11304338276386261, -0.05623717978596687, 0.07221047580242157, 0.05088480934500694, 0.09718494117259979, 0.1852579414844513, 0.03013528138399124, -0.20138420164585114, 0.08480589091777802, -0.3812090754508972, -0.07958982139825821, -0.17069491744041443, -0.01969466544687748, -0.09909629076719284, -0.055666062980890274, 0.031978026032447815, 0.004322463180869818, -0.14420649409294128, -0.08531097322702408, 2.938705112164506e-34, 0.013113358989357948, -0.018962418660521507, -0.046479009091854095, -0.21710844337940216, 0.04835357889533043, 0.011104628443717957, 0.1645679771900177, 0.135430708527565, -0.14339104294776917, -0.24480821192264557, -0.03463354334235191 ]
https://github.com/huggingface/datasets/issues/2556
Better DuplicateKeysError error to help the user debug the issue
excuse me, my `datasets` version is `2.2.2`, but I also just see the error info like ``` DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 0 Keys should be unique and deterministic in nature ```
As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ```
36
Better DuplicateKeysError error to help the user debug the issue As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` excuse me, my `datasets` version is `2.2.2`, but I also just see the error info like ``` DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 0 Keys should be unique and deterministic in nature ```
[ 0.04946071654558182, 0.1762579381465912, 0.03410137817263603, 0.039394889026880264, 0.2312760353088379, 0.04772214591503143, 0.1321798712015152, 0.1272292584180832, -0.0721839889883995, 0.1452510952949524, 0.1112331822514534, 0.07256899774074554, -0.15804629027843475, 0.11580845713615417, 0.20899619162082672, -0.12526120245456696, -0.07474382221698761, -0.030017966404557228, 0.0010962578235194087, -0.004137688782066107, -0.18604077398777008, 0.06807214766740799, 0.10191825777292252, -0.05328315868973732, -0.08726025372743607, -0.11601583659648895, -0.05507330596446991, 0.021668963134288788, 0.06738408654928207, -0.31606242060661316, 0.05509534105658531, 0.09982327371835709, -0.07009076327085495, 0.12993121147155762, 0.0000058895343499898445, 0.04281271994113922, 0.19951462745666504, 0.03781449422240257, -0.1932617425918579, 0.10906673967838287, -0.02531527727842331, -0.13574162125587463, 0.142424076795578, 0.02189083956182003, -0.04504690319299698, -0.10705681890249252, -0.08412382751703262, 0.057331521064043045, 0.07475556433200836, -0.0478765144944191, 0.05901789292693138, 0.04236332327127457, 0.03773341700434685, -0.09775237739086151, 0.12320077419281006, 0.0924716517329216, -0.02692767046391964, 0.09871910512447357, -0.12998254597187042, -0.08217427879571915, 0.019546786323189735, 0.1801900416612625, 0.037318576127290726, -0.007097641471773386, 0.057465750724077225, 0.05076953396201134, -0.09868558496236801, -0.16925852000713348, 0.014974572695791721, 0.19594143331050873, 0.06539901345968246, -0.005917992442846298, -0.12813793122768402, -0.16183678805828094, 0.007192511111497879, -0.12400403618812561, -0.07524437457323074, -0.03131337836384773, -0.14569371938705444, -0.019930658861994743, -0.08554128557443619, 0.10455196350812912, -0.05007002875208855, -0.06227332726120949, -0.10347598046064377, -0.19944602251052856, -0.05226626619696617, 0.10451089590787888, 0.02267454005777836, -0.1501413881778717, 0.10573285073041916, 0.02753000520169735, -0.16112186014652252, 0.032450370490550995, -0.11710182577371597, -0.12906087934970856, 0.02738470397889614, -0.09667180478572845, 0.1383519023656845, -0.1343223601579666, 0.10327081382274628, 0.041139692068099976, -0.11791539937257767, -0.09212365746498108, 0.03745364397764206, -0.07517743855714798, 0.05666358396410942, -0.04606035351753235, 0.11509515345096588, 0.05730374529957771, 0.04882359132170677, 0.0474855862557888, -0.027167461812496185, -0.23254351317882538, 0.21272368729114532, 0.12667138874530792, 0.22053779661655426, 0.20968513190746307, -0.021990979090332985, 0.045129675418138504, 0.09909133613109589, 0.0148237906396389, -0.14007844030857086, 0.0052360123954713345, 0.029484374448657036, -0.10054509341716766, -0.0032570890616625547, -0.06178902089595795, -0.023854738101363182, -0.053945135325193405, -0.04708413407206535, 0.12802521884441376, 0.10441768914461136, -0.009318727068603039, 0.09661228954792023, 0.012971932999789715, 0.10202093422412872, -0.008132684975862503, 0.11201616376638412, -0.041010938584804535, 0.1149393692612648, 0.12802907824516296, -0.0604119673371315, -0.06761974096298218, -0.01966041512787342, -0.012140834704041481, 0.06707483530044556, 0.027563372626900673, -0.07355187088251114, -0.057973045855760574, -0.04863210767507553, 0.16686835885047913, -0.2153303623199463, 0.16392287611961365, -0.002259383676573634, 0.05052101984620094, 0.05216601863503456, 0.009210054762661457, -0.308464914560318, -0.13617751002311707, 0.025643689557909966, 0.011526089161634445, 0.09923426061868668, -0.06142409145832062, 0.09699781984090805, 0.22447824478149414, 0.0009660866926424205, 0.042184021323919296, -0.15267051756381989, 0.0583474263548851, -0.056378643959760666, -0.08988871425390244, -0.11951804906129837, 0.1743890345096588, -0.15096808969974518, 0.1078321561217308, 0.015416616573929787, -0.03040320798754692, -0.10872821509838104, 0.12844489514827728, -0.023625455796718597, -0.07816779613494873, -0.03641391545534134, -0.039992641657590866, 0.18827517330646515, 0.03637673705816269, 0.0013157376088202, 0.12552261352539062, -0.10839882493019104, -0.10306795686483383, -0.08156096190214157, 0.055587802082300186, -0.00813085213303566, 0.09190840274095535, -0.09094279259443283, -0.09193290770053864, 0.027750806882977486, -0.10734345018863678, 0.02624882385134697, -0.13024072349071503, -0.20771919190883636, -0.11746694147586823, 0.13746556639671326, 0.008268574252724648, -0.02169100195169449, -0.004403375089168549, -0.1700834482908249, 0.1468944251537323, 0.03489126265048981, -0.08055300265550613, -0.1443348228931427, -0.06851077079772949, 0.07591288536787033, 0.010222956538200378, -0.12792272865772247, -0.025160139426589012, 0.010485624894499779, -0.10614937543869019, 0.0021835598163306713, 0.02563362568616867, 0.049354188144207, 0.06951937079429626, 0.09611713886260986, 0.02515682391822338, 0.05101185292005539, -0.0005037799710407853, 0.03625168278813362, 0.03638981655240059, 0.1061912253499031, 0.1042419970035553, -0.028130581602454185, -0.05182349681854248, 0.04599544033408165, 0.08214656263589859, -0.15782058238983154, 0.02205205149948597, 0.11072865128517151, -0.15008752048015594, 0.13138817250728607, -0.06020701676607132, -0.19228267669677734, 0.04703889414668083, -0.2113756686449051, 0.012614202685654163, -0.14478476345539093, -0.004133092705160379, 0.01752667874097824, 0.12488631159067154, -0.04334981366991997, -0.040848247706890106, -0.029733989387750626, 0.0879383534193039, -0.028514472767710686, 0.005054628476500511, -0.07579827308654785, -0.09260786324739456, 0.023941857740283012, 0.08174275606870651, -0.16442842781543732, 0.060927871614694595, 0.21712042391300201, -0.04879434034228325, 0.04818355292081833, 0.06523699313402176, 0.09115474671125412, -0.04764876887202263, 0.07842199504375458, 0.16416075825691223, -0.0748075395822525, 0.18394224345684052, 0.020250923931598663, -0.04028034955263138, -0.035189904272556305, -0.05828416720032692, 0.006868197117000818, -0.1300814002752304, -0.11558503657579422, 0.0702054426074028, -0.13739855587482452, 0.10234806686639786, -0.21478629112243652, -0.08857458829879761, 0.04195995256304741, -0.02503952756524086, 0.12406240403652191, 0.06832347065210342, -0.12488440424203873, -0.019097859039902687, -0.14447955787181854, 0.1885392665863037, 0.06390620023012161, -0.17006148397922516, 0.1367870271205902, -0.13411220908164978, 0.006971288938075304, -0.0004535732150543481, 0.05448827147483826, -0.04155934229493141, -0.09192189574241638, 0.03880101069808006, -0.034613508731126785, 0.05247269198298454, 0.047293972223997116, -0.10578996688127518, -0.050858885049819946, -0.02776164934039116, 0.29333391785621643, 0.030162476003170013, -0.1824345886707306, -0.26955509185791016, -0.06453954428434372, -0.11017488688230515, 0.01054537482559681, 0.10288458317518234, 0.16813082993030548, 0.13453422486782074, -0.06534833461046219, -0.23990242183208466, 0.14215709269046783, 0.07999308407306671, 0.046291083097457886, 0.04195770248770714, 0.05888044089078903, 0.08468933403491974, 0.059851888567209244, 0.00863972119987011, -0.10621222853660583, 0.05168341100215912, -0.019878309220075607, -0.18537446856498718, -0.02330769971013069, 0.040648944675922394, -0.001691231969743967, -0.021454472094774246, -0.028550338000059128, -0.08158605545759201, -0.03511154279112816, 0.022691447287797928, 0.12066181749105453, -0.03980870172381401, 0.06951369345188141, -0.041823454201221466, -0.10988450050354004, 0.02606489136815071, -0.025443794205784798, -0.17847998440265656, -0.10217443108558655, -0.08054730296134949, 0.1725780963897705, -0.008088868111371994, 0.05510099604725838, 0.09866172075271606, 0.11478589475154877, -0.13574174046516418, 0.051855701953172684, -0.053001657128334045, -0.22349132597446442, 0.12388090789318085, -0.18071994185447693, 0.0206894651055336, 0.1820852905511856, 0.03149287402629852, 0.20348916947841644, 0.11626515537500381, -0.12179750204086304, -0.03335196524858475, 0.03526008501648903, 0.050709836184978485, 0.048199571669101715, -0.1982818990945816, -0.04161153361201286, -0.0624886155128479, 0.0284882765263319, 0.07409615069627762, -0.049576397985219955, 0.042483631521463394, 0.13501904904842377, -0.18111026287078857, -0.0011103139258921146, -0.1037888452410698, -0.028584681451320648, -0.19001249969005585, -0.025390630587935448, -0.08670510351657867, 0.10457100719213486, 0.011915841139853, 0.13987021148204803, 0.07497603446245193, -0.05992543324828148, 0.06322701275348663, 0.05461133271455765, -0.12916900217533112, -0.10449417680501938, 0.04195857048034668, -0.08906753361225128, -0.09752703458070755, 0.08645959198474884, 0.010277983732521534, 0.08214331418275833, -0.008625189773738384, 0.07254723459482193, 0.10365328937768936, -0.28341686725616455, 0.025471771135926247, 0.02809186838567257, -0.0412246398627758, -0.041547246277332306, 0.07549754530191422, 0.16664770245552063, 0.056508928537368774, 0.017577851191163063, 0.08252032101154327, -0.006370006129145622, 0.020475070923566818, 0.16991542279720306, 0.009975404478609562, -0.1599641889333725, -0.19004400074481964, 0.05107736214995384, -0.10671890527009964, -0.18075551092624664, -0.1316230595111847, 0.08879663795232773, -0.03093237802386284, 0.12931087613105774, -0.0977611243724823, -0.10113625973463058, 0.060384802520275116, 0.11005466431379318, 0.16802199184894562, 0.045451659709215164, 0.15981879830360413, 0.13442349433898926, 0.13901759684085846, 0.02639700658619404, 0.010830606333911419, 0.22066329419612885, -0.12145037204027176, -0.07137332856655121, -0.10027704387903214, -0.09321574121713638, 0.09621340036392212, 0.17453500628471375, -0.07480480521917343, 0.13128527998924255, -0.12186740338802338, -0.03348953649401665, -0.08814998716115952, -0.0026558127719908953, 0.042391810566186905, -0.08567985892295837, -0.22428423166275024, -0.16849109530448914, -0.143260195851326, 0.18772129714488983, -0.015679480507969856, 0.209420308470726, -0.053763244301080704, -0.10517831146717072, 0.06625982373952866, -0.12798729538917542, -0.030958058312535286, -0.099879190325737, -0.020128648728132248, -0.15433426201343536, 0.05528030917048454, 0.21401795744895935, -0.02007436752319336, -0.06983675807714462, 0.0203902218490839, -0.027732297778129578, 0.14548666775226593, 0.031273335218429565, 0.059958770871162415, 0.09867426753044128, -0.10625849664211273, 0.03526594489812851, -0.12200922518968582, -0.07776058465242386, -0.05972636863589287, 0.29542845487594604, 0.042987436056137085, -0.0830426961183548, -0.07401616871356964, -0.00760831031948328, 0.024719607084989548, 0.05226961150765419, -0.02722795121371746, -0.08516164869070053, 0.24967043101787567, -0.13998113572597504, -0.22004574537277222, 0.05277330428361893, -0.03767557069659233, -0.013582185842096806, -0.06339427083730698, -0.12124674022197723, 0.2098533660173416, -0.02353416569530964, 0.14831332862377167, 0.08032837510108948, -0.03732746094465256, 0.08240898698568344, -0.0523252934217453, 0.0732794925570488, -0.09977889060974121, 0.008967353031039238, -0.08722616732120514, 0.06469805538654327, -0.17739343643188477, 0.06405289471149445, 0.032761745154857635, -0.055646684020757675, -0.24807803332805634, -0.0067458730190992355, -0.12352659553289413, -0.06720627844333649, 0.01596497930586338, 0.10954812169075012, 0.04454468563199043, -0.13274961709976196, -0.04852183163166046, 0.07766322791576385, -0.04176894575357437, -0.014082923531532288, 0.020463377237319946, 0.04254143312573433, -0.018519485369324684, -0.11723195761442184, 0.12597863376140594, 0.008286919444799423, 0.10642875730991364, -0.022120391950011253, -0.021505020558834076, -0.1275058537721634, 0.16388632357120514, 0.3071648180484772, -0.09468205273151398, -0.028929175809025764, 0.0437052845954895, 0.05802573263645172, -0.10236843675374985, -0.15410560369491577, 0.10298553854227066, 0.07365787029266357, -0.06361277401447296, 0.07231985032558441, -0.08816604316234589, -0.09406822174787521, -0.037070389837026596, 0.2215271294116974, 0.23630082607269287, 0.12199617922306061, -0.1321151852607727, 0.07448770105838776, -2.5902908457339853e-32, -0.0018706015544012189, -0.03574228286743164, -0.1751423329114914, 0.05200191214680672, -0.14809150993824005, -0.04424184933304787, -0.1356033831834793, 0.006187821738421917, -0.14186014235019684, 0.03880034014582634, 0.03420497477054596, 0.07373883575201035, 0.1256689429283142, -0.07360006868839264, 0.06606194376945496, -0.0408855564892292, 0.0613291971385479, 0.11437961459159851, 0.0044424585066735744, 0.13004142045974731, 0.1563275009393692, 0.01659020595252514, 0.14030496776103973, -0.008886675350368023, -0.023726345971226692, -0.07124435156583786, -0.06053353473544121, -0.0471939891576767, 0.09387523680925369, 0.02981112338602543, -0.059120409190654755, 0.129825621843338, -0.04903750494122505, 0.081501305103302, -0.023395750671625137, -0.09299471229314804, 0.001332358457148075, -0.08978012204170227, -0.14004828035831451, -0.05828312039375305, 0.09737246483564377, 0.03926432877779007, -0.07412857562303543, -0.11472230404615402, 0.09510764479637146, 0.04047686979174614, -0.03843994811177254, 0.029552746564149857, -0.18591681122779846, -0.036689456552267075, -0.02728845737874508, 0.13081423938274384, 0.03400096297264099, 0.0490608736872673, 0.014051581732928753, -0.024935558438301086, 0.07365120947360992, -0.08523163199424744, -0.1262156218290329, 0.05983201041817665, 0.27445194125175476, -0.026924338191747665, -0.09525950998067856, 0.014626342803239822, -0.04780752584338188, 0.0011577574769034982, 0.08779361099004745, -0.2461690604686737, 0.14775286614894867, 0.12795859575271606, -0.0935511365532875, 0.09160351008176804, 0.053536541759967804, 0.1240258738398552, -0.1271420270204544, -0.06467108428478241, -0.11184768378734589, 0.08461684733629227, -0.09184462577104568, -0.05499040335416794, -0.12490800023078918, 0.011487836949527264, -0.11551083624362946, -0.05243305116891861, 0.0645052045583725, 0.09605474025011063, 0.018668843433260918, 0.03871290013194084, 0.005595832131803036, -0.06376834213733673, -0.1951054483652115, 0.28214791417121887, -0.09191640466451645, -0.1454201340675354, -0.05003507807850838, 0.144676074385643, 0.06855123490095139, 0.1550024151802063, -0.12255502492189407, -0.17376013100147247, 0.19454075396060944, -0.12541182339191437, 0.06908129900693893, 0.14091908931732178, 0.21679995954036713, -0.014233262278139591, 0.12830790877342224, 0.057227566838264465, -0.2856592833995819, 0.057323064655065536, -0.014505965635180473, -0.15981200337409973, -0.02060987427830696, -0.1305253803730011, 0.07685821503400803, 0.02977621555328369, 0.09619240462779999, 0.08407043665647507, 0.06489062309265137, -0.01906559243798256, -0.07896572351455688, 0.002730647101998329, -0.03199625387787819, 0.14622138440608978, 0.03486622869968414, 0.1333698332309723, -0.08836068212985992, -0.25670334696769714, 0.18192218244075775, -0.023594608530402184, -0.09264534711837769, -0.2272818684577942, 7.721385486547661e-7, -0.15926671028137207, 0.14713822305202484, 0.14081929624080658, -0.16019000113010406, -0.07636868208646774, 0.14376124739646912, 0.0021425255108624697, 0.030891088768839836, -0.14658258855342865, 0.02521240897476673, 0.11576780676841736, -0.10632680356502533, 0.035346098244190216, 0.02378177084028721, 0.14906716346740723, -0.013841588981449604, -0.19989420473575592, 0.061632443219423294, -0.17674852907657623, 0.05670887976884842, 0.12569957971572876, 0.036863382905721664, 0.060605015605688095, -0.03460504487156868, 0.1936221420764923, 0.006909302901476622, -0.12312261760234833, -0.10699246823787689, 0.15757912397384644, 0.07114960253238678, -0.04263883829116821, -0.11026192456483841, 0.09032604098320007, 0.07986664026975632, -0.06624634563922882, -0.14704199135303497, -0.07254242151975632, -0.07448935508728027, -0.024075252935290337, 0.09608877450227737, 0.0726344883441925, 0.059737347066402435, -0.03515102341771126, -0.21984122693538666, 0.09194660186767578, 0.04062175005674362, -0.14402900636196136, 0.07353219389915466, 0.04957791790366173, -0.05952988564968109, 0.11971171945333481, 0.08750909566879272, -0.003342611715197563, 0.1217893660068512, -0.04531366378068924, 0.047101300209760666, 0.0318722277879715, -0.16139176487922668, 0.01694587431848049, 0.004629385191947222, -0.038536109030246735, -0.06324990838766098, 0.07552085071802139, 0.042069096118211746, 0.15410727262496948, -0.10995921492576599, -0.026805216446518898, 1.3254876595759518e-34, 0.06269658356904984, 0.08056118339300156, 0.08650067448616028, -0.1608012169599533, 0.02280561998486519, 0.028685597702860832, 0.08071312308311462, 0.028759192675352097, 0.0713382437825203, -0.02902563288807869, -0.12308043986558914 ]
https://github.com/huggingface/datasets/issues/2556
Better DuplicateKeysError error to help the user debug the issue
Hi ! for which dataset do you have this error ? Also note that this issue is just about improving the error message, which is not very friendly x)
As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ```
29
Better DuplicateKeysError error to help the user debug the issue As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` Hi ! for which dataset do you have this error ? Also note that this issue is just about improving the error message, which is not very friendly x)
[ 0.05964003503322601, 0.13245880603790283, 0.03990500792860985, 0.04667504504323006, 0.22254569828510284, 0.047498252242803574, 0.15227676928043365, 0.0967547595500946, -0.06168085336685181, 0.1374012678861618, 0.09183871001005173, 0.07881415635347366, -0.13686589896678925, 0.1029227003455162, 0.20212778449058533, -0.12793950736522675, -0.07306644320487976, -0.04423437640070915, 0.017925307154655457, -0.009082570672035217, -0.18117062747478485, 0.06878434866666794, 0.09440941363573074, -0.04659055173397064, -0.0974966287612915, -0.11887415498495102, -0.05488143116235733, 0.021523533388972282, 0.047944944351911545, -0.30425143241882324, 0.07440675050020218, 0.1167517676949501, -0.062082137912511826, 0.10050031542778015, 0.0000058701325542642735, 0.04170485958456993, 0.18689265847206116, 0.029206160455942154, -0.19127318263053894, 0.10800116509199142, -0.05791572853922844, -0.13172771036624908, 0.13681577146053314, 0.022419767454266548, -0.06825045496225357, -0.1179526075720787, -0.0851307362318039, 0.047292597591876984, 0.06572861224412918, -0.02402156963944435, 0.04946436360478401, 0.0465264730155468, 0.012823453173041344, -0.11493398249149323, 0.10838811099529266, 0.09632735699415207, -0.013897744007408619, 0.11692428588867188, -0.1412310004234314, -0.09053435176610947, 0.01689140684902668, 0.17938637733459473, 0.04228770732879639, -0.008384067565202713, 0.07331620156764984, 0.05347718670964241, -0.07271784543991089, -0.17467519640922546, 0.006776876747608185, 0.19004914164543152, 0.0980219617486, 0.0042074439115822315, -0.11812011897563934, -0.15548181533813477, 0.0015831079799681902, -0.13510912656784058, -0.08649268001317978, -0.008809240534901619, -0.13764095306396484, -0.030086863785982132, -0.09998612105846405, 0.11032934486865997, -0.043283894658088684, -0.05731826275587082, -0.09209565073251724, -0.1982419490814209, -0.051830410957336426, 0.09958231449127197, 0.01896139606833458, -0.16836011409759521, 0.10093005746603012, 0.031186645850539207, -0.16015851497650146, 0.04714173823595047, -0.10493998229503632, -0.13506731390953064, 0.015206183306872845, -0.10661286860704422, 0.15227408707141876, -0.14265190064907074, 0.08950144797563553, 0.02742319367825985, -0.11317760497331619, -0.09136572480201721, 0.03642338886857033, -0.04786313697695732, 0.07144078612327576, -0.051339857280254364, 0.11141737550497055, 0.0616813600063324, 0.051136914640665054, 0.030450666323304176, -0.03286006674170494, -0.24685373902320862, 0.18872052431106567, 0.13305461406707764, 0.21731171011924744, 0.22763346135616302, -0.011188051663339138, 0.041608501225709915, 0.11016649007797241, -0.009643565863370895, -0.14665487408638, 0.008091679774224758, 0.023908842355012894, -0.08912266790866852, -0.011117365211248398, -0.04977330192923546, -0.016712570562958717, -0.05185987427830696, -0.0483422577381134, 0.1658826470375061, 0.09612656384706497, -0.028639819473028183, 0.09525030851364136, 0.02498367242515087, 0.09880658239126205, 0.02035912312567234, 0.12592771649360657, -0.04957497864961624, 0.09439639747142792, 0.150776669383049, -0.05399817228317261, -0.07696398347616196, -0.0055530620738863945, -0.013587958179414272, 0.08129780739545822, 0.0029919841326773167, -0.0863242968916893, -0.04414436221122742, -0.03426495939493179, 0.15050487220287323, -0.24842548370361328, 0.153543621301651, 0.007850751280784607, 0.02643975429236889, 0.05109817907214165, -0.010601538233458996, -0.28817176818847656, -0.11566667258739471, 0.03286013752222061, 0.003606084967032075, 0.1082569882273674, -0.0664190948009491, 0.10506746917963028, 0.19340237975120544, -0.017666395753622055, 0.05519174411892891, -0.1641177088022232, 0.05652552470564842, -0.06363510340452194, -0.08364340662956238, -0.11678153276443481, 0.17567194998264313, -0.12635301053524017, 0.11921165883541107, 0.0028144782409071922, -0.024119339883327484, -0.11277112364768982, 0.11253418773412704, -0.021021224558353424, -0.09483356028795242, -0.042877282947301865, -0.04296514391899109, 0.19318662583827972, 0.055253952741622925, -0.004846247378736734, 0.1519472748041153, -0.10536462068557739, -0.09599225223064423, -0.0950314849615097, 0.05506642535328865, -0.01607842557132244, 0.08164207637310028, -0.10492578893899918, -0.07495609670877457, 0.031214643269777298, -0.11329866200685501, 0.030266035348176956, -0.11336677521467209, -0.22137728333473206, -0.10776820033788681, 0.12671947479248047, 0.002981721656396985, -0.027618378400802612, 0.017706504091620445, -0.1827484369277954, 0.1256086528301239, 0.05311104655265808, -0.049566250294446945, -0.11004529893398285, -0.06519223004579544, 0.0666850209236145, 0.008433569222688675, -0.13225865364074707, -0.02077616937458515, -0.0014998707920312881, -0.10612767934799194, 0.006522250361740589, 0.007791812997311354, 0.05469934269785881, 0.06603098660707474, 0.10742159932851791, 0.03119073063135147, 0.036804698407649994, -0.00965784303843975, 0.02624446339905262, 0.06518550217151642, 0.11222606152296066, 0.09126197546720505, -0.03014860488474369, -0.056873664259910583, 0.03626742586493492, 0.09023920446634293, -0.15729285776615143, 0.030966179445385933, 0.10829835385084152, -0.15450049936771393, 0.11132553219795227, -0.07917570322751999, -0.18676070868968964, 0.03990262746810913, -0.20486466586589813, 0.009231487289071083, -0.14979222416877747, -0.010869815945625305, 0.015169311314821243, 0.13472607731819153, -0.038634493947029114, -0.017467185854911804, -0.022112343460321426, 0.0709681436419487, -0.031130246818065643, 0.014749202877283096, -0.06802795827388763, -0.09832838922739029, 0.01648552343249321, 0.08657535165548325, -0.1739325076341629, 0.04681659862399101, 0.21624775230884552, -0.059576187282800674, 0.04383173957467079, 0.08170673251152039, 0.08950503915548325, -0.03482627868652344, 0.08036313951015472, 0.16378234326839447, -0.05767073854804039, 0.19438226521015167, -0.0009882384911179543, -0.030212456360459328, -0.021933671087026596, -0.07359589636325836, 0.011817618273198605, -0.13182464241981506, -0.1164923831820488, 0.04907090216875076, -0.14411582052707672, 0.10784377157688141, -0.201284721493721, -0.08379919826984406, 0.02760392799973488, -0.037074778228998184, 0.12344823032617569, 0.0770902931690216, -0.1118985041975975, -0.029257765039801598, -0.14355924725532532, 0.1597578525543213, 0.04076946899294853, -0.1784081757068634, 0.12833960354328156, -0.17314249277114868, -0.003747901413589716, 0.018133405596017838, 0.06097825616598129, -0.030429570004343987, -0.0862177386879921, 0.05210795998573303, -0.049161288887262344, 0.05574601888656616, 0.06654177606105804, -0.10568338632583618, -0.07406622916460037, -0.013890044763684273, 0.29205119609832764, 0.03301302343606949, -0.18661674857139587, -0.24784085154533386, -0.025742344558238983, -0.08816716074943542, 0.01138239074498415, 0.08288928866386414, 0.1667451560497284, 0.1304370015859604, -0.0877581313252449, -0.2462722808122635, 0.14626948535442352, 0.09605613350868225, 0.06750413775444031, 0.03367689624428749, 0.06173883005976677, 0.09720517694950104, 0.05930990353226662, 0.0190166924148798, -0.12175100296735764, 0.05758713185787201, -0.03151256963610649, -0.18702755868434906, -0.023092154413461685, 0.0405769869685173, 0.006685515400022268, -0.02923467941582203, -0.03433871269226074, -0.08788621425628662, -0.022177930921316147, 0.023635145276784897, 0.1186339259147644, -0.046283576637506485, 0.06232347711920738, -0.027629515156149864, -0.09745462238788605, 0.03613295033574104, -0.04712579771876335, -0.16217513382434845, -0.09121059626340866, -0.07332523912191391, 0.16001278162002563, -0.0161451306194067, 0.08007577061653137, 0.09310460835695267, 0.09583962708711624, -0.12776269018650055, 0.03146861493587494, -0.06640675663948059, -0.22200579941272736, 0.10986214131116867, -0.16835448145866394, 0.015067074447870255, 0.19430424273014069, 0.03528624773025513, 0.20276853442192078, 0.13631854951381683, -0.13176773488521576, -0.0394459068775177, 0.02706417441368103, 0.056410908699035645, 0.04971587285399437, -0.19745752215385437, -0.048574298620224, -0.05211471766233444, 0.023281171917915344, 0.08309327065944672, -0.07177620381116867, 0.049920979887247086, 0.1402422934770584, -0.15944360196590424, 0.02690725028514862, -0.11766231060028076, -0.051147837191820145, -0.18418282270431519, -0.038559164851903915, -0.08134712278842926, 0.10891707241535187, 0.043906521052122116, 0.15856343507766724, 0.06438881903886795, -0.0295515526086092, 0.05261771380901337, 0.06063619628548622, -0.1286088526248932, -0.1037931740283966, 0.021507628262043, -0.09662476927042007, -0.10128723084926605, 0.09495678544044495, 0.019301827996969223, 0.09308453649282455, -0.00009586090163793415, 0.06841447949409485, 0.12177439779043198, -0.2559153437614441, 0.04913182556629181, 0.02651490457355976, -0.01673746109008789, -0.04535975679755211, 0.07373571395874023, 0.17913523316383362, 0.05248192697763443, 0.017015786841511726, 0.08093489706516266, -0.0037620526272803545, 0.03516148030757904, 0.14927351474761963, -0.0019406720530241728, -0.16676273941993713, -0.19648179411888123, 0.03629377484321594, -0.13975007832050323, -0.19669361412525177, -0.13060906529426575, 0.10034498572349548, -0.03784925118088722, 0.12261610478162766, -0.0702076107263565, -0.09094817191362381, 0.06192825362086296, 0.1382032185792923, 0.15874840319156647, 0.06941461563110352, 0.1493779420852661, 0.11944219470024109, 0.15342968702316284, 0.02217579074203968, -0.0061538368463516235, 0.2625104486942291, -0.14006446301937103, -0.08297143876552582, -0.08717299997806549, -0.09648419171571732, 0.10186150670051575, 0.17636442184448242, -0.051576290279626846, 0.12158531695604324, -0.09909747540950775, -0.03010261245071888, -0.0982954204082489, 0.013305159285664558, 0.03689681366086006, -0.09486269950866699, -0.24592545628547668, -0.1732708066701889, -0.12999983131885529, 0.1678934097290039, -0.018228117376565933, 0.20830127596855164, -0.06278350949287415, -0.09990662336349487, 0.09062688797712326, -0.14848560094833374, -0.025594409555196762, -0.12370134890079498, 0.0008122137514874339, -0.15628764033317566, 0.07504122704267502, 0.20313729345798492, -0.019668063148856163, -0.06878634542226791, 0.003110741963610053, -0.019022192806005478, 0.15034134685993195, 0.01766478456556797, 0.027080874890089035, 0.09119758009910583, -0.11035215109586716, 0.027098150923848152, -0.10809621959924698, -0.10443002730607986, -0.06437578797340393, 0.3069627285003662, 0.0471448190510273, -0.09796230494976044, -0.09088240563869476, -0.0207393579185009, 0.01614825800061226, 0.061239093542099, -0.020200740545988083, -0.08363078534603119, 0.23822860419750214, -0.1483769565820694, -0.2140822857618332, 0.06644037365913391, -0.03755014389753342, 0.0007556774071417749, -0.06284623593091965, -0.10824001580476761, 0.2099834382534027, -0.036193523555994034, 0.14142781496047974, 0.08027778565883636, -0.03262028098106384, 0.0715598613023758, -0.02965562976896763, 0.05391201749444008, -0.12338283658027649, 0.01811203360557556, -0.07577989250421524, 0.06247202306985855, -0.1898764967918396, 0.061457328498363495, 0.033449918031692505, -0.07175537943840027, -0.24436332285404205, 0.0008450349560007453, -0.14808088541030884, -0.07451822608709335, -0.020101074129343033, 0.11266793310642242, 0.04856821149587631, -0.11897078901529312, -0.042017579078674316, 0.10557664185762405, -0.026335015892982483, -0.022374717518687248, 0.038894668221473694, 0.047325413674116135, -0.03636119142174721, -0.11782491207122803, 0.13180357217788696, -0.000548420415725559, 0.09819802641868591, 0.010093159042298794, -0.02213294804096222, -0.12186914682388306, 0.15735799074172974, 0.29875901341438293, -0.09213070571422577, -0.03724648430943489, 0.04687123745679855, 0.08341988176107407, -0.09819097816944122, -0.14025944471359253, 0.10791683942079544, 0.07037264853715897, -0.05915137380361557, 0.0747508779168129, -0.08361631631851196, -0.08671809732913971, -0.04589982330799103, 0.2262982279062271, 0.2591083347797394, 0.12730631232261658, -0.1241360604763031, 0.08892212808132172, -2.5772234627830694e-32, 0.01488905306905508, -0.010369398631155491, -0.15926170349121094, 0.05760100111365318, -0.16815043985843658, -0.04905160889029503, -0.1471918374300003, 0.012891099788248539, -0.16645221412181854, 0.05195525288581848, 0.035790156573057175, 0.07910183817148209, 0.12293916940689087, -0.040363505482673645, 0.05811997130513191, -0.045267898589372635, 0.04968135803937912, 0.09423759579658508, 0.02795635163784027, 0.13650837540626526, 0.1583937555551529, -0.010395334102213383, 0.1424054503440857, -0.015291938558220863, 0.0005286288214847445, -0.07583663612604141, -0.08234921097755432, -0.02829493023455143, 0.10706917941570282, 0.04225154221057892, -0.07673346996307373, 0.11113530397415161, -0.0455595925450325, 0.09734911471605301, -0.029033446684479713, -0.06613856554031372, 0.02063305489718914, -0.09482111781835556, -0.14209040999412537, -0.03730418160557747, 0.09383075684309006, 0.03062612935900688, -0.08070875704288483, -0.13266541063785553, 0.10582637786865234, 0.02526194043457508, -0.029095279052853584, 0.0342077761888504, -0.17589664459228516, -0.023779505863785744, -0.028057515621185303, 0.14386743307113647, 0.022207599133253098, 0.059353023767471313, 0.02379516139626503, -0.046654559671878815, 0.06811581552028656, -0.060129787772893906, -0.12956397235393524, 0.05800241231918335, 0.2646498382091522, -0.020123064517974854, -0.0934668779373169, 0.009834974072873592, -0.03508793190121651, -0.0026429721619933844, 0.07829222828149796, -0.24098548293113708, 0.13910642266273499, 0.10294368863105774, -0.12066799402236938, 0.10236998647451401, 0.042724817991256714, 0.1459810584783554, -0.15244652330875397, -0.0799395889043808, -0.11121080070734024, 0.06714444607496262, -0.08721581101417542, -0.044074200093746185, -0.11647157371044159, 0.027840061113238335, -0.11222200095653534, -0.041201408952474594, 0.07957618683576584, 0.08672202378511429, 0.02196897380053997, 0.027845053002238274, 0.015199331566691399, -0.08371993899345398, -0.19253438711166382, 0.2734895646572113, -0.08171591907739639, -0.13480523228645325, -0.021119359880685806, 0.15821988880634308, 0.07887662947177887, 0.13592642545700073, -0.11052655428647995, -0.17951269447803497, 0.18807736039161682, -0.1099592000246048, 0.07652994245290756, 0.12006644159555435, 0.2156580090522766, 0.0019432097906246781, 0.14526037871837616, 0.0554158054292202, -0.293562650680542, 0.048805344849824905, 0.009207204915583134, -0.17072905600070953, -0.008286825381219387, -0.13626913726329803, 0.07739797979593277, 0.039970509707927704, 0.08720092475414276, 0.06091534346342087, 0.062189534306526184, -0.01684173196554184, -0.07050998508930206, 0.0062424782663583755, -0.0640924721956253, 0.13181278109550476, 0.03223748505115509, 0.1251251995563507, -0.11577315628528595, -0.25221091508865356, 0.19425369799137115, -0.02398616261780262, -0.09176263958215714, -0.23288439214229584, 7.730550350970589e-7, -0.13820630311965942, 0.1470373272895813, 0.15132933855056763, -0.1424008309841156, -0.07317189872264862, 0.14835062623023987, -0.011722755618393421, 0.0269255880266428, -0.13496451079845428, 0.03394288569688797, 0.11970067024230957, -0.1129351258277893, 0.03851928561925888, 0.013930645771324635, 0.14344002306461334, -0.012950150296092033, -0.20253986120224, 0.04407636821269989, -0.16875140368938446, 0.05045183375477791, 0.10323192179203033, 0.059303782880306244, 0.07384064793586731, -0.009725214913487434, 0.18631136417388916, -0.011895301751792431, -0.1485384702682495, -0.11559399962425232, 0.17168422043323517, 0.07833877950906754, -0.044803064316511154, -0.14446713030338287, 0.07749196141958237, 0.08764514327049255, -0.06080935522913933, -0.14680565893650055, -0.06217142567038536, -0.05376613140106201, -0.015011116862297058, 0.1179625391960144, 0.05966806039214134, 0.05884494632482529, -0.03219727799296379, -0.23287555575370789, 0.0871795117855072, 0.02556164562702179, -0.14551909267902374, 0.058325208723545074, 0.0468420572578907, -0.06244216859340668, 0.13335993885993958, 0.07183008641004562, 0.0012196478201076388, 0.11630485951900482, -0.043495576828718185, 0.06189480796456337, 0.01452152244746685, -0.1620427519083023, 0.0035105107817798853, -0.00855850987136364, -0.05479472130537033, -0.05985669791698456, 0.07601848244667053, 0.050400543957948685, 0.16942977905273438, -0.11933181434869766, -0.0008443653932772577, 1.4312192438350894e-34, 0.06067034974694252, 0.08107174187898636, 0.0707927793264389, -0.15711043775081635, 0.027447810396552086, 0.009598677977919579, 0.10706736892461777, 0.041045837104320526, 0.05796078220009804, -0.050996895879507065, -0.1294705867767334 ]
https://github.com/huggingface/datasets/issues/2556
Better DuplicateKeysError error to help the user debug the issue
@lhoestq I would like to take a hit at improving the error message. Will open a draft PR and will reach out to you for review
As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ```
26
Better DuplicateKeysError error to help the user debug the issue As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` @lhoestq I would like to take a hit at improving the error message. Will open a draft PR and will reach out to you for review
[ 0.08501540869474411, 0.11760973185300827, 0.0443708673119545, 0.030620301142334938, 0.22163823246955872, 0.03535250201821327, 0.14661836624145508, 0.10325004905462265, -0.05654117465019226, 0.12088760733604431, 0.08830232918262482, 0.05069633200764656, -0.14013269543647766, 0.11796446889638901, 0.19120286405086517, -0.14613056182861328, -0.06646785140037537, -0.0522800013422966, 0.013270310126245022, -0.020693928003311157, -0.17692388594150543, 0.06814926117658615, 0.1044277623295784, -0.031477395445108414, -0.10255008190870285, -0.12202360481023788, -0.05791477486491203, 0.03119736909866333, 0.0285955760627985, -0.2822069525718689, 0.07328832149505615, 0.09829098731279373, -0.06622927635908127, 0.12513497471809387, 0.000005946639248577412, 0.037064991891384125, 0.15893520414829254, 0.03287510573863983, -0.18065690994262695, 0.11261902749538422, -0.041415736079216, -0.13954007625579834, 0.13730956614017487, 0.03269749879837036, -0.06473745405673981, -0.12274954468011856, -0.09828472882509232, 0.04730604216456413, 0.06877165287733078, -0.013446017168462276, 0.047588054090738297, 0.05665880814194679, 0.020626431331038475, -0.09863526374101639, 0.09307502955198288, 0.10044838488101959, -0.017129112035036087, 0.12860111892223358, -0.1199464350938797, -0.1101774051785469, 0.03349410742521286, 0.18378975987434387, 0.0515461266040802, -0.006162956822663546, 0.1039329469203949, 0.048728279769420624, -0.0641234815120697, -0.17723268270492554, -0.000992647255770862, 0.17556710541248322, 0.08725347369909286, 0.022095080465078354, -0.10020323097705841, -0.1606162041425705, -0.016527652740478516, -0.11887972801923752, -0.08489260822534561, 0.010332233272492886, -0.15064598619937897, -0.03688453510403633, -0.11666865646839142, 0.11125146597623825, -0.03704395517706871, -0.061778537929058075, -0.08990578353404999, -0.22607652842998505, -0.03989332169294357, 0.09274446219205856, -0.004171460401266813, -0.15769927203655243, 0.10542870312929153, -0.004581557121127844, -0.13711512088775635, 0.052584048360586166, -0.10457601398229599, -0.14308913052082062, 0.015487771481275558, -0.098048634827137, 0.1384189873933792, -0.1440841406583786, 0.09418966621160507, 0.01480818446725607, -0.11547166854143143, -0.09679722040891647, 0.022924568504095078, -0.0345965139567852, 0.07534658908843994, -0.028418811038136482, 0.09807492792606354, 0.07384815067052841, 0.028842635452747345, 0.038216184824705124, -0.011624986305832863, -0.21434275805950165, 0.1822039633989334, 0.11626178026199341, 0.21698477864265442, 0.22696471214294434, -0.004940158221870661, 0.05081666260957718, 0.10504346340894699, -0.0109581733122468, -0.13285823166370392, 0.00982138141989708, 0.030455805361270905, -0.07268159091472626, 0.006301532499492168, -0.030375296249985695, -0.023989105597138405, -0.039577778428792953, -0.058681610971689224, 0.16553780436515808, 0.08973503112792969, -0.03328608348965645, 0.1014765053987503, 0.019061220809817314, 0.09788797795772552, 0.022690409794449806, 0.11859053373336792, -0.06545703858137131, 0.09419431537389755, 0.13174834847450256, -0.0500604622066021, -0.08143310248851776, -0.002153838984668255, -0.02023089863359928, 0.08525099605321884, -0.0004869529511779547, -0.0897173061966896, -0.0525088869035244, -0.03540930524468422, 0.14276543259620667, -0.25171321630477905, 0.14659813046455383, -0.0040267701260745525, 0.046023283153772354, 0.053903475403785706, -0.003659057430922985, -0.2560533285140991, -0.1064273938536644, 0.042762190103530884, 0.015276269055902958, 0.09776148945093155, -0.08851099014282227, 0.08510849624872208, 0.17609688639640808, 0.011221704073250294, 0.046549681574106216, -0.14204947650432587, 0.05671641230583191, -0.06316373497247696, -0.06563261151313782, -0.1287607103586197, 0.18781211972236633, -0.11851398646831512, 0.11674651503562927, -0.0023227569181472063, -0.03013751097023487, -0.11167528480291367, 0.1270572394132614, -0.029234858229756355, -0.09751544147729874, -0.04204554855823517, -0.05750802159309387, 0.19094792008399963, 0.03234478831291199, 0.0047430298291146755, 0.14581137895584106, -0.1163264587521553, -0.0838545635342598, -0.09695179015398026, 0.04803851991891861, -0.015552602708339691, 0.07216959446668625, -0.09784095734357834, -0.06799306720495224, 0.022121896967291832, -0.12580329179763794, 0.02640364319086075, -0.13814088702201843, -0.21839560568332672, -0.10210705548524857, 0.11058896780014038, 0.025660930201411247, -0.03829341009259224, 0.010069726966321468, -0.18377049267292023, 0.12590990960597992, 0.04416917264461517, -0.041032105684280396, -0.1174926906824112, -0.05952247977256775, 0.08530088514089584, 0.004047976806759834, -0.133808434009552, -0.02629798837006092, 0.002152309287339449, -0.11335784196853638, 0.00659844558686018, 0.008151005953550339, 0.05545279383659363, 0.05622877925634384, 0.11218179017305374, 0.03348904475569725, 0.029833221808075905, -0.012644881382584572, 0.028571194037795067, 0.06130721792578697, 0.10149829834699631, 0.09804750978946686, -0.025430548936128616, -0.05673497915267944, 0.029888229444622993, 0.08181861788034439, -0.15434154868125916, 0.028203776106238365, 0.14380498230457306, -0.1190977394580841, 0.11255750805139542, -0.07519111037254333, -0.18485762178897858, 0.03450195491313934, -0.19777493178844452, 0.006308125797659159, -0.13480877876281738, -0.0039528654888272285, 0.011666053906083107, 0.13086940348148346, -0.03785522282123566, -0.018440518528223038, -0.03555387258529663, 0.060828182846307755, -0.04308781400322914, 0.04186772182583809, -0.0665336549282074, -0.1105995774269104, 0.007117709144949913, 0.09731090068817139, -0.1931930035352707, 0.044734735041856766, 0.20261776447296143, -0.0518050454556942, 0.03941236436367035, 0.06872844696044922, 0.09796757251024246, -0.04095836728811264, 0.08274976164102554, 0.16400235891342163, -0.0607839971780777, 0.18050414323806763, 0.008076515980064869, -0.024157680571079254, -0.029707571491599083, -0.06665486842393875, 0.007105757016688585, -0.11802905052900314, -0.1254851222038269, 0.051515132188797, -0.1583426147699356, 0.10659776628017426, -0.20483766496181488, -0.06963347643613815, 0.043758541345596313, -0.04097726196050644, 0.11576277762651443, 0.1038053035736084, -0.0890020802617073, -0.015615979209542274, -0.1488248109817505, 0.15119397640228271, 0.02412094548344612, -0.1848406344652176, 0.12630124390125275, -0.1905541718006134, 0.012100636959075928, 0.007306138053536415, 0.05595335736870766, -0.045507919043302536, -0.09703634679317474, 0.040239863097667694, -0.025880316272377968, 0.04988764971494675, 0.06488644331693649, -0.12070094048976898, -0.062073927372694016, -0.00437633041292429, 0.2955339848995209, 0.04475982487201691, -0.1893891990184784, -0.26170289516448975, -0.05496326461434364, -0.10734868794679642, -0.001111145131289959, 0.10429886728525162, 0.15304842591285706, 0.12871746718883514, -0.09494571387767792, -0.25884371995925903, 0.14231348037719727, 0.09790139645338058, 0.07065089046955109, 0.03188420832157135, 0.05371670052409172, 0.10876422375440598, 0.0875643938779831, 0.002546383533626795, -0.10192426294088364, 0.06798329949378967, -0.011913986876606941, -0.18510961532592773, -0.013344529084861279, 0.041393786668777466, 0.006306867115199566, -0.03823915868997574, -0.03786463662981987, -0.08219244331121445, -0.02024674601852894, 0.025112664327025414, 0.09770721197128296, -0.06451165676116943, 0.06025078892707825, -0.04431814327836037, -0.11391853541135788, 0.04470313712954521, -0.0381956584751606, -0.16549107432365417, -0.10842209309339523, -0.08316780626773834, 0.16140620410442352, -0.013346614316105843, 0.057172439992427826, 0.09413470327854156, 0.08047844469547272, -0.12454865127801895, 0.03792275860905647, -0.06024555861949921, -0.2162790447473526, 0.10841543972492218, -0.1678483486175537, -0.0014629828510805964, 0.17652609944343567, 0.03224385529756546, 0.22706368565559387, 0.16106942296028137, -0.1323922723531723, -0.03515508025884628, 0.02475210279226303, 0.026806147769093513, 0.025571469217538834, -0.21454329788684845, -0.0318446047604084, -0.07045614719390869, 0.004321443848311901, 0.08694148063659668, -0.07418779283761978, 0.06677402555942535, 0.12032799422740936, -0.15341898798942566, 0.02303534559905529, -0.1277252584695816, -0.01927126944065094, -0.19029554724693298, -0.03198009356856346, -0.0716652125120163, 0.11963759362697601, 0.03794962540268898, 0.15339677035808563, 0.05047342926263809, -0.01943160966038704, 0.04963868856430054, 0.0810064747929573, -0.1311171054840088, -0.1036972627043724, -0.008356592617928982, -0.10419823974370956, -0.1070789322257042, 0.07534439861774445, 0.03482816740870476, 0.08744446188211441, 0.01547237765043974, 0.06518619507551193, 0.12362366914749146, -0.2527484893798828, 0.05953013896942139, 0.031028665602207184, -0.023515842854976654, -0.05373120680451393, 0.08354980498552322, 0.15848994255065918, 0.053192030638456345, 0.004157922230660915, 0.10312900692224503, -0.026636634021997452, 0.04396412521600723, 0.12924906611442566, -0.016467083245515823, -0.1514255553483963, -0.1854732185602188, 0.03654070198535919, -0.16268761456012726, -0.20915494859218597, -0.13891644775867462, 0.10055513679981232, -0.05592053011059761, 0.12520848214626312, -0.06612958759069443, -0.06438175588846207, 0.09002364426851273, 0.13697682321071625, 0.14303870499134064, 0.06422868371009827, 0.13815419375896454, 0.141877681016922, 0.1437438577413559, 0.007142160087823868, -0.012630137614905834, 0.2587454915046692, -0.13070648908615112, -0.07489331066608429, -0.09500513225793839, -0.10818935930728912, 0.08686134964227676, 0.19683104753494263, -0.043568436056375504, 0.13176696002483368, -0.09696700423955917, -0.007866713218390942, -0.09355620294809341, 0.01378459483385086, 0.04105284810066223, -0.08633147180080414, -0.24449898302555084, -0.15372444689273834, -0.1394960731267929, 0.162678062915802, -0.03489925339818001, 0.196305513381958, -0.06514693051576614, -0.07736664265394211, 0.10259686410427094, -0.12287832796573639, -0.020890068262815475, -0.12046965956687927, 0.016360357403755188, -0.14807546138763428, 0.06995292007923126, 0.19591110944747925, -0.0053995936177670956, -0.06436529755592346, 0.0029843964148312807, -0.01846759393811226, 0.15072883665561676, 0.01809423416852951, 0.02038847655057907, 0.09388982504606247, -0.08476846665143967, 0.030997321009635925, -0.11040796339511871, -0.09862688928842545, -0.07623948901891708, 0.3089357912540436, 0.04676944389939308, -0.09788548201322556, -0.11206421256065369, -0.018893538042902946, 0.016648992896080017, 0.07273056358098984, -0.023910997435450554, -0.08623994886875153, 0.22416548430919647, -0.14015960693359375, -0.1956596076488495, 0.05859106406569481, -0.03904206305742264, -0.020752184092998505, -0.03679309040307999, -0.09489619731903076, 0.22283491492271423, -0.029519518837332726, 0.14959505200386047, 0.05890919268131256, -0.04866461083292961, 0.0757690966129303, -0.0345296785235405, 0.039449501782655716, -0.11349551379680634, 0.004971465561538935, -0.07066874206066132, 0.04720302298665047, -0.19401289522647858, 0.03366789221763611, 0.04258270561695099, -0.0896942988038063, -0.2427280992269516, -0.001323109376244247, -0.15895111858844757, -0.0970461368560791, -0.021922418847680092, 0.1028527095913887, 0.053011972457170486, -0.09544245153665543, -0.043049126863479614, 0.09981497377157211, -0.029092788696289062, -0.02545265480875969, 0.04199066013097763, 0.05277905613183975, -0.026525914669036865, -0.11377439647912979, 0.10692788660526276, -0.02861829288303852, 0.08788032084703445, 0.03094857931137085, -0.01895988918840885, -0.11960236728191376, 0.15306991338729858, 0.2963261604309082, -0.09154414385557175, -0.0430334135890007, 0.03382125496864319, 0.07195508480072021, -0.09253796190023422, -0.12867802381515503, 0.12932680547237396, 0.09107451885938644, -0.03034166246652603, 0.07987113296985626, -0.09337848424911499, -0.1013331487774849, -0.03941456228494644, 0.2068263590335846, 0.25837647914886475, 0.1444912552833557, -0.11636856943368912, 0.09568347036838531, -2.6294406850881216e-32, 0.026485279202461243, -0.002292813267558813, -0.158065065741539, 0.049257732927799225, -0.18921472132205963, -0.025430213660001755, -0.14118222892284393, -0.007838777266442776, -0.15554895997047424, 0.030585449188947678, 0.03260405734181404, 0.09435388445854187, 0.13770432770252228, -0.029515396803617477, 0.04532933980226517, -0.029367437586188316, 0.05705326795578003, 0.09065961837768555, 0.02676476538181305, 0.1256008744239807, 0.1491755247116089, 0.0009644682286307216, 0.1281324326992035, -0.03566129133105278, 0.009535027667880058, -0.06600400060415268, -0.07845306396484375, -0.019458847120404243, 0.10116294026374817, 0.05452963709831238, -0.075486920773983, 0.11747921258211136, -0.055381711572408676, 0.10682816803455353, -0.011932164430618286, -0.08914829045534134, 0.028919700533151627, -0.0946572870016098, -0.1426139771938324, -0.0277944877743721, 0.099835604429245, 0.02564173936843872, -0.06496208161115646, -0.16069722175598145, 0.09026146680116653, 0.007677904330193996, -0.020479116588830948, 0.0447094589471817, -0.18016299605369568, -0.015174318104982376, -0.04907814413309097, 0.134574294090271, 0.03353668004274368, 0.06159403175115585, 0.03298136591911316, -0.06353619694709778, 0.05821128189563751, -0.0510186031460762, -0.14738205075263977, 0.05890018120408058, 0.26368752121925354, -0.02001342736184597, -0.09382442384958267, 0.012250028550624847, -0.01968490146100521, 0.0077278101816773415, 0.07798127830028534, -0.23091888427734375, 0.11906924843788147, 0.08620357513427734, -0.11212489753961563, 0.08979382365942001, 0.036663323640823364, 0.14133530855178833, -0.12280306220054626, -0.08835836499929428, -0.119578056037426, 0.06631352007389069, -0.07253552973270416, -0.046567145735025406, -0.11018654704093933, 0.013328245840966702, -0.08812680840492249, -0.04039603844285011, 0.08223921805620193, 0.06397566944360733, 0.018498877063393593, 0.0021868906915187836, 0.023580851033329964, -0.07419805228710175, -0.17030218243598938, 0.27358371019363403, -0.09956797957420349, -0.14832018315792084, -0.03757987543940544, 0.12712149322032928, 0.07349110394716263, 0.14631377160549164, -0.10942061245441437, -0.17637747526168823, 0.18355457484722137, -0.11317409574985504, 0.08757517486810684, 0.12312518060207367, 0.20704616606235504, -0.009984394535422325, 0.15274196863174438, 0.07355839014053345, -0.28651177883148193, 0.05505828931927681, 0.01651737093925476, -0.16885143518447876, 0.00615144707262516, -0.11098334938287735, 0.06819352507591248, 0.037291232496500015, 0.10251560062170029, 0.0513928048312664, 0.06721603870391846, -0.0043598017655313015, -0.06401240080595016, 0.008972792886197567, -0.07401267439126968, 0.13752779364585876, 0.03284680098295212, 0.12039719521999359, -0.09657622873783112, -0.22446833550930023, 0.17340554296970367, -0.030988816171884537, -0.07400871813297272, -0.24183401465415955, 7.790288236719789e-7, -0.12729176878929138, 0.16663238406181335, 0.13234969973564148, -0.15701788663864136, -0.08481278270483017, 0.1344766616821289, -0.03752637282013893, 0.034336499869823456, -0.12338808178901672, 0.0493619404733181, 0.1355343461036682, -0.1145034208893776, 0.04409847781062126, 0.030433034524321556, 0.1370641589164734, -0.008187792263925076, -0.18984763324260712, 0.017823150381445885, -0.17136014997959137, 0.05777417868375778, 0.12190507352352142, 0.054570022970438004, 0.08446378260850906, -0.016617482528090477, 0.197083979845047, 0.0002102461294271052, -0.1438959538936615, -0.09853199124336243, 0.18328911066055298, 0.07795045524835587, -0.041969530284404755, -0.16273033618927002, 0.09627774357795715, 0.0733613520860672, -0.058633461594581604, -0.13174600899219513, -0.05224243924021721, -0.046873338520526886, -0.023597927764058113, 0.11186125129461288, 0.047999706119298935, 0.0575474314391613, -0.02612277865409851, -0.2408214509487152, 0.09517775475978851, 0.030968667939305305, -0.13723398745059967, 0.06634953618049622, 0.03398973122239113, -0.058931976556777954, 0.1422872692346573, 0.08122452348470688, -0.026408221572637558, 0.14458709955215454, -0.030588431283831596, 0.07625634968280792, 0.009751168079674244, -0.1632186770439148, 0.019866522401571274, -0.008806979283690453, -0.050883688032627106, -0.04701410233974457, 0.07902855426073074, 0.054396048188209534, 0.14903782308101654, -0.13846702873706818, -0.024958882480859756, 1.260719757555567e-34, 0.0610395148396492, 0.06256628781557083, 0.06415456533432007, -0.18491564691066742, 0.015034451149404049, 0.005008122883737087, 0.1227426752448082, 0.04651982709765434, 0.06175361946225166, -0.0478890985250473, -0.11429611593484879 ]
https://github.com/huggingface/datasets/issues/2556
Better DuplicateKeysError error to help the user debug the issue
> DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. @lhoestq when you mention 42th and 1337th in the above case , are these values the examples' "id" or are they the examples' index ?
As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ```
37
Better DuplicateKeysError error to help the user debug the issue As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` > DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. @lhoestq when you mention 42th and 1337th in the above case , are these values the examples' "id" or are they the examples' index ?
[ 0.054676733911037445, 0.13873744010925293, 0.029841743409633636, 0.043103352189064026, 0.19666051864624023, 0.06534302979707718, 0.1502196192741394, 0.15810108184814453, -0.054002001881599426, 0.1204318255186081, 0.11389118432998657, 0.05809702351689339, -0.15949399769306183, 0.06751994788646698, 0.2308603674173355, -0.10470952093601227, -0.09231696277856827, -0.06849450618028641, 0.04153499752283096, -0.002670816844329238, -0.20754839479923248, 0.05967035889625549, 0.1020612046122551, -0.032940637320280075, -0.10895399004220963, -0.12227611988782883, -0.044372498989105225, 0.004895925521850586, 0.056174587458372116, -0.3172280788421631, 0.0854276716709137, 0.1254359632730484, -0.08393964171409607, 0.12860536575317383, 0.0000057959218793257605, 0.01824398711323738, 0.20061402022838593, 0.04584013670682907, -0.1937396228313446, 0.11533913016319275, -0.039741288870573044, -0.1361236870288849, 0.12032522261142731, -0.009376234374940395, -0.04020879045128822, -0.09332485496997833, -0.149290531873703, 0.09564424306154251, 0.0660472959280014, -0.011019609868526459, 0.049984581768512726, 0.04772397130727768, 0.01841728575527668, -0.07136645168066025, 0.12300489097833633, 0.11255145817995071, -0.0037380140274763107, 0.13929037749767303, -0.1044950932264328, -0.055610883980989456, 0.033125948160886765, 0.1739044189453125, 0.03710765391588211, -0.02959481067955494, 0.061537712812423706, 0.016579922288656235, -0.09096269309520721, -0.15625536441802979, -0.03204089030623436, 0.17133143544197083, 0.06595920771360397, 0.05051400139927864, -0.10579463839530945, -0.13584014773368835, 0.010640289634466171, -0.15111075341701508, -0.09459707140922546, -0.03983806446194649, -0.10511501133441925, -0.038843799382448196, -0.043481048196554184, 0.15476495027542114, -0.03443300351500511, -0.05534462630748749, -0.13390421867370605, -0.19981253147125244, -0.07258199900388718, 0.09804287552833557, 0.04258694872260094, -0.19803079962730408, 0.09994804859161377, 0.03787694126367569, -0.14985623955726624, 0.03583233430981636, -0.09826473146677017, -0.15728989243507385, 0.06506237387657166, -0.12448721379041672, 0.10740971565246582, -0.14798647165298462, 0.12942321598529816, 0.08221153914928436, -0.1021234467625618, -0.07920745015144348, 0.054551590234041214, -0.029229406267404556, 0.1224101334810257, -0.004031610209494829, 0.1243843212723732, 0.07145491987466812, 0.05553491786122322, 0.03705725073814392, -0.054878611117601395, -0.21523071825504303, 0.23164519667625427, 0.11847489327192307, 0.20996272563934326, 0.23502378165721893, -0.04195027053356171, 0.0805397555232048, 0.06676412373781204, 0.014570281840860844, -0.13163429498672485, 0.003707386553287506, 0.03244554251432419, -0.0801362693309784, 0.011220741085708141, -0.05719870701432228, -0.00615081237629056, -0.08312175422906876, -0.054002344608306885, 0.16824115812778473, 0.11071553826332092, -0.041537243872880936, 0.09427402168512344, 0.06110776960849762, 0.0989522784948349, -0.028148820623755455, 0.1569509357213974, -0.06618326902389526, 0.147945374250412, 0.12538641691207886, -0.036580249667167664, -0.03532136604189873, -0.022409504279494286, 0.0027923984453082085, 0.050282008945941925, -0.02781616523861885, -0.09436234831809998, -0.048703402280807495, -0.026577724143862724, 0.0913516953587532, -0.20993266999721527, 0.155937060713768, -0.012913326732814312, 0.030663205310702324, 0.05740343779325485, -0.031053438782691956, -0.2899284064769745, -0.12735824286937714, 0.06703034788370132, -0.028881870210170746, 0.1310366690158844, -0.054636407643556595, 0.08751582354307175, 0.21192240715026855, -0.006019377615302801, 0.03439343348145485, -0.16136988997459412, 0.1028597503900528, -0.06235355883836746, -0.08111581951379776, -0.15347927808761597, 0.1692812591791153, -0.10238935053348541, 0.16330547630786896, -0.02531692199409008, -0.040438536554574966, -0.1343066692352295, 0.12897717952728271, -0.03097381629049778, -0.08136685192584991, -0.01135623175650835, -0.018055932596325874, 0.1981608271598816, 0.007226873654872179, 0.030107764527201653, 0.14424020051956177, -0.11212477087974548, -0.08224380761384964, -0.11003869026899338, 0.07319942861795425, -0.017093706876039505, 0.057626813650131226, -0.11867854744195938, -0.12141146510839462, 0.008134830743074417, -0.16412115097045898, -0.01132919266819954, -0.06257032603025436, -0.24479039013385773, -0.10403244197368622, 0.12955330312252045, 0.016975313425064087, -0.023295201361179352, 0.027257898822426796, -0.19297565519809723, 0.12071560323238373, 0.04690585285425186, -0.08992872387170792, -0.10520121455192566, -0.07683169841766357, 0.06111564114689827, 0.041713520884513855, -0.13700765371322632, -0.0225556418299675, -0.00487107178196311, -0.1092805415391922, 0.030092494562268257, -0.019357454031705856, 0.046928659081459045, 0.0251794271171093, 0.049930669367313385, 0.011236893013119698, 0.028208399191498756, -0.038742244243621826, 0.024992676451802254, 0.006648504175245762, 0.11782050132751465, 0.06344611197710037, 0.006356951780617237, -0.05943835899233818, 0.026733392849564552, 0.11196554452180862, -0.1307772547006607, 0.009989998303353786, 0.12069113552570343, -0.11197148263454437, 0.13851647078990936, -0.017747579142451286, -0.22343946993350983, 0.02793991193175316, -0.19138820469379425, 0.01555332075804472, -0.10454528778791428, -0.002001869725063443, 0.0316920131444931, 0.1271228790283203, -0.059248264878988266, 0.00707985507324338, -0.0372452475130558, 0.08031327277421951, -0.04706602171063423, 0.02370818890631199, -0.07228432595729828, -0.08856361359357834, -0.003352974308654666, 0.11778897047042847, -0.18793761730194092, 0.08460020273923874, 0.1795729547739029, -0.0628247931599617, 0.07706434279680252, 0.05833088606595993, 0.07020530849695206, -0.03749736770987511, 0.0753653272986412, 0.14096584916114807, -0.05666115880012512, 0.1525534838438034, 0.010346823371946812, -0.062321536242961884, -0.02126442641019821, -0.06276795268058777, 0.00691367220133543, -0.12257329374551773, -0.15682269632816315, 0.08028547465801239, -0.12935326993465424, 0.07615009695291519, -0.17257100343704224, -0.07341591268777847, 0.06383074820041656, 0.006649716291576624, 0.10980476438999176, 0.08496054261922836, -0.10661383718252182, -0.02323135733604431, -0.1339448243379593, 0.1260310262441635, 0.053441714495420456, -0.1970539540052414, 0.11884985864162445, -0.1999272108078003, 0.011494705453515053, -0.011241387575864792, 0.013390038162469864, -0.06642716377973557, -0.09249898791313171, 0.07411042600870132, -0.07267206907272339, 0.022257644683122635, 0.030738430097699165, -0.1116868257522583, -0.09636683017015457, 0.022746045142412186, 0.3154289722442627, 0.027881566435098648, -0.19038306176662445, -0.2582547962665558, -0.04854035750031471, -0.09778212010860443, -0.0005082304123789072, 0.11544274538755417, 0.18065325915813446, 0.1522199958562851, -0.08357425779104233, -0.26322802901268005, 0.14772337675094604, 0.04897572845220566, 0.044055741280317307, 0.009513561613857746, 0.06716163456439972, 0.08713383227586746, 0.08833204954862595, -0.0010600221576169133, -0.08903259038925171, 0.06921634078025818, -0.02910381183028221, -0.20487317442893982, -0.027522984892129898, 0.024894805625081062, -0.012491162866353989, -0.003664512885734439, 0.0337512344121933, -0.05401255935430527, -0.05481335148215294, -0.0036482475697994232, 0.09323903173208237, -0.04675754904747009, 0.07607897371053696, -0.07198690623044968, -0.08150379359722137, 0.023082174360752106, 0.0023592819925397635, -0.16062162816524506, -0.08279474824666977, -0.0663599967956543, 0.17550943791866302, -0.006241937633603811, 0.1280665248632431, 0.07854296267032623, 0.06395963579416275, -0.10172950476408005, 0.038573894649744034, -0.09154916554689407, -0.24123604595661163, 0.1279931515455246, -0.15977376699447632, 0.013739056885242462, 0.16503506898880005, -0.0023301357869058847, 0.24280396103858948, 0.08351945132017136, -0.12276755273342133, -0.04836948215961456, 0.03408530354499817, 0.020220452919602394, 0.011395610868930817, -0.1940384805202484, -0.04958295077085495, -0.052550483494997025, -0.02188536711037159, 0.09762819111347198, -0.04903380945324898, 0.019327418878674507, 0.13525444269180298, -0.14438503980636597, -0.014234557747840881, -0.12076806277036667, -0.021872008219361305, -0.16592678427696228, -0.0391341894865036, -0.10375776886940002, 0.10924771428108215, 0.02724284864962101, 0.14220260083675385, 0.0852619856595993, -0.010766534134745598, 0.07364027947187424, 0.09110847115516663, -0.14308109879493713, -0.12160063534975052, 0.04906950891017914, -0.08066115528345108, -0.04821868613362312, 0.06613512337207794, 0.033393584191799164, 0.08982838690280914, 0.03800045698881149, 0.07532083988189697, 0.10985468327999115, -0.2882923483848572, 0.03715796023607254, 0.03591439872980118, -0.06095094978809357, -0.030741572380065918, 0.050570886582136154, 0.17835813760757446, 0.07453779131174088, 0.03339366987347603, 0.05667902156710625, -0.03328925743699074, 0.005291414447128773, 0.15755975246429443, -0.014162619598209858, -0.1608475148677826, -0.17258521914482117, 0.00719536142423749, -0.12234202027320862, -0.18829677999019623, -0.16527000069618225, 0.10895515233278275, -0.08985322713851929, 0.1536453515291214, -0.044471193104982376, -0.12889611721038818, 0.08057857304811478, 0.08044365048408508, 0.14894571900367737, 0.07103660702705383, 0.17252501845359802, 0.12951453030109406, 0.1522827297449112, 0.0330449603497982, 0.02000408247113228, 0.21858739852905273, -0.11588877439498901, -0.04589223489165306, -0.08993535488843918, -0.12420154362916946, 0.05612940713763237, 0.22024433314800262, -0.05743174999952316, 0.09342893958091736, -0.14492841064929962, -0.03430643305182457, -0.09618770331144333, 0.02124617248773575, 0.07813480496406555, -0.09494522213935852, -0.2465481013059616, -0.1643911600112915, -0.12822319567203522, 0.17386329174041748, -0.04644355922937393, 0.18773476779460907, 0.02225738763809204, -0.1022251695394516, 0.09844658523797989, -0.09001144021749496, -0.0375860296189785, -0.09290628135204315, -0.004205639939755201, -0.18438610434532166, 0.060583241283893585, 0.15895384550094604, -0.0034371980000287294, -0.07099703699350357, -0.041280075907707214, -0.04700159654021263, 0.14738181233406067, 0.03138196840882301, 0.04198475554585457, 0.10240523517131805, -0.1118665412068367, 0.04435024783015251, -0.11807918548583984, -0.11549054086208344, -0.08034168183803558, 0.30731505155563354, 0.043873924762010574, -0.04722781106829643, -0.0678604319691658, 0.0049688806757330894, 0.022658823058009148, 0.08273821324110031, -0.05688030645251274, -0.06878495216369629, 0.21176360547542572, -0.1454053372144699, -0.20520322024822235, 0.005669537000358105, 0.022970445454120636, 0.03543858602643013, -0.05705399066209793, -0.11813484132289886, 0.17919403314590454, -0.06410849094390869, 0.1253896802663803, 0.04580453038215637, -0.04068625718355179, 0.09557098150253296, -0.009742772206664085, 0.06698469072580338, -0.07695817202329636, 0.017728274688124657, -0.06409306079149246, 0.10470418632030487, -0.16999229788780212, 0.08438025414943695, 0.05959368497133255, -0.04600938782095909, -0.2753603160381317, -0.03259012848138809, -0.17000757157802582, -0.08240403980016708, 0.0022918980102986097, 0.11173155158758163, 0.05672098323702812, -0.12386457622051239, -0.05182567238807678, 0.06276795268058777, -0.04864402115345001, -0.036587905138731, 0.02639857679605484, 0.05547357723116875, -0.01958261802792549, -0.1325511932373047, 0.10093766450881958, 0.013322198763489723, 0.07589038461446762, 0.006707911845296621, -0.028655529022216797, -0.1316523402929306, 0.18339696526527405, 0.3717467486858368, -0.09839542955160141, 0.005652505438774824, 0.024653274565935135, 0.07186225056648254, -0.1037423238158226, -0.10576096177101135, 0.10209329426288605, 0.03935353457927704, -0.05912311002612114, 0.07970162481069565, -0.10659068822860718, -0.1034649983048439, -0.031199196353554726, 0.21347978711128235, 0.22715653479099274, 0.05746643617749214, -0.12974578142166138, 0.044932056218385696, -2.5982075063131857e-32, 0.01438095886260271, -0.05200105905532837, -0.15034417808055878, 0.021024134010076523, -0.1678822785615921, -0.058462295681238174, -0.15244774520397186, -0.005512698087841272, -0.13008008897304535, 0.05098522827029228, 0.057587817311286926, 0.0682385265827179, 0.11173539608716965, -0.07681505382061005, 0.06871264427900314, -0.027464721351861954, 0.024385876953601837, 0.11144330352544785, -0.014071441255509853, 0.12237059324979782, 0.16069833934307098, 0.012224622070789337, 0.19254344701766968, -0.02112058363854885, -0.03259427845478058, -0.03752504661679268, 0.003950673621147871, -0.05661670118570328, 0.11715498566627502, 0.04206978902220726, -0.08121195435523987, 0.11767483502626419, -0.06770291924476624, 0.11484451591968536, 0.01600331813097, -0.1261364221572876, 0.04945775866508484, -0.08434582501649857, -0.13599039614200592, -0.02684132196009159, 0.12113551795482635, 0.0018953501712530851, -0.07168801128864288, -0.11462226510047913, 0.11411595344543457, 0.050883084535598755, -0.047693442553281784, 0.06162476912140846, -0.1782200038433075, -0.03810206800699234, -0.04216514900326729, 0.13336816430091858, 0.01888998970389366, 0.04888886958360672, 0.013401707634329796, -0.09561416506767273, 0.09374675899744034, -0.09987136721611023, -0.13029566407203674, 0.0282151959836483, 0.23524674773216248, -0.007993452250957489, -0.10992753505706787, -0.014992808923125267, -0.040273092687129974, 0.022187815979123116, 0.007493739482015371, -0.29334089159965515, 0.16541118919849396, 0.12153925746679306, -0.07855867594480515, 0.09762812405824661, 0.118276447057724, 0.10963520407676697, -0.17765791714191437, -0.06994279474020004, -0.07085965573787689, 0.09314457327127457, -0.08322049677371979, -0.05490928515791893, -0.10270669311285019, 0.03556210175156593, -0.126555934548378, -0.024037174880504608, 0.08355928957462311, 0.044096440076828, 0.04715350270271301, 0.01982552371919155, 0.03210727870464325, -0.09779722988605499, -0.21079301834106445, 0.2932893633842468, -0.046460624784231186, -0.12686172127723694, -0.09928792715072632, 0.12289077788591385, 0.05558706820011139, 0.21196101605892181, -0.12139628082513809, -0.1762750744819641, 0.17710557579994202, -0.15961770713329315, 0.11283385008573532, 0.13716039061546326, 0.21327365934848785, -0.014747952111065388, 0.11924891918897629, 0.07269897311925888, -0.2605067193508148, 0.0528654009103775, 0.000743796001188457, -0.15059654414653778, -0.016589367762207985, -0.14722874760627747, 0.03322654217481613, 0.03657563775777817, 0.0957924872636795, 0.03144894540309906, 0.06098070740699768, -0.036192260682582855, -0.05154334381222725, -0.022352851927280426, -0.0462917760014534, 0.1230430081486702, 0.06510753184556961, 0.14070092141628265, -0.0951058492064476, -0.21495552361011505, 0.13956062495708466, -0.021416090428829193, -0.052865371108055115, -0.15273673832416534, 7.691970722589758e-7, -0.14029046893119812, 0.18311254680156708, 0.16483895480632782, -0.21449382603168488, -0.055299751460552216, 0.17159302532672882, -0.004627771209925413, 0.05758175998926163, -0.09954702854156494, 0.0431547649204731, 0.12466146051883698, -0.09881626069545746, 0.008446051739156246, 0.004207435995340347, 0.13943062722682953, -0.014209773391485214, -0.18140821158885956, 0.08723760396242142, -0.20118753612041473, 0.07032334059476852, 0.0667889267206192, 0.04385367035865784, 0.023375757038593292, 0.0022356652189046144, 0.2006947547197342, 0.01086394488811493, -0.13488006591796875, -0.09165792912244797, 0.15577204525470734, 0.09043668955564499, -0.017974838614463806, -0.1387738585472107, 0.1264570951461792, 0.07350470870733261, -0.06586989760398865, -0.10921976715326309, -0.07558710873126984, -0.0989677682518959, -0.013018704019486904, 0.07993525266647339, 0.03551655262708664, 0.024584941565990448, -0.004687424283474684, -0.20889121294021606, 0.08764121681451797, 0.027156280353665352, -0.15088845789432526, 0.06771723926067352, 0.01102018915116787, -0.09628941118717194, 0.06507765501737595, 0.1018732339143753, -0.02799927443265915, 0.18596482276916504, -0.027002273127436638, 0.03453315421938896, 0.03948994353413582, -0.16825143992900848, 0.05487528443336487, -0.024462901055812836, -0.03358566761016846, -0.05306164175271988, 0.07820916175842285, 0.05201467499136925, 0.1326046884059906, -0.09546171873807907, -0.04192337766289711, 1.5060206329882157e-34, 0.05056535080075264, 0.06294511258602142, 0.05701962485909462, -0.08627130836248398, 0.03576917573809624, 0.010968737304210663, 0.09137403219938278, 0.07108880579471588, 0.049444444477558136, -0.00019797605636995286, -0.09784328937530518 ]
https://github.com/huggingface/datasets/issues/2556
Better DuplicateKeysError error to help the user debug the issue
Hi ! Thanks @VijayKalmath :) In the general case, examples don't have an "id" field, so I think it should correspond to the index
As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ```
24
Better DuplicateKeysError error to help the user debug the issue As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` Hi ! Thanks @VijayKalmath :) In the general case, examples don't have an "id" field, so I think it should correspond to the index
[ 0.057770710438489914, 0.14748480916023254, 0.035372696816921234, 0.042854901403188705, 0.22033348679542542, 0.055830251425504684, 0.13960374891757965, 0.14694462716579437, -0.03135786950588226, 0.139333575963974, 0.11048796027898788, 0.052098874002695084, -0.17128826677799225, 0.11778655648231506, 0.19837410748004913, -0.12300087511539459, -0.09249577671289444, -0.06632822751998901, 0.029987821355462074, -0.005197559483349323, -0.1876378357410431, 0.06033617630600929, 0.10442841798067093, -0.038457099348306656, -0.10150729864835739, -0.12876348197460175, -0.05888279154896736, 0.01624387316405773, 0.06411945074796677, -0.30409473180770874, 0.06829555332660675, 0.10866431891918182, -0.0883444994688034, 0.13616065680980682, 0.000005835290721734054, 0.03434997424483299, 0.1926296204328537, 0.03131202235817909, -0.19790169596672058, 0.10543347150087357, -0.03561592102050781, -0.13311627507209778, 0.12786398828029633, 0.01150188222527504, -0.05828016251325607, -0.09767170250415802, -0.10025554895401001, 0.06862703710794449, 0.06079268455505371, -0.033869512379169464, 0.05155789479613304, 0.06915631145238876, 0.014778882265090942, -0.07862773537635803, 0.11650681495666504, 0.10956282168626785, -0.02371518686413765, 0.1020500585436821, -0.11447657644748688, -0.08684595674276352, 0.023462967947125435, 0.19105468690395355, 0.05030685290694237, -0.028420263901352882, 0.08327309042215347, 0.046407196670770645, -0.11193155497312546, -0.1588042974472046, -0.012063190340995789, 0.17549167573451996, 0.06719169020652771, 0.020817244425415993, -0.11459852755069733, -0.1635075956583023, 0.0016209268942475319, -0.1347917914390564, -0.09617875516414642, -0.021695418283343315, -0.1279194951057434, -0.02073677070438862, -0.0794776976108551, 0.14531369507312775, -0.03554239869117737, -0.03897057846188545, -0.09877295047044754, -0.2183690369129181, -0.04534826800227165, 0.09559868276119232, 0.032404202967882156, -0.16357269883155823, 0.09290575236082077, 0.03406056761741638, -0.148275688290596, 0.038159821182489395, -0.0956224799156189, -0.16229595243930817, 0.05101383477449417, -0.13074098527431488, 0.13090336322784424, -0.15261979401111603, 0.11643142253160477, 0.0614432729780674, -0.10079098492860794, -0.08884767442941666, 0.04980535805225372, -0.03739809989929199, 0.08935344219207764, -0.03415096923708916, 0.12646380066871643, 0.08355041593313217, 0.05374594032764435, 0.03735599294304848, -0.027362821623682976, -0.20943103730678558, 0.2186315357685089, 0.12060226500034332, 0.22576014697551727, 0.250097393989563, -0.03620808944106102, 0.061073847115039825, 0.0872877910733223, 0.014443835243582726, -0.12582187354564667, 0.005801340099424124, 0.02873409539461136, -0.08899817615747452, 0.014547708444297314, -0.05701069161295891, -0.012677853927016258, -0.06493247300386429, -0.06227117404341698, 0.15224219858646393, 0.09913370013237, -0.021007142961025238, 0.10593193769454956, 0.017692161723971367, 0.10101664066314697, -0.015543447807431221, 0.12002991884946823, -0.05285319313406944, 0.12717586755752563, 0.133290633559227, -0.022095702588558197, -0.06064055860042572, -0.026689255610108376, -0.007540097925812006, 0.08556853234767914, -0.015764111652970314, -0.08285786956548691, -0.06312129646539688, -0.014207038097083569, 0.12127138674259186, -0.21990615129470825, 0.15418195724487305, -0.024279644712805748, 0.02589384652674198, 0.03765830770134926, 0.009828920476138592, -0.29669204354286194, -0.13679921627044678, 0.06417408585548401, 0.014245602302253246, 0.11947382986545563, -0.060903746634721756, 0.09689532965421677, 0.21821367740631104, 0.0054628606885671616, 0.03981860354542732, -0.15245257318019867, 0.07323557883501053, -0.06266578286886215, -0.0760936588048935, -0.13135378062725067, 0.16693730652332306, -0.1359589844942093, 0.1319725662469864, -0.04778348654508591, -0.04641527310013771, -0.11412795633077621, 0.1288796216249466, -0.036101438105106354, -0.074630007147789, -0.013996390625834465, -0.056039631366729736, 0.19554318487644196, 0.016602225601673126, 0.02245229110121727, 0.15296518802642822, -0.11571501195430756, -0.07452516257762909, -0.0849248394370079, 0.06596779078245163, -0.011698944494128227, 0.06704425811767578, -0.11382843554019928, -0.09457989037036896, 0.02939717099070549, -0.13008247315883636, 0.02157534472644329, -0.11147762089967728, -0.2406216859817505, -0.10327107459306717, 0.10833936184644699, 0.005986765027046204, -0.010630017146468163, 0.0006177051109261811, -0.19136933982372284, 0.130788654088974, 0.05673312768340111, -0.06978031992912292, -0.11800431460142136, -0.07791068404912949, 0.0759815126657486, 0.024292411282658577, -0.13895151019096375, -0.010565904900431633, 0.013028617948293686, -0.12966172397136688, 0.01248606201261282, 0.0006304708658717573, 0.044542599469423294, 0.034108154475688934, 0.06324426829814911, 0.026034492999315262, 0.02205072157084942, -0.04252670332789421, 0.03731890767812729, 0.03338586911559105, 0.13359233736991882, 0.09345267713069916, -0.014746012166142464, -0.0644848644733429, 0.05200795829296112, 0.0950234979391098, -0.15637323260307312, 0.01720394566655159, 0.12682540714740753, -0.1369635909795761, 0.12581029534339905, -0.051233358681201935, -0.2107604742050171, 0.046948838979005814, -0.21034644544124603, 0.014577876776456833, -0.13012193143367767, 0.0036820359528064728, 0.015639694407582283, 0.14193691313266754, -0.032863982021808624, -0.022944999858736992, -0.035127904266119, 0.07280239462852478, -0.05200393870472908, 0.02644338645040989, -0.06039280444383621, -0.10805908590555191, -0.0026457689236849546, 0.09024345874786377, -0.2081765979528427, 0.0877891257405281, 0.20946639776229858, -0.061701931059360504, 0.04910211265087128, 0.06203015148639679, 0.08920193463563919, -0.03837704658508301, 0.07922088354825974, 0.13463141024112701, -0.06985147297382355, 0.18089517951011658, 0.002297930885106325, -0.04671120643615723, -0.00886520091444254, -0.06083620712161064, 0.013550220057368279, -0.12043988704681396, -0.13511104881763458, 0.0808742493391037, -0.13258454203605652, 0.07872200757265091, -0.21461540460586548, -0.08242455124855042, 0.05568133294582367, -0.019092950969934464, 0.11334267258644104, 0.09476644545793533, -0.09508711844682693, -0.027834344655275345, -0.10878196358680725, 0.1404082179069519, 0.051440030336380005, -0.18180575966835022, 0.12910781800746918, -0.1593044251203537, 0.005166785791516304, -0.007057602051645517, 0.04171122610569, -0.04706898704171181, -0.10022897273302078, 0.04252667725086212, -0.054803576320409775, 0.04128129035234451, 0.038762081414461136, -0.11550386995077133, -0.07384686172008514, -0.010576455853879452, 0.3078640103340149, 0.037723757326602936, -0.19043909013271332, -0.25384876132011414, -0.05606062337756157, -0.10937248170375824, -0.00821937620639801, 0.10232339799404144, 0.1724366396665573, 0.14465095102787018, -0.07387992739677429, -0.2583662271499634, 0.14691415429115295, 0.06328655034303665, 0.05919145792722702, 0.03337909281253815, 0.06670750677585602, 0.0842389240860939, 0.08563262224197388, 0.016183776780962944, -0.09852724522352219, 0.058186206966638565, -0.029897043481469154, -0.1932850033044815, -0.019976142793893814, 0.07106248289346695, 0.009038267657160759, -0.031195197254419327, 0.018920857459306717, -0.09127204120159149, -0.03435157611966133, 0.010668544098734856, 0.10250383615493774, -0.05427251383662224, 0.06443910300731659, -0.05360756814479828, -0.12210065871477127, 0.01802496798336506, -0.015538848005235195, -0.16131025552749634, -0.0808434709906578, -0.05788760632276535, 0.1749100387096405, -0.0023652270901948214, 0.08483316749334335, 0.09329201281070709, 0.0753166601061821, -0.13026472926139832, 0.04994100704789162, -0.0661282166838646, -0.24005012214183807, 0.10718122124671936, -0.1678803265094757, 0.0029117309022694826, 0.18156546354293823, 0.02809280715882778, 0.2540544271469116, 0.09858570992946625, -0.12528498470783234, -0.03851134330034256, 0.027972185984253883, 0.028137296438217163, 0.02257472462952137, -0.21954739093780518, -0.059382472187280655, -0.05437927320599556, -0.007895377464592457, 0.08847474306821823, -0.056609686464071274, 0.02837042696774006, 0.13977111876010895, -0.16225677728652954, 0.034744519740343094, -0.11173804104328156, -0.032507795840501785, -0.17610113322734833, -0.02855735644698143, -0.08226701617240906, 0.1279662847518921, 0.020755233243107796, 0.13776558637619019, 0.0789899080991745, -0.03181250020861626, 0.06306755542755127, 0.07458753883838654, -0.12448881566524506, -0.12791457772254944, 0.026507241651415825, -0.10591474920511246, -0.07722453027963638, 0.06261415034532547, 0.043283313512802124, 0.08084926009178162, 0.021305026486516, 0.08131378144025803, 0.1345471888780594, -0.2738640010356903, 0.017718754708766937, 0.009231992065906525, -0.04259534925222397, -0.05246160924434662, 0.08009734749794006, 0.18423719704151154, 0.06091541796922684, 0.019513526931405067, 0.09411200135946274, -0.03202905133366585, 0.009806618094444275, 0.17999878525733948, -0.008064393885433674, -0.16441667079925537, -0.18447352945804596, 0.01806221343576908, -0.14094124734401703, -0.1882355809211731, -0.13528120517730713, 0.10145831853151321, -0.07227467745542526, 0.14955081045627594, -0.08837863057851791, -0.11120297014713287, 0.07166408002376556, 0.09761413931846619, 0.15314197540283203, 0.05365157872438431, 0.17731255292892456, 0.12977325916290283, 0.1493060141801834, 0.03668559342622757, 0.015378963202238083, 0.22213470935821533, -0.1105196475982666, -0.041766468435525894, -0.09920667856931686, -0.10701519250869751, 0.0811096578836441, 0.22432130575180054, -0.05648699030280113, 0.10808143019676208, -0.13390018045902252, -0.01630459912121296, -0.10457639396190643, 0.017347853630781174, 0.052856311202049255, -0.09780755639076233, -0.23721112310886383, -0.1530836969614029, -0.1324855089187622, 0.16615554690361023, -0.03415367007255554, 0.20519772171974182, 0.011266175657510757, -0.09918130189180374, 0.08763394504785538, -0.12732914090156555, -0.026011958718299866, -0.10419689863920212, -0.012356380932033062, -0.1519562304019928, 0.06779910624027252, 0.17080843448638916, -0.011363031342625618, -0.06091427803039551, 0.001836057985201478, -0.05697563663125038, 0.1454540640115738, 0.031386639922857285, 0.03782258927822113, 0.08696223795413971, -0.10914746671915054, 0.051025498658418655, -0.13063371181488037, -0.10372456908226013, -0.07611952722072601, 0.31612443923950195, 0.04066647216677666, -0.06911471486091614, -0.07341519743204117, -0.0009087829384952784, 0.032176632434129715, 0.07775075733661652, -0.03346169367432594, -0.0842234343290329, 0.22888661921024323, -0.13507196307182312, -0.1968773752450943, 0.04568665847182274, -0.012918267399072647, -0.00981279369443655, -0.042177677154541016, -0.10272044688463211, 0.17748965322971344, -0.05439494177699089, 0.13558025658130646, 0.06753790378570557, -0.04203743487596512, 0.08336319029331207, -0.03557635098695755, 0.05841559171676636, -0.11636002361774445, -0.001082775299437344, -0.061558015644550323, 0.08675210922956467, -0.17867620289325714, 0.06543143838644028, 0.043381184339523315, -0.04986941069364548, -0.2447698414325714, -0.021622631698846817, -0.15335425734519958, -0.10089690238237381, 0.0004632302443496883, 0.11834374070167542, 0.05787595734000206, -0.12159786373376846, -0.056435856968164444, 0.07457804679870605, -0.045679278671741486, -0.04270753636956215, 0.024985382333397865, 0.06820014864206314, -0.018674254417419434, -0.10739736258983612, 0.11195392906665802, 0.011695655062794685, 0.08322028070688248, -0.0006200458155944943, -0.022357642650604248, -0.12840713560581207, 0.167277529835701, 0.3486174941062927, -0.09019993990659714, -0.01803717017173767, 0.03864019736647606, 0.05057104676961899, -0.09822867810726166, -0.13049428164958954, 0.10618117451667786, 0.041212331503629684, -0.06839010864496231, 0.08622384816408157, -0.10870718955993652, -0.09126470983028412, -0.03559562563896179, 0.22288577258586884, 0.23763367533683777, 0.07239960134029388, -0.13490942120552063, 0.0516970269382, -2.5918627755546224e-32, -0.013733889907598495, -0.02533028833568096, -0.15308760106563568, 0.05390167236328125, -0.16323818266391754, -0.03555774316191673, -0.15989427268505096, 0.014682631008327007, -0.1414053738117218, 0.058519747108221054, 0.03636648878455162, 0.06463566422462463, 0.11956339329481125, -0.05132467299699783, 0.07151992619037628, -0.033119555562734604, 0.04319792240858078, 0.10865245759487152, -0.0030514535028487444, 0.14254465699195862, 0.15887822210788727, -0.0009680205257609487, 0.13685022294521332, -0.03256218880414963, -0.0505950041115284, -0.05713333189487457, -0.03796205669641495, -0.05160131677985191, 0.10830225795507431, 0.0430571511387825, -0.07619277387857437, 0.13133610785007477, -0.060923341661691666, 0.10868219286203384, 0.013941534794867039, -0.10556910187005997, 0.045228879898786545, -0.07639613002538681, -0.15097393095493317, -0.04632066935300827, 0.12233119457960129, 0.009555946104228497, -0.07272897660732269, -0.12996546924114227, 0.09345350414514542, 0.04873022437095642, -0.03479069471359253, 0.054571036249399185, -0.16685600578784943, -0.04383644834160805, -0.042327072471380234, 0.1401156634092331, 0.019683603197336197, 0.0467226468026638, 0.009675738401710987, -0.05184943228960037, 0.08572816848754883, -0.06677783280611038, -0.12048719078302383, 0.0442696213722229, 0.23650750517845154, -0.002693489193916321, -0.10672082006931305, -0.011015206575393677, -0.040606167167425156, 0.017557894811034203, 0.05537530407309532, -0.26109060645103455, 0.17024534940719604, 0.11216425150632858, -0.07664064317941666, 0.07788053154945374, 0.0865524411201477, 0.11932963132858276, -0.15561968088150024, -0.05555349215865135, -0.08918280154466629, 0.08499908447265625, -0.06434907019138336, -0.05077620595693588, -0.10132566839456558, 0.016124069690704346, -0.111028291285038, -0.029452182352542877, 0.075961172580719, 0.05444934219121933, 0.03749949112534523, 0.035064224153757095, 0.022478565573692322, -0.07102552056312561, -0.19563330709934235, 0.2684708833694458, -0.0697760209441185, -0.1298183649778366, -0.07179611921310425, 0.1288701891899109, 0.042750585824251175, 0.1854816973209381, -0.11260589212179184, -0.1798526793718338, 0.1572711169719696, -0.12786421179771423, 0.0911322832107544, 0.13989844918251038, 0.2047632932662964, -0.025734348222613335, 0.12597183883190155, 0.08317997306585312, -0.2842155992984772, 0.0370946004986763, -0.0069915601052343845, -0.1621810644865036, 0.004923757631331682, -0.15095308423042297, 0.050934210419654846, 0.0231101606041193, 0.09237673878669739, 0.043914083391427994, 0.0717565193772316, -0.03683037310838699, -0.06672808527946472, -0.03185296803712845, -0.05772028863430023, 0.13123752176761627, 0.03562852367758751, 0.1322188526391983, -0.08145865052938461, -0.22190679609775543, 0.1840481162071228, -0.04928744584321976, -0.07966360449790955, -0.20659568905830383, 7.71740417349065e-7, -0.14693650603294373, 0.16330721974372864, 0.14630146324634552, -0.18334737420082092, -0.07551725953817368, 0.16549833118915558, -0.009841535240411758, 0.04753939062356949, -0.12591774761676788, 0.04034363850951195, 0.116740882396698, -0.0999128594994545, 0.025258149951696396, 0.014443124644458294, 0.13827839493751526, -0.024929119274020195, -0.19072026014328003, 0.07590001076459885, -0.1726287305355072, 0.04908556863665581, 0.07278699427843094, 0.04646775871515274, 0.06607310473918915, -0.02681570313870907, 0.1980922818183899, -0.008835009299218655, -0.13659203052520752, -0.0875740721821785, 0.1894819289445877, 0.0635363981127739, -0.013951612636446953, -0.1320042759180069, 0.10460898280143738, 0.06636650115251541, -0.06489651650190353, -0.12050580978393555, -0.062090884894132614, -0.09115345776081085, -0.032362256199121475, 0.10374634712934494, 0.05740945041179657, 0.02968456596136093, -0.018121618777513504, -0.23361267149448395, 0.09559731185436249, 0.02635992132127285, -0.14677082002162933, 0.07176641374826431, 0.019621292129158974, -0.07399504631757736, 0.08741308003664017, 0.10284370929002762, -0.027554139494895935, 0.14849315583705902, -0.04481717199087143, 0.04743706434965134, 0.029993794858455658, -0.15474466979503632, 0.03773770108819008, -0.009076399728655815, -0.040900297462940216, -0.04084090515971184, 0.08221977949142456, 0.053350552916526794, 0.13896465301513672, -0.0961490347981453, -0.027751168236136436, 1.5617306852281677e-34, 0.06298568844795227, 0.06965161859989166, 0.08266937732696533, -0.11769094318151474, 0.027672279626131058, 0.014861141331493855, 0.07637140154838562, 0.051367659121751785, 0.0646514967083931, -0.027456197887659073, -0.10528209060430527 ]
https://github.com/huggingface/datasets/issues/2556
Better DuplicateKeysError error to help the user debug the issue
@lhoestq , I have opened a draft PR for this Issue. I wanted to check with you if there is a way to get `<path/to/the/dataset/script>` currently or do I need to add extra code to find that. If I need to find the script , I can assume that the generator function will always be in `datasets/{dataset_name}/{dataset_name}.py`.
As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ```
57
Better DuplicateKeysError error to help the user debug the issue As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` @lhoestq , I have opened a draft PR for this Issue. I wanted to check with you if there is a way to get `<path/to/the/dataset/script>` currently or do I need to add extra code to find that. If I need to find the script , I can assume that the generator function will always be in `datasets/{dataset_name}/{dataset_name}.py`.
[ 0.05077708140015602, 0.19447486102581024, 0.03366638347506523, 0.04574543982744217, 0.22656187415122986, 0.05013279989361763, 0.1286342591047287, 0.12976887822151184, -0.05826365202665329, 0.1754484325647354, 0.09093479067087173, 0.04845026507973671, -0.1721244901418686, 0.08758526295423508, 0.2149444967508316, -0.0950232669711113, -0.10955622792243958, -0.03126862645149231, 0.020952381193637848, 0.0004423531936481595, -0.1864626407623291, 0.061814989894628525, 0.11009454727172852, -0.021348048001527786, -0.07275240868330002, -0.11020990461111069, -0.03226586803793907, 0.03896002843976021, 0.08579840511083603, -0.2756476104259491, 0.05114660784602165, 0.10675568133592606, -0.052119988948106766, 0.16888689994812012, 0.000005977155069558648, 0.05788940191268921, 0.20903627574443817, 0.03396021947264671, -0.1974668800830841, 0.06773625314235687, -0.02786904200911522, -0.11727701872587204, 0.11055485159158707, 0.020202474668622017, -0.034359078854322433, -0.11640683561563492, -0.03637325391173363, 0.020458467304706573, 0.04996452108025551, -0.014365458860993385, 0.04488521069288254, 0.06297924369573593, -0.05967256426811218, -0.09977839142084122, 0.11935120820999146, 0.08773677796125412, -0.03236036002635956, 0.08615273237228394, -0.1105552688241005, -0.11633282154798508, 0.04637724161148071, 0.18544302880764008, 0.052438098937273026, -0.039369601756334305, 0.025843996554613113, 0.027182994410395622, -0.10955221951007843, -0.16438564658164978, 0.037930045276880264, 0.20032773911952972, 0.07887464761734009, -0.025790682062506676, -0.10769534856081009, -0.158738374710083, -0.010866880416870117, -0.120659239590168, -0.07487943768501282, -0.018105309456586838, -0.17067192494869232, -0.031159130856394768, -0.09891997277736664, 0.09568291902542114, -0.008974824100732803, -0.10300678759813309, -0.08915302157402039, -0.1915798783302307, -0.03095160238444805, 0.09289747476577759, 0.035276856273412704, -0.12619905173778534, 0.1205991581082344, -0.002630536910146475, -0.14676432311534882, 0.027460020035505295, -0.09875524789094925, -0.1305038183927536, 0.017961211502552032, -0.1220473125576973, 0.12347227334976196, -0.10208314657211304, 0.12276589870452881, 0.029035326093435287, -0.11841750144958496, -0.0857357606291771, 0.07946232706308365, -0.050374727696180344, 0.03520840033888817, -0.032666414976119995, 0.12060791254043579, 0.08836773037910461, 0.04036659002304077, 0.029625684022903442, -0.03879033774137497, -0.22414124011993408, 0.19795116782188416, 0.11043953150510788, 0.22872963547706604, 0.21452662348747253, -0.07261554896831512, 0.06286454200744629, 0.12897180020809174, 0.010795730166137218, -0.16314344108104706, 0.007729747798293829, 0.0713927298784256, -0.06095045432448387, -0.004376657772809267, -0.0656697228550911, -0.026655403897166252, -0.040969766676425934, -0.031646132469177246, 0.1459360271692276, 0.10375476628541946, 0.03653060272336006, 0.09781470894813538, 0.04065507650375366, 0.10339893400669098, -0.016330746933817863, 0.053505923599004745, -0.03760343790054321, 0.09405548125505447, 0.11727627366781235, -0.018004948273301125, -0.075820192694664, -0.0026032179594039917, -0.037750232964754105, 0.06948237121105194, -0.0018000449053943157, -0.0963338166475296, -0.045725855976343155, -0.010806920006871223, 0.15061187744140625, -0.20731644332408905, 0.17354069650173187, 0.015755413100123405, 0.06473010033369064, 0.036572959274053574, 0.012370449490845203, -0.3059997260570526, -0.1401410847902298, 0.007345436606556177, -0.013986336067318916, 0.10499127209186554, -0.056040309369564056, 0.09580442309379578, 0.20018370449543, 0.006344975903630257, 0.06459194421768188, -0.12910029292106628, 0.056888651102781296, -0.057808276265859604, -0.09324676543474197, -0.14041590690612793, 0.16766898334026337, -0.18466871976852417, 0.09992119669914246, 0.022621406242251396, -0.04786943271756172, -0.07712092250585556, 0.1064843237400055, -0.01297135092318058, -0.07034547626972198, -0.007662593852728605, -0.0575268529355526, 0.1986851841211319, -0.02045377716422081, -0.0008579191053286195, 0.0949847474694252, -0.07838596403598785, -0.06628438830375671, -0.09650968760251999, 0.06490714102983475, -0.043882858008146286, 0.10257173329591751, -0.09767338633537292, -0.06613080948591232, 0.018674211576581, -0.14988502860069275, 0.021635577082633972, -0.13136285543441772, -0.22157461941242218, -0.10171195864677429, 0.11141328513622284, 0.023158537223935127, -0.027595505118370056, -0.029075058177113533, -0.15219826996326447, 0.13104857504367828, 0.048958923667669296, -0.07600994408130646, -0.15430928766727448, -0.08705008029937744, 0.09519653022289276, 0.02863088622689247, -0.11715905368328094, -0.03210841119289398, -0.03641778975725174, -0.05662839114665985, 0.007317488081753254, 0.0009148305980488658, 0.0482306033372879, 0.05868048220872879, 0.10696183890104294, 0.025577865540981293, -0.001168097835034132, -0.004333967342972755, 0.043898820877075195, 0.027727825567126274, 0.13856668770313263, 0.06458332389593124, -0.06250028312206268, -0.055014219135046005, 0.037733662873506546, 0.0700620785355568, -0.12692561745643616, 0.00884037371724844, 0.11887313425540924, -0.14508453011512756, 0.08980732411146164, -0.07438312470912933, -0.16890224814414978, -0.0005519477417692542, -0.1808716207742691, 0.018169376999139786, -0.13147413730621338, 0.0019677001982927322, -0.006525893695652485, 0.1376899927854538, -0.024147260934114456, -0.0371156707406044, -0.04245602712035179, 0.06396056711673737, -0.022611578926444054, 0.022616147994995117, -0.047503869980573654, -0.059246230870485306, 0.060603950172662735, 0.11047220230102539, -0.19401556253433228, 0.07063452154397964, 0.2056282013654709, -0.059951357543468475, 0.03185407817363739, 0.0806989073753357, 0.07587389647960663, -0.010347292758524418, 0.00932587031275034, 0.18456532061100006, -0.09384775161743164, 0.18567174673080444, -0.00032558583188802004, -0.03830380737781525, -0.032245978713035583, -0.06537062674760818, 0.0121743930503726, -0.08963369578123093, -0.13089695572853088, 0.08878590166568756, -0.1433788388967514, 0.03999699279665947, -0.20008474588394165, -0.09063556790351868, 0.02572133019566536, -0.03624953702092171, 0.1479448527097702, 0.08801238983869553, -0.11131913214921951, -0.00022985269606579095, -0.17198921740055084, 0.185288667678833, 0.07201207429170609, -0.1714802086353302, 0.10867062956094742, -0.1701468527317047, 0.0029354640282690525, 0.013721194118261337, 0.05595685541629791, -0.04168766364455223, -0.115934818983078, 0.028198184445500374, 0.010193370282649994, 0.023563040420413017, 0.0745302215218544, -0.11003173142671585, -0.0517057403922081, -0.012121257372200489, 0.312118798494339, 0.053701095283031464, -0.1487537920475006, -0.26101958751678467, -0.013361221179366112, -0.08221154659986496, 0.0003409025666769594, 0.09179683774709702, 0.15805545449256897, 0.15223082900047302, -0.01721470057964325, -0.2553640604019165, 0.13659878075122833, 0.08749017864465714, 0.0611710287630558, 0.055290643125772476, 0.06329698860645294, 0.05034065619111061, 0.08248791843652725, 0.022113507613539696, -0.12008504569530487, 0.09050425887107849, -0.03635736554861069, -0.15817369520664215, -0.025991549715399742, 0.01340541522949934, -0.00022131063451524824, -0.06232355535030365, -0.02129894122481346, -0.08461508899927139, -0.003780910512432456, 0.014773949980735779, 0.14289100468158722, 0.006566330324858427, 0.0656990110874176, -0.0368049256503582, -0.11533916741609573, 0.017786039039492607, -0.003637237474322319, -0.15706788003444672, -0.06774429976940155, -0.06774537265300751, 0.2028443068265915, -0.032988376915454865, 0.02908211387693882, 0.12566876411437988, 0.1334121972322464, -0.12100302428007126, 0.06350596249103546, -0.04331055283546448, -0.25999024510383606, 0.0532364547252655, -0.16388261318206787, 0.06563091278076172, 0.15085916221141815, 0.0043138847686350346, 0.195267915725708, 0.11522989720106125, -0.14736129343509674, -0.037829916924238205, 0.021778447553515434, 0.049713779240846634, 0.09822776168584824, -0.17389413714408875, -0.04591982811689377, -0.09778700023889542, -0.0058571165427565575, 0.06581896543502808, -0.06891671568155289, 0.042023513466119766, 0.09294106066226959, -0.1794164627790451, 0.026669735088944435, -0.12783607840538025, -0.010921953245997429, -0.15675519406795502, -0.016243744641542435, -0.057375434786081314, 0.11828113347291946, 0.033938921988010406, 0.17680524289608002, 0.09807287901639938, -0.03650716319680214, 0.10722897201776505, 0.04500516876578331, -0.07913444936275482, -0.09637884050607681, 0.04528233781456947, -0.09361787885427475, -0.07708519697189331, 0.07308909296989441, 0.032634321600198746, 0.08425929397344589, -0.010545866563916206, 0.05633553862571716, 0.09989356249570847, -0.26982030272483826, 0.0422636978328228, 0.02436883933842182, -0.03672100603580475, -0.021506238728761673, 0.07883421331644058, 0.1469559222459793, 0.05920511856675148, -0.015231073834002018, 0.054851144552230835, -0.01661922037601471, 0.058755017817020416, 0.18641141057014465, 0.026495393365621567, -0.18959787487983704, -0.19452686607837677, 0.02354678139090538, -0.16120237112045288, -0.19287249445915222, -0.14064465463161469, 0.08977773040533066, -0.09819915890693665, 0.13207247853279114, -0.06917887181043625, -0.04191834479570389, 0.07790777087211609, 0.12024208158254623, 0.1519310623407364, 0.0637534037232399, 0.1222650334239006, 0.1308608055114746, 0.15481458604335785, 0.0016853767447173595, 0.01052760984748602, 0.237604022026062, -0.08802530914545059, -0.08184260874986649, -0.10081455111503601, -0.06355933099985123, 0.06466592103242874, 0.19768570363521576, -0.08997602015733719, 0.06986745446920395, -0.13226258754730225, -0.033204685896635056, -0.11085103452205658, -0.011930156499147415, 0.021061308681964874, -0.1318812072277069, -0.2271515429019928, -0.19232147932052612, -0.14161908626556396, 0.1731405258178711, -0.0017414119793102145, 0.2211788147687912, -0.12265095859766006, -0.09879206120967865, 0.0859045535326004, -0.15084613859653473, -0.03621677681803703, -0.08896883577108383, 0.00823369063436985, -0.12603060901165009, 0.10215391218662262, 0.1790163218975067, -0.043465208262205124, -0.05059657618403435, 0.028976039960980415, -0.019567064940929413, 0.15270312130451202, 0.01085933018475771, 0.014572015963494778, 0.09746386855840683, -0.05892104655504227, 0.05192182958126068, -0.09501975774765015, -0.09424736350774765, -0.040201105177402496, 0.2910580337047577, 0.02871127426624298, -0.06120268628001213, -0.11079529672861099, -0.057285159826278687, 0.008511079475283623, 0.08194509148597717, -0.03573887050151825, -0.12142495810985565, 0.2267792969942093, -0.10581737756729126, -0.2413269281387329, 0.06060578674077988, -0.01744149439036846, -0.03667822852730751, -0.01858397200703621, -0.07746175676584244, 0.24421173334121704, -0.033857185393571854, 0.13096341490745544, 0.06696133315563202, -0.027317872270941734, 0.08448683470487595, -0.04509556666016579, 0.03816724568605423, -0.09554304927587509, -0.014743095263838768, -0.06684435904026031, 0.07110533863306046, -0.17715932428836823, 0.07477647811174393, 0.04612969234585762, -0.03746066614985466, -0.2700957953929901, -0.0033729940187186003, -0.11288526654243469, -0.060743819922208786, -0.0022217195946723223, 0.07153387367725372, 0.03169262781739235, -0.13929638266563416, -0.036501772701740265, 0.07011708617210388, -0.024338852614164352, -0.034513235092163086, 0.05158728361129761, 0.043727874755859375, -0.04082953929901123, -0.10830127447843552, 0.09771952778100967, -0.0011582693550735712, 0.09636934101581573, 0.026285719126462936, -0.032724760472774506, -0.13443860411643982, 0.13137096166610718, 0.282591849565506, -0.1160036250948906, -0.019846152514219284, 0.027795128524303436, 0.05876260623335838, -0.09847107529640198, -0.1622411161661148, 0.11883776634931564, 0.009602461941540241, -0.06886892765760422, 0.04401620849967003, -0.05967789888381958, -0.07784409821033478, -0.02435617707669735, 0.20842573046684265, 0.26253655552864075, 0.12886302173137665, -0.11207806318998337, 0.06559058278799057, -2.617704549489512e-32, -0.0009286904241889715, -0.01748500019311905, -0.1497258096933365, 0.06350087374448776, -0.15574583411216736, -0.043102290481328964, -0.1521160900592804, -0.0007509684073738754, -0.14838476479053497, 0.044323280453681946, 0.04295068606734276, 0.09576520323753357, 0.12046120315790176, -0.06357334554195404, 0.03121115453541279, -0.043855078518390656, 0.04299218952655792, 0.10074642300605774, 0.0016341637820005417, 0.13579516112804413, 0.15817023813724518, -0.000489568046759814, 0.12777945399284363, -0.030483432114124298, -0.04251399263739586, -0.08555594086647034, -0.031054140999913216, -0.04176298528909683, 0.10351159423589706, 0.04706394299864769, -0.07099021226167679, 0.12573625147342682, -0.05593332648277283, 0.0764365941286087, -0.0193707924336195, -0.08324337005615234, 0.008625583723187447, -0.09508147090673447, -0.14482149481773376, -0.052384428679943085, 0.0719747543334961, 0.024493813514709473, -0.028205353766679764, -0.14653390645980835, 0.09931209683418274, -0.00826211366802454, -0.05238204449415207, 0.036828603595495224, -0.1935223788022995, -0.041355229914188385, -0.04837317019701004, 0.11972059309482574, 0.028207367286086082, 0.060874227434396744, 0.01916249841451645, -0.0625494122505188, 0.05404423922300339, -0.04675276577472687, -0.14855922758579254, 0.0482255294919014, 0.21102532744407654, -0.0011374485911801457, -0.09858778119087219, -0.011919085867702961, -0.015374661423265934, 0.01215728186070919, 0.1222383975982666, -0.21989791095256805, 0.1403588205575943, 0.0962664932012558, -0.08747033029794693, 0.06385628134012222, 0.04175302013754845, 0.14907905459403992, -0.10888009518384933, -0.07256608456373215, -0.0943966954946518, 0.04287548363208771, -0.10754691809415817, -0.03041069768369198, -0.09455370157957077, 0.00429077073931694, -0.03810343146324158, -0.0478542223572731, 0.07077628374099731, 0.08982666581869125, 0.026137443259358406, 0.03978731110692024, 0.020903630182147026, -0.06275702267885208, -0.18483370542526245, 0.23462656140327454, -0.06203063949942589, -0.15545673668384552, -0.003312753513455391, 0.16786544024944305, 0.049230627715587616, 0.16393236815929413, -0.07731527090072632, -0.14058150351047516, 0.20065754652023315, -0.11429402232170105, 0.08104773610830307, 0.12040919810533524, 0.20925888419151306, -0.029340848326683044, 0.1312352865934372, 0.044441547244787216, -0.2924353778362274, 0.060998525470495224, -0.029368748888373375, -0.17179711163043976, -0.030317356809973717, -0.10702692717313766, 0.09228303283452988, 0.02740071527659893, 0.09336797147989273, 0.049593787640333176, 0.07731752097606659, -0.024849098175764084, -0.05099804699420929, -0.0038879518397152424, -0.0585419125854969, 0.11610987782478333, -0.00767594575881958, 0.1407075673341751, -0.08723200112581253, -0.22016513347625732, 0.19863617420196533, -0.007034625392407179, -0.07613953948020935, -0.25973930954933167, 7.847367555768869e-7, -0.12474282085895538, 0.09764326363801956, 0.15627296268939972, -0.1522575318813324, -0.07170191407203674, 0.11141835898160934, -0.015598509460687637, 0.0017636758275330067, -0.1349383294582367, 0.0029275151900947094, 0.18377500772476196, -0.11947347223758698, 0.06923734396696091, 0.03324764966964722, 0.15486615896224976, 0.030930345878005028, -0.19774258136749268, 0.055173493921756744, -0.148156076669693, 0.02058759145438671, 0.08369331061840057, 0.053360097110271454, 0.031619343906641006, -0.03068317286670208, 0.1928997039794922, -0.02149558626115322, -0.11587502062320709, -0.09614602476358414, 0.18035399913787842, 0.05027412995696068, -0.062298547476530075, -0.13535091280937195, 0.07061783224344254, 0.030640123412013054, -0.08580620586872101, -0.1282665729522705, -0.07638795673847198, -0.048155277967453, -0.004882539622485638, 0.10917668789625168, 0.06600721180438995, 0.020568974316120148, -0.03675751015543938, -0.20444805920124054, 0.05855944752693176, 0.048112042248249054, -0.1478976309299469, 0.0730007067322731, 0.03065698780119419, -0.07870703190565109, 0.12769252061843872, 0.10250399261713028, 0.033918336033821106, 0.14910852909088135, -0.06444352120161057, 0.03777770698070526, 0.028323115780949593, -0.1783098727464676, 0.04807223379611969, -0.004735495895147324, -0.051685821264982224, -0.023043805733323097, 0.10584107786417007, 0.03290049731731415, 0.1631384789943695, -0.13410651683807373, 0.018271418288350105, 1.4371379267681018e-34, 0.054173387587070465, 0.09330277144908905, 0.07607582211494446, -0.1941145360469818, 0.035115811973810196, 0.022429058328270912, 0.09485521912574768, 0.015798745676875114, 0.05408348888158798, -0.0405627116560936, -0.07624470442533493 ]
https://github.com/huggingface/datasets/issues/2556
Better DuplicateKeysError error to help the user debug the issue
Thanks ! > I wanted to check with you if there is a way to get <path/to/the/dataset/script> currently or do I need to add extra code to find that. You don't have access to this info inside the ArrowWriter unfortunately. This info is available in builder.py in the DatasetBuilder code that uses the ArrowWriter though, maybe a try-catch there can do the job
As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ```
63
Better DuplicateKeysError error to help the user debug the issue As mentioned in https://github.com/huggingface/datasets/issues/2552 it would be nice to improve the error message when a dataset fails to build because there are duplicate example keys. The current one is ```python datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 48 Keys should be unique and deterministic in nature ``` and we could have something that guides the user to debugging the issue: ```python DuplicateKeysError: both 42th and 1337th examples have the same keys `48`. Please fix the dataset script at <path/to/the/dataset/script> ``` Thanks ! > I wanted to check with you if there is a way to get <path/to/the/dataset/script> currently or do I need to add extra code to find that. You don't have access to this info inside the ArrowWriter unfortunately. This info is available in builder.py in the DatasetBuilder code that uses the ArrowWriter though, maybe a try-catch there can do the job
[ 0.021627798676490784, 0.1609342247247696, 0.04295644909143448, 0.05788341537117958, 0.18977349996566772, 0.014899431727826595, 0.10786451399326324, 0.12346775829792023, -0.06988202780485153, 0.11475680023431778, 0.10137663036584854, 0.031890030950307846, -0.14238479733467102, 0.06118164211511612, 0.1611599326133728, -0.041080914437770844, -0.1649894416332245, -0.034362200647592545, 0.003695903578773141, -0.00278683053329587, -0.16250550746917725, 0.10335720330476761, 0.1011030375957489, 0.005895441863685846, -0.10274969786405563, -0.12190206348896027, -0.03900783881545067, 0.06818988919258118, 0.053556106984615326, -0.29022249579429626, 0.1020093783736229, 0.10283675044775009, -0.06265333294868469, 0.17721743881702423, 0.000005953785603196593, 0.06648289412260056, 0.22722721099853516, 0.049829255789518356, -0.22694438695907593, 0.019791673868894577, -0.006988834124058485, -0.09152989834547043, 0.1375170201063156, 0.0533539354801178, -0.012984081171452999, -0.16455674171447754, 0.025346461683511734, 0.00039952079532667994, 0.05890108644962311, -0.049185607582330704, 0.032156407833099365, 0.039023105055093765, -0.01872703991830349, -0.07037381082773209, 0.12758609652519226, 0.094411700963974, 0.005827937740832567, 0.093730628490448, -0.11304885894060135, -0.10527778416872025, -0.009383396245539188, 0.1719539761543274, 0.05444801226258278, -0.026980197057127953, 0.07593391090631485, 0.024522870779037476, -0.08106015622615814, -0.1204717755317688, 0.0296084713190794, 0.18357232213020325, 0.09098271280527115, -0.008476349525153637, -0.11583094298839569, -0.18342550098896027, -0.03951980918645859, -0.11237075179815292, -0.05488446727395058, -0.005473546218127012, -0.17372669279575348, -0.07363897562026978, -0.05251003056764603, 0.09487530589103699, -0.06337551772594452, -0.07190286368131638, -0.08228583633899689, -0.1700671762228012, -0.035484954714775085, 0.11954151093959808, 0.009096299298107624, -0.09488523006439209, 0.1852940171957016, 0.019883887842297554, -0.1687774658203125, 0.02842245250940323, -0.08379419893026352, -0.11064581573009491, -0.04358149319887161, -0.13404621183872223, 0.09157095849514008, -0.10580497980117798, 0.25278741121292114, 0.060610830783843994, -0.09064386039972305, -0.07769300043582916, 0.0735865980386734, -0.03545239195227623, 0.09969493746757507, -0.003397302469238639, 0.10492493957281113, 0.0805915966629982, 0.050293706357479095, 0.022330444306135178, -0.016598235815763474, -0.21983493864536285, 0.26607099175453186, 0.1316719502210617, 0.2234225869178772, 0.21175521612167358, -0.008932797238230705, 0.07662898302078247, 0.077657051384449, -0.054596804082393646, -0.16591888666152954, 0.022470273077487946, 0.08701782673597336, -0.08412544429302216, 0.004821933805942535, -0.049261607229709625, -0.034372683614492416, 0.009444758296012878, -0.04754547402262688, 0.13505783677101135, 0.1092890128493309, -0.04027578607201576, 0.12090646475553513, 0.03856614977121353, 0.11063150316476822, -0.06004606932401657, 0.06004089117050171, -0.05983635410666466, 0.08088945597410202, 0.11560026556253433, 0.020561616867780685, -0.1090095117688179, -0.01579837128520012, 0.03227593004703522, 0.00312172994017601, -0.010127226822078228, -0.10308226943016052, 0.032849326729774475, 0.021728312596678734, 0.0777435153722763, -0.24059082567691803, 0.1156124472618103, 0.01647106185555458, 0.025674669072031975, -0.036446020007133484, -0.052234258502721786, -0.2787613570690155, -0.12037267535924911, 0.019775288179516792, 0.04551312327384949, 0.12416641414165497, -0.05502002686262131, 0.06791795045137405, 0.17164288461208344, -0.07343387603759766, 0.05006995052099228, -0.14601081609725952, 0.09539301693439484, -0.018937062472105026, -0.10659307986497879, -0.14580129086971283, 0.17861217260360718, -0.10163440555334091, 0.07553157210350037, 0.056968893855810165, -0.03707663342356682, -0.031565096229314804, 0.06570009887218475, -0.050540123134851456, -0.043683603405952454, -0.03881261125206947, -0.0346413217484951, 0.1838393658399582, 0.0033714240416884422, -0.021408652886748314, 0.09849748015403748, -0.06403843313455582, -0.06564370542764664, -0.07671386748552322, 0.06837634742259979, -0.06948892772197723, 0.06372340768575668, -0.09910216927528381, -0.16616997122764587, 0.015004235319793224, -0.21946237981319427, 0.01197794545441866, -0.12277345359325409, -0.1608240157365799, -0.06599041819572449, 0.042736444622278214, 0.041583701968193054, -0.03481282666325569, -0.001053576241247356, -0.16251949965953827, 0.10654611140489578, -0.009860641323029995, -0.07056928426027298, -0.14949554204940796, -0.054500918835401535, 0.10701370984315872, 0.03692769631743431, -0.11909288913011551, -0.0938626229763031, -0.011592242866754532, -0.0903894379734993, 0.011369048617780209, 0.01977658085525036, 0.0723288431763649, 0.04131053388118744, 0.06584201753139496, 0.0652981698513031, -0.01765665039420128, -0.021895689889788628, 0.03194141387939453, 0.00344633380882442, 0.08878584951162338, 0.04294196516275406, -0.06464680284261703, -0.02493751235306263, 0.005358255933970213, 0.04296378418803215, -0.1873248666524887, 0.04336457699537277, 0.09301311522722244, -0.16409987211227417, 0.0804353579878807, -0.11205808073282242, -0.1976400762796402, 0.0479278489947319, -0.20181059837341309, 0.02380850538611412, -0.17206957936286926, 0.0023639232385903597, -0.04016665369272232, 0.16731694340705872, -0.0011649526422843337, -0.025438157841563225, -0.06654879450798035, 0.1120496392250061, -0.024101948365569115, 0.03328743577003479, -0.027365142479538918, -0.10690616071224213, 0.02936297282576561, 0.09495870023965836, -0.10700254887342453, 0.062488872557878494, 0.19944560527801514, -0.044767387211322784, 0.044532351195812225, 0.10865654796361923, 0.07023216784000397, -0.0046683200635015965, 0.06263605505228043, 0.1827133744955063, -0.08734779059886932, 0.20948292315006256, 0.009760568849742413, -0.048303715884685516, -0.004433018621057272, -0.04181431606411934, 0.060425691306591034, -0.14013628661632538, -0.06495170295238495, 0.06534517556428909, -0.07976076751947403, 0.061343468725681305, -0.20794729888439178, -0.03548586368560791, 0.05220818147063255, -0.0864969864487648, 0.15426744520664215, 0.11320715397596359, -0.04827834293246269, 0.007881119847297668, -0.1939428150653839, 0.13948583602905273, 0.035568978637456894, -0.20000886917114258, 0.1391908973455429, -0.14184987545013428, -0.014862175099551678, -0.03738738223910332, 0.010011235252022743, -0.02379957213997841, -0.1302485167980194, -0.0016461947234347463, 0.028480634093284607, -0.004356197081506252, 0.13082678616046906, -0.10896863043308258, -0.04985673353075981, 0.013781215995550156, 0.3268124461174011, 0.04025814309716225, -0.13516055047512054, -0.23316869139671326, 0.011501274071633816, -0.10082965344190598, 0.00115795130841434, 0.014387835748493671, 0.1625884771347046, 0.15925011038780212, -0.029820580035448074, -0.2931509017944336, 0.15840186178684235, 0.06284497678279877, 0.048799991607666016, 0.09758170694112778, 0.09395301342010498, 0.04564486816525459, 0.06437350064516068, 0.09300895780324936, -0.07434875518083572, 0.017465729266405106, 0.0557049959897995, -0.1512269824743271, -0.016842277720570564, -0.010043530724942684, 0.03135195001959801, -0.04359167069196701, -0.04979710280895233, -0.052389971911907196, 0.03341095149517059, 0.03194193169474602, 0.08187948912382126, -0.0007605289574712515, 0.02952663041651249, -0.04115140065550804, -0.08979262411594391, -0.013314296491444111, -0.03771045804023743, -0.20237722992897034, -0.007330657914280891, -0.09272819757461548, 0.19298623502254486, -0.0361025296151638, 0.028155289590358734, 0.18392135202884674, 0.13112589716911316, -0.12518304586410522, -0.005612228065729141, -0.035983044654130936, -0.26488566398620605, 0.031145459040999413, -0.1678404062986374, -0.017643693834543228, 0.13293223083019257, 0.00372220273129642, 0.1337868571281433, 0.08360718935728073, -0.12783494591712952, -0.050684574991464615, 0.039638154208660126, 0.018515197560191154, 0.031170332804322243, -0.19629883766174316, -0.05001082643866539, -0.12803740799427032, -0.057235971093177795, 0.046914808452129364, -0.1352483034133911, 0.0810379683971405, 0.1307397484779358, -0.11799240112304688, 0.07672952860593796, -0.15068143606185913, 0.023941276594996452, -0.22474053502082825, -0.04258408769965172, -0.07655903697013855, 0.15751315653324127, 0.027316445484757423, 0.18198661506175995, 0.0664043202996254, -0.11139984428882599, 0.08976362645626068, 0.05629866570234299, -0.08442112058401108, -0.09692376106977463, 0.04016906023025513, -0.10669268667697906, -0.048954129219055176, 0.07679294794797897, -0.000726501049939543, 0.10590637475252151, 0.013804012909531593, 0.054846495389938354, 0.08421431481838226, -0.22622233629226685, 0.04511091113090515, 0.056524608284235, 0.032031696289777756, -0.09485326707363129, 0.09733019769191742, 0.17939279973506927, 0.11049821972846985, -0.0793067142367363, -0.0048551252111792564, -0.04441547393798828, 0.050673458725214005, 0.1654040366411209, -0.017233436927199364, -0.17596469819545746, -0.16522619128227234, 0.038962531834840775, -0.12699934840202332, -0.1755003184080124, -0.08608314394950867, 0.06673798710107803, -0.0577225498855114, 0.07199075073003769, -0.05335475504398346, -0.074520543217659, 0.06725221872329712, 0.10237868130207062, 0.12106941640377045, 0.05778591334819794, 0.09579978138208389, 0.06105884537100792, 0.13522422313690186, 0.01361917145550251, 0.04870420694351196, 0.27609971165657043, -0.06855747103691101, -0.14589467644691467, -0.09881558269262314, -0.0889124944806099, 0.08416933566331863, 0.14951767027378082, -0.07640258222818375, 0.14033937454223633, -0.11872873455286026, -0.05629902333021164, -0.12166307866573334, -0.009882209822535515, 0.027275772765278816, -0.09419646859169006, -0.17584888637065887, -0.07411205768585205, -0.14242976903915405, 0.13215935230255127, 0.00272174971178174, 0.272487074136734, -0.053628358989953995, -0.12820689380168915, 0.13010987639427185, -0.10788645595312119, -0.03968644142150879, -0.05716216564178467, 0.032303739339113235, -0.1511285901069641, 0.02998894266784191, 0.17511029541492462, 0.025174658745527267, -0.06877216696739197, 0.061827562749385834, 0.007782360538840294, 0.14717207849025726, -0.000841233879327774, -0.006769556552171707, 0.038533203303813934, -0.08657976984977722, 0.02864239551126957, -0.06559409201145172, -0.09223540127277374, -0.0518425852060318, 0.25427162647247314, -0.0071344743482768536, -0.0667533352971077, -0.05055912584066391, -0.05087699741125107, -0.006064889021217823, 0.03247086703777313, -0.05625217780470848, -0.1079072430729866, 0.1818176507949829, -0.1858520656824112, -0.22737832367420197, 0.055311139672994614, -0.0821496918797493, 0.0011570282513275743, -0.02145335264503956, -0.07845722883939743, 0.20250171422958374, -0.11633998155593872, 0.1574801802635193, 0.03477022051811218, -0.0007800037274137139, 0.02402515709400177, 0.019025282934308052, 0.021535106003284454, -0.10385657101869583, -0.007160118781030178, -0.05476774275302887, 0.0971556231379509, -0.129844531416893, 0.10315163433551788, -0.015987496823072433, -0.056240491569042206, -0.1813783347606659, -0.01844232901930809, -0.13064026832580566, -0.05132194608449936, 0.013648544438183308, 0.08101566880941391, 0.028157472610473633, -0.10294254124164581, -0.01878741942346096, 0.09412650018930435, -0.009475898928940296, -0.030443917959928513, 0.03702650964260101, 0.03667119890451431, -0.03165966272354126, -0.13523048162460327, 0.12206708639860153, 0.023980580270290375, 0.14311136305332184, 0.006497105583548546, -0.020807595923542976, -0.1515074223279953, 0.11284352838993073, 0.3400987982749939, -0.13622407615184784, -0.003938737325370312, 0.031320277601480484, 0.0199105404317379, -0.09692814946174622, -0.08025728166103363, 0.09492184221744537, 0.021284764632582664, -0.1053953766822815, 0.08053244650363922, -0.15208376944065094, -0.060519296675920486, -0.03001977689564228, 0.22963404655456543, 0.2096405327320099, 0.0908367931842804, -0.0698922872543335, 0.07355494052171707, -2.5318020671937085e-32, -0.0017798006301745772, -0.06825877726078033, -0.12388470768928528, 0.04978054761886597, -0.17314544320106506, -0.04553084075450897, -0.15154947340488434, 0.003569121239706874, -0.13015128672122955, 0.0477442592382431, 0.07219939678907394, 0.08816933631896973, 0.11789398640394211, -0.025312602519989014, 0.03505707532167435, -0.057045675814151764, 0.04972762241959572, 0.14837533235549927, 0.004968069493770599, 0.14629057049751282, 0.1772400140762329, -0.02670925296843052, 0.1598520427942276, 0.05112306773662567, 0.0016312451334670186, -0.1762901246547699, -0.0133428405970335, -0.06270276010036469, 0.07302653789520264, -0.02260335348546505, -0.08545581996440887, 0.138444721698761, -0.0713294968008995, 0.13339032232761383, -0.002661544131115079, -0.11468017846345901, 0.03768528625369072, -0.09691022336483002, -0.16393792629241943, -0.07795161008834839, 0.03586896136403084, 0.03128943592309952, -0.022480489686131477, -0.11017952859401703, 0.08892005681991577, -0.07696700841188431, -0.03708987683057785, 0.043503813445568085, -0.18198256194591522, -0.05712507292628288, -0.04043903574347496, 0.14361433684825897, -0.012186044827103615, 0.03735016658902168, -0.027432093396782875, -0.027762867510318756, 0.10372379422187805, -0.13008494675159454, -0.16437789797782898, 0.06874347478151321, 0.20495811104774475, -0.014213526621460915, -0.1089719831943512, 0.002037285128608346, -0.0711294412612915, 0.06298168748617172, 0.04940072447061539, -0.1771090179681778, 0.15828274190425873, 0.13111016154289246, -0.08160008490085602, 0.050268590450286865, 0.0788358747959137, 0.1923997402191162, -0.15447619557380676, -0.02260528691112995, -0.05551008880138397, 0.08789992332458496, -0.08533042669296265, -0.022173289209604263, -0.06867700070142746, -0.004835700150579214, -0.08084801584482193, -0.10068968683481216, 0.022616814821958542, 0.06879933178424835, 0.060220908373594284, 0.05089803785085678, 0.022074133157730103, -0.0715256929397583, -0.19038963317871094, 0.19695071876049042, -0.016535954549908638, -0.116958849132061, -0.03799784183502197, 0.137779101729393, 0.01673848368227482, 0.16589486598968506, -0.08009957522153854, -0.10914716869592667, 0.15197980403900146, -0.10671226680278778, 0.03990310803055763, 0.16449356079101562, 0.20299360156059265, 0.02486799843609333, 0.08330906927585602, 0.1117158830165863, -0.21745800971984863, 0.07795431464910507, -0.01663820818066597, -0.17149460315704346, -0.04943321645259857, -0.1815028190612793, 0.07371743023395538, 0.017669089138507843, 0.09812601655721664, 0.10389801114797592, 0.0959608256816864, -0.015621069818735123, -0.03758493438363075, -0.03147808834910393, -0.019985806196928024, 0.10820003598928452, -0.016327260062098503, 0.12734678387641907, -0.044699229300022125, -0.2300201654434204, 0.24455662071704865, -0.053582679480314255, -0.08749528974294662, -0.2915884554386139, 7.859079005356762e-7, -0.06705349683761597, 0.14783160388469696, 0.16755585372447968, -0.051815833896398544, -0.07630368322134018, 0.17056961357593536, 0.017877789214253426, 0.004498441703617573, -0.14101654291152954, 0.07411737740039825, 0.1636931598186493, -0.0783320814371109, 0.07843609899282455, -0.00936741940677166, 0.20072494447231293, 0.05318589508533478, -0.21790163218975067, 0.11151640862226486, -0.17162218689918518, 0.02839704230427742, 0.1670924723148346, 0.0018802221165969968, 0.02183510735630989, -0.06190040707588196, 0.16533885896205902, -0.013113034889101982, -0.08688298612833023, -0.0398959144949913, 0.1412781924009323, -0.0051484378054738045, -0.06622077524662018, -0.11571179330348969, 0.09211981296539307, 0.051403872668743134, -0.06252002716064453, -0.11037874966859818, -0.06560449302196503, -0.048820242285728455, 0.012935994192957878, 0.11856292188167572, 0.12427223473787308, 0.07768025994300842, -0.0511326901614666, -0.22933344542980194, 0.05180182680487633, -0.014478380791842937, -0.18186399340629578, 0.027037853375077248, 0.033527933061122894, -0.0833757072687149, 0.06261439621448517, 0.07003508508205414, 0.010968298651278019, 0.09190165251493454, -0.04847388714551926, 0.06295797228813171, 0.014494026079773903, -0.13661864399909973, -0.017903905361890793, -0.0194245558232069, -0.03280239179730415, -0.06286662071943283, 0.056810855865478516, 0.07601496577262878, 0.12769749760627747, -0.19214069843292236, -0.006228246260434389, 1.8407230195475582e-34, 0.052603911608457565, 0.10402819514274597, 0.013241044245660305, -0.1518019139766693, 0.07023798674345016, -0.013744790107011795, 0.144746333360672, 0.07208053767681122, 0.11595834791660309, -0.06682832539081573, -0.11633388698101044 ]
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.00556638790294528, 0.015461630187928677, 0.024371329694986343, -0.042266640812158585, 0.334587961435318, 0.034592606127262115, 0.15442197024822235, 0.09974078834056854, 0.006700573489069939, -0.03581425920128822, -0.10859239846467972, -0.04286442697048187, 0.046709202229976654, 0.05062258243560791, 0.04569374397397041, -0.08694595843553543, -0.07900195568799973, 0.05612422525882721, -0.022397466003894806, 0.07841414958238602, -0.03175823763012886, 0.13953162729740143, 0.03952094167470932, 0.006709115579724312, -0.10669247061014175, -0.16103379428386688, 0.12622667849063873, -0.19913314282894135, -0.07976123690605164, -0.11747238039970398, 0.13207243382930756, 0.14291518926620483, -0.05283652991056442, -0.07381968945264816, 0.000006128379936853889, -0.0654648020863533, 0.028949636965990067, 0.007186580449342728, -0.020142674446105957, 0.0032539875246584415, 0.12976936995983124, 0.1640707105398178, 0.08470182865858078, -0.10193274915218353, -0.025276800617575645, 0.0004261039721313864, -0.11669241636991501, 0.1246105208992958, 0.12707482278347015, 0.07437509298324585, 0.024712763726711273, -0.09019332379102707, 0.01076493225991726, -0.009584731422364712, -0.13103578984737396, 0.09755321592092514, -0.14939098060131073, 0.12135936319828033, -0.11652550101280212, 0.11102566123008728, 0.18762995302677155, 0.10075803101062775, 0.034927450120449066, 0.10421854257583618, 0.005713493563234806, -0.10013735294342041, 0.003598557785153389, -0.19701726734638214, 0.08785096555948257, 0.06241618096828461, -0.1388094574213028, 0.08652669936418533, -0.10131869465112686, 0.06460057944059372, 0.0726151168346405, -0.24396714568138123, -0.03994659706950188, -0.04636891931295395, -0.06366036832332611, -0.023801498115062714, -0.187678724527359, -0.07366128265857697, 0.07395153492689133, -0.07305524498224258, -0.04302449896931648, 0.06845550239086151, -0.2008267343044281, 0.18640035390853882, 0.09504739195108414, -0.12986136972904205, -0.029619472101330757, 0.11757276207208633, 0.0074710482731461525, -0.09761567413806915, -0.06286509335041046, -0.05397101864218712, -0.14018207788467407, -0.09384731948375702, 0.18889211118221283, -0.12225445359945297, -0.14881864190101624, -0.10120236873626709, -0.011832064017653465, -0.10696087777614594, -0.07027129083871841, 0.06244705989956856, 0.06372500211000443, 0.10508164763450623, -0.018029289320111275, 0.0003630933351814747, -0.154739111661911, -0.06076706945896149, 0.01241204421967268, 0.05629356577992439, 0.20682406425476074, 0.04455380514264107, -0.11395200341939926, 0.0913458988070488, -0.1878056675195694, -0.010219774208962917, 0.08100216090679169, -0.010511429980397224, 0.1628495752811432, 0.09735321253538132, 0.11036684364080429, 0.0059434822760522366, 0.000004126495696255006, 0.14846107363700867, -0.022331848740577698, 0.004957974888384342, 0.014642213471233845, 0.04296998307108879, -0.05556739866733551, 0.015701664611697197, 0.10676577687263489, -0.0028056236915290356, -0.037743471562862396, -0.07855060696601868, 0.12450028210878372, -0.12227930873632431, -0.07252510637044907, -0.0860823541879654, -0.11088061332702637, -0.05750018730759621, -0.009668571874499321, 0.1106141060590744, 0.3089141249656677, -0.0255438145250082, 0.05489228293299675, -0.04175977408885956, -0.06576428562402725, 0.1407817155122757, -0.059860557317733765, -0.011410264298319817, -0.14475978910923004, 0.03905018791556358, 0.002991184126585722, 0.10386781394481659, -0.13466311991214752, -0.19364231824874878, 0.10283003747463226, 0.05835840106010437, -0.10995625704526901, -0.010422462597489357, 0.06674615293741226, -0.006641371175646782, 0.2037043273448944, -0.11987394094467163, 0.19577641785144806, 0.09034322947263718, -0.015074356459081173, -0.1602691262960434, -0.013654712587594986, -0.1451491266489029, -0.035630546510219574, -0.02928207814693451, 0.051701243966817856, -0.005228220950812101, -0.1856233775615692, -0.14563928544521332, 0.055018067359924316, -0.19003339111804962, 0.23321229219436646, -0.11775774508714676, 0.03109286166727543, 0.0530964732170105, 0.233695387840271, 0.1912936419248581, -0.06119262054562569, -0.13215188682079315, -0.10280933976173401, -0.05846736580133438, -0.04062355309724808, -0.14520786702632904, 0.11391112208366394, 0.023661257699131966, 0.04432068020105362, 0.0048673562705516815, -0.08392355591058731, -0.15070147812366486, -0.10166759788990021, 0.15356482565402985, -0.14242736995220184, -0.07737413048744202, -0.07424325495958328, -0.06595033407211304, -0.0038387314416468143, 0.003386449534446001, -0.01321452297270298, -0.2027793973684311, 0.12578706443309784, -0.03320930153131485, -0.024040397256612778, 0.03570999950170517, -0.04118647426366806, -0.09438783675432205, 0.0012374583166092634, -0.023871250450611115, -0.06729194521903992, 0.07635171711444855, -0.05388173460960388, -0.10985103249549866, -0.10122327506542206, 0.02027188241481781, 0.27074331045150757, 0.10117592662572861, -0.039437711238861084, -0.053969115018844604, 0.023005381226539612, 0.15134942531585693, 0.05912545695900917, -0.056030988693237305, 0.007253489922732115, 0.13643409311771393, -0.1472851037979126, -0.2774428427219391, 0.12478344887495041, -0.08034662902355194, 0.23644617199897766, 0.011606594547629356, -0.0330578088760376, -0.051500823348760605, -0.02890797145664692, 0.0510428249835968, -0.0625290498137474, 0.042719949036836624, -0.1729108989238739, 0.08107688277959824, 0.0701213851571083, 0.11260166764259338, 0.16769611835479736, -0.021880753338336945, -0.26884597539901733, -0.058929286897182465, 0.0853491947054863, -0.25117504596710205, -0.03820747509598732, -0.04358580708503723, 0.08259489387273788, -0.07635939866304398, 0.16257506608963013, -0.00326661579310894, 0.20341813564300537, -0.00692789675667882, 0.10568324476480484, 0.005511268973350525, -0.02327483519911766, -0.10504863411188126, 0.056751351803541183, 0.09567894041538239, -0.036778878420591354, -0.09785038232803345, -0.1130126491189003, -0.016017615795135498, 0.07705315947532654, -0.07385358959436417, -0.05707516148686409, 0.010515368543565273, -0.006649265065789223, 0.06421943753957748, -0.24465738236904144, 0.06502463668584824, 0.12489930540323257, -0.08486601710319519, -0.08220524340867996, 0.057437505573034286, -0.1725512444972992, -0.03237612545490265, -0.022953234612941742, -0.01637689396739006, -0.16744683682918549, -0.017676547169685364, -0.012905417010188103, 0.018780523911118507, 0.07666695863008499, -0.023614978417754173, 0.11818184703588486, -0.08023707568645477, 0.07743655145168304, 0.1338377296924591, -0.0977703183889389, 0.03330070152878761, 0.05991080030798912, -0.01813461445271969, 0.0022081395145505667, -0.07795092463493347, 0.029289275407791138, 0.12999573349952698, -0.08815947920084, -0.21994605660438538, -0.04704517498612404, 0.010113404132425785, 0.0047330972738564014, 0.20987644791603088, -0.044248390942811966, -0.07551661133766174, -0.20884400606155396, 0.14161522686481476, 0.16557009518146515, 0.034614626318216324, 0.153670996427536, 0.06048933416604996, -0.13980914652347565, -0.031843267381191254, -0.08026586472988129, 0.04022011533379555, -0.1332406997680664, -0.12020579725503922, 0.0013306401669979095, 0.01734877936542034, -0.030737007036805153, 0.19343596696853638, 0.08345615863800049, -0.08124411851167679, 0.18542352318763733, -0.040822867304086685, -0.29489487409591675, 0.057136643677949905, 0.15137475728988647, -0.06545445322990417, -0.03875405341386795, -0.024881700053811073, 0.10485071688890457, 0.039016708731651306, 0.07649514824151993, -0.048783548176288605, -0.16672579944133759, -0.04239605367183685, -0.15723654627799988, 0.14521032571792603, 0.16830521821975708, 0.010107701644301414, -0.057932280004024506, -0.10141324251890182, -0.017218492925167084, 0.06781621277332306, -0.049053218215703964, -0.08356380462646484, -0.15686365962028503, -0.1454828530550003, -0.03027685359120369, 0.06344190984964371, 0.00887797400355339, 0.015951331704854965, 0.06518139690160751, 0.1094420999288559, 0.18679384887218475, 0.015388524159789085, -0.15003065764904022, 0.028254903852939606, 0.08207294344902039, -0.01879996620118618, 0.08774644136428833, 0.04092041775584221, -0.0018503564642742276, 0.15727992355823517, 0.014782949350774288, -0.029553735628724098, 0.12251294404268265, 0.07870999723672867, -0.1748485565185547, 0.018241815268993378, -0.06167213246226311, 0.031608156859874725, 0.05918069928884506, -0.055593572556972504, 0.0550759993493557, 0.07068858295679092, -0.06361951678991318, 0.10743009299039841, 0.18058457970619202, 0.03153976798057556, -0.11518850177526474, -0.18009257316589355, -0.14230890572071075, 0.012789390981197357, 0.02913333661854267, 0.04999140650033951, 0.14322015643119812, 0.028710180893540382, 0.17077253758907318, 0.022310534492135048, 0.015146372839808464, 0.07118767499923706, 0.17688170075416565, -0.0066163185983896255, 0.06180915609002113, -0.07529883831739426, 0.01122999656945467, -0.12318608164787292, -0.055802278220653534, 0.11629130691289902, -0.07819943130016327, -0.12612959742546082, 0.20620708167552948, -0.08290410041809082, -0.027944466099143028, 0.08181542903184891, -0.06685100495815277, -0.19787845015525818, -0.05841495469212532, -0.16797904670238495, 0.11733931303024292, 0.16527129709720612, -0.004507375881075859, -0.037302110344171524, -0.08026788383722305, -0.05893867835402489, -0.0658549815416336, -0.05973868444561958, 0.01453221682459116, 0.052676595747470856, 0.09392969310283661, -0.03265342116355896, -0.008039269596338272, -0.06235630810260773, 0.15087589621543884, -0.09386923909187317, -0.16157019138336182, 0.0306116733700037, -0.047313496470451355, -0.025285789743065834, 0.22545629739761353, -0.1355586051940918, -0.006148915272206068, -0.1584719568490982, -0.066654734313488, -0.0714038833975792, 0.05884622409939766, 0.07000499963760376, 0.021762637421488762, -0.10271640866994858, -0.026310814544558525, 0.026212558150291443, 0.12016670405864716, -0.11081282049417496, 0.20609624683856964, 0.0768505185842514, -0.01999756135046482, -0.10270453244447708, 0.26416683197021484, -0.04704790934920311, -0.20545072853565216, -0.01898076757788658, 0.07107289135456085, 0.013846248388290405, 0.23142936825752258, -0.10393825173377991, -0.05298823118209839, 0.19912458956241608, -0.06437657028436661, 0.10281310975551605, -0.061167918145656586, -0.029166242107748985, 0.039605870842933655, -0.18934783339500427, 0.1978297084569931, -0.0658138245344162, -0.07686394453048706, -0.016652273014187813, 0.189301535487175, 0.03393813967704773, 0.06840065866708755, -0.10985551029443741, 0.03165903687477112, 0.040540311485528946, 0.042587921023368835, -0.07289446145296097, -0.10347271710634232, 0.07132375240325928, 0.0011652514804154634, 0.07395852357149124, -0.030894024297595024, 0.013918204233050346, 0.13590872287750244, 0.0012339567765593529, 0.30499976873397827, -0.019077464938163757, 0.01081644743680954, 0.17542526125907898, -0.0911179780960083, -0.22863833606243134, -0.01698537915945053, -0.08538632839918137, 0.06553354859352112, -0.17093515396118164, 0.1313364952802658, 0.16708219051361084, 0.1821354329586029, 0.142686128616333, 0.020462406799197197, 0.16094708442687988, 0.04492436349391937, 0.07781042158603668, -0.22794421017169952, -0.17925868928432465, -0.13736015558242798, 0.1247505322098732, 0.12790995836257935, 0.0074797519482672215, -0.020437665283679962, -0.15243028104305267, 0.03277161717414856, -0.08214590698480606, -0.017353273928165436, 0.023167269304394722, -0.0061227926053106785, -0.08399048447608948, 0.044743891805410385, 0.14963562786579132, -0.04972672462463379, -0.009670923464000225, 0.08084449172019958, -0.14501500129699707, -0.05561007931828499, -0.07138454914093018, -0.048868030309677124, -0.01845048926770687, 0.19658508896827698, -0.10388416051864624, -0.044048164039850235, -0.055656008422374725, 0.2150976061820984, -0.010299316607415676, 0.05414314940571785, 0.03979690745472908, -0.02065267600119114, 0.009099750779569149, 0.07515627145767212, -0.0713733360171318, -0.005403542425483465, -0.036635786294937134, 0.06466002017259598, -0.06284068524837494, -0.0023750721011310816, -2.5819283789222356e-32, -0.14875222742557526, 0.03681822866201401, -0.1563374400138855, -0.07376261055469513, -0.2776862680912018, -0.031218087300658226, 0.16418366134166718, 0.14565859735012054, 0.03881411626935005, -0.022845754399895668, 0.12980827689170837, -0.13011984527111053, 0.0032583032734692097, -0.03462643921375275, 0.06267929077148438, 0.005308318883180618, -0.12411526590585709, 0.03311946615576744, -0.0741635262966156, 0.0470736064016819, 0.14302897453308105, -0.0778566300868988, 0.15170727670192719, 0.06201906502246857, 0.05411725491285324, 0.17593823373317719, -0.12413181364536285, -0.005445410031825304, 0.035803597420454025, 0.02145816758275032, -0.013600422069430351, 0.1620585322380066, -0.02601797878742218, -0.08307010680437088, -0.054676029831171036, 0.005085625220090151, -0.07377046346664429, -0.1292717307806015, -0.007885420694947243, 0.1727142632007599, 0.21064212918281555, 0.18012848496437073, 0.055390190333127975, -0.010849609971046448, 0.04480588063597679, 0.03942590579390526, 0.01919722370803356, -0.016487352550029755, -0.024348927661776543, -0.21320003271102905, 0.10466696321964264, -0.029617752879858017, -0.024749629199504852, 0.19012637436389923, 0.00027894091908819973, 0.044225580990314484, -0.038230739533901215, 0.003066318342462182, -0.04231168329715729, 0.08446361124515533, 0.03284921497106552, 0.17835958302021027, 0.06629464775323868, 0.1212603822350502, -0.016861947253346443, 0.08329759538173676, 0.19370914995670319, -0.14803564548492432, -0.08577334135770798, -0.07159783691167831, 0.18666213750839233, 0.007764994632452726, 0.17698264122009277, -0.0015961115714162588, -0.2678089439868927, -0.0042356690391898155, -0.11721830070018768, -0.07250989228487015, -0.041672032326459885, -0.23139382898807526, 0.036628589034080505, 0.013784634880721569, 0.04173871874809265, -0.019137447699904442, -0.20948432385921478, -0.12290273606777191, -0.04867303743958473, 0.039845291525125504, -0.10145655274391174, -0.1627446413040161, 0.09713362902402878, 0.06729322671890259, -0.1845422089099884, 0.03659207373857498, -0.10763083398342133, -0.028854602947831154, 0.054990723729133606, 0.21301992237567902, -0.08913461863994598, 0.0498579740524292, -0.013450860977172852, 0.011784919537603855, -0.008432532660663128, 0.20522843301296234, 0.07910123467445374, -0.06459617614746094, 0.04183109104633331, -0.07023227214813232, -0.1696099489927292, -0.11270251125097275, -0.040035586804151535, -0.12777385115623474, 0.10949196666479111, 0.10116630792617798, 0.14550454914569855, -0.15330371260643005, -0.10606219619512558, 0.027493590489029884, 0.05126755312085152, 0.11098768562078476, -0.12537389993667603, -0.06365683674812317, -0.03757409751415253, -0.03878704458475113, -0.031546834856271744, 0.013319315388798714, -0.1742747724056244, -0.012566746212542057, 0.06734330207109451, -0.006433206144720316, 0.024885553866624832, -0.03431035578250885, 7.533068355769501e-7, 0.017007265239953995, 0.05582113936543465, -0.1552603542804718, -0.042452532798051834, -0.15308420360088348, 0.12845459580421448, -0.02569585293531418, -0.05401797965168953, 0.04284767434000969, 0.09700624644756317, 0.08670324832201004, -0.06951135396957397, 0.060179948806762695, 0.06893668323755264, 0.19532236456871033, -0.12972135841846466, -0.10413098335266113, 0.08552275598049164, -0.1765148937702179, 0.10841912776231766, 0.02405349165201187, 0.07617120444774628, 0.3097131550312042, -0.024985918775200844, 0.03896954655647278, -0.10552583634853363, -0.11375191062688828, 0.027804629877209663, 0.15601861476898193, -0.016535716131329536, 0.14451801776885986, 0.0019408478401601315, 0.11536804586648941, 0.24191324412822723, 0.07839220017194748, -0.044395044445991516, 0.07947580516338348, 0.03944234922528267, 0.031067712232470512, -0.0323558934032917, -0.035542819648981094, 0.004979269579052925, -0.03479596599936485, -0.09246030449867249, 0.07529156655073166, 0.050066087394952774, -0.08911538869142532, 0.0005142944282852113, -0.023833904415369034, 0.12959103286266327, 0.09897338598966599, -0.02678522653877735, 0.09570605307817459, 0.3128657341003418, -0.06576840579509735, 0.018398519605398178, -0.06323842704296112, -0.05593571811914444, -0.05122475326061249, 0.072527214884758, -0.06932974606752396, -0.13945378363132477, -0.08408073335886002, 0.0011860554805025458, -0.05941563472151756, -0.17698153853416443, -0.00837897602468729, 2.3325074968090005e-34, 0.019959483295679092, -0.058079347014427185, 0.049883414059877396, -0.08890748769044876, -0.04260953515768051, 0.06458260118961334, -0.029221177101135254, 0.020715268328785896, 0.08752579987049103, -0.11914240568876266, 0.014844474382698536 ]
https://github.com/huggingface/datasets/issues/2554
Multilabel metrics not supported
Sorry for reopening but I just noticed that the `_compute` method for the F1 metric is still not good enough for multilabel problems: https://github.com/huggingface/datasets/blob/92a3ee549705aa0a107c9fa5caf463b3b3da2616/metrics/f1/f1.py#L115 Somehow we should be able to change the parameter `average` at least
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, ), } ```
36
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, ), } ``` Sorry for reopening but I just noticed that the `_compute` method for the F1 metric is still not good enough for multilabel problems: https://github.com/huggingface/datasets/blob/92a3ee549705aa0a107c9fa5caf463b3b3da2616/metrics/f1/f1.py#L115 Somehow we should be able to change the parameter `average` at least
[ -0.015946196392178535, 0.043313197791576385, 0.025678999722003937, -0.03460488095879555, 0.3159201145172119, 0.029767248779535294, 0.16519072651863098, 0.10254139453172684, 0.0013509799027815461, -0.029914390295743942, -0.09089785814285278, -0.05655087158083916, 0.0458977147936821, 0.07267631590366364, 0.028839625418186188, -0.07437361776828766, -0.07980947941541672, 0.05700264498591423, -0.035506680607795715, 0.06368149816989899, -0.04978474602103233, 0.13652683794498444, 0.04778662696480751, -0.009827629663050175, -0.09962262213230133, -0.16042959690093994, 0.11504178494215012, -0.2131873071193695, -0.07456052303314209, -0.11987640708684921, 0.11984311044216156, 0.1591080129146576, -0.07080606371164322, -0.052820876240730286, 0.000006166487310110824, -0.05838453024625778, 0.021238025277853012, 0.005646288860589266, -0.013692539185285568, 0.00568930059671402, 0.14656826853752136, 0.17458364367485046, 0.08446069806814194, -0.10774605721235275, -0.033019207417964935, 0.004747477825731039, -0.11508993059396744, 0.11111049354076385, 0.12204849720001221, 0.05275809019804001, 0.016337258741259575, -0.09730198979377747, 0.02078220248222351, -0.009454191662371159, -0.13212989270687103, 0.09082943201065063, -0.1483130156993866, 0.11159730702638626, -0.12836237251758575, 0.10348492860794067, 0.18658331036567688, 0.11099646240472794, 0.03005075268447399, 0.10444366931915283, 0.01967925950884819, -0.09521281719207764, -0.006945426110178232, -0.20648397505283356, 0.07620906829833984, 0.08261442184448242, -0.1423904001712799, 0.0955902487039566, -0.1046641394495964, 0.06922876089811325, 0.07322202622890472, -0.25336262583732605, -0.05593983083963394, -0.049719683825969696, -0.05803271755576134, -0.03584764525294304, -0.17953386902809143, -0.07591196894645691, 0.07386040687561035, -0.06559886038303375, -0.051730867475271225, 0.08406863361597061, -0.20076674222946167, 0.199636772274971, 0.10078687965869904, -0.13287581503391266, -0.036696888506412506, 0.12471124529838562, 0.008484415709972382, -0.08638487756252289, -0.07106287032365799, -0.056771114468574524, -0.1408175230026245, -0.09796711802482605, 0.1867041140794754, -0.11351226270198822, -0.12716808915138245, -0.08814068138599396, -0.021524779498577118, -0.10468658804893494, -0.061282772570848465, 0.05324558913707733, 0.055826857686042786, 0.08814112097024918, -0.02132432721555233, 0.007331605069339275, -0.14865845441818237, -0.05919306352734566, 0.015683548524975777, 0.043181873857975006, 0.2114957571029663, 0.03586189076304436, -0.11378781497478485, 0.10025656223297119, -0.1954554170370102, -0.02035178430378437, 0.07919242978096008, -0.0020851504523307085, 0.16838957369327545, 0.09764949977397919, 0.10150400549173355, 0.0009114054846577346, -0.00020047866564709693, 0.1382737159729004, -0.01453508622944355, 0.023449435830116272, 0.00652218097820878, 0.027958746999502182, -0.03667041286826134, 0.026370150968432426, 0.10962279886007309, -0.0011765119852498174, -0.028954392299056053, -0.06916718184947968, 0.1367463916540146, -0.12379305064678192, -0.07811975479125977, -0.09645908325910568, -0.10677756369113922, -0.06349935382604599, -0.0028922054916620255, 0.10413369536399841, 0.29191797971725464, -0.0017198901623487473, 0.05298652499914169, -0.03255537524819374, -0.06775471568107605, 0.14823326468467712, -0.0701085776090622, -0.004659459460526705, -0.14980848133563995, 0.03934626281261444, 0.010161359794437885, 0.10050897300243378, -0.14475290477275848, -0.18202917277812958, 0.09842389822006226, 0.07701309025287628, -0.12547555565834045, -0.011319992132484913, 0.0626717284321785, 0.010069463402032852, 0.18047890067100525, -0.11617042869329453, 0.16590532660484314, 0.09116823226213455, -0.01651574671268463, -0.15396085381507874, -0.017144624143838882, -0.14503559470176697, -0.04030441492795944, -0.026065608486533165, 0.06126634031534195, -0.00016755513206589967, -0.20265187323093414, -0.12690897285938263, 0.058999814093112946, -0.17842403054237366, 0.21689046919345856, -0.10622884333133698, 0.011885445564985275, 0.047941964119672775, 0.2284429669380188, 0.18406759202480316, -0.05413629114627838, -0.14171496033668518, -0.08600513637065887, -0.05778907984495163, -0.036821089684963226, -0.14115038514137268, 0.10366608947515488, 0.024726517498493195, 0.059620313346385956, -0.008468644693493843, -0.06920591741800308, -0.14828480780124664, -0.1167142242193222, 0.15666267275810242, -0.13069768249988556, -0.06293042004108429, -0.07354177534580231, -0.06696426123380661, -0.021145515143871307, 0.024288078770041466, -0.008238574489951134, -0.20229178667068481, 0.10506846755743027, -0.03679836168885231, -0.03112475760281086, 0.03176261857151985, -0.04990285262465477, -0.06792283803224564, -0.00502883130684495, -0.025724230334162712, -0.09161325544118881, 0.06765549629926682, -0.05306242033839226, -0.09810652583837509, -0.10938189178705215, 0.011165091767907143, 0.278792142868042, 0.09148618578910828, -0.03242490813136101, -0.04977000132203102, 0.024335971102118492, 0.15039733052253723, 0.07556208968162537, -0.06570606678724289, 0.022600792348384857, 0.13954594731330872, -0.14679470658302307, -0.26731419563293457, 0.10141542553901672, -0.09515353292226791, 0.24917127192020416, 0.021284986287355423, -0.05285472422838211, -0.051011037081480026, -0.024341827258467674, 0.04382919892668724, -0.04857880249619484, 0.03929029032588005, -0.19951236248016357, 0.06841708719730377, 0.07309791445732117, 0.09868023544549942, 0.16336552798748016, -0.014715629629790783, -0.25723743438720703, -0.06982289254665375, 0.0782093033194542, -0.23489783704280853, -0.015877000987529755, -0.052283577620983124, 0.09094878286123276, -0.06741369515657425, 0.16776350140571594, 0.0025098088663071394, 0.20863331854343414, -0.01542497705668211, 0.11324609071016312, -0.00045891213812865317, -0.02660919539630413, -0.11782824248075485, 0.046319857239723206, 0.09253258258104324, -0.028821393847465515, -0.09342654794454575, -0.1157131940126419, -0.012517860159277916, 0.078513965010643, -0.08254382759332657, -0.03599002957344055, 0.010594455525279045, -0.011304228566586971, 0.06410454958677292, -0.23997211456298828, 0.055575475096702576, 0.12001017481088638, -0.07883260399103165, -0.07176443189382553, 0.055901192128658295, -0.176477313041687, -0.020128492265939713, -0.02945832721889019, -0.01581023819744587, -0.17384158074855804, -0.014997734688222408, -0.015855975449085236, 0.026257513090968132, 0.07453408092260361, -0.027900366112589836, 0.12602226436138153, -0.07406098395586014, 0.08268322795629501, 0.14255845546722412, -0.09320374578237534, 0.0333840511739254, 0.05563364550471306, -0.0026198732666671276, -0.002847652416676283, -0.07135824859142303, 0.031787458807229996, 0.12881606817245483, -0.10000934451818466, -0.20867681503295898, -0.05850266292691231, 0.0025782573502510786, 0.010073738172650337, 0.21508266031742096, -0.04311925917863846, -0.06380552798509598, -0.22534509003162384, 0.14726468920707703, 0.1539967656135559, 0.05053345486521721, 0.1565420925617218, 0.056782741099596024, -0.1308184117078781, -0.03879167139530182, -0.07377233356237411, 0.04065475985407829, -0.12275172024965286, -0.11492744833230972, 0.0027812733314931393, 0.01586483046412468, -0.024858111515641212, 0.2058650553226471, 0.08204236626625061, -0.08544288575649261, 0.21176645159721375, -0.036128442734479904, -0.3111375570297241, 0.061502132564783096, 0.15532918274402618, -0.052225492894649506, -0.015090683475136757, -0.021420275792479515, 0.1213700920343399, 0.028981002047657967, 0.08493594825267792, -0.07625800371170044, -0.16978703439235687, -0.05291175842285156, -0.1694505214691162, 0.14132893085479736, 0.17728257179260254, 0.018347008153796196, -0.06897063553333282, -0.09360776841640472, -0.01759442500770092, 0.08853878825902939, -0.04125198721885681, -0.08012254536151886, -0.16970515251159668, -0.1389683187007904, -0.047101933509111404, 0.07462799549102783, 0.018365800380706787, 0.01408000010997057, 0.07918863743543625, 0.1068161278963089, 0.18724209070205688, 0.021738987416028976, -0.13613735139369965, 0.028834406286478043, 0.0700501948595047, -0.011740809306502342, 0.09571848064661026, 0.03952871635556221, -0.018372640013694763, 0.1503314971923828, 0.01563308946788311, -0.039560358971357346, 0.11893878132104874, 0.08726567029953003, -0.16945019364356995, 0.0065888334065675735, -0.06591819226741791, 0.029045075178146362, 0.04390144720673561, -0.06100931763648987, 0.05245089530944824, 0.07609844952821732, -0.07270514219999313, 0.10129085183143616, 0.16707578301429749, 0.02090618573129177, -0.11882638931274414, -0.15431463718414307, -0.1378920078277588, 0.01657095178961754, 0.031871311366558075, 0.057922881096601486, 0.141871839761734, 0.013083268888294697, 0.16088536381721497, 0.05014288052916527, 0.005758204497396946, 0.08191884309053421, 0.17236030101776123, -0.00661260774359107, 0.05798891559243202, -0.06558968126773834, 0.02060062624514103, -0.11261706799268723, -0.06530389934778214, 0.1096029132604599, -0.0865611582994461, -0.13589589297771454, 0.22901524603366852, -0.07436727732419968, -0.03448880463838577, 0.07209252566099167, -0.05873524770140648, -0.17949500679969788, -0.05625857785344124, -0.16216294467449188, 0.10936811566352844, 0.17655318975448608, 0.0028369466308504343, -0.036202553659677505, -0.08963561803102493, -0.059135835617780685, -0.06090523675084114, -0.05578017979860306, 0.014669767580926418, 0.08043260127305984, 0.07887236028909683, -0.03496192768216133, 0.002050143899396062, -0.07343548536300659, 0.1454056352376938, -0.09632569551467896, -0.14099645614624023, 0.046624477952718735, -0.04364773631095886, -0.013174159452319145, 0.2478865534067154, -0.1281324028968811, -0.009696483612060547, -0.1492692530155182, -0.07991335541009903, -0.08756053447723389, 0.07432559132575989, 0.07905592769384384, 0.016393976286053658, -0.08236926794052124, -0.019245022907853127, 0.033886637538671494, 0.13314372301101685, -0.11157360672950745, 0.2266618013381958, 0.08068621158599854, -0.018816659227013588, -0.10181337594985962, 0.25952115654945374, -0.04725568741559982, -0.21276693046092987, -0.023287130519747734, 0.07072571665048599, 0.02362668327987194, 0.2279423028230667, -0.11300726234912872, -0.05095224827528, 0.18078863620758057, -0.0851224735379219, 0.10412047058343887, -0.0552215613424778, -0.03363282233476639, 0.048751454800367355, -0.17040801048278809, 0.2080419957637787, -0.060733795166015625, -0.0784112736582756, -0.0057453433983027935, 0.19071108102798462, 0.0302304457873106, 0.06631136685609818, -0.10520327836275101, 0.02417084574699402, 0.049564994871616364, 0.041416555643081665, -0.08164210617542267, -0.09894800186157227, 0.08145411312580109, -0.009022447280585766, 0.06822721660137177, -0.041307177394628525, 0.016385871917009354, 0.15126486122608185, -0.006324235815554857, 0.28412652015686035, -0.02482905611395836, -0.009034043177962303, 0.1677018105983734, -0.06900034099817276, -0.23953479528427124, -0.007536332122981548, -0.09344654530286789, 0.060354866087436676, -0.1595158576965332, 0.13124226033687592, 0.15557649731636047, 0.1829768568277359, 0.12877745926380157, 0.009803323075175285, 0.1654488742351532, 0.04061543568968773, 0.08339842408895493, -0.23854969441890717, -0.18365797400474548, -0.12589913606643677, 0.12696877121925354, 0.1306835561990738, 0.012412268668413162, -0.021585362032055855, -0.15028199553489685, 0.024998968467116356, -0.08878510445356369, -0.024503974243998528, 0.0211544968187809, -0.001087324577383697, -0.0915459468960762, 0.05784419924020767, 0.15700197219848633, -0.04408100247383118, -0.00941693689674139, 0.07263591885566711, -0.12675966322422028, -0.0624593049287796, -0.07119794934988022, -0.053237102925777435, -0.01875809207558632, 0.1936633437871933, -0.1096285879611969, -0.0422956719994545, -0.06487266719341278, 0.22559913992881775, -0.015048759989440441, 0.0635206550359726, 0.026327280327677727, -0.01536908745765686, 0.01602695882320404, 0.060758303850889206, -0.0666591003537178, -0.0046369764022529125, -0.02951124496757984, 0.047965582460165024, -0.07556139677762985, -0.009161294437944889, -2.604231033240387e-32, -0.14967206120491028, 0.032338108867406845, -0.1622018665075302, -0.08401504158973694, -0.26310616731643677, -0.027812888845801353, 0.16512170433998108, 0.1462957262992859, 0.04471798613667488, -0.015466509386897087, 0.1168753057718277, -0.13492727279663086, 0.00801810622215271, -0.0413617342710495, 0.056690193712711334, 0.02000943385064602, -0.11956722289323807, 0.03296300396323204, -0.08169211447238922, 0.05042249709367752, 0.13281464576721191, -0.07608097791671753, 0.15336552262306213, 0.06629129499197006, 0.05051130801439285, 0.1699405163526535, -0.11191926151514053, -0.0000641007354715839, 0.04879842698574066, 0.021982841193675995, -0.01564059965312481, 0.1697084754705429, -0.020001882687211037, -0.08192665874958038, -0.0670674741268158, -0.011063301004469395, -0.07770144194364548, -0.1332012563943863, -0.004673249088227749, 0.16422264277935028, 0.20418134331703186, 0.18214085698127747, 0.05167543515563011, -0.004905859939754009, 0.01121224369853735, 0.029178014025092125, 0.019141029566526413, -0.014926073141396046, -0.033240627497434616, -0.22555828094482422, 0.1005759909749031, -0.029424861073493958, 0.0008486869046464562, 0.1997934877872467, 0.02012539654970169, 0.04493580386042595, -0.04570372402667999, -0.013398241251707077, -0.03428705409169197, 0.0894317775964737, 0.03378188610076904, 0.19002443552017212, 0.061511311680078506, 0.11490829288959503, -0.014141273684799671, 0.10283973813056946, 0.1819852590560913, -0.1510278433561325, -0.09150131046772003, -0.06396470218896866, 0.17807385325431824, 0.016537344083189964, 0.19257035851478577, -0.005267477594316006, -0.25501900911331177, -0.01393410935997963, -0.11521217972040176, -0.06177821382880211, -0.054060954600572586, -0.25261226296424866, 0.040765080600976944, 0.015217065811157227, 0.046521663665771484, -0.018150584772229195, -0.21662788093090057, -0.11816142499446869, -0.06276746094226837, 0.041917189955711365, -0.08823482692241669, -0.16551482677459717, 0.07890044152736664, 0.07077974826097488, -0.18017399311065674, 0.048698000609874725, -0.10840989649295807, -0.018315522000193596, 0.05469031631946564, 0.22125090658664703, -0.08288246393203735, 0.049466878175735474, -0.016659153625369072, 0.007448138669133186, -0.024365033954381943, 0.21565409004688263, 0.07354656606912613, -0.06302843242883682, 0.049692552536726, -0.07315630465745926, -0.16880588233470917, -0.1066267192363739, -0.05771075189113617, -0.1346968114376068, 0.10865627974271774, 0.09443768858909607, 0.14727343618869781, -0.16012625396251678, -0.09086588025093079, 0.030063115060329437, 0.059328362345695496, 0.10685522109270096, -0.13656659424304962, -0.07586991786956787, -0.03776675835251808, -0.02361941523849964, -0.03767458349466324, 0.007080178242176771, -0.16480040550231934, -0.02459614910185337, 0.06954330950975418, -0.004474362824112177, 0.018612589687108994, -0.026600409299135208, 7.521800284848723e-7, 0.010741468518972397, 0.06497953087091446, -0.16215206682682037, -0.03649834170937538, -0.1667364537715912, 0.12594817578792572, -0.023828642442822456, -0.05794889107346535, 0.0431956946849823, 0.0894898921251297, 0.07886327058076859, -0.06535343825817108, 0.06023485213518143, 0.07115726917982101, 0.1950802206993103, -0.13539086282253265, -0.0938369408249855, 0.0877983421087265, -0.1902965009212494, 0.11377181112766266, 0.014446892775595188, 0.09400755167007446, 0.2953783869743347, -0.026923388242721558, 0.03928757458925247, -0.12881965935230255, -0.10946912318468094, 0.029283905401825905, 0.1453719437122345, -0.025484394282102585, 0.137114480137825, 0.004042063839733601, 0.11343067139387131, 0.22750158607959747, 0.0763593316078186, -0.025733228772878647, 0.07710445672273636, 0.06145324930548668, 0.03301732614636421, -0.02084803581237793, -0.029512375593185425, -0.009057439863681793, -0.03251742571592331, -0.08166493475437164, 0.06540326029062271, 0.059764422476291656, -0.09236150979995728, 0.0024785834830254316, -0.016080232337117195, 0.1257862001657486, 0.0846037045121193, -0.028093447908759117, 0.10963448882102966, 0.3261556029319763, -0.06994041055440903, -0.00027233033324591815, -0.04530449956655502, -0.05016592517495155, -0.061171457171440125, 0.08529731631278992, -0.06524595618247986, -0.1440238505601883, -0.09123494476079941, 0.004865854512900114, -0.05415993928909302, -0.17970310151576996, -0.009684862568974495, 2.3239211075069687e-34, 0.019096801057457924, -0.04940492659807205, 0.05737247318029404, -0.07964514940977097, -0.050263579934835434, 0.0635426938533783, -0.030197031795978546, 0.017003506422042847, 0.06806037575006485, -0.12181725353002548, -0.005492602474987507 ]
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.028588777408003807, 0.12526832520961761, -0.04749147593975067, 0.030509740114212036, 0.09942691773176193, 0.06269776076078415, -0.08903437852859497, -0.0006145137012936175, 0.19628190994262695, 0.11042874306440353, -0.0654667541384697, -0.05541190505027771, -0.02737448364496231, -0.15613983571529388, 0.07983646541833878, 0.2532939910888672, 0.04190981760621071, 0.13006187975406647, 0.01170376781374216, -0.06551618874073029, -0.14676843583583832, 0.014195169322192669, 0.008418642915785313, -0.07470779865980148, 0.13650210201740265, 0.013600202277302742, 0.015546292997896671, 0.1566305309534073, 0.13737526535987854, -0.13122764229774475, 0.1440940946340561, -0.05486280098557472, -0.1406182199716568, 0.062378108501434326, 0.000006168455456645461, -0.06749511510133743, 0.11092707514762878, 0.10117039829492569, -0.12540195882320404, -0.17635180056095123, 0.10333772003650665, -0.13227006793022156, -0.10852735489606857, -0.025894735008478165, 0.06158120557665825, -0.03712967038154602, -0.11482492089271545, 0.020488115027546883, 0.03371772915124893, 0.06154961138963699, -0.04680294916033745, 0.17422163486480713, -0.018122389912605286, -0.14439912140369415, 0.05897419899702072, -0.0024086276534944773, 0.03331761062145233, 0.16239474713802338, -0.13657492399215698, -0.18470805883407593, -0.0937495306134224, -0.08951073884963989, -0.1447436511516571, 0.02218892239034176, -0.1395590454339981, -0.08208991587162018, -0.10559607297182083, 0.003838291857391596, 0.04595445096492767, 0.23168174922466278, -0.07329869270324707, 0.11589830368757248, 0.020912479609251022, -0.014129833318293095, 0.010470577515661716, -0.004029945936053991, -0.04862821474671364, 0.10489078611135483, -0.1941554993391037, 0.011610791087150574, -0.17376700043678284, 0.02125227078795433, -0.014266006648540497, 0.06380823999643326, -0.15319320559501648, 0.084534652531147, -0.0020776446908712387, 0.11382488161325455, 0.027648383751511574, -0.09864024072885513, 0.061375703662633896, -0.05579432100057602, -0.19975502789020538, -0.06851546466350555, 0.05107017979025841, 0.02756117470562458, 0.06838119775056839, 0.09455227851867676, 0.1326228827238083, 0.06399902701377869, -0.000788763165473938, 0.07181266695261002, -0.13493932783603668, 0.055594056844711304, 0.015434724278748035, 0.0367623008787632, 0.1327405869960785, -0.04339409992098808, 0.02672255039215088, -0.06873618811368942, -0.07758647203445435, 0.1852801889181137, -0.19638217985630035, -0.07607290893793106, 0.2400551736354828, 0.04581766948103905, 0.09874525666236877, 0.12646417319774628, -0.054306358098983765, 0.13368122279644012, 0.10037994384765625, -0.05061870068311691, 0.02224871516227722, 0.22561430931091309, 0.02956615574657917, -0.00484127551317215, 0.008093084208667278, -0.02492387779057026, -0.08310466259717941, -0.15160255134105682, -0.029020754620432854, -0.16088974475860596, 0.025958513841032982, -0.011227598413825035, 0.10897722095251083, -0.06683371216058731, 0.053558994084596634, 0.0062778606079518795, -0.04080143943428993, -0.03759947791695595, -0.010513209737837315, -0.0814778059720993, -0.1577528417110443, 0.05310731753706932, 0.03578818216919899, -0.02608470246195793, 0.008916712366044521, 0.11594225466251373, -0.03886542096734047, 0.06321710348129272, -0.157509908080101, 0.05299434810876846, -0.2100161463022232, 0.06824681162834167, -0.3207043707370758, -0.06705181300640106, -0.08290241658687592, -0.09189646691083908, -0.17238126695156097, -0.17910796403884888, 0.06281539052724838, -0.10157144069671631, -0.010795538313686848, -0.039596427232027054, 0.08067655563354492, 0.1206953376531601, 0.10654489696025848, -0.04216175898909569, 0.008289248682558537, -0.08599960058927536, 0.012686993926763535, -0.009544079191982746, -0.11112089455127716, -0.14259257912635803, -0.13466516137123108, 0.12481631338596344, 0.10642889142036438, -0.025336893275380135, -0.20600607991218567, 0.10351770371198654, 0.12650713324546814, 0.006727985572069883, -0.08719407767057419, -0.1920386105775833, -0.12489975243806839, 0.026649033650755882, -0.08592373132705688, 0.10295233130455017, -0.029960596933960915, -0.10435604304075241, -0.014293349348008633, 0.08055202662944794, 0.12355849891901016, 0.06666095554828644, -0.03452733904123306, -0.05124133825302124, 0.00908112432807684, -0.05922431871294975, 0.16729801893234253, -0.2510547637939453, -0.035636790096759796, 0.008777681738138199, 0.009250972419977188, 0.09462481737136841, 0.10471494495868683, -0.0341656394302845, -0.20298488438129425, 0.16253067553043365, 0.11134130507707596, -0.15739338099956512, -0.12805558741092682, 0.07975780218839645, -0.18945223093032837, 0.09385378658771515, -0.09767832607030869, 0.05625224858522415, -0.09144971519708633, 0.1250380128622055, -0.07157876342535019, 0.17119011282920837, -0.10909473896026611, 0.05105356499552727, 0.011234204284846783, 0.060771431773900986, -0.10593155771493912, 0.1265534609556198, 0.042769916355609894, -0.0650218054652214, -0.0027351779863238335, 0.03636011853814125, -0.08375320583581924, -0.021440496668219566, 0.04213833436369896, 0.14003194868564606, -0.057302799075841904, -0.04306185990571976, 0.19556745886802673, 0.016417326405644417, 0.22843971848487854, -0.06978527456521988, -0.026107992976903915, 0.19836820662021637, 0.05875050276517868, -0.08046182245016098, -0.07289057224988937, 0.16215530037879944, -0.06270038336515427, 0.07818195223808289, -0.03202561289072037, 0.03605831041932106, 0.17201536893844604, 0.12681500613689423, -0.15625162422657013, 0.06840765476226807, 0.05230851471424103, -0.1056661605834961, 0.09469703584909439, 0.22178973257541656, 0.03733585402369499, -0.09471158683300018, 0.3051816523075104, -0.040220826864242554, 0.0357750728726387, -0.03248745575547218, 0.16175135970115662, -0.13956394791603088, -0.06551682204008102, -0.1165747418999672, 0.12460692971944809, 0.11244719475507736, 0.09794159978628159, 0.002937027020379901, -0.22904087603092194, -0.09143776446580887, 0.003028703620657325, -0.04385758563876152, 0.14747373759746552, -0.008362884633243084, 0.02739621140062809, -0.06746130436658859, -0.22312162816524506, 0.0632149875164032, 0.04960768297314644, -0.06242804229259491, 0.09755878150463104, 0.04400012269616127, -0.0035206798929721117, -0.08831273764371872, -0.17383313179016113, -0.05910816043615341, -0.09723687916994095, -0.014223632402718067, -0.08592137694358826, -0.19486349821090698, 0.0006819424452260137, 0.03212428465485573, -0.10481207072734833, -0.057311706244945526, 0.055962011218070984, -0.11599712818861008, 0.005066958721727133, -0.01608051173388958, 0.04721010848879814, 0.031896620988845825, 0.09736271947622299, 0.060666266828775406, 0.13414911925792694, 0.071127749979496, -0.18954256176948547, -0.03208663687109947, -0.012722903862595558, -0.10016921162605286, 0.0636296346783638, 0.04157359525561333, 0.05593959987163544, 0.11382987350225449, -0.056397922337055206, -0.23018231987953186, 0.08645417541265488, 0.014979183673858643, 0.018570758402347565, 0.19271568953990936, -0.10440004616975784, -0.050087105482816696, 0.06247323006391525, 0.025022564455866814, -0.1018436849117279, -0.06420525908470154, -0.07738827913999557, 0.07399865984916687, 0.031864289194345474, 0.16345690190792084, 0.0170722845941782, -0.19275103509426117, 0.1178923100233078, -0.0935644879937172, -0.19001653790473938, -0.07814320921897888, 0.287175714969635, 0.04116157069802284, -0.11853433400392532, -0.029754498973488808, -0.10943446308374405, 0.017416169866919518, -0.05615588277578354, -0.07370912283658981, 0.006050519645214081, -0.1741928905248642, -0.10382049530744553, 0.01828438602387905, -0.009493350051343441, -0.00036161975003778934, -0.06401389092206955, -0.005278249736875296, -0.04713129997253418, 0.07127518206834793, 0.0789039209485054, 0.12314238399267197, 0.1499015986919403, 0.2408989518880844, -0.08167167007923126, -0.03348309174180031, -0.06825175881385803, 0.1632980853319168, 0.1341755986213684, 0.07026734948158264, 0.08801386505365372, -0.07252971082925797, 0.05812186747789383, -0.034184087067842484, -0.11591960489749908, 0.032046232372522354, 0.11242629587650299, 0.06829793006181717, -0.0435691736638546, -0.029460912570357323, 0.02912161312997341, -0.15604086220264435, 0.07982558757066727, 0.014293840155005455, 0.0023548922035843134, -0.1996915489435196, -0.08345991373062134, 0.09209426492452621, 0.045077767223119736, 0.12756435573101044, -0.04866435006260872, -0.0761566236615181, -0.109466552734375, 0.16472133994102478, 0.11569283157587051, 0.10227921605110168, 0.03905649110674858, 0.0767805278301239, 0.03826010972261429, -0.03768037632107735, 0.3149121403694153, 0.1544925421476364, 0.01088787242770195, 0.01802883669734001, 0.10455954819917679, -0.060434356331825256, -0.15268182754516602, 0.1592629849910736, 0.11532383412122726, 0.09100513905286789, 0.012491174973547459, 0.008227705024182796, 0.05236120522022247, -0.14811763167381287, 0.18815186619758606, -0.07424216717481613, 0.010797282680869102, -0.004373961593955755, 0.15051285922527313, 0.032341014593839645, -0.03654133155941963, -0.09036395698785782, -0.13530616462230682, -0.14413943886756897, -0.04142175242304802, -0.1988207995891571, -0.034643545746803284, 0.20421068370342255, 0.0003474878612905741, 0.051340147852897644, 0.04030424356460571, -0.0664960965514183, 0.209782674908638, 0.009959257207810879, 0.04252617061138153, 0.023581333458423615, 0.05198545753955841, -0.08050453662872314, 0.07295256853103638, -0.08394329249858856, 0.37730297446250916, -0.03585202246904373, -0.055569104850292206, -0.09519349783658981, -0.19528767466545105, -0.1397947072982788, -0.20900702476501465, 0.032218802720308304, -0.07504912465810776, 0.01543655525892973, -0.1345146894454956, -0.041837554425001144, -0.11449465900659561, -0.19716918468475342, -0.10962391644716263, -0.15717273950576782, -0.06638211756944656, -0.05084213986992836, -0.00886327400803566, -0.05743952468037605, 0.06217426434159279, -0.25755441188812256, -0.01709364354610443, 0.07194933295249939, -0.07162882387638092, -0.06529205292463303, -0.12827296555042267, -0.048796504735946655, 0.010494643822312355, 0.053295738995075226, 0.1091526448726654, -0.15547017753124237, -0.04205303639173508, 0.05961097776889801, 0.015066428110003471, 0.08436889201402664, -0.020341278985142708, 0.007567881606519222, 0.13310490548610687, 0.12612313032150269, 0.027426207438111305, 0.07855259627103806, -0.12081028521060944, -0.08161573112010956, 0.25351041555404663, 0.09848332405090332, 0.10785888880491257, -0.07293961197137833, -0.02488948591053486, 0.02442759834229946, 0.08037516474723816, -0.0461476668715477, -0.16519653797149658, -0.001624617143534124, 0.10328579694032669, -0.09182717651128769, 0.11278555542230606, 0.1251341551542282, 0.055645231157541275, 0.020421449095010757, -0.10792026668787003, 0.04882998391985893, 0.09946828335523605, 0.07336137443780899, 0.10411086678504944, -0.15310785174369812, 0.079783596098423, -0.08296453207731247, 0.05733778327703476, -0.13297578692436218, 0.09738747030496597, -0.04638396203517914, 0.022199098020792007, -0.09913304448127747, -0.049896564334630966, 0.008022251538932323, -0.12963348627090454, -0.05783088877797127, 0.09907714277505875, -0.11701584607362747, 0.044660184532403946, 0.020445212721824646, 0.11651395261287689, 0.12169330567121506, 0.06199141591787338, -0.13966038823127747, 0.013310093432664871, -0.0747906044125557, 0.10247793793678284, 0.12507158517837524, -0.03681197389960289, 0.04385988414287567, 0.23478202521800995, -0.0022044233046472073, -0.01834542118012905, 0.09692564606666565, 0.2573148012161255, 0.029231920838356018, -0.02144814096391201, 0.025720763951539993, 0.10093449056148529, 0.011147632263600826, -0.045988570898771286, -0.009907443076372147, 0.0853981226682663, -0.12357635051012039, 0.029595879837870598, 0.11654659360647202, 0.19425185024738312, 0.17966055870056152, -0.011148831807076931, -0.014312449842691422, -0.015506046824157238, -0.05979118123650551, 0.007966280914843082, -0.027075868099927902, 0.006053019780665636, -0.011490191332995892, 0.025853652507066727, -2.5251634628474396e-32, 0.03703087568283081, -0.053333722054958344, -0.06816282868385315, -0.16832707822322845, -0.1197686716914177, -0.01620938628911972, -0.007479666266590357, -0.01799173280596733, -0.10101085901260376, -0.03709927946329117, -0.04246164485812187, -0.02961219660937786, 0.05506247654557228, -0.023588145151734352, -0.1956276297569275, -0.10086269676685333, -0.020222153514623642, -0.052519019693136215, -0.07170650362968445, 0.05156422033905983, -0.007645244710147381, 0.12673088908195496, 0.07210665196180344, -0.03854820877313614, 0.03311249241232872, -0.1133127510547638, -0.007372058462351561, -0.2554129958152771, 0.060690250247716904, 0.06567133963108063, -0.10141512006521225, 0.14386437833309174, -0.025420857593417168, 0.044410645961761475, 0.001642010291106999, -0.13831698894500732, -0.22090592980384827, -0.00224339053966105, 0.012614240869879723, 0.03566506877541542, 0.11469027400016785, 0.06613568216562271, 0.03620949015021324, -0.23521679639816284, -0.016472678631544113, 0.06003439798951149, 0.0409235879778862, -0.10354632139205933, -0.18607911467552185, -0.013106387108564377, 0.13237005472183228, 0.005640680436044931, 0.009523726999759674, -0.09020248800516129, 0.03147778660058975, 0.033503416925668716, -0.0018560884054750204, -0.003978009335696697, -0.10434609651565552, 0.02810574881732464, 0.14972832798957825, -0.06105075404047966, 0.05783772096037865, -0.13813817501068115, 0.0824321061372757, 0.08790505677461624, 0.26231274008750916, -0.07804270088672638, 0.04584444686770439, -0.1014212891459465, 0.13749553263187408, 0.06814423948526382, -0.10213547199964523, 0.014276881702244282, -0.0011591025395318866, -0.08204647898674011, -0.17582614719867706, 0.061048153787851334, 0.018402138724923134, -0.04273990914225578, 0.07072068750858307, -0.09871730953454971, -0.06194014474749565, 0.0434168316423893, -0.06463511288166046, -0.05002075806260109, -0.07531409710645676, 0.02370268665254116, -0.086491659283638, -0.17408746480941772, 0.011077044531702995, -0.07861275225877762, -0.08670388162136078, -0.1404281109571457, -0.15342214703559875, 0.08505893498659134, -0.1629105508327484, -0.0244407020509243, -0.10220115631818771, 0.06755126267671585, 0.034970223903656006, -0.00006853214290458709, 0.09256742149591446, 0.010002395138144493, 0.03588408604264259, 0.05673268809914589, 0.1403542160987854, -0.0020952941849827766, -0.1152280941605568, 0.03663220629096031, 0.02831321395933628, 0.08132649213075638, 0.14629200100898743, 0.11466848850250244, 0.2703281342983246, -0.03326691687107086, 0.005807569250464439, -0.05453744903206825, 0.1357390582561493, 0.017367923632264137, -0.09967762231826782, 0.15688878297805786, -0.014319172129034996, -0.0068167466670274734, -0.032979872077703476, 0.25137361884117126, -0.1663106381893158, 0.05050354450941086, -0.09625116735696793, 0.0830889642238617, 0.09559588134288788, -0.026689603924751282, 7.887951483098732e-7, -0.3210330903530121, 0.13426518440246582, -0.09817361831665039, -0.05903942137956619, 0.0709819495677948, -0.0959017425775528, -0.3152165412902832, -0.033018674701452255, 0.025221560150384903, 0.1539137065410614, 0.12992294132709503, -0.0038583874702453613, -0.03492464870214462, 0.08645133674144745, 0.0625281035900116, -0.032915402203798294, -0.08589629083871841, 0.00496430229395628, -0.013762060552835464, -0.04876347631216049, 0.0935031920671463, 0.07135271281003952, -0.09715984016656876, -0.023869909346103668, 0.026364851742982864, -0.11828327178955078, 0.06315986067056656, -0.11912224441766739, 0.06608209758996964, 0.07126056402921677, 0.04845533147454262, 0.04324904829263687, 0.00906891468912363, 0.18855610489845276, 0.07344283163547516, -0.0333884172141552, -0.14260992407798767, -0.053834687918424606, 0.13850639760494232, 0.14678001403808594, 0.045977164059877396, 0.07170041650533676, 0.14270658791065216, 0.0037177277263253927, 0.23419328033924103, 0.08587893843650818, -0.06304474920034409, -0.1220058724284172, 0.05292007327079773, -0.06413256376981735, -0.02442028373479843, 0.0007268867921084166, -0.028294138610363007, 0.035762183368206024, 0.09313521534204483, 0.04594380781054497, -0.020666273310780525, -0.10881369560956955, 0.027325596660375595, 0.018328111618757248, -0.08834709227085114, -0.08638174831867218, 0.20344461500644684, -0.09433674067258835, 0.1041577085852623, -0.24722996354103088, 0.01596616767346859, 1.2063532586244063e-34, 0.10770206898450851, -0.09208826720714569, 0.09841986745595932, -0.23759783804416656, 0.06424875557422638, -0.056359775364398956, -0.05027579888701439, -0.1441536247730255, 0.015028158202767372, -0.14860409498214722, -0.047029126435518265 ]
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.2355412095785141, 0.0340527668595314, -0.014116215519607067, -0.025459351018071175, 0.142476886510849, -0.014150429517030716, 0.11744628101587296, -0.012345176190137863, -0.15184760093688965, 0.08137615770101547, -0.06350512057542801, -0.017116153612732887, -0.04562697932124138, 0.0592033788561821, -0.04824255779385567, 0.05885042995214462, 0.02427310310304165, -0.03732196241617203, 0.03308285027742386, -0.07940786331892014, -0.16904787719249725, 0.11896973848342896, 0.049385637044906616, -0.056560445576906204, 0.0127378785982728, -0.09787708520889282, -0.1123572438955307, 0.03360548987984657, -0.017063550651073456, -0.17509958148002625, 0.15334466099739075, 0.08449510484933853, -0.13300718367099762, 0.15261682868003845, 0.000004821646143682301, 0.07994287461042404, 0.15254780650138855, -0.0588124580681324, -0.19902871549129486, -0.06093320995569229, 0.04103550687432289, 0.08715365827083588, 0.04421475902199745, -0.058797821402549744, -0.03371306136250496, -0.14195135235786438, -0.24029313027858734, -0.039327166974544525, 0.16225360333919525, 0.09183163940906525, 0.02473974972963333, 0.07869558781385422, 0.15765948593616486, -0.1127464696764946, 0.10538801550865173, -0.06963871419429779, 0.061068661510944366, 0.14249631762504578, -0.09796128422021866, -0.062374524772167206, 0.07384493201971054, -0.03653150796890259, -0.010555103421211243, 0.12026005983352661, 0.032321639358997345, -0.05390194058418274, -0.08288432657718658, -0.19598641991615295, -0.004156731069087982, 0.19058212637901306, -0.02203044481575489, -0.017849573865532875, -0.008640573360025883, -0.0178894754499197, -0.10645301640033722, -0.06422349810600281, 0.04340485855937004, 0.10742920637130737, -0.06779731810092926, 0.03703445941209793, -0.12337581068277359, -0.003993174061179161, 0.06464649736881256, -0.03208618983626366, -0.13596868515014648, -0.19143353402614594, -0.16668973863124847, 0.3010611832141876, -0.007920270785689354, -0.21851573884487152, 0.15722085535526276, -0.1008753851056099, -0.1383746862411499, 0.03092689998447895, -0.12408465892076492, -0.004924347158521414, -0.10401345789432526, -0.07344512641429901, -0.025945458561182022, -0.11712175607681274, -0.10639895498752594, -0.25114887952804565, -0.12027490884065628, 0.03091733157634735, 0.056373998522758484, 0.025974102318286896, -0.08699112385511398, 0.15617577731609344, 0.18657054007053375, -0.04602767899632454, -0.19565069675445557, 0.021956482902169228, -0.09085001796483994, -0.08088433742523193, 0.24708518385887146, 0.057555072009563446, 0.26586291193962097, 0.10143225640058517, 0.11698121577501297, 0.20929257571697235, -0.07756514102220535, -0.04107405245304108, -0.036556094884872437, 0.21767522394657135, 0.18637125194072723, -0.12745638191699982, 0.06768349558115005, 0.0664777085185051, 0.015014966018497944, -0.012608636170625687, -0.009902115911245346, -0.04975153133273125, 0.10528077930212021, -0.056500036269426346, 0.26379498839378357, -0.22512994706630707, 0.0922674611210823, 0.09664561599493027, 0.028023788705468178, -0.020387163385748863, -0.005491279531270266, -0.17190296947956085, -0.14249441027641296, -0.0030482239089906216, 0.04028595983982086, 0.07297959923744202, 0.05151863768696785, -0.06427788734436035, -0.04783698916435242, 0.05746912956237793, -0.28986385464668274, 0.12115192413330078, -0.13157398998737335, 0.16525083780288696, 0.07205605506896973, 0.055976323783397675, 0.12727166712284088, -0.1485869139432907, -0.17199313640594482, -0.05559839680790901, 0.03397021070122719, -0.021387673914432526, 0.062390223145484924, -0.14767640829086304, 0.14867852628231049, 0.12419010698795319, 0.21648550033569336, 0.021239662542939186, -0.026749128475785255, -0.02038460411131382, -0.08504723757505417, 0.11195836961269379, -0.10941392928361893, 0.0640408992767334, -0.22008515894412994, 0.10863229632377625, 0.01974015310406685, 0.0008051395416259766, -0.22061695158481598, -0.01721818372607231, 0.025702444836497307, -0.2260296493768692, -0.14618252217769623, -0.17568399012088776, 0.19207653403282166, -0.07106488943099976, -0.07144538313150406, -0.08948465436697006, -0.06919904053211212, -0.030441412702202797, -0.10002811253070831, 0.12839068472385406, -0.013512047939002514, -0.059392571449279785, 0.12090437859296799, -0.02277529425919056, 0.07596119493246078, -0.06109039485454559, -0.029372896999120712, -0.16965673863887787, -0.07563421130180359, -0.029301345348358154, 0.01625591330230236, 0.003972443286329508, 0.026747507974505424, 0.13895025849342346, -0.15399202704429626, 0.22283875942230225, -0.11660712212324142, -0.21521839499473572, -0.09981930255889893, -0.056485533714294434, 0.14855405688285828, 0.12367820739746094, -0.16680368781089783, 0.14762580394744873, -0.03796480968594551, -0.01929752714931965, 0.00870052631944418, 0.14566169679164886, 0.008386044763028622, 0.07390851527452469, -0.015720395371317863, -0.09078159183263779, 0.0181315578520298, 0.07082948088645935, -0.16130231320858002, -0.07847502827644348, -0.10232505947351456, 0.06224152073264122, -0.09615261852741241, 0.0008067280286923051, -0.021701646968722343, 0.0709930881857872, -0.11104384809732437, -0.1713332235813141, 0.039681315422058105, -0.13069820404052734, 0.1614975929260254, -0.18104788661003113, -0.09399869292974472, 0.08755180239677429, 0.04079476371407509, -0.04451800510287285, -0.006842500995844603, 0.147675558924675, -0.03556302562355995, 0.19594162702560425, -0.05958011373877525, -0.17431794106960297, 0.059340741485357285, 0.04619825258851051, -0.03461986035108566, 0.13328656554222107, 0.02032151073217392, -0.19166086614131927, 0.05619237199425697, 0.23542386293411255, -0.03697299212217331, 0.0065321787260472775, 0.17252084612846375, -0.04601109027862549, -0.01947370357811451, -0.12467694282531738, 0.08931025117635727, -0.022357061505317688, 0.04623936116695404, 0.21552243828773499, -0.0649096816778183, 0.09494883567094803, 0.10269120335578918, 0.009420604445040226, -0.025662679225206375, -0.12455719709396362, 0.027369113638997078, -0.12874697148799896, -0.06868026405572891, -0.037219204008579254, -0.04717288538813591, -0.059573784470558167, -0.03924171254038811, 0.033862628042697906, 0.07016623765230179, -0.08209632337093353, 0.01829068548977375, 0.07271192967891693, -0.14007535576820374, -0.09894166141748428, -0.08217447251081467, 0.2413686066865921, 0.014608452096581459, -0.03869476914405823, -0.015176777727901936, -0.259014368057251, 0.05186506733298302, -0.061369091272354126, -0.10937940329313278, -0.06194104254245758, -0.14670588076114655, 0.12768538296222687, -0.06345285475254059, 0.020076032727956772, 0.09319568425416946, -0.12559100985527039, 0.13552401959896088, 0.02022828347980976, 0.2521459758281708, 0.18818466365337372, 0.04004604369401932, -0.1593751162290573, 0.04610063508152962, -0.12621136009693146, 0.09717360883951187, 0.1578352302312851, 0.10840500891208649, 0.10853085666894913, -0.04831921309232712, -0.18483467400074005, 0.11083003133535385, 0.049774207174777985, -0.0270049087703228, 0.02220805361866951, -0.17652584612369537, -0.01434397790580988, -0.04213891923427582, -0.020662663504481316, -0.07564756274223328, 0.04765656590461731, 0.04193832352757454, -0.12365034222602844, -0.017798421904444695, 0.12629334628582, -0.1761804074048996, -0.1502162367105484, 0.012283092364668846, -0.029204994440078735, -0.2018626481294632, -0.012490377761423588, 0.14612899720668793, 0.12299002707004547, -0.02524140290915966, 0.016538625583052635, -0.1176297515630722, -0.024346070364117622, 0.13465100526809692, -0.1834976226091385, 0.19296403229236603, -0.11087901145219803, 0.23391643166542053, 0.016338925808668137, -0.030428064987063408, 0.11717775464057922, 0.01866934634745121, -0.10607454180717468, -0.07332932949066162, 0.1016351729631424, -0.1596619337797165, 0.03311781585216522, -0.12018819153308868, 0.05774274840950966, 0.03986707329750061, -0.04198085144162178, 0.14972834289073944, 0.15600185096263885, -0.06453985720872879, 0.1811186820268631, 0.023627573624253273, 0.00645490363240242, -0.02093159407377243, -0.24993792176246643, -0.07229360193014145, 0.11226136982440948, 0.05523804947733879, -0.014000218361616135, -0.016205398365855217, -0.22631338238716125, 0.07657358050346375, -0.06238223984837532, -0.13298417627811432, -0.06332945078611374, 0.059907715767621994, -0.09783473610877991, 0.002142229350283742, -0.11009818315505981, 0.03543708473443985, 0.009027140215039253, 0.1336495280265808, -0.093124158680439, -0.11398053169250488, -0.056373242288827896, 0.10057193040847778, 0.01619359478354454, -0.09413664788007736, 0.12766976654529572, 0.00514708086848259, -0.1928156167268753, 0.011251847259700298, 0.16662795841693878, 0.048579514026641846, 0.09030120819807053, -0.014908417128026485, 0.383163720369339, -0.08707938343286514, 0.19535301625728607, 0.1272062212228775, 0.0066580637358129025, 0.10707119852304459, -0.07473740726709366, 0.052651528269052505, 0.0996546819806099, 0.10204670578241348, 0.01214017253369093, 0.04902661219239235, 0.04199421405792236, 0.04460256174206734, -0.03474845737218857, -0.06604936718940735, -0.21757450699806213, -0.03370914235711098, -0.17770372331142426, -0.30074983835220337, -0.17580293118953705, 0.06515656411647797, 0.07109329104423523, -0.058452971279621124, 0.08964228630065918, 0.01823446713387966, -0.012321459129452705, 0.14045272767543793, 0.11870840936899185, 0.11614542454481125, 0.1284717321395874, 0.21050617098808289, 0.1569443941116333, 0.13298289477825165, -0.04844899848103523, 0.3909812867641449, -0.02800137735903263, 0.032681845128536224, -0.08344188332557678, -0.09466665238142014, -0.09364449977874756, 0.15549223124980927, -0.13663801550865173, 0.09556414186954498, -0.10917966812849045, 0.027471845969557762, -0.0074664014391601086, 0.027017654851078987, -0.037035778164863586, -0.24975846707820892, -0.08487788587808609, -0.08505082875490189, -0.1177283227443695, 0.049848269671201706, -0.05158979073166847, 0.10659678280353546, -0.09175679832696915, -0.0427258238196373, 0.19557052850723267, -0.13835224509239197, 0.017247814685106277, -0.10360996425151825, 0.11674512177705765, -0.03391658142209053, -0.15560054779052734, 0.1046748161315918, -0.011601359583437443, 0.05497458577156067, -0.08970759809017181, -0.08393573015928268, 0.1263464093208313, -0.054334599524736404, -0.1320614069700241, 0.15444137156009674, -0.023589879274368286, 0.04400595650076866, -0.04687643423676491, -0.04256322979927063, -0.0003400494169909507, 0.11772718280553818, 0.013123322278261185, 0.07646078616380692, 0.031856466084718704, -0.019743146374821663, 0.04710538312792778, 0.35640865564346313, -0.00900054257363081, 0.09814227372407913, 0.011157376691699028, -0.2020549178123474, -0.15195906162261963, -0.05774960666894913, -0.02424653060734272, 0.06183292344212532, -0.04632283374667168, 0.005441793706268072, 0.10794501006603241, -0.006692648399621248, 0.18682381510734558, 0.05392330512404442, -0.13897168636322021, 0.08264539390802383, 0.012395942583680153, 0.013501632027328014, -0.21934297680854797, 0.061734918504953384, -0.09263578802347183, 0.05083379149436951, -0.22151705622673035, -0.13360244035720825, 0.007577346172183752, -0.26485636830329895, -0.15937335789203644, 0.10183459520339966, -0.3440437912940979, 0.00010615970677463338, 0.06940435618162155, 0.002928625326603651, 0.0777294710278511, 0.058944929391145706, -0.11423902958631516, -0.10962837934494019, 0.050395309925079346, 0.11124961078166962, -0.057374440133571625, -0.015536859631538391, 0.06565307080745697, 0.12872885167598724, 0.22987617552280426, 0.062463972717523575, 0.18057961761951447, 0.12876535952091217, 0.008529433980584145, -0.1817232221364975, 0.1902274340391159, 0.22901085019111633, -0.23787125945091248, 0.09474026411771774, -0.20738613605499268, 0.11914379894733429, -0.06346804648637772, 0.0007100559305399656, 0.18777723610401154, 0.26193687319755554, 0.13270702958106995, 0.1141682043671608, 0.05012183263897896, -0.16283048689365387, -0.029779527336359024, 0.15438337624073029, 0.15641044080257416, 0.13333313167095184, -0.04833189398050308, 0.15429401397705078, -2.4763645781145786e-32, 0.09556546807289124, -0.025233564898371696, -0.09792430698871613, -0.021027253940701485, -0.19748377799987793, 0.02067839540541172, -0.1763870120048523, -0.05219751223921776, -0.16938798129558563, -0.13103200495243073, 0.030156943947076797, 0.1910131871700287, 0.1234874427318573, -0.08136481046676636, 0.01783965900540352, -0.09167242050170898, 0.0007459829794242978, 0.17531074583530426, 0.14686641097068787, 0.15997102856636047, 0.006970229558646679, 0.0705111101269722, 0.1611986756324768, 0.021012812852859497, -0.030361361801624298, -0.10192959010601044, -0.12072998285293579, -0.06253182888031006, 0.025516847148537636, -0.013465345837175846, 0.03608109802007675, 0.13080337643623352, -0.01138156745582819, -0.003099415684118867, -0.14285853505134583, -0.19427157938480377, -0.06866376847028732, -0.11782162636518478, -0.22855590283870697, 0.06023167073726654, 0.13974805176258087, -0.048470448702573776, 0.2401636391878128, -0.25110718607902527, -0.06260493397712708, 0.11486183851957321, -0.048175688832998276, 0.08589333295822144, -0.1578626185655594, -0.12059132754802704, 0.053164079785346985, 0.007952360436320305, 0.06686735153198242, 0.17268836498260498, -0.0922781452536583, -0.23892125487327576, -0.1546442061662674, 0.095184326171875, -0.04376968368887901, 0.059835273772478104, 0.20953060686588287, 0.007108181249350309, -0.05270301178097725, 0.002486421959474683, 0.07898864150047302, -0.006892908830195665, 0.3766475319862366, -0.10928741097450256, 0.17112436890602112, -0.10183735936880112, 0.06335125863552094, 0.0982939824461937, 0.0408918596804142, 0.07986749708652496, -0.03559957072138786, -0.0007335171103477478, 0.010242629796266556, 0.06662070751190186, -0.05410522222518921, -0.08974338322877884, 0.009489480406045914, 0.08923817425966263, 0.05405645817518234, 0.014409292489290237, -0.1570400893688202, -0.06586188822984695, -0.03863975778222084, 0.036499034613370895, 0.030473558232188225, -0.11854293197393417, 0.12463770806789398, 0.10810961574316025, -0.12846310436725616, -0.2776961326599121, -0.10743099451065063, 0.16333617269992828, 0.026437610387802124, 0.13134576380252838, -0.1344524323940277, -0.041137680411338806, 0.1920921355485916, -0.03683404624462128, -0.002796534216031432, 0.030093027278780937, 0.17082485556602478, -0.009092728607356548, -0.09390924125909805, 0.15344330668449402, -0.0792865976691246, 0.01661749929189682, 0.09112069755792618, -0.10258471220731735, 0.10196391493082047, 0.021807368844747543, 0.1042596697807312, -0.1056235134601593, 0.08851762861013412, -0.16479171812534332, 0.1742381602525711, 0.12115314602851868, 0.08427794277667999, -0.023060208186507225, -0.14512936770915985, 0.03936557471752167, -0.03270822390913963, 0.06281045079231262, -0.11844909936189651, -0.014574088156223297, 0.019892489537596703, -0.05442093312740326, 0.03664734959602356, 0.0119298892095685, 7.055492119434348e-7, -0.18041138350963593, 0.1857740879058838, 0.026978684589266777, -0.05544990301132202, -0.06435329467058182, 0.023299572989344597, -0.14524400234222412, 0.03435434773564339, -0.34476375579833984, 0.06477385759353638, 0.057177022099494934, 0.08615950495004654, -0.005970754195004702, 0.00187517364975065, 0.190305694937706, -0.03774794563651085, -0.02641438879072666, 0.17360982298851013, -0.18544284999370575, 0.1855449676513672, 0.13006068766117096, 0.04500540345907211, 0.11530906707048416, -0.05769011378288269, 0.14322811365127563, -0.015690140426158905, -0.26768413186073303, -0.14024889469146729, 0.14821843802928925, 0.10646462440490723, -0.14095963537693024, -0.03294839709997177, 0.09215933084487915, 0.02105056867003441, 0.04136637970805168, -0.039686378091573715, 0.008382921107113361, -0.0830085352063179, -0.06380580365657806, -0.10286485403776169, 0.08393018692731857, -0.06761282682418823, -0.04131593555212021, -0.18475937843322754, 0.07650649547576904, 0.11630932241678238, -0.019872810691595078, 0.0007476339233107865, 0.10778368264436722, 0.051691193133592606, 0.027212820947170258, 0.10782632231712341, 0.07655790448188782, 0.2102617770433426, -0.0705704391002655, 0.09106694906949997, -0.023584146052598953, -0.06822119653224945, 0.042357444763183594, -0.05569387227296829, 0.011073289439082146, 0.00733854528516531, 0.0044948626309633255, 0.15099701285362244, 0.12434380501508713, -0.16379041969776154, 0.07423277199268341, 5.920187887205625e-35, -0.056424859911203384, -0.022266261279582977, 0.08909197151660919, -0.22871075570583344, -0.059512872248888016, -0.06251706928014755, 0.19340774416923523, -0.07015279680490494, -0.05319955572485924, -0.19132079184055328, -0.1204717829823494 ]
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.21471790969371796, 0.02661970444023609, -0.02240428887307644, -0.03884560987353325, 0.15910902619361877, -0.03702007979154587, 0.1038593053817749, -0.0008408112917095423, -0.14471936225891113, 0.09673731029033661, -0.05036149173974991, -0.02473907731473446, -0.07225926965475082, 0.04336847737431526, -0.053807582706213, 0.08739330619573593, 0.019255055114626884, -0.016912510618567467, 0.024633055552840233, -0.06545291841030121, -0.14768080413341522, 0.13584275543689728, 0.06970660388469696, -0.07624975591897964, 0.013036355376243591, -0.11598064005374908, -0.10097474604845047, 0.011952853761613369, 0.0067406343296170235, -0.20852160453796387, 0.1665370911359787, 0.0893637016415596, -0.12466488033533096, 0.1547655165195465, 0.000004921061190543696, 0.07120499014854431, 0.16427703201770782, -0.07159233093261719, -0.1833602786064148, -0.0394686721265316, 0.050930462777614594, 0.08498518913984299, 0.02108239009976387, -0.05757063254714012, -0.04357393831014633, -0.14168328046798706, -0.22901520133018494, -0.0435614250600338, 0.14963605999946594, 0.1039431244134903, 0.036245692521333694, 0.06002550199627876, 0.1465536206960678, -0.12301041930913925, 0.10837367922067642, -0.0755932480096817, 0.052833814173936844, 0.123026043176651, -0.11354149878025055, -0.05222610756754875, 0.041285425424575806, -0.03958362340927124, -0.0023459873627871275, 0.12092180550098419, -0.0022291988134384155, -0.037473272532224655, -0.0672350525856018, -0.15504898130893707, 0.015689309686422348, 0.22239667177200317, -0.03858911618590355, -0.0067637525498867035, -0.01372005045413971, -0.04354147985577583, -0.07492627203464508, -0.0680839940905571, 0.049473293125629425, 0.1567416936159134, -0.08643297851085663, 0.06584261357784271, -0.1164344772696495, 0.0032539176754653454, 0.10061603784561157, -0.02089528739452362, -0.1049712747335434, -0.19880947470664978, -0.18449631333351135, 0.3196180462837219, -0.006834264844655991, -0.2174166589975357, 0.15774965286254883, -0.04451055824756622, -0.17234650254249573, 0.007039290387183428, -0.11030371487140656, -0.002763770753517747, -0.08900830149650574, -0.10513840615749359, -0.029705116525292397, -0.11501366645097733, -0.11050283908843994, -0.25186440348625183, -0.12334787100553513, 0.009949460625648499, 0.03184215724468231, 0.01711139641702175, -0.08609973639249802, 0.14301718771457672, 0.19499310851097107, -0.06514352560043335, -0.2072533816099167, 0.012356048449873924, -0.10230976343154907, -0.08269903063774109, 0.23009000718593597, 0.05624761804938316, 0.25390368700027466, 0.09240654855966568, 0.08901486545801163, 0.19172289967536926, -0.07552075386047363, -0.023199478164315224, -0.02729525975883007, 0.24911890923976898, 0.20390649139881134, -0.10224800556898117, 0.07726169377565384, 0.08201900124549866, -0.010016604326665401, 0.009371153078973293, -0.004530658479779959, -0.0031488838139921427, 0.09324672818183899, -0.043057557195425034, 0.23204976320266724, -0.23512138426303864, 0.08185082674026489, 0.07327760756015778, 0.026633141562342644, -0.041152019053697586, 0.015122705139219761, -0.1465166062116623, -0.09094265848398209, -0.0020734346471726894, 0.06243616342544556, 0.04421725496649742, 0.09573103487491608, -0.09973077476024628, -0.006465924438089132, 0.026147492229938507, -0.2803153693675995, 0.14438240230083466, -0.1553015559911728, 0.15293125808238983, 0.07428048551082611, 0.04421941190958023, 0.12561820447444916, -0.1368209272623062, -0.1708008497953415, -0.050623081624507904, 0.042137835174798965, 0.03103950433433056, 0.034319907426834106, -0.13568449020385742, 0.13741625845432281, 0.1016489714384079, 0.209365114569664, -0.0023299925960600376, -0.03380729630589485, -0.011618425138294697, -0.04513319954276085, 0.10115610808134079, -0.11597965657711029, 0.0602496974170208, -0.2535809576511383, 0.07784797251224518, 0.010337505489587784, 0.018157532438635826, -0.2248787134885788, -0.0020021130330860615, 0.01992672123014927, -0.28062132000923157, -0.15320493280887604, -0.1559678316116333, 0.1721723973751068, -0.08583243936300278, -0.07653965801000595, -0.11481454223394394, -0.06654493510723114, 0.004462122451514006, -0.06318385154008865, 0.11257488280534744, -0.009555635042488575, -0.07795463502407074, 0.08833365142345428, -0.018460094928741455, 0.08003756403923035, -0.0627640038728714, -0.00044444898958317935, -0.182279571890831, -0.06452767550945282, -0.02837272547185421, 0.005846040323376656, 0.008709409274160862, 0.03629203885793686, 0.09897331148386002, -0.13409647345542908, 0.21387790143489838, -0.11252129077911377, -0.1927197426557541, -0.08442654460668564, -0.05441727116703987, 0.14681178331375122, 0.12079422920942307, -0.15928679704666138, 0.12174276262521744, -0.013163832016289234, -0.022037310525774956, 0.02241957187652588, 0.12473682314157486, 0.031517717987298965, 0.06021692976355553, 0.01229770015925169, -0.09691620618104935, 0.0018383192364126444, 0.06734068691730499, -0.1524282544851303, -0.08580976724624634, -0.07575735449790955, 0.08026228845119476, -0.12182093411684036, -0.0022741416469216347, -0.024563055485486984, 0.08265922963619232, -0.13395832479000092, -0.17920279502868652, 0.04790046066045761, -0.16083869338035583, 0.16575764119625092, -0.21067465841770172, -0.12382806092500687, 0.10449812561273575, 0.019179444760084152, -0.029655326157808304, -0.014929459430277348, 0.12723426520824432, -0.025269150733947754, 0.18723073601722717, -0.03671514615416527, -0.15508434176445007, 0.08489196002483368, 0.05079507827758789, -0.038459256291389465, 0.11851251870393753, 0.009122875519096851, -0.19643443822860718, 0.05876106768846512, 0.21067294478416443, -0.0195869579911232, 0.01856735721230507, 0.19776377081871033, -0.02893908880650997, 0.017964772880077362, -0.1174205094575882, 0.11589246243238449, -0.012600314803421497, 0.039455313235521317, 0.1821182817220688, -0.0748419463634491, 0.08354968577623367, 0.08218219876289368, -0.0011254214914515615, -0.044322118163108826, -0.0927995964884758, 0.03816472366452217, -0.13567037880420685, -0.07218645513057709, -0.0418969951570034, -0.05282733961939812, -0.05762609466910362, -0.07277002185583115, 0.037748292088508606, 0.07528457790613174, -0.08650078624486923, 0.0284561887383461, 0.06460639089345932, -0.14959630370140076, -0.05984947085380554, -0.09251078218221664, 0.21542759239673615, 0.03139285743236542, -0.04605667293071747, -0.006879742722958326, -0.23427517712116241, 0.05564633384346962, -0.06656196713447571, -0.09255192428827286, -0.08956418931484222, -0.10336878895759583, 0.08829954266548157, -0.05368809029459953, 0.02244262769818306, 0.10199487209320068, -0.14698028564453125, 0.11723189800977707, -0.005778330843895674, 0.2630724012851715, 0.18863508105278015, 0.040913764387369156, -0.17603681981563568, 0.04228394851088524, -0.11767926067113876, 0.10463924705982208, 0.16349361836910248, 0.11357320100069046, 0.13912631571292877, -0.04758516326546669, -0.170404314994812, 0.10442028194665909, 0.05110759288072586, -0.03022802621126175, 0.04161541163921356, -0.15666945278644562, 0.021114084869623184, -0.04042068123817444, 0.0037718629464507103, -0.057226959615945816, 0.010237121023237705, 0.03923840820789337, -0.1600402593612671, -0.010500652715563774, 0.13196630775928497, -0.1773887574672699, -0.17380757629871368, 0.007747527211904526, -0.0333576463162899, -0.19077320396900177, 0.01650344766676426, 0.14365050196647644, 0.09843103587627411, 0.0033029092010110617, 0.03955555334687233, -0.13903847336769104, -0.029277998954057693, 0.1111825481057167, -0.1540670245885849, 0.17868462204933167, -0.12245478481054306, 0.20465601980686188, -0.009068085812032223, -0.0581752210855484, 0.11722970008850098, 0.018823284655809402, -0.09788285940885544, -0.08959512412548065, 0.12178871780633926, -0.14858266711235046, 0.03368924558162689, -0.09593289345502853, 0.007800422143191099, 0.053117647767066956, -0.03668244928121567, 0.13137654960155487, 0.1307801455259323, -0.09478642046451569, 0.18650074303150177, -0.012682073749601841, 0.014919388107955456, -0.02593257650732994, -0.2564600110054016, -0.10150996595621109, 0.09602117538452148, 0.06376270949840546, 0.023878643289208412, -0.03096453845500946, -0.2130083441734314, 0.0794878676533699, -0.08801169693470001, -0.0859866514801979, -0.07109041512012482, 0.05654900521039963, -0.07993249595165253, -0.038064438849687576, -0.10262235999107361, 0.04561430588364601, 0.042399659752845764, 0.10578654706478119, -0.09401949495077133, -0.10828536003828049, -0.09318673610687256, 0.15517684817314148, 0.05289812758564949, -0.0909218117594719, 0.12717655301094055, -0.0017358645563945174, -0.20175357162952423, 0.042785465717315674, 0.16361914575099945, 0.07544905692338943, 0.05558467283844948, -0.04773052781820297, 0.3622165620326996, -0.07391159236431122, 0.2001272290945053, 0.09486942738294601, 0.03764672577381134, 0.10381218045949936, -0.09453475475311279, 0.04732294753193855, 0.07901305705308914, 0.1013953760266304, 0.027449671179056168, 0.08130298554897308, 0.06280756741762161, 0.0790916234254837, -0.059380579739809036, -0.056235648691654205, -0.19205927848815918, -0.08671992272138596, -0.18274453282356262, -0.3294371962547302, -0.16234451532363892, 0.09598161280155182, 0.06852956116199493, -0.057645246386528015, 0.0669906735420227, -0.006556507665663958, -0.02243134193122387, 0.13758398592472076, 0.0810946449637413, 0.09723718464374542, 0.14750635623931885, 0.16991989314556122, 0.13434937596321106, 0.13190758228302002, -0.050590090453624725, 0.40669122338294983, -0.010546955280005932, 0.004428453743457794, -0.0722108855843544, -0.09859208017587662, -0.1358838677406311, 0.10597731173038483, -0.14783063530921936, 0.11537569761276245, -0.07929173111915588, -0.0046343496069312096, -0.033185653388500214, 0.03760319948196411, -0.06470434367656708, -0.21469749510288239, -0.10753509402275085, -0.08478742092847824, -0.1262182742357254, 0.06549663096666336, -0.03385718911886215, 0.1338641494512558, -0.06373786926269531, -0.02878507599234581, 0.17760244011878967, -0.13217052817344666, 0.005102785769850016, -0.12129144370555878, 0.12744460999965668, -0.031524237245321274, -0.13018102943897247, 0.11703886091709137, -0.015430260449647903, 0.07421007007360458, -0.0654827430844307, -0.08924997597932816, 0.11557094007730484, -0.050753459334373474, -0.10923125594854355, 0.15503640472888947, -0.021547552198171616, 0.056121788918972015, -0.04853064939379692, -0.04297441244125366, 0.0007535110344178975, 0.11238846927881241, -0.017283709719777107, 0.07574190199375153, 0.021997923031449318, -0.03570638224482536, 0.025983411818742752, 0.3480514585971832, -0.0036498447880148888, 0.11886905133724213, 0.024677054956555367, -0.16366393864154816, -0.18281307816505432, -0.0314667783677578, -0.022361088544130325, 0.058777086436748505, -0.04406898096203804, 0.004398220218718052, 0.082898810505867, -0.030683619901537895, 0.17953117191791534, 0.0635436400771141, -0.14720071852207184, 0.07319118082523346, 0.007401608861982822, -0.016273202374577522, -0.2391931414604187, 0.06552407145500183, -0.10999888926744461, 0.0662459284067154, -0.23008309304714203, -0.13419611752033234, 0.018427841365337372, -0.2353205531835556, -0.1498592048883438, 0.10173776745796204, -0.31692349910736084, 0.0018890977371484041, 0.08067329972982407, 0.0018977930303663015, 0.07317901402711868, 0.07251500338315964, -0.11526165157556534, -0.08609704673290253, 0.030663255602121353, 0.088194839656353, -0.03818702697753906, 0.0008308785618282855, 0.07652994245290756, 0.1335185319185257, 0.2158288210630417, 0.07503489404916763, 0.192493736743927, 0.09935712814331055, 0.02770490013062954, -0.2015499472618103, 0.19725221395492554, 0.23394952714443207, -0.219514399766922, 0.07221819460391998, -0.16487906873226166, 0.12999793887138367, -0.03619286045432091, -0.0005567590123973787, 0.18912465870380402, 0.23366282880306244, 0.14683981239795685, 0.11927346885204315, 0.05854799225926399, -0.20891091227531433, -0.09481646120548248, 0.11294913291931152, 0.1381019502878189, 0.1659487783908844, -0.04939047619700432, 0.14849255979061127, -2.4583026666038126e-32, 0.06955660879611969, -0.03622347116470337, -0.11835920810699463, -0.04249638691544533, -0.19407930970191956, 0.0515286959707737, -0.1972009241580963, -0.048318855464458466, -0.14009830355644226, -0.141826793551445, 0.020361781120300293, 0.18020977079868317, 0.10665798932313919, -0.09368082880973816, 0.02913234382867813, -0.06658301502466202, 0.02338486723601818, 0.17000995576381683, 0.16832932829856873, 0.16374307870864868, 0.006368032656610012, 0.06974121928215027, 0.1666427105665207, 0.045988086611032486, -0.05035635083913803, -0.08900255709886551, -0.14485393464565277, -0.08870469778776169, 0.021884741261601448, -0.013572062365710735, 0.050943613052368164, 0.13671483099460602, -0.003426459850743413, -0.010432968847453594, -0.16180850565433502, -0.20188237726688385, -0.014612103812396526, -0.11525049805641174, -0.2501194179058075, 0.07537728548049927, 0.1309901475906372, -0.04280970245599747, 0.21274100244045258, -0.2742447555065155, -0.052060533314943314, 0.13583271205425262, -0.023424480110406876, 0.09544367343187332, -0.15333044528961182, -0.13859347999095917, 0.07300058007240295, -0.01290886104106903, 0.06664306670427322, 0.16497591137886047, -0.05887210741639137, -0.2136511206626892, -0.16366904973983765, 0.08273830264806747, -0.07076458632946014, 0.0445641428232193, 0.17177727818489075, 0.012330546043813229, -0.0336512066423893, 0.028803514316678047, 0.07678551971912384, 0.014684148132801056, 0.384787380695343, -0.09679007530212402, 0.17814132571220398, -0.0910366028547287, 0.057603366672992706, 0.12745974957942963, 0.019765162840485573, 0.07705502212047577, -0.05029001832008362, -0.001780458725988865, 0.020529761910438538, 0.04982816427946091, -0.05069189518690109, -0.0864323079586029, 0.03866090998053551, 0.09073835611343384, 0.07160335034132004, -0.017153311520814896, -0.1550530046224594, -0.06476811319589615, -0.014043723233044147, 0.03741927444934845, 0.009957087226212025, -0.09848617017269135, 0.1277422308921814, 0.10833381116390228, -0.11950881779193878, -0.29257142543792725, -0.10428284108638763, 0.18289050459861755, 0.009491890668869019, 0.13039477169513702, -0.15652169287204742, -0.054302942007780075, 0.16029466688632965, -0.06303148716688156, -0.012449502944946289, 0.01931706629693508, 0.17086629569530487, 0.008295224979519844, -0.04583792760968208, 0.1186152845621109, -0.09671834856271744, 0.027985963970422745, 0.08568337559700012, -0.13026519119739532, 0.13725590705871582, 0.03882730379700661, 0.117165207862854, -0.1210748553276062, 0.0984598770737648, -0.16581396758556366, 0.196237251162529, 0.12020368129014969, 0.05922359973192215, -0.04957706481218338, -0.1608305722475052, 0.060803063213825226, -0.03814094141125679, 0.10207146406173706, -0.1273583620786667, -0.013724079355597496, 0.023701120167970657, -0.05497797206044197, 0.02570207230746746, -0.022989047691226006, 7.065859222166182e-7, -0.21399761736392975, 0.1941409558057785, 0.0011682098265737295, -0.07951946556568146, -0.07737424224615097, 0.03991120308637619, -0.12838231027126312, 0.05037345737218857, -0.3512585759162903, 0.05895240604877472, 0.05640001595020294, 0.0914858877658844, -0.010031389072537422, 0.011854762211441994, 0.16559560596942902, -0.02664758637547493, -0.04789190739393234, 0.19029676914215088, -0.17526903748512268, 0.1894351840019226, 0.13681764900684357, 0.03607282042503357, 0.15405769646167755, -0.06760892271995544, 0.13542145490646362, 0.001622520387172699, -0.25748172402381897, -0.14027756452560425, 0.14565210044384003, 0.10611727833747864, -0.1565486639738083, -0.038567159324884415, 0.08312883228063583, 0.03632069751620293, 0.0380825474858284, -0.0437956266105175, 0.00486295111477375, -0.10740800201892853, -0.07280518859624863, -0.08751124143600464, 0.11054859310388565, -0.04247172921895981, -0.051995888352394104, -0.17301854491233826, 0.07291785627603531, 0.1091277152299881, -0.008651673793792725, 0.005530500318855047, 0.0855490118265152, 0.0640852153301239, 0.04549037665128708, 0.11831964552402496, 0.08530761301517487, 0.2004665732383728, -0.06584171950817108, 0.07717757672071457, -0.04381295293569565, -0.07323911041021347, 0.06789877265691757, -0.05962377414107323, 0.0013040617341175675, 0.03186334669589996, 0.0057671042159199715, 0.14395925402641296, 0.12900932133197784, -0.1518077403306961, 0.07764684408903122, 3.363254641595649e-35, -0.04614187404513359, -0.022809775546193123, 0.08016987144947052, -0.2482399046421051, -0.01495884545147419, -0.0423273965716362, 0.19211778044700623, -0.07127825170755386, -0.05365573614835739, -0.17650757730007172, -0.11998739838600159 ]
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.21249479055404663, 0.017483731731772423, -0.027119193226099014, -0.041607003659009933, 0.15980595350265503, -0.03240998089313507, 0.11070011556148529, -0.005446839611977339, -0.14602530002593994, 0.09457951039075851, -0.05190456658601761, -0.018207523971796036, -0.06926220655441284, 0.04523609206080437, -0.049114033579826355, 0.08615182340145111, 0.022844985127449036, -0.0265788771212101, 0.032171715050935745, -0.06609080731868744, -0.1489526778459549, 0.14884094893932343, 0.0612734816968441, -0.06813052296638489, 0.021630199626088142, -0.11124058812856674, -0.10819917917251587, 0.012820982374250889, 0.012576716020703316, -0.20615845918655396, 0.16435866057872772, 0.08893433958292007, -0.12891937792301178, 0.14540809392929077, 0.000004913587872579228, 0.07617533206939697, 0.1607191562652588, -0.06181895732879639, -0.18041063845157623, -0.044220563024282455, 0.03972293809056282, 0.08590192347764969, 0.022850779816508293, -0.056015193462371826, -0.04105202853679657, -0.1371600478887558, -0.22934871912002563, -0.03985065594315529, 0.14929929375648499, 0.09641681611537933, 0.032113973051309586, 0.05911688134074211, 0.1443035900592804, -0.12111804634332657, 0.10411648452281952, -0.07188314199447632, 0.05865408107638359, 0.13210256397724152, -0.10780840367078781, -0.04693254828453064, 0.05501515045762062, -0.04452481120824814, -0.007053011562675238, 0.1242174357175827, 0.013169382698833942, -0.0383417010307312, -0.06637120991945267, -0.1652606576681137, 0.01040980126708746, 0.21504659950733185, -0.03766963630914688, -0.012637934647500515, -0.01860707998275757, -0.03969203308224678, -0.08364449441432953, -0.05996346473693848, 0.055278025567531586, 0.13309505581855774, -0.08498772978782654, 0.06610052287578583, -0.11689793318510056, -0.011225386522710323, 0.09496676921844482, -0.022572847083210945, -0.11324496567249298, -0.18694065511226654, -0.17923109233379364, 0.31475186347961426, 0.0019469130784273148, -0.22193053364753723, 0.15911293029785156, -0.060075707733631134, -0.16194234788417816, 0.022444913163781166, -0.1023261547088623, -0.0052965981885790825, -0.09405811876058578, -0.09052903950214386, -0.02362004667520523, -0.11871762573719025, -0.1153869777917862, -0.24823255836963654, -0.12513592839241028, 0.022514350712299347, 0.03737867996096611, 0.01635630801320076, -0.09337607026100159, 0.1471966803073883, 0.2044825702905655, -0.057848796248435974, -0.2047986388206482, 0.01985514909029007, -0.10616124421358109, -0.10581202059984207, 0.2349245399236679, 0.0487307533621788, 0.26722171902656555, 0.0905751958489418, 0.08995092660188675, 0.19598086178302765, -0.08216483145952225, -0.020878003910183907, -0.030632346868515015, 0.23455050587654114, 0.20690743625164032, -0.10792164504528046, 0.0798816829919815, 0.06907567381858826, -0.0031890494283288717, 0.00323212007060647, -0.0036612984258681536, -0.018576771020889282, 0.09863732755184174, -0.04777239263057709, 0.2456897795200348, -0.23429666459560394, 0.0852113589644432, 0.08478505164384842, 0.03872619941830635, -0.037574879825115204, 0.013013369403779507, -0.14361289143562317, -0.09749872982501984, -0.006441023200750351, 0.047226276248693466, 0.0451199971139431, 0.0867592915892601, -0.09152477979660034, -0.017805326730012894, 0.033008068799972534, -0.289055734872818, 0.14434099197387695, -0.14063908159732819, 0.16104057431221008, 0.07092314958572388, 0.042052946984767914, 0.13008181750774384, -0.13860324025154114, -0.17637845873832703, -0.0523727610707283, 0.04237706959247589, 0.006032049655914307, 0.043737031519412994, -0.12964510917663574, 0.1404251903295517, 0.12059537321329117, 0.21616920828819275, 0.003530072281137109, -0.03649280592799187, -0.014812495559453964, -0.06918915361166, 0.10783679783344269, -0.11570177972316742, 0.0631493404507637, -0.246003657579422, 0.08862054347991943, 0.02202867530286312, 0.01582450419664383, -0.22699500620365143, -0.005056899040937424, 0.022157205268740654, -0.26851189136505127, -0.16157083213329315, -0.14213670790195465, 0.18453781306743622, -0.07542320340871811, -0.07281836867332458, -0.09939762204885483, -0.06992734968662262, 0.005240496248006821, -0.07857295870780945, 0.12240424007177353, -0.01681520789861679, -0.06935995817184448, 0.1015210971236229, -0.032198723405599594, 0.07756125926971436, -0.06605619937181473, -0.005189363844692707, -0.1689433753490448, -0.07510579377412796, -0.02387363836169243, 0.014243087731301785, 0.011065292172133923, 0.04540088400244713, 0.11174311488866806, -0.14507095515727997, 0.21291819214820862, -0.1154450997710228, -0.2079012095928192, -0.0843883827328682, -0.05717843398451805, 0.14709314703941345, 0.12627284228801727, -0.1536223143339157, 0.14061430096626282, -0.017258508130908012, -0.020641649141907692, 0.015382115729153156, 0.12032531201839447, 0.019247833639383316, 0.06578710675239563, 0.017982861027121544, -0.08902401477098465, 0.001830901368521154, 0.06594087183475494, -0.1578751653432846, -0.08287812769412994, -0.08625274151563644, 0.06482134014368057, -0.12003397941589355, -0.0055290949530899525, -0.025960220023989677, 0.08159171044826508, -0.13192735612392426, -0.17148201167583466, 0.03919890522956848, -0.15065641701221466, 0.17118264734745026, -0.20383001863956451, -0.12032398581504822, 0.10295833647251129, 0.019016074016690254, -0.02574048563838005, -0.013076732866466045, 0.1401708871126175, -0.025493238121271133, 0.18185146152973175, -0.051351241767406464, -0.1578950732946396, 0.07320289313793182, 0.05382945016026497, -0.04135628417134285, 0.12964360415935516, 0.023334925994277, -0.20532767474651337, 0.06153376027941704, 0.2203199863433838, -0.030401842668652534, 0.011933023110032082, 0.19498573243618011, -0.0355091392993927, 0.008634732104837894, -0.1180996298789978, 0.11846651881933212, -0.01696130633354187, 0.04866328462958336, 0.1805703192949295, -0.07316926121711731, 0.0929727852344513, 0.08756853640079498, -0.006061992608010769, -0.05116899684071541, -0.10194316506385803, 0.032228320837020874, -0.13654734194278717, -0.08055416494607925, -0.045751459896564484, -0.05425064265727997, -0.0628860741853714, -0.070665143430233, 0.035963788628578186, 0.061973750591278076, -0.09053988009691238, 0.02748718298971653, 0.05583776906132698, -0.15355569124221802, -0.08206350356340408, -0.08679646253585815, 0.22113661468029022, 0.04099413752555847, -0.04026607796549797, -0.009853998199105263, -0.24618111550807953, 0.05242350697517395, -0.06533320248126984, -0.09785646200180054, -0.0705035850405693, -0.11651182919740677, 0.09730120748281479, -0.0535762645304203, 0.025095630437135696, 0.09494217485189438, -0.13486649096012115, 0.12239477038383484, -0.012920640408992767, 0.2611772418022156, 0.1839304268360138, 0.03324059769511223, -0.16893553733825684, 0.04026390239596367, -0.1226339265704155, 0.10764465481042862, 0.15452110767364502, 0.11778508871793747, 0.13800758123397827, -0.044291477650403976, -0.18278849124908447, 0.1025022566318512, 0.042341068387031555, -0.03107311576604843, 0.037160057574510574, -0.1526685506105423, 0.00957531202584505, -0.04273306205868721, 0.005859925411641598, -0.058427538722753525, 0.03126554936170578, 0.04056118056178093, -0.1547776311635971, -0.016129683703184128, 0.1370411217212677, -0.17842963337898254, -0.15768273174762726, 0.0026874442119151354, -0.03556784614920616, -0.19529801607131958, 0.0022895855363458395, 0.1469946950674057, 0.11503301560878754, -0.006402314640581608, 0.029527438804507256, -0.12875722348690033, -0.0285030510276556, 0.10567835718393326, -0.16331270337104797, 0.17865890264511108, -0.120648592710495, 0.21095532178878784, 0.00256578647531569, -0.0581575483083725, 0.11579285562038422, 0.020496582612395287, -0.10558722913265228, -0.0836976021528244, 0.11319337040185928, -0.15351855754852295, 0.04058445245027542, -0.09800104796886444, 0.016932204365730286, 0.05760699510574341, -0.04416026920080185, 0.14117293059825897, 0.14000582695007324, -0.09170430898666382, 0.17618024349212646, -0.0039720796048641205, 0.013742527924478054, -0.014388564974069595, -0.24728088080883026, -0.09580645710229874, 0.10594356805086136, 0.06419769674539566, 0.022306475788354874, -0.021354280412197113, -0.22961069643497467, 0.07437897473573685, -0.08463549613952637, -0.10651634633541107, -0.07243916392326355, 0.05631522089242935, -0.0896221175789833, -0.042656347155570984, -0.1043655276298523, 0.027024636045098305, 0.03416477516293526, 0.09958971291780472, -0.08841047435998917, -0.10680176317691803, -0.07578638195991516, 0.13332252204418182, 0.05016964673995972, -0.08484715968370438, 0.12723831832408905, 0.013233545236289501, -0.20969969034194946, 0.03968092054128647, 0.1560145914554596, 0.06707845628261566, 0.05678814277052879, -0.04965400695800781, 0.3721436560153961, -0.08823618292808533, 0.21152368187904358, 0.10195799916982651, 0.02835678681731224, 0.10926875472068787, -0.0895182266831398, 0.05004005879163742, 0.0830376073718071, 0.10192526131868362, 0.015381448902189732, 0.08257996290922165, 0.05690421536564827, 0.07844490557909012, -0.054996833205223083, -0.06145365536212921, -0.19881539046764374, -0.0798889547586441, -0.17945672571659088, -0.32742106914520264, -0.16549812257289886, 0.08342629671096802, 0.058431871235370636, -0.05631602555513382, 0.06590316444635391, 0.0012657365296036005, -0.022762799635529518, 0.14785748720169067, 0.09088939428329468, 0.1092052236199379, 0.14359444379806519, 0.17376793920993805, 0.14266528189182281, 0.13790175318717957, -0.05079261213541031, 0.3914873003959656, -0.017335254698991776, 0.010259031318128109, -0.07485584914684296, -0.09244546294212341, -0.12408343702554703, 0.12533093988895416, -0.13702817261219025, 0.11103153973817825, -0.07752076536417007, 0.009899130091071129, -0.028077492490410805, 0.03527357056736946, -0.05378904938697815, -0.2126554548740387, -0.10215896368026733, -0.08283539861440659, -0.12950795888900757, 0.06285170465707779, -0.03949873521924019, 0.13016027212142944, -0.07156527042388916, -0.03426848351955414, 0.18491391837596893, -0.13074016571044922, 0.011537622660398483, -0.12464972585439682, 0.11841851472854614, -0.027974026277661324, -0.13798989355564117, 0.1156756803393364, -0.023361943662166595, 0.07413825392723083, -0.07012718170881271, -0.08823180198669434, 0.126720130443573, -0.04224330931901932, -0.11456502228975296, 0.16154910624027252, -0.026631368324160576, 0.048432160168886185, -0.051820676773786545, -0.04040159285068512, 0.0013659066753461957, 0.10925421118736267, -0.0058920918963849545, 0.07626970112323761, 0.023711130023002625, -0.03968919813632965, 0.020698953419923782, 0.3506571054458618, -0.013654086738824844, 0.11855246871709824, 0.02118942141532898, -0.17626294493675232, -0.18520531058311462, -0.036898110061883926, -0.02213485911488533, 0.06328923255205154, -0.05036867409944534, -0.010860969312489033, 0.08809475600719452, -0.017312880605459213, 0.16949771344661713, 0.06372160464525223, -0.14546918869018555, 0.07987874001264572, 0.007533817086368799, -0.007223040331155062, -0.23841392993927002, 0.0692872479557991, -0.10644334554672241, 0.05834420397877693, -0.23763421177864075, -0.12897206842899323, 0.018264085054397583, -0.24883228540420532, -0.15819036960601807, 0.10567297786474228, -0.32813000679016113, 0.010037729516625404, 0.0763619914650917, 0.0063208164647221565, 0.07807427644729614, 0.06366138160228729, -0.11398913711309433, -0.10212452709674835, 0.02782890945672989, 0.09104438871145248, -0.032892003655433655, 0.0007351967506110668, 0.07848803699016571, 0.12494345009326935, 0.2064020186662674, 0.07337314635515213, 0.19625979661941528, 0.10577555745840073, 0.02655768394470215, -0.19359682500362396, 0.19716450572013855, 0.2370358258485794, -0.22021017968654633, 0.07457418739795685, -0.1743822693824768, 0.14723774790763855, -0.03953760117292404, 0.007504505570977926, 0.20901000499725342, 0.23495928943157196, 0.14529801905155182, 0.11921290308237076, 0.057250987738370895, -0.19430097937583923, -0.07521595805883408, 0.11851917952299118, 0.14064355194568634, 0.14558911323547363, -0.045049458742141724, 0.1394343376159668, -2.4812114351966066e-32, 0.06786561757326126, -0.03454403951764107, -0.12854672968387604, -0.03526538237929344, -0.18681666254997253, 0.043721262365579605, -0.2034594565629959, -0.048081666231155396, -0.15709665417671204, -0.13243655860424042, 0.018816668540239334, 0.17909200489521027, 0.10641878843307495, -0.10360649973154068, 0.029967185109853745, -0.06232704967260361, 0.01898477040231228, 0.17668819427490234, 0.16367441415786743, 0.159047931432724, -0.0006766609149053693, 0.06764359772205353, 0.17035506665706635, 0.0526919849216938, -0.04709964990615845, -0.09667441248893738, -0.14463795721530914, -0.07299970090389252, 0.025786397978663445, -0.019167698919773102, 0.053725603967905045, 0.14032962918281555, -0.005977884400635958, -0.004683215171098709, -0.1540333479642868, -0.19186465442180634, -0.030976014211773872, -0.1193583756685257, -0.24091880023479462, 0.07430734485387802, 0.13459089398384094, -0.03739792853593826, 0.21934187412261963, -0.26646217703819275, -0.0563298799097538, 0.13968226313591003, -0.020081277936697006, 0.09334325790405273, -0.15770235657691956, -0.1356481909751892, 0.07660602778196335, -0.01230656635016203, 0.06538865715265274, 0.1678508073091507, -0.06577134877443314, -0.22229813039302826, -0.16378667950630188, 0.08833835273981094, -0.05806168541312218, 0.054329343140125275, 0.18783977627754211, 0.01931525208055973, -0.03660774230957031, 0.023941900581121445, 0.07788325846195221, 0.004777610767632723, 0.3678160011768341, -0.10300693660974503, 0.17763273417949677, -0.08926588296890259, 0.07069423049688339, 0.12143591046333313, 0.028733910992741585, 0.08762311190366745, -0.03984955698251724, 0.003133706282824278, 0.026259854435920715, 0.059388667345047, -0.056015465408563614, -0.07854582369327545, 0.03354272246360779, 0.09488137811422348, 0.07006820291280746, -0.001083632349036634, -0.15188196301460266, -0.05323368310928345, -0.018609242513775826, 0.04237617179751396, 0.0058942390605807304, -0.09919976443052292, 0.13608187437057495, 0.11103416234254837, -0.12073608487844467, -0.2833508253097534, -0.10053268820047379, 0.18718796968460083, 0.02248832955956459, 0.13266068696975708, -0.153622105717659, -0.056058816611766815, 0.15804220736026764, -0.0594971626996994, -0.006058911792933941, 0.02311716228723526, 0.17203271389007568, -0.005475090350955725, -0.06264787167310715, 0.11822490394115448, -0.10728587210178375, 0.026973772794008255, 0.08443811535835266, -0.12326551228761673, 0.12719081342220306, 0.03851018846035004, 0.11555268615484238, -0.11596059799194336, 0.1029568612575531, -0.16575296223163605, 0.18520650267601013, 0.11695410311222076, 0.057075291872024536, -0.03476927429437637, -0.15671579539775848, 0.056296225637197495, -0.04759415239095688, 0.0967225730419159, -0.1307816505432129, -0.024053113535046577, 0.012602261267602444, -0.05146268382668495, 0.03003421425819397, -0.005752769764512777, 7.03797979895171e-7, -0.21241135895252228, 0.19115185737609863, 0.008883832022547722, -0.0699273869395256, -0.06700325012207031, 0.04095659777522087, -0.1261676847934723, 0.029454754665493965, -0.33291155099868774, 0.0463346503674984, 0.056694287806749344, 0.09573942422866821, -0.002289645839482546, 0.009381022304296494, 0.17430830001831055, -0.03277721256017685, -0.042973440140485764, 0.19257314503192902, -0.17383751273155212, 0.1846710592508316, 0.1276390552520752, 0.031181391328573227, 0.1492937058210373, -0.054377079010009766, 0.138571634888649, -0.005610216874629259, -0.27576249837875366, -0.14638392627239227, 0.1511957049369812, 0.10511308908462524, -0.1548921912908554, -0.03652229160070419, 0.0762856975197792, 0.0335739403963089, 0.04281733185052872, -0.048722174018621445, -0.003659913782030344, -0.10980265587568283, -0.07438237965106964, -0.08651328831911087, 0.09515954554080963, -0.054819636046886444, -0.05963373929262161, -0.18226772546768188, 0.06463144719600677, 0.10891366750001907, -0.00614607660099864, 0.006770279724150896, 0.08707629889249802, 0.05737198144197464, 0.03784175589680672, 0.10877438634634018, 0.08574113249778748, 0.20243175327777863, -0.06770744174718857, 0.07579800486564636, -0.04976721480488777, -0.07421338558197021, 0.057016342878341675, -0.055764924734830856, -0.0009536585421301425, 0.03372888267040253, 0.01243889145553112, 0.14747650921344757, 0.11478754878044128, -0.1567736119031906, 0.0823512002825737, 2.0430476378431518e-35, -0.048552706837654114, -0.02639113925397396, 0.08970538526773453, -0.23837433755397797, -0.02812430076301098, -0.04098421707749367, 0.19598279893398285, -0.0800967887043953, -0.06238805875182152, -0.17687301337718964, -0.11789439618587494 ]
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.20733873546123505, 0.026563728228211403, -0.026691127568483353, -0.044504471123218536, 0.16233304142951965, -0.03558186814188957, 0.1132582500576973, -0.003154834033921361, -0.1452043354511261, 0.099886454641819, -0.05097035691142082, -0.02211284451186657, -0.07426439225673676, 0.042965054512023926, -0.044896163046360016, 0.07756973057985306, 0.01795099675655365, -0.026736151427030563, 0.029544975608587265, -0.0627715066075325, -0.13972662389278412, 0.13807383179664612, 0.06699801981449127, -0.06898842006921768, 0.01247860211879015, -0.10517717152833939, -0.10378585010766983, 0.016746563836932182, 0.008787634782493114, -0.2031087428331375, 0.17294320464134216, 0.09308700263500214, -0.11972697824239731, 0.15262040495872498, 0.000004948272817273391, 0.07401879131793976, 0.17090915143489838, -0.061478231102228165, -0.18528635799884796, -0.049192819744348526, 0.03638267144560814, 0.0863080695271492, 0.03208404779434204, -0.051591161638498306, -0.046051133424043655, -0.14626741409301758, -0.21828018128871918, -0.05380143225193024, 0.1391514539718628, 0.09959673881530762, 0.02537596970796585, 0.06223941594362259, 0.1391349732875824, -0.1251482516527176, 0.09533059597015381, -0.05950707197189331, 0.06715375930070877, 0.1316969096660614, -0.11460912972688675, -0.0522642582654953, 0.055005792528390884, -0.0583389587700367, 0.0000637862685834989, 0.12480940669775009, 0.0038051586598157883, -0.03620356321334839, -0.07748543471097946, -0.15456722676753998, 0.01537303812801838, 0.2287851721048355, -0.032984811812639236, -0.015923991799354553, -0.01441884133964777, -0.03831133618950844, -0.09263427555561066, -0.06304992735385895, 0.05168534815311432, 0.12974947690963745, -0.07719369232654572, 0.05778985470533371, -0.12144920229911804, 0.0016806446947157383, 0.08887650072574615, -0.014008140191435814, -0.1240394338965416, -0.19127057492733002, -0.17407944798469543, 0.31703320145606995, 0.007179318927228451, -0.21770110726356506, 0.16849863529205322, -0.061177968978881836, -0.16618739068508148, 0.020602690055966377, -0.10378028452396393, 0.0032422554213553667, -0.09479784965515137, -0.10002100467681885, -0.018338855355978012, -0.12276598066091537, -0.11431359499692917, -0.2381044179201126, -0.1341453641653061, 0.026369446888566017, 0.03570731729269028, 0.001765897497534752, -0.09769634902477264, 0.15779626369476318, 0.2003842443227768, -0.05611046403646469, -0.19595055282115936, 0.02618306316435337, -0.108610138297081, -0.08586970716714859, 0.2367153763771057, 0.05008988082408905, 0.2653447091579437, 0.09603917598724365, 0.08400499820709229, 0.1853424608707428, -0.07470076531171799, -0.02569470927119255, -0.03514165058732033, 0.2422339767217636, 0.2052862048149109, -0.10747106373310089, 0.07066305726766586, 0.07461503148078918, 0.0005932687199674547, -0.013990247622132301, -0.006511794403195381, -0.02411569282412529, 0.09376485645771027, -0.04526860639452934, 0.23753632605075836, -0.2307613343000412, 0.08556662499904633, 0.08429625630378723, 0.03350135311484337, -0.03602127730846405, 0.02691754885017872, -0.13721586763858795, -0.09309288114309311, -0.01215343363583088, 0.054154254496097565, 0.04914208501577377, 0.09001554548740387, -0.09068701416254044, -0.016093667596578598, 0.028193274512887, -0.2891775667667389, 0.14238221943378448, -0.14411009848117828, 0.15693096816539764, 0.06101818382740021, 0.0402497760951519, 0.1238652840256691, -0.12720666825771332, -0.1873263269662857, -0.054940707981586456, 0.04303993657231331, 0.008539741858839989, 0.03753131255507469, -0.12011722475290298, 0.14379838109016418, 0.11986775696277618, 0.19686202704906464, 0.0033299673814326525, -0.042106665670871735, -0.011377985589206219, -0.057014986872673035, 0.09701651334762573, -0.12296739965677261, 0.07325075566768646, -0.257182776927948, 0.08731474727392197, 0.014363395050168037, 0.020933790132403374, -0.22249987721443176, -0.013191997073590755, 0.028823796659708023, -0.2613009214401245, -0.1659071445465088, -0.1434708684682846, 0.1682693362236023, -0.06888329237699509, -0.07695413380861282, -0.10347695648670197, -0.07181431353092194, -0.005716114770621061, -0.07736916840076447, 0.12513412535190582, -0.004881107714027166, -0.06340073049068451, 0.0973331406712532, -0.034528885036706924, 0.07873497158288956, -0.07027259469032288, 0.0024361375253647566, -0.1723697930574417, -0.07237906008958817, -0.017936814576387405, 0.007798125967383385, 0.012878268025815487, 0.05281561240553856, 0.09553182125091553, -0.1572829931974411, 0.2139100581407547, -0.1115720272064209, -0.20054475963115692, -0.08731280267238617, -0.056992631405591965, 0.14080263674259186, 0.11514207720756531, -0.16144773364067078, 0.13769352436065674, -0.02333333157002926, -0.012510985136032104, 0.005576864816248417, 0.12159477919340134, 0.020612549036741257, 0.07642869651317596, 0.016423078253865242, -0.08339813351631165, -0.013529451563954353, 0.06300245225429535, -0.1573198288679123, -0.08374567329883575, -0.08101246505975723, 0.07157251238822937, -0.12472698092460632, -0.006927222944796085, -0.028379611670970917, 0.08637581020593643, -0.12845750153064728, -0.16517752408981323, 0.03438083454966545, -0.15880465507507324, 0.18088866770267487, -0.20576874911785126, -0.11635783314704895, 0.1074494868516922, 0.02066846564412117, -0.024875205010175705, -0.027134764939546585, 0.1417653113603592, -0.021619675680994987, 0.17887116968631744, -0.054540906101465225, -0.16000637412071228, 0.07434164732694626, 0.05642326548695564, -0.03964267298579216, 0.1194826066493988, 0.022546373307704926, -0.20601484179496765, 0.07714247703552246, 0.21313197910785675, -0.026926623657345772, 0.0262626800686121, 0.20400886237621307, -0.03640936687588692, 0.013146364130079746, -0.11546696722507477, 0.11003127694129944, -0.016805842518806458, 0.060548085719347, 0.17541494965553284, -0.07316511869430542, 0.08983945846557617, 0.0862383097410202, -0.004509975668042898, -0.055502261966466904, -0.09845860302448273, 0.04036465287208557, -0.14564770460128784, -0.09244469553232193, -0.04631422460079193, -0.058813661336898804, -0.06422039121389389, -0.06871598213911057, 0.039048779755830765, 0.0708395317196846, -0.09133299440145493, 0.0227142795920372, 0.050824765115976334, -0.160304993391037, -0.07588713616132736, -0.07523181289434433, 0.22993528842926025, 0.04027730971574783, -0.04658367484807968, -0.007727071177214384, -0.24235910177230835, 0.055008113384246826, -0.06647639721632004, -0.09845548123121262, -0.08423931151628494, -0.11136770248413086, 0.09636811167001724, -0.049067407846450806, 0.020658962428569794, 0.09319063276052475, -0.14039739966392517, 0.12466055154800415, 0.0017482644179835916, 0.2579925060272217, 0.18706825375556946, 0.02773427776992321, -0.17039020359516144, 0.03858600929379463, -0.12937980890274048, 0.10168763995170593, 0.16257622838020325, 0.11884032934904099, 0.13094782829284668, -0.046443771570920944, -0.18569959700107574, 0.10867512226104736, 0.03251292556524277, -0.034022923558950424, 0.044047530740499496, -0.1564032882452011, 0.02043517492711544, -0.041444331407547, -0.00784494448453188, -0.052793823182582855, 0.02582108974456787, 0.0356389656662941, -0.15491829812526703, -0.019537853077054024, 0.131978839635849, -0.16956736147403717, -0.16379231214523315, 0.001551194116473198, -0.04431860148906708, -0.1918048858642578, 0.009948629885911942, 0.14866147935390472, 0.11445917934179306, -0.007596256211400032, 0.040982186794281006, -0.1432427018880844, -0.030038047581911087, 0.11162852495908737, -0.15590855479240417, 0.17519435286521912, -0.12049839645624161, 0.22148355841636658, -0.009054151363670826, -0.0627191811800003, 0.11940355598926544, 0.022871756926178932, -0.10750102251768112, -0.08842302858829498, 0.11705698817968369, -0.15163175761699677, 0.04698999971151352, -0.09410178661346436, 0.017438173294067383, 0.054763589054346085, -0.04230253025889397, 0.14829163253307343, 0.13539929687976837, -0.10068757832050323, 0.16818270087242126, -0.0005499812541529536, 0.01766323670744896, -0.0019928410183638334, -0.25018495321273804, -0.10274249315261841, 0.10575926303863525, 0.07070325314998627, 0.0210611280053854, -0.02214299701154232, -0.22285573184490204, 0.07929365336894989, -0.08366826921701431, -0.10004235804080963, -0.07197766751050949, 0.057134099304676056, -0.0932060107588768, -0.03645075485110283, -0.09537693858146667, 0.02031521499156952, 0.02419993095099926, 0.09181433916091919, -0.08722449839115143, -0.11977081745862961, -0.0763188898563385, 0.13770000636577606, 0.03713139891624451, -0.07309478521347046, 0.13239647448062897, 0.014568347483873367, -0.20641839504241943, 0.03830481320619583, 0.15448494255542755, 0.07883570343255997, 0.04929303377866745, -0.0432707853615284, 0.37428295612335205, -0.09964030236005783, 0.2124301940202713, 0.10279639810323715, 0.03745226934552193, 0.09895674884319305, -0.08959192037582397, 0.038963139057159424, 0.09023643285036087, 0.10165467858314514, 0.01296100951731205, 0.07572866976261139, 0.056206610053777695, 0.08172567933797836, -0.04944073408842087, -0.05722871050238609, -0.19845561683177948, -0.08138290792703629, -0.17806152999401093, -0.321164071559906, -0.16107739508152008, 0.08133956044912338, 0.06382656842470169, -0.05370812490582466, 0.06736909598112106, -0.011357477866113186, -0.023293282836675644, 0.1499926596879959, 0.08524590730667114, 0.10171600431203842, 0.1553318202495575, 0.17492835223674774, 0.14081090688705444, 0.13984300196170807, -0.05324884131550789, 0.388831228017807, -0.021653875708580017, 0.0042386301793158054, -0.07670227438211441, -0.09213066846132278, -0.11247419565916061, 0.12790033221244812, -0.1326587200164795, 0.11089196056127548, -0.075995534658432, 0.0005432466859929264, -0.02364804595708847, 0.04703715443611145, -0.05248067528009415, -0.20014621317386627, -0.10670088976621628, -0.09499429911375046, -0.13544334471225739, 0.0624910332262516, -0.040775492787361145, 0.14274851977825165, -0.06722758710384369, -0.03131742775440216, 0.18657036125659943, -0.13235922157764435, 0.00869149249047041, -0.12298706918954849, 0.12110559642314911, -0.03142952919006348, -0.12571842968463898, 0.12543165683746338, -0.02280411124229431, 0.07434965670108795, -0.05852215737104416, -0.08396555483341217, 0.12350721657276154, -0.04465947300195694, -0.10254858434200287, 0.16336680948734283, -0.02758733741939068, 0.060992997139692307, -0.05918384715914726, -0.033918432891368866, 0.004881200380623341, 0.11762382090091705, -0.009178263135254383, 0.077910877764225, 0.0343228243291378, -0.04260648414492607, 0.025295337662100792, 0.3389275372028351, -0.007706706877797842, 0.11134736984968185, 0.0191996730864048, -0.17072005569934845, -0.16797512769699097, -0.0314822755753994, -0.0374264158308506, 0.05937070772051811, -0.06421588361263275, -0.014045464806258678, 0.08152003586292267, -0.021741356700658798, 0.17317910492420197, 0.06955569982528687, -0.1433834731578827, 0.08058363199234009, 0.004865589085966349, -0.011378279887139797, -0.23512966930866241, 0.06350423395633698, -0.11185086518526077, 0.06679456681013107, -0.24197585880756378, -0.13318993151187897, 0.012489879503846169, -0.2392873764038086, -0.15015225112438202, 0.09910384565591812, -0.31701552867889404, -0.004585003945976496, 0.07153394818305969, 0.0021333631593734026, 0.07335425913333893, 0.0633980929851532, -0.11301059275865555, -0.10521367192268372, 0.027152076363563538, 0.08845320343971252, -0.034598227590322495, 0.0027775242924690247, 0.07265486568212509, 0.13198518753051758, 0.2045726776123047, 0.07522711902856827, 0.19432203471660614, 0.09460560977458954, 0.028995903208851814, -0.19140414893627167, 0.19972991943359375, 0.24709652364253998, -0.21898208558559418, 0.07395897060632706, -0.16126073896884918, 0.1267685741186142, -0.044699568301439285, -0.0031154837924987078, 0.20351074635982513, 0.22500725090503693, 0.1374698430299759, 0.11837214976549149, 0.05059425160288811, -0.20859341323375702, -0.06642662733793259, 0.1214129775762558, 0.1451977640390396, 0.14748665690422058, -0.05110255628824234, 0.1393723040819168, -2.486224624729276e-32, 0.07654409110546112, -0.04161299020051956, -0.12381245195865631, -0.0397343784570694, -0.1824406385421753, 0.051830753684043884, -0.19950911402702332, -0.05229678377509117, -0.1525866687297821, -0.13670614361763, 0.008826624602079391, 0.16501374542713165, 0.10445094853639603, -0.1047012060880661, 0.022512920200824738, -0.06399860978126526, 0.021815691143274307, 0.176865816116333, 0.16425009071826935, 0.1511884331703186, 0.005219376180320978, 0.06525295227766037, 0.16671934723854065, 0.03226148709654808, -0.03820342943072319, -0.09685737639665604, -0.1409146785736084, -0.07496172934770584, 0.025886930525302887, -0.02482808567583561, 0.055622927844524384, 0.14463147521018982, -0.007980242371559143, -0.008374293334782124, -0.15631075203418732, -0.19556985795497894, -0.027533497661352158, -0.12536390125751495, -0.23998810350894928, 0.07600312680006027, 0.12218787521123886, -0.038440342992544174, 0.2081088125705719, -0.2732079029083252, -0.060356542468070984, 0.1337311714887619, -0.025487393140792847, 0.09403436630964279, -0.15558183193206787, -0.12508633732795715, 0.07203024625778198, -0.013244561851024628, 0.06502004712820053, 0.16792801022529602, -0.06397358328104019, -0.22269593179225922, -0.16595543920993805, 0.0922684520483017, -0.05953817442059517, 0.05574053153395653, 0.19644878804683685, 0.015365532599389553, -0.03960695117712021, 0.02590155601501465, 0.08051615953445435, 0.0017760730115696788, 0.3734457492828369, -0.10525329411029816, 0.180496945977211, -0.09417951107025146, 0.07296616584062576, 0.11966489255428314, 0.01757124438881874, 0.08924214541912079, -0.024789875373244286, -0.00002741437310760375, 0.024122050032019615, 0.060132209211587906, -0.05420707166194916, -0.08448021858930588, 0.03051001951098442, 0.09485151618719101, 0.06548923254013062, -0.003055658657103777, -0.14488431811332703, -0.051230110228061676, -0.013247211463749409, 0.041751958429813385, 0.00375262345187366, -0.09571895748376846, 0.12861616909503937, 0.11659443378448486, -0.11866698414087296, -0.28193405270576477, -0.10568629205226898, 0.19612859189510345, 0.029712971299886703, 0.1360330581665039, -0.1502806693315506, -0.056743279099464417, 0.15755006670951843, -0.06651986390352249, 0.004544785246253014, 0.02745974250137806, 0.16303123533725739, -0.0010256171226501465, -0.05805054306983948, 0.11675255000591278, -0.09979206323623657, 0.02402198128402233, 0.08063218742609024, -0.11851836740970612, 0.13107578456401825, 0.03282660245895386, 0.11535900086164474, -0.11213783174753189, 0.09790648519992828, -0.1668597161769867, 0.1872270107269287, 0.10886330157518387, 0.03833947703242302, -0.02706201560795307, -0.15354439616203308, 0.05572197586297989, -0.03980235382914543, 0.09251956641674042, -0.12547430396080017, -0.03633367270231247, 0.030037663877010345, -0.04827694967389107, 0.029806293547153473, -0.027137279510498047, 7.08596076037793e-7, -0.22018077969551086, 0.18861544132232666, 0.009192120283842087, -0.07016298174858093, -0.07367413491010666, 0.03639136254787445, -0.1321214735507965, 0.03533073142170906, -0.3393135070800781, 0.046897001564502716, 0.06411208212375641, 0.09153583645820618, -0.003803717438131571, 0.00313011952675879, 0.178818017244339, -0.03098495490849018, -0.02822827361524105, 0.18739357590675354, -0.17437146604061127, 0.18596646189689636, 0.12603315711021423, 0.03675428032875061, 0.15010109543800354, -0.07574013620615005, 0.13963410258293152, 0.0009827038738876581, -0.2732252776622772, -0.13123834133148193, 0.15209412574768066, 0.10567378252744675, -0.1499706506729126, -0.024586956948041916, 0.0859273299574852, 0.0409400500357151, 0.04371647909283638, -0.037456803023815155, 0.003297194605693221, -0.09882360696792603, -0.07544317096471786, -0.07385698705911636, 0.10179382562637329, -0.05193640664219856, -0.058407023549079895, -0.16959048807621002, 0.06206473708152771, 0.11371681839227676, 0.00011370969150448218, 0.01862482726573944, 0.09014782309532166, 0.06478362530469894, 0.030902767553925514, 0.11028283834457397, 0.08687739074230194, 0.20151786506175995, -0.06653088331222534, 0.07031109184026718, -0.04955936595797539, -0.07647237926721573, 0.05927710607647896, -0.06469660997390747, -0.007231405470520258, 0.02988201193511486, 0.009551607072353363, 0.1492912471294403, 0.12212586402893066, -0.15394535660743713, 0.0779564157128334, 3.3388200859272624e-35, -0.05319032818078995, -0.028692910447716713, 0.09013135731220245, -0.23035015165805817, -0.02680061198771, -0.04487042501568794, 0.206221804022789, -0.06623165309429169, -0.05941024050116539, -0.1729939728975296, -0.1203785315155983 ]
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.2121831774711609, 0.019742412492632866, -0.027473121881484985, -0.03442908823490143, 0.1548149436712265, -0.03599231690168381, 0.10658880323171616, -0.011455078609287739, -0.15035971999168396, 0.09676635265350342, -0.0541832260787487, -0.020044414326548576, -0.06748421490192413, 0.040084414184093475, -0.05849837139248848, 0.08472903817892075, 0.021753938868641853, -0.021136721596121788, 0.030216485261917114, -0.06900810450315475, -0.15022586286067963, 0.1407926380634308, 0.05975117161870003, -0.07115066051483154, 0.02020408771932125, -0.10736280679702759, -0.10615302622318268, 0.00640424620360136, 0.011485986411571503, -0.20395419001579285, 0.16151070594787598, 0.09277575463056564, -0.13430659472942352, 0.1477091908454895, 0.000004948631612933241, 0.07462801039218903, 0.1589096337556839, -0.06945991516113281, -0.18157319724559784, -0.04280771315097809, 0.046033017337322235, 0.0833972841501236, 0.02443459816277027, -0.05833950266242027, -0.044501420110464096, -0.13340561091899872, -0.23342862725257874, -0.036776404827833176, 0.14758062362670898, 0.09165298193693161, 0.03078361786901951, 0.05637725070118904, 0.14420007169246674, -0.11747374385595322, 0.09726637601852417, -0.07315585017204285, 0.05607428029179573, 0.1302594393491745, -0.10922875255346298, -0.04828186705708504, 0.05858045443892479, -0.04699251055717468, -0.01001904159784317, 0.12756600975990295, 0.016059406101703644, -0.037823159247636795, -0.06851950287818909, -0.16445332765579224, 0.012832862325012684, 0.21522049605846405, -0.03771919012069702, -0.013050497509539127, -0.013866499997675419, -0.038558829575777054, -0.08867358416318893, -0.061689287424087524, 0.048505183309316635, 0.13512302935123444, -0.08178303390741348, 0.06118214130401611, -0.11624687165021896, 0.0033157262951135635, 0.08814609050750732, -0.022493047639727592, -0.11050614714622498, -0.18845117092132568, -0.17167378962039948, 0.31840068101882935, -0.0028686299920082092, -0.2204107642173767, 0.16139236092567444, -0.05917086452245712, -0.16156603395938873, 0.02250772900879383, -0.10901159793138504, -0.006713912822306156, -0.0928347259759903, -0.09252871572971344, -0.025643175467848778, -0.12270019948482513, -0.11268508434295654, -0.24281422793865204, -0.11939463764429092, 0.021925585344433784, 0.03387271985411644, 0.016320213675498962, -0.08734286576509476, 0.14272746443748474, 0.2056884765625, -0.06288555264472961, -0.2045549601316452, 0.016562996432185173, -0.10126763582229614, -0.08909280598163605, 0.24530234932899475, 0.04633510112762451, 0.2623645067214966, 0.09231919795274734, 0.09294919669628143, 0.19700807332992554, -0.08235414326190948, -0.029981905594468117, -0.028639046475291252, 0.24064791202545166, 0.2040526419878006, -0.10435806214809418, 0.07371097803115845, 0.07453372329473495, -0.005944656673818827, 0.005586427170783281, 0.0014675525017082691, -0.028029797598719597, 0.10398846864700317, -0.04117879644036293, 0.23845349252223969, -0.23426032066345215, 0.08854038268327713, 0.09247515350580215, 0.03745444864034653, -0.041942059993743896, 0.018537765368819237, -0.15206176042556763, -0.09839723259210587, -0.0053526777774095535, 0.0505698099732399, 0.049684103578329086, 0.08523882925510406, -0.09116441756486893, -0.018053609877824783, 0.034510087221860886, -0.27862197160720825, 0.14019078016281128, -0.13445092737674713, 0.16114546358585358, 0.07468974590301514, 0.04303915798664093, 0.12655694782733917, -0.13928648829460144, -0.17556703090667725, -0.054723236709833145, 0.0441112294793129, 0.005608974955976009, 0.04076240956783295, -0.1355200856924057, 0.13416950404644012, 0.11501893401145935, 0.2172793745994568, 0.0010578215587884188, -0.037041425704956055, -0.0067471107468008995, -0.06327151507139206, 0.1033381000161171, -0.12450603395700455, 0.06504350900650024, -0.24088124930858612, 0.0897771492600441, 0.023038513958454132, 0.009640084579586983, -0.2298654317855835, -0.010578013025224209, 0.026127835735678673, -0.25737279653549194, -0.1590634435415268, -0.1443643867969513, 0.18096572160720825, -0.07697398960590363, -0.07718481123447418, -0.10044606029987335, -0.06515788286924362, 0.00223111012019217, -0.07492309808731079, 0.12606243789196014, -0.015226448886096478, -0.06869126856327057, 0.09130920469760895, -0.025040095672011375, 0.08118389546871185, -0.06393729895353317, -0.0005644631455652416, -0.17393766343593597, -0.07593239843845367, -0.022138036787509918, 0.01461854949593544, 0.009119614027440548, 0.04406183212995529, 0.11715871840715408, -0.15011055767536163, 0.2189970463514328, -0.11404673010110855, -0.20385180413722992, -0.0845257043838501, -0.05720410495996475, 0.1453423947095871, 0.12455704063177109, -0.16209809482097626, 0.14152495563030243, -0.022966263815760612, -0.025267019867897034, 0.020321980118751526, 0.12717771530151367, 0.021702617406845093, 0.06354951858520508, 0.01833038590848446, -0.08795542269945145, 0.006098250858485699, 0.06381604075431824, -0.16445618867874146, -0.08522296696901321, -0.08641724288463593, 0.06922220438718796, -0.1123475506901741, -0.0010646646842360497, -0.025032836943864822, 0.07656010240316391, -0.12618178129196167, -0.16167791187763214, 0.032637376338243484, -0.15355384349822998, 0.1753661334514618, -0.20094017684459686, -0.12038609385490417, 0.09775935113430023, 0.029309934005141258, -0.028738845139741898, -0.015249185264110565, 0.14180228114128113, -0.020371858030557632, 0.18642674386501312, -0.048242513090372086, -0.16294947266578674, 0.07014654576778412, 0.048946090042591095, -0.031910255551338196, 0.1268721967935562, 0.02021230198442936, -0.20203223824501038, 0.05958394333720207, 0.2202504426240921, -0.024206550791859627, 0.018362686038017273, 0.19775696098804474, -0.032500412315130234, 0.00777756841853261, -0.11789208650588989, 0.10997339338064194, -0.022662997245788574, 0.050111159682273865, 0.1878214329481125, -0.07264906913042068, 0.09114465862512589, 0.09218516945838928, -0.007045743986964226, -0.04437224939465523, -0.1007760763168335, 0.033651404082775116, -0.13727755844593048, -0.08104071766138077, -0.04664997383952141, -0.05038456618785858, -0.06300535053014755, -0.06435338407754898, 0.037986695766448975, 0.06465452164411545, -0.08986932039260864, 0.029301941394805908, 0.05768812820315361, -0.15298688411712646, -0.07634801417589188, -0.0889645665884018, 0.22195148468017578, 0.03378794714808464, -0.04897652566432953, -0.00574108399450779, -0.24376913905143738, 0.061989352107048035, -0.06775791198015213, -0.09367670118808746, -0.07704724371433258, -0.11410144716501236, 0.0898948460817337, -0.05476857349276543, 0.02510315179824829, 0.08971305936574936, -0.14074552059173584, 0.12070371955633163, -0.002658679150044918, 0.26525619626045227, 0.18639898300170898, 0.027716374024748802, -0.16720525920391083, 0.03884249925613403, -0.11782705038785934, 0.10946950316429138, 0.15585267543792725, 0.11281123012304306, 0.1345611959695816, -0.04514509439468384, -0.18353909254074097, 0.10723838955163956, 0.03878655657172203, -0.030260270461440086, 0.03826768696308136, -0.1643999218940735, 0.008634316734969616, -0.04401015490293503, -0.000428404426202178, -0.0469508171081543, 0.030966034159064293, 0.043794989585876465, -0.14934822916984558, -0.010826937854290009, 0.1302807480096817, -0.17784705758094788, -0.1621229350566864, 0.004892626311630011, -0.03096870705485344, -0.19406312704086304, 0.003496711142361164, 0.14790937304496765, 0.11024090647697449, -0.004774397239089012, 0.029831616207957268, -0.13064756989479065, -0.026729779317975044, 0.11022205650806427, -0.16165678203105927, 0.17467844486236572, -0.12186369299888611, 0.21706512570381165, -0.00006461128214141354, -0.051499705761671066, 0.10895944386720657, 0.019312774762511253, -0.10459011793136597, -0.08871926367282867, 0.11921705305576324, -0.14927437901496887, 0.038098372519016266, -0.0954018160700798, 0.018477918580174446, 0.05605223774909973, -0.04446498304605484, 0.13922935724258423, 0.13751079142093658, -0.0880042091012001, 0.17344118654727936, -0.006920732092112303, 0.005419192835688591, -0.010862907394766808, -0.24945135414600372, -0.09127981215715408, 0.10817273706197739, 0.07200006395578384, 0.012492185458540916, -0.025165438652038574, -0.22334733605384827, 0.08220111578702927, -0.08296395093202591, -0.10387445241212845, -0.07384752482175827, 0.051980629563331604, -0.08798108994960785, -0.03669479861855507, -0.10391556471586227, 0.028244230896234512, 0.025616133585572243, 0.10167641192674637, -0.09653028845787048, -0.11288873851299286, -0.07651343196630478, 0.12999817728996277, 0.04704955220222473, -0.08526617288589478, 0.12733036279678345, 0.015136596746742725, -0.20073486864566803, 0.03623952716588974, 0.16368943452835083, 0.0634569600224495, 0.061915550380945206, -0.05279462784528732, 0.37158623337745667, -0.08515870571136475, 0.20692479610443115, 0.09965990483760834, 0.02719341218471527, 0.09911852329969406, -0.08676347136497498, 0.05110955238342285, 0.08457823842763901, 0.09890196472406387, 0.019701054319739342, 0.07691755145788193, 0.05205034464597702, 0.06752462685108185, -0.054703693836927414, -0.06150976940989494, -0.20698633790016174, -0.07000159472227097, -0.16959185898303986, -0.32308751344680786, -0.16296221315860748, 0.07507111132144928, 0.06589137762784958, -0.05715041980147362, 0.06936947256326675, -0.0038538146764039993, -0.02515551447868347, 0.1442263275384903, 0.09048252552747726, 0.10555680096149445, 0.1424195021390915, 0.17969995737075806, 0.1420503556728363, 0.13797301054000854, -0.04820956289768219, 0.39123085141181946, -0.024759892374277115, 0.010832746513187885, -0.07770992070436478, -0.09714234620332718, -0.12199569493532181, 0.11562758684158325, -0.14067906141281128, 0.11621788144111633, -0.08349086344242096, 0.004496774636209011, -0.025149675086140633, 0.031872767955064774, -0.05288280174136162, -0.2208036482334137, -0.10444389283657074, -0.08303003013134003, -0.11964613199234009, 0.06152790039777756, -0.039441656321287155, 0.13250459730625153, -0.07347287982702255, -0.031317658722400665, 0.18708108365535736, -0.13862089812755585, 0.009149244986474514, -0.11483277380466461, 0.12105501443147659, -0.034593772143125534, -0.13633014261722565, 0.1143408790230751, -0.012150879018008709, 0.07245732843875885, -0.06934689730405807, -0.08518026769161224, 0.1224372535943985, -0.04268524795770645, -0.10995389521121979, 0.1630120575428009, -0.024636751040816307, 0.049133360385894775, -0.053318776190280914, -0.03573065251111984, -0.00245057069696486, 0.11882787942886353, -0.004137811250984669, 0.07441253215074539, 0.029296157881617546, -0.039671555161476135, 0.024021124467253685, 0.3515363931655884, -0.015130751766264439, 0.11716373264789581, 0.020175103098154068, -0.18442943692207336, -0.17863082885742188, -0.040294259786605835, -0.019315779209136963, 0.059268612414598465, -0.04970022663474083, -0.006496333051472902, 0.09136190265417099, -0.015055961906909943, 0.16475817561149597, 0.05993620306253433, -0.1478670984506607, 0.07533511519432068, 0.012430447153747082, -0.009188505820930004, -0.2413695603609085, 0.06445866078138351, -0.11030661314725876, 0.0600612536072731, -0.23467718064785004, -0.13274475932121277, 0.016743158921599388, -0.24541637301445007, -0.1565467119216919, 0.1106051355600357, -0.3318857252597809, 0.004910583142191172, 0.07862711697816849, 0.009527101181447506, 0.07527048885822296, 0.061403218656778336, -0.11520199477672577, -0.09637682139873505, 0.03051120787858963, 0.09208851307630539, -0.0353282131254673, -0.005810904782265425, 0.06935310363769531, 0.13144072890281677, 0.2155546247959137, 0.06846852600574493, 0.19000692665576935, 0.10285297781229019, 0.030862445011734962, -0.1946166455745697, 0.1960054486989975, 0.2363915741443634, -0.22021809220314026, 0.08017557859420776, -0.16854053735733032, 0.14098398387432098, -0.03533478081226349, 0.0053327432833611965, 0.19518348574638367, 0.2316627949476242, 0.1402633637189865, 0.12104693800210953, 0.05495952442288399, -0.1989917755126953, -0.07438302785158157, 0.12100135535001755, 0.13444770872592926, 0.15131880342960358, -0.04752147197723389, 0.14582739770412445, -2.4751829124184145e-32, 0.07552304863929749, -0.028934737667441368, -0.1241811066865921, -0.03423504903912544, -0.18618682026863098, 0.04412323608994484, -0.19433699548244476, -0.05073279142379761, -0.15074898302555084, -0.1341303586959839, 0.017866581678390503, 0.17604143917560577, 0.11068694293498993, -0.10394386947154999, 0.03303176164627075, -0.06946411728858948, 0.027159925550222397, 0.18071267008781433, 0.164040207862854, 0.16249491274356842, 0.00705413892865181, 0.06710148602724075, 0.17479649186134338, 0.051865410059690475, -0.04404440149664879, -0.09746388345956802, -0.14332057535648346, -0.08262872695922852, 0.02689037285745144, -0.020056389272212982, 0.05186380073428154, 0.13794410228729248, -0.006892711389809847, -0.010753347538411617, -0.15943703055381775, -0.20138537883758545, -0.034202691167593, -0.12413711100816727, -0.23655694723129272, 0.07626650482416153, 0.1287866234779358, -0.044996339827775955, 0.21830515563488007, -0.26017189025878906, -0.06483389437198639, 0.13237453997135162, -0.027085019275546074, 0.09801001846790314, -0.16543841361999512, -0.1359703540802002, 0.06809669733047485, -0.0085581224411726, 0.07225432246923447, 0.16591423749923706, -0.06999412178993225, -0.22697921097278595, -0.1638832986354828, 0.08810847997665405, -0.05683295801281929, 0.06216247379779816, 0.18778705596923828, 0.02097814716398716, -0.04301988333463669, 0.023953082039952278, 0.08011691272258759, 0.006348443683236837, 0.36935776472091675, -0.1046595349907875, 0.18194575607776642, -0.0907299667596817, 0.06404231488704681, 0.11788888275623322, 0.022177444770932198, 0.08359402418136597, -0.03862662985920906, -0.0017510068137198687, 0.02257690764963627, 0.05824723839759827, -0.05638792738318443, -0.08351048082113266, 0.02797437645494938, 0.09321045130491257, 0.06652950495481491, -0.003931238315999508, -0.15504984557628632, -0.0574444979429245, -0.014961741864681244, 0.04153915494680405, 0.007865313440561295, -0.10315345227718353, 0.13029958307743073, 0.10718050599098206, -0.11633670330047607, -0.2813238799571991, -0.10421081632375717, 0.18796339631080627, 0.017102405428886414, 0.1325887143611908, -0.14974340796470642, -0.050898998975753784, 0.16693492233753204, -0.05486157909035683, -0.00466212909668684, 0.01639077439904213, 0.16878877580165863, 0.00045735284220427275, -0.058236014097929, 0.11919806152582169, -0.10417170822620392, 0.025945832952857018, 0.0872989296913147, -0.12332919239997864, 0.1298777312040329, 0.035376422107219696, 0.11361666768789291, -0.12026321142911911, 0.09892209619283676, -0.16090147197246552, 0.1839224249124527, 0.11837138235569, 0.05960895121097565, -0.03340383246541023, -0.1482240855693817, 0.061734236776828766, -0.04588189721107483, 0.09967929124832153, -0.13040359318256378, -0.02586500346660614, 0.015293652191758156, -0.04891001060605049, 0.03142368420958519, -0.012587688863277435, 7.055721766846546e-7, -0.20745018124580383, 0.185090571641922, 0.01136876456439495, -0.07042500376701355, -0.0676332488656044, 0.039338480681180954, -0.12814095616340637, 0.038437943905591965, -0.3442176878452301, 0.059757865965366364, 0.05474139004945755, 0.09294379502534866, -0.007710303645581007, 0.005720179527997971, 0.17555266618728638, -0.03421929478645325, -0.044827211648225784, 0.18801678717136383, -0.1790105700492859, 0.18782782554626465, 0.12956807017326355, 0.026689894497394562, 0.14596328139305115, -0.056557346135377884, 0.13396896421909332, -0.003920096904039383, -0.2680177688598633, -0.14271223545074463, 0.15117619931697845, 0.10426472127437592, -0.15217380225658417, -0.03873414173722267, 0.08674825727939606, 0.02761015295982361, 0.04051630571484566, -0.03534621372818947, 0.007131975144147873, -0.10542032122612, -0.0782988965511322, -0.08891701698303223, 0.10106027126312256, -0.05975673347711563, -0.06150118261575699, -0.17936134338378906, 0.06942173838615417, 0.11574004590511322, -0.008529656566679478, 0.002190133323892951, 0.09309142827987671, 0.05582279711961746, 0.04112754762172699, 0.11063351482152939, 0.08702071011066437, 0.2035871148109436, -0.06655271351337433, 0.07283776998519897, -0.0501621775329113, -0.0739140659570694, 0.05729905888438225, -0.05571984872221947, 0.0034532893914729357, 0.027867740020155907, 0.017646031454205513, 0.14373864233493805, 0.12661327421665192, -0.15729540586471558, 0.08228018879890442, 2.5350405242836876e-35, -0.048879534006118774, -0.02258145809173584, 0.09231089800596237, -0.23008324205875397, -0.026935473084449768, -0.048030778765678406, 0.1915391981601715, -0.07573392987251282, -0.06472356617450714, -0.17651952803134918, -0.12361235171556473 ]
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.2144216001033783, 0.011323048733174801, -0.03304164856672287, -0.04447931423783302, 0.15685239434242249, -0.035981666296720505, 0.10779058188199997, 0.007601566147059202, -0.13942758738994598, 0.09818879514932632, -0.056873422116041183, -0.025307929143309593, -0.07145829498767853, 0.04741523414850235, -0.04900968447327614, 0.08473880589008331, 0.0220355074852705, -0.021601475775241852, 0.02999376319348812, -0.060986004769802094, -0.13899940252304077, 0.14639407396316528, 0.06741572916507721, -0.07696222513914108, 0.018942872062325478, -0.12196265161037445, -0.09697555750608444, 0.008142905309796333, 0.016621651127934456, -0.2057753950357437, 0.16905049979686737, 0.08934023231267929, -0.12204371392726898, 0.14597882330417633, 0.00000487376019009389, 0.07316010445356369, 0.16248305141925812, -0.06146591901779175, -0.1779421865940094, -0.05488152056932449, 0.04344746097922325, 0.08381335437297821, 0.02667818032205105, -0.050145093351602554, -0.0469520129263401, -0.1358083039522171, -0.2344566285610199, -0.03435081988573074, 0.1457809954881668, 0.112190380692482, 0.03224552422761917, 0.048773668706417084, 0.14426185190677643, -0.1310582309961319, 0.09408320486545563, -0.07076158374547958, 0.05644557997584343, 0.1348455250263214, -0.10528305172920227, -0.05142805352807045, 0.04373203217983246, -0.04355424642562866, -0.0000618775375187397, 0.12211930006742477, 0.009328690357506275, -0.030518153682351112, -0.05735454708337784, -0.15617990493774414, 0.01459503173828125, 0.22563380002975464, -0.037514641880989075, -0.010920549742877483, -0.02343755029141903, -0.04452500864863396, -0.0769047737121582, -0.058364156633615494, 0.050007693469524384, 0.14540977776050568, -0.08193369954824448, 0.07539328187704086, -0.11419260501861572, -0.007797985337674618, 0.0878375917673111, -0.025863580405712128, -0.09089074283838272, -0.19541995227336884, -0.1854441612958908, 0.31699255108833313, 0.004291899967938662, -0.23094803094863892, 0.15488635003566742, -0.050524234771728516, -0.16645215451717377, 0.019460242241621017, -0.10214182734489441, -0.003359249560162425, -0.0903308242559433, -0.10112711042165756, -0.02402651682496071, -0.11593042314052582, -0.1199965700507164, -0.26547539234161377, -0.12027905881404877, 0.02041645720601082, 0.027244627475738525, 0.02532675676047802, -0.09228207170963287, 0.14298662543296814, 0.19910955429077148, -0.05840711668133736, -0.20988020300865173, 0.017391620203852654, -0.11411409825086594, -0.0945042297244072, 0.23059767484664917, 0.05282863602042198, 0.26180678606033325, 0.08243873715400696, 0.09224646538496017, 0.19794341921806335, -0.07449297606945038, -0.021844802424311638, -0.020210254937410355, 0.245191290974617, 0.20891979336738586, -0.10611941665410995, 0.0720970556139946, 0.07853039354085922, -0.011310982517898083, 0.004984418861567974, -0.002045784844085574, -0.012947142124176025, 0.09589312225580215, -0.046940870583057404, 0.23846137523651123, -0.23269085586071014, 0.09427785128355026, 0.09132273495197296, 0.025121290236711502, -0.04282765090465546, 0.023808063939213753, -0.15945708751678467, -0.10237392783164978, -0.0009147036471404135, 0.04824352636933327, 0.038566142320632935, 0.08955394476652145, -0.09768309444189072, -0.01849929615855217, 0.023887813091278076, -0.2839134633541107, 0.1348133087158203, -0.13976392149925232, 0.1555556356906891, 0.08155316859483719, 0.044138237833976746, 0.13072368502616882, -0.12544460594654083, -0.17467686533927917, -0.051054034382104874, 0.038464244455099106, 0.010370255447924137, 0.04120969399809837, -0.12986625730991364, 0.1371990591287613, 0.10963264107704163, 0.21407662332057953, -0.0007114616455510259, -0.03377064689993858, -0.011941828764975071, -0.06089858338236809, 0.11347322165966034, -0.12326990067958832, 0.0691547766327858, -0.25157418847084045, 0.07637841254472733, 0.02241373062133789, 0.012808236293494701, -0.2281045764684677, -0.005233886651694775, 0.02958790585398674, -0.2733631134033203, -0.15844915807247162, -0.13860513269901276, 0.18248169124126434, -0.07104094326496124, -0.0746399536728859, -0.10172440856695175, -0.06647592037916183, 0.006447676569223404, -0.06471026688814163, 0.12042802572250366, -0.009137445129454136, -0.06530140340328217, 0.09746889024972916, -0.028501085937023163, 0.07572495937347412, -0.06538636982440948, -0.008339261636137962, -0.1680091768503189, -0.0768657922744751, -0.032473091036081314, 0.014908989891409874, 0.0029167511966079473, 0.03956858068704605, 0.10556754469871521, -0.1335982233285904, 0.21320995688438416, -0.11983850598335266, -0.1983838528394699, -0.08325771242380142, -0.05274636670947075, 0.1402917057275772, 0.12187360972166061, -0.14869506657123566, 0.13470236957073212, -0.018042510375380516, -0.022686820477247238, 0.024156752973794937, 0.12381451576948166, 0.020748794078826904, 0.06569136679172516, 0.020884618163108826, -0.09194529801607132, 0.009367518126964569, 0.06173352897167206, -0.1571323275566101, -0.08442173898220062, -0.07384758442640305, 0.06834118068218231, -0.12692439556121826, -0.0018199131591245532, -0.025649359449744225, 0.07461436092853546, -0.13475055992603302, -0.16970716416835785, 0.040657855570316315, -0.15939664840698242, 0.16836072504520416, -0.21251492202281952, -0.120600126683712, 0.09617771953344345, 0.019075576215982437, -0.028671156615018845, -0.00819205492734909, 0.13504569232463837, -0.0192885585129261, 0.1761171519756317, -0.045662958174943924, -0.16165414452552795, 0.07789354771375656, 0.03876699134707451, -0.03732381388545036, 0.13364164531230927, 0.029844390228390694, -0.20316950976848602, 0.06391043961048126, 0.21621908247470856, -0.02841583453118801, 0.01639782264828682, 0.19891390204429626, -0.03223837912082672, 0.007521624211221933, -0.10860950499773026, 0.12106028944253922, -0.02151043899357319, 0.05018613114953041, 0.17800992727279663, -0.0755186527967453, 0.08861018717288971, 0.07755738496780396, -0.00650812778621912, -0.05115983635187149, -0.10046039521694183, 0.031877096742391586, -0.1404058039188385, -0.06970933824777603, -0.04136790707707405, -0.0510467030107975, -0.06610061228275299, -0.07401353120803833, 0.04192541539669037, 0.06896933168172836, -0.09218045324087143, 0.03237563744187355, 0.058482665568590164, -0.15161024034023285, -0.07797756791114807, -0.08533837646245956, 0.21542233228683472, 0.042483314871788025, -0.035104747861623764, -0.006974298506975174, -0.24151965975761414, 0.046641089022159576, -0.06836879998445511, -0.08394996076822281, -0.08333221077919006, -0.11312584578990936, 0.09563661366701126, -0.04596979543566704, 0.027932805940508842, 0.09301894158124924, -0.13689960539340973, 0.12568087875843048, -0.008673414587974548, 0.2646964192390442, 0.19446983933448792, 0.03867146745324135, -0.17516644299030304, 0.057368043810129166, -0.12751838564872742, 0.11410830914974213, 0.16331884264945984, 0.11048626899719238, 0.13594798743724823, -0.030811786651611328, -0.18307611346244812, 0.09838844835758209, 0.04157041013240814, -0.029208103194832802, 0.03230482339859009, -0.15886002779006958, 0.02525630034506321, -0.04372410103678703, 0.004734706599265337, -0.05963611230254173, 0.0238974429666996, 0.039712414145469666, -0.15715281665325165, -0.012946804985404015, 0.12989792227745056, -0.1816605031490326, -0.15322667360305786, 0.002252041595056653, -0.03543476015329361, -0.19614432752132416, 0.0002640215097926557, 0.14993242919445038, 0.10134653002023697, 0.001558063318952918, 0.037265412509441376, -0.13659532368183136, -0.027392523363232613, 0.10731294006109238, -0.1519545316696167, 0.17477813363075256, -0.12437321990728378, 0.21290525794029236, -0.004697535652667284, -0.06697752326726913, 0.1166868656873703, 0.024310804903507233, -0.1033364087343216, -0.08385352045297623, 0.12126150727272034, -0.14261995255947113, 0.04129544273018837, -0.09373597800731659, 0.021758727729320526, 0.05963779613375664, -0.049704935401678085, 0.14466506242752075, 0.13859772682189941, -0.10305871069431305, 0.18724127113819122, -0.0007174824131652713, 0.010700326412916183, -0.02120065689086914, -0.24870312213897705, -0.09720832854509354, 0.09474962204694748, 0.07943091541528702, 0.022547222673892975, -0.02556604892015457, -0.22631438076496124, 0.07448490709066391, -0.10033457726240158, -0.09564858675003052, -0.07458014041185379, 0.052500687539577484, -0.08309002220630646, -0.040938861668109894, -0.10365226119756699, 0.018577439710497856, 0.031053349375724792, 0.0995856523513794, -0.08596205711364746, -0.10435043275356293, -0.07788047194480896, 0.13930614292621613, 0.05569854751229286, -0.08614791184663773, 0.1216416209936142, 0.015519336797297001, -0.21178211271762848, 0.03516153618693352, 0.1504727602005005, 0.07766717672348022, 0.048357367515563965, -0.05201699584722519, 0.3724389672279358, -0.08430510759353638, 0.20572753250598907, 0.09157012403011322, 0.03368540480732918, 0.10651777684688568, -0.0938078761100769, 0.0452607236802578, 0.0751056894659996, 0.1041884496808052, 0.02043851837515831, 0.09281744062900543, 0.061409495770931244, 0.07192516326904297, -0.05301026999950409, -0.05784897133708, -0.1980128139257431, -0.08005906641483307, -0.1751638650894165, -0.328082799911499, -0.16391444206237793, 0.08809535205364227, 0.06557271629571915, -0.0597025491297245, 0.06427785754203796, -0.002148872474208474, -0.024815239012241364, 0.14225579798221588, 0.08758760988712311, 0.10929948836565018, 0.15175209939479828, 0.18781612813472748, 0.14579570293426514, 0.1315513402223587, -0.04403388500213623, 0.3960861563682556, -0.017226604744791985, 0.007262634113430977, -0.07620175182819366, -0.0839562714099884, -0.13114139437675476, 0.11977769434452057, -0.12768398225307465, 0.12364908307790756, -0.07969217747449875, 0.007255439180880785, -0.02405877783894539, 0.03271225467324257, -0.060249630361795425, -0.21454200148582458, -0.105371855199337, -0.08756483346223831, -0.1285904198884964, 0.06503669172525406, -0.0416974201798439, 0.13029402494430542, -0.07819467782974243, -0.033151306211948395, 0.18419238924980164, -0.13367871940135956, 0.00907818041741848, -0.12448053061962128, 0.118401899933815, -0.0264921635389328, -0.14301936328411102, 0.10515986382961273, -0.025280047208070755, 0.07893821597099304, -0.06639112532138824, -0.09083075076341629, 0.12810061872005463, -0.04499885439872742, -0.11103236675262451, 0.16025808453559875, -0.025844190269708633, 0.04906188324093819, -0.05347583070397377, -0.0454942062497139, 0.0028091787826269865, 0.11560370028018951, -0.013201615773141384, 0.07004693150520325, 0.01497952826321125, -0.038860637694597244, 0.020892905071377754, 0.3520875871181488, -0.01054870430380106, 0.11852352321147919, 0.02969426102936268, -0.16901542246341705, -0.18944986164569855, -0.0347587950527668, -0.03066994808614254, 0.06566942483186722, -0.06761591881513596, 0.0024552245158702135, 0.09465250372886658, -0.02164207398891449, 0.17555184662342072, 0.06640708446502686, -0.1435564160346985, 0.07626066356897354, 0.00817133393138647, -0.011709428392350674, -0.2505366802215576, 0.07212024182081223, -0.11141812801361084, 0.06192619353532791, -0.23737743496894836, -0.13235808908939362, 0.020956872031092644, -0.24472622573375702, -0.15539224445819855, 0.1043529137969017, -0.31941309571266174, 0.008009081706404686, 0.07590675354003906, -0.00868088286370039, 0.07588038593530655, 0.07049434632062912, -0.11152123659849167, -0.08984097093343735, 0.02845642901957035, 0.09461987018585205, -0.029649849981069565, -0.0009122664341703057, 0.08576061576604843, 0.13299375772476196, 0.20933227241039276, 0.07365567982196808, 0.19744910299777985, 0.10792941600084305, 0.029708752408623695, -0.1984247863292694, 0.21084865927696228, 0.2292693853378296, -0.2134246528148651, 0.08344292640686035, -0.15483832359313965, 0.15201902389526367, -0.04050245136022568, 0.00750256422907114, 0.21099257469177246, 0.23396481573581696, 0.16018053889274597, 0.1214604303240776, 0.056730326265096664, -0.20469169318675995, -0.08290170133113861, 0.10834638774394989, 0.1370447427034378, 0.1542554795742035, -0.04524717479944229, 0.13794568181037903, -2.463624129529985e-32, 0.07234946638345718, -0.037085190415382385, -0.12556783854961395, -0.03598640486598015, -0.20199266076087952, 0.04300621151924133, -0.20411616563796997, -0.04914084076881409, -0.15679332613945007, -0.13487687706947327, 0.009886118583381176, 0.17432741820812225, 0.1040089800953865, -0.1052645817399025, 0.030273767188191414, -0.064795583486557, 0.01779543235898018, 0.17962515354156494, 0.1645958423614502, 0.16256393492221832, -0.0052396017126739025, 0.06785428524017334, 0.17363131046295166, 0.05439096689224243, -0.05334728583693504, -0.0919681042432785, -0.1482522189617157, -0.07693799585103989, 0.015604297630488873, -0.02223690040409565, 0.05282600596547127, 0.13494156301021576, 0.002181215677410364, -0.01593499258160591, -0.1555338352918625, -0.18726560473442078, -0.028806041926145554, -0.1312745362520218, -0.23507897555828094, 0.08382020145654678, 0.13574644923210144, -0.044497180730104446, 0.20730789005756378, -0.27884313464164734, -0.054680366069078445, 0.14667537808418274, -0.019377028569579124, 0.09135936200618744, -0.1584392935037613, -0.14241507649421692, 0.07440738379955292, -0.011872912757098675, 0.06498555094003677, 0.17554832994937897, -0.06218833103775978, -0.21595005691051483, -0.17236368358135223, 0.0919627994298935, -0.056774433702230453, 0.0520310252904892, 0.18163320422172546, 0.019060296937823296, -0.0339169055223465, 0.02798979915678501, 0.0850447416305542, 0.006144179031252861, 0.36816003918647766, -0.10899773240089417, 0.17586034536361694, -0.09853631258010864, 0.0681772530078888, 0.12473965436220169, 0.01624421216547489, 0.08264189958572388, -0.04351377487182617, -0.0032077503856271505, 0.030091542750597, 0.05450313910841942, -0.049508944153785706, -0.07110297679901123, 0.03176017105579376, 0.10564030706882477, 0.0779258981347084, -0.0046428777277469635, -0.14968203008174896, -0.05259156972169876, -0.017689848318696022, 0.03936312720179558, 0.001905491342768073, -0.09562337398529053, 0.13647635281085968, 0.10910974442958832, -0.11574513465166092, -0.28998899459838867, -0.10223661363124847, 0.18548132479190826, 0.02599618025124073, 0.1299709528684616, -0.1515410840511322, -0.05470622330904007, 0.15541698038578033, -0.06488782167434692, -0.00795428641140461, 0.026552937924861908, 0.17898453772068024, -0.002742462558671832, -0.05465229973196983, 0.1120942234992981, -0.09782664477825165, 0.025479478761553764, 0.08589235693216324, -0.12894092500209808, 0.1364799290895462, 0.04269242659211159, 0.11243252456188202, -0.11532079428434372, 0.09770091623067856, -0.1700034737586975, 0.18648821115493774, 0.11593803763389587, 0.04639990255236626, -0.03385118022561073, -0.1594909131526947, 0.05585414543747902, -0.053425900638103485, 0.09781155735254288, -0.12729261815547943, -0.01918000727891922, 0.011624910868704319, -0.05226830765604973, 0.02657884918153286, -0.01194289606064558, 7.010081617409014e-7, -0.2247743159532547, 0.18912599980831146, -0.0046002669259905815, -0.07773537933826447, -0.07453539222478867, 0.029606478288769722, -0.1274176388978958, 0.03799574449658394, -0.3386428952217102, 0.05927889421582222, 0.05681493505835533, 0.0933411717414856, -0.010447396896779537, 0.003824942745268345, 0.16237345337867737, -0.03964952006936073, -0.04294966906309128, 0.1886078268289566, -0.1596563309431076, 0.1854211986064911, 0.13225017488002777, 0.03668887913227081, 0.16407154500484467, -0.05344443768262863, 0.1309773474931717, 0.007609854452311993, -0.2778845727443695, -0.14387302100658417, 0.15430738031864166, 0.10201800614595413, -0.1612599790096283, -0.036669276654720306, 0.07448690384626389, 0.034692052751779556, 0.04144331440329552, -0.05426332727074623, 0.001227536122314632, -0.12483222037553787, -0.07338660955429077, -0.07798691838979721, 0.10563059151172638, -0.04242619127035141, -0.06519815325737, -0.18158583343029022, 0.07535526156425476, 0.10919344425201416, -0.004053452983498573, 0.002932050032541156, 0.08983433246612549, 0.06014666706323624, 0.046348463743925095, 0.11153405159711838, 0.08560872822999954, 0.2029111087322235, -0.0662359669804573, 0.07665269821882248, -0.05735298618674278, -0.07168320566415787, 0.057042621076107025, -0.050335198640823364, -0.010352618992328644, 0.029882891103625298, 0.012466171756386757, 0.14308713376522064, 0.1260170042514801, -0.15574322640895844, 0.07330098003149033, 8.1291432365204e-36, -0.05204668268561363, -0.03240557014942169, 0.08709654957056046, -0.23294711112976074, -0.026049165055155754, -0.04662370681762695, 0.19076907634735107, -0.08042091131210327, -0.05941765755414963, -0.18485473096370697, -0.11655239015817642 ]
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.21190251410007477, 0.011038074269890785, -0.028786206617951393, -0.044868435710668564, 0.16886526346206665, -0.027667615562677383, 0.09604019671678543, -0.012177802622318268, -0.14726194739341736, 0.10150674730539322, -0.0494728609919548, -0.018256008625030518, -0.06791713088750839, 0.05162176489830017, -0.051198914647102356, 0.07914102077484131, 0.020750464871525764, -0.04109516367316246, 0.02460305020213127, -0.06837952882051468, -0.1476452648639679, 0.15186792612075806, 0.05491463094949722, -0.06330423057079315, 0.007468414027243853, -0.10968458652496338, -0.09023422002792358, 0.00918829720467329, 0.02481062151491642, -0.22027426958084106, 0.1778712123632431, 0.0808841809630394, -0.1340956836938858, 0.1371147334575653, 0.000004888389867119258, 0.08037220686674118, 0.1605592966079712, -0.06714038550853729, -0.18171802163124084, -0.04608922824263573, 0.03453215956687927, 0.08279523998498917, 0.023512233048677444, -0.06529805809259415, -0.056654151529073715, -0.13073037564754486, -0.22693656384944916, -0.030547205358743668, 0.15026940405368805, 0.10393714904785156, 0.036059871315956116, 0.055417925119400024, 0.1503896415233612, -0.1143500879406929, 0.10397305339574814, -0.09704405069351196, 0.05954917147755623, 0.11672307550907135, -0.11456580460071564, -0.05612787976861, 0.050206076353788376, -0.04845024645328522, -0.0036028961185365915, 0.11560574918985367, 0.008183570578694344, -0.03878900408744812, -0.0743778720498085, -0.17672070860862732, 0.007850333116948605, 0.21308684349060059, -0.030975639820098877, -0.006132547743618488, -0.010731324553489685, -0.02917279489338398, -0.07976152002811432, -0.05705944821238518, 0.04340314120054245, 0.12998241186141968, -0.07935907691717148, 0.07582975178956985, -0.12053818255662918, 0.0075287288054823875, 0.0928439199924469, -0.014751529321074486, -0.10899949818849564, -0.16280871629714966, -0.1740477830171585, 0.322214812040329, 0.011878184042870998, -0.2174975872039795, 0.1768854409456253, -0.05869223549962044, -0.1660647839307785, 0.02336154505610466, -0.1063888818025589, 0.0013676268281415105, -0.09643319249153137, -0.08420584350824356, -0.028350604698061943, -0.1190519779920578, -0.12187784165143967, -0.2565358579158783, -0.11297659575939178, 0.029878538101911545, 0.0399223230779171, 0.013490754179656506, -0.08211210370063782, 0.13359776139259338, 0.1912471055984497, -0.058042675256729126, -0.2214518040418625, 0.013241132721304893, -0.10460811108350754, -0.08965688943862915, 0.2344062179327011, 0.041394688189029694, 0.26797550916671753, 0.09522862732410431, 0.10203497856855392, 0.18141315877437592, -0.08512545377016068, -0.014995424076914787, -0.024862375110387802, 0.23914343118667603, 0.215094193816185, -0.08502230048179626, 0.08050476759672165, 0.07612551003694534, -0.016210928559303284, 0.028444088995456696, -0.006074217148125172, -0.013692144304513931, 0.1029784232378006, -0.0395214669406414, 0.23974253237247467, -0.2241210788488388, 0.10417579859495163, 0.08484318107366562, 0.04494519159197807, -0.04220247268676758, 0.013959154486656189, -0.1511523574590683, -0.09942357987165451, 0.0075715770944952965, 0.04796644300222397, 0.054363202303647995, 0.08205094933509827, -0.09806156158447266, -0.017604870721697807, 0.029570002108812332, -0.2934260070323944, 0.14354391396045685, -0.14781801402568817, 0.1560056507587433, 0.07509376108646393, 0.042192939668893814, 0.12031722068786621, -0.13386963307857513, -0.16964304447174072, -0.062161173671483994, 0.04432423412799835, 0.017713308334350586, 0.037816375494003296, -0.13132506608963013, 0.13155707716941833, 0.11096153408288956, 0.2196333110332489, 0.004446707665920258, -0.02053893357515335, -0.018049154430627823, -0.05615338683128357, 0.1075906977057457, -0.12670515477657318, 0.0836598128080368, -0.24552418291568756, 0.10665963590145111, 0.017603952437639236, -0.009601190686225891, -0.21015216410160065, -0.026761116459965706, 0.03017294779419899, -0.27281054854393005, -0.18061651289463043, -0.14836902916431427, 0.16587558388710022, -0.08296377956867218, -0.08318223059177399, -0.1021033376455307, -0.062086354941129684, 0.010843155905604362, -0.07140161097049713, 0.10807810723781586, 0.0036912711802870035, -0.0754929706454277, 0.08219806849956512, -0.035523299127817154, 0.08113930374383926, -0.05872340872883797, 0.005064156837761402, -0.17752434313297272, -0.07844112813472748, -0.03814209997653961, 0.010365082882344723, 0.010409444570541382, 0.024153299629688263, 0.11600415408611298, -0.1515621840953827, 0.2199667990207672, -0.13577324151992798, -0.20562146604061127, -0.08327879011631012, -0.059066981077194214, 0.1374804824590683, 0.12660889327526093, -0.15638816356658936, 0.13865165412425995, -0.005607126746326685, -0.04059654474258423, 0.020620081573724747, 0.11978667974472046, 0.020750809460878372, 0.04572760686278343, 0.004863318055868149, -0.09364600479602814, 0.00633540702983737, 0.05922764539718628, -0.15770244598388672, -0.08277709782123566, -0.08883015811443329, 0.06741493940353394, -0.10645496845245361, 0.005267860367894173, -0.028202874585986137, 0.07538866996765137, -0.12057323008775711, -0.16006851196289062, 0.04051453247666359, -0.15387113392353058, 0.16765429079532623, -0.19468891620635986, -0.12222827225923538, 0.10455156117677689, 0.040493033826351166, -0.03615628555417061, -0.01520601287484169, 0.12928026914596558, -0.006631548050791025, 0.17904122173786163, -0.05211419239640236, -0.16320927441120148, 0.07254918664693832, 0.04511743783950806, -0.0342458076775074, 0.14151345193386078, 0.01236884854733944, -0.21261577308177948, 0.04605189710855484, 0.20925575494766235, -0.017826318740844727, 0.01756359077990055, 0.1876836121082306, -0.03188694640994072, 0.014261487871408463, -0.10602375119924545, 0.11699949949979782, -0.017379118129611015, 0.03900681063532829, 0.17962735891342163, -0.062330543994903564, 0.08381642401218414, 0.08991454541683197, -0.01073574461042881, -0.03495132923126221, -0.09600624442100525, 0.033900320529937744, -0.11904770880937576, -0.07620072364807129, -0.056632623076438904, -0.05115541070699692, -0.07013368606567383, -0.05965495854616165, 0.05271732062101364, 0.05973420292139053, -0.08783235400915146, 0.030231287702918053, 0.05211073160171509, -0.15446992218494415, -0.06839729100465775, -0.09834412485361099, 0.2222961038351059, 0.03898119553923607, -0.05768340453505516, -0.017326630651950836, -0.23799866437911987, 0.05386388674378395, -0.05732854828238487, -0.08689388632774353, -0.07265091687440872, -0.1066393107175827, 0.09455842524766922, -0.047843895852565765, 0.016409607604146004, 0.09661967307329178, -0.1344829946756363, 0.12358070909976959, 0.0008301642956212163, 0.25483715534210205, 0.19179119169712067, 0.05242876708507538, -0.16512443125247955, 0.04377060383558273, -0.13319255411624908, 0.11203400790691376, 0.16714715957641602, 0.11180312931537628, 0.14577952027320862, -0.03382140398025513, -0.20163953304290771, 0.09099734574556351, 0.04011976718902588, -0.031215060502290726, 0.02946276217699051, -0.15276211500167847, 0.014479108154773712, -0.029149942100048065, -0.008827871643006802, -0.07118567824363708, 0.03529348596930504, 0.01653522066771984, -0.14253109693527222, -0.011766699142754078, 0.11495985090732574, -0.17012231051921844, -0.14605613052845, -0.011975801549851894, -0.049519285559654236, -0.19805565476417542, -0.0006092286785133183, 0.15245980024337769, 0.10678771138191223, -0.014810722321271896, 0.03039555624127388, -0.13419805467128754, -0.01839037425816059, 0.10525874048471451, -0.15744368731975555, 0.1592825949192047, -0.10910572111606598, 0.20658591389656067, -0.0032456202898174524, -0.04441160708665848, 0.12454241514205933, 0.021645432338118553, -0.10150539875030518, -0.08700958639383316, 0.10918863117694855, -0.14876925945281982, 0.0447390191257, -0.0764467641711235, 0.017461417242884636, 0.05207659676671028, -0.05360031500458717, 0.157032310962677, 0.14629316329956055, -0.09532568603754044, 0.1822470873594284, -0.01158144325017929, 0.002576592145487666, -0.021505281329154968, -0.24392272531986237, -0.06507078558206558, 0.1045258566737175, 0.09402129799127579, 0.022463859990239143, -0.020992573350667953, -0.23252728581428528, 0.0804925262928009, -0.08478585630655289, -0.1213214248418808, -0.08565439283847809, 0.053981080651283264, -0.06137903779745102, -0.04507577419281006, -0.0918826088309288, 0.03548163175582886, 0.03472279757261276, 0.0955851823091507, -0.08586535602807999, -0.10048860311508179, -0.09106040000915527, 0.13954275846481323, 0.06665825843811035, -0.06509185582399368, 0.11555902659893036, 0.007450494449585676, -0.19638049602508545, 0.050808850675821304, 0.16646187007427216, 0.06275536119937897, 0.06917361170053482, -0.06462148576974869, 0.36509835720062256, -0.09156226366758347, 0.2130894511938095, 0.10402579605579376, 0.03573222830891609, 0.12052514404058456, -0.10381115972995758, 0.05052562430500984, 0.07259266823530197, 0.09842146188020706, 0.010079712606966496, 0.08324194699525833, 0.06990150362253189, 0.06923892349004745, -0.05007395148277283, -0.048564326018095016, -0.21282342076301575, -0.07857789844274521, -0.17889553308486938, -0.33557724952697754, -0.16639865934848785, 0.08871039003133774, 0.06869441270828247, -0.05607573315501213, 0.06143360957503319, -0.008750689215958118, -0.016174716874957085, 0.14138656854629517, 0.08671451359987259, 0.10882001370191574, 0.14083179831504822, 0.1687624305486679, 0.1374090015888214, 0.11529512703418732, -0.09018205851316452, 0.3917786777019501, -0.009332863613963127, 0.025280945003032684, -0.08292445540428162, -0.09447799623012543, -0.1235404834151268, 0.10856486856937408, -0.14298507571220398, 0.12762930989265442, -0.08924216777086258, -0.006721430458128452, -0.03080574981868267, 0.043440788984298706, -0.03581495210528374, -0.22282832860946655, -0.1002761498093605, -0.06937304884195328, -0.11494005471467972, 0.06007795035839081, -0.04264667257666588, 0.13754971325397491, -0.06669467687606812, -0.0300393458455801, 0.18179742991924286, -0.128329336643219, 0.010574045591056347, -0.1254580169916153, 0.1267801821231842, -0.024505730718374252, -0.1334080547094345, 0.12026160955429077, -0.029040534049272537, 0.07790796458721161, -0.06095512956380844, -0.07406672090291977, 0.12859313189983368, -0.0385354608297348, -0.13631147146224976, 0.15704528987407684, -0.018508952111005783, 0.05751261115074158, -0.058864038437604904, -0.025387994945049286, -0.006729788146913052, 0.09946170449256897, -0.003965192008763552, 0.0548393689095974, -0.0032372192945331335, -0.02992399036884308, 0.007120093330740929, 0.3441586494445801, -0.010432922281324863, 0.12427045404911041, 0.023987965658307076, -0.17465099692344666, -0.17665334045886993, -0.030519036576151848, -0.033807870000600815, 0.06383445858955383, -0.043715860694646835, 0.006466173101216555, 0.09192194044589996, 0.007854103110730648, 0.1563902497291565, 0.06891489773988724, -0.14789313077926636, 0.07503604143857956, 0.006532337050884962, -0.0028633682522922754, -0.24144628643989563, 0.07479721307754517, -0.14313051104545593, 0.05631468445062637, -0.23524010181427002, -0.1434771865606308, 0.024635978043079376, -0.23750892281532288, -0.15845006704330444, 0.12497639656066895, -0.31238991022109985, 0.002091323956847191, 0.07577042281627655, 0.015025164932012558, 0.08948158472776413, 0.07167630642652512, -0.10779812932014465, -0.11188212782144547, 0.02864130027592182, 0.11092918366193771, -0.020313283428549767, 0.00440661795437336, 0.08524719625711441, 0.13966436684131622, 0.19883397221565247, 0.06263900548219681, 0.20927532017230988, 0.10906391590833664, 0.03334841877222061, -0.2005774825811386, 0.20402441918849945, 0.2263026237487793, -0.22163133323192596, 0.06939152628183365, -0.1459687054157257, 0.13616418838500977, -0.036750514060258865, 0.03011581487953663, 0.1978348046541214, 0.22559358179569244, 0.1508546769618988, 0.11005286127328873, 0.05982125923037529, -0.21399642527103424, -0.08047864586114883, 0.13612569868564606, 0.12558338046073914, 0.1383386105298996, -0.050634726881980896, 0.15222527086734772, -2.498070962923275e-32, 0.0708785355091095, -0.050245244055986404, -0.1239759549498558, -0.032669227570295334, -0.19375550746917725, 0.04801980406045914, -0.18034693598747253, -0.04877029359340668, -0.1563677042722702, -0.14314334094524384, 0.02005656622350216, 0.1508273035287857, 0.11343102157115936, -0.09640726447105408, 0.03838691487908363, -0.03873937577009201, 0.02582293003797531, 0.17653393745422363, 0.15523196756839752, 0.15673907101154327, -0.012963341549038887, 0.05423150584101677, 0.17483828961849213, 0.06263864040374756, -0.029994508251547813, -0.1063627153635025, -0.14339418709278107, -0.07152761518955231, 0.031012706458568573, -0.02045861817896366, 0.04120134934782982, 0.13602174818515778, -0.0023223271127790213, 0.023238448426127434, -0.17544765770435333, -0.1900206059217453, -0.007575217634439468, -0.12282269448041916, -0.22813287377357483, 0.07428118586540222, 0.1404324769973755, -0.07363436371088028, 0.2300959825515747, -0.2750049829483032, -0.06923652440309525, 0.1488918662071228, -0.02161187119781971, 0.0977538675069809, -0.1495174765586853, -0.1134897843003273, 0.07163826376199722, -0.013082945719361305, 0.06604652106761932, 0.1676793247461319, -0.08095548301935196, -0.23623500764369965, -0.17298229038715363, 0.06906580924987793, -0.08358531445264816, 0.05997872352600098, 0.1687081754207611, 0.022038033232092857, -0.040598612278699875, 0.008060421794652939, 0.07496603578329086, 0.007240609265863895, 0.3660552203655243, -0.11831015348434448, 0.18889451026916504, -0.11105506122112274, 0.06470528990030289, 0.11533451080322266, 0.027184028178453445, 0.09153881669044495, -0.025928806513547897, -0.0079894308000803, 0.01650981418788433, 0.055601514875888824, -0.07071737200021744, -0.06917932629585266, 0.03434424847364426, 0.09334878623485565, 0.0778643861413002, 0.008155754767358303, -0.1583547741174698, -0.056919682770967484, -0.003874985035508871, 0.03737769275903702, 0.0013335637049749494, -0.0894179567694664, 0.13205423951148987, 0.11120978742837906, -0.11462263017892838, -0.28136318922042847, -0.10193238407373428, 0.17131876945495605, 0.01890331692993641, 0.12949037551879883, -0.14995302259922028, -0.04508468508720398, 0.170066699385643, -0.05401359125971794, -0.006063008215278387, 0.03013901598751545, 0.16774360835552216, 0.0010378779843449593, -0.05379432439804077, 0.1261189728975296, -0.10707323998212814, 0.033060573041439056, 0.0889199748635292, -0.11690861731767654, 0.13560594618320465, 0.041771069169044495, 0.1242707222700119, -0.12378167361021042, 0.09792324900627136, -0.18334992229938507, 0.18288040161132812, 0.10055582225322723, 0.049558375030756, -0.04425489529967308, -0.14937181770801544, 0.07186653465032578, -0.06572427600622177, 0.10830593854188919, -0.13200780749320984, -0.005897321738302708, -0.011902662925422192, -0.042639873921871185, 0.038238588720560074, -0.007771304342895746, 7.065559657348786e-7, -0.2057344913482666, 0.19342021644115448, -0.0051043652929365635, -0.07940201461315155, -0.0729137733578682, 0.03173280879855156, -0.1438845843076706, 0.03815193846821785, -0.33294451236724854, 0.05615781247615814, 0.0406615287065506, 0.08813361823558807, -0.020322641357779503, 0.009161741472780704, 0.14894668757915497, -0.025447774678468704, -0.03138550743460655, 0.1760386824607849, -0.1742860972881317, 0.17124687135219574, 0.13128933310508728, 0.027234569191932678, 0.15055422484874725, -0.05128083750605583, 0.1298520863056183, -0.0014258658047765493, -0.2675214111804962, -0.12936608493328094, 0.14647957682609558, 0.08141129463911057, -0.16767418384552002, -0.06150442361831665, 0.08476150035858154, 0.031181734055280685, 0.04519449546933174, -0.028023192659020424, 0.0034953581634908915, -0.10445577651262283, -0.08431932330131531, -0.10342563688755035, 0.09860827773809433, -0.059289246797561646, -0.055613454431295395, -0.16852329671382904, 0.06080912426114082, 0.10491039603948593, -0.005021337885409594, 0.024959219619631767, 0.08899219334125519, 0.0556904561817646, 0.03642280772328377, 0.10237528383731842, 0.10538079589605331, 0.19906632602214813, -0.0650009885430336, 0.08026720583438873, -0.04324116185307503, -0.07212745398283005, 0.05154843628406525, -0.06834541261196136, -0.015132341533899307, 0.02974173054099083, 0.014566001482307911, 0.14232534170150757, 0.1256307065486908, -0.1553794890642166, 0.08173069357872009, 2.555686865735557e-35, -0.045346394181251526, -0.03245529159903526, 0.10076688230037689, -0.2274337261915207, -0.04021196812391281, -0.04680009186267853, 0.18545058369636536, -0.08227667212486267, -0.04422039911150932, -0.18970145285129547, -0.11462339013814926 ]
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.09444061666727066, 0.2910439670085907, -0.015119114890694618, 0.18122662603855133, 0.27924343943595886, 0.08069087564945221, 0.2930874526500702, -0.10110057890415192, 0.037765104323625565, -0.003940965980291367, -0.20626486837863922, 0.10298094153404236, -0.11681009829044342, -0.0755932629108429, -0.09938933700323105, -0.014582134783267975, -0.03077668882906437, -0.11556243151426315, 0.13394863903522491, -0.07540985196828842, -0.1729133576154709, -0.0017890596063807607, 0.08395478129386902, -0.1533719152212143, -0.06809429079294205, -0.011804974637925625, 0.02094140276312828, 0.05269384756684303, 0.07273153960704803, -0.19994467496871948, 0.1991126388311386, 0.03381844237446785, -0.15726105868816376, 0.1517089307308197, 0.000005465522463055095, 0.0836181789636612, 0.048587724566459656, -0.09196601063013077, -0.0019591068848967552, -0.18973009288311005, 0.003511221380904317, -0.09443843364715576, -0.002774906577542424, -0.059557922184467316, 0.06336332857608795, -0.0355551615357399, 0.022174036130309105, 0.024426141753792763, -0.004480266012251377, 0.015153543092310429, -0.10555968433618546, 0.051345959305763245, -0.07461835443973541, -0.05754514038562775, 0.06962428241968155, -0.04146234318614006, 0.09376424551010132, 0.0017672395333647728, -0.1634945422410965, 0.035683151334524155, 0.03777480497956276, 0.15509073436260223, -0.052558813244104385, 0.03106747940182686, 0.04745694249868393, 0.06089039891958237, -0.22706447541713715, -0.12205728143453598, -0.03995063528418541, 0.1518738716840744, -0.026245737448334694, 0.05093998834490776, -0.11233983933925629, 0.0014812815934419632, 0.058287233114242554, -0.18518711626529694, 0.019084205850958824, -0.01256873831152916, 0.020915186032652855, 0.03238215669989586, 0.009187852032482624, 0.053716991096735, 0.02159651555120945, -0.06389503926038742, -0.15943874418735504, 0.12991029024124146, -0.0827629566192627, 0.052258994430303574, -0.08014995604753494, -0.046412739902734756, 0.027626877650618553, -0.04831813648343086, -0.09797418117523193, -0.10385501384735107, 0.11304539442062378, -0.04548853263258934, -0.14902061223983765, 0.005624172277748585, -0.02116263285279274, 0.03538201004266739, 0.0020821711514145136, 0.013331892900168896, -0.15865710377693176, 0.25504258275032043, 0.041949693113565445, -0.1561160534620285, 0.06401312351226807, 0.09819479286670685, 0.0487627349793911, -0.07165437936782837, 0.04735288769006729, 0.07546544820070267, -0.07053864747285843, 0.09472030401229858, 0.09947952628135681, 0.15428853034973145, 0.13281403481960297, 0.0546480268239975, -0.20265641808509827, 0.04189208522439003, -0.04131598398089409, 0.04378366470336914, -0.014019589871168137, 0.12809745967388153, 0.07203225046396255, 0.06743665039539337, 0.02176259085536003, -0.011288750916719437, 0.08342745155096054, -0.07248355448246002, 0.04558290168642998, 0.007672072388231754, 0.13264618813991547, -0.0748998373746872, 0.07730809599161148, 0.1812903732061386, 0.1179167777299881, 0.009028992615640163, -0.205460324883461, -0.019749311730265617, -0.018056238070130348, 0.014451999217271805, 0.15013355016708374, 0.07151233404874802, -0.018206248059868813, 0.009025118313729763, 0.11619927734136581, -0.14166714251041412, -0.15446975827217102, -0.12407544255256653, -0.1848243921995163, 0.31334206461906433, -0.24023543298244476, 0.0809384360909462, -0.09702501446008682, -0.013610622845590115, 0.03929606080055237, -0.08803405612707138, -0.16465722024440765, -0.045917682349681854, 0.17083291709423065, 0.042562127113342285, 0.08941963315010071, -0.11790863424539566, 0.007717551663517952, -0.03414131700992584, -0.0783471092581749, -0.13872621953487396, 0.10906730592250824, -0.15910974144935608, -0.033207397907972336, -0.12074663490056992, 0.01883038505911827, -0.12918485701084137, -0.060946863144636154, 0.11775081604719162, -0.11657826602458954, -0.14871549606323242, -0.16566039621829987, -0.08003479242324829, 0.03404625505208969, -0.007196411490440369, -0.003951380029320717, 0.07957733422517776, -0.08494964987039566, -0.09003544598817825, -0.007583919446915388, -0.02457638829946518, -0.0058011459186673164, -0.12934719026088715, -0.05769744887948036, -0.03284483402967453, -0.10002998262643814, 0.09918375313282013, 0.040958695113658905, -0.04380191117525101, 0.07164086401462555, -0.06693796813488007, 0.03800581023097038, -0.10205642879009247, -0.01205980870872736, -0.02592473104596138, -0.04461735859513283, -0.019183596596121788, 0.05334892496466637, -0.11941113322973251, -0.21849843859672546, 0.0976501852273941, -0.02842281013727188, 0.00812623742967844, -0.10435333847999573, -0.1386340707540512, 0.06421998143196106, -0.09243613481521606, -0.12248460948467255, -0.019362134858965874, -0.021819964051246643, 0.005764276720583439, -0.09290200471878052, -0.05719228833913803, -0.0633959099650383, 0.06009890139102936, 0.0061997538432478905, -0.018314389511942863, 0.08478303253650665, -0.056316886097192764, 0.1531088650226593, 0.0651320219039917, -0.012520894408226013, 0.07657318562269211, 0.054421938955783844, -0.08631196618080139, 0.07800007611513138, 0.2319958209991455, -0.06839216500520706, -0.1188349798321724, -0.049605414271354675, -0.16004937887191772, 0.10598289966583252, 0.04660067334771156, -0.09320813417434692, 0.03410004824399948, 0.014985731802880764, 0.03839760273694992, -0.10042920708656311, 0.18592232465744019, -0.04112934321165085, 0.132407546043396, 0.04224197566509247, -0.0071548400446772575, 0.1629515439271927, 0.06658294796943665, -0.11422571539878845, -0.07194450497627258, 0.0020699279848486185, 0.01844370737671852, 0.07905226945877075, 0.12656636536121368, -0.1827719360589981, -0.13067391514778137, 0.20689615607261658, 0.06446241587400436, 0.05093953013420105, -0.08868493139743805, 0.06292199343442917, 0.1256161481142044, -0.00460185157135129, 0.1892676055431366, -0.09301846474409103, 0.25727131962776184, 0.1027904823422432, -0.025804441422224045, 0.02098679170012474, 0.021809369325637817, 0.029276911169290543, -0.03471444919705391, -0.05896059051156044, 0.022851817309856415, -0.05597478523850441, 0.04967202991247177, -0.09315229952335358, 0.025928134098649025, 0.20212355256080627, -0.1417820304632187, 0.11706607788801193, -0.029560675844550133, -0.0942167341709137, -0.03844650834798813, 0.08268661797046661, 0.08569520711898804, -0.18104946613311768, 0.04745788872241974, 0.020814785733819008, -0.0833190381526947, -0.10227848589420319, -0.011427505873143673, -0.06538693606853485, -0.10847761482000351, -0.2631242275238037, -0.09023778140544891, 0.04490774869918823, -0.00601964071393013, 0.09480723738670349, 0.06670606881380081, 0.11155858635902405, -0.03565065190196037, 0.2297043651342392, 0.05866643413901329, -0.20924112200737, 0.1030883863568306, 0.0527406707406044, 0.02590174600481987, -0.011231005191802979, 0.22422736883163452, -0.025249503552913666, -0.11265262216329575, -0.01669641025364399, 0.04652746766805649, 0.08464059233665466, 0.1440434455871582, -0.05570121482014656, -0.028208155184984207, 0.06384929269552231, 0.09104552865028381, 0.036280810832977295, -0.0860305204987526, -0.0726470798254013, -0.036258913576602936, -0.09087435156106949, -0.1222672313451767, -0.06259801238775253, 0.24058964848518372, -0.20266331732273102, -0.013560133054852486, 0.05852583795785904, -0.06262865662574768, -0.113975889980793, 0.013866587541997433, 0.2517578899860382, 0.07287374883890152, 0.006107669323682785, 0.1715531200170517, -0.046941399574279785, 0.028894592076539993, 0.011512810364365578, -0.08142421394586563, -0.005841133650392294, 0.13914412260055542, -0.08763418346643448, 0.06547865271568298, -0.023913446813821793, 0.07346636056900024, -0.05975879728794098, 0.06244254112243652, -0.13084514439105988, 0.22393469512462616, -0.24691878259181976, -0.0745934322476387, -0.29070842266082764, 0.09804046899080276, -0.10477489978075027, -0.14241473376750946, 0.03485279157757759, -0.1055879220366478, 0.1358632743358612, 0.044669486582279205, 0.227131649851799, 0.17558813095092773, 0.10089132189750671, -0.04890592396259308, -0.21290557086467743, -0.11021013557910919, -0.04285123199224472, 0.014468151144683361, 0.017901234328746796, -0.13665202260017395, -0.04564524069428444, -0.09811548888683319, 0.08102471381425858, -0.06943545490503311, -0.19283464550971985, -0.1429377794265747, -0.0883730873465538, 0.09638442099094391, 0.16174694895744324, -0.005962512455880642, -0.01437231246381998, 0.020117774605751038, -0.05101998522877693, 0.16217978298664093, 0.036527443677186966, 0.012392536737024784, -0.051834579557180405, 0.0956156775355339, 0.03695835918188095, -0.14040128886699677, 0.13577240705490112, 0.05607227236032486, 0.05461972579360008, 0.0293897595256567, 0.03301512449979782, 0.017429042607545853, -0.1834380328655243, 0.018370212987065315, 0.22563499212265015, 0.21344217658042908, -0.04491464048624039, 0.18650643527507782, -0.1445351094007492, -0.054113827645778656, 0.03945620730519295, 0.06403100490570068, -0.05465734377503395, -0.05817565321922302, 0.20247553288936615, 0.0695350244641304, -0.03714204579591751, -0.12861859798431396, -0.022774245589971542, -0.002148699713870883, -0.10039211809635162, -0.0421857126057148, 0.19260363280773163, 0.04795115068554878, -0.021248482167720795, -0.04535357654094696, -0.18690109252929688, 0.04860556870698929, 0.19103334844112396, 0.02617860585451126, 0.043956171721220016, 0.06370733678340912, 0.06225096061825752, -0.0763188973069191, 0.15672826766967773, 0.08997317403554916, 0.2763272225856781, -0.0829373151063919, -0.23450806736946106, -0.02927190437912941, -0.2793678641319275, 0.17139291763305664, 0.14941170811653137, 0.06520771980285645, 0.14249108731746674, -0.08788762241601944, -0.08142970502376556, -0.05846283212304115, 0.0367601104080677, -0.1587892770767212, -0.19296273589134216, -0.2153325378894806, -0.08713236451148987, 0.09976521879434586, 0.12904156744480133, -0.05205434560775757, 0.016423892229795456, 0.0759846419095993, -0.06932151317596436, 0.14290358126163483, -0.04609192907810211, -0.07724333554506302, 0.0807478278875351, -0.0461978018283844, -0.17596444487571716, 0.18627919256687164, 0.31809180974960327, -0.14792418479919434, 0.025625547394156456, -0.0335266999900341, 0.03133023902773857, 0.07082081586122513, 0.026766473427414894, 0.004235807340592146, 0.24021649360656738, 0.15452955663204193, 0.058804951608181, -0.11137668788433075, 0.08638834208250046, 0.003038131631910801, 0.10172704607248306, -0.01591731794178486, 0.05380579084157944, -0.07314492017030716, -0.08297641575336456, 0.138156458735466, -0.026892421767115593, -0.04189833626151085, -0.17016896605491638, 0.07550350576639175, 0.07045593857765198, 0.07907076925039291, -0.007194320671260357, -0.05821743234992027, -0.13404437899589539, 0.020614830777049065, -0.0959664136171341, -0.03742086887359619, 0.18314938247203827, 0.18397392332553864, -0.018346628174185753, -0.13758058845996857, -0.0030270435381680727, -0.012269492261111736, 0.18506941199302673, -0.1149497851729393, 0.0837988629937172, 0.05741391330957413, 0.08138062059879303, -0.020864073187112808, -0.03664625063538551, 0.013338807970285416, 0.002922392450273037, 0.08689761161804199, -0.03891764581203461, 0.03160573169589043, -0.047161001712083817, 0.06812799721956253, -0.1518222987651825, 0.17042061686515808, -0.019021306186914444, -0.0754905417561531, 0.028191490098834038, -0.019303884357213974, -0.10999565571546555, -0.027636416256427765, -0.0009370620246045291, -0.10765902698040009, 0.003596970811486244, 0.11482683569192886, 0.14767971634864807, 0.007353197783231735, -0.08987518399953842, -0.025082994252443314, -0.15868942439556122, 0.1493874490261078, 0.08425310999155045, -0.11704811453819275, 0.04623805359005928, 0.2106293886899948, -0.1196415051817894, -0.254190057516098, -0.17974288761615753, 0.02737579680979252, 0.06032850593328476, -0.12464500218629837, -0.13771380484104156, -0.18021905422210693, -0.14125956594944, -0.07240553945302963, 0.01831301674246788, 0.180153027176857, 0.07343848049640656, -0.11144040524959564, -0.1250971406698227, -2.6726524451715243e-32, -0.09231650829315186, -0.19827783107757568, -0.09233364462852478, -0.020002391189336777, 0.23788240551948547, 0.006009956356137991, -0.023983262479305267, -0.21808317303657532, 0.03322719410061836, 0.003755622310563922, -0.05201104283332825, -0.11510695517063141, 0.10253699123859406, 0.0808778628706932, 0.037517596036195755, 0.009725703857839108, 0.044970761984586716, -0.06723737716674805, -0.09531010687351227, 0.09335622191429138, 0.1295383870601654, 0.15076862275600433, 0.10695427656173706, -0.23860496282577515, 0.2052900195121765, -0.05210191756486893, -0.01785215362906456, -0.10272543877363205, 0.04320806264877319, 0.025794489309191704, -0.2232043594121933, 0.050011008977890015, 0.17505031824111938, 0.13997577130794525, -0.010509888641536236, -0.05466500297188759, -0.23592814803123474, 0.0458732545375824, -0.1404106467962265, 0.09204518795013428, 0.1438392549753189, -0.040243275463581085, -0.0074875811114907265, -0.0944686010479927, 0.03909716382622719, 0.1416364461183548, 0.0758233293890953, 0.038288794457912445, -0.08878301829099655, 0.03839999809861183, 0.01622922159731388, 0.03844371810555458, 0.14100368320941925, 0.05225597694516182, 0.24339158833026886, 0.017431173473596573, 0.1029699370265007, 0.01641547493636608, -0.036967933177948, 0.04781228303909302, 0.240077942609787, -0.05215073004364967, 0.20929065346717834, 0.10168106853961945, 0.0460938885807991, -0.018875163048505783, 0.2688428461551666, 0.10210834443569183, 0.3500138521194458, -0.1032836064696312, -0.0274904053658247, 0.00005853586480952799, -0.059307895600795746, -0.03397684916853905, -0.09991753101348877, -0.012489723972976208, -0.0667763501405716, -0.08452935516834259, -0.20196375250816345, -0.17582660913467407, -0.18593235313892365, -0.004222328308969736, -0.05765404924750328, -0.01835695281624794, -0.012102554552257061, -0.1496211290359497, -0.0895313024520874, 0.13692119717597961, 0.06935308873653412, -0.18801027536392212, -0.060423433780670166, 0.00815605465322733, -0.04747568815946579, 0.06274738907814026, -0.11783502995967865, 0.09765612334012985, 0.1657143384218216, 0.16023844480514526, -0.15631233155727386, -0.06473482400178909, 0.10047349333763123, -0.005219555925577879, 0.15547601878643036, 0.09995704144239426, 0.09084682911634445, 0.01499280333518982, 0.08207424730062485, -0.06472103297710419, -0.10368507355451584, -0.08925607055425644, -0.06181754916906357, 0.01664630137383938, 0.18451835215091705, 0.03188939020037651, 0.03572429344058037, -0.05266350507736206, 0.014789036475121975, -0.08747847378253937, 0.2405991554260254, 0.09908507764339447, -0.18823054432868958, 0.2389240711927414, -0.055135056376457214, -0.1474650800228119, -0.0536370649933815, 0.08651982247829437, -0.02462233416736126, -0.15565600991249084, 0.11154687404632568, 0.08250974863767624, 0.09740129113197327, 0.042493559420108795, 7.272821562764875e-7, -0.19285504519939423, -0.029634961858391762, -0.007964280433952808, -0.07681793719530106, -0.027993177995085716, 0.30033329129219055, -0.16328711807727814, -0.11307279765605927, 0.03569740429520607, 0.026459423825144768, 0.05723613128066063, -0.2802194058895111, -0.0006741051329299808, -0.021673288196325302, -0.15524925291538239, 0.13297055661678314, 0.1687742918729782, 0.05393823981285095, -0.05100763589143753, -0.0641709566116333, 0.04168512299656868, 0.0014678076840937138, -0.022353369742631912, -0.1918647140264511, -0.12134414911270142, -0.06564471125602722, -0.20370541512966156, 0.12067481875419617, 0.02163376286625862, -0.08084161579608917, 0.0921488031744957, 0.05760994181036949, -0.0008976820972748101, 0.11580910533666611, 0.011404850520193577, -0.08118443191051483, -0.01737574115395546, 0.12521550059318542, -0.1531054526567459, -0.001935308799147606, 0.03837086260318756, -0.04571133852005005, -0.0034046610817313194, -0.04225490242242813, 0.14295625686645508, 0.06702961772680283, -0.0880926251411438, 0.07757389545440674, -0.12505215406417847, 0.16167838871479034, -0.07859126478433609, 0.16133235394954681, -0.08901719003915787, 0.04205068200826645, -0.06705804169178009, 0.025753354653716087, -0.042163945734500885, -0.0027703179512172937, 0.1714542806148529, -0.0044400314800441265, -0.15076260268688202, -0.21568693220615387, 0.1911177933216095, 0.1005183532834053, 0.12160119414329529, -0.18393033742904663, -0.021070552989840508, 1.2540228835869858e-34, 0.031478188931941986, -0.07010591775178909, -0.08840985596179962, -0.05237886309623718, -0.053217556327581406, 0.007545750588178635, 0.0017271173419430852, -0.0048520443961024284, 0.018344184383749962, -0.06524119526147842, -0.02219741977751255 ]
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.07635212689638138, 0.08575226366519928, -0.06952745467424393, 0.12867701053619385, 0.19416993856430054, 0.0036642577033489943, -0.062252115458250046, -0.060850322246551514, -0.16582654416561127, -0.03696389123797417, 0.041725534945726395, -0.043839309364557266, 0.08647669106721878, -0.07844940572977066, -0.022295817732810974, -0.043556854128837585, 0.008939252234995365, -0.09425624459981918, 0.0024486484471708536, 0.14348097145557404, -0.19088853895664215, -0.0480005256831646, -0.019916264340281487, -0.07609624415636063, 0.11152477562427521, 0.056423939764499664, 0.005290965549647808, 0.12467598170042038, 0.04290756583213806, -0.2221149206161499, -0.01676986552774906, 0.105709969997406, -0.06401766836643219, 0.08319990336894989, 0.000005708136995963287, -0.048422180116176605, 0.12824192643165588, -0.006298003252595663, 0.15477827191352844, -0.12429459393024445, 0.029909078031778336, -0.11094839125871658, -0.005086752586066723, 0.015366344712674618, -0.04577157646417618, -0.08783572167158127, 0.04335526376962662, 0.10020436346530914, 0.018605301156640053, -0.14707320928573608, -0.04686274006962776, -0.05466730520129204, -0.07973531633615494, -0.05129167437553406, 0.06148003414273262, 0.047369468957185745, -0.01861150935292244, 0.028451167047023773, -0.09892452508211136, 0.040564678609371185, -0.015502305701375008, -0.17253442108631134, -0.0676332414150238, 0.037239499390125275, -0.16145116090774536, 0.0136012714356184, -0.12155023962259293, -0.050477057695388794, 0.07069244980812073, 0.19583861529827118, 0.0625998005270958, 0.05848543718457222, -0.037212930619716644, 0.017585044726729393, -0.002067605732008815, -0.10225702822208405, -0.03219665214419365, 0.08481819927692413, 0.11021523922681808, -0.1105886772274971, 0.07362835109233856, 0.1409742534160614, 0.03122265264391899, -0.10705927759408951, -0.16882823407649994, 0.19955269992351532, -0.20842091739177704, 0.04348994046449661, -0.17276716232299805, -0.1263505518436432, 0.10700967162847519, 0.027107225731015205, -0.1301974654197693, -0.15566378831863403, 0.16080132126808167, -0.0033381241373717785, 0.024318253621459007, -0.09970897436141968, 0.06289954483509064, -0.06438389420509338, -0.13647830486297607, -0.050401102751493454, -0.10389211028814316, -0.14585281908512115, 0.07217558473348618, -0.01729084923863411, 0.009192521683871746, -0.018026595935225487, 0.1708727777004242, -0.060052864253520966, 0.011708511970937252, -0.019790109246969223, 0.11559046059846878, -0.06956224888563156, 0.007346084341406822, 0.09180200099945068, -0.08625558763742447, 0.09637842327356339, 0.04627477750182152, -0.016250355169177055, 0.0795297771692276, 0.039365675300359726, 0.006983741652220488, 0.11129053682088852, -0.025284400209784508, 0.020916234701871872, 0.06883688271045685, 0.08904708921909332, -0.08897815644741058, 0.029590992256999016, 0.01919652707874775, 0.030455371364951134, 0.1316634565591812, 0.07712432742118835, 0.03079436905682087, 0.12451527267694473, 0.11971711367368698, 0.012159659527242184, 0.1546546071767807, -0.015290492214262486, -0.05050195753574371, -0.010587964206933975, 0.0953046903014183, 0.10909465700387955, 0.08201723545789719, -0.0071731433272361755, 0.09192216396331787, 0.041872281581163406, -0.06391521543264389, 0.04142392426729202, -0.2663630545139313, 0.2243671417236328, -0.01213262788951397, 0.016789192333817482, -0.17883431911468506, 0.001868508756160736, -0.15085963904857635, -0.2784578502178192, -0.10802596062421799, -0.08075349777936935, -0.028750760480761528, 0.06450457870960236, 0.2690090537071228, -0.1672263741493225, 0.00046862050658091903, 0.029971975833177567, 0.04047689586877823, -0.07688020914793015, -0.05720553547143936, 0.009867601096630096, 0.1375688910484314, -0.02968786470592022, 0.0390041209757328, -0.0733165368437767, -0.03888615965843201, 0.11406286805868149, -0.06709146499633789, -0.11876257508993149, -0.12241917103528976, 0.04455023258924484, 0.01514645665884018, 0.014897449873387814, -0.020112257450819016, -0.1464664340019226, 0.230890691280365, 0.009267552755773067, -0.04743209481239319, 0.03294029459357262, 0.09504518657922745, 0.0050966073758900166, -0.06233517453074455, -0.06928876787424088, -0.007495744153857231, 0.007632560096681118, -0.18757997453212738, 0.02579520083963871, -0.010669765062630177, -0.23060685396194458, 0.07679552584886551, -0.051494747400283813, -0.17663554847240448, 0.0644717589020729, -0.05161110311746597, 0.057656820863485336, -0.06206405907869339, -0.04701603949069977, -0.2919010818004608, 0.06870913505554199, 0.08986106514930725, -0.096699059009552, -0.21859678626060486, -0.02620507963001728, -0.026634909212589264, 0.17468319833278656, -0.02515367418527603, 0.16232910752296448, -0.1251790076494217, 0.13124334812164307, -0.23616988956928253, -0.002714412286877632, 0.0193039383739233, 0.0004337882564868778, -0.026493092998862267, 0.03955058380961418, 0.055158380419015884, 0.0862715020775795, -0.07162192463874817, -0.02335931546986103, 0.05743126943707466, 0.17067192494869232, 0.013654278591275215, 0.020003993064165115, 0.16595149040222168, 0.10135972499847412, 0.06909114122390747, 0.131021648645401, -0.07218203693628311, -0.086870938539505, 0.06332077085971832, 0.04394090920686722, -0.0345325730741024, 0.028716130182147026, -0.027103569358587265, -0.12957796454429626, 0.18790051341056824, 0.23913457989692688, -0.14941076934337616, 0.12774620950222015, -0.030942657962441444, -0.11649627238512039, 0.1126280352473259, 0.07464776188135147, -0.12062252312898636, -0.008087333291769028, -0.010934140533208847, 0.06812594085931778, -0.13134363293647766, 0.03153717517852783, -0.08181973546743393, 0.03534962236881256, 0.43879926204681396, 0.055113594979047775, -0.06865561008453369, -0.12165442854166031, 0.09108904004096985, 0.02754044719040394, 0.0340840145945549, -0.02841986157000065, -0.023420413956046104, 0.18047545850276947, 0.021570246666669846, 0.06068471819162369, -0.13251838088035583, -0.014194123446941376, -0.10829281061887741, -0.23333846032619476, -0.05261027067899704, 0.17320500314235687, 0.08630236983299255, 0.127727672457695, -0.1996425986289978, 0.06298680603504181, -0.004147866740822792, -0.05277908593416214, -0.08268728107213974, 0.1356937438249588, -0.014874853193759918, 0.04701866954565048, 0.010872898623347282, 0.03419826179742813, -0.002437317743897438, -0.04724792391061783, -0.013244349509477615, -0.027847418561577797, -0.04498574882745743, 0.11880534142255783, -0.007297372445464134, -0.07147768139839172, 0.07755894958972931, -0.019277121871709824, -0.1365782618522644, 0.06801100075244904, -0.019876131787896156, -0.04874219372868538, 0.07005229592323303, 0.1639433652162552, 0.07140911370515823, -0.08012081682682037, -0.18862636387348175, 0.0028026574291288853, -0.15173262357711792, 0.1070101261138916, 0.008045301772654057, 0.11090543866157532, -0.11707288771867752, 0.04506818950176239, -0.00835635419934988, -0.16887222230434418, 0.1379152536392212, 0.12036815285682678, -0.07678665965795517, 0.16863800585269928, -0.14785747230052948, -0.18701870739459991, 0.08483035862445831, -0.07618232071399689, 0.10665111988782883, -0.1266898810863495, 0.055458832532167435, 0.14607477188110352, 0.04572814330458641, -0.09430941939353943, -0.20138701796531677, -0.40773001313209534, 0.023813264444470406, -0.1523701697587967, -0.061466217041015625, 0.073456771671772, 0.265656977891922, 0.06704818457365036, -0.054417695850133896, -0.09647972136735916, -0.02331647463142872, -0.10173315554857254, 0.007608914747834206, -0.12855365872383118, -0.01256486028432846, -0.12489017844200134, 0.08684622496366501, -0.020560847595334053, 0.11454073339700699, -0.024163968861103058, -0.028326667845249176, 0.05873171612620354, -0.20012348890304565, 0.12379106134176254, -0.11655015498399734, 0.1701791137456894, -0.03160563483834267, 0.16353090107440948, 0.03514271602034569, -0.031041206791996956, -0.10591026395559311, -0.04698696359992027, -0.021159840747714043, 0.028296291828155518, 0.024146592244505882, -0.03833012655377388, -0.03223120793700218, -0.08049582690000534, -0.1299852728843689, 0.06175101175904274, 0.09658179432153702, 0.05468389391899109, -0.1149284690618515, 0.02101883850991726, 0.12112119793891907, -0.041324909776449203, -0.04000249132514, 0.13754993677139282, 0.0994153842329979, -0.19205018877983093, -0.02756883017718792, 0.11481302976608276, 0.20454439520835876, 0.09679482132196426, 0.10952955484390259, 0.041181787848472595, -0.174522265791893, 0.02483462728559971, -0.06928539276123047, -0.01642836444079876, -0.12554122507572174, -0.03170322626829147, -0.15315207839012146, -0.1621032953262329, 0.21948620676994324, 0.1136496365070343, 0.0129851084202528, 0.11620521545410156, 0.05408809706568718, 0.18276743590831757, 0.042586274445056915, 0.08584386110305786, 0.10878464579582214, 0.11849849671125412, 0.0589483268558979, -0.031474437564611435, -0.0615379773080349, 0.07136872410774231, -0.030459830537438393, 0.16709348559379578, -0.0770762711763382, 0.0839073657989502, 0.14316150546073914, 0.03138132393360138, -0.04691880941390991, -0.07655126601457596, -0.12278639525175095, -0.21894432604312897, -0.0799928680062294, -0.19441330432891846, -0.0852135717868805, 0.049236949533224106, -0.08668433874845505, 0.07527662813663483, 0.03920698165893555, -0.056260593235492706, -0.02840922586619854, -0.02350921556353569, 0.03733005002140999, -0.015944333747029305, 0.10837730765342712, 0.05732181295752525, 0.11549762636423111, -0.03089749999344349, 0.2573399245738983, 0.12526530027389526, -0.12246479839086533, -0.10834021866321564, -0.21608111262321472, -0.053562767803668976, 0.08172734081745148, -0.054528940469026566, 0.2313910275697708, -0.1342923641204834, -0.012106255628168583, -0.0591731071472168, -0.041682008653879166, 0.041752032935619354, -0.2253425121307373, -0.0583438016474247, -0.04524320363998413, 0.09569469094276428, -0.035466983914375305, -0.0719885379076004, 0.09468137472867966, 0.0023110092151910067, 0.03834354877471924, 0.20912425220012665, -0.049084268510341644, -0.03366491571068764, -0.15146562457084656, 0.059641771018505096, 0.05736006051301956, 0.009014726616442204, 0.12049451470375061, -0.19432322680950165, 0.055255718529224396, -0.06238822638988495, -0.15304698050022125, 0.0011353825684636831, -0.09759529680013657, 0.07312077283859253, 0.19005714356899261, 0.09475531429052353, -0.08502937853336334, -0.024696573615074158, 0.04864977300167084, 0.06455837190151215, 0.20919211208820343, -0.01864531822502613, 0.16298434138298035, -0.26875507831573486, -0.015175824984908104, 0.08624329417943954, -0.10200639814138412, -0.07645226269960403, -0.060211893171072006, -0.04267122969031334, -0.0674998015165329, 0.20548486709594727, 0.11763794720172882, 0.027737371623516083, 0.039691291749477386, 0.03502729907631874, 0.10777856409549713, 0.1538308709859848, 0.056821539998054504, 0.07097017765045166, 0.03922349959611893, -0.06310019642114639, 0.12044695019721985, 0.07872283458709717, -0.07075834274291992, -0.04281871020793915, -0.03305609151721001, -0.15115609765052795, -0.011592485941946507, -0.17030420899391174, -0.18690872192382812, 0.2490154206752777, -0.10413508117198944, 0.046773798763751984, 0.04428326338529587, -0.07235124707221985, -0.09599003940820694, 0.08254814147949219, 0.20250701904296875, 0.22581177949905396, 0.11126140505075455, 0.08390006422996521, -0.10156361013650894, -0.06065331771969795, 0.029315631836652756, -0.1339055299758911, 0.014810935594141483, -0.12936489284038544, 0.2022542655467987, 0.27583903074264526, 0.18480902910232544, 0.0325315035879612, 0.1853516548871994, -0.08969897031784058, 0.07344700396060944, 0.1042562946677208, 0.07858575135469437, -0.07311449944972992, -0.045921020209789276, 0.07510670274496078, 0.07076267153024673, -0.11463523656129837, -0.01693001575767994, -0.033228762447834015, 0.0933280661702156, -0.03749605268239975, -0.08711987733840942, -0.021276293322443962, 0.10501450300216675, 0.07322590798139572, -0.04574047401547432, 0.06552205979824066, 0.035777781158685684, -0.2590698301792145, -0.029783977195620537, -2.587616302212277e-32, -0.022744158282876015, 0.1106114387512207, 0.013730469159781933, -0.07387574017047882, 0.14689308404922485, 0.1295643150806427, 0.03471744805574417, 0.0035775804426521063, -0.005295016802847385, -0.07623957097530365, -0.10237493366003036, 0.026941170915961266, 0.049913205206394196, -0.021236557513475418, -0.030916282907128334, -0.15348321199417114, -0.08788404613733292, -0.13844044506549835, 0.10850190371274948, 0.0706494078040123, 0.13970482349395752, 0.176005020737648, 0.23375612497329712, -0.008565070107579231, 0.0041258675046265125, -0.0388568714261055, -0.043136417865753174, -0.20707818865776062, 0.12064812332391739, -0.010744241066277027, -0.02931526117026806, -0.08044322580099106, 0.15250885486602783, -0.05404527485370636, -0.05384622514247894, -0.03765294700860977, -0.04967674985527992, -0.04537304863333702, -0.17904062569141388, 0.11869443953037262, -0.06649114936590195, 0.17765545845031738, 0.05479522421956062, -0.12250947207212448, 0.010620691813528538, 0.09237451106309891, -0.025521624833345413, 0.0903971940279007, -0.19414952397346497, -0.07057850807905197, 0.021513478830456734, -0.15579980611801147, 0.08675359189510345, 0.08312450349330902, 0.1251329630613327, -0.01599603146314621, 0.047274764627218246, 0.022558875381946564, -0.050301533192396164, 0.05777914449572563, 0.09240476787090302, 0.09557744860649109, 0.12731340527534485, 0.12030387669801712, -0.03182729333639145, 0.03668202459812164, 0.22742986679077148, 0.27409085631370544, -0.005081006791442633, 0.06982806324958801, -0.1925770789384842, 0.0960790142416954, -0.15783651173114777, -0.09725335240364075, -0.16560178995132446, -0.00722849927842617, -0.18595118820667267, 0.1408422291278839, -0.0035019738133996725, -0.1060866117477417, -0.054134223610162735, -0.10645856708288193, 0.016821658238768578, -0.06761248409748077, -0.10463897138834, -0.14925886690616608, -0.06907147914171219, 0.06420044600963593, 0.04726524278521538, -0.2705020606517792, -0.07479104399681091, -0.1074618473649025, -0.1091366708278656, -0.1039370596408844, -0.29137614369392395, 0.2497296780347824, -0.23320433497428894, 0.2062036395072937, -0.12637388706207275, 0.1954805999994278, -0.1687578558921814, -0.1432446539402008, 0.002145855687558651, -0.027096718549728394, 0.10892674326896667, 0.20695900917053223, 0.2526969015598297, -0.09927574545145035, -0.181310772895813, -0.16352373361587524, 0.050952717661857605, 0.050892025232315063, 0.013319701887667179, 0.0922561064362526, 0.06689060479402542, 0.03585100546479225, -0.01633894443511963, -0.055324774235486984, 0.33850303292274475, 0.14401009678840637, -0.07215644419193268, -0.07503712922334671, -0.14663855731487274, -0.02422173321247101, 0.09089644998311996, 0.009598993696272373, -0.026185987517237663, -0.07331864535808563, 0.0157622080296278, 0.01650608330965042, -0.0187810268253088, -0.1560472548007965, 7.511342232646712e-7, -0.10866822302341461, 0.04754749685525894, -0.118589386343956, 0.08035030215978622, -0.08218209445476532, 0.07716095447540283, 0.028878696262836456, 0.10649999976158142, -0.04042879492044449, 0.11398613452911377, 0.1487884670495987, -0.12349658459424973, -0.07057409733533859, -0.00222411029972136, 0.10451192408800125, -0.10478676110506058, -0.13542844355106354, 0.11976480484008789, -0.10024334490299225, 0.04815872758626938, 0.024155760183930397, 0.14772053062915802, -0.2667689323425293, -0.020611200481653214, -0.10899969190359116, -0.025832705199718475, -0.05283406749367714, -0.07200031727552414, 0.13917618989944458, -0.08033035695552826, -0.021542180329561234, -0.07722005993127823, 0.0149297583848238, 0.21342585980892181, 0.0789397656917572, 0.08218038082122803, -0.14228196442127228, -0.032759521156549454, -0.01882418431341648, 0.029895123094320297, 0.05297933146357536, -0.015251437202095985, 0.0992596223950386, 0.028620976954698563, 0.08385158330202103, -0.03803703561425209, -0.21678213775157928, 0.07589278370141983, -0.08704762905836105, 0.13761292397975922, -0.06846205145120621, 0.09107229858636856, 0.007357246242463589, 0.12480981647968292, -0.03237871080636978, -0.1452862173318863, -0.052079394459724426, -0.028857167810201645, 0.04374190419912338, 0.0741230770945549, -0.001426118309609592, -0.03845416381955147, 0.10220091044902802, -0.038075804710388184, 0.10263649374246597, 0.06788332760334015, 0.06734972447156906, 2.0397742763769704e-34, -0.07359591126441956, -0.06887379288673401, 0.09572124481201172, -0.09768163412809372, 0.011473070830106735, -0.06733319908380508, 0.14766894280910492, 0.015958840027451515, -0.12031146883964539, -0.09630841016769409, -0.05786488577723503 ]
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.11152597516775131, 0.0951390489935875, -0.0823579877614975, 0.0835767537355423, 0.12088152021169662, 0.0298603642731905, -0.017351459711790085, 0.10443329811096191, 0.10685171186923981, 0.24361400306224823, -0.021776240319013596, -0.0033463940490037203, -0.059854887425899506, -0.023580467328429222, -0.0933723896741867, 0.02164490334689617, 0.020465539768338203, 0.025837071239948273, 0.004953382071107626, -0.15648144483566284, -0.06292470544576645, 0.042740073055028915, 0.11573588848114014, -0.0714273601770401, 0.04605445638298988, -0.14591917395591736, -0.023752877488732338, 0.11239205300807953, 0.09280017018318176, 0.03319435939192772, -0.04980447515845299, -0.03524539992213249, -0.09172829240560532, 0.2328723669052124, 0.0000056951203077915125, -0.000713875109795481, 0.07774215191602707, 0.04394535720348358, -0.16148312389850616, 0.07446783781051636, 0.29467251896858215, -0.1806819587945938, -0.02563219703733921, 0.04480315372347832, -0.0482628233730793, -0.13911479711532593, 0.00632208026945591, -0.123957060277462, -0.001782379811629653, 0.025614328682422638, -0.09919527918100357, 0.04739667475223541, -0.1906966120004654, -0.12809711694717407, -0.0902981385588646, -0.0999997928738594, 0.05692140385508537, 0.08018776029348373, -0.047057028859853745, -0.058224793523550034, -0.04753024876117706, -0.0450303815305233, 0.03537566587328911, 0.09423765540122986, 0.04046555981040001, 0.13395167887210846, -0.19838838279247284, -0.0650985836982727, 0.028583949431777, 0.23609334230422974, -0.06993208080530167, 0.08463263511657715, -0.07105602324008942, -0.013298439793288708, -0.12758088111877441, -0.04322631284594536, -0.0221791360527277, 0.10654037445783615, -0.09307630360126495, 0.0032453464809805155, -0.036204371601343155, -0.11935706436634064, -0.026720654219388962, 0.07082894444465637, -0.14297783374786377, 0.00011771003482863307, -0.09367430210113525, 0.06115124374628067, 0.07409399747848511, 0.10702544450759888, -0.011183184571564198, -0.04757675528526306, -0.055773258209228516, 0.020829632878303528, -0.01856740191578865, 0.11541955918073654, -0.0265736673027277, -0.07245488464832306, 0.041256893426179886, -0.1462944597005844, 0.1435479372739792, 0.0672500729560852, -0.03456451743841171, 0.015566088259220123, 0.0923529639840126, -0.07605059444904327, -0.032256852835416794, -0.15432558953762054, -0.004637501668184996, 0.053186193108558655, -0.13016703724861145, 0.25016555190086365, -0.23823346197605133, -0.022479020059108734, 0.23145031929016113, -0.040041662752628326, -0.02700098790228367, 0.03943568468093872, 0.19325941801071167, 0.0494115874171257, 0.07974670082330704, 0.06440240889787674, 0.052580785006284714, 0.14326763153076172, 0.01644125021994114, 0.15409988164901733, -0.07863959670066833, 0.07026726752519608, -0.24479922652244568, -0.006497905123978853, -0.09876583516597748, -0.1514810025691986, 0.09275200963020325, -0.05939589813351631, 0.10730626434087753, -0.03629987686872482, -0.07061325013637543, -0.09420912712812424, -0.11652160435914993, -0.11038287729024887, 0.18630363047122955, -0.13551969826221466, -0.18948128819465637, 0.0965241938829422, 0.09536755084991455, 0.09625915437936783, -0.008306050673127174, 0.17394235730171204, -0.12599517405033112, 0.08559459447860718, -0.1389569342136383, 0.05904069542884827, -0.2671806812286377, 0.16652125120162964, -0.03349044919013977, 0.13180038332939148, -0.13289959728717804, -0.06773962825536728, -0.25947919487953186, 0.003946509677916765, -0.10527786612510681, -0.05649136006832123, 0.018935346975922585, 0.11125345528125763, 0.09433578699827194, 0.17428947985172272, -0.021082719787955284, 0.14412881433963776, -0.07719601690769196, 0.07827601581811905, 0.1865227222442627, -0.08775012940168381, -0.08232872188091278, 0.004741786513477564, -0.09233013540506363, 0.07419722527265549, -0.07700636237859726, 0.02720906212925911, -0.14070555567741394, 0.13432680070400238, 0.1037495881319046, -0.0293162539601326, 0.037524763494729996, -0.027029715478420258, 0.10013066977262497, -0.036568138748407364, -0.05615385249257088, 0.15159979462623596, 0.0011804030509665608, -0.011830460280179977, -0.04092922434210777, 0.017978742718696594, -0.14518314599990845, 0.24567998945713043, -0.04122726619243622, -0.11716153472661972, 0.03216840326786041, 0.09103124588727951, 0.1659114956855774, -0.23760175704956055, -0.09771662205457687, 0.017062129452824593, -0.03010374866425991, 0.07886264473199844, -0.009757929481565952, 0.017805425450205803, -0.169813334941864, 0.19940470159053802, 0.10794615745544434, -0.15486536920070648, -0.09262491017580032, 0.020268796011805534, 0.003926730249077082, -0.019517185166478157, -0.08681624382734299, -0.04610952362418175, -0.19982117414474487, 0.05731019005179405, -0.11032344400882721, 0.11390005797147751, -0.1071239709854126, 0.07558717578649521, 0.01743544451892376, 0.08537328988313675, 0.015077318996191025, 0.10425946861505508, 0.10930940508842468, 0.05783388391137123, 0.0013691531494259834, -0.11968597769737244, -0.10796533524990082, -0.17114417254924774, 0.16749748587608337, 0.05486854165792465, -0.001662561553530395, 0.030350610613822937, 0.08288652449846268, -0.09577859193086624, 0.08629592508077621, 0.10875418037176132, -0.06345964968204498, 0.052534449845552444, -0.005886232480406761, -0.08622511476278305, 0.055895376950502396, 0.09987138211727142, -0.019626345485448837, 0.20373649895191193, -0.0020408863201737404, -0.04334992170333862, 0.304998517036438, 0.15759441256523132, 0.02427961677312851, -0.013518176041543484, 0.17975936830043793, 0.005596377421170473, 0.1893206387758255, 0.20371216535568237, 0.0025663385167717934, 0.07762805372476578, 0.2278430312871933, -0.010931442491710186, -0.0052680461667478085, 0.024516478180885315, 0.10145219415426254, -0.01113303005695343, 0.052160315215587616, -0.1257432997226715, 0.06336958706378937, 0.12926217913627625, 0.050564151257276535, -0.021201584488153458, -0.09131307899951935, -0.11337660998106003, -0.0118087287992239, -0.0452064611017704, 0.10197219997644424, -0.07824063301086426, 0.035088080912828445, -0.0513092540204525, -0.10726658999919891, 0.06117232143878937, 0.06531564146280289, -0.0343964621424675, 0.1860402673482895, 0.007642337121069431, -0.07356027513742447, 0.06579477339982986, -0.06005728989839554, 0.07333815097808838, 0.08528343588113785, -0.08075523376464844, -0.022853896021842957, -0.0662240982055664, 0.007338503375649452, 0.05811946094036102, 0.16519035398960114, 0.014839914627373219, -0.13140815496444702, -0.143800288438797, -0.024648666381835938, 0.08949121832847595, -0.023781366646289825, 0.0875311940908432, 0.09325424581766129, 0.09122912585735321, -0.020958904176950455, 0.0332096703350544, -0.31158268451690674, 0.06378021091222763, 0.025869891047477722, -0.07153958082199097, 0.11187932640314102, 0.014406591653823853, -0.07013997435569763, 0.029497871175408363, -0.10461781919002533, -0.2786979377269745, 0.10372800379991531, 0.07075493037700653, -0.05053527653217316, 0.061690397560596466, -0.1293681263923645, -0.0731968879699707, -0.03474755212664604, 0.03842415660619736, -0.19591224193572998, -0.051330529153347015, -0.06454135477542877, 0.09942378848791122, -0.030679523944854736, -0.07095883041620255, 0.03179774060845375, 0.028013980016112328, 0.13720370829105377, -0.14251963794231415, -0.09182089567184448, -0.05438560992479324, 0.4120272696018219, 0.07961021363735199, -0.15816663205623627, -0.011342532001435757, -0.055554620921611786, 0.005671143997460604, -0.008562829345464706, -0.1374499648809433, -0.05695153400301933, -0.2863500714302063, -0.0597742423415184, -0.01395703386515379, 0.004336091689765453, 0.058824457228183746, -0.1271381676197052, -0.04339902102947235, 0.09687681496143341, 0.07752661406993866, -0.060210779309272766, 0.14155489206314087, -0.1265421360731125, 0.11304209381341934, -0.05947980657219887, 0.002187497913837433, 0.12141094356775284, 0.033936094492673874, -0.11470423638820648, 0.060539960861206055, 0.1756046861410141, -0.02016201801598072, -0.16152073442935944, -0.12432960420846939, -0.02456752397119999, -0.13580060005187988, -0.1350589096546173, 0.07861878722906113, 0.10830549150705338, -0.12344931811094284, 0.03179224953055382, -0.17349489033222198, 0.07878708094358444, -0.057709552347660065, 0.16236333549022675, -0.12541554868221283, -0.12108603119850159, 0.01172433327883482, 0.04366530478000641, -0.00019093664013780653, -0.0440128929913044, -0.039956752210855484, -0.19229379296302795, 0.18159057199954987, -0.03837268054485321, 0.07033029943704605, 0.09384527802467346, -0.11893980950117111, -0.03795620799064636, -0.08081250637769699, 0.054175104945898056, 0.08687063306570053, 0.077574722468853, 0.04930862411856651, 0.1344478726387024, 0.1631571352481842, 0.059737350791692734, 0.1755288541316986, 0.06306222081184387, -0.03746603801846504, 0.016447115689516068, -0.05852614715695381, 0.06124918535351753, -0.12853576242923737, 0.020956983789801598, 0.16279953718185425, -0.1287475824356079, -0.07153177261352539, 0.12729065120220184, 0.029404273256659508, -0.11728967726230621, 0.03242029249668121, -0.057686589658260345, -0.08588653057813644, -0.06721827387809753, -0.0770878791809082, 0.08389317244291306, 0.12951676547527313, 0.10070469975471497, -0.02820926532149315, 0.005730324890464544, 0.030727004632353783, 0.19231094419956207, -0.029086407274007797, 0.010709637776017189, 0.178030863404274, 0.15643025934696198, 0.01581517420709133, 0.09067251533269882, -0.22005398571491241, 0.3184027373790741, -0.10847760736942291, -0.10493189841508865, 0.07825639843940735, -0.18031799793243408, -0.027437657117843628, 0.008623387664556503, 0.052914250642061234, 0.08228839933872223, -0.06202847883105278, -0.05060165748000145, -0.024676604196429253, -0.0007967532728798687, -0.0796099454164505, -0.1316923052072525, -0.08254937082529068, -0.11528173089027405, -0.10494428873062134, 0.06491605192422867, -0.046023622155189514, 0.0392436683177948, -0.20018261671066284, -0.008922289125621319, 0.11845600605010986, -0.1100505143404007, -0.033425893634557724, -0.07193402200937271, 0.14602062106132507, -0.2205192893743515, 0.05645151808857918, 0.05958317220211029, -0.17527775466442108, -0.04769153892993927, -0.02516048029065132, -0.04124083369970322, 0.0793568342924118, 0.04948486015200615, 0.04539962485432625, 0.1668468713760376, 0.06529523432254791, -0.036302339285612106, 0.02262413688004017, -0.1351349800825119, -0.04584551602602005, 0.21164636313915253, 0.09059394150972366, -0.040642790496349335, -0.2537806034088135, -0.1171618178486824, 0.11638747155666351, -0.05272062122821808, -0.0008704560459591448, -0.12427148222923279, 0.09516417980194092, 0.08485280722379684, 0.02325599081814289, -0.050485510379076004, -0.08390137553215027, 0.09965179860591888, -0.09997428208589554, -0.04091310128569603, 0.031140660867094994, 0.004161400720477104, 0.0359189547598362, 0.12945052981376648, -0.01860108971595764, 0.10419070720672607, -0.05943639203906059, 0.09820819646120071, -0.12704825401306152, -0.05762796476483345, -0.07448922842741013, 0.02258005365729332, 0.09550783038139343, 0.007025961298495531, -0.087102010846138, 0.004608881194144487, -0.03881343454122543, 0.0779654011130333, 0.1550169587135315, -0.046261124312877655, -0.10693355649709702, 0.04197673127055168, -0.017216099426150322, 0.07796377688646317, -0.07884374260902405, 0.06540161371231079, -0.10352684557437897, 0.04167799651622772, 0.15716230869293213, -0.0559907928109169, -0.038354139775037766, 0.274503231048584, 0.05737055093050003, 0.003799041733145714, 0.15010160207748413, 0.23128674924373627, 0.06558611243963242, -0.028598906472325325, 0.1460264027118683, 0.1456432342529297, -0.17904487252235413, -0.01010129414498806, 0.09439823776483536, -0.00701724411919713, -0.21776770055294037, -0.0771954134106636, 0.0855170413851738, 0.01680164225399494, 0.07316901534795761, 0.0014503785641863942, 0.011384919285774231, -0.03014434315264225, -0.0950571745634079, -0.12293000519275665, 0.05635906755924225, -0.1070912554860115, -0.11490882188081741, -0.0036976593546569347, -2.632348858112056e-32, 0.00863354466855526, 0.009579111821949482, 0.03827860951423645, -0.12446574866771698, -0.07668738067150116, 0.045913804322481155, -0.11263921856880188, -0.04925314337015152, -0.10788610577583313, -0.047937095165252686, -0.13017715513706207, -0.016296107321977615, 0.11090757697820663, 0.056563228368759155, -0.18592332303524017, 0.06856293976306915, 0.04644044488668442, -0.022340841591358185, -0.11809566617012024, 0.05089263245463371, 0.023246390745043755, 0.10549324005842209, -0.0852755457162857, -0.055452823638916016, -0.1020662859082222, -0.08616682142019272, 0.08955834060907364, -0.19516748189926147, 0.058987658470869064, -0.0011322014033794403, -0.17543642222881317, 0.17961077392101288, -0.04445569962263107, -0.14172904193401337, 0.03402579575777054, -0.07759072631597519, -0.13797488808631897, -0.01319919340312481, 0.176102876663208, 0.10074502229690552, 0.06347974389791489, 0.0467769019305706, 0.12693670392036438, -0.05858888849616051, -0.1011100560426712, 0.03176445886492729, 0.050671812146902084, 0.007404590491205454, -0.1502148061990738, -0.1211770698428154, -0.07602421194314957, 0.0797647014260292, 0.1610535979270935, -0.013230321928858757, 0.10306735336780548, -0.15068118274211884, 0.09866597503423691, 0.06854502856731415, -0.22262518107891083, -0.10487613081932068, 0.03317626938223839, 0.09568675607442856, 0.040545810014009476, -0.08573028445243835, 0.16150017082691193, -0.018909191712737083, 0.32512396574020386, 0.014303091913461685, 0.06297139078378677, 0.03238191828131676, 0.2140941470861435, -0.009607682935893536, -0.15901146829128265, -0.0756450667977333, 0.056621141731739044, -0.1629660427570343, -0.1591736227273941, 0.03928833454847336, -0.08020206540822983, -0.14826960861682892, -0.0063197859562933445, -0.06420647352933884, -0.015520403161644936, 0.16471336781978607, -0.03973250463604927, 0.0432884581387043, 0.00048117912956513464, 0.025435129180550575, -0.06503599137067795, -0.15091688930988312, 0.07192949205636978, -0.14096036553382874, 0.06676464527845383, -0.047933001071214676, -0.11279971897602081, -0.028387678787112236, -0.17891825735569, 0.12004604935646057, -0.09922126680612564, 0.04303087666630745, -0.14897994697093964, -0.01963869296014309, 0.05496964231133461, -0.009509568102657795, 0.13817070424556732, 0.09504825621843338, 0.10558954626321793, 0.07387565076351166, -0.14421714842319489, 0.006368565373122692, -0.14094531536102295, 0.057358596473932266, 0.18404997885227203, 0.22769875824451447, 0.18765394389629364, -0.027026494964957237, 0.005389968398958445, 0.058683935552835464, 0.04366035759449005, 0.1437404602766037, -0.06765151023864746, -0.05942118912935257, 0.15806356072425842, -0.003185934852808714, -0.07277008146047592, 0.21186555922031403, -0.21763825416564941, -0.029711659997701645, -0.06591974943876266, -0.0719267949461937, -0.016875775530934334, -0.0353676974773407, 7.601841502946627e-7, -0.16495588421821594, 0.24288028478622437, -0.03217415139079094, 0.13062067329883575, -0.08560636639595032, 0.02502354606986046, -0.18282297253608704, 0.05011419951915741, 0.04912380129098892, 0.13490717113018036, 0.20259900391101837, 0.08677878975868225, -0.01403158251196146, 0.0494590625166893, -0.032260797917842865, -0.13694439828395844, -0.1351700723171234, -0.03183961659669876, -0.047755636274814606, -0.017986955121159554, 0.0822504535317421, 0.1937248855829239, -0.16477790474891663, -0.15132956206798553, 0.1240190714597702, -0.10053978860378265, 0.002515458269044757, -0.036660052835941315, -0.0015431813662871718, -0.11702995747327805, 0.07864304631948471, 0.1772795170545578, -0.07150407880544662, 0.08891385048627853, 0.0014500110410153866, -0.002322298474609852, -0.11026185005903244, -0.08544851839542389, 0.0982704609632492, -0.042011942714452744, 0.14070440828800201, 0.03344494104385376, 0.06447198241949081, 0.03796647489070892, 0.19627630710601807, 0.005520120728760958, -0.22869345545768738, -0.011370477266609669, 0.04137589409947395, 0.049913592636585236, -0.019861632958054543, 0.031976889818906784, 0.07776506245136261, 0.1589934378862381, 0.06817441433668137, -0.15814535319805145, -0.0918920636177063, -0.2149573266506195, -0.05099799111485481, 0.06654719263315201, -0.08083808422088623, -0.010035556741058826, 0.041147541254758835, -0.0030701267533004284, 0.09826995432376862, -0.034863635897636414, -0.023124171420931816, 1.0425784265510527e-34, -0.0909973755478859, -0.09349485486745834, 0.048664968460798264, -0.030451277270913124, -0.0477907732129097, -0.15859699249267578, 0.023349875584244728, -0.07640931010246277, -0.08040237426757812, -0.28280341625213623, -0.09262204170227051 ]
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.10347166657447815, 0.00815676711499691, -0.060208290815353394, 0.11566708981990814, 0.10427140444517136, -0.004213786218315363, 0.035946350544691086, 0.07173413783311844, 0.15576738119125366, 0.25771769881248474, -0.04859595373272896, 0.03932282701134682, -0.03595687821507454, 0.029803013429045677, -0.08108166605234146, -0.010663826949894428, -0.004780909512192011, -0.003941656555980444, 0.013395260088145733, -0.1468278020620346, 0.006258053705096245, 0.04489773139357567, 0.12116048485040665, -0.06086169555783272, -0.0003460632578935474, -0.10021640360355377, -0.03861984610557556, 0.12942487001419067, 0.07747593522071838, -0.024811148643493652, 0.002258029067888856, 0.008312052115797997, -0.07829952239990234, 0.2545076012611389, 0.000005869425876880996, 0.00872052926570177, 0.028104383498430252, 0.06509710848331451, -0.16950707137584686, 0.10742250829935074, 0.2267512083053589, -0.18444226682186127, -0.022368459030985832, 0.03065328299999237, -0.04741412401199341, -0.07125438749790192, -0.01995156519114971, -0.1256754845380783, 0.011024795472621918, -0.02315046824514866, -0.09910896420478821, 0.1711084544658661, -0.19827643036842346, -0.11805038899183273, -0.05422157049179077, -0.10369440168142319, 0.03188233822584152, 0.05944635719060898, -0.05194634944200516, -0.0033271550200879574, -0.08705746382474899, -0.01894552819430828, 0.06952520459890366, 0.08571703732013702, 0.10081217437982559, 0.15515680611133575, -0.25608953833580017, -0.06470368802547455, 0.0011934776557609439, 0.23375916481018066, -0.08632669597864151, 0.1312635838985443, -0.0852571427822113, -0.02452060580253601, -0.11063705384731293, -0.046052150428295135, -0.06713883578777313, 0.06343168765306473, -0.10908939689397812, -0.014639916829764843, -0.03455686569213867, -0.09285137802362442, -0.04639141261577606, 0.03902329504489899, -0.12071848660707474, 0.00812464114278555, -0.10178183764219284, 0.045025236904621124, 0.08989086002111435, 0.09377457946538925, -0.048231836408376694, -0.03581198304891586, -0.02834048680961132, 0.009536616504192352, -0.04071446508169174, 0.09038542211055756, -0.01109798438847065, 0.002988226944580674, 0.027877356857061386, -0.10202488303184509, 0.13066819310188293, 0.07761827856302261, -0.05820333957672119, 0.04849435016512871, 0.0934009999036789, -0.06715228408575058, 0.02480543591082096, -0.22823460400104523, 0.02171684056520462, 0.1005922481417656, -0.09861832112073898, 0.20952627062797546, -0.29493066668510437, -0.020236629992723465, 0.23876559734344482, -0.05152539908885956, -0.016522301360964775, 0.08026172965765, 0.20091181993484497, 0.021195007488131523, 0.1310848444700241, 0.06319015473127365, 0.04608674719929695, 0.14097732305526733, 0.0009653876768425107, 0.14907796680927277, -0.0941944494843483, 0.04169543460011482, -0.20121605694293976, -0.03687012568116188, -0.10986556857824326, -0.14888152480125427, 0.10189713537693024, -0.08916404843330383, 0.09841915965080261, -0.15781454741954803, -0.050323572009801865, -0.08174106478691101, -0.09890760481357574, -0.11033336073160172, 0.15033774077892303, -0.10468791425228119, -0.2664482891559601, 0.05588666722178459, 0.09746811538934708, 0.09138786792755127, -0.027962077409029007, 0.17726102471351624, -0.14170488715171814, 0.021978363394737244, -0.07619839161634445, 0.03410159796476364, -0.27445101737976074, 0.15076063573360443, -0.030483895912766457, 0.10348391532897949, -0.14755745232105255, -0.047651149332523346, -0.2969651520252228, 0.054989248514175415, -0.021250387653708458, -0.03389328718185425, 0.016093671321868896, 0.12153314799070358, 0.13249391317367554, 0.16815096139907837, 0.022259166464209557, 0.09084336459636688, -0.026270989328622818, 0.05843551084399223, 0.13502678275108337, -0.08846011757850647, -0.06460754573345184, -0.004725215956568718, -0.09192905575037003, 0.13982798159122467, -0.06657201796770096, -0.0217411108314991, -0.10802870988845825, 0.14108574390411377, 0.1274530291557312, -0.011025922372937202, 0.053598079830408096, -0.047874823212623596, 0.06064699962735176, -0.053961947560310364, -0.0806344598531723, 0.13397105038166046, -0.018144885078072548, 0.004643488675355911, -0.043062932789325714, -0.0022332340013235807, -0.13550087809562683, 0.24971212446689606, -0.03726116940379143, -0.11430161446332932, 0.032878175377845764, 0.06765388697385788, 0.12751959264278412, -0.25750085711479187, -0.1345319300889969, 0.02885144203901291, -0.03279263898730278, 0.09690111875534058, -0.020311826840043068, -0.02860073558986187, -0.2116556614637375, 0.2402602881193161, 0.08137678354978561, -0.17017804086208344, -0.07966063916683197, -0.02335362881422043, 0.00359899690374732, 0.010486961342394352, -0.12355737388134003, -0.03406649827957153, -0.18329472839832306, 0.03082926943898201, -0.06669711321592331, 0.12771454453468323, -0.12603573501110077, 0.06984584033489227, 0.06737599521875381, 0.11777202039957047, -0.08022106438875198, 0.07605642825365067, 0.13186748325824738, 0.07267383486032486, -0.006247752346098423, -0.12406159937381744, -0.11619266122579575, -0.18803644180297852, 0.20419912040233612, 0.06749658286571503, 0.0043483818881213665, 0.06286944448947906, 0.10945042222738266, -0.0831654891371727, 0.11994577199220657, 0.16504821181297302, -0.07276389747858047, -0.00480735395103693, -0.02907881885766983, -0.05016454681754112, 0.026284823194146156, 0.12001431733369827, -0.07510460168123245, 0.19468213617801666, 0.035465583205223083, -0.039825085550546646, 0.3052106201648712, 0.15080124139785767, 0.04970577359199524, -0.012812319211661816, 0.1712479144334793, -0.03308592736721039, 0.2014184594154358, 0.23860272765159607, -0.042315635830163956, 0.10205136239528656, 0.1956665962934494, -0.0060194400139153, -0.018735740333795547, 0.07328255474567413, 0.08633220195770264, -0.01613333821296692, 0.036787912249565125, -0.20502197742462158, 0.07102769613265991, 0.13318558037281036, 0.034516606479883194, -0.03351978957653046, -0.06256356835365295, -0.11804940551519394, -0.030772626399993896, -0.07268770784139633, 0.11256317049264908, -0.056881777942180634, 0.018806861713528633, -0.06281398981809616, -0.10140163451433182, 0.05230525881052017, 0.06084582209587097, -0.04342290759086609, 0.19330881536006927, 0.004843686241656542, -0.051836393773555756, 0.03206118941307068, -0.03669524937868118, 0.05940233916044235, 0.04670571908354759, -0.09124718606472015, -0.02291014976799488, -0.03702205419540405, 0.017937220633029938, 0.008901471272110939, 0.1521901935338974, 0.0807870402932167, -0.08549429476261139, -0.08812884241342545, -0.0328778475522995, 0.10394608974456787, -0.018211619928479195, 0.06756117939949036, 0.08912278711795807, 0.11294296383857727, -0.00924623478204012, 0.009276815690100193, -0.28561022877693176, 0.02200930006802082, 0.02335432730615139, -0.05453615263104439, 0.10265520215034485, 0.035177379846572876, -0.022114748135209084, -0.023675335571169853, -0.15665574371814728, -0.2445627599954605, 0.12273769080638885, 0.10198372602462769, -0.05834032595157623, 0.06006927043199539, -0.08768024295568466, -0.09404447674751282, -0.045249491930007935, 0.08736424893140793, -0.1563975065946579, -0.10236222296953201, -0.012226767838001251, 0.04150417074561119, -0.03246038779616356, -0.05921564996242523, 0.002649518894031644, 0.0420924611389637, 0.09357566386461258, -0.09180957078933716, -0.07000718265771866, -0.07736018300056458, 0.37086221575737, 0.0692543238401413, -0.1534763127565384, -0.03669764846563339, -0.057480670511722565, 0.04020237550139427, -0.012767362408339977, -0.16097959876060486, -0.10469916462898254, -0.26783448457717896, -0.050091370940208435, 0.002590303309261799, 0.05271989852190018, 0.0819711834192276, -0.19342383742332458, -0.030499516054987907, 0.11381223797798157, 0.0104267792776227, -0.0721132755279541, 0.09441141039133072, -0.13743962347507477, 0.10570604354143143, -0.04216988757252693, 0.014873712323606014, 0.1317732185125351, 0.028558721765875816, -0.10948264598846436, 0.07146953046321869, 0.14267753064632416, 0.016999267041683197, -0.18160204589366913, -0.14089345932006836, -0.04223356395959854, -0.09776928275823593, -0.12169969826936722, 0.0850142240524292, 0.11620142310857773, -0.05565880239009857, -0.000475233537144959, -0.18931353092193604, 0.0833919495344162, -0.05680929124355316, 0.1434244066476822, -0.09255338460206985, -0.10237527638673782, -0.0051927706226706505, 0.0800643041729927, 0.046325042843818665, -0.04004940390586853, -0.012995949015021324, -0.1438501626253128, 0.1945429891347885, -0.06918022036552429, -0.023254655301570892, 0.11333032697439194, -0.18305356800556183, -0.06314272433519363, -0.06352487951517105, 0.0584571547806263, 0.10979442298412323, 0.07567456364631653, 0.09731317311525345, 0.12727253139019012, 0.15888328850269318, 0.11339956521987915, 0.1710093766450882, 0.009469722397625446, -0.08828294277191162, -0.03709028661251068, -0.02862572856247425, 0.07215212285518646, -0.1368889957666397, 0.04485486075282097, 0.16777610778808594, -0.1267511248588562, -0.11358623206615448, 0.12492053210735321, 0.000905002816580236, -0.11412367224693298, 0.04371926188468933, -0.0492854043841362, -0.05929106846451759, -0.04806182533502579, -0.07482690364122391, 0.07634837925434113, 0.11272776126861572, 0.18129165470600128, -0.011904779821634293, -0.015382582321763039, 0.014377783052623272, 0.16508080065250397, -0.033927977085113525, -0.004196441266685724, 0.18254145979881287, 0.12128395587205887, 0.04088220000267029, 0.1086222231388092, -0.26542094349861145, 0.3181641697883606, -0.10521673411130905, -0.20812858641147614, 0.03504284843802452, -0.13552019000053406, -0.008629696443676949, 0.08732705563306808, 0.05512942373752594, 0.13418403267860413, -0.07043928653001785, 0.008897772058844566, -0.01902790740132332, 0.04022274911403656, -0.034047432243824005, -0.1271996647119522, -0.0686030238866806, -0.0706947073340416, -0.10460685938596725, 0.024868329986929893, -0.035367779433727264, 0.014610659331083298, -0.1174783781170845, 0.016319027170538902, 0.12324295192956924, -0.13438865542411804, -0.03138407692313194, -0.09622389823198318, 0.11725986003875732, -0.18504469096660614, 0.030511898919939995, 0.1489218920469284, -0.16049405932426453, -0.03138541057705879, -0.024859007447957993, -0.05965747311711311, 0.06982836127281189, 0.056434862315654755, 0.021351534873247147, 0.13870814442634583, 0.057147324085235596, 0.007620613556355238, -0.015072830021381378, -0.1400514394044876, -0.053823113441467285, 0.25580430030822754, 0.08329419791698456, -0.07425937056541443, -0.28858986496925354, -0.12257000058889389, 0.07582269608974457, -0.0258803591132164, -0.03521927446126938, -0.1440325677394867, 0.15502169728279114, 0.0698862224817276, 0.02239369973540306, -0.04922914505004883, -0.07967941462993622, 0.07912027835845947, -0.04833994805812836, -0.0049743507988750935, -0.0038860805798321962, -0.012064341455698013, 0.07861481606960297, 0.10538923740386963, -0.009281563572585583, 0.07700370997190475, -0.06733803451061249, 0.07029526680707932, -0.17108619213104248, -0.04660462588071823, -0.058795902878046036, 0.04899713024497032, 0.10912414640188217, -0.01718580536544323, -0.049213752150535583, -0.04093556851148605, -0.038767412304878235, 0.0966886654496193, 0.11426639556884766, -0.07292579114437103, -0.060185980051755905, 0.04489337280392647, 0.02150007337331772, 0.08822610974311829, -0.1023172065615654, 0.08098586648702621, -0.05974539369344711, 0.016176030039787292, 0.19547991454601288, -0.05744197219610214, -0.012087847106158733, 0.21710391342639923, 0.010441955178976059, -0.009647638536989689, 0.10175257176160812, 0.26074957847595215, 0.03466888517141342, -0.019332129508256912, 0.08802662789821625, 0.1681891232728958, -0.2098579853773117, 0.01133334543555975, 0.10221735388040543, 0.016727762296795845, -0.20051392912864685, -0.08080845326185226, 0.0892530083656311, 0.03414994478225708, 0.07619476318359375, 0.014461013488471508, 0.07018408179283142, -0.0022200592793524265, -0.09212616086006165, -0.08648817241191864, 0.11014547199010849, -0.07769393175840378, -0.128251314163208, 0.028816234320402145, -2.657333402791608e-32, -0.005752931348979473, 0.018071208149194717, 0.0374007411301136, -0.07412306219339371, -0.06512659788131714, 0.07170940190553665, -0.11963086575269699, -0.03269346058368683, -0.09301561862230301, -0.10609449446201324, -0.1626451462507248, -0.007176067680120468, 0.11857793480157852, 0.041634418070316315, -0.17380958795547485, 0.06994195282459259, 0.04421122744679451, -0.05385366454720497, -0.13220146298408508, 0.08177559822797775, 0.0629446804523468, 0.09395946562290192, -0.1488862782716751, -0.0906679630279541, -0.09963886439800262, -0.0755910575389862, 0.061337895691394806, -0.16051289439201355, 0.0056482539512217045, 0.015299100428819656, -0.19786308705806732, 0.17023764550685883, -0.0744062289595604, -0.058587219566106796, 0.01708165556192398, -0.0482177697122097, -0.143874391913414, -0.02497217431664467, 0.13194423913955688, 0.11668835580348969, 0.07327648997306824, 0.03253912180662155, 0.09530577063560486, -0.07142012566328049, -0.10454683005809784, 0.026617875322699547, 0.07052970677614212, -0.014489653520286083, -0.14326447248458862, -0.10861889272928238, -0.05947835370898247, 0.05608319491147995, 0.17809538543224335, -0.011296910233795643, 0.12468095123767853, -0.14286066591739655, 0.10813432931900024, 0.05228234454989433, -0.19798003137111664, -0.10204627364873886, 0.0008318311301991343, 0.07521554082632065, -0.031315527856349945, -0.05217898264527321, 0.19168485701084137, -0.01831342838704586, 0.258255273103714, -0.0013650823384523392, 0.10170163959264755, -0.02310890145599842, 0.273026704788208, -0.009360537864267826, -0.11540112644433975, -0.08586901426315308, 0.09779967367649078, -0.16445644199848175, -0.13723517954349518, 0.04532848671078682, -0.026651587337255478, -0.17581474781036377, -0.006631613243371248, -0.10297461599111557, 0.03470076993107796, 0.14376893639564514, -0.038003191351890564, 0.06062864512205124, -0.01606595143675804, 0.018692409619688988, -0.08248839527368546, -0.10575632750988007, 0.038034599274396896, -0.1427745670080185, 0.03190189227461815, -0.029921244829893112, -0.11006022244691849, -0.021857641637325287, -0.17045772075653076, 0.1484544277191162, -0.045299991965293884, 0.08056871592998505, -0.11474280804395676, -0.006062117870897055, 0.08463995903730392, 0.047983020544052124, 0.11284580081701279, 0.06558117270469666, 0.12969116866588593, 0.07718027383089066, -0.18079262971878052, 0.03810269758105278, -0.11684653908014297, 0.0844608023762703, 0.187284454703331, 0.1623450219631195, 0.16688981652259827, -0.039219822734594345, 0.021757859736680984, 0.07092757523059845, 0.01922721602022648, 0.11492534726858139, -0.13080936670303345, -0.08878548443317413, 0.16028736531734467, 0.020072419196367264, -0.09526374191045761, 0.19769349694252014, -0.2225928008556366, -0.02564949356019497, -0.04306132718920708, -0.10505026578903198, -0.036440085619688034, -0.040215179324150085, 7.561511097264884e-7, -0.12983424961566925, 0.2256852388381958, -0.01542644388973713, 0.07235623151063919, -0.04356655851006508, 0.03852333500981331, -0.2017327845096588, 0.05515262857079506, 0.10197391360998154, 0.14774325489997864, 0.16270777583122253, 0.08463939279317856, -0.057869888842105865, 0.04823802411556244, -0.04170505329966545, -0.1726863980293274, -0.09586507827043533, -0.04470530152320862, -0.08536757528781891, 0.017390059307217598, 0.042142756283283234, 0.19131509959697723, -0.1538919359445572, -0.15780948102474213, 0.11939135938882828, -0.12408288568258286, 0.01142038218677044, 0.0008383391541428864, 0.047000568360090256, -0.10543669015169144, 0.03144728019833565, 0.1394033432006836, -0.06918089091777802, 0.05684120953083038, 0.00942256674170494, -0.03245542198419571, -0.12513552606105804, -0.06516531109809875, 0.05928125977516174, -0.012878404930233955, 0.18128585815429688, 0.029307305812835693, 0.07844391465187073, -0.01629406213760376, 0.20337258279323578, 0.03254937753081322, -0.1975487917661667, 0.006763571407645941, 0.046924252063035965, 0.025003205984830856, -0.06347835808992386, 0.004132827278226614, 0.06898235529661179, 0.17170961201190948, 0.08728908002376556, -0.1574861854314804, -0.06797415763139725, -0.18427370488643646, -0.043560851365327835, 0.03109222836792469, -0.0706547349691391, -0.05190810188651085, 0.007057473063468933, 0.06619060784578323, 0.0025633913464844227, -0.03162552788853645, -0.019642014056444168, 1.4849948961428436e-34, -0.04226198419928551, -0.07069472968578339, 0.040989842265844345, -0.07963545620441437, -0.0826847106218338, -0.15955305099487305, 0.01991388574242592, -0.055098216980695724, -0.036197222769260406, -0.23771607875823975, -0.07618506997823715 ]
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.11833234876394272, 0.14449860155582428, -0.0868898555636406, 0.08606509864330292, 0.1120283454656601, 0.009814292192459106, 0.029189156368374825, 0.09865813702344894, 0.09803611040115356, 0.2566802203655243, -0.028813716024160385, 0.006977093406021595, -0.040138620883226395, -0.008387838490307331, -0.11473856121301651, 0.018810708075761795, -0.0017216465203091502, 0.027914121747016907, 0.04313875734806061, -0.15347202122211456, -0.06795386970043182, 0.029025794938206673, 0.11154446750879288, -0.044205524027347565, 0.07430601865053177, -0.13588787615299225, -0.020353902131319046, 0.09997061640024185, 0.062141794711351395, 0.02118906006217003, -0.019504375755786896, 0.012170929461717606, -0.09016953408718109, 0.2256031632423401, 0.000005780735591542907, -0.033530112355947495, 0.07636234164237976, 0.04164295643568039, -0.16880008578300476, 0.036466941237449646, 0.3044079542160034, -0.1635833978652954, -0.024584051221609116, 0.013803740963339806, -0.02187126874923706, -0.10791517049074173, 0.004543451126664877, -0.12738168239593506, -0.026125526055693626, 0.034386128187179565, -0.08914913237094879, 0.03968612104654312, -0.18599379062652588, -0.15179188549518585, -0.10382895916700363, -0.0930672287940979, 0.050439175218343735, 0.05513857305049896, -0.0443132147192955, -0.03421898931264877, -0.07868726551532745, -0.03962363675236702, 0.03761737793684006, 0.09970112144947052, 0.01895792968571186, 0.12087053060531616, -0.1723054200410843, -0.08600020408630371, 0.02843833714723587, 0.24457520246505737, -0.054810669273138046, 0.1201695129275322, -0.08968506753444672, -0.01810959354043007, -0.10819835960865021, -0.06038942188024521, -0.03289439529180527, 0.12210080772638321, -0.12168032675981522, 0.021582547575235367, -0.04595068842172623, -0.13478441536426544, -0.032368727028369904, 0.0516146719455719, -0.1153368428349495, 0.0004650384944397956, -0.08479757606983185, 0.08029752224683762, 0.08667527884244919, 0.09490584582090378, 0.018487904220819473, -0.0417327806353569, -0.06185503304004669, 0.011359752155840397, -0.020933732390403748, 0.10958921909332275, -0.017196642234921455, -0.05053867772221565, 0.04285971075296402, -0.15234898030757904, 0.08371929824352264, 0.06460734456777573, -0.02899571880698204, 0.02793542668223381, 0.09338352829217911, -0.08013981580734253, -0.016062092036008835, -0.19804994761943817, -0.019710658118128777, 0.04819374904036522, -0.10344114154577255, 0.23388375341892242, -0.24736849963665009, -0.040758952498435974, 0.2096785455942154, -0.024073908105492592, -0.03136012703180313, 0.05043959617614746, 0.18045148253440857, 0.040924377739429474, 0.08305571228265762, 0.05279398709535599, 0.05411802604794502, 0.1243666559457779, 0.009799121879041195, 0.16082946956157684, -0.08572953939437866, 0.0977185070514679, -0.22050225734710693, -0.018910279497504234, -0.09280984848737717, -0.16516780853271484, 0.09258874505758286, -0.056909650564193726, 0.11501475423574448, -0.05195838212966919, -0.08209888637065887, -0.07556375861167908, -0.11709807813167572, -0.11401992291212082, 0.16753338277339935, -0.11469968408346176, -0.20772305130958557, 0.09018073976039886, 0.08972236514091492, 0.09883999079465866, -0.006998850032687187, 0.12319855391979218, -0.1533859819173813, 0.08877275884151459, -0.11356671899557114, 0.05482431873679161, -0.25996723771095276, 0.17302946746349335, -0.032750148326158524, 0.09542456269264221, -0.1617356836795807, -0.05748579278588295, -0.2740741968154907, 0.021236812695860863, -0.07640190422534943, -0.05713042989373207, 0.018514582887291908, 0.12149149179458618, 0.0886029303073883, 0.18384197354316711, -0.03404771909117699, 0.11399226635694504, -0.09201715141534805, 0.08576612174510956, 0.21567098796367645, -0.10830256342887878, -0.07101181894540787, 0.003333584638312459, -0.07713603973388672, 0.08073741942644119, -0.03637260943651199, 0.020892828702926636, -0.14802822470664978, 0.16475777328014374, 0.10454139113426208, -0.018794553354382515, 0.059289634227752686, -0.03809281811118126, 0.12188557535409927, -0.026442596688866615, -0.06441932916641235, 0.17123466730117798, -0.0004450787673704326, -0.007598088122904301, -0.03106999769806862, 0.011610767804086208, -0.1573108583688736, 0.2745406925678253, 0.004536338150501251, -0.12340018153190613, 0.024733595550060272, 0.05689056217670441, 0.1734791398048401, -0.25728076696395874, -0.10754308849573135, -0.009114060550928116, -0.02294890210032463, 0.08737388998270035, -0.026835668832063675, 0.013470994308590889, -0.15069179236888885, 0.2235080748796463, 0.1433427482843399, -0.14963604509830475, -0.07105439901351929, -0.0018735640915110707, 0.003422087524086237, -0.007242998573929071, -0.11475180089473724, -0.03860261291265488, -0.20046447217464447, 0.05460362508893013, -0.10617884993553162, 0.12537483870983124, -0.0996166318655014, 0.11534518748521805, 0.011326607316732407, 0.10069029033184052, 0.0031177978962659836, 0.10312695056200027, 0.11707145720720291, 0.06321009993553162, -0.007548095658421516, -0.12057473510503769, -0.12084762006998062, -0.17861708998680115, 0.1590825766324997, 0.07139807939529419, -0.010470440611243248, 0.05114079639315605, 0.07427031546831131, -0.10607647150754929, 0.0983581691980362, 0.13911379873752594, -0.07373195141553879, 0.04356645047664642, 0.0050225756131112576, -0.09210330247879028, 0.06339552253484726, 0.11754544079303741, -0.029149305075407028, 0.17518416047096252, 0.007620081305503845, -0.04799206182360649, 0.2983704209327698, 0.14498892426490784, 0.02536837011575699, -0.003478769678622484, 0.1912911981344223, -0.03471557796001434, 0.17559804022312164, 0.18867962062358856, -0.023910799995064735, 0.09852537512779236, 0.22845086455345154, -0.014453464187681675, 0.0165200587362051, 0.057594090700149536, 0.10604588687419891, -0.003479801584035158, 0.04805682227015495, -0.12054463475942612, 0.06988950073719025, 0.11379976570606232, 0.013355981558561325, -0.06110412999987602, -0.09059789776802063, -0.11942007392644882, -0.019301991909742355, -0.04961200803518295, 0.08766133338212967, -0.08377310633659363, 0.023940570652484894, -0.0767112448811531, -0.1135747954249382, 0.024414461106061935, 0.05435968190431595, -0.036390628665685654, 0.19578787684440613, 0.021301964297890663, -0.06061645224690437, 0.0808693915605545, -0.0359826385974884, 0.03663359209895134, 0.08257296681404114, -0.07747884094715118, -0.03793954849243164, -0.05494212731719017, 0.018858596682548523, 0.07035325467586517, 0.16269776225090027, -0.004002600908279419, -0.1260591298341751, -0.12195902317762375, -0.002710385713726282, 0.09286236763000488, 0.0020839350763708353, 0.0897345244884491, 0.09194853901863098, 0.07912100106477737, -0.0173324104398489, 0.0020016792695969343, -0.30674439668655396, 0.06970110535621643, 0.025288602337241173, -0.07866967469453812, 0.11445144563913345, -0.019653797149658203, -0.0659370943903923, 0.016063561663031578, -0.1345994919538498, -0.29284700751304626, 0.09819734841585159, 0.09009584039449692, -0.043382253497838974, 0.07753197103738785, -0.12517260015010834, -0.08147447556257248, -0.043770402669906616, 0.06426334381103516, -0.22053833305835724, -0.04700886085629463, -0.04147912934422493, 0.10028508305549622, -0.03190011903643608, -0.07116854935884476, 0.030060315504670143, 0.0326276570558548, 0.1504514068365097, -0.10109906643629074, -0.1059323400259018, -0.04892057180404663, 0.4054291844367981, 0.08451331406831741, -0.14669784903526306, -0.02930210344493389, -0.06506035476922989, 0.012642960995435715, -0.026036014780402184, -0.15796853601932526, -0.06254876405000687, -0.29052650928497314, -0.051151782274246216, -0.021243086084723473, -0.005494306329637766, 0.06645430624485016, -0.13282431662082672, -0.027731211856007576, 0.09063048660755157, 0.10108992457389832, -0.05637923255562782, 0.12487772852182388, -0.15042616426944733, 0.08897528052330017, -0.012338852509856224, -0.02315480448305607, 0.13243795931339264, 0.01409243606030941, -0.15062251687049866, 0.06535398215055466, 0.16632229089736938, -0.008550502359867096, -0.14152352511882782, -0.13302625715732574, -0.018155302852392197, -0.11028576642274857, -0.1038845032453537, 0.09422805905342102, 0.09371579438447952, -0.13600321114063263, 0.012825212441384792, -0.17736786603927612, 0.05578210949897766, -0.06206626072525978, 0.14626739919185638, -0.10880979150533676, -0.1393105834722519, 0.033154603093862534, 0.06319867819547653, 0.010426588356494904, -0.04104692116379738, -0.03840189054608345, -0.16565734148025513, 0.1564027965068817, -0.07325858622789383, 0.06761907041072845, 0.08023824542760849, -0.13547873497009277, -0.06853291392326355, -0.09284979104995728, 0.07270586490631104, 0.1133342906832695, 0.08315761387348175, 0.06867192685604095, 0.13292182981967926, 0.15103310346603394, 0.07476811110973358, 0.1756099909543991, 0.06404474377632141, -0.034246932715177536, -0.009373493492603302, -0.05437155067920685, 0.020358486101031303, -0.12798520922660828, 0.06938760727643967, 0.16983181238174438, -0.1394258439540863, -0.07006657123565674, 0.12018364667892456, 0.04328636825084686, -0.13447120785713196, 0.011388332583010197, -0.07606285810470581, -0.08278056979179382, -0.08326587826013565, -0.07278047502040863, 0.05678313225507736, 0.14589564502239227, 0.09932243078947067, -0.021731575950980186, -0.0018254512688145041, 0.035053644329309464, 0.17948240041732788, -0.03767051175236702, -0.013994072563946247, 0.18961435556411743, 0.15344178676605225, -0.00998753122985363, 0.09708405286073685, -0.1693747341632843, 0.3112274706363678, -0.10322291404008865, -0.12397070974111557, 0.06174285709857941, -0.17455771565437317, -0.04618069529533386, 0.0001838009338825941, 0.047069400548934937, 0.07132112979888916, -0.0886293575167656, -0.02827879600226879, -0.034028224647045135, 0.0008927705348469317, -0.0784328505396843, -0.1572009027004242, -0.10544202476739883, -0.11697779595851898, -0.09635156393051147, 0.07483800500631332, -0.0528913252055645, 0.07556090503931046, -0.16726276278495789, 0.0038529331795871258, 0.11681468039751053, -0.12190715968608856, -0.03177332505583763, -0.08927475661039352, 0.14382930099964142, -0.194920614361763, 0.03563752770423889, 0.07038627564907074, -0.16141290962696075, -0.05298393964767456, -0.04218599200248718, -0.050280340015888214, 0.061246633529663086, 0.05141385644674301, 0.0408649705350399, 0.18246738612651825, 0.024186601862311363, -0.03676776587963104, 0.026289062574505806, -0.18538138270378113, -0.038847628980875015, 0.22204115986824036, 0.07078995555639267, -0.04509671404957771, -0.2612721920013428, -0.12841826677322388, 0.0950348749756813, -0.029599323868751526, -0.0012286336859688163, -0.12614718079566956, 0.1076403483748436, 0.10928834974765778, 0.006430179812014103, -0.04167523980140686, -0.06894645094871521, 0.11005309224128723, -0.0881924256682396, -0.07099111378192902, 0.02471981756389141, -0.015848463401198387, 0.07704675942659378, 0.11343816667795181, -0.011603058315813541, 0.08865579217672348, -0.0386425256729126, 0.07314839959144592, -0.12553709745407104, -0.050843656063079834, -0.07827135175466537, 0.018145497888326645, 0.10000891983509064, -0.013258998282253742, -0.06990757584571838, 0.012072131037712097, -0.027880676090717316, 0.07546072453260422, 0.16315457224845886, -0.02768145129084587, -0.09588304162025452, 0.020219391211867332, -0.013448851183056831, 0.06962154805660248, -0.10183337330818176, 0.07745906710624695, -0.0825984999537468, 0.026509586721658707, 0.1318884789943695, -0.05544960871338844, -0.0468158982694149, 0.24818025529384613, 0.04829908907413483, 0.008647574111819267, 0.14250563085079193, 0.23358219861984253, 0.04992658272385597, -0.027171602472662926, 0.12509550154209137, 0.14107581973075867, -0.19292087852954865, -0.0079702353104949, 0.10860402137041092, 0.010107370093464851, -0.21709203720092773, -0.09649466723203659, 0.06905099004507065, 0.03443120792508125, 0.07862108200788498, -0.0012545427307486534, 0.05539483577013016, -0.02511972188949585, -0.09532992541790009, -0.12832200527191162, 0.0729777067899704, -0.1137828454375267, -0.09988941997289658, -0.0028134952299296856, -2.6087408173173165e-32, 0.02184348553419113, 0.01142409723252058, 0.044771261513233185, -0.0958549827337265, -0.04973095655441284, 0.03987468034029007, -0.12182237207889557, -0.06265535950660706, -0.10387316346168518, -0.028728021308779716, -0.14354558289051056, -0.012828507460653782, 0.10574483126401901, 0.05498085170984268, -0.1791767179965973, 0.08550330251455307, 0.05586966872215271, -0.06175510212779045, -0.11511765420436859, 0.0435742549598217, 0.03466867655515671, 0.10065461695194244, -0.09337400645017624, -0.0276112649589777, -0.10182736068964005, -0.07004091888666153, 0.07418849319219589, -0.2025587111711502, 0.08446697890758514, -0.012455285526812077, -0.17015132308006287, 0.20558606088161469, -0.03173009678721428, -0.12869678437709808, 0.01593833975493908, -0.06096557527780533, -0.10787215828895569, -0.019244814291596413, 0.15300029516220093, 0.11027438938617706, 0.08521333336830139, 0.03549569845199585, 0.1631685197353363, -0.05475829169154167, -0.14149056375026703, 0.04495614767074585, 0.05264515057206154, -0.012893693521618843, -0.1491747796535492, -0.09699811786413193, -0.05692931264638901, 0.09321742504835129, 0.1742856651544571, -0.037686917930841446, 0.07856336236000061, -0.12525944411754608, 0.09813885390758514, 0.03756626695394516, -0.16529563069343567, -0.10627429187297821, 0.06168656051158905, 0.07401510328054428, 0.026164378970861435, -0.0576251782476902, 0.16923318803310394, 0.0007435092120431364, 0.3092837929725647, 0.014165852218866348, 0.0868806317448616, 0.05825869366526604, 0.2301788628101349, -0.0057908399030566216, -0.140895277261734, -0.07527252286672592, 0.03280235826969147, -0.18132080137729645, -0.18460576236248016, 0.08335965871810913, -0.05247100070118904, -0.14285430312156677, -0.015656864270567894, -0.09362868219614029, -0.010622544214129448, 0.17116935551166534, -0.03646761178970337, 0.03849465399980545, 0.007577002514153719, 0.039669688791036606, -0.08905525505542755, -0.14113226532936096, 0.08839598298072815, -0.15167151391506195, 0.06641296297311783, -0.03313034027814865, -0.10489770025014877, -0.003619119292125106, -0.1891520768404007, 0.106215700507164, -0.07776802033185959, 0.05070957541465759, -0.11818891018629074, -0.00455485749989748, 0.0509638674557209, 0.009028101339936256, 0.13472208380699158, 0.06358127295970917, 0.08530277013778687, 0.06269175559282303, -0.1571001559495926, 0.017842045053839684, -0.14050514996051788, 0.06580282002687454, 0.18713463842868805, 0.23201531171798706, 0.21021690964698792, -0.01608182117342949, 0.01144213043153286, 0.07671045511960983, 0.029226869344711304, 0.11421561986207962, -0.08948030322790146, -0.02624472603201866, 0.1855936199426651, -0.0026978992391377687, -0.0820397287607193, 0.18799945712089539, -0.21871519088745117, -0.022449275478720665, -0.05191294476389885, -0.0791412964463234, -0.02908862940967083, -0.07308512181043625, 7.615905133206979e-7, -0.16643206775188446, 0.20789769291877747, -0.05043131113052368, 0.14298003911972046, -0.06173298507928848, 0.028011713176965714, -0.22361931204795837, 0.04744898900389671, 0.05049113556742668, 0.14464081823825836, 0.19432757794857025, 0.09739094972610474, -0.030245190486311913, 0.06691262871026993, -0.04055424779653549, -0.13548077642917633, -0.11718025803565979, 0.006841075140982866, -0.025664089247584343, -0.02726888284087181, 0.07723496109247208, 0.18011558055877686, -0.16068091988563538, -0.17145253717899323, 0.12153337150812149, -0.14094550907611847, 0.019630948081612587, -0.049229368567466736, 0.0016509350389242172, -0.0910085141658783, 0.0784335657954216, 0.1667882353067398, -0.07020384073257446, 0.07593958079814911, 0.016695251688361168, 0.005314593203365803, -0.11130595207214355, -0.054320160299539566, 0.09369418770074844, -0.04005764052271843, 0.1504659652709961, 0.026569051668047905, 0.07348215579986572, 0.03979383781552315, 0.2032851129770279, 0.03691571205854416, -0.20642049610614777, -0.030471377074718475, 0.05084892734885216, 0.029940268024802208, -0.030669506639242172, 0.045931123197078705, 0.0681072250008583, 0.13876189291477203, 0.05824771150946617, -0.14101584255695343, -0.07080434262752533, -0.21440035104751587, -0.06123606488108635, 0.07121554762125015, -0.08196508139371872, -0.03360573202371597, 0.03452250361442566, -0.0033471432980149984, 0.09584639221429825, -0.033619534224271774, 0.014651259407401085, 1.1180595131701182e-34, -0.05996573343873024, -0.08445193618535995, 0.062244515866041183, -0.014952164143323898, -0.0449993759393692, -0.17496831715106964, -0.006654406897723675, -0.08363903313875198, -0.05620213598012924, -0.27111026644706726, -0.08448844403028488 ]
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.014211791567504406, 0.2353912889957428, 0.06320454180240631, 0.10124056786298752, 0.1689145863056183, 0.09503036737442017, 0.09601815789937973, -0.08387583494186401, -0.17956915497779846, -0.10990992188453674, -0.17729908227920532, 0.17241664230823517, -0.06498361378908157, 0.11426746100187302, 0.047730978578329086, -0.12597374618053436, -0.09555987268686295, -0.1225845143198967, -0.18242113292217255, 0.11381612718105316, -0.09012287855148315, 0.05260876193642616, 0.07603416591882706, 0.052389126271009445, 0.11836570501327515, -0.08216870576143265, -0.006573851220309734, 0.1582961529493332, 0.0166444331407547, -0.06950519233942032, -0.03374907001852989, 0.01973050646483898, -0.1558200567960739, 0.07100775837898254, 0.0000054964921218925156, 0.12666726112365723, 0.0766153559088707, 0.138331338763237, -0.19586540758609772, -0.03134763985872269, -0.10446495562791824, -0.20780113339424133, 0.13677085936069489, -0.06122244894504547, -0.0737319365143776, -0.21439404785633087, 0.04183701053261757, -0.08631977438926697, 0.0401189886033535, -0.004284969996660948, 0.002330532530322671, 0.04603446647524834, -0.08786188811063766, -0.13145104050636292, 0.19812129437923431, 0.17682431638240814, -0.051378391683101654, 0.050743572413921356, -0.07585103809833527, 0.029715023934841156, -0.09220217168331146, 0.11613422632217407, -0.09592601656913757, -0.06387671083211899, 0.17518232762813568, -0.04133624956011772, -0.10147755593061447, -0.01175124291330576, 0.14224423468112946, 0.09965300559997559, -0.03690212965011597, -0.011704826727509499, -0.02249864861369133, 0.06874968111515045, -0.017057999968528748, -0.17994748055934906, -0.09883222728967667, -0.12925253808498383, -0.04928676411509514, -0.10967312008142471, -0.01900509186089039, 0.022507941350340843, 0.009474399499595165, -0.11878453195095062, -0.3533223271369934, -0.13366635143756866, -0.10309552401304245, 0.1434769630432129, 0.0058989254757761955, -0.16712434589862823, 0.13983649015426636, -0.13666532933712006, -0.18655617535114288, -0.10662993043661118, -0.029898161068558693, -0.0031489874236285686, -0.03738262131810188, 0.00041588686872273684, -0.09039302915334702, 0.048368681222200394, 0.010200713761150837, 0.1471744030714035, 0.0630623921751976, -0.01330631785094738, -0.02136988192796707, 0.06072532758116722, 0.09155306965112686, 0.02065681666135788, -0.06332295387983322, -0.018637439236044884, 0.05536819249391556, 0.09688447415828705, -0.042335689067840576, -0.1570657193660736, 0.04133216291666031, 0.14483456313610077, 0.1329454928636551, 0.1817273050546646, 0.09371484816074371, -0.06464212387800217, 0.0751134604215622, -0.03202594444155693, -0.10183355212211609, 0.05523229017853737, 0.11626356095075607, 0.024724634364247322, 0.18905358016490936, -0.1650475114583969, 0.13875484466552734, -0.07479695975780487, -0.04094738885760307, -0.1486579030752182, 0.10487009584903717, -0.032490238547325134, 0.11923046410083771, 0.08251184970140457, -0.023701127618551254, 0.037410300225019455, 0.089332215487957, -0.0388580858707428, 0.1317017525434494, 0.10646907985210419, 0.029713379219174385, -0.08711708337068558, -0.04336665943264961, -0.04220211133360863, 0.048612650483846664, 0.0859711542725563, -0.10374410450458527, 0.06843551248311996, -0.1414283663034439, 0.13169816136360168, -0.023352688178420067, -0.05358205735683441, -0.15479996800422668, 0.0538957417011261, -0.05703471228480339, -0.01679930090904236, -0.11052270233631134, 0.08253544569015503, 0.11180077493190765, -0.2845989167690277, 0.17335373163223267, -0.030231991782784462, -0.01959780789911747, 0.05761848762631416, 0.07267867028713226, 0.043814223259687424, -0.09718787670135498, -0.1280638873577118, 0.06185983493924141, 0.0015698591014370322, -0.04424871504306793, -0.17768029868602753, 0.021976931020617485, 0.1593419760465622, 0.07877472788095474, -0.05745430663228035, 0.1176384836435318, -0.15613822638988495, 0.03963771462440491, 0.16461221873760223, -0.07704704999923706, -0.06553389877080917, 0.09599993377923965, 0.02955995872616768, -0.016056720167398453, 0.0701390877366066, 0.07036177068948746, -0.09719119966030121, -0.017371181398630142, 0.031734731048345566, 0.0695696473121643, 0.024198930710554123, 0.00820030178874731, 0.06371109187602997, -0.07087785750627518, 0.00162229232955724, -0.00030527423950843513, -0.005937415640801191, -0.046778105199337006, -0.04547705873847008, -0.08928977698087692, -0.05699044093489647, 0.11311453580856323, -0.012441393919289112, -0.3194954991340637, 0.012917476706206799, -0.027092406526207924, -0.10988528281450272, -0.12202293425798416, -0.016777323558926582, 0.1765509694814682, 0.07753989845514297, 0.09903310239315033, 0.04920041933655739, 0.07836934179067612, -0.015434540808200836, -0.17443035542964935, -0.12720134854316711, 0.00575916888192296, -0.045680247247219086, -0.08823087811470032, 0.033795155584812164, -0.03293510898947716, 0.015876896679401398, 0.298385888338089, 0.07147084921598434, 0.03126504644751549, -0.09624245017766953, 0.0127939498052001, -0.0144441993907094, 0.033619675785303116, -0.014127898961305618, -0.1917830854654312, 0.21664203703403473, -0.06511799991130829, -0.047464802861213684, -0.014492945745587349, -0.017960283905267715, 0.13181185722351074, -0.06997145712375641, -0.24790458381175995, 0.10977230966091156, 0.02347884140908718, -0.0698564425110817, 0.0323607437312603, 0.36762741208076477, -0.12108810245990753, -0.0009107976220548153, 0.06555482745170593, -0.037405021488666534, -0.24920889735221863, 0.04838066175580025, -0.03366819769144058, -0.05862253159284592, 0.03797022998332977, 0.11129654198884964, -0.1105913370847702, 0.1403084397315979, 0.1256055235862732, -0.027517516165971756, -0.12140096724033356, 0.08610055595636368, 0.06167316809296608, 0.109684057533741, 0.007678438909351826, 0.08765343576669693, -0.011434311047196388, 0.1703423261642456, 0.09365019202232361, 0.1758556216955185, 0.13779959082603455, -0.046853840351104736, 0.12574267387390137, -0.013881297782063484, 0.0151613624766469, 0.010530911386013031, 0.10260052233934402, -0.16825447976589203, 0.052902866154909134, -0.0024791723117232323, -0.07095825672149658, -0.00907780509442091, 0.010913083329796791, 0.20342883467674255, -0.16988828778266907, -0.039056506007909775, -0.14247789978981018, 0.1326315999031067, -0.05160432681441307, -0.08483506739139557, -0.0180280152708292, -0.2259947508573532, -0.11858540773391724, -0.05805258825421333, 0.17839302122592926, 0.1787135899066925, -0.16311535239219666, 0.1391846090555191, -0.016912568360567093, -0.0424359068274498, -0.04725801944732666, -0.04624640569090843, 0.05146487057209015, 0.056767381727695465, 0.0572085827589035, -0.12608197331428528, -0.09511195868253708, -0.17257805168628693, 0.045113369822502136, -0.05929740145802498, 0.062123142182826996, 0.05257929861545563, -0.09591314196586609, 0.011089947074651718, 0.07684959471225739, -0.24075724184513092, 0.13573497533798218, 0.13291224837303162, 0.05895689129829407, -0.06710495799779892, 0.0024130605161190033, 0.04879080504179001, 0.018013138324022293, -0.06447286903858185, -0.13449932634830475, -0.012123883701860905, 0.19976429641246796, -0.06682539731264114, -0.037837374955415726, 0.2240843027830124, -0.04138866811990738, -0.03655899688601494, 0.008998462930321693, -0.04113262891769409, -0.022788679227232933, 0.13642144203186035, 0.034247543662786484, 0.04721492528915405, -0.04967079684138298, -0.15975667536258698, 0.03547343611717224, -0.1156858578324318, 0.1664602905511856, -0.11483663320541382, 0.12476605176925659, -0.23225346207618713, -0.12557141482830048, 0.04370804503560066, 0.08429651707410812, -0.005549318622797728, -0.006080065853893757, -0.1795738935470581, 0.07688608020544052, -0.039122093468904495, -0.08901946991682053, 0.033904217183589935, -0.11554940044879913, 0.24262073636054993, 0.05646247789263725, 0.02790050581097603, 0.02775256708264351, -0.02930859848856926, 0.01219420600682497, -0.20999445021152496, 0.08442862331867218, 0.13592912256717682, -0.04135299474000931, -0.20281514525413513, -0.05422482267022133, -0.14780844748020172, -0.15396350622177124, -0.07733769714832306, -0.13029995560646057, -0.0930548831820488, 0.0909305289387703, 0.07143840938806534, 0.05507682263851166, -0.03945905342698097, 0.0646825060248375, -0.25088927149772644, -0.0776757076382637, -0.041587330400943756, 0.16823013126850128, -0.054487444460392, -0.021293355152010918, -0.02254316583275795, -0.053175169974565506, -0.08429961651563644, 0.06808145344257355, -0.15992705523967743, -0.05662770941853523, -0.14334240555763245, 0.03524329885840416, -0.08305211365222931, -0.11471779644489288, -0.10760284960269928, -0.08687157183885574, 0.08408131450414658, 0.1402517408132553, -0.029718834906816483, -0.03491625189781189, 0.034283559769392014, 0.19394944608211517, 0.12619464099407196, 0.03166080266237259, -0.009292930364608765, 0.04774489626288414, 0.13187053799629211, 0.09140601009130478, 0.10237438231706619, -0.048577651381492615, -0.13426299393177032, 0.04578305780887604, 0.0910627692937851, -0.07602669298648834, 0.0724145770072937, 0.02035638876259327, 0.04822166636586189, -0.028521154075860977, -0.2726057767868042, 0.026056114584207535, -0.07545699924230576, -0.10655174404382706, 0.03630891069769859, 0.03869830444455147, 0.06297548115253448, 0.1810579150915146, 0.13288606703281403, -0.007445670198649168, 0.11388535797595978, -0.09723392874002457, -0.07488930225372314, 0.147762268781662, -0.056326236575841904, 0.13572467863559723, -0.19844111800193787, -0.2258123904466629, -0.022125551477074623, -0.06811720132827759, 0.08033493906259537, 0.3694077134132385, -0.09189260751008987, 0.06916092336177826, 0.023466527462005615, 0.10904120653867722, -0.026756493374705315, 0.05296597257256508, 0.0990612804889679, -0.03557554632425308, -0.16758102178573608, 0.09886925667524338, 0.151462122797966, 0.14020060002803802, -0.029359184205532074, 0.06803342700004578, -0.03847411647439003, -0.1796959489583969, 0.19741907715797424, 0.07695900648832321, -0.06550012528896332, -0.10364199429750443, 0.005346602760255337, -0.21497184038162231, -0.08895403146743774, 0.26328423619270325, 0.024675965309143066, 0.04524930194020271, 0.053410716354846954, 0.0641600638628006, 0.0958060622215271, -0.039814919233322144, 0.02271367236971855, 0.17963416874408722, 0.22805491089820862, -0.0787343829870224, -0.18454058468341827, -0.09989680349826813, 0.037899840623140335, 0.16597412526607513, -0.08514905720949173, 0.018234722316265106, -0.11021386831998825, 0.10645639896392822, -0.050095535814762115, 0.02424575760960579, 0.10979194194078445, -0.1373259574174881, -0.02445092797279358, 0.016880054026842117, -0.06606880575418472, -0.0035208952613174915, 0.2113197296857834, 0.08341390639543533, 0.011469815857708454, -0.17061764001846313, 0.02328658290207386, 0.003041445277631283, 0.08843331784009933, 0.024729810655117035, -0.035763561725616455, -0.07214576750993729, -0.014633738435804844, 0.09222395718097687, -0.04815279692411423, -0.038542188704013824, -0.029206398874521255, 0.07244298607110977, -0.0946277529001236, -0.010976563207805157, 0.10075828433036804, -0.21815639734268188, 0.007283247075974941, -0.018516529351472855, -0.1742037683725357, -0.07610148936510086, 0.07563143223524094, 0.10068865865468979, 0.0166289322078228, -0.004307861905544996, -0.08260039985179901, -0.03282611817121506, 0.047542110085487366, 0.10450034588575363, 0.08227589726448059, -0.051264688372612, 0.014231088571250439, -0.20938296616077423, 0.09991690516471863, 0.11107919365167618, 0.1647329479455948, 0.1102713868021965, -0.1103428527712822, 0.03613971546292305, 0.09362556040287018, 0.1493978202342987, -0.22475239634513855, 0.0595942847430706, -0.026358628645539284, 0.0026015129406005144, -0.1641087532043457, -0.16708578169345856, 0.07734901458024979, 0.005265839397907257, -0.09983660280704498, -0.03221847489476204, -0.22951798141002655, 0.10210248827934265, 0.09815455973148346, 0.1424349546432495, 0.15739908814430237, 0.08750562369823456, -0.1876486986875534, -0.10464978218078613, -2.6027343350582023e-32, 0.008059433661401272, -0.019199607893824577, -0.1407150775194168, -0.010619170032441616, -0.1603173017501831, -0.0827745720744133, 0.014302409254014492, -0.02529514767229557, -0.09961102902889252, 0.03611801564693451, -0.014090416021645069, 0.07839277386665344, 0.006869093514978886, -0.07955585420131683, -0.18177984654903412, 0.03932875022292137, -0.06960918754339218, 0.0018945374758914113, -0.051349442452192307, 0.16281482577323914, 0.30158281326293945, -0.07467159628868103, 0.20471885800361633, -0.32621878385543823, -0.050916023552417755, 0.015490037389099598, -0.09158669412136078, 0.08373668044805527, 0.028375187888741493, -0.03953957185149193, 0.022753311321139336, -0.26484641432762146, 0.02820439636707306, 0.021655239164829254, -0.10486962646245956, -0.13109473884105682, -0.1632007360458374, 0.10723420977592468, 0.051453597843647, 0.08570191264152527, 0.13201193511486053, 0.0004935534088872373, 0.25078558921813965, 0.08956300467252731, 0.16723419725894928, -0.0940479189157486, -0.17622633278369904, 0.07940864562988281, -0.022029494866728783, -0.06434149295091629, -0.12337294220924377, -0.045758288353681564, -0.01795192062854767, 0.00820592325180769, 0.007299498654901981, 0.13524197041988373, 0.15522654354572296, -0.07817640900611877, -0.09725996106863022, -0.033093828707933426, 0.12653136253356934, -0.0025787476915866137, 0.028169622644782066, 0.037579845637083054, 0.11169860512018204, -0.06096303462982178, -0.012166173197329044, 0.02012263983488083, 0.04771687462925911, -0.07529018074274063, 0.05513416603207588, 0.1191621720790863, 0.0811835378408432, -0.018373839557170868, 0.0968979075551033, -0.09572166204452515, -0.11877312511205673, 0.08431318402290344, -0.08685143291950226, -0.03133988752961159, -0.04669119045138359, 0.12780003249645233, -0.02844330482184887, 0.04591909423470497, -0.019779959693551064, 0.22401219606399536, -0.007240322884172201, 0.10535557568073273, -0.06583152711391449, -0.0752975344657898, -0.18125781416893005, 0.06757447868585587, 0.07035927474498749, -0.0842246487736702, 0.10678838193416595, 0.038040775805711746, 0.03430015593767166, 0.09005521982908249, -0.0572073869407177, -0.2288821041584015, 0.1852109581232071, 0.10717019438743591, 0.30029210448265076, 0.3040972948074341, 0.16977985203266144, -0.046613775193691254, 0.10272564738988876, 0.05108708515763283, -0.12146367877721786, -0.010716241784393787, -0.06193048879504204, -0.011532687582075596, 0.004131809342652559, -0.07408074289560318, 0.10908305644989014, 0.007537039928138256, 0.0371984988451004, 0.01619996875524521, 0.0027558959554880857, 0.01368024293333292, -0.046429555863142014, 0.1908888816833496, 0.1995917707681656, 0.1661567986011505, -0.019622063264250755, -0.0007757783751003444, -0.00509200943633914, -0.21104227006435394, 0.09250619262456894, 0.08233270049095154, 0.07465331256389618, 0.10539110004901886, 7.519622613472166e-7, -0.028612012043595314, 0.04225853830575943, 0.04157742112874985, -0.05982528626918793, 0.028075924143195152, 0.2384498119354248, 0.023440780118107796, -0.16069822013378143, 0.0006691081216558814, 0.11632751673460007, 0.0789843499660492, -0.18917568027973175, 0.051476120948791504, 0.04473017901182175, 0.005156467668712139, -0.07456149160861969, 0.01794317550957203, -0.1002371609210968, -0.09252117574214935, -0.06591573357582092, 0.04915924742817879, 0.12482044845819473, -0.0584087111055851, 0.05467835068702698, 0.11913207173347473, 0.020620739087462425, -0.18827584385871887, -0.039371658116579056, 0.16168312728405, 0.1731499880552292, 0.18019625544548035, -0.030916579067707062, -0.05165974423289299, -0.14091484248638153, -0.02494833990931511, -0.2498093694448471, -0.12252961844205856, -0.006271664053201675, 0.04149893671274185, 0.0909421369433403, -0.01258553471416235, -0.12303310632705688, -0.058585140854120255, -0.1413993388414383, -0.022603360936045647, -0.01411924697458744, -0.14897243678569794, -0.019675083458423615, -0.033198483288288116, 0.04419493302702904, -0.06802201271057129, -0.006307367701083422, 0.033726878464221954, 0.138304203748703, 0.1361786276102066, 0.0013922713696956635, -0.07150150090456009, -0.0842786580324173, 0.11918262392282486, -0.012594775296747684, 0.00233405246399343, -0.06754269450902939, 0.05311886593699455, 0.079454705119133, 0.094190314412117, -0.12335766851902008, -0.00850757397711277, 3.823445297496968e-34, -0.08084199577569962, 0.11139552295207977, -0.08218137919902802, -0.11379434913396835, 0.09080576151609421, -0.06775107979774475, 0.043160535395145416, 0.0359116829931736, -0.008229194208979607, -0.3342868983745575, -0.046507541090250015 ]
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.09397438913583755, 0.07149948179721832, -0.04506600275635719, 0.052946750074625015, 0.18240562081336975, 0.012973088771104813, 0.1670767217874527, -0.03520016372203827, 0.05830175057053566, 0.16836515069007874, -0.035044170916080475, 0.06886763870716095, -0.06977904587984085, 0.047834642231464386, -0.018247732892632484, -0.050512079149484634, 0.09719806164503098, 0.013361469842493534, -0.10101432353258133, -0.04854479059576988, -0.049800604581832886, 0.03494627773761749, 0.09149497002363205, -0.06808024644851685, 0.04278670996427536, -0.16061989963054657, -0.05659402534365654, 0.06905719637870789, 0.12417816370725632, -0.14313556253910065, 0.11718767136335373, 0.10144734382629395, -0.10819258540868759, 0.21662884950637817, 0.000005226755547482753, 0.04643852636218071, 0.23581047356128693, -0.0475124828517437, -0.17333769798278809, -0.06483741104602814, 0.035538554191589355, 0.1706051081418991, 0.03009278140962124, -0.02996920421719551, -0.028678247705101967, -0.13484987616539001, -0.16503559052944183, 0.022210249677300453, 0.1723538339138031, 0.10806187987327576, -0.018427766859531403, 0.03661063686013222, 0.0031844957266002893, -0.17582079768180847, 0.08809850364923477, -0.14887912571430206, 0.06125995144248009, 0.0663868635892868, -0.20040886104106903, -0.1207653060555458, 0.09879458695650101, 0.0061501977033913136, 0.041100360453128815, 0.05942268669605255, -0.20514249801635742, 0.0938124880194664, -0.04985411465167999, -0.07804728299379349, -0.02693266235291958, 0.3078150451183319, -0.051889821887016296, -0.06449772417545319, 0.019483132287859917, -0.05784004181623459, -0.01686882972717285, -0.018931426107883453, 0.0032886939588934183, 0.06060227379202843, -0.11490578949451447, 0.11708040535449982, -0.055642783641815186, 0.17991380393505096, -0.030430909246206284, -0.07606711238622665, -0.0022432964760810137, -0.14621806144714355, -0.07121587544679642, 0.17078754305839539, -0.008287359960377216, -0.13657830655574799, 0.031329452991485596, -0.09955453872680664, -0.08672909438610077, -0.07818703353404999, -0.1702294945716858, 0.006207474507391453, -0.11648630350828171, -0.09790020436048508, 0.053034279495477676, 0.07018378376960754, -0.033778198063373566, -0.14872212707996368, -0.09929013252258301, 0.01912861503660679, 0.07388710230588913, 0.13245917856693268, 0.01011588703840971, 0.023248620331287384, 0.07717926055192947, 0.08957450091838837, -0.08545716851949692, 0.11260782927274704, 0.0015771356411278248, -0.019859835505485535, 0.058147065341472626, 0.13555409014225006, 0.20285537838935852, 0.05847463756799698, -0.06413115561008453, 0.1124451756477356, 0.03520851209759712, 0.0777081847190857, -0.08888310939073563, 0.11466827243566513, 0.13579212129116058, -0.1216021254658699, -0.015204064548015594, 0.1583908051252365, -0.09506826102733612, -0.07605162262916565, 0.007281117141246796, 0.06995172053575516, 0.043509140610694885, -0.05646282806992531, -0.008903641253709793, -0.006912548560649157, -0.020095501095056534, 0.05201377719640732, -0.049150269478559494, -0.002196479355916381, 0.11800225079059601, -0.12959079444408417, -0.17450647056102753, 0.1216353252530098, 0.13759352266788483, -0.057551391422748566, 0.13161532580852509, -0.17036859691143036, -0.09088006615638733, 0.044289495795965195, -0.13906694948673248, 0.09086517244577408, -0.11103653907775879, 0.10980045050382614, 0.11910367012023926, 0.1613408625125885, 0.1547081470489502, 0.057654183357954025, -0.2191319614648819, 0.07305455952882767, 0.06591692566871643, -0.025777721777558327, -0.00616393331438303, -0.1436150223016739, 0.10582926869392395, 0.11395149677991867, 0.02684960700571537, -0.09583573043346405, -0.16242314875125885, 0.0412348210811615, 0.0891474112868309, 0.11915037781000137, -0.22289492189884186, -0.05220167711377144, -0.1400894671678543, 0.043526455760002136, -0.10469702631235123, -0.08215776830911636, -0.2897566854953766, 0.05181226506829262, 0.03792630508542061, -0.10030773282051086, -0.07935597747564316, -0.22624190151691437, 0.11437516659498215, -0.11362480372190475, -0.1351551115512848, -0.09543675184249878, -0.12950068712234497, -0.07676086574792862, -0.028828734531998634, 0.018971553072333336, 0.05137552693486214, -0.028281403705477715, -0.0035826382227241993, 0.04782332852482796, 0.08933799713850021, -0.11034692078828812, -0.010796676389873028, -0.16991938650608063, 0.022147592157125473, -0.18883709609508514, 0.04580913856625557, -0.0650893971323967, -0.0850958600640297, 0.01311449147760868, -0.10602403432130814, 0.2725708484649658, -0.021713117137551308, -0.09201419353485107, -0.11056148260831833, -0.11740938574075699, -0.04568355530500412, 0.0022955734748393297, -0.2334149032831192, -0.10880076140165329, -0.10301092267036438, 0.0902288407087326, -0.05872455984354019, 0.23299254477024078, -0.040712788701057434, 0.18624627590179443, 0.056090302765369415, -0.038651347160339355, -0.10466082394123077, 0.05729827284812927, -0.060927849262952805, 0.05873614549636841, 0.11526390165090561, 0.08777406066656113, 0.051901623606681824, 0.029920730739831924, 0.09908873587846756, 0.08971777558326721, -0.016762355342507362, -0.138192817568779, 0.12181288003921509, -0.23306912183761597, 0.1705583781003952, 0.05496959015727043, 0.05310222879052162, 0.0542871318757534, -0.07336919009685516, -0.10924561321735382, 0.16748568415641785, 0.11186478286981583, -0.05300212278962135, 0.1739993393421173, -0.059272702783346176, -0.03659551590681076, 0.17207777500152588, 0.03791287913918495, -0.036834921687841415, 0.06299171596765518, -0.11843671649694443, -0.11498302221298218, 0.05281651020050049, 0.04888368025422096, -0.058030206710100174, 0.06636790931224823, 0.15285350382328033, 0.06607722491025925, 0.05274231359362602, -0.15090744197368622, 0.117478147149086, -0.14250896871089935, 0.08101936429738998, 0.2134438157081604, 0.04994388669729233, 0.17885667085647583, 0.14987853169441223, 0.022310784086585045, -0.040174562484025955, -0.09977556765079498, 0.010191823355853558, -0.007519728969782591, -0.14703167974948883, -0.028664307668805122, 0.07514777779579163, 0.07698064297437668, -0.14539667963981628, 0.07500762492418289, 0.17221049964427948, -0.04184558242559433, 0.22180964052677155, 0.16890454292297363, -0.1493493616580963, -0.0480455607175827, -0.027067100629210472, 0.0681808590888977, 0.0610584057867527, -0.08994051069021225, -0.03276689350605011, -0.2508349120616913, 0.014370248652994633, 0.09994125366210938, 0.04440738633275032, 0.08698807656764984, -0.04665942117571831, 0.1560826301574707, 0.0691637471318245, 0.022798968479037285, 0.08402539044618607, -0.048587121069431305, 0.11188553273677826, 0.053672585636377335, 0.22699978947639465, 0.21278515458106995, -0.1071828305721283, -0.14313814043998718, 0.07040508836507797, -0.0006951093673706055, 0.10075271874666214, 0.23418068885803223, 0.17886608839035034, -0.06881006062030792, -0.07361771911382675, -0.24453653395175934, 0.0038385719526559114, 0.01662597618997097, -0.08537188172340393, 0.15370112657546997, -0.18989160656929016, 0.10459384322166443, -0.014855854213237762, 0.06519147753715515, -0.052569422870874405, 0.06759917736053467, 0.029987970367074013, -0.1147172600030899, -0.06614269316196442, 0.14034326374530792, -0.1520152986049652, -0.05086065083742142, 0.0493275411427021, -0.12209579348564148, -0.1768707036972046, -0.034313034266233444, 0.1740117073059082, -0.049449581652879715, -0.028376687318086624, 0.09574844688177109, -0.13890588283538818, 0.07374327629804611, 0.017056014388799667, -0.15132813155651093, -0.11581601202487946, -0.07165464758872986, 0.004504941403865814, -0.08012319356203079, -0.0012522174511104822, 0.01967192068696022, -0.015851901844143867, 0.008468135260045528, -0.02118675224483013, 0.13262218236923218, -0.0016221750993281603, 0.04813383147120476, -0.1812443882226944, 0.12636275589466095, 0.22563143074512482, 0.07422026991844177, 0.18097470700740814, 0.12170062214136124, -0.04946073517203331, 0.10132818669080734, -0.016031663864850998, -0.04693607985973358, -0.07144434005022049, -0.17848636209964752, -0.013688051141798496, 0.09854771941900253, 0.17270562052726746, -0.019208874553442, -0.09199654310941696, 0.03779260814189911, 0.03916742652654648, -0.07764427363872528, 0.03361661359667778, -0.10803110897541046, 0.042262159287929535, -0.1671638786792755, -0.10181959718465805, 0.05771660432219505, 0.03135187551379204, 0.021280065178871155, 0.0077590905129909515, 0.0017169811762869358, -0.082316555082798, 0.040031153708696365, 0.018764235079288483, -0.1073286160826683, -0.0545208714902401, -0.04550978168845177, 0.08293076604604721, -0.22422343492507935, 0.12017185240983963, 0.10113328695297241, 0.0572626069188118, 0.05171144753694534, 0.05864298343658447, 0.26327088475227356, -0.0965626910328865, 0.09294596314430237, 0.09077253192663193, -0.024882588535547256, 0.0636519193649292, -0.01694517582654953, 0.08766691386699677, -0.03678899258375168, 0.03174456208944321, -0.07521253824234009, -0.04213438183069229, 0.06901376694440842, 0.16141684353351593, -0.05294160544872284, 0.0069868979044258595, -0.14759688079357147, -0.009833546355366707, -0.18328624963760376, -0.3070560693740845, -0.13307149708271027, 0.032270122319459915, 0.14774857461452484, -0.045620717108249664, -0.009410956874489784, -0.03410172462463379, -0.01900515891611576, 0.08726464956998825, 0.10705641657114029, 0.08425217866897583, 0.16089126467704773, 0.20527783036231995, 0.0424240417778492, -0.035342440009117126, -0.07293105870485306, 0.3996898829936981, -0.1330520063638687, -0.07082267850637436, -0.11485942453145981, -0.17506076395511627, -0.09329189360141754, 0.043028656393289566, -0.1314028799533844, 0.24735215306282043, -0.15593232214450836, -0.015482626855373383, 0.01716141402721405, -0.006061012391000986, -0.05088019371032715, -0.1876586377620697, -0.15289288759231567, -0.10570774972438812, -0.23331010341644287, 0.016166627407073975, -0.13737991452217102, 0.1177128255367279, -0.17385545372962952, 0.005166814662516117, 0.09029588848352432, -0.1308729648590088, -0.042942702770233154, -0.07979566603899002, 0.11485555768013, 0.025502363219857216, 0.008485574275255203, 0.2130344957113266, 0.08977961540222168, -0.054085951298475266, -0.040510162711143494, -0.08023819327354431, 0.09314113855361938, 0.020449062809348106, 0.004558707121759653, 0.16791170835494995, 0.10891220718622208, -0.0077440631575882435, -0.08695241808891296, 0.01883755624294281, -0.05718513950705528, 0.2672910690307617, -0.05196824297308922, 0.0501059852540493, -0.0042715780436992645, -0.11936603486537933, 0.021681297570466995, 0.027973905205726624, -0.05233600735664368, -0.0856795385479927, 0.10991176962852478, -0.10227721184492111, -0.04195744916796684, -0.026284029707312584, -0.002538688015192747, 0.07293875515460968, -0.031417116522789, -0.0360538512468338, 0.06933680176734924, 0.12271702289581299, 0.36741188168525696, 0.0480651780962944, -0.07605164498090744, 0.20538169145584106, 0.003691340796649456, 0.008455123752355576, -0.21523940563201904, -0.04994909465312958, -0.1748669445514679, 0.04787292703986168, -0.15380722284317017, -0.09020685404539108, 0.11667267233133316, 0.03602477163076401, -0.18241485953330994, 0.06537485867738724, -0.10839782655239105, 0.037729259580373764, 0.056749701499938965, 0.003615214489400387, 0.13584578037261963, 0.056031376123428345, -0.10139685124158859, 0.11462979018688202, 0.016900457441806793, 0.034222207963466644, -0.04811246320605278, 0.005732389632612467, 0.06522712111473083, 0.2124890238046646, 0.1780903935432434, 0.1018422320485115, 0.2589031457901001, 0.12429580092430115, -0.024829579517245293, -0.15274398028850555, 0.028138060122728348, 0.14230068027973175, -0.21382637321949005, 0.08527341485023499, -0.13506445288658142, 0.16051895916461945, -0.031052209436893463, -0.05115291476249695, 0.09278594702482224, 0.172578826546669, 0.2412414699792862, 0.016690941527485847, 0.028979822993278503, -0.2049451768398285, -0.12931528687477112, 0.020978044718503952, 0.16633686423301697, 0.08467874675989151, -0.12471562623977661, 0.23730479180812836, -2.617621383264191e-32, 0.01991308480501175, -0.0069044665433466434, -0.08478518575429916, -0.13836176693439484, -0.19096089899539948, 0.14820434153079987, -0.043110258877277374, -0.11183098703622818, -0.02191910333931446, -0.16060930490493774, -0.03633151948451996, -0.04075710475444794, 0.12796610593795776, -0.13791456818580627, -0.03359789401292801, 0.0025792003143578768, 0.017283722758293152, -0.06678801029920578, 0.12184911221265793, 0.22758249938488007, 0.0801880955696106, -0.005106362979859114, 0.08855833858251572, 0.08221307396888733, -0.05543599650263786, -0.09189187735319138, -0.07281222939491272, -0.05711665004491806, -0.058972686529159546, 0.10925355553627014, -0.109309621155262, 0.11096403002738953, 0.019879261031746864, -0.025686191394925117, -0.09458542615175247, -0.09254517406225204, -0.04798886179924011, -0.21535776555538177, -0.06394774466753006, -0.018879525363445282, -0.013215337879955769, 0.039482470601797104, 0.032898347824811935, -0.15526129305362701, -0.11130375415086746, 0.09893286228179932, -0.04205695912241936, 0.08436933904886246, -0.16174592077732086, -0.10046562552452087, 0.09152019768953323, 0.00777830695733428, 0.03767917677760124, 0.071015365421772, -0.021885529160499573, -0.18032576143741608, -0.08375785499811172, 0.1299298256635666, -0.11735768616199493, 0.126205712556839, 0.11082806438207626, -0.04700740799307823, -0.01982959732413292, -0.039405785501003265, 0.056809619069099426, 0.07041279971599579, 0.3510896563529968, -0.10897500813007355, 0.1785525232553482, -0.0007537599885836244, -0.09442534297704697, 0.0623532198369503, -0.2801567316055298, 0.10594771802425385, -0.0967554822564125, -0.20445026457309723, -0.18138737976551056, 0.07899106293916702, -0.14458489418029785, 0.0357043519616127, -0.001985111040994525, 0.02759140357375145, 0.028551651164889336, -0.006282874848693609, -0.05583741515874863, -0.08196976035833359, -0.06625695526599884, -0.0037296691443771124, -0.09507255256175995, -0.1542399376630783, -0.03724057972431183, 0.03947577252984047, -0.2142479121685028, -0.1322944313287735, -0.07721477001905441, 0.09459715336561203, 0.0011788835981860757, 0.01383226178586483, -0.17096124589443207, -0.08722857385873795, 0.10320883244276047, -0.14810337126255035, 0.08974570780992508, 0.04491858184337616, 0.0877184346318245, -0.06453469395637512, 0.024869510903954506, 0.07362976670265198, -0.03495841845870018, 0.043255895376205444, -0.018720900639891624, -0.021489731967449188, 0.1365976333618164, 0.21312151849269867, 0.1318182647228241, -0.05231605842709541, -0.007529729511588812, -0.1113128736615181, 0.20403015613555908, 0.02512454427778721, -0.12738244235515594, 0.011691444553434849, -0.21081535518169403, 0.13397763669490814, -0.02393786981701851, 0.17545472085475922, -0.2067570686340332, -0.09302742779254913, 0.017729291692376137, -0.0489809587597847, 0.014653352089226246, -0.22816316783428192, 7.406455324598937e-7, -0.33686894178390503, 0.02312926948070526, -0.07115603238344193, -0.19220443069934845, -0.024761557579040527, 0.0732007846236229, -0.31322118639945984, 0.10887444019317627, -0.12228190153837204, 0.20570732653141022, 0.051101233810186386, -0.013286607339978218, -0.01712821237742901, -0.10644945502281189, 0.023196298629045486, 0.03568897023797035, -0.18129442632198334, 0.13891933858394623, -0.12976643443107605, 0.0712694376707077, -0.011534473858773708, 0.023932795971632004, 0.20425882935523987, -0.1706480234861374, 0.020628243684768677, 0.038265179842710495, -0.11414936184883118, -0.028222104534506798, 0.02943689189851284, 0.12455131858587265, -0.04015403985977173, -0.053024910390377045, 0.09531313925981522, 0.11419229209423065, 0.034602656960487366, -0.09365709125995636, -0.017864586785435677, -0.016720395535230637, 0.011845297180116177, -0.05214447155594826, 0.040094226598739624, 0.09607382863759995, 0.03794337436556816, -0.05301350727677345, 0.1400086134672165, 0.18242481350898743, -0.0655442401766777, 0.0035956096835434437, -0.03400874882936478, 0.08920761197805405, 0.11078815907239914, 0.20808738470077515, 0.10877978056669235, 0.11393797397613525, -0.06506267189979553, -0.028826875612139702, -0.03157958388328552, -0.08467469364404678, 0.044454216957092285, -0.026774229481816292, -0.091128408908844, -0.058155667036771774, 0.037665318697690964, -0.1381155550479889, 0.0446401871740818, -0.024372391402721405, -0.07712346315383911, -3.834412636831266e-35, -0.046616118401288986, 0.041053444147109985, 0.017117276787757874, -0.19972477853298187, -0.0223881546407938, -0.04230910912156105, 0.13347020745277405, 0.085367850959301, 0.009003683924674988, -0.027135327458381653, -0.10750371962785721 ]
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.09397438913583755, 0.07149948179721832, -0.04506600275635719, 0.052946750074625015, 0.18240562081336975, 0.012973088771104813, 0.1670767217874527, -0.03520016372203827, 0.05830175057053566, 0.16836515069007874, -0.035044170916080475, 0.06886763870716095, -0.06977904587984085, 0.047834642231464386, -0.018247732892632484, -0.050512079149484634, 0.09719806164503098, 0.013361469842493534, -0.10101432353258133, -0.04854479059576988, -0.049800604581832886, 0.03494627773761749, 0.09149497002363205, -0.06808024644851685, 0.04278670996427536, -0.16061989963054657, -0.05659402534365654, 0.06905719637870789, 0.12417816370725632, -0.14313556253910065, 0.11718767136335373, 0.10144734382629395, -0.10819258540868759, 0.21662884950637817, 0.000005226755547482753, 0.04643852636218071, 0.23581047356128693, -0.0475124828517437, -0.17333769798278809, -0.06483741104602814, 0.035538554191589355, 0.1706051081418991, 0.03009278140962124, -0.02996920421719551, -0.028678247705101967, -0.13484987616539001, -0.16503559052944183, 0.022210249677300453, 0.1723538339138031, 0.10806187987327576, -0.018427766859531403, 0.03661063686013222, 0.0031844957266002893, -0.17582079768180847, 0.08809850364923477, -0.14887912571430206, 0.06125995144248009, 0.0663868635892868, -0.20040886104106903, -0.1207653060555458, 0.09879458695650101, 0.0061501977033913136, 0.041100360453128815, 0.05942268669605255, -0.20514249801635742, 0.0938124880194664, -0.04985411465167999, -0.07804728299379349, -0.02693266235291958, 0.3078150451183319, -0.051889821887016296, -0.06449772417545319, 0.019483132287859917, -0.05784004181623459, -0.01686882972717285, -0.018931426107883453, 0.0032886939588934183, 0.06060227379202843, -0.11490578949451447, 0.11708040535449982, -0.055642783641815186, 0.17991380393505096, -0.030430909246206284, -0.07606711238622665, -0.0022432964760810137, -0.14621806144714355, -0.07121587544679642, 0.17078754305839539, -0.008287359960377216, -0.13657830655574799, 0.031329452991485596, -0.09955453872680664, -0.08672909438610077, -0.07818703353404999, -0.1702294945716858, 0.006207474507391453, -0.11648630350828171, -0.09790020436048508, 0.053034279495477676, 0.07018378376960754, -0.033778198063373566, -0.14872212707996368, -0.09929013252258301, 0.01912861503660679, 0.07388710230588913, 0.13245917856693268, 0.01011588703840971, 0.023248620331287384, 0.07717926055192947, 0.08957450091838837, -0.08545716851949692, 0.11260782927274704, 0.0015771356411278248, -0.019859835505485535, 0.058147065341472626, 0.13555409014225006, 0.20285537838935852, 0.05847463756799698, -0.06413115561008453, 0.1124451756477356, 0.03520851209759712, 0.0777081847190857, -0.08888310939073563, 0.11466827243566513, 0.13579212129116058, -0.1216021254658699, -0.015204064548015594, 0.1583908051252365, -0.09506826102733612, -0.07605162262916565, 0.007281117141246796, 0.06995172053575516, 0.043509140610694885, -0.05646282806992531, -0.008903641253709793, -0.006912548560649157, -0.020095501095056534, 0.05201377719640732, -0.049150269478559494, -0.002196479355916381, 0.11800225079059601, -0.12959079444408417, -0.17450647056102753, 0.1216353252530098, 0.13759352266788483, -0.057551391422748566, 0.13161532580852509, -0.17036859691143036, -0.09088006615638733, 0.044289495795965195, -0.13906694948673248, 0.09086517244577408, -0.11103653907775879, 0.10980045050382614, 0.11910367012023926, 0.1613408625125885, 0.1547081470489502, 0.057654183357954025, -0.2191319614648819, 0.07305455952882767, 0.06591692566871643, -0.025777721777558327, -0.00616393331438303, -0.1436150223016739, 0.10582926869392395, 0.11395149677991867, 0.02684960700571537, -0.09583573043346405, -0.16242314875125885, 0.0412348210811615, 0.0891474112868309, 0.11915037781000137, -0.22289492189884186, -0.05220167711377144, -0.1400894671678543, 0.043526455760002136, -0.10469702631235123, -0.08215776830911636, -0.2897566854953766, 0.05181226506829262, 0.03792630508542061, -0.10030773282051086, -0.07935597747564316, -0.22624190151691437, 0.11437516659498215, -0.11362480372190475, -0.1351551115512848, -0.09543675184249878, -0.12950068712234497, -0.07676086574792862, -0.028828734531998634, 0.018971553072333336, 0.05137552693486214, -0.028281403705477715, -0.0035826382227241993, 0.04782332852482796, 0.08933799713850021, -0.11034692078828812, -0.010796676389873028, -0.16991938650608063, 0.022147592157125473, -0.18883709609508514, 0.04580913856625557, -0.0650893971323967, -0.0850958600640297, 0.01311449147760868, -0.10602403432130814, 0.2725708484649658, -0.021713117137551308, -0.09201419353485107, -0.11056148260831833, -0.11740938574075699, -0.04568355530500412, 0.0022955734748393297, -0.2334149032831192, -0.10880076140165329, -0.10301092267036438, 0.0902288407087326, -0.05872455984354019, 0.23299254477024078, -0.040712788701057434, 0.18624627590179443, 0.056090302765369415, -0.038651347160339355, -0.10466082394123077, 0.05729827284812927, -0.060927849262952805, 0.05873614549636841, 0.11526390165090561, 0.08777406066656113, 0.051901623606681824, 0.029920730739831924, 0.09908873587846756, 0.08971777558326721, -0.016762355342507362, -0.138192817568779, 0.12181288003921509, -0.23306912183761597, 0.1705583781003952, 0.05496959015727043, 0.05310222879052162, 0.0542871318757534, -0.07336919009685516, -0.10924561321735382, 0.16748568415641785, 0.11186478286981583, -0.05300212278962135, 0.1739993393421173, -0.059272702783346176, -0.03659551590681076, 0.17207777500152588, 0.03791287913918495, -0.036834921687841415, 0.06299171596765518, -0.11843671649694443, -0.11498302221298218, 0.05281651020050049, 0.04888368025422096, -0.058030206710100174, 0.06636790931224823, 0.15285350382328033, 0.06607722491025925, 0.05274231359362602, -0.15090744197368622, 0.117478147149086, -0.14250896871089935, 0.08101936429738998, 0.2134438157081604, 0.04994388669729233, 0.17885667085647583, 0.14987853169441223, 0.022310784086585045, -0.040174562484025955, -0.09977556765079498, 0.010191823355853558, -0.007519728969782591, -0.14703167974948883, -0.028664307668805122, 0.07514777779579163, 0.07698064297437668, -0.14539667963981628, 0.07500762492418289, 0.17221049964427948, -0.04184558242559433, 0.22180964052677155, 0.16890454292297363, -0.1493493616580963, -0.0480455607175827, -0.027067100629210472, 0.0681808590888977, 0.0610584057867527, -0.08994051069021225, -0.03276689350605011, -0.2508349120616913, 0.014370248652994633, 0.09994125366210938, 0.04440738633275032, 0.08698807656764984, -0.04665942117571831, 0.1560826301574707, 0.0691637471318245, 0.022798968479037285, 0.08402539044618607, -0.048587121069431305, 0.11188553273677826, 0.053672585636377335, 0.22699978947639465, 0.21278515458106995, -0.1071828305721283, -0.14313814043998718, 0.07040508836507797, -0.0006951093673706055, 0.10075271874666214, 0.23418068885803223, 0.17886608839035034, -0.06881006062030792, -0.07361771911382675, -0.24453653395175934, 0.0038385719526559114, 0.01662597618997097, -0.08537188172340393, 0.15370112657546997, -0.18989160656929016, 0.10459384322166443, -0.014855854213237762, 0.06519147753715515, -0.052569422870874405, 0.06759917736053467, 0.029987970367074013, -0.1147172600030899, -0.06614269316196442, 0.14034326374530792, -0.1520152986049652, -0.05086065083742142, 0.0493275411427021, -0.12209579348564148, -0.1768707036972046, -0.034313034266233444, 0.1740117073059082, -0.049449581652879715, -0.028376687318086624, 0.09574844688177109, -0.13890588283538818, 0.07374327629804611, 0.017056014388799667, -0.15132813155651093, -0.11581601202487946, -0.07165464758872986, 0.004504941403865814, -0.08012319356203079, -0.0012522174511104822, 0.01967192068696022, -0.015851901844143867, 0.008468135260045528, -0.02118675224483013, 0.13262218236923218, -0.0016221750993281603, 0.04813383147120476, -0.1812443882226944, 0.12636275589466095, 0.22563143074512482, 0.07422026991844177, 0.18097470700740814, 0.12170062214136124, -0.04946073517203331, 0.10132818669080734, -0.016031663864850998, -0.04693607985973358, -0.07144434005022049, -0.17848636209964752, -0.013688051141798496, 0.09854771941900253, 0.17270562052726746, -0.019208874553442, -0.09199654310941696, 0.03779260814189911, 0.03916742652654648, -0.07764427363872528, 0.03361661359667778, -0.10803110897541046, 0.042262159287929535, -0.1671638786792755, -0.10181959718465805, 0.05771660432219505, 0.03135187551379204, 0.021280065178871155, 0.0077590905129909515, 0.0017169811762869358, -0.082316555082798, 0.040031153708696365, 0.018764235079288483, -0.1073286160826683, -0.0545208714902401, -0.04550978168845177, 0.08293076604604721, -0.22422343492507935, 0.12017185240983963, 0.10113328695297241, 0.0572626069188118, 0.05171144753694534, 0.05864298343658447, 0.26327088475227356, -0.0965626910328865, 0.09294596314430237, 0.09077253192663193, -0.024882588535547256, 0.0636519193649292, -0.01694517582654953, 0.08766691386699677, -0.03678899258375168, 0.03174456208944321, -0.07521253824234009, -0.04213438183069229, 0.06901376694440842, 0.16141684353351593, -0.05294160544872284, 0.0069868979044258595, -0.14759688079357147, -0.009833546355366707, -0.18328624963760376, -0.3070560693740845, -0.13307149708271027, 0.032270122319459915, 0.14774857461452484, -0.045620717108249664, -0.009410956874489784, -0.03410172462463379, -0.01900515891611576, 0.08726464956998825, 0.10705641657114029, 0.08425217866897583, 0.16089126467704773, 0.20527783036231995, 0.0424240417778492, -0.035342440009117126, -0.07293105870485306, 0.3996898829936981, -0.1330520063638687, -0.07082267850637436, -0.11485942453145981, -0.17506076395511627, -0.09329189360141754, 0.043028656393289566, -0.1314028799533844, 0.24735215306282043, -0.15593232214450836, -0.015482626855373383, 0.01716141402721405, -0.006061012391000986, -0.05088019371032715, -0.1876586377620697, -0.15289288759231567, -0.10570774972438812, -0.23331010341644287, 0.016166627407073975, -0.13737991452217102, 0.1177128255367279, -0.17385545372962952, 0.005166814662516117, 0.09029588848352432, -0.1308729648590088, -0.042942702770233154, -0.07979566603899002, 0.11485555768013, 0.025502363219857216, 0.008485574275255203, 0.2130344957113266, 0.08977961540222168, -0.054085951298475266, -0.040510162711143494, -0.08023819327354431, 0.09314113855361938, 0.020449062809348106, 0.004558707121759653, 0.16791170835494995, 0.10891220718622208, -0.0077440631575882435, -0.08695241808891296, 0.01883755624294281, -0.05718513950705528, 0.2672910690307617, -0.05196824297308922, 0.0501059852540493, -0.0042715780436992645, -0.11936603486537933, 0.021681297570466995, 0.027973905205726624, -0.05233600735664368, -0.0856795385479927, 0.10991176962852478, -0.10227721184492111, -0.04195744916796684, -0.026284029707312584, -0.002538688015192747, 0.07293875515460968, -0.031417116522789, -0.0360538512468338, 0.06933680176734924, 0.12271702289581299, 0.36741188168525696, 0.0480651780962944, -0.07605164498090744, 0.20538169145584106, 0.003691340796649456, 0.008455123752355576, -0.21523940563201904, -0.04994909465312958, -0.1748669445514679, 0.04787292703986168, -0.15380722284317017, -0.09020685404539108, 0.11667267233133316, 0.03602477163076401, -0.18241485953330994, 0.06537485867738724, -0.10839782655239105, 0.037729259580373764, 0.056749701499938965, 0.003615214489400387, 0.13584578037261963, 0.056031376123428345, -0.10139685124158859, 0.11462979018688202, 0.016900457441806793, 0.034222207963466644, -0.04811246320605278, 0.005732389632612467, 0.06522712111473083, 0.2124890238046646, 0.1780903935432434, 0.1018422320485115, 0.2589031457901001, 0.12429580092430115, -0.024829579517245293, -0.15274398028850555, 0.028138060122728348, 0.14230068027973175, -0.21382637321949005, 0.08527341485023499, -0.13506445288658142, 0.16051895916461945, -0.031052209436893463, -0.05115291476249695, 0.09278594702482224, 0.172578826546669, 0.2412414699792862, 0.016690941527485847, 0.028979822993278503, -0.2049451768398285, -0.12931528687477112, 0.020978044718503952, 0.16633686423301697, 0.08467874675989151, -0.12471562623977661, 0.23730479180812836, -2.617621383264191e-32, 0.01991308480501175, -0.0069044665433466434, -0.08478518575429916, -0.13836176693439484, -0.19096089899539948, 0.14820434153079987, -0.043110258877277374, -0.11183098703622818, -0.02191910333931446, -0.16060930490493774, -0.03633151948451996, -0.04075710475444794, 0.12796610593795776, -0.13791456818580627, -0.03359789401292801, 0.0025792003143578768, 0.017283722758293152, -0.06678801029920578, 0.12184911221265793, 0.22758249938488007, 0.0801880955696106, -0.005106362979859114, 0.08855833858251572, 0.08221307396888733, -0.05543599650263786, -0.09189187735319138, -0.07281222939491272, -0.05711665004491806, -0.058972686529159546, 0.10925355553627014, -0.109309621155262, 0.11096403002738953, 0.019879261031746864, -0.025686191394925117, -0.09458542615175247, -0.09254517406225204, -0.04798886179924011, -0.21535776555538177, -0.06394774466753006, -0.018879525363445282, -0.013215337879955769, 0.039482470601797104, 0.032898347824811935, -0.15526129305362701, -0.11130375415086746, 0.09893286228179932, -0.04205695912241936, 0.08436933904886246, -0.16174592077732086, -0.10046562552452087, 0.09152019768953323, 0.00777830695733428, 0.03767917677760124, 0.071015365421772, -0.021885529160499573, -0.18032576143741608, -0.08375785499811172, 0.1299298256635666, -0.11735768616199493, 0.126205712556839, 0.11082806438207626, -0.04700740799307823, -0.01982959732413292, -0.039405785501003265, 0.056809619069099426, 0.07041279971599579, 0.3510896563529968, -0.10897500813007355, 0.1785525232553482, -0.0007537599885836244, -0.09442534297704697, 0.0623532198369503, -0.2801567316055298, 0.10594771802425385, -0.0967554822564125, -0.20445026457309723, -0.18138737976551056, 0.07899106293916702, -0.14458489418029785, 0.0357043519616127, -0.001985111040994525, 0.02759140357375145, 0.028551651164889336, -0.006282874848693609, -0.05583741515874863, -0.08196976035833359, -0.06625695526599884, -0.0037296691443771124, -0.09507255256175995, -0.1542399376630783, -0.03724057972431183, 0.03947577252984047, -0.2142479121685028, -0.1322944313287735, -0.07721477001905441, 0.09459715336561203, 0.0011788835981860757, 0.01383226178586483, -0.17096124589443207, -0.08722857385873795, 0.10320883244276047, -0.14810337126255035, 0.08974570780992508, 0.04491858184337616, 0.0877184346318245, -0.06453469395637512, 0.024869510903954506, 0.07362976670265198, -0.03495841845870018, 0.043255895376205444, -0.018720900639891624, -0.021489731967449188, 0.1365976333618164, 0.21312151849269867, 0.1318182647228241, -0.05231605842709541, -0.007529729511588812, -0.1113128736615181, 0.20403015613555908, 0.02512454427778721, -0.12738244235515594, 0.011691444553434849, -0.21081535518169403, 0.13397763669490814, -0.02393786981701851, 0.17545472085475922, -0.2067570686340332, -0.09302742779254913, 0.017729291692376137, -0.0489809587597847, 0.014653352089226246, -0.22816316783428192, 7.406455324598937e-7, -0.33686894178390503, 0.02312926948070526, -0.07115603238344193, -0.19220443069934845, -0.024761557579040527, 0.0732007846236229, -0.31322118639945984, 0.10887444019317627, -0.12228190153837204, 0.20570732653141022, 0.051101233810186386, -0.013286607339978218, -0.01712821237742901, -0.10644945502281189, 0.023196298629045486, 0.03568897023797035, -0.18129442632198334, 0.13891933858394623, -0.12976643443107605, 0.0712694376707077, -0.011534473858773708, 0.023932795971632004, 0.20425882935523987, -0.1706480234861374, 0.020628243684768677, 0.038265179842710495, -0.11414936184883118, -0.028222104534506798, 0.02943689189851284, 0.12455131858587265, -0.04015403985977173, -0.053024910390377045, 0.09531313925981522, 0.11419229209423065, 0.034602656960487366, -0.09365709125995636, -0.017864586785435677, -0.016720395535230637, 0.011845297180116177, -0.05214447155594826, 0.040094226598739624, 0.09607382863759995, 0.03794337436556816, -0.05301350727677345, 0.1400086134672165, 0.18242481350898743, -0.0655442401766777, 0.0035956096835434437, -0.03400874882936478, 0.08920761197805405, 0.11078815907239914, 0.20808738470077515, 0.10877978056669235, 0.11393797397613525, -0.06506267189979553, -0.028826875612139702, -0.03157958388328552, -0.08467469364404678, 0.044454216957092285, -0.026774229481816292, -0.091128408908844, -0.058155667036771774, 0.037665318697690964, -0.1381155550479889, 0.0446401871740818, -0.024372391402721405, -0.07712346315383911, -3.834412636831266e-35, -0.046616118401288986, 0.041053444147109985, 0.017117276787757874, -0.19972477853298187, -0.0223881546407938, -0.04230910912156105, 0.13347020745277405, 0.085367850959301, 0.009003683924674988, -0.027135327458381653, -0.10750371962785721 ]
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.13064517080783844, 0.1906193196773529, -0.0038430304266512394, 0.05712171271443367, 0.04675661027431488, -0.005389770492911339, 0.14076127111911774, 0.03764374554157257, 0.1405930370092392, -0.02907778136432171, -0.03829813748598099, 0.05060373991727829, -0.17240434885025024, -0.017753491178154945, 0.10010115802288055, -0.06797192990779877, -0.11584687978029251, 0.1190161183476448, 0.04480978101491928, -0.003653428517282009, -0.0711178407073021, -0.08852735906839371, 0.076302669942379, -0.1505860537290573, -0.004296056926250458, 0.10351826995611191, -0.11067921668291092, 0.09017698466777802, 0.10562225431203842, -0.07782270014286041, 0.07920970767736435, -0.002236464759334922, -0.06733843684196472, -0.043058328330516815, 0.000006317445695458446, 0.07708939164876938, 0.10135290771722794, 0.09096415340900421, -0.18043270707130432, -0.0770706757903099, 0.1150607168674469, -0.07297384738922119, 0.05645259469747543, -0.03987489268183708, -0.10758645832538605, -0.10227852314710617, -0.07387280464172363, -0.06624036282300949, -0.05372240021824837, -0.030153056606650352, -0.05235505849123001, -0.0023080725222826004, -0.20139671862125397, -0.16984710097312927, 0.04139741510152817, -0.007234468124806881, -0.05620979890227318, 0.08767001330852509, -0.013833554461598396, -0.027228035032749176, -0.20832839608192444, -0.060351304709911346, 0.07249463349580765, 0.12239810824394226, 0.17707940936088562, 0.09841923415660858, -0.13032090663909912, -0.10910534113645554, 0.08690180629491806, 0.17727859318256378, 0.007254546973854303, 0.09982746094465256, -0.02100416086614132, -0.09041649848222733, -0.020966416224837303, -0.03667542338371277, -0.08062314242124557, -0.03798484802246094, -0.15663392841815948, -0.03717511147260666, -0.19190874695777893, 0.0008416589116677642, 0.002869142685085535, 0.055204857140779495, -0.2942056655883789, -0.25861236453056335, -0.010687040165066719, 0.06897082924842834, 0.02978113293647766, 0.08141244202852249, 0.0784686952829361, -0.01509830355644226, -0.13449910283088684, -0.06694608926773071, 0.09981890767812729, 0.12306320667266846, -0.02777530625462532, -0.11390003561973572, -0.03488168865442276, 0.007171572186052799, 0.02814004011452198, 0.06546314060688019, -0.053587060421705246, 0.09178553521633148, 0.049747124314308167, -0.09635400772094727, -0.04736369103193283, -0.09754404425621033, -0.04641736298799515, -0.006579292006790638, -0.15985232591629028, 0.16458985209465027, -0.23671811819076538, -0.06496215611696243, 0.14468690752983093, -0.049390338361263275, -0.018862204626202583, 0.09009914845228195, 0.04711665213108063, -0.03625938296318054, 0.0313500240445137, 0.0822560265660286, -0.023473579436540604, 0.18644137680530548, 0.05932591110467911, -0.0851840153336525, -0.15220758318901062, -0.10974858701229095, -0.041681431233882904, -0.07061807066202164, -0.09504903107881546, -0.05108064413070679, -0.059967268258333206, -0.030212095007300377, 0.17012208700180054, -0.03914717212319374, -0.042226824909448624, -0.14750924706459045, -0.050634950399398804, -0.1815682053565979, 0.14274708926677704, -0.020272765308618546, -0.0038619881961494684, 0.011334219016134739, 0.022816313430666924, -0.02828962914645672, -0.01777729019522667, 0.1639242321252823, -0.04949386417865753, 0.048623427748680115, -0.1363818198442459, 0.09094157814979553, -0.12086410075426102, 0.00933905690908432, -0.2175462543964386, 0.058686889708042145, -0.1114833727478981, -0.12034390866756439, -0.2780444025993347, 0.008771710097789764, -0.008069426752626896, -0.08916445821523666, 0.038696181029081345, -0.07799702882766724, 0.3189989924430847, 0.04940799996256828, 0.01391001045703888, -0.03548837825655937, -0.06760061532258987, -0.01772957295179367, -0.03435618057847023, -0.24201849102973938, -0.2101059854030609, -0.0037620344664901495, -0.24799802899360657, 0.16577450931072235, 0.09604063630104065, 0.0647820383310318, -0.07790788263082504, 0.10647319257259369, 0.08623062819242477, 0.06016101688146591, -0.11901050806045532, 0.06298288702964783, 0.24930794537067413, 0.05800909548997879, 0.016257744282484055, 0.111300528049469, 0.025667628273367882, -0.0386347696185112, 0.005864471197128296, -0.010250459425151348, 0.05573202669620514, 0.2763747274875641, -0.03818247467279434, 0.0525163970887661, -0.008671097457408905, 0.0960109755396843, 0.08636346459388733, -0.18720342218875885, -0.1717223972082138, 0.056548357009887695, -0.11382029950618744, 0.124542735517025, 0.02642647735774517, -0.09738734364509583, -0.12579572200775146, 0.23249515891075134, 0.15985983610153198, -0.26167920231819153, -0.07828770577907562, 0.0036418100353330374, -0.0322628952562809, -0.013411075808107853, -0.06117548793554306, -0.12655241787433624, -0.08788592368364334, 0.0822482630610466, -0.09179982542991638, 0.04244888573884964, -0.07211944460868835, 0.011745959520339966, 0.14798833429813385, 0.09235532581806183, -0.09005080908536911, 0.010300909169018269, 0.09497404098510742, 0.006818684749305248, -0.014558902941644192, 0.01375391986221075, -0.09653659909963608, -0.12887586653232574, 0.13397714495658875, 0.13762594759464264, -0.04783930256962776, 0.0779387354850769, -0.0004904067027382553, -0.0503508485853672, 0.06413349509239197, -0.05550425872206688, -0.06075255945324898, -0.003091666381806135, -0.018736092373728752, -0.03424458205699921, 0.014129042625427246, 0.09391441196203232, -0.08244214951992035, 0.2418632060289383, -0.022872019559144974, -0.04466288164258003, 0.2466079592704773, 0.02496548928320408, -0.0976722240447998, 0.020963327959179878, 0.09798972308635712, 0.006625487469136715, 0.19124914705753326, 0.15942084789276123, -0.06420151144266129, 0.03862215206027031, 0.21098972856998444, -0.04344344139099121, -0.009389258921146393, 0.06529543548822403, 0.033788710832595825, -0.01341614592820406, -0.0232083722949028, -0.07994771003723145, 0.06845136731863022, 0.08708692342042923, 0.0264611653983593, 0.029456717893481255, -0.11604412645101547, 0.009605471044778824, -0.031102254986763, -0.07568901032209396, -0.005849545821547508, 0.03601381555199623, 0.022377589717507362, -0.14630134403705597, -0.03275420144200325, 0.029631758108735085, 0.07158410549163818, -0.1538720279932022, 0.11736180633306503, -0.03971026837825775, -0.0662396028637886, 0.03040795400738716, 0.08378877490758896, -0.14842242002487183, 0.05588039755821228, 0.03664576634764671, -0.00009226814290741459, -0.048790767788887024, 0.11496205627918243, 0.10538418591022491, -0.032523952424526215, 0.053103744983673096, -0.07845566421747208, -0.10107838362455368, 0.05942244827747345, -0.03261058032512665, -0.05849754810333252, 0.14684990048408508, 0.05969918891787529, 0.154606431722641, 0.03252742439508438, -0.08191411197185516, -0.22384241223335266, 0.09284265339374542, 0.036940403282642365, -0.06541898846626282, 0.1210402101278305, 0.048892658203840256, -0.0970936194062233, 0.007750099990516901, -0.04490067809820175, -0.27398061752319336, 0.16377584636211395, 0.07338761538267136, 0.1401732861995697, 0.12028832733631134, 0.076543428003788, -0.06491886079311371, 0.039219677448272705, -0.04296107962727547, -0.08128459006547928, -0.027800587937235832, 0.037785373628139496, 0.057044051587581635, -0.03087402693927288, 0.06190453842282295, 0.10869748890399933, -0.08681166917085648, 0.0430515818297863, -0.014064937829971313, -0.07191988080739975, -0.05809681490063667, 0.32491084933280945, 0.03566090017557144, -0.10847524553537369, 0.010742565616965294, -0.010241453535854816, -0.19628077745437622, 0.0429755374789238, -0.11096922308206558, 0.048480331897735596, -0.18108324706554413, 0.00311041297391057, -0.04238072410225868, -0.0028427212964743376, -0.025769835337996483, -0.04315686970949173, -0.04788612574338913, 0.03867332264780998, -0.07551880180835724, -0.09713990986347198, 0.041066329926252365, -0.030829403549432755, 0.03079751692712307, -0.009014987386763096, 0.046004291623830795, 0.11998042464256287, -0.015817392617464066, -0.12115553021430969, 0.05449901893734932, 0.06946790218353271, 0.07858678698539734, 0.014616712927818298, -0.12734973430633545, -0.13753598928451538, -0.15267926454544067, -0.0742572546005249, -0.026907706633210182, 0.04134327173233032, -0.14941366016864777, -0.01895231567323208, -0.08491519838571548, 0.06303910911083221, 0.0574650913476944, 0.1760980784893036, -0.22365234792232513, -0.13318073749542236, 0.02768683061003685, 0.23597170412540436, -0.00040597422048449516, -0.03222284093499184, -0.031144659966230392, -0.10730592161417007, 0.1673123985528946, -0.04611758887767792, 0.24434855580329895, 0.0523742139339447, 0.06016143038868904, -0.11731667816638947, -0.0919768363237381, 0.04342380911111832, 0.031072676181793213, 0.03534943237900734, 0.06263919174671173, 0.1143966019153595, 0.22995199263095856, 0.11478040367364883, 0.002165253506973386, 0.012326667085289955, -0.03569142147898674, 0.02784920483827591, 0.015200719237327576, 0.10630720853805542, 0.17425867915153503, 0.13840462267398834, 0.061877671629190445, -0.05131004378199577, -0.011445167474448681, 0.23064644634723663, 0.12260846793651581, 0.001103654969483614, -0.0784677118062973, -0.13043394684791565, 0.11707022041082382, -0.18907427787780762, -0.19400334358215332, -0.037064529955387115, 0.0696689561009407, 0.08140724897384644, -0.004379841033369303, -0.010396970435976982, 0.0003375970118213445, 0.1018301472067833, 0.008074894547462463, 0.052415505051612854, 0.044172290712594986, 0.16683390736579895, 0.05812998116016388, -0.009938628412783146, 0.00802051555365324, 0.26480746269226074, -0.07860137522220612, -0.05693645030260086, 0.08434898406267166, -0.1384945958852768, -0.07324917614459991, 0.06093559414148331, 0.05051390081644058, -0.14964185655117035, -0.0077024600468575954, -0.10895506292581558, -0.14260904490947723, -0.000316895340802148, -0.043076690286397934, -0.07662563771009445, -0.11600916087627411, -0.12726901471614838, -0.058867696672677994, -0.07335294038057327, -0.07094211876392365, 0.222486212849617, -0.1325359046459198, -0.033615436404943466, 0.21970190107822418, -0.07694210112094879, -0.08153948187828064, 0.0765889436006546, 0.03169594705104828, -0.24629822373390198, 0.15355069935321808, 0.12854719161987305, -0.16490153968334198, 0.01352714467793703, 0.027398092672228813, -0.08628910034894943, 0.019377775490283966, -0.11460740864276886, -0.05099668726325035, 0.21803046762943268, 0.060528066009283066, 0.0809125304222107, -0.10867324471473694, -0.08655528724193573, 0.010710426606237888, 0.15200193226337433, 0.09568773955106735, 0.13160492479801178, -0.16591385006904602, -0.022806396707892418, 0.13668276369571686, 0.1380334049463272, -0.04448225349187851, -0.20447790622711182, 0.042122337967157364, 0.16342493891716003, -0.14381355047225952, 0.14232110977172852, 0.00009838518599281088, 0.1326865255832672, -0.055847588926553726, -0.21016937494277954, -0.029578469693660736, -0.004181224387139082, -0.04692127928137779, 0.05488580837845802, -0.0596829392015934, 0.04013490676879883, -0.04152001813054085, 0.08545758575201035, -0.06841733306646347, -0.022593582049012184, -0.01400936022400856, 0.03567826375365257, -0.01755603961646557, 0.07608212530612946, -0.09704380482435226, -0.013193190097808838, -0.017999250441789627, 0.17779497802257538, 0.09464380890130997, -0.025839347392320633, -0.03632768616080284, -0.06553376466035843, 0.06796883791685104, 0.0380578339099884, 0.08517345041036606, 0.06084167957305908, 0.026199590414762497, -0.005962563678622246, 0.09221906960010529, -0.09019158780574799, -0.022941548377275467, 0.1632101684808731, 0.014653870835900307, 0.0798504427075386, 0.024302946403622627, 0.12636469304561615, -0.015467594377696514, -0.006197815295308828, 0.10146305710077286, 0.09472453594207764, -0.16794170439243317, -0.055495139211416245, 0.1044558733701706, 0.01174343004822731, -0.23255541920661926, -0.1700899600982666, 0.05661085247993469, -0.013366075232625008, -0.07920356839895248, -0.024682829156517982, -0.029813094064593315, 0.10580801218748093, -0.1172587126493454, -0.04009784013032913, 0.1356426477432251, 0.012466005980968475, -0.06654714047908783, 0.02354404702782631, -2.390440349173285e-32, -0.12007419019937515, -0.08313494175672531, 0.044177763164043427, -0.08393653482198715, -0.08447062224149704, 0.010126487351953983, -0.00008751468703849241, -0.08132505416870117, -0.030370937660336494, -0.04021965712308884, -0.11495418101549149, 0.045263439416885376, 0.019744083285331726, 0.02880401909351349, -0.15753954648971558, -0.15398861467838287, -0.01181283313781023, -0.0064458963461220264, -0.07896923273801804, 0.09329631179571152, 0.16889186203479767, 0.2267155647277832, -0.04305685684084892, 0.02376476116478443, -0.1801314800977707, -0.17102622985839844, 0.02306067757308483, -0.1997135728597641, -0.0002968970511574298, -0.07118985801935196, -0.07409025728702545, -0.08217769116163254, -0.05739857256412506, -0.15712378919124603, -0.06330373138189316, 0.04485959932208061, -0.15435995161533356, 0.04684813693165779, 0.15250258147716522, 0.07061144709587097, 0.015344464220106602, 0.0920557975769043, 0.18500839173793793, -0.09332296997308731, 0.09577005356550217, -0.0429624579846859, 0.021424857899546623, 0.127572700381279, -0.11687727272510529, -0.057825565338134766, -0.08686874806880951, 0.12220878899097443, 0.05076378211379051, -0.11023501306772232, 0.18632416427135468, 0.01278679072856903, 0.08899441361427307, 0.09540654718875885, -0.0977209284901619, -0.2089845985174179, 0.09215761721134186, 0.04524511471390724, 0.04922949895262718, -0.022509051486849785, 0.14508017897605896, 0.0029647049959748983, 0.2642597258090973, 0.04644105210900307, 0.07022001594305038, 0.03473249077796936, 0.1453939974308014, 0.09910787642002106, -0.04967749863862991, -0.064633309841156, 0.08758214116096497, -0.12003244459629059, -0.2034013271331787, -0.09788911789655685, -0.019721010699868202, 0.003841002006083727, 0.07175517082214355, 0.018899425864219666, 0.02270263060927391, 0.1172650158405304, -0.04579783231019974, 0.0974830910563469, -0.01576036587357521, 0.02464483678340912, -0.14852119982242584, -0.06058019772171974, -0.12957099080085754, -0.13193899393081665, 0.10856477916240692, -0.01970081217586994, 0.06226624175906181, 0.018300002440810204, -0.08354171365499496, 0.10186692327260971, -0.036628589034080505, 0.14325954020023346, 0.02532639168202877, 0.015025775879621506, 0.15464499592781067, -0.1656244546175003, 0.1145193949341774, 0.04850766062736511, 0.07401766628026962, -0.06568380445241928, -0.05049653723835945, -0.05594773218035698, -0.1385885328054428, 0.06695036590099335, 0.13012222945690155, 0.10814086347818375, 0.26090461015701294, 0.2469853013753891, -0.08973896503448486, 0.0387866385281086, 0.07146833837032318, 0.07698682695627213, -0.166800394654274, -0.05151040479540825, 0.11992368847131729, 0.016457244753837585, -0.058863211423158646, 0.12765094637870789, -0.12790422141551971, -0.2001902014017105, 0.008255036547780037, -0.05694880709052086, 0.01580195128917694, 0.10762820392847061, 7.875142955526826e-7, -0.13906404376029968, 0.11394684761762619, 0.005217012017965317, 0.09767630696296692, -0.11072488874197006, 0.0013179396046325564, -0.1237969920039177, -0.017032044008374214, 0.03375464677810669, -0.0186191163957119, 0.14439524710178375, -0.03325217217206955, 0.014372886158525944, 0.1647380292415619, -0.08714347332715988, -0.036343321204185486, -0.005452693440020084, -0.0022058822214603424, 0.036741189658641815, -0.12039247900247574, -0.11572973430156708, 0.17144188284873962, -0.15243223309516907, -0.08003119379281998, 0.14726826548576355, -0.11914646625518799, 0.0004332300159148872, 0.15557359158992767, -0.062451958656311035, 0.059427496045827866, 0.07780840992927551, 0.1722245067358017, -0.17525558173656464, 0.14638356864452362, 0.024843154475092888, -0.03386562317609787, -0.16954854130744934, -0.09374749660491943, 0.14935722947120667, 0.07572827488183975, 0.05741742253303528, 0.018111081793904305, 0.023842429742217064, 0.0710122287273407, 0.11633679270744324, 0.028197655454277992, -0.11648281663656235, -0.04315045848488808, 0.01915065385401249, -0.06551005691289902, -0.03709413483738899, 0.0541221983730793, 0.15985682606697083, 0.1571386754512787, 0.02484579011797905, -0.08005407452583313, 0.034835461527109146, -0.2318541258573532, 0.025797849521040916, 0.024767011404037476, -0.04279620200395584, 0.02164669893682003, 0.11822579801082611, -0.0739017128944397, 0.1298864185810089, -0.06102076545357704, -0.05512594059109688, 2.3027948107933036e-34, -0.04897065833210945, -0.022111939266324043, -0.044363297522068024, -0.0262693390250206, 0.051286377012729645, -0.0541505441069603, -0.05795877054333687, -0.04621447995305061, 0.08264598995447159, -0.23781460523605347, -0.08621226251125336 ]
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.15126602351665497, 0.19143031537532806, -0.016361400485038757, 0.05091918632388115, 0.04303525760769844, -0.0063417162746191025, 0.14310449361801147, 0.04384046420454979, 0.11758726090192795, -0.02970604971051216, -0.033575452864170074, 0.03711607679724693, -0.19003985822200775, -0.017747433856129646, 0.09432251751422882, -0.07368651777505875, -0.1280776709318161, 0.11661098897457123, 0.03342873230576515, -0.0011173117673024535, -0.08792033791542053, -0.08501832187175751, 0.0806746855378151, -0.1768832802772522, 0.0030604591593146324, 0.14230845868587494, -0.10728374123573303, 0.09113691747188568, 0.11774025112390518, -0.0754450112581253, 0.08252183347940445, 0.002051368122920394, -0.04737012833356857, -0.059852954000234604, 0.000006117690645623952, 0.056870270520448685, 0.12144487351179123, 0.08757174015045166, -0.1570451557636261, -0.06726424396038055, 0.08775772899389267, -0.08260013908147812, 0.07916342467069626, -0.028421534225344658, -0.10084984451532364, -0.13624556362628937, -0.05639404058456421, -0.06742268800735474, -0.044770415872335434, -0.05077013745903969, -0.05394570156931877, 0.03624497726559639, -0.1834402084350586, -0.19207273423671722, 0.05298052728176117, 0.021349653601646423, -0.056480757892131805, 0.08868473023176193, -0.012679832987487316, 0.010220787487924099, -0.1936204433441162, -0.05280965566635132, 0.04698263108730316, 0.15951025485992432, 0.16054636240005493, 0.09208299219608307, -0.15271811187267303, -0.1318119764328003, 0.11882821470499039, 0.19857357442378998, 0.007688105572015047, 0.09533657878637314, -0.036458808928728104, -0.09563624113798141, 0.000049056499847210944, 0.004809219855815172, -0.07126493006944656, -0.06141822412610054, -0.15769430994987488, -0.044899068772792816, -0.19325506687164307, 0.001295164111070335, 0.0008873752085492015, 0.050320446491241455, -0.2957007884979248, -0.2546667456626892, -0.005267192609608173, 0.06684870272874832, 0.01731701008975506, 0.0606846921145916, 0.06518705189228058, -0.0019928577821701765, -0.14034268260002136, -0.08994382619857788, 0.1514190435409546, 0.10242347419261932, -0.02941749431192875, -0.12767499685287476, -0.045633938163518906, 0.023834388703107834, -0.002734134206548333, 0.08267253637313843, -0.07457923144102097, 0.09940054267644882, 0.07029666751623154, -0.11650147289037704, -0.024347884580492973, -0.07775769382715225, -0.003918332979083061, -0.002053122967481613, -0.13622915744781494, 0.17120464146137238, -0.20823219418525696, -0.11048619449138641, 0.1331031173467636, -0.023079026490449905, 0.033482834696769714, 0.08514802157878876, 0.019340649247169495, -0.025158001109957695, 0.027831386774778366, 0.08572231978178024, -0.05582015588879585, 0.17738927900791168, 0.049649178981781006, -0.09141916036605835, -0.148079514503479, -0.08385318517684937, -0.020421437919139862, -0.06392218172550201, -0.07693661749362946, -0.03227907046675682, -0.022309983149170876, -0.0270362738519907, 0.20477941632270813, -0.04145188257098198, -0.018429195508360863, -0.16445086896419525, -0.03837413340806961, -0.1658950001001358, 0.13704323768615723, -0.017496833577752113, -0.0006038671708665788, 0.005851427558809519, 0.035066720098257065, -0.015975994989275932, -0.0221078023314476, 0.1412954181432724, -0.05397200584411621, 0.05318807065486908, -0.1307780146598816, 0.12141315639019012, -0.13524296879768372, 0.013180633075535297, -0.20956569910049438, 0.05982685089111328, -0.11973517388105392, -0.1081961840391159, -0.29135996103286743, -0.03339076042175293, -0.006128708831965923, -0.09234766662120819, 0.04656559228897095, -0.0680466741323471, 0.3037112355232239, 0.06710723042488098, 0.011963597498834133, -0.04066426306962967, -0.07526345551013947, -0.026561489328742027, -0.04258105903863907, -0.2602427005767822, -0.2004653364419937, -0.007286583073437214, -0.25757256150245667, 0.16981275379657745, 0.08751430362462997, 0.046235840767621994, -0.07684459537267685, 0.11973314732313156, 0.1112077459692955, 0.028927136212587357, -0.0941089317202568, 0.05161139741539955, 0.25914815068244934, 0.06682642549276352, 0.018334314227104187, 0.11178122460842133, 0.034009840339422226, -0.0608736127614975, 0.01969342865049839, -0.02007421851158142, 0.049641385674476624, 0.27760738134384155, -0.05422046035528183, 0.044244907796382904, -0.0022485624067485332, 0.07548509538173676, 0.10140421241521835, -0.16617552936077118, -0.1490882933139801, 0.05025629699230194, -0.1106702983379364, 0.1146305650472641, -0.0000242733076447621, -0.13439829647541046, -0.12328656762838364, 0.21306973695755005, 0.18800634145736694, -0.23319044709205627, -0.10647211968898773, -0.006584736052900553, -0.03252962604165077, -0.030866233631968498, -0.05455469340085983, -0.1281682699918747, -0.08569660782814026, 0.07762860506772995, -0.0961020216345787, 0.04644683003425598, -0.07384033501148224, 0.026979437097907066, 0.16052792966365814, 0.07117987424135208, -0.0794588178396225, 0.017893224954605103, 0.09102602303028107, -0.0024821434635668993, 0.029420699924230576, 0.021946335211396217, -0.08324000984430313, -0.14675311744213104, 0.12410080432891846, 0.12479674071073532, -0.06864554435014725, 0.06065121665596962, 0.03394338861107826, -0.065327487885952, 0.05376371368765831, -0.09369926899671555, -0.03655768185853958, 0.0038418322801589966, -0.014822862111032009, -0.026705540716648102, -0.0067716301418840885, 0.08608874678611755, -0.09606948494911194, 0.2464299350976944, -0.0005477569065988064, -0.03277485817670822, 0.2776872217655182, 0.005483339540660381, -0.0873025506734848, 0.0016820887103676796, 0.09567995369434357, -0.010137731209397316, 0.18782776594161987, 0.15521247684955597, -0.08300871402025223, 0.06190242990851402, 0.24780146777629852, -0.02949700504541397, -0.0032964907586574554, 0.07112438976764679, 0.03526033088564873, -0.0016313641099259257, -0.0316728912293911, -0.07919738441705704, 0.06012055650353432, 0.10128891468048096, 0.037410590797662735, 0.01551888883113861, -0.08958938717842102, -0.0031453592237085104, 0.0030645495280623436, -0.10033834725618362, -0.02295238897204399, 0.05259571969509125, 0.009658562950789928, -0.13437426090240479, -0.04222942888736725, 0.006068047601729631, 0.07301172614097595, -0.14991171658039093, 0.11073814332485199, -0.05129462480545044, -0.07753706723451614, 0.014006201177835464, 0.1019580215215683, -0.126054584980011, 0.07549089938402176, 0.030644793063402176, 0.004287349991500378, -0.05247117578983307, 0.10845073312520981, 0.09106556326150894, -0.03712533041834831, 0.09338489174842834, -0.09762020409107208, -0.10756044089794159, 0.02945132367312908, -0.011715689674019814, -0.05181194469332695, 0.1456211507320404, 0.049148865044116974, 0.17525403201580048, 0.05198613554239273, -0.09557880461215973, -0.2269071489572525, 0.04915129020810127, 0.029623158276081085, -0.0682058110833168, 0.10985834151506424, 0.08027376979589462, -0.086822010576725, 0.0027563117910176516, -0.027605967596173286, -0.2451470047235489, 0.15690834820270538, 0.09914931654930115, 0.13684245944023132, 0.12518855929374695, 0.07772107422351837, -0.06573077291250229, 0.041330572217702866, -0.021377913653850555, -0.08894635736942291, -0.04209674894809723, 0.019532646983861923, 0.050847720354795456, -0.05120980739593506, 0.03321150317788124, 0.09918314963579178, -0.11140655726194382, 0.04190744087100029, -0.012905101291835308, -0.07158178836107254, -0.0202778410166502, 0.3379467725753784, 0.017147358506917953, -0.09582090377807617, 0.050084326416254044, 0.025162378326058388, -0.19533009827136993, 0.05198175832629204, -0.12365850061178207, 0.047034263610839844, -0.18482477962970734, 0.016630513593554497, -0.029979504644870758, -0.03572650998830795, -0.010657192207872868, -0.02026633732020855, -0.0545072965323925, 0.023729683831334114, -0.07797890901565552, -0.10970783978700638, 0.03620206192135811, -0.0656578540802002, 0.039641089737415314, -0.028275642544031143, 0.020561961457133293, 0.09315351396799088, -0.03495851531624794, -0.09764746576547623, 0.089395672082901, 0.07425686717033386, 0.10382266342639923, 0.0024192717391997576, -0.1242319718003273, -0.13592655956745148, -0.15947826206684113, -0.05676480382680893, -0.030885472893714905, 0.01973869651556015, -0.12856660783290863, -0.02589138224720955, -0.1092645600438118, 0.05710190534591675, 0.04918735474348068, 0.16356799006462097, -0.21784937381744385, -0.1415000706911087, 0.025133881717920303, 0.20322343707084656, 0.007068034261465073, -0.041069597005844116, -0.021274203434586525, -0.10085859894752502, 0.17103123664855957, -0.05551117658615112, 0.27960172295570374, 0.022722674533724785, 0.05514999106526375, -0.081473708152771, -0.09472533315420151, 0.059938695281744, -0.010861270129680634, 0.04823341593146324, 0.049881499260663986, 0.09084664285182953, 0.20649603009223938, 0.07992248237133026, 0.03260305896401405, -0.004579406697303057, -0.03189999237656593, 0.03688283637166023, 0.052735745906829834, 0.09789295494556427, 0.18835000693798065, 0.1094852015376091, 0.06116268038749695, -0.07240454852581024, -0.01311221532523632, 0.24491938948631287, 0.13329735398292542, -0.004402355756610632, -0.05239009112119675, -0.08249446004629135, 0.0959412083029747, -0.2002909779548645, -0.18616029620170593, -0.002512966748327017, 0.06887277960777283, 0.09596126526594162, -0.0044469390995800495, -0.03174285590648651, 0.026183195412158966, 0.1028757244348526, 0.007477559149265289, 0.055081915110349655, 0.04387972131371498, 0.17519718408584595, 0.048004068434238434, -0.020180439576506615, 0.004227908793836832, 0.25539544224739075, -0.08205027878284454, -0.09998922795057297, 0.0702170804142952, -0.1517607420682907, -0.048264406621456146, 0.07362408936023712, 0.03348231688141823, -0.123329296708107, -0.03575751557946205, -0.09548234194517136, -0.1508007049560547, 0.020544443279504776, -0.05178963392972946, -0.06781187653541565, -0.10846257209777832, -0.132658451795578, -0.09709920734167099, -0.0553523413836956, -0.07021359354257584, 0.22481761872768402, -0.1310615837574005, -0.05273760110139847, 0.20119255781173706, -0.10677292197942734, -0.0786682665348053, 0.07206087559461594, 0.03287447616457939, -0.24191884696483612, 0.16097646951675415, 0.1559819132089615, -0.14602497220039368, 0.0037545901723206043, 0.041948046535253525, -0.08987101912498474, 0.024857211858034134, -0.11470231413841248, -0.036521848291158676, 0.22703035175800323, 0.05100316181778908, 0.0683956891298294, -0.10741548985242844, -0.11876974999904633, 0.028082987293601036, 0.16970837116241455, 0.09348983317613602, 0.12064071744680405, -0.17210640013217926, -0.03446692228317261, 0.12858858704566956, 0.14708928763866425, -0.04762990027666092, -0.20213943719863892, 0.01753631979227066, 0.18096375465393066, -0.15332065522670746, 0.12709805369377136, 0.0268702395260334, 0.11865700036287308, -0.07537355273962021, -0.1902436763048172, 0.014092366211116314, -0.026597699150443077, -0.015619296580553055, 0.06834481656551361, -0.09080201387405396, 0.04808734357357025, -0.04603403061628342, 0.06270622462034225, -0.0466848723590374, -0.03173142299056053, -0.02507724054157734, 0.014634610153734684, -0.008675540797412395, 0.07910634577274323, -0.08248760551214218, -0.011904267594218254, -0.004057439975440502, 0.17022934556007385, 0.07982726395130157, -0.019909899681806564, -0.05065785348415375, -0.08541695028543472, 0.04616641253232956, 0.023345470428466797, 0.09732675552368164, 0.06773112714290619, 0.033187489956617355, -0.012659740634262562, 0.10759615153074265, -0.08014466613531113, -0.0326654426753521, 0.16056089103221893, 0.025909973308444023, 0.10877037048339844, 0.03726891800761223, 0.12460169196128845, -0.004084461368620396, -0.012590823695063591, 0.11265203356742859, 0.08652576059103012, -0.17048557102680206, -0.04128506779670715, 0.12350255250930786, 0.032484475523233414, -0.2404598593711853, -0.15371282398700714, 0.04571725055575371, -0.01673530600965023, -0.07415159791707993, -0.04811277985572815, -0.019527200609445572, 0.1111689880490303, -0.12672831118106842, -0.02853475697338581, 0.10424641519784927, -0.0017033556941896677, -0.04905582219362259, 0.0038937723729759455, -2.4269202000463222e-32, -0.1147349551320076, -0.06677906215190887, 0.025551175698637962, -0.05378863587975502, -0.06061774119734764, 0.03338062763214111, 0.014496399089694023, -0.12419577687978745, -0.04302182048559189, -0.03596599027514458, -0.10733445733785629, 0.06267287582159042, 0.025379935279488564, 0.02563832886517048, -0.15482613444328308, -0.15895423293113708, -0.017630204558372498, -0.01708722859621048, -0.0670258179306984, 0.08977822214365005, 0.17655518651008606, 0.19716794788837433, -0.0556957833468914, 0.025376074016094208, -0.1858827918767929, -0.1727149337530136, 0.04050438106060028, -0.18338164687156677, 0.009481224231421947, -0.07026074826717377, -0.05719899758696556, -0.08451169729232788, -0.05978919193148613, -0.13324277102947235, -0.05354994162917137, 0.05077030509710312, -0.17011111974716187, 0.039044156670570374, 0.13106897473335266, 0.05908286198973656, 0.0337957888841629, 0.0623929500579834, 0.18288376927375793, -0.11089695990085602, 0.12549640238285065, -0.06807473301887512, 0.012825352139770985, 0.11226986348628998, -0.11090318113565445, -0.08741874992847443, -0.08673714846372604, 0.11311349272727966, 0.050836555659770966, -0.10979227721691132, 0.19552800059318542, 0.01573830097913742, 0.10754496604204178, 0.09544818848371506, -0.09775098413228989, -0.21124085783958435, 0.0778154656291008, 0.06485463678836823, 0.0478174090385437, -0.0069029792211949825, 0.15475893020629883, -0.025848519057035446, 0.2547771632671356, 0.05822664499282837, 0.07091465592384338, 0.028391852974891663, 0.1330694854259491, 0.14446589350700378, -0.045098479837179184, -0.045381754636764526, 0.06950165331363678, -0.10451319813728333, -0.24379922449588776, -0.09824402630329132, -0.03917675092816353, -0.0003225982072763145, 0.07463303953409195, 0.0009533926495350897, 0.0009433851228095591, 0.09731808304786682, -0.05092818662524223, 0.10474839806556702, -0.025022173300385475, 0.029785238206386566, -0.12661203742027283, -0.08243152499198914, -0.1372813582420349, -0.10129077732563019, 0.12766966223716736, -0.02466462552547455, 0.07507441192865372, 0.05130583792924881, -0.08783832937479019, 0.11238638311624527, -0.04142184183001518, 0.12097805738449097, 0.013956781476736069, 0.016961393877863884, 0.16713562607765198, -0.15960682928562164, 0.13201965391635895, 0.040896184742450714, 0.07775021344423294, -0.058768343180418015, -0.0823138952255249, -0.0849989727139473, -0.14383450150489807, 0.05990217626094818, 0.12573860585689545, 0.10995608568191528, 0.26270362734794617, 0.2555956244468689, -0.08366863429546356, 0.037686318159103394, 0.08729403465986252, 0.07643525302410126, -0.15665951371192932, -0.053381260484457016, 0.10151716321706772, -0.007404308766126633, -0.028036929666996002, 0.11358984559774399, -0.12768200039863586, -0.25652775168418884, 0.025643756613135338, -0.04834228754043579, 0.0071416799910366535, 0.06647630780935287, 7.869321621001291e-7, -0.1829206645488739, 0.13242143392562866, -0.027944916859269142, 0.13243289291858673, -0.11639349907636642, 0.00984429195523262, -0.12045019865036011, -0.02149556763470173, 0.04741232469677925, -0.054198410362005234, 0.1691686511039734, -0.03372659906744957, 0.00434813043102622, 0.17449836432933807, -0.09611573815345764, -0.015207886695861816, 0.029065590351819992, 0.01145924162119627, 0.041302379220724106, -0.12030607461929321, -0.07491442561149597, 0.20387835800647736, -0.17122553288936615, -0.09095244109630585, 0.16762621700763702, -0.1349245011806488, 0.016984067857265472, 0.12803691625595093, -0.06850290298461914, 0.0894402265548706, 0.10635636001825333, 0.1668034791946411, -0.1771206110715866, 0.16866245865821838, -0.01998325064778328, -0.016844170168042183, -0.18117909133434296, -0.09349067509174347, 0.12222505360841751, 0.11343273520469666, 0.04398679733276367, 0.0037661066744476557, 0.01595757156610489, 0.10042036324739456, 0.12271512299776077, 0.011864864267408848, -0.145929753780365, -0.028583239763975143, -0.00105693016666919, -0.04554861783981323, -0.05068793520331383, 0.05533933639526367, 0.14769168198108673, 0.1249065175652504, 0.02114034816622734, -0.08845534175634384, 0.03272393345832825, -0.256820946931839, 0.022271666675806046, 0.056466441601514816, -0.025529777631163597, 0.02734176069498062, 0.11964186280965805, -0.05254783108830452, 0.1474766880273819, -0.06571420282125473, -0.046899475157260895, 2.487637624040262e-34, -0.03930678218603134, 0.006083928979933262, -0.04551668465137482, -0.04673713818192482, 0.06438221037387848, -0.06227339431643486, -0.048474837094545364, -0.028947863727808, 0.09156860411167145, -0.25054624676704407, -0.0683799460530281 ]
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.14137406647205353, 0.15691718459129333, -0.0009112994302995503, 0.049293775111436844, 0.028643056750297546, 0.002573159523308277, 0.12108894437551498, 0.047001566737890244, 0.13256709277629852, -0.01846865750849247, -0.028533518314361572, 0.023563681170344353, -0.1876218616962433, -0.024888331070542336, 0.0944272056221962, -0.058349255472421646, -0.12967461347579956, 0.14152854681015015, 0.05852663516998291, -0.015592408366501331, -0.05109759792685509, -0.09014492481946945, 0.06942252814769745, -0.16836225986480713, 0.02170233614742756, 0.13739125430583954, -0.09922981262207031, 0.09879455715417862, 0.09923166781663895, -0.06987585127353668, 0.07430257648229599, -0.026803625747561455, -0.027870994061231613, -0.035182420164346695, 0.000006135201147117186, 0.05951744318008423, 0.11517464369535446, 0.07333771884441376, -0.1698533445596695, -0.03738834336400032, 0.12203201651573181, -0.08641702681779861, 0.07383867353200912, -0.03990449011325836, -0.09309560805559158, -0.12306296080350876, -0.07502531260251999, -0.07069562375545502, -0.03218597546219826, -0.028834296390414238, -0.06669310480356216, 0.03885728493332863, -0.1858377754688263, -0.17363707721233368, 0.03497624769806862, 0.005428831558674574, -0.06684136390686035, 0.08970347046852112, 0.01332281157374382, 0.014664729125797749, -0.21370023488998413, -0.07164260745048523, 0.05664984509348869, 0.16333971917629242, 0.1665165275335312, 0.08419933170080185, -0.14493979513645172, -0.14329539239406586, 0.11946426331996918, 0.19503076374530792, 0.024370083585381508, 0.0956435427069664, -0.026279281824827194, -0.09928029775619507, -0.00892699882388115, 0.0013604845153167844, -0.09334304183721542, -0.04974411800503731, -0.17899006605148315, -0.03772253915667534, -0.20175720751285553, -0.006061164196580648, -0.014524444006383419, 0.0550500862300396, -0.3057178258895874, -0.22891518473625183, -0.024401182308793068, 0.07691597938537598, 0.00924648530781269, 0.06973879784345627, 0.07739833742380142, 0.008543749339878559, -0.134600430727005, -0.07690510898828506, 0.13115721940994263, 0.10971720516681671, -0.005063377786427736, -0.10538816452026367, -0.04877166077494621, 0.013621018268167973, 0.023448003455996513, 0.08747849613428116, -0.05134500935673714, 0.07584559172391891, 0.07602116465568542, -0.08880501240491867, -0.0068727172911167145, -0.10992696136236191, -0.005123835988342762, 0.010451333597302437, -0.14108039438724518, 0.15913213789463043, -0.1996181756258011, -0.08874896168708801, 0.13026301562786102, -0.04000827297568321, 0.03723199665546417, 0.07404638826847076, 0.043946847319602966, -0.01307290606200695, 0.014143147505819798, 0.09709953516721725, -0.06433923542499542, 0.18476751446723938, 0.06251466274261475, -0.08269396424293518, -0.15844349563121796, -0.07633195072412491, -0.034321125596761703, -0.06810761243104935, -0.08865488320589066, -0.048955176025629044, -0.036733850836753845, -0.023518985137343407, 0.1928837150335312, -0.03855953365564346, -0.016018474474549294, -0.16442982852458954, -0.04024165868759155, -0.163418248295784, 0.14285247027873993, -0.03590911254286766, -0.02155998721718788, 0.01916041411459446, 0.03136979043483734, -0.01969117857515812, -0.006770523730665445, 0.15099063515663147, -0.03826271742582321, 0.04041434824466705, -0.12574081122875214, 0.09066484123468399, -0.1342715620994568, 0.01521071046590805, -0.2108570635318756, 0.050163980573415756, -0.14946645498275757, -0.1098448634147644, -0.265953928232193, -0.04217631742358208, 0.0023695568088442087, -0.08569706976413727, 0.06087726727128029, -0.074810691177845, 0.29426470398902893, 0.0530448742210865, 0.02008427307009697, -0.042984507977962494, -0.10560653358697891, 0.004478233400732279, -0.016847888007760048, -0.25904130935668945, -0.20814776420593262, -0.016539765521883965, -0.2673494815826416, 0.18201196193695068, 0.08276045322418213, 0.031412675976753235, -0.09816917777061462, 0.1416284292936325, 0.10616520792245865, 0.0502508170902729, -0.09227102994918823, 0.0692489966750145, 0.2839294373989105, 0.057875148952007294, 0.03257681056857109, 0.11876142770051956, 0.02632823958992958, -0.04657793417572975, 0.011484932154417038, -0.011443098075687885, 0.05998529493808746, 0.2748569846153259, -0.038625575602054596, 0.046854011714458466, -0.009190339595079422, 0.06623638421297073, 0.10128606855869293, -0.1763010323047638, -0.15340474247932434, 0.06447160989046097, -0.08493780344724655, 0.11944174021482468, 0.01092517375946045, -0.10851997137069702, -0.11112075299024582, 0.21796242892742157, 0.1650782972574234, -0.2504502832889557, -0.06591825932264328, -0.0018396609229966998, -0.04703327268362045, -0.035132452845573425, -0.061227474361658096, -0.13879594206809998, -0.08867113292217255, 0.0944686308503151, -0.07763184607028961, 0.0671924278140068, -0.0734364241361618, 0.022392287850379944, 0.1637965589761734, 0.07198632508516312, -0.09423167258501053, 0.010467374697327614, 0.0930572897195816, -0.00756554352119565, 0.005044476594775915, 0.017485877498984337, -0.08540703356266022, -0.13557423651218414, 0.13655994832515717, 0.1363641619682312, -0.04642487317323685, 0.07699774950742722, 0.018266472965478897, -0.08421869575977325, 0.054499294608831406, -0.08059971034526825, -0.020864546298980713, 0.057939160615205765, -0.013801097869873047, -0.03837902843952179, 0.0024408174213021994, 0.071912482380867, -0.09231160581111908, 0.23481474816799164, 0.01031690277159214, -0.03801421448588371, 0.27829647064208984, 0.009334606118500233, -0.12607847154140472, 0.034926045686006546, 0.12306898087263107, -0.0010501825017854571, 0.16647370159626007, 0.14384205639362335, -0.09927841275930405, 0.053094618022441864, 0.23906618356704712, -0.04920707270503044, 0.003640190465375781, 0.08914318680763245, 0.006134239956736565, -0.023642703890800476, -0.03179138898849487, -0.0662427470088005, 0.07543614506721497, 0.08959881961345673, 0.04082333669066429, 0.009631559252738953, -0.0795799121260643, -0.01721111498773098, -0.007905354723334312, -0.0876864567399025, -0.022157831117510796, 0.050870381295681, 0.021895622834563255, -0.14307473599910736, -0.030588848516345024, 0.029912536963820457, 0.061302848160266876, -0.14158447086811066, 0.1137828603386879, -0.04705999046564102, -0.07817325741052628, 0.006483517121523619, 0.07734847813844681, -0.1349336951971054, 0.07546895742416382, 0.020257502794265747, -0.003857480827718973, -0.0420416034758091, 0.1276286095380783, 0.11118272691965103, -0.011971905827522278, 0.1007925346493721, -0.07828125357627869, -0.09011586755514145, 0.03647986054420471, -0.0022247950546443462, -0.07980264723300934, 0.14566880464553833, 0.038621943444013596, 0.16240602731704712, 0.03410608693957329, -0.07955101132392883, -0.22848990559577942, 0.06500929594039917, 0.04081328585743904, -0.07974129915237427, 0.13309577107429504, 0.07544172555208206, -0.1106683611869812, 0.025270257145166397, -0.01728164218366146, -0.2578229308128357, 0.1458105444908142, 0.07493731379508972, 0.15559476613998413, 0.14502771198749542, 0.06225777044892311, -0.04701804369688034, 0.034034520387649536, -0.0022617848590016365, -0.10235893726348877, -0.046795912086963654, 0.03447134420275688, 0.06384129077196121, -0.053202953189611435, 0.03745143488049507, 0.08845093101263046, -0.10469847172498703, 0.049776818603277206, -0.017834046855568886, -0.07658400386571884, -0.02427060529589653, 0.3378770351409912, 0.014922297559678555, -0.0989600270986557, 0.04658498987555504, 0.020082717761397362, -0.19129717350006104, 0.049505721777677536, -0.1317741870880127, 0.028301099315285683, -0.17919501662254333, -0.024538641795516014, -0.033575188368558884, 0.0014549383195117116, -0.013144965283572674, -0.030460497364401817, -0.06291323900222778, 0.031581100076436996, -0.08337190002202988, -0.1122078076004982, 0.056361448019742966, -0.03750511258840561, 0.02244948036968708, -0.032809119671583176, 0.04061315953731537, 0.08434540778398514, -0.015738775953650475, -0.12504759430885315, 0.08714079111814499, 0.0688149705529213, 0.08309461176395416, -0.0030489033088088036, -0.1285025179386139, -0.11815772950649261, -0.15835805237293243, -0.06943855434656143, -0.042459383606910706, 0.036474280059337616, -0.13996590673923492, -0.01731368713080883, -0.09345903247594833, 0.0510544627904892, 0.0791701003909111, 0.15705899894237518, -0.19809021055698395, -0.15294072031974792, 0.013756483793258667, 0.22758832573890686, 0.011603157967329025, -0.04690265282988548, -0.03967001661658287, -0.098676897585392, 0.1634037345647812, -0.034535422921180725, 0.28658926486968994, 0.035150766372680664, 0.041940826922655106, -0.08794605731964111, -0.0935596451163292, 0.051123522222042084, 0.027531512081623077, 0.05127384513616562, 0.05885196104645729, 0.09094832837581635, 0.17309068143367767, 0.11503712832927704, 0.023556239902973175, -0.029194382950663567, -0.03008643351495266, 0.010091724805533886, 0.04013187810778618, 0.0924903079867363, 0.17377467453479767, 0.11064423620700836, 0.04861001670360565, -0.07629034668207169, 0.020598027855157852, 0.233164444565773, 0.12640510499477386, 0.00946952123194933, -0.05094989389181137, -0.100112184882164, 0.10546151548624039, -0.20512886345386505, -0.1932685524225235, -0.014683613553643227, 0.058143869042396545, 0.07659994065761566, -0.010200228542089462, 0.0011778208427131176, 0.0038259909488260746, 0.08859986811876297, -0.006873580627143383, 0.05569940432906151, 0.03765261545777321, 0.18452511727809906, 0.03141186386346817, -0.011972048319876194, 0.006074946373701096, 0.24797892570495605, -0.04377290606498718, -0.0909261479973793, 0.10286517441272736, -0.14687104523181915, -0.09772984683513641, 0.03502921015024185, 0.004918474238365889, -0.12930424511432648, -0.028257334604859352, -0.08660659193992615, -0.14610138535499573, 0.004892230033874512, -0.048216886818408966, -0.05222581326961517, -0.09366846829652786, -0.11268513649702072, -0.0955134779214859, -0.06041548028588295, -0.07579265534877777, 0.21700605750083923, -0.15070194005966187, -0.04883560538291931, 0.1918349415063858, -0.11696243286132812, -0.08251623064279556, 0.07675740867853165, 0.04327560216188431, -0.21307411789894104, 0.12155062705278397, 0.14277593791484833, -0.14985518157482147, 0.03289835527539253, 0.04892195761203766, -0.07286106050014496, 0.010781611315906048, -0.11058952659368515, -0.03673289716243744, 0.2044917494058609, -0.000025875744540826418, 0.08979878574609756, -0.07150056958198547, -0.12217159569263458, 0.020219711586833, 0.14897608757019043, 0.08509054034948349, 0.12479216605424881, -0.19511885941028595, -0.02520686946809292, 0.1264488846063614, 0.1728321760892868, -0.03926943242549896, -0.19610384106636047, 0.01725410670042038, 0.168733611702919, -0.17890828847885132, 0.11429497599601746, -0.009362852200865746, 0.1227116584777832, -0.07807400077581406, -0.17759943008422852, -0.0254435483366251, -0.01886443793773651, -0.05695183202624321, 0.06909778714179993, -0.09196951240301132, 0.033394720405340195, -0.03373342752456665, 0.06457379460334778, -0.04780608043074608, -0.014127922244369984, -0.041956085711717606, 0.02066953107714653, 0.021747685968875885, 0.10410239547491074, -0.09261681884527206, 0.0034753582440316677, 0.014199198223650455, 0.1921951174736023, 0.07409364730119705, -0.005314053501933813, -0.06399788707494736, -0.0868043601512909, 0.03880230337381363, 0.035696715116500854, 0.07718146592378616, 0.06031704694032669, 0.019309191033244133, -0.014888929203152657, 0.09892125427722931, -0.09243190288543701, -0.027479717507958412, 0.19806711375713348, 0.018846916034817696, 0.10726585239171982, 0.02218463085591793, 0.14009805023670197, 0.008236694149672985, -0.009552269242703915, 0.11390597373247147, 0.07933291047811508, -0.1726413518190384, -0.040873173624277115, 0.1182088553905487, 0.03938445448875427, -0.24438288807868958, -0.14409224689006805, 0.04415284842252731, -0.020198706537485123, -0.07956428825855255, -0.04718596488237381, -0.015653854236006737, 0.09650281816720963, -0.11301735788583755, -0.0403674878180027, 0.1102042868733406, -0.013452732004225254, -0.02336231991648674, 0.0020995617378503084, -2.404938014875564e-32, -0.10655023157596588, -0.07483798265457153, 0.04054880514740944, -0.05126623809337616, -0.0866839662194252, 0.02370738424360752, 0.010163949802517891, -0.11778755486011505, -0.05043046921491623, -0.0361221618950367, -0.09631223231554031, 0.07265565544366837, 0.008656584657728672, 0.061842627823352814, -0.16539214551448822, -0.17011195421218872, -0.044704973697662354, -0.028670331463217735, -0.06469867378473282, 0.09100956469774246, 0.16796444356441498, 0.1936396360397339, -0.057198960334062576, 0.04872647300362587, -0.17729412019252777, -0.18012771010398865, 0.03454301133751869, -0.20806629955768585, 0.007441958878189325, -0.07020384073257446, -0.0617835707962513, -0.07350123673677444, -0.07991973310709, -0.14756104350090027, -0.047627922147512436, 0.05905851721763611, -0.13770803809165955, 0.039365220814943314, 0.13216863572597504, 0.056895386427640915, 0.005733435042202473, 0.07500356435775757, 0.18125168979167938, -0.10540471225976944, 0.10884697735309601, -0.06712940335273743, 0.002843631198629737, 0.11756478995084763, -0.12843801081180573, -0.09355099499225616, -0.09182105213403702, 0.14781607687473297, 0.04744914174079895, -0.10934887081384659, 0.1817282885313034, 0.015926619991660118, 0.11155646294355392, 0.10253196954727173, -0.08173366636037827, -0.2273375689983368, 0.059273093938827515, 0.05548003688454628, 0.028503134846687317, -0.030505012720823288, 0.1583813577890396, -0.023644430562853813, 0.25564539432525635, 0.06766621023416519, 0.05954251065850258, 0.037764258682727814, 0.1300247311592102, 0.13200125098228455, -0.059170905500650406, -0.06292340159416199, 0.038690924644470215, -0.08471837639808655, -0.20850752294063568, -0.11502822488546371, -0.05355507507920265, -0.016605835407972336, 0.09511762857437134, 0.015659920871257782, 0.009171769954264164, 0.10312792658805847, -0.035961002111434937, 0.10916062444448471, -0.022796031087636948, 0.03567037358880043, -0.14491979777812958, -0.07833030074834824, -0.10570451617240906, -0.15215355157852173, 0.11819831281900406, -0.05583247169852257, 0.06903647631406784, 0.013090160675346851, -0.09885592013597488, 0.10794289410114288, -0.04117347672581673, 0.1659831702709198, 0.014788046479225159, 0.019839540123939514, 0.14977912604808807, -0.1682853400707245, 0.11393745988607407, 0.05854356661438942, 0.0697103962302208, -0.0517573282122612, -0.0628538653254509, -0.09675954282283783, -0.139036163687706, 0.06503940373659134, 0.12116339802742004, 0.11363678425550461, 0.26137033104896545, 0.25542470812797546, -0.09732877463102341, 0.054539017379283905, 0.08609894663095474, 0.08738519996404648, -0.13850907981395721, -0.11119600385427475, 0.09998910874128342, 0.012861703522503376, -0.04726741835474968, 0.11890098452568054, -0.14909641444683075, -0.22429779171943665, 0.00008874962077243254, -0.06264159828424454, 0.0001329264196101576, 0.07582426071166992, 7.847143592698558e-7, -0.17620548605918884, 0.15171204507350922, -0.025410383939743042, 0.12557728588581085, -0.11629414558410645, 0.0061987172812223434, -0.14350196719169617, 0.014065071009099483, 0.023167520761489868, -0.046609699726104736, 0.1531037986278534, -0.003946402575820684, 0.011110920459032059, 0.17931021749973297, -0.11127632856369019, -0.01762079820036888, 0.011196622624993324, 0.013083046302199364, 0.05451188609004021, -0.1068185493350029, -0.07021600008010864, 0.19658957421779633, -0.1705252230167389, -0.06749467551708221, 0.1886466145515442, -0.13325753808021545, 0.02750943973660469, 0.15323187410831451, -0.06362428516149521, 0.06905176490545273, 0.10133221000432968, 0.1755082756280899, -0.1730741560459137, 0.15120692551136017, 0.011509344913065434, -0.010962875559926033, -0.18626505136489868, -0.11484922468662262, 0.12632030248641968, 0.08195710927248001, 0.040967267006635666, 0.018372034654021263, 0.02575959451496601, 0.0800614207983017, 0.10649363696575165, 0.03963062912225723, -0.14415760338306427, -0.0317128524184227, -0.004718143492937088, -0.05451718717813492, -0.04359572380781174, 0.05228995531797409, 0.16332201659679413, 0.13859041035175323, 0.015856903046369553, -0.1142834722995758, 0.035929784178733826, -0.2589646577835083, 0.027407893911004066, 0.03405972942709923, -0.018481900915503502, 0.03281477466225624, 0.11553898453712463, -0.05446344241499901, 0.14422224462032318, -0.0776151716709137, -0.0480802021920681, 2.318136389603977e-34, -0.04522749409079552, 0.004499112721532583, -0.043331328779459, -0.05121682956814766, 0.0486166775226593, -0.05336875095963478, -0.029692230746150017, -0.019426574930548668, 0.09430337697267532, -0.2463507056236267, -0.06032118201255798 ]
https://github.com/huggingface/datasets/issues/2538
Loading partial dataset when debugging
If I want to create a dataset, containing only the 10 elements of a given dataset (slice it), how do I do that?
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!
23
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! If I want to create a dataset, containing only the 10 elements of a given dataset (slice it), how do I do that?
[ -0.14622506499290466, 0.16797013580799103, -0.006111643277108669, 0.0007282361621037126, 0.07731004059314728, -0.049814652651548386, 0.15822941064834595, 0.0014673409750685096, 0.11195939779281616, -0.02188338339328766, -0.06004151329398155, 0.09857186675071716, -0.2094252109527588, -0.003846266306936741, 0.11429876834154129, -0.05372299626469612, -0.15025098621845245, 0.1266944408416748, 0.03877326101064682, -0.023789633065462112, -0.07740642875432968, -0.09184737503528595, 0.08353666961193085, -0.1498902589082718, 0.015785614028573036, 0.11873842775821686, -0.08511016517877579, 0.08396951109170914, 0.12407542765140533, -0.10320650786161423, 0.06740494817495346, -0.04813991114497185, -0.039202731102705, -0.08778456598520279, 0.000006287936685112072, 0.051177870482206345, 0.13546988368034363, 0.07253026217222214, -0.15738029778003693, -0.12129408866167068, 0.09783699363470078, -0.09112729132175446, 0.06412772834300995, -0.036341406404972076, -0.09143086522817612, -0.1276274174451828, -0.0495743453502655, -0.043243926018476486, -0.05851692333817482, -0.06976964324712753, -0.050368014723062515, 0.0464918427169323, -0.16282275319099426, -0.192804753780365, 0.05095544829964638, 0.01535569317638874, -0.05385527387261391, 0.08903390914201736, 0.05163908004760742, 0.026801422238349915, -0.1624709516763687, -0.09022992104291916, 0.08024246245622635, 0.13657495379447937, 0.1501767933368683, 0.07681844383478165, -0.18908348679542542, -0.14803455770015717, 0.12045232206583023, 0.19179610908031464, 0.022552920505404472, 0.08458277583122253, -0.023041799664497375, -0.08629455417394638, 0.01718464307487011, -0.028047410771250725, -0.06848324835300446, -0.025438958778977394, -0.1457042694091797, -0.044201552867889404, -0.15606547892093658, 0.03524947911500931, 0.029399828985333443, 0.07250592112541199, -0.2487134337425232, -0.2335495799779892, -0.03245718404650688, 0.0605454184114933, 0.011525675654411316, 0.03606747090816498, 0.00810252781957388, 0.010823714546859264, -0.12125302851200104, -0.08858563750982285, 0.1317480206489563, 0.07394116371870041, -0.0010892427526414394, -0.11312975734472275, -0.05273417755961418, 0.03351300209760666, 0.03003820776939392, 0.05489933490753174, -0.052293941378593445, 0.0963207334280014, 0.028760218992829323, -0.08884412050247192, -0.028790151700377464, -0.06503963470458984, -0.015756312757730484, -0.03252722695469856, -0.11267606168985367, 0.18041744828224182, -0.2238127589225769, -0.08864378184080124, 0.15490512549877167, -0.03815576434135437, 0.05812118947505951, 0.09054415673017502, 0.02454756759107113, -0.017560163512825966, 0.05095932260155678, 0.06864291429519653, -0.07633848488330841, 0.17959153652191162, 0.048486918210983276, -0.15132100880146027, -0.16637934744358063, -0.09672661870718002, -0.013898194767534733, -0.06679186224937439, -0.07565370202064514, -0.045846983790397644, -0.0330069363117218, -0.08553328365087509, 0.16849346458911896, -0.12046980857849121, -0.00851050578057766, -0.1353963017463684, -0.07410971075296402, -0.15259377658367157, 0.11690960824489594, -0.015494666062295437, 0.03736181557178497, -0.018442926928400993, -0.014409172348678112, -0.05099636688828468, 0.004881757311522961, 0.12524829804897308, -0.03734638914465904, 0.03201484680175781, -0.10837799310684204, 0.10057228058576584, -0.1326201856136322, -0.022098397836089134, -0.1870838850736618, 0.05329635739326477, -0.08626678586006165, -0.09144269675016403, -0.32643964886665344, 0.003939477261155844, -0.02333160862326622, -0.07030748575925827, 0.05038563162088394, -0.10145578533411026, 0.3362908363342285, 0.04664836451411247, -0.04336140677332878, -0.050246089696884155, -0.12123691290616989, 0.004150147549808025, -0.028067151084542274, -0.2612101137638092, -0.19141949713230133, 0.007411867380142212, -0.23929835855960846, 0.16382566094398499, 0.09496793150901794, 0.08086647838354111, -0.09312950074672699, 0.07754416018724442, 0.08164717257022858, 0.03912902995944023, -0.09793952852487564, 0.06603444367647171, 0.31157296895980835, 0.058765217661857605, 0.04969166964292526, 0.07882875204086304, 0.04369664937257767, -0.05882670357823372, -0.004340435843914747, 0.03544076904654503, 0.06912948936223984, 0.26892974972724915, -0.03284326568245888, 0.012821611016988754, -0.009505311027169228, 0.10481827706098557, 0.058569494634866714, -0.1747048795223236, -0.1830357313156128, 0.056605178862810135, -0.09049294143915176, 0.10112500935792923, 0.01807130128145218, -0.15298494696617126, -0.11168088018894196, 0.16686852276325226, 0.1824851930141449, -0.2349056601524353, -0.06546603888273239, -0.005199979059398174, 0.0008906565490178764, 0.023576539009809494, -0.039420269429683685, -0.14342698454856873, -0.07987136393785477, 0.06691999733448029, -0.1008203998208046, 0.0472051165997982, -0.08078158646821976, -0.030804697424173355, 0.13058824837207794, 0.07086746394634247, -0.13097232580184937, -0.005187103059142828, 0.0921383649110794, -0.019877273589372635, 0.020748548209667206, -0.006120224483311176, -0.07394935935735703, -0.14490000903606415, 0.14424170553684235, 0.13539093732833862, -0.07192764431238174, 0.05912965163588524, -0.03357093408703804, -0.045996423810720444, 0.08255674690008163, -0.12398035824298859, -0.021910829469561577, -0.01452976930886507, -0.03512469306588173, -0.0079722311347723, 0.03021233156323433, 0.10771337151527405, -0.14678098261356354, 0.21365123987197876, -0.01712154969573021, -0.04795364663004875, 0.22953885793685913, 0.015154566615819931, -0.1360241174697876, 0.014640187844634056, 0.10419616848230362, 0.02596471644937992, 0.17598918080329895, 0.14987869560718536, -0.07292377948760986, 0.0821000263094902, 0.21351358294487, -0.009539549238979816, -0.022456860169768333, 0.08873884379863739, 0.040495891124010086, 0.05621699243783951, -0.054538898169994354, -0.10926640778779984, 0.011227348819375038, 0.10164260119199753, 0.011342647485435009, 0.02471080608665943, -0.10055910050868988, 0.007360100280493498, -0.020311232656240463, -0.07112333923578262, -0.07110521197319031, 0.05711355060338974, 0.016294527798891068, -0.14506183564662933, -0.0013258199905976653, 0.04168294742703438, 0.05107956752181053, -0.135165736079216, 0.11546598374843597, -0.06720732897520065, -0.05338067561388016, 0.04906831681728363, 0.14587903022766113, -0.14976873993873596, 0.06762618571519852, 0.06285644322633743, 0.004592771641910076, -0.07817639410495758, 0.11277975142002106, 0.14135773479938507, -0.03548501059412956, 0.05339819937944412, -0.10578488558530807, -0.0498388297855854, 0.042356472462415695, -0.026141898706555367, -0.012766040861606598, 0.155199334025383, 0.017336761578917503, 0.20941177010536194, 0.024823641404509544, -0.05681012570858002, -0.2130700945854187, 0.04118161275982857, 0.023520831018686295, -0.0555199570953846, 0.1030314564704895, 0.12535208463668823, -0.04848616197705269, -0.0005929964245297015, -0.040818654000759125, -0.23726503551006317, 0.1538216918706894, 0.10391029715538025, 0.13408547639846802, 0.14389126002788544, 0.09827243536710739, -0.05835986137390137, 0.11351001262664795, -0.03178403526544571, -0.080460324883461, -0.03510083630681038, 0.031716153025627136, 0.06893499195575714, -0.04864238575100899, 0.0939810648560524, 0.1184811070561409, -0.09428718686103821, 0.08316968381404877, 0.005584734492003918, -0.041118085384368896, -0.013351935893297195, 0.29924964904785156, 0.020335033535957336, -0.10803830623626709, 0.02895387075841427, -0.0009362012497149408, -0.19082102179527283, 0.016568461433053017, -0.0810982957482338, 0.03602921962738037, -0.1777026653289795, -0.016182957217097282, -0.03502892702817917, -0.01157277263700962, 0.037180669605731964, -0.027387818321585655, -0.05671948194503784, 0.024615151807665825, -0.09191972762346268, -0.124353788793087, 0.019600657746195793, -0.043159931898117065, 0.06835915148258209, 0.009696519002318382, -0.009240230545401573, 0.07197412848472595, 0.00656011002138257, -0.11522889137268066, 0.05299016833305359, 0.07300671190023422, 0.10618019849061966, 0.018661729991436005, -0.1578076034784317, -0.13485419750213623, -0.15432004630565643, -0.05508723855018616, -0.04069113731384277, 0.010423477739095688, -0.11197711527347565, -0.016912102699279785, -0.11650555580854416, 0.06000960245728493, 0.07599152624607086, 0.1700548678636551, -0.21848100423812866, -0.15648214519023895, 0.04327824339270592, 0.20470374822616577, -0.01825239323079586, -0.037299882620573044, -0.038823869079351425, -0.07266023755073547, 0.20375825464725494, -0.04526609182357788, 0.25679275393486023, -0.017583049833774567, 0.0536261685192585, -0.09161524474620819, -0.12478641420602798, 0.09545563161373138, 0.009313422255218029, 0.04374255612492561, 0.05028112977743149, 0.08696140348911285, 0.25691771507263184, 0.08302728086709976, 0.024634920060634613, 0.01943219266831875, -0.018507426604628563, 0.021073760464787483, 0.08165498077869415, 0.10478607565164566, 0.1526706963777542, 0.09708419442176819, 0.03693171218037605, -0.05486316606402397, -0.003097747452557087, 0.27001699805259705, 0.13053536415100098, -0.01081268209964037, -0.0040153274312615395, -0.1211848184466362, 0.08024571090936661, -0.20848163962364197, -0.195073664188385, -0.01623043417930603, 0.044541604816913605, 0.11943115293979645, 0.029468411579728127, -0.052706774324178696, -0.0016972941812127829, 0.08399974554777145, 0.010892285034060478, 0.07534566521644592, 0.030360322445631027, 0.16783572733402252, 0.034701310098171234, 0.0013780456501990557, 0.04939303174614906, 0.25115498900413513, -0.06911443918943405, -0.06874971091747284, 0.07862847298383713, -0.09480331093072891, -0.053505755960941315, 0.05041797459125519, 0.049048636108636856, -0.15464533865451813, -0.002670105779543519, -0.07663552463054657, -0.13883443176746368, 0.027378220111131668, -0.03219453617930412, -0.049316003918647766, -0.12099429219961166, -0.06984126567840576, -0.09010335803031921, -0.08410869538784027, -0.046965666115283966, 0.2686988115310669, -0.07977782189846039, -0.04018258675932884, 0.2072506994009018, -0.10929599404335022, -0.08576740324497223, 0.05828331783413887, 0.011585216037929058, -0.2460499107837677, 0.1775827407836914, 0.14345483481884003, -0.13651324808597565, -0.00430719368159771, 0.04065323993563652, -0.1522722840309143, 0.05102501064538956, -0.1261509507894516, -0.0650787204504013, 0.2621667683124542, 0.026758452877402306, 0.0603642575442791, -0.08289932459592819, -0.09224043786525726, 0.0392434261739254, 0.15927191078662872, 0.06255457550287247, 0.12444250285625458, -0.15395188331604004, -0.006903075613081455, 0.11817438155412674, 0.12359581887722015, -0.03215916082262993, -0.18605411052703857, 0.034041907638311386, 0.13671858608722687, -0.16714714467525482, 0.14550171792507172, -0.01009306963533163, 0.09769071638584137, -0.028857475146651268, -0.2605150640010834, 0.014615213498473167, 0.004031246993690729, -0.07965850830078125, 0.08532551676034927, -0.03762728348374367, 0.04494640603661537, -0.03431161120533943, 0.021578412503004074, -0.028926003724336624, -0.04705958813428879, 0.01952226459980011, 0.020567184314131737, -0.0199936144053936, 0.08854792267084122, -0.07841169089078903, -0.016425244510173798, 0.018009332939982414, 0.15676526725292206, 0.06569702923297882, -0.030873458832502365, 0.006331983022391796, -0.08459024876356125, 0.030139736831188202, 0.03909841179847717, 0.06858038157224655, 0.06314484775066376, 0.01962394267320633, 0.0034968850668519735, 0.14322823286056519, -0.07310710847377777, -0.031493689864873886, 0.1522088646888733, 0.05499717593193054, 0.09527972340583801, 0.022044755518436432, 0.1319218873977661, -0.03139520436525345, 0.007778753060847521, 0.1111089289188385, 0.0995110422372818, -0.11951123923063278, -0.04270579293370247, 0.09408728778362274, 0.05987080559134483, -0.21860350668430328, -0.16088399291038513, 0.042539842426776886, -0.05312904343008995, -0.10597196221351624, -0.04051787406206131, -0.046826619654893875, 0.09819483011960983, -0.11900567263364792, -0.026710269972682, 0.15572082996368408, -0.011595250107347965, -0.046834588050842285, 0.015287870541214943, -2.3669758656261397e-32, -0.11411520093679428, -0.10395029932260513, 0.03080110065639019, -0.048221372067928314, -0.10513441264629364, -0.00766768166795373, -0.020458025857806206, -0.14717784523963928, 0.0015722312964498997, -0.006277239881455898, -0.11206773668527603, 0.07769155502319336, 0.026402415707707405, 0.042523402720689774, -0.1835547387599945, -0.1797431856393814, -0.008093548938632011, -0.03405109792947769, -0.06674773246049881, 0.07744872570037842, 0.1965368390083313, 0.20008936524391174, -0.03355059772729874, 0.05587674677371979, -0.16185656189918518, -0.1274661421775818, 0.002387350657954812, -0.16572430729866028, 0.0011162958107888699, -0.08413827419281006, -0.05390249565243721, -0.05475904420018196, -0.05462675541639328, -0.19223234057426453, -0.04437598958611488, 0.03234725072979927, -0.13368895649909973, 0.03972100466489792, 0.14409326016902924, 0.029596203938126564, 0.02751537412405014, 0.0572340227663517, 0.1720101237297058, -0.07951772958040237, 0.12707649171352386, -0.017903480678796768, 0.003800427308306098, 0.10548780858516693, -0.1362239420413971, -0.06257057189941406, -0.060519613325595856, 0.12943623960018158, 0.04426402226090431, -0.11153442412614822, 0.17888490855693817, 0.02633880265057087, 0.07072675973176956, 0.1243288591504097, -0.09137313812971115, -0.21586690843105316, 0.08522465080022812, 0.03690915182232857, 0.035628821700811386, -0.011373328976333141, 0.17605383694171906, 0.002644817577674985, 0.23901210725307465, 0.02668963558971882, 0.08902446925640106, 0.04356034845113754, 0.1210293099284172, 0.1486542671918869, -0.0707230344414711, -0.06426678597927094, 0.1103784516453743, -0.12444787472486496, -0.21111012995243073, -0.11509959399700165, -0.060213424265384674, 0.008654650300741196, 0.06898574531078339, -0.013521847315132618, 0.022098224610090256, 0.09623777866363525, -0.016513794660568237, 0.062305111438035965, -0.024536501616239548, 0.022565361112356186, -0.1358318030834198, -0.06320520490407944, -0.15424413979053497, -0.13223688304424286, 0.09440421313047409, -0.02919618971645832, 0.07781761139631271, 0.05225876346230507, -0.09695836156606674, 0.09954175353050232, -0.019983546808362007, 0.10469478368759155, 0.02455267310142517, 0.07072288542985916, 0.1506214439868927, -0.13271008431911469, 0.13641829788684845, 0.015005278401076794, 0.07409288734197617, -0.05205877870321274, -0.04804253578186035, -0.0812002494931221, -0.16752943396568298, 0.043180279433727264, 0.10406588762998581, 0.11885827779769897, 0.23054634034633636, 0.26821377873420715, -0.079460009932518, -0.024768969044089317, 0.08977888524532318, 0.026736561208963394, -0.1648932248353958, -0.04502282291650772, 0.13283833861351013, -0.0003985922085121274, -0.04169223830103874, 0.07579269260168076, -0.11659102141857147, -0.22298666834831238, 0.0129086310043931, -0.04206353425979614, 0.010060282424092293, 0.09966152161359787, 7.902245329205471e-7, -0.19551950693130493, 0.09835455566644669, -0.01353690680116415, 0.1162567064166069, -0.09330098330974579, 0.018001863732933998, -0.09143511205911636, -0.06307641416788101, 0.06717021763324738, -0.0487300381064415, 0.1436609923839569, -0.05047271028161049, 0.01592854969203472, 0.1859544962644577, -0.08794884383678436, -0.01561782881617546, 0.008679406717419624, 0.03653905168175697, 0.07790865004062653, -0.11866168677806854, -0.14183208346366882, 0.19186536967754364, -0.18162187933921814, -0.07024195790290833, 0.1190592348575592, -0.16549183428287506, 0.01694202795624733, 0.1437021940946579, -0.036626290529966354, 0.04837792366743088, 0.08026373386383057, 0.12951309978961945, -0.15431763231754303, 0.1634407639503479, -0.00845930352807045, -0.03957424312829971, -0.16296742856502533, -0.06765048950910568, 0.10793355852365494, 0.13949836790561676, 0.07082110643386841, 0.009779085405170918, 0.015857446938753128, 0.026989003643393517, 0.0796365812420845, -0.0012792443158105016, -0.1466289758682251, -0.03300480544567108, 0.06617771089076996, -0.058791384100914, -0.06274695694446564, 0.02082439325749874, 0.15429151058197021, 0.14080320298671722, 0.04752034693956375, -0.08225969970226288, 0.0402376689016819, -0.2352903187274933, -0.003822321305051446, 0.021118104457855225, -0.02593161165714264, 0.02326785959303379, 0.08242536336183548, -0.09945597499608994, 0.15923471748828888, -0.04557175189256668, -0.044165924191474915, 2.7265866973811433e-34, -0.06577902287244797, 0.0003370888880454004, -0.0730627253651619, -0.05121826007962227, 0.027779078111052513, -0.06663881242275238, -0.012788313440978527, -0.024012597277760506, 0.09533323347568512, -0.22465986013412476, -0.0560811422765255 ]
https://github.com/huggingface/datasets/issues/2538
Loading partial dataset when debugging
> ```python > small_ds = ds.select(range(10)) > ``` Thanks, but this doesn't help me to save time during initial loading, right?
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!
21
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! > ```python > small_ds = ds.select(range(10)) > ``` Thanks, but this doesn't help me to save time during initial loading, right?
[ -0.1573401391506195, 0.16775058209896088, -0.03052089735865593, 0.018784455955028534, 0.04350602999329567, -0.006941614206880331, 0.1889951080083847, 0.0236605703830719, 0.12788167595863342, -0.031318750232458115, -0.01697721891105175, 0.07006239145994186, -0.1491996794939041, -0.04329600930213928, 0.10671672224998474, -0.04938734695315361, -0.13754487037658691, 0.11060113459825516, 0.00199182890355587, -0.020898401737213135, -0.09522560983896255, -0.1635420322418213, 0.08152097463607788, -0.1894732564687729, 0.027432724833488464, 0.12009692937135696, -0.12458238005638123, 0.11273494362831116, 0.13279423117637634, -0.10682158172130585, 0.02268717624247074, 0.0026817696634680033, -0.027295928448438644, -0.03537784144282341, 0.000006021819899615366, 0.06417066603899002, 0.17416638135910034, 0.06503920257091522, -0.1555333435535431, -0.07158651947975159, 0.08220195770263672, -0.08244246244430542, 0.06001086160540581, -0.04491635784506798, -0.08141692727804184, -0.1969984769821167, -0.09510891884565353, -0.05345411226153374, -0.027245953679084778, -0.026462741196155548, -0.058347854763269424, 0.08960194140672684, -0.16877424716949463, -0.17519305646419525, 0.07620619982481003, 0.01011908333748579, -0.03119385428726673, 0.1216176301240921, 0.04753895103931427, 0.01970335654914379, -0.16327810287475586, -0.06451920419931412, -0.027234414592385292, 0.13339415192604065, 0.17765507102012634, 0.0449899323284626, -0.05811024457216263, -0.13859735429286957, 0.11762665957212448, 0.15509158372879028, 0.0071036056615412235, 0.11940330266952515, -0.0597715750336647, -0.09653371572494507, 0.0269720871001482, -0.02742753177881241, -0.0746527686715126, -0.10362787544727325, -0.12785620987415314, -0.05341005325317383, -0.1612296998500824, 0.03093733638525009, 0.009844706393778324, 0.04193974286317825, -0.2628486156463623, -0.24816368520259857, -0.019103601574897766, 0.04529811441898346, -0.030478252097964287, 0.05379870533943176, 0.06712569296360016, 0.00011566372268134728, -0.17398354411125183, -0.09472724795341492, 0.13929496705532074, 0.07237449288368225, -0.00008653604163555428, -0.1431054323911667, -0.027890004217624664, 0.05984683707356453, 0.05513044819235802, 0.07427132874727249, -0.03910638764500618, 0.053186219185590744, 0.07101447135210037, -0.08771848678588867, -0.01312432810664177, -0.07190830260515213, -0.014669684693217278, 0.0004767084610648453, -0.12719380855560303, 0.1802310198545456, -0.17621736228466034, -0.11866910755634308, 0.12028268724679947, -0.04037446901202202, 0.0422537699341774, 0.11436119675636292, 0.04010535031557083, -0.029021568596363068, 0.05401371791958809, 0.0949365496635437, -0.04513262212276459, 0.2050047665834427, 0.033493876457214355, -0.045413389801979065, -0.14510180056095123, -0.05212802439928055, 0.010988851077854633, -0.02846054546535015, -0.08234021067619324, -0.030824709683656693, -0.0012389651965349913, -0.05961574614048004, 0.15101225674152374, -0.04345058649778366, -0.000496734632179141, -0.13377630710601807, -0.07331805676221848, -0.143718421459198, 0.10195665061473846, -0.028409363701939583, 0.03038894198834896, 0.022872507572174072, -0.03289848938584328, -0.00022240781981963664, -0.026051653549075127, 0.07585206627845764, -0.06809888780117035, 0.09041713923215866, -0.12153215706348419, 0.13356079161167145, -0.18029968440532684, -0.00009975346620194614, -0.17086824774742126, 0.034895334392786026, -0.1032443642616272, -0.10949335247278214, -0.24668429791927338, -0.011069614440202713, -0.03326016291975975, -0.09614154696464539, 0.028714902698993683, -0.08627157658338547, 0.2781555652618408, 0.07898559421300888, -0.08041444420814514, -0.04457687586545944, -0.12233050167560577, 0.038204625248909, -0.011594143696129322, -0.2282426804304123, -0.17415882647037506, 0.001592819346114993, -0.19012559950351715, 0.20905832946300507, 0.0954708606004715, 0.05349546670913696, -0.09379346668720245, 0.1608099341392517, 0.1007329598069191, 0.0699162408709526, -0.07497742027044296, 0.08297951519489288, 0.2878856360912323, 0.06359423696994781, -0.0035436847247183323, 0.07494688779115677, 0.06474330276250839, -0.05162819102406502, 0.007672612089663744, 0.030789708718657494, 0.06367932260036469, 0.271257609128952, -0.03024507313966751, 0.0429442822933197, 0.004122863058000803, 0.09698184579610825, 0.09840359538793564, -0.16479451954364777, -0.21586403250694275, 0.031999144703149796, -0.1367301642894745, 0.14428384602069855, -0.005757261533290148, -0.08091206848621368, -0.08616086095571518, 0.18143916130065918, 0.15072563290596008, -0.2041662335395813, -0.04353576898574829, -0.0110243521630764, -0.06560272723436356, 0.00840960256755352, -0.049623411148786545, -0.13689394295215607, -0.10878876596689224, 0.06506619602441788, -0.07175318151712418, 0.026086872443556786, -0.08638333529233932, 0.018234509974718094, 0.13436102867126465, 0.08313027769327164, -0.08965913951396942, -0.007228218484669924, 0.11453482508659363, 0.012176649644970894, -0.009247737936675549, -0.025780024006962776, -0.05444139987230301, -0.16903860867023468, 0.10713664442300797, 0.14304856956005096, -0.021501846611499786, 0.013372794725000858, -0.03112954832613468, -0.07849688827991486, 0.09712141007184982, -0.0482526570558548, -0.013773496262729168, 0.03075600601732731, 0.027102435007691383, -0.005412796977907419, 0.07027415186166763, 0.06717243045568466, -0.17816005647182465, 0.23849910497665405, -0.011890996247529984, -0.04218065366148949, 0.2589631974697113, -0.027888836339116096, -0.10240662097930908, 0.008656265214085579, 0.0757393017411232, -0.019013747572898865, 0.17588016390800476, 0.20688095688819885, -0.09483223408460617, 0.06750074028968811, 0.186935693025589, -0.03119143657386303, 0.01801021583378315, 0.07911984622478485, -0.0013920608907938004, 0.04562464728951454, -0.059461597353219986, -0.07180480659008026, 0.04457080736756325, 0.1196448877453804, -0.017781326547265053, -0.0003763182903639972, -0.02275417186319828, -0.00011997430556220934, 0.018843555822968483, -0.06032884865999222, -0.006553733255714178, 0.02692316845059395, 0.0026750562246888876, -0.1282714605331421, 0.023931793868541718, 0.009937865659594536, 0.053678009659051895, -0.10882637649774551, 0.13662287592887878, -0.017724772915244102, -0.057321202009916306, -0.020327948033809662, 0.13916946947574615, -0.10278841108083725, 0.0762687399983406, 0.07582317292690277, 0.00047818609164096415, -0.09961184859275818, 0.09680751711130142, 0.14137153327465057, 0.0009631213615648448, 0.07294128090143204, -0.06960973888635635, -0.0638444572687149, 0.04814640432596207, -0.033691536635160446, -0.06678251922130585, 0.15871569514274597, 0.08064473420381546, 0.14714133739471436, 0.012547707185149193, -0.08011537790298462, -0.304900586605072, 0.09248198568820953, 0.0547298900783062, -0.07198350131511688, 0.06612780690193176, 0.08627495169639587, -0.06421083956956863, 0.03285953775048256, -0.013684598729014397, -0.23609860241413116, 0.10004108399152756, 0.09655634313821793, 0.12886424362659454, 0.11577081680297852, 0.09038212895393372, -0.06531006097793579, 0.07131467759609222, 0.005172988399863243, -0.0715629979968071, -0.053935457020998, 0.016627458855509758, 0.06116464361548424, -0.03424334526062012, 0.05252758041024208, 0.130864679813385, -0.11509641259908676, 0.07717826962471008, 0.03608705848455429, -0.03790418431162834, 0.04369603097438812, 0.35426998138427734, 0.041435468941926956, -0.13995374739170074, 0.007423083297908306, 0.023026209324598312, -0.23571090400218964, -0.0010662080021575093, -0.15733639895915985, 0.0709867849946022, -0.1991967111825943, -0.05803303048014641, -0.03520200774073601, -0.024737274274230003, -0.012144806794822216, -0.04003804177045822, -0.0547647699713707, 0.058664705604314804, -0.11465296894311905, -0.1225159615278244, 0.04510191082954407, -0.04922109469771385, 0.06815335899591446, 0.0420091450214386, -0.05392672121524811, 0.04002360254526138, 0.00598409678786993, -0.17987234890460968, 0.06587735563516617, 0.038079675287008286, 0.12758126854896545, -0.0221442561596632, -0.12493979930877686, -0.15200529992580414, -0.1389978528022766, -0.0839010700583458, -0.03561092168092728, -0.03652625530958176, -0.13590164482593536, -0.031692132353782654, -0.13715748488903046, 0.008252621628344059, 0.07238567620515823, 0.14719563722610474, -0.23266690969467163, -0.1941196173429489, -0.002576876198872924, 0.2524952292442322, 0.012845640070736408, -0.011268879286944866, -0.011112213134765625, -0.10734870284795761, 0.18983948230743408, -0.07422417402267456, 0.22134648263454437, 0.0416388213634491, 0.04594157636165619, -0.09846531599760056, -0.09997604042291641, 0.07058153301477432, 0.018399983644485474, 0.01379283145070076, 0.021753918379545212, 0.06943244487047195, 0.23433665931224823, 0.11999798566102982, 0.01178051345050335, 0.030364781618118286, -0.003320682793855667, 0.01353613194078207, 0.06260763108730316, 0.13719244301319122, 0.1558181792497635, 0.07872816920280457, 0.06991780549287796, -0.04502689838409424, -0.0035431033466011286, 0.24824056029319763, 0.16165076196193695, 0.008594480343163013, -0.03685808554291725, -0.11630180478096008, 0.08889695256948471, -0.19475814700126648, -0.17794059216976166, 0.006967248860746622, 0.05302569270133972, 0.07512494176626205, -0.0013117927592247725, -0.042667534202337265, -0.02328347973525524, 0.12303706258535385, 0.03120877966284752, 0.08535787463188171, 0.07250343263149261, 0.17613917589187622, 0.009162135422229767, -0.0001993454061448574, -0.005144719034433365, 0.25586387515068054, -0.0733795315027237, -0.09073934704065323, 0.10427036881446838, -0.08917326480150223, -0.059433866292238235, 0.04521452635526657, 0.02386997453868389, -0.09628908336162567, -0.048215657472610474, -0.08728152513504028, -0.18573391437530518, 0.027917860075831413, -0.039461977779865265, -0.07980211079120636, -0.1231851652264595, -0.12353427708148956, -0.06466303020715714, -0.04032117873430252, -0.062336068600416183, 0.17342539131641388, -0.1291835457086563, -0.03963455557823181, 0.19368533790111542, -0.13255710899829865, -0.09326080232858658, 0.05019073933362961, 0.08733902871608734, -0.2628304958343506, 0.15657180547714233, 0.17682673037052155, -0.08000929653644562, 0.0008445133571512997, -0.010334431193768978, -0.10209565609693527, 0.036847829818725586, -0.12858688831329346, -0.05312903970479965, 0.21861693263053894, 0.02657504938542843, 0.013136391527950764, -0.05397350341081619, -0.1730193793773651, 0.008889026008546352, 0.20372067391872406, 0.10935608297586441, 0.11258210986852646, -0.18444164097309113, -0.03432973474264145, 0.14065620303153992, 0.12185739725828171, -0.050614383071660995, -0.19633540511131287, -0.047334183007478714, 0.13698525726795197, -0.14642994105815887, 0.09936222434043884, 0.027100102975964546, 0.13761067390441895, -0.04025945067405701, -0.20162226259708405, 0.03889251872897148, -0.020154954865574837, -0.042865656316280365, 0.09654542058706284, -0.06323643773794174, 0.031887203454971313, -0.037397850304841995, 0.05720653384923935, -0.05184077098965645, -0.031332504004240036, -0.022400204092264175, 0.020681533962488174, 0.048793621361255646, 0.08500414341688156, -0.09970618039369583, 0.03029981069266796, -0.02185700088739395, 0.1884031742811203, 0.07220365107059479, 0.003077877452597022, -0.04772146791219711, -0.0670035257935524, 0.0562581866979599, 0.03967658430337906, 0.0648813247680664, 0.09950581192970276, 0.011535761877894402, 0.013477622531354427, 0.08920038491487503, -0.0909317135810852, -0.04817267507314682, 0.2112593650817871, 0.042743660509586334, 0.08774221688508987, 0.0328492633998394, 0.13160282373428345, -0.011382125318050385, -0.03252287581562996, 0.12627437710762024, 0.08606941998004913, -0.11911112815141678, -0.02050696313381195, 0.13900205492973328, 0.057731322944164276, -0.24728050827980042, -0.19004517793655396, 0.029549898579716682, -0.0005348436534404755, -0.05850031599402428, -0.017517196014523506, -0.07566318660974503, 0.11492619663476944, -0.10917883366346359, -0.033673811703920364, 0.09666748344898224, -0.005293236579746008, -0.09210338443517685, 0.007578427437692881, -2.338260742687459e-32, -0.11409959942102432, -0.10286298394203186, 0.029855748638510704, -0.06635282188653946, -0.03771808743476868, 0.025411482900381088, -0.05622539296746254, -0.09253884851932526, 0.015171230770647526, 0.042047176510095596, -0.12585429847240448, 0.05209628492593765, 0.027605483308434486, 0.025810986757278442, -0.16665688157081604, -0.12773855030536652, -0.05211333930492401, -0.06382585316896439, -0.031154561787843704, 0.08688224107027054, 0.18776503205299377, 0.19284923374652863, -0.10374108701944351, 0.0524027943611145, -0.23591190576553345, -0.1335190385580063, 0.025114916265010834, -0.2021763175725937, 0.0613170862197876, -0.08311908692121506, -0.06873184442520142, -0.07072880119085312, -0.09083880484104156, -0.09471136331558228, -0.03932875394821167, 0.06424805521965027, -0.16669200360774994, 0.06921444833278656, 0.09579823911190033, 0.03581972420215607, 0.06582517921924591, 0.07139012962579727, 0.1972435563802719, -0.08919493108987808, 0.07475591450929642, -0.08555541932582855, 0.007270295638591051, 0.08940361440181732, -0.13668756186962128, -0.0941220372915268, -0.07608312368392944, 0.14405196905136108, 0.0741443932056427, -0.11814448982477188, 0.17501813173294067, -0.0324350968003273, 0.097739078104496, 0.0699940100312233, 0.004803976509720087, -0.19282366335391998, 0.07424279302358627, 0.0430600605905056, -0.0126347029581666, -0.017372291535139084, 0.1660538911819458, 0.016162334010004997, 0.22749197483062744, 0.05826091021299362, 0.15635299682617188, 0.005208839662373066, 0.10336553305387497, 0.08424748480319977, -0.0394616536796093, -0.056274719536304474, 0.014649299904704094, -0.13365130126476288, -0.24221545457839966, -0.09735029935836792, -0.09290789067745209, -0.005893733352422714, 0.06452061235904694, 0.024879060685634613, -0.05020550265908241, 0.10486086457967758, -0.009421813301742077, 0.13567449152469635, -0.017178136855363846, 0.03726902976632118, -0.1517346054315567, -0.08073507994413376, -0.17480888962745667, -0.12011582404375076, 0.11453863233327866, -0.05702010914683342, 0.10110360383987427, 0.03805902600288391, -0.11896802484989166, 0.08121120929718018, -0.028165800496935844, 0.08465941995382309, 0.06625790148973465, 0.052157044410705566, 0.15236978232860565, -0.1488027125597, 0.1438276171684265, 0.05691402032971382, 0.048134684562683105, -0.0837143138051033, -0.051183249801397324, -0.08804537355899811, -0.15764902532100677, 0.06929405778646469, 0.10952282696962357, 0.07444411516189575, 0.2409791797399521, 0.23396766185760498, -0.08457229286432266, 0.011073363944888115, 0.08467481285333633, 0.0463569201529026, -0.11013300716876984, -0.07191216945648193, 0.1238742396235466, -0.01084695290774107, -0.07030599564313889, 0.12363547831773758, -0.16012239456176758, -0.27385708689689636, 0.056350227445364, -0.03337233141064644, 0.013998966664075851, 0.0999494418501854, 7.865768338888302e-7, -0.1971803456544876, 0.13250552117824554, -0.00755769107490778, 0.19528454542160034, -0.09174095094203949, 0.08433088660240173, -0.08652260154485703, -0.05440864339470863, 0.06645649671554565, 0.00026198351406492293, 0.15093804895877838, -0.03293529525399208, 0.02701416425406933, 0.1517566442489624, -0.10995607823133469, -0.03370305895805359, 0.0755847841501236, 0.021951276808977127, 0.08864428848028183, -0.048838429152965546, -0.1461799144744873, 0.14569786190986633, -0.18784058094024658, -0.08775416761636734, 0.1443394422531128, -0.21607321500778198, -0.0044168573804199696, 0.1468060463666916, -0.012027828022837639, 0.08250337094068527, 0.1643989533185959, 0.17752787470817566, -0.17728567123413086, 0.15840183198451996, -0.03781989589333534, -0.01976632885634899, -0.1905546337366104, -0.13390402495861053, 0.09425508975982666, 0.10065440833568573, 0.07941685616970062, -0.04281638562679291, 0.020028769969940186, 0.045653022825717926, 0.09523705393075943, -0.022061310708522797, -0.1651172786951065, -0.0686442032456398, 0.01827319897711277, -0.05959375947713852, -0.055803511291742325, 0.02739867940545082, 0.14734919369220734, 0.10836318880319595, 0.02380574494600296, -0.10822702199220657, 0.04159758985042572, -0.23456768691539764, 0.03604878857731819, 0.0810791626572609, -0.0441378578543663, 0.018600493669509888, 0.11778490245342255, -0.043088629841804504, 0.1900855153799057, -0.08125662058591843, -0.024782143533229828, 2.6446655317996284e-34, -0.038769569247961044, 0.009505084715783596, -0.07409615814685822, -0.04776664450764656, 0.06420937925577164, -0.10333678871393204, -0.022274773567914963, -0.0636504739522934, 0.1064813882112503, -0.22042587399482727, -0.07992707937955856 ]
https://github.com/huggingface/datasets/issues/2538
Loading partial dataset when debugging
Indeed by default load_dataset would download and prepare everything as Arrow files. And passing `split=train[:10]` memory maps only the beginning of the full dataset that has been prepared on disk. If you don't want to download everything, you can use streaming : ```python ids = load_dataset(..., streaming=True) first_samples = list(ids["train"].take(10)) ``` To get a Dataset you can use ```python ds = Dataset.from_generator(ids.take(10).__iter__) ``` edit: fixed small bug
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!
67
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! Indeed by default load_dataset would download and prepare everything as Arrow files. And passing `split=train[:10]` memory maps only the beginning of the full dataset that has been prepared on disk. If you don't want to download everything, you can use streaming : ```python ids = load_dataset(..., streaming=True) first_samples = list(ids["train"].take(10)) ``` To get a Dataset you can use ```python ds = Dataset.from_generator(ids.take(10).__iter__) ``` edit: fixed small bug
[ -0.16384710371494293, 0.20338882505893707, -0.013949795626103878, 0.025495577603578568, 0.03972387686371803, -0.015111035667359829, 0.15589842200279236, 0.05278806388378143, 0.15032628178596497, -0.032991163432598114, 0.012369628064334393, 0.03878010809421539, -0.1968301236629486, -0.030463822185993195, 0.0948389321565628, -0.08112532645463943, -0.13851803541183472, 0.11525142192840576, -0.018673965707421303, -0.011256363242864609, -0.07926582545042038, -0.07426439970731735, 0.0625385269522667, -0.16202953457832336, 0.012551474384963512, 0.08136333525180817, -0.11955446004867554, 0.08633609116077423, 0.08210887759923935, -0.13344860076904297, 0.05857531726360321, -0.012984980829060078, -0.03797643631696701, -0.07162253558635712, 0.000006287519227043958, 0.08336048573255539, 0.15952038764953613, 0.07593832910060883, -0.1739528626203537, -0.05915679782629013, 0.07433552294969559, -0.08719366043806076, 0.062369268387556076, -0.023302527144551277, -0.1055004745721817, -0.15499314665794373, -0.09607260674238205, -0.06093742325901985, -0.03256078064441681, -0.01659071072936058, -0.05727626755833626, 0.024708319455385208, -0.14869695901870728, -0.17921386659145355, 0.03169088438153267, -0.00939901452511549, -0.06276772916316986, 0.10335458815097809, -0.02033246122300625, -0.015345771797001362, -0.16160373389720917, -0.07144369930028915, 0.06736760586500168, 0.12505246698856354, 0.1544203907251358, 0.0708002895116806, -0.07022540271282196, -0.13648658990859985, 0.07991449534893036, 0.18092051148414612, -0.0180465430021286, 0.1301310807466507, -0.04614592343568802, -0.10295834392309189, -0.017605120316147804, -0.05876776576042175, -0.05754576623439789, -0.027384480461478233, -0.1833629310131073, -0.04224878177046776, -0.14543896913528442, 0.004298801068216562, -0.003357628593221307, 0.04104595258831978, -0.3037679195404053, -0.23860982060432434, -0.020235851407051086, 0.06084761396050453, -0.005722584668546915, 0.06390564888715744, 0.06584043800830841, 0.0070068249478936195, -0.15909160673618317, -0.08843863755464554, 0.10356467217206955, 0.12420714646577835, 0.00672618905082345, -0.1509377360343933, -0.062192924320697784, 0.021921124309301376, 0.08436427265405655, 0.07106950134038925, -0.022713307291269302, 0.0752866119146347, 0.08781994879245758, -0.10471486300230026, -0.0381658636033535, -0.05951729416847229, -0.052990902215242386, 0.016687050461769104, -0.1473180055618286, 0.19130325317382812, -0.21038007736206055, -0.10073485225439072, 0.09605521708726883, -0.04824535921216011, 0.022177664563059807, 0.1354975402355194, 0.05033155158162117, -0.068942129611969, 0.01288521196693182, 0.08141681551933289, -0.03629738837480545, 0.1640750616788864, 0.07100372016429901, -0.05273139849305153, -0.1514228731393814, -0.09100614488124847, 0.001175925717689097, -0.058312512934207916, -0.10403823107481003, -0.046313438564538956, -0.048024456948041916, -0.025068748742341995, 0.16431447863578796, -0.03126811236143112, -0.024145668372511864, -0.17128759622573853, -0.058066483587026596, -0.16305822134017944, 0.16314764320850372, -0.03932167962193489, 0.0390484444797039, 0.009563286788761616, 0.03304849937558174, -0.0040685394778847694, -0.025646118447184563, 0.09496072679758072, -0.03713466227054596, 0.04366030916571617, -0.1324128657579422, 0.08723673969507217, -0.13752904534339905, 0.020856888964772224, -0.21277664601802826, 0.04057665169239044, -0.13362480700016022, -0.12679822742938995, -0.27911001443862915, -0.028110507875680923, 0.010530178435146809, -0.0723477303981781, 0.04832231253385544, -0.0974520593881607, 0.30057281255722046, 0.07022198289632797, -0.0024481979198753834, -0.03355845436453819, -0.09005328267812729, -0.005612348672002554, 0.012847930192947388, -0.2159193903207779, -0.20824892818927765, 0.023905731737613678, -0.23011063039302826, 0.20217165350914001, 0.0821807011961937, 0.061283789575099945, -0.08009450137615204, 0.15521283447742462, 0.07147259265184402, 0.06416603177785873, -0.10476938635110855, 0.03635400906205177, 0.2711141109466553, 0.07729296386241913, 0.027053311467170715, 0.10788919776678085, 0.04726541414856911, -0.060115277767181396, 0.02840369939804077, -0.011866492219269276, 0.07668051868677139, 0.25791361927986145, -0.030658166855573654, 0.05739628151059151, -0.027309421449899673, 0.0708087831735611, 0.09584970027208328, -0.1849776655435562, -0.17399418354034424, 0.05771813169121742, -0.10378985106945038, 0.13070207834243774, 0.00421646935865283, -0.10228575766086578, -0.09467959403991699, 0.21572722494602203, 0.19179481267929077, -0.27515706419944763, -0.0874921903014183, 0.01637839339673519, -0.004304526839405298, 0.02616007626056671, -0.0828232690691948, -0.1288147270679474, -0.05904080718755722, 0.05991207808256149, -0.06828977912664413, 0.04844113811850548, -0.07820963859558105, 0.016694776713848114, 0.1018800139427185, 0.10165426135063171, -0.09266475588083267, 0.021203432232141495, 0.0897068977355957, -0.026205280795693398, 0.023350683972239494, 0.0014884984120726585, -0.10934576392173767, -0.11689089238643646, 0.13418394327163696, 0.12770630419254303, -0.046050719916820526, 0.05655248090624809, -0.009888239204883575, -0.07555373758077621, 0.08148523420095444, -0.07917165756225586, -0.06701810657978058, 0.035514816641807556, -0.013151120394468307, 0.00404437817633152, 0.05419360473752022, 0.0961921438574791, -0.12016487121582031, 0.24513323605060577, 0.010352833196520805, -0.025252634659409523, 0.2616514563560486, -0.006925997789949179, -0.11591015756130219, 0.0320255272090435, 0.09935693442821503, -0.035347651690244675, 0.18841177225112915, 0.151011660695076, -0.0694279819726944, 0.06664622575044632, 0.22750723361968994, -0.014340377412736416, -0.021146433427929878, 0.054483819752931595, 0.024661578238010406, 0.017446180805563927, -0.02210550755262375, -0.06366536021232605, 0.06253641098737717, 0.051977019757032394, 0.046014200896024704, 0.02092539146542549, -0.08430740237236023, 0.002067483263090253, 0.0076586841605603695, -0.03433138504624367, 0.0008662205655127764, 0.05666785314679146, 0.010197320021688938, -0.13560904562473297, -0.020551806315779686, 0.039173003286123276, 0.06956430524587631, -0.1425454169511795, 0.10066036880016327, -0.040891360491514206, -0.075867660343647, 0.022906607016921043, 0.07265080511569977, -0.14828728139400482, 0.08927320688962936, 0.04679121449589729, -0.005335113033652306, -0.03352457284927368, 0.11021608859300613, 0.08782093226909637, -0.00405003409832716, 0.06485520303249359, -0.03478587046265602, -0.08718574792146683, 0.028513189405202866, -0.0429573655128479, -0.08785388618707657, 0.1440477818250656, 0.045635126531124115, 0.14593735337257385, 0.040906745940446854, -0.09432736039161682, -0.23064672946929932, 0.10415017604827881, 0.024626972153782845, -0.06512945145368576, 0.11641901731491089, 0.04746793955564499, -0.06579309701919556, 0.034313078969717026, -0.016640935093164444, -0.27081188559532166, 0.15837281942367554, 0.08088686317205429, 0.12869028747081757, 0.11955957114696503, 0.0903225913643837, -0.06531874090433121, 0.050136812031269073, -0.04893916845321655, -0.08852406591176987, -0.06494281440973282, 0.05055360123515129, 0.046801574528217316, -0.027744021266698837, 0.07448180019855499, 0.14121589064598083, -0.09777086973190308, 0.08690226078033447, 0.0034006463829427958, -0.02849598601460457, -0.019823474809527397, 0.3374122977256775, -0.005219693295657635, -0.10711486637592316, 0.021778525784611702, 0.003312148619443178, -0.20887799561023712, 0.05460377782583237, -0.13184596598148346, 0.07697845250368118, -0.192046657204628, -0.019289597868919373, -0.003129301592707634, 0.0030309557914733887, -0.029743708670139313, -0.005539357662200928, -0.06952302157878876, 0.03078063391149044, -0.08357097953557968, -0.08885768055915833, 0.0017627241322770715, -0.03662411496043205, 0.03936436027288437, -0.001735709491185844, -0.002698268974199891, 0.1407996416091919, 0.030949853360652924, -0.12580671906471252, 0.034883517771959305, 0.05881507322192192, 0.07736627012491226, -0.006841572001576424, -0.11567150056362152, -0.1600085198879242, -0.14148391783237457, -0.07774270325899124, -0.03560716658830643, 0.03239283710718155, -0.16636040806770325, -0.0012779654935002327, -0.07108829915523529, 0.0426686629652977, 0.048534493893384933, 0.17958354949951172, -0.20949837565422058, -0.13862411677837372, 0.015932360664010048, 0.22543209791183472, 0.03277633711695671, -0.03301074728369713, -0.0328713059425354, -0.10050557553768158, 0.16990287601947784, -0.031098607927560806, 0.24324685335159302, 0.013771451078355312, 0.051381319761276245, -0.12853354215621948, -0.05032682046294212, 0.06553731858730316, 0.04825670272111893, -0.0026738252490758896, 0.05341885983943939, 0.09998106211423874, 0.21358360350131989, 0.08942227810621262, -0.006936919875442982, -0.029485387727618217, 0.006219096481800079, 0.019624220207333565, 0.024577470496296883, 0.15085285902023315, 0.17219576239585876, 0.11352735757827759, 0.04259626567363739, -0.06344087421894073, -0.004321378190070391, 0.24557481706142426, 0.12899340689182281, 0.02590855397284031, -0.024436848238110542, -0.1288551241159439, 0.09095469862222672, -0.17965057492256165, -0.18210738897323608, -0.022803522646427155, 0.051366422325372696, 0.058313142508268356, -0.021039007231593132, -0.03754684701561928, 0.009722757153213024, 0.09807078540325165, 0.006904316134750843, 0.05799270048737526, 0.05474028363823891, 0.17547209560871124, 0.08297248929738998, 0.03995516523718834, 0.04242325201630592, 0.24471181631088257, -0.07692777365446091, -0.09041355550289154, 0.08842385560274124, -0.13600459694862366, -0.09849301725625992, 0.0698782354593277, 0.024187708273530006, -0.13619256019592285, -0.036090388894081116, -0.11177434027194977, -0.14451417326927185, 0.061506688594818115, -0.03934435918927193, -0.08246974647045135, -0.12018656730651855, -0.14075390994548798, -0.10204333066940308, -0.0270981527864933, -0.050011083483695984, 0.24457049369812012, -0.09328051656484604, -0.05235680937767029, 0.19049550592899323, -0.10802845656871796, -0.09347689896821976, 0.10238215327262878, 0.021162837743759155, -0.22974422574043274, 0.11248992383480072, 0.13294748961925507, -0.10966148227453232, -0.0042285132221877575, 0.027946917340159416, -0.09459617733955383, 0.03934440389275551, -0.11128126829862595, -0.032788340002298355, 0.23259638249874115, 0.06786205619573593, 0.05124233663082123, -0.10727398842573166, -0.12284646183252335, 0.0005856197094544768, 0.18048793077468872, 0.09408368170261383, 0.13185220956802368, -0.16045717895030975, -0.0358009971678257, 0.14745497703552246, 0.1252475380897522, -0.049354974180459976, -0.20658695697784424, 0.008577767759561539, 0.15718990564346313, -0.1701986938714981, 0.11896909028291702, -0.0033521726727485657, 0.13127478957176208, -0.06310630589723587, -0.20860476791858673, -0.008290791884064674, 0.022212833166122437, -0.06258342415094376, 0.06580217182636261, -0.06364911794662476, 0.06105520948767662, -0.038015127182006836, 0.06015005707740784, -0.04590409994125366, -0.019111141562461853, -0.003993226680904627, 0.045634228736162186, 0.013868737034499645, 0.10870468616485596, -0.08606375008821487, 0.014802111312747002, -0.030728265643119812, 0.15219995379447937, 0.11871135234832764, -0.005634881556034088, -0.0006868198979645967, -0.05950168892741203, 0.054310914129018784, 0.05335306003689766, 0.09362085163593292, 0.06302258372306824, 0.00811050646007061, -0.05132906138896942, 0.04541316628456116, -0.06731072068214417, -0.04225635901093483, 0.17814122140407562, 0.01902499981224537, 0.10208392888307571, 0.05895793437957764, 0.10853888094425201, -0.017665626481175423, -0.017892101779580116, 0.10171828418970108, 0.1176433116197586, -0.16561143100261688, -0.039189647883176804, 0.12965230643749237, 0.00880347564816475, -0.23639492690563202, -0.14799849689006805, 0.045573655515909195, -0.03364941105246544, -0.05134090036153793, -0.027131855487823486, -0.06457507610321045, 0.08496657013893127, -0.12262565642595291, -0.037908341735601425, 0.09724850952625275, -0.037420980632305145, -0.07630418986082077, -0.03832342475652695, -2.3749723128844021e-32, -0.13357287645339966, -0.05071023106575012, 0.004153887275606394, -0.056136056780815125, -0.08008459955453873, 0.008601609617471695, -0.03528553619980812, -0.08655254542827606, -0.033209774643182755, 0.0029807561077177525, -0.14581897854804993, 0.052443910390138626, 0.008035934530198574, 0.031162556260824203, -0.18461874127388, -0.12784720957279205, -0.02622365579009056, -0.030565615743398666, -0.08097881823778152, 0.10998356342315674, 0.16205738484859467, 0.20768603682518005, -0.02672661654651165, 0.022495077922940254, -0.18127644062042236, -0.18486908078193665, 0.0198989175260067, -0.1993698626756668, 0.017908979207277298, -0.0943068191409111, -0.03925173357129097, -0.08125803619623184, -0.09026455134153366, -0.13227523863315582, -0.04424581676721573, 0.031631749123334885, -0.13432778418064117, 0.08272363990545273, 0.10671942681074142, 0.06470993906259537, 0.026615126058459282, 0.08952853083610535, 0.19607976078987122, -0.08387496322393417, 0.11912723630666733, -0.03595415875315666, 0.004181922413408756, 0.1330738216638565, -0.10751310735940933, -0.10944067686796188, -0.09566504508256912, 0.10757726430892944, 0.04561859369277954, -0.1262345314025879, 0.15322870016098022, -0.029894644394516945, 0.10112292319536209, 0.026443518698215485, -0.05395539477467537, -0.18653123080730438, 0.11387169361114502, 0.0504949577152729, 0.03285332769155502, -0.0638696700334549, 0.1416543573141098, -0.024723339825868607, 0.2243649661540985, 0.044448740780353546, 0.1304890662431717, 0.036495473235845566, 0.11612993478775024, 0.09898439049720764, -0.0512436106801033, -0.09855161607265472, 0.05814087390899658, -0.11781252175569534, -0.1989697962999344, -0.09013956040143967, 0.0005614369292743504, -0.008577261120080948, 0.0793832391500473, 0.029964594170451164, -0.012374497950077057, 0.09562516957521439, -0.046096015721559525, 0.07588489353656769, -0.00020259573648218066, 0.0002445763966534287, -0.12375375628471375, -0.06384336203336716, -0.1533706784248352, -0.14644841849803925, 0.1366867572069168, -0.031159916892647743, 0.04506319761276245, 0.03284478560090065, -0.1067194864153862, 0.0897388681769371, -0.0503537654876709, 0.11065265536308289, 0.0069307745434343815, -0.0047501251101493835, 0.1495157927274704, -0.17364537715911865, 0.10160238295793533, 0.0346338152885437, 0.07694799453020096, -0.06400341540575027, -0.032371822744607925, -0.08741249144077301, -0.1465912163257599, 0.0880986824631691, 0.11562767624855042, 0.09952976554632187, 0.2872631847858429, 0.2242218405008316, -0.10381503403186798, -0.014192549511790276, 0.07922042161226273, 0.0822993591427803, -0.1359269767999649, -0.05366922914981842, 0.08755123615264893, 0.014800513163208961, -0.04424130916595459, 0.12843607366085052, -0.14504490792751312, -0.22823059558868408, 0.02936547063291073, -0.0469847097992897, 0.02545774355530739, 0.08766766637563705, 7.871536809034296e-7, -0.16556397080421448, 0.15389004349708557, 0.006387887988239527, 0.13525629043579102, -0.10191985219717026, 0.002001893939450383, -0.07332123816013336, -0.025938015431165695, 0.04464023932814598, -0.0032786254305392504, 0.1584377884864807, -0.02151268720626831, -0.0038490844890475273, 0.1429315060377121, -0.1166011169552803, -0.044557057321071625, 0.02294106036424637, 0.07727644592523575, 0.0493457093834877, -0.10995770990848541, -0.12813086807727814, 0.18571053445339203, -0.16622216999530792, -0.07595913857221603, 0.1744670569896698, -0.16775189340114594, -0.0047859870828688145, 0.1524200737476349, -0.03684011101722717, 0.07583478093147278, 0.10075046122074127, 0.1748073548078537, -0.15344873070716858, 0.15033258497714996, 0.015408887527883053, -0.0317806676030159, -0.1826058179140091, -0.10418162494897842, 0.1115509495139122, 0.1011313870549202, 0.02447323128581047, -0.014698517508804798, -0.00955619290471077, 0.0907980427145958, 0.10794255882501602, -0.017564568668603897, -0.12332877516746521, -0.0553506463766098, -0.03272106125950813, -0.0729946494102478, -0.04793037101626396, 0.07462238520383835, 0.18185827136039734, 0.17335377633571625, -0.0007861811318434775, -0.10557743906974792, 0.0585530549287796, -0.2323177307844162, 0.009270641952753067, 0.02724561095237732, -0.029858818277716637, 0.03767416626214981, 0.10397060215473175, -0.02980288304388523, 0.14760465919971466, -0.05629781633615494, -0.0628717690706253, 2.2255113377677673e-34, -0.05309707298874855, 0.008497911505401134, -0.06327687948942184, -0.011176003143191338, 0.0700058788061142, -0.06771557033061981, -0.020219087600708008, -0.06051018834114075, 0.06462637335062027, -0.21174359321594238, -0.07381723821163177 ]
https://github.com/huggingface/datasets/issues/2538
Loading partial dataset when debugging
Thanks @lhoestq, but I don't think it is 100% accurate, as it doesn't keep the dataset structure exactly the same. To load the full dataset, I do: ``` data = load_dataset("json", data_files="a.json") train_data = data["train"].shuffle() ``` But when I am changing it as per your instructions: ``` ids = load_dataset("json", data_files="a.json", streaming=True) data = Dataset.from_generator(ids["train"].take(1).__iter__) train_data = data["train"].shuffle() ``` It throws KeyError. I need a simple way, like you suggested, to have a subset of a Dataset, which exactly the same attributes.
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!
82
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 @lhoestq, but I don't think it is 100% accurate, as it doesn't keep the dataset structure exactly the same. To load the full dataset, I do: ``` data = load_dataset("json", data_files="a.json") train_data = data["train"].shuffle() ``` But when I am changing it as per your instructions: ``` ids = load_dataset("json", data_files="a.json", streaming=True) data = Dataset.from_generator(ids["train"].take(1).__iter__) train_data = data["train"].shuffle() ``` It throws KeyError. I need a simple way, like you suggested, to have a subset of a Dataset, which exactly the same attributes.
[ -0.11933080106973648, 0.2324828952550888, -0.004065489862114191, 0.09093097597360611, 0.07286086678504944, -0.017256801947951317, 0.111115001142025, 0.0327964723110199, 0.11768593639135361, -0.034798189997673035, -0.011747199110686779, 0.04900604858994484, -0.14741386473178864, -0.04518687725067139, 0.10855334252119064, -0.06612344831228256, -0.1333838403224945, 0.07279346883296967, 0.01890532113611698, 0.002958571072667837, -0.12978486716747284, -0.10336288809776306, 0.06864660233259201, -0.15517030656337738, 0.026542166247963905, 0.11357013881206512, -0.10466435551643372, 0.07807386666536331, 0.08120698481798172, -0.10603539645671844, 0.03666815906763077, 0.036644287407398224, -0.08249827474355698, -0.08151909708976746, 0.000006314395250228699, 0.08736260235309601, 0.16130056977272034, 0.09113585948944092, -0.1710662990808487, -0.10642903298139572, 0.07415620237588882, -0.019477376714348793, 0.03207508102059364, -0.03358149528503418, -0.111439049243927, -0.2015194445848465, -0.08961030095815659, -0.04479454085230827, -0.009596570394933224, -0.0400104895234108, -0.059667233377695084, -0.011143709532916546, -0.15076106786727905, -0.1758328080177307, 0.09592264890670776, 0.01128372922539711, -0.02049502544105053, 0.09653513133525848, -0.03343838080763817, -0.0006148905958980322, -0.18012315034866333, -0.05927785485982895, 0.03301810845732689, 0.07971878349781036, 0.13375891745090485, 0.01941445656120777, -0.12765589356422424, -0.09522420167922974, 0.05846116319298744, 0.1775124967098236, -0.011247078888118267, 0.13640464842319489, -0.06125456839799881, -0.09053175896406174, 0.0024946830235421658, -0.04892583191394806, -0.05526135116815567, -0.04462170973420143, -0.1868397742509842, -0.024859584867954254, -0.15750807523727417, 0.0016745649045333266, 0.004791321698576212, 0.020586924627423286, -0.28081047534942627, -0.21964500844478607, -0.034184761345386505, 0.0888855904340744, 0.0021774680353701115, 0.03942199796438217, 0.10636763274669647, -0.010327569209039211, -0.1673479974269867, -0.12711891531944275, 0.10773176699876785, 0.07922910898923874, 0.02652226760983467, -0.14182476699352264, -0.05104753002524376, -0.008447598665952682, 0.06119648739695549, 0.03457796946167946, -0.031100887805223465, 0.09785886853933334, 0.10601769387722015, -0.06711987406015396, -0.016932105645537376, -0.046487897634506226, -0.05068264529109001, 0.014478839933872223, -0.15514780580997467, 0.17424269020557404, -0.20945709943771362, -0.11951058357954025, 0.14368876814842224, -0.020989181473851204, 0.0218062587082386, 0.13601158559322357, 0.04856067895889282, -0.02544539049267769, -0.042531926184892654, 0.06370524317026138, -0.05720187723636627, 0.18122577667236328, 0.08470533788204193, -0.08228437602519989, -0.11652319133281708, -0.09274525195360184, -0.027988770976662636, -0.07396167516708374, -0.0736028179526329, 0.014167701825499535, -0.02658967860043049, -0.024081258103251457, 0.16755962371826172, -0.012649426236748695, 0.01283031515777111, -0.1386728286743164, -0.08010468631982803, -0.12321893125772476, 0.13312602043151855, -0.031173132359981537, -0.006966493092477322, 0.02414359524846077, 0.018810980021953583, -0.034520234912633896, -0.025075433775782585, 0.07306240499019623, -0.08043358474969864, 0.06287438422441483, -0.17063507437705994, 0.129733145236969, -0.1410599648952484, 0.01607809029519558, -0.22936859726905823, 0.01631365716457367, -0.1600596010684967, -0.10961225628852844, -0.2892284095287323, -0.03225862979888916, -0.007835066877305508, -0.12599416077136993, 0.06860443204641342, -0.13264833390712738, 0.2676331698894501, 0.07344570010900497, -0.005752951372414827, -0.06911316514015198, -0.07304878532886505, -0.009541528299450874, -0.005502481944859028, -0.20360536873340607, -0.20464688539505005, 0.04063486307859421, -0.18312865495681763, 0.17143580317497253, 0.05320949852466583, 0.054928816854953766, -0.11731523275375366, 0.11489183455705643, 0.09334039688110352, 0.05495709180831909, -0.12583817541599274, 0.04907010868191719, 0.20744116604328156, 0.09133020043373108, 0.030682379379868507, 0.10761585086584091, 0.00022164460096973926, -0.1075427308678627, 0.02723459154367447, -0.00947506632655859, 0.06409196555614471, 0.19161194562911987, -0.03688099980354309, 0.06260933727025986, -0.025455018505454063, -0.0032401878852397203, 0.07869165390729904, -0.13429096341133118, -0.16229598224163055, 0.07464217394590378, -0.08767446875572205, 0.13108442723751068, 0.00008287472155643627, -0.07331005483865738, -0.11224512755870819, 0.1660308837890625, 0.19006916880607605, -0.262978196144104, -0.07932942360639572, -0.008531250059604645, -0.049165964126586914, -0.0025325086899101734, -0.12336523830890656, -0.14094652235507965, -0.08024115860462189, 0.08252331614494324, -0.10994163900613785, 0.03778889402747154, -0.05946289002895355, -0.0049589998088777065, 0.10492663085460663, 0.08927048742771149, -0.09088441729545593, 0.028793273493647575, 0.09012079238891602, -0.018482767045497894, 0.01668590120971203, 0.042838405817747116, -0.056241393089294434, -0.12527863681316376, 0.1448802500963211, 0.10775003582239151, -0.03191345930099487, 0.055865176022052765, 0.04226642847061157, -0.03727661445736885, 0.04072564095258713, -0.03178953006863594, -0.08128418028354645, 0.03054024465382099, -0.011176868341863155, -0.04675504192709923, 0.04930178448557854, 0.08079718798398972, -0.15971997380256653, 0.2407495677471161, -0.009940000250935555, -0.024535231292247772, 0.2904699742794037, 0.025385050103068352, -0.1616954654455185, 0.06935124844312668, 0.06516300141811371, -0.003630978986620903, 0.12400119751691818, 0.1643877923488617, -0.1584220826625824, -0.013730412349104881, 0.24334196746349335, -0.019620699808001518, -0.003735064063221216, 0.04383350536227226, 0.07845097035169601, -0.0059677003882825375, -0.024519940838217735, -0.0473417304456234, 0.06927792727947235, 0.08712685108184814, 0.014512474648654461, 0.013959143310785294, -0.10092826932668686, -0.03241408243775368, -0.0069012269377708435, -0.1022028997540474, -0.0407552495598793, 0.0323469415307045, 0.013283835723996162, -0.0892532467842102, -0.016824541613459587, 0.024620695039629936, 0.049633994698524475, -0.09420326352119446, 0.10852602124214172, -0.007774912286549807, -0.0348840206861496, 0.02872275374829769, 0.06280508637428284, -0.16031695902347565, 0.07882127165794373, 0.06802092492580414, 0.020960848778486252, -0.0261550210416317, 0.09005463123321533, 0.1305321305990219, -0.017563605681061745, 0.0928710326552391, -0.016238650307059288, -0.10558094084262848, 0.008616182953119278, -0.04420258104801178, -0.10003189742565155, 0.1667221039533615, 0.09619025886058807, 0.16879723966121674, 0.04847954213619232, -0.05434562638401985, -0.24052071571350098, 0.07709193229675293, 0.038006462156772614, -0.03404264897108078, 0.08565781265497208, 0.11780592054128647, -0.07468704879283905, 0.06250517070293427, -0.008531514555215836, -0.27095645666122437, 0.18963664770126343, 0.07162271440029144, 0.1325453370809555, 0.14890354871749878, 0.07606183737516403, -0.09172665327787399, 0.08849012106657028, -0.053865108639001846, -0.060426440089941025, -0.03571070358157158, 0.044073350727558136, 0.007398062851279974, -0.06012819707393646, 0.07719741016626358, 0.11816934496164322, -0.06091882660984993, 0.05694175139069557, -0.013801476918160915, -0.0652855858206749, -0.07905703783035278, 0.33670926094055176, 0.03227832168340683, -0.08196529746055603, 0.0382259301841259, -0.0023240402806550264, -0.2285536378622055, 0.06076779589056969, -0.18707959353923798, 0.07085069268941879, -0.1321408748626709, 0.00959040131419897, -0.023200498893857002, -0.02985362522304058, -0.04623635858297348, 0.001158539904281497, -0.0616377629339695, 0.021131832152605057, -0.09205242246389389, -0.07999349385499954, 0.07496773451566696, -0.02730366960167885, 0.05616854503750801, 0.016963711008429527, -0.02096959948539734, 0.07410965859889984, -0.0013297197874635458, -0.12691806256771088, 0.054335467517375946, 0.06607750803232193, 0.08115275949239731, -0.010605931282043457, -0.1399524062871933, -0.08896325528621674, -0.08628422766923904, -0.07650727778673172, -0.05060955137014389, -0.03259146586060524, -0.1457778662443161, -0.016662240028381348, -0.1202840581536293, 0.04643278568983078, 0.025318115949630737, 0.16972240805625916, -0.17647574841976166, -0.13497112691402435, 0.05954118072986603, 0.23475652933120728, 0.04608568549156189, -0.05308912694454193, 0.0182013139128685, -0.10614997893571854, 0.24224549531936646, -0.04732160270214081, 0.1754377782344818, -0.06806579232215881, 0.018170829862356186, -0.0932532399892807, -0.10800545662641525, 0.13483040034770966, 0.019273530691862106, 0.0027067542541772127, 0.04902337118983269, 0.11197175085544586, 0.21950089931488037, 0.05485077574849129, 0.0110755180940032, 0.03438400477170944, 0.0484500415623188, 0.017012864351272583, 0.00036575301783159375, 0.10669556260108948, 0.19410695135593414, 0.058466363698244095, 0.14514222741127014, -0.06070372834801674, -0.005258196033537388, 0.24481116235256195, 0.17047609388828278, -0.031126027926802635, -0.06742112338542938, -0.10420294106006622, 0.07541697472333908, -0.15943539142608643, -0.1616804450750351, -0.03736813738942146, 0.06481798738241196, 0.0264832004904747, 0.022998813539743423, -0.06924542784690857, 0.05473892390727997, 0.10119287669658661, 0.04673149436712265, 0.048524945974349976, 0.03732345998287201, 0.13986538350582123, 0.10277996957302094, -0.04239315539598465, 0.01730372942984104, 0.2819465398788452, -0.02639787085354328, -0.05794954299926758, 0.03988678753376007, -0.13745000958442688, -0.08927501738071442, 0.01587165892124176, 0.0506744459271431, -0.08858201652765274, -0.012086066417396069, -0.15974308550357819, -0.15401293337345123, 0.030211063101887703, -0.045132867991924286, -0.08824953436851501, -0.11484036594629288, -0.2099449783563614, -0.10679523646831512, -0.038474030792713165, -0.07125411927700043, 0.2561422884464264, -0.09670078754425049, -0.0437176339328289, 0.23172710835933685, -0.097855344414711, -0.08995944261550903, 0.12067751586437225, 0.04906954616308212, -0.16304749250411987, 0.132365882396698, 0.1329725980758667, -0.19195394217967987, 0.01590009033679962, 0.0404987633228302, -0.06623943895101547, 0.022747287526726723, -0.12190715223550797, -0.05337972193956375, 0.2415313869714737, 0.09237995743751526, 0.02610975131392479, -0.08362098038196564, -0.13362079858779907, 0.02284526266157627, 0.18463917076587677, 0.08644378185272217, 0.14302493631839752, -0.17834478616714478, -0.04783399775624275, 0.10045602172613144, 0.12013421952724457, -0.08326925337314606, -0.19892054796218872, 0.01495805848389864, 0.1649036854505539, -0.14582931995391846, 0.15765982866287231, 0.01691865175962448, 0.12410576641559601, -0.07652497291564941, -0.2019146829843521, 0.03438273072242737, -0.0015873503871262074, -0.015597558580338955, 0.04481232911348343, -0.06710866093635559, 0.08335251361131668, -0.03325042128562927, 0.07537498325109482, -0.051523949950933456, -0.004053967073559761, -0.033135734498500824, 0.008618569001555443, -0.01024438813328743, 0.09097418934106827, -0.06537669152021408, -0.007849318906664848, -0.003941568545997143, 0.10294591635465622, 0.10741359740495682, -0.02943832240998745, -0.041284024715423584, -0.066398024559021, 0.08218890428543091, 0.07906007766723633, 0.08369730412960052, 0.07463860511779785, 0.03254438936710358, -0.018933776766061783, 0.05368242412805557, -0.07125676423311234, -0.03986569866538048, 0.17503322660923004, 0.07134813070297241, 0.0990263968706131, 0.0599837489426136, 0.10676385462284088, 0.04189862683415413, -0.031703222543001175, 0.12300621718168259, 0.15869374573230743, -0.13215529918670654, -0.038587938994169235, 0.09977921098470688, 0.05461375415325165, -0.23434780538082123, -0.1272483766078949, 0.08666127175092697, 0.0022978095803409815, -0.011715845204889774, -0.04710337892174721, -0.06105794012546539, 0.110468789935112, -0.09298903495073318, -0.056007400155067444, 0.1157628744840622, 0.03374698385596275, -0.09719511866569519, -0.056418102234601974, -2.3805227033353973e-32, -0.13266366720199585, -0.05399354174733162, 0.001549111562781036, -0.04106802120804787, -0.041008882224559784, 0.005017395131289959, -0.05280280485749245, -0.04224791377782822, -0.0713069885969162, -0.024495787918567657, -0.13428005576133728, -0.0035504845436662436, 0.03519925847649574, 0.033814817667007446, -0.11915355920791626, -0.13596473634243011, -0.042994823306798935, 0.00017586788453627378, -0.032973479479551315, 0.09012161195278168, 0.12487640231847763, 0.2051069587469101, 0.006495858542621136, -0.018672648817300797, -0.14776089787483215, -0.1691371351480484, 0.03183823078870773, -0.20950280129909515, -0.008119340986013412, -0.08094082027673721, -0.08820559084415436, -0.036885011941194534, -0.03401939943432808, -0.1347598135471344, -0.06117107346653938, 0.007098447531461716, -0.12083157151937485, 0.034153442829847336, 0.11416254192590714, 0.088264100253582, 0.03534712642431259, 0.048110540956258774, 0.2021389901638031, -0.1274452954530716, 0.09194662421941757, -0.02947182022035122, 0.021952643990516663, 0.12166963517665863, -0.09677661955356598, -0.0334053672850132, -0.04962530732154846, 0.10269732028245926, -0.02733519673347473, -0.1445990800857544, 0.1724303960800171, -0.08764201402664185, 0.09764543920755386, 0.018253032118082047, -0.09057293087244034, -0.15141814947128296, 0.06577704101800919, 0.03778357058763504, 0.029089849442243576, -0.049800481647253036, 0.14308010041713715, 0.013423259370028973, 0.20473641157150269, 0.09199419617652893, 0.09062472730875015, 0.06659014523029327, 0.09501209855079651, 0.11578819900751114, -0.05285520851612091, -0.039018016308546066, 0.030942382290959358, -0.10868588089942932, -0.23511750996112823, -0.06350726634263992, -0.05559530854225159, 0.00392155721783638, 0.05136147886514664, 0.05069250240921974, -0.03189641982316971, 0.08414838463068008, -0.044538047164678574, 0.0087302690371871, -0.008204400539398193, 0.015346716158092022, -0.11538117378950119, -0.09715819358825684, -0.20359329879283905, -0.1117679625749588, 0.07716594636440277, -0.04551255330443382, 0.027421817183494568, 0.05732094869017601, -0.09665456414222717, 0.08335673063993454, -0.07505010813474655, 0.13816845417022705, 0.029205085709691048, -0.05389060452580452, 0.18068434298038483, -0.11566275358200073, 0.1359100490808487, 0.03925982490181923, 0.09627822786569595, -0.07872062921524048, -0.0398695133626461, -0.09857400506734848, -0.08143062889575958, 0.06662975996732712, 0.16103054583072662, 0.04407878592610359, 0.25334638357162476, 0.22912457585334778, -0.10304922610521317, 0.004231116268783808, 0.10843075066804886, 0.12067153304815292, -0.16501875221729279, -0.07461164146661758, 0.09898729622364044, -0.01721496693789959, 0.011080911383032799, 0.14167732000350952, -0.1738959550857544, -0.2254527360200882, 0.02020934410393238, 0.005773516371846199, 0.04576437547802925, 0.08659867942333221, 8.018070047910442e-7, -0.1843775361776352, 0.12491771578788757, 0.01372718345373869, 0.09453354775905609, -0.08412157744169235, 0.01803511381149292, -0.12668395042419434, -0.051302943378686905, 0.07240000367164612, -0.007756794802844524, 0.122654028236866, -0.031061138957738876, -0.0341682992875576, 0.14523042738437653, -0.11069966852664948, -0.022466419264674187, -0.01193942129611969, 0.09311649948358536, 0.03392709046602249, -0.15211106836795807, -0.0705389603972435, 0.17770932614803314, -0.17333652079105377, -0.03870486840605736, 0.11862993985414505, -0.1430974304676056, -0.011398827657103539, 0.1633891612291336, -0.06024964898824692, 0.14796750247478485, 0.06760258972644806, 0.1634778380393982, -0.12383509427309036, 0.20130237936973572, -0.0007123039104044437, -0.06667371839284897, -0.185750350356102, -0.15094776451587677, 0.12228687852621078, 0.10555653274059296, 0.04134209454059601, 0.029023919254541397, 0.039083756506443024, 0.08300856500864029, 0.1004413440823555, -0.0075120278634130955, -0.14624740183353424, -0.06993085145950317, -0.042910873889923096, -0.03906487300992012, -0.028082381933927536, 0.059804510325193405, 0.16958527266979218, 0.15898922085762024, 0.020662272348999977, -0.08767107129096985, 0.0012895835097879171, -0.181444451212883, 0.02557266689836979, -0.02088220976293087, -0.04583711549639702, 0.06864669919013977, 0.11107232421636581, -0.10794632881879807, 0.1419532746076584, -0.030875148251652718, 0.006916841492056847, 1.5171432891053908e-34, -0.06374529004096985, 0.015832338482141495, -0.06346633285284042, -0.03051866590976715, 0.09790635108947754, -0.08240702748298645, -0.018581166863441467, -0.048146165907382965, 0.051218386739492416, -0.15556667745113373, -0.0647381916642189 ]
https://github.com/huggingface/datasets/issues/2538
Loading partial dataset when debugging
Whoops I fixed my code sorry ```diff - ds = Dataset.from_generator(ids["train"].take(10).__iter__) + ds = Dataset.from_generator(ids.take(10).__iter__) ``` in your case that means running ```python train_data = data.shuffle() ``` without `["train"]`
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!
29
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! Whoops I fixed my code sorry ```diff - ds = Dataset.from_generator(ids["train"].take(10).__iter__) + ds = Dataset.from_generator(ids.take(10).__iter__) ``` in your case that means running ```python train_data = data.shuffle() ``` without `["train"]`
[ -0.13165973126888275, 0.21280306577682495, -0.013744979165494442, 0.05854100361466408, 0.04827436804771423, 0.012982205487787724, 0.1563989520072937, 0.013806869275867939, 0.13778695464134216, -0.03725690022110939, 0.028920695185661316, 0.07332789152860641, -0.1809576004743576, -0.0387875959277153, 0.10663917660713196, -0.05483180657029152, -0.14816401898860931, 0.10659140348434448, -0.0008680855389684439, -0.013226094655692577, -0.10340924561023712, -0.13634710013866425, 0.04448368027806282, -0.19299852848052979, 0.017608055844902992, 0.07657738775014877, -0.1476772576570511, 0.08120337128639221, 0.1153302863240242, -0.12204594910144806, 0.0616314522922039, 0.02971377782523632, -0.03821098804473877, -0.026125814765691757, 0.000006206912530615227, 0.0722336620092392, 0.17095597088336945, 0.07904775440692902, -0.1856212019920349, -0.10401225835084915, 0.04912983626127243, -0.04325198382139206, 0.0514284186065197, -0.04610764980316162, -0.11248988658189774, -0.19354578852653503, -0.07387984544038773, -0.022258510813117027, -0.004781532101333141, -0.012149443849921227, -0.03274408355355263, -0.00912580918520689, -0.12211894989013672, -0.2022956758737564, 0.08265531808137894, 0.031565744429826736, -0.03325766324996948, 0.11861968785524368, -0.05514666065573692, -0.0034256288781762123, -0.16045944392681122, -0.054212383925914764, 0.03656201809644699, 0.11766339838504791, 0.1661989688873291, 0.07139012217521667, -0.09258914738893509, -0.14066153764724731, 0.09159880131483078, 0.2237757444381714, -0.005993925034999847, 0.10907900333404541, -0.03714902698993683, -0.07138699293136597, -0.0035043407697230577, -0.062261294573545456, -0.04549224302172661, -0.07317359000444412, -0.15142619609832764, -0.05257735401391983, -0.1567438244819641, -0.00029827377875335515, 0.007875659503042698, 0.024455562233924866, -0.27926650643348694, -0.2291589379310608, -0.00765058072283864, 0.04797438532114029, -0.03490424156188965, 0.05159985274076462, 0.09156643599271774, -0.008556938730180264, -0.14508593082427979, -0.10281450301408768, 0.09647125005722046, 0.08392905443906784, 0.00863046757876873, -0.18972235918045044, -0.07049728184938431, 0.00862047728151083, 0.05146544799208641, 0.05517648160457611, -0.02253870666027069, 0.07093298435211182, 0.07830319553613663, -0.06713000684976578, -0.01567443273961544, -0.03366661071777344, -0.03406178578734398, 0.03301651030778885, -0.1672290712594986, 0.19244839251041412, -0.22131946682929993, -0.11383792757987976, 0.08932274580001831, -0.024792959913611412, 0.038498420268297195, 0.15073172748088837, 0.05326623097062111, -0.0362505167722702, 0.03698860481381416, 0.062129952013492584, -0.03384978324174881, 0.22622032463550568, 0.025438612326979637, -0.08778949081897736, -0.13956165313720703, -0.05941316485404968, 0.030270777642726898, -0.055908285081386566, -0.09050505608320236, -0.030303288251161575, -0.04884300380945206, -0.04632791504263878, 0.14828424155712128, 0.015520613640546799, -0.023174775764346123, -0.11397884786128998, -0.0703863799571991, -0.12553079426288605, 0.12289896607398987, -0.06664735078811646, 0.02076774276793003, -0.02974049560725689, 0.002675809431821108, -0.0026483635883778334, -0.01799367181956768, 0.07649446278810501, -0.03485988453030586, 0.07042380422353745, -0.14309601485729218, 0.16150060296058655, -0.17880631983280182, 0.015821751207113266, -0.18537291884422302, 0.0518852099776268, -0.1472111940383911, -0.12086571753025055, -0.2514626979827881, -0.03834957629442215, -0.020957104861736298, -0.08455440402030945, 0.05233294516801834, -0.1056654304265976, 0.2846029996871948, 0.09360884130001068, -0.057838745415210724, -0.019314272329211235, -0.02685347944498062, -0.015594449825584888, 0.003283563069999218, -0.19763898849487305, -0.21241429448127747, 0.04348514974117279, -0.18556325137615204, 0.14916177093982697, 0.099777452647686, 0.055314801633358, -0.0907805934548378, 0.1573278307914734, 0.07896366715431213, 0.05189003795385361, -0.12163543701171875, 0.046477124094963074, 0.2570241391658783, 0.11183550953865051, 0.07193215936422348, 0.08508401364088058, 0.04069136828184128, -0.10029548406600952, 0.03413346782326698, -0.018863877281546593, 0.08442586660385132, 0.2577957510948181, -0.0270185898989439, 0.0397113636136055, -0.03449903801083565, 0.05673925578594208, 0.09751975536346436, -0.16740873456001282, -0.21168583631515503, 0.03215161710977554, -0.09696052223443985, 0.19498582184314728, -0.015511979348957539, -0.08314283937215805, -0.07200972735881805, 0.17184510827064514, 0.20056986808776855, -0.2544494867324829, -0.06226326525211334, 0.017275623977184296, -0.01735774241387844, -0.008034375496208668, -0.11880020052194595, -0.14415274560451508, -0.0609414167702198, 0.05593915656208992, -0.08994995802640915, 0.05734485015273094, -0.07229533046483994, -0.004694831557571888, 0.08267190307378769, 0.10071278363466263, -0.0765877366065979, 0.03328581154346466, 0.07961420714855194, -0.03568060323596001, 0.029690109193325043, 0.01700221374630928, -0.11283738166093826, -0.12688826024532318, 0.1102805957198143, 0.11463359743356705, -0.04311191290616989, 0.026201501488685608, 0.05803019553422928, -0.10046745836734772, 0.0752435177564621, -0.07416055351495743, -0.054775603115558624, 0.03502592816948891, -0.020594600588083267, -0.020110830664634705, 0.04058651998639107, 0.08572544157505035, -0.15009215474128723, 0.24173806607723236, -0.00024489479255862534, -0.0013244771398603916, 0.25931817293167114, -0.05264392867684364, -0.09143171459436417, 0.02967197448015213, 0.0603218674659729, -0.05604568123817444, 0.1924678236246109, 0.15863139927387238, -0.0945265144109726, 0.025247331708669662, 0.22780853509902954, -0.017277630046010017, 0.003483111271634698, 0.040951941162347794, 0.020421138033270836, 0.027422448620200157, -0.04719701036810875, -0.06867164373397827, 0.05451611429452896, 0.06831947714090347, 0.015102915465831757, 0.02567504718899727, -0.0754414051771164, -0.023924943059682846, 0.002638135803863406, -0.056334368884563446, -0.01485874317586422, 0.04215956851840019, -0.018012214452028275, -0.10491517186164856, 0.014814301393926144, 0.02287946082651615, 0.05547334998846054, -0.09313888102769852, 0.12132297456264496, -0.05860140919685364, -0.08717194944620132, 0.03076935186982155, 0.09797392040491104, -0.10536365956068039, 0.08089599758386612, 0.07789131999015808, -0.004231155849993229, -0.058586906641721725, 0.07327122986316681, 0.1460312157869339, 0.042500779032707214, 0.04416635259985924, -0.02235226519405842, -0.1181652694940567, 0.010631063021719456, -0.051969993859529495, -0.11509926617145538, 0.16775980591773987, 0.10107110440731049, 0.1549087017774582, 0.06368124485015869, -0.10934804379940033, -0.27987635135650635, 0.11649508029222488, 0.029414115473628044, -0.07085848599672318, 0.10931393504142761, 0.07662470638751984, -0.04988967999815941, 0.038357339799404144, -0.00929853692650795, -0.2602747678756714, 0.13204890489578247, 0.08010143786668777, 0.10796163231134415, 0.07865361869335175, 0.09061441570520401, -0.07809256762266159, 0.06034544110298157, -0.044354941695928574, -0.08141840994358063, -0.04796115681529045, -0.0005174037651158869, 0.007915248163044453, -0.049748457968235016, 0.07892121374607086, 0.13344760239124298, -0.08961194008588791, 0.06283343583345413, 0.03221099451184273, -0.05131473019719124, -0.030071070417761803, 0.3361937999725342, 0.013271477073431015, -0.12124353647232056, 0.061945315450429916, -0.028643924742937088, -0.25136449933052063, 0.04362751543521881, -0.15443886816501617, 0.09954167902469635, -0.17197951674461365, -0.016012070700526237, -0.01938074640929699, -0.03126503899693489, 0.0016915989108383656, -0.019899381324648857, -0.05679195001721382, 0.03341619297862053, -0.12299233675003052, -0.057575490325689316, 0.027345869690179825, -0.033393654972314835, 0.053275782614946365, 0.0330069437623024, -0.02364227920770645, 0.11315642297267914, 0.009231303818523884, -0.1314362734556198, 0.05495721474289894, 0.04699694365262985, 0.10680187493562698, 0.020789656788110733, -0.10896500200033188, -0.15328066051006317, -0.04010067880153656, -0.057768743485212326, -0.019280901178717613, -0.022671841084957123, -0.15491589903831482, -0.013753031380474567, -0.07974200695753098, 0.06795943528413773, 0.06446059793233871, 0.1751449704170227, -0.2293826788663864, -0.1472913771867752, 0.0037565764505416155, 0.2176043540239334, 0.062397949397563934, -0.008685842156410217, -0.03827238455414772, -0.0908280685544014, 0.16260813176631927, -0.04282526299357414, 0.22343792021274567, -0.04509235545992851, 0.04605743661522865, -0.1172562763094902, -0.08597502112388611, 0.04529685527086258, 0.017091959714889526, 0.037552837282419205, 0.05087259039282799, 0.10678761452436447, 0.25031232833862305, 0.06349547207355499, -0.03869666904211044, 0.01960854046046734, 0.014879444614052773, 0.07579876482486725, 0.006039109081029892, 0.120730921626091, 0.13630890846252441, 0.10049421340227127, 0.12191508710384369, -0.056289784610271454, 0.02941405028104782, 0.2555009126663208, 0.15158003568649292, -0.013267729431390762, -0.06924904882907867, -0.11740309000015259, 0.06910476833581924, -0.19556385278701782, -0.14203384518623352, -0.023102467879652977, 0.0879010260105133, 0.055243149399757385, 0.01707523874938488, -0.03815450891852379, 0.04841109737753868, 0.09645558148622513, 0.03592272475361824, 0.05904706194996834, 0.043369144201278687, 0.1727847009897232, 0.13333760201931, -0.005846309941262007, 0.0828382596373558, 0.19410642981529236, -0.07113460451364517, -0.049136001616716385, 0.04870859161019325, -0.11527702957391739, -0.11094585806131363, 0.05119067803025246, 0.03882567584514618, -0.11741969734430313, -0.07670534402132034, -0.1342775672674179, -0.19578957557678223, 0.055264778435230255, -0.028907133266329765, -0.058480050414800644, -0.14103476703166962, -0.20771482586860657, -0.15796540677547455, -0.019186662510037422, -0.03990843892097473, 0.20121373236179352, -0.14397978782653809, -0.0663776695728302, 0.2108852118253708, -0.10518375039100647, -0.09111380577087402, 0.08656581491231918, 0.04884728044271469, -0.20085783302783966, 0.1585315465927124, 0.1454792022705078, -0.1399858146905899, -0.018851937726140022, 0.027010507881641388, -0.09238526970148087, 0.062225792557001114, -0.12271997332572937, -0.00910329818725586, 0.2281251847743988, 0.08502419292926788, 0.02523661032319069, -0.09031280875205994, -0.12984232604503632, 0.006398114841431379, 0.16910278797149658, 0.13947360217571259, 0.12838347256183624, -0.17571499943733215, -0.07881660014390945, 0.11863318085670471, 0.12420914322137833, -0.0719006136059761, -0.2083837240934372, 0.0029123290441930294, 0.17746692895889282, -0.16175249218940735, 0.12811903655529022, 0.06375978887081146, 0.1286032497882843, -0.10705727338790894, -0.1946718841791153, 0.008143980987370014, 0.02045295573771, -0.03444145992398262, 0.05567997321486473, -0.04719121381640434, 0.09233672171831131, -0.0341905876994133, 0.07245299965143204, -0.08446064591407776, -0.008555859327316284, 0.02509273588657379, 0.02959425374865532, 0.0034416187554597855, 0.1433231085538864, -0.08140634000301361, -0.004021416883915663, -0.0031725671142339706, 0.149494007229805, 0.11928562819957733, 0.012651505880057812, -0.004111118149012327, -0.0968092754483223, 0.09970436245203018, 0.052586667239665985, 0.08088769763708115, 0.05721043795347214, 0.012591658160090446, 0.0233670175075531, 0.045208655297756195, -0.06919101625680923, -0.037719886749982834, 0.19281254708766937, 0.08285890519618988, 0.10170315951108932, 0.06389031559228897, 0.09568823128938675, 0.020226970314979553, -0.035234540700912476, 0.07996752113103867, 0.13016758859157562, -0.09433719515800476, -0.016467371955513954, 0.14697077870368958, 0.058165811002254486, -0.25375911593437195, -0.1734595000743866, 0.06097899749875069, 0.0010710885981097817, -0.034713465720415115, -0.03309204801917076, -0.09946424514055252, 0.0897892415523529, -0.1242615133523941, -0.05728275328874588, 0.08939172327518463, 0.01737925037741661, -0.07645008713006973, -0.07801701128482819, -2.3856970825309231e-32, -0.12643320858478546, -0.11848134547472, -0.009162806905806065, -0.0783364325761795, -0.12263894826173782, -0.01765214093029499, -0.03918243944644928, -0.0639137551188469, -0.0451589897274971, 0.02860778570175171, -0.12311606109142303, 0.05125280097126961, 0.013934051617980003, -0.0070986016653478146, -0.14207425713539124, -0.11863090842962265, -0.05327992886304855, -0.012505244463682175, -0.07602260261774063, 0.07407299429178238, 0.1612657606601715, 0.19103503227233887, -0.04781801253557205, 0.03191583603620529, -0.14158116281032562, -0.16192911565303802, 0.026426998898386955, -0.20723208785057068, -0.005070650950074196, -0.10386515408754349, -0.08702165633440018, -0.11850550770759583, -0.08574316650629044, -0.10207100957632065, -0.051510896533727646, 0.03704726696014404, -0.13101166486740112, 0.06786331534385681, 0.12111659348011017, 0.06981243193149567, 0.10301153361797333, 0.0332624688744545, 0.19301947951316833, -0.13700135052204132, 0.09592050313949585, -0.042479533702135086, 0.021418103948235512, 0.10566692799329758, -0.07064294815063477, -0.04615161567926407, -0.07776021212339401, 0.1238839253783226, 0.017009811475872993, -0.15616174042224884, 0.15428560972213745, -0.07554298639297485, 0.09912117570638657, 0.018264329060912132, -0.08448931574821472, -0.14029645919799805, 0.08430005609989166, 0.03421568498015404, 0.039508458226919174, -0.030884500592947006, 0.14539533853530884, 0.0052694655023515224, 0.23236516118049622, 0.06875211745500565, 0.16187895834445953, 0.001613080850802362, 0.08384428173303604, 0.10722976922988892, -0.05624402314424515, -0.050623394548892975, 0.1058293804526329, -0.11393353343009949, -0.22018535435199738, -0.09886655956506729, -0.10063302516937256, 0.0072363694198429585, 0.060691699385643005, 0.038227591663599014, -0.039267249405384064, 0.07323110103607178, -0.027902798727154732, 0.09294480830430984, -0.02771240845322609, 0.00045726815005764365, -0.11640011519193649, -0.07124444097280502, -0.14093497395515442, -0.1386794149875641, 0.1005653515458107, -0.0650491788983345, 0.08234184980392456, 0.022706706076860428, -0.08559200167655945, 0.04985595867037773, -0.0279742069542408, 0.07024265825748444, 0.022019382566213608, -0.008808400481939316, 0.19553020596504211, -0.11482544988393784, 0.12618544697761536, 0.017266035079956055, 0.07440456002950668, -0.10191036015748978, -0.03602003678679466, -0.08337277173995972, -0.14642171561717987, 0.06442544609308243, 0.1355656534433365, 0.10453727841377258, 0.235726460814476, 0.2220635861158371, -0.10165008902549744, -0.01426950003951788, 0.07558431476354599, 0.1211446225643158, -0.14957104623317719, -0.044023092836141586, 0.0685797855257988, 0.0004697561380453408, -0.0028584219980984926, 0.1819511353969574, -0.15893353521823883, -0.2508438229560852, 0.007170619908720255, -0.009490221738815308, 0.018185073509812355, 0.06341639906167984, 7.9150277088047e-7, -0.20367130637168884, 0.125889390707016, 0.0029520841781049967, 0.1319950819015503, -0.08701858669519424, 0.0002778851194307208, -0.08811435103416443, -0.037150464951992035, 0.06064288318157196, 0.0182564128190279, 0.11605539917945862, -0.020048925653100014, -0.0010523797245696187, 0.11641264706850052, -0.08832227438688278, -0.05696370080113411, 0.018585678189992905, 0.05957772955298424, 0.0658307671546936, -0.13441935181617737, -0.09118909388780594, 0.16194692254066467, -0.15713290870189667, -0.0347297377884388, 0.1426878571510315, -0.13410894572734833, 0.00285180751234293, 0.1373218297958374, -0.03216482698917389, 0.1181427612900734, 0.09034459292888641, 0.1542023867368698, -0.1765950620174408, 0.21061189472675323, -0.027351219207048416, -0.03431549668312073, -0.15870383381843567, -0.10493897646665573, 0.0986642837524414, 0.09931673854589462, 0.047947753220796585, -0.001358946319669485, 0.0037463156040757895, 0.09480690956115723, 0.09391964226961136, -0.019022412598133087, -0.14530223608016968, -0.09657808393239975, -0.06679432094097137, -0.08131510764360428, 0.01792498119175434, 0.07357509434223175, 0.16577769815921783, 0.12432193011045456, 0.010150759480893612, -0.06695752590894699, 0.041548553854227066, -0.2108713686466217, -0.011569316498935223, 0.057006169110536575, -0.043394140899181366, 0.021907998248934746, 0.08699310570955276, -0.08936755359172821, 0.20506121218204498, -0.02302267774939537, -0.009732990525662899, 1.9595107415011073e-34, -0.026447579264640808, 0.007102415896952152, -0.07491962611675262, -0.05475155636668205, 0.07484952360391617, -0.07127058506011963, -0.011579153127968311, -0.09160877764225006, 0.09106456488370895, -0.21716776490211487, -0.05275505408644676 ]
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.07471069693565369, 0.1530224084854126, 0.1268158107995987, -0.03860095515847206, 0.26767316460609436, 0.03870323300361633, 0.1680801510810852, -0.008150273002684116, -0.2682686746120453, 0.09121543914079666, -0.08208093047142029, -0.0566389299929142, 0.046521756798028946, 0.04740181937813759, -0.05109318345785141, 0.07141494005918503, 0.10683324933052063, -0.014600260183215141, -0.15825994312763214, 0.0037393427919596434, -0.049086201936006546, 0.017137423157691956, -0.009634051471948624, 0.18931730091571808, 0.0632639154791832, -0.0741288959980011, -0.02994288131594658, 0.038196079432964325, -0.1218792274594307, -0.06444338709115982, 0.018208330497145653, 0.05071447789669037, -0.12751878798007965, 0.01711471937596798, 0.000004563122274703346, -0.13501720130443573, -0.008872900158166885, 0.0279160737991333, 0.15771305561065674, -0.07984519749879837, 0.14155679941177368, -0.2585417330265045, -0.0074670989997684956, 0.034331005066633224, -0.1787116974592209, 0.147378072142601, 0.17852377891540527, 0.08823200315237045, 0.061663705855607986, 0.01472616195678711, 0.038828086107969284, -0.08140236139297485, -0.020512567833065987, -0.0020653223618865013, -0.165974423289299, 0.05153368413448334, -0.09610754251480103, -0.08214662969112396, -0.16793303191661835, -0.11856458336114883, -0.06422291696071625, -0.02715601958334446, -0.12212353199720383, -0.17255917191505432, 0.05623370036482811, -0.03440433740615845, -0.022527171298861504, -0.16398885846138, 0.05966690927743912, -0.022392485290765762, -0.15798035264015198, 0.03330889716744423, -0.03461802750825882, 0.08196640759706497, 0.11689038574695587, -0.198099285364151, 0.017624525353312492, 0.0038144683931022882, 0.024517018347978592, 0.2836887836456299, 0.0696432963013649, 0.043994154781103134, 0.06588864326477051, -0.17239709198474884, -0.1803327202796936, 0.32263320684432983, -0.030482633039355278, 0.07650716602802277, 0.03549713268876076, 0.008032168261706829, 0.1544596254825592, -0.1981526017189026, -0.03565309941768646, 0.06274481117725372, -0.17036443948745728, -0.05556637793779373, -0.13328659534454346, -0.22892102599143982, -0.005802393890917301, -0.16196823120117188, -0.17737989127635956, 0.11024490743875504, -0.029060503467917442, 0.04619012027978897, -0.09762682020664215, 0.1303700953722, 0.06313660740852356, 0.14194534718990326, -0.05323405563831329, -0.1329282969236374, 0.009667744860053062, -0.05068215727806091, 0.019162693992257118, 0.016544543206691742, 0.03972272202372551, 0.12625296413898468, 0.07024219632148743, 0.03074813447892666, -0.0831787958741188, 0.1302594095468521, 0.15906445682048798, 0.23971997201442719, -0.11222469061613083, -0.11990760266780853, 0.09253279864788055, 0.060852766036987305, -0.10867331176996231, -0.06017342954874039, -0.09534111618995667, 0.1445859670639038, 0.040214356034994125, -0.005124897696077824, -0.047045834362506866, -0.0029513004701584578, 0.11281043291091919, -0.07674451917409897, -0.04891156032681465, 0.029811589047312737, 0.30878084897994995, 0.032259225845336914, 0.07281672954559326, 0.0654066801071167, 0.03802809864282608, 0.08400774747133255, -0.007174186874181032, 0.04455873742699623, 0.10215351730585098, -0.1523238569498062, -0.05084537714719772, -0.1459238976240158, -0.15852609276771545, 0.026678558439016342, 0.08807063102722168, -0.07158003002405167, -0.12525735795497894, -0.0673682689666748, -0.12778453528881073, -0.07994359731674194, 0.05062135308980942, -0.12078340351581573, 0.12063323706388474, 0.008937126025557518, -0.13389840722084045, -0.08019407093524933, -0.06633492559194565, -0.14180830121040344, -0.02992386370897293, -0.060224272310733795, -0.007532227784395218, 0.012959497980773449, 0.3549429178237915, 0.15173344314098358, -0.011646519415080547, -0.003319391282275319, -0.409732848405838, 0.1046164259314537, -0.06673440337181091, -0.027644408866763115, -0.08667780458927155, -0.13992799818515778, -0.1668759137392044, 0.018860232084989548, -0.030350038781762123, -0.16458715498447418, 0.029399733990430832, -0.0159840639680624, 0.11227141320705414, 0.2867169678211212, -0.1143328845500946, -0.028455985710024834, 0.10879004001617432, 0.023606743663549423, -0.05296391621232033, -0.29081735014915466, 0.12474313378334045, -0.06820491701364517, -0.09341426938772202, -0.13996446132659912, -0.007617491763085127, -0.21111708879470825, 0.1976340264081955, -0.01758417673408985, -0.015813738107681274, 0.04325142875313759, 0.08934641629457474, -0.06465642154216766, -0.17814543843269348, 0.020932814106345177, -0.09921171516180038, -0.05420633777976036, -0.1186424121260643, 0.06781060993671417, -0.003680163761600852, 0.056098468601703644, -0.06100556626915932, -0.0008517175447195768, 0.09462513774633408, -0.12054439634084702, -0.11288329213857651, 0.21040329337120056, -0.05435318127274513, -0.03920415788888931, 0.01644986867904663, 0.13426975905895233, 0.10908378660678864, -0.0745161920785904, -0.0522114597260952, 0.07054757326841354, -0.027883978560566902, 0.19957253336906433, -0.06532824039459229, -0.02076053060591221, -0.05508904904127121, -0.1328691840171814, 0.050309110432863235, 0.13209347426891327, 0.04508136585354805, -0.11165676265954971, 0.2674405574798584, -0.018191155046224594, -0.1605496108531952, 0.1392439752817154, -0.1924825757741928, -0.0630473718047142, 0.1421038955450058, 0.35285359621047974, 0.1277361810207367, -0.05819281190633774, 0.1428755223751068, -0.12173425406217575, 0.09057582169771194, -0.007773710880428553, -0.22986501455307007, 0.0372314527630806, 0.03718319535255432, -0.13746505975723267, -0.012921927496790886, 0.040160734206438065, 0.08084411919116974, -0.06403131037950516, 0.09864676743745804, 0.009010269306600094, 0.0004590366443153471, 0.0778268575668335, 0.11354964226484299, -0.059456516057252884, -0.011539586819708347, -0.09797469526529312, 0.05851834639906883, 0.05181824043393135, 0.2176588922739029, 0.0029097222723066807, 0.10273917764425278, -0.021941151469945908, -0.18943490087985992, -0.2555864751338959, -0.0917079970240593, 0.22115568816661835, -0.14316965639591217, 0.13052619993686676, -0.1589064747095108, -0.042167313396930695, 0.0844542533159256, 0.07195162773132324, 0.009640666656196117, 0.12974199652671814, -0.07158076018095016, -0.1942618042230606, -0.4284619390964508, -0.07247108966112137, -0.04581749811768532, 0.029785405844449997, 0.02692761830985546, -0.06825286895036697, 0.08449480682611465, 0.06233760342001915, -0.03171020746231079, 0.16163408756256104, 0.0694800466299057, -0.09528257697820663, -0.11368773132562637, 0.22594350576400757, -0.07328666746616364, -0.07113689184188843, 0.11089495569467545, -0.03485601022839546, 0.018083354458212852, 0.07105214148759842, -0.1501730978488922, 0.08773790299892426, -0.2256516069173813, 0.0634668692946434, -0.058156561106443405, -0.00825522094964981, -0.1634872853755951, -0.004859026521444321, -0.011137723922729492, -0.23558871448040009, 0.058636099100112915, 0.06585389375686646, 0.09668448567390442, 0.07135282456874847, -0.006972616538405418, -0.15675906836986542, 0.06094907596707344, -0.08189442753791809, 0.015847697854042053, -0.09448318928480148, -0.055293936282396317, -0.19213491678237915, 0.08994552493095398, 0.16879943013191223, -0.2394174337387085, -0.1565338373184204, 0.05527348816394806, -0.06913432478904724, -0.048878978937864304, -0.10263841599225998, 0.07841641455888748, -0.051591433584690094, -0.11146628111600876, -0.23230333626270294, -0.1559617519378662, -0.023155564442276955, 0.0038122772239148617, 0.025075573474168777, 0.09863496571779251, -0.10255364328622818, -0.0815378800034523, 0.11803904175758362, -0.10650899261236191, -0.043608326464891434, -0.06841504573822021, 0.09492761641740799, -0.053706299513578415, 0.1703089475631714, -0.055945463478565216, -0.01678336225450039, -0.0931631550192833, 0.049067042768001556, -0.05284552276134491, 0.06044066697359085, 0.0694848895072937, -0.060190603137016296, -0.09052350372076035, -0.08390731364488602, 0.1683797538280487, -0.10668063908815384, 0.006689561530947685, -0.2843848764896393, 0.15770427882671356, 0.17339657247066498, -0.12164776027202606, 0.15071244537830353, 0.005533298011869192, -0.11233602464199066, 0.06601951271295547, -0.1394016146659851, -0.05990740656852722, -0.017040349543094635, 0.06686476618051529, -0.12086103856563568, -0.076073557138443, 0.1977391093969345, 0.23797933757305145, 0.2545028626918793, 0.015500077046453953, 0.04049641266465187, -0.147659569978714, -0.006717477459460497, 0.1405714601278305, -0.0659429281949997, -0.06504680216312408, -0.06183696165680885, 0.10894446074962616, -0.0002911737246904522, 0.33380234241485596, 0.1419966220855713, 0.129086434841156, 0.12050066143274307, 0.1568707525730133, -0.03979894891381264, -0.07903094589710236, -0.1236732006072998, 0.011088771745562553, 0.08223482221364975, 0.0164047684520483, -0.10660223662853241, 0.1035228744149208, 0.11891935765743256, 0.19016917049884796, 0.26083698868751526, 0.08152149617671967, 0.009391901083290577, -0.08157888054847717, 0.008730878122150898, -0.1047997772693634, 0.05141624063253403, -0.006233686115592718, -0.22230015695095062, -0.043694958090782166, -0.21886803209781647, -0.03898289054632187, 0.11002042889595032, 0.061540767550468445, 0.025208542123436928, -0.03949904069304466, -0.19155357778072357, 0.06244108825922012, 0.11229733377695084, -0.1705102175474167, -0.06919892877340317, 0.03916895017027855, -0.008135581389069557, 0.012471850961446762, 0.16118569672107697, 0.017924103885889053, 0.15195560455322266, -0.09469710290431976, -0.01841842569410801, 0.004106764215976, -0.06618261337280273, 0.1627359539270401, -0.11580013483762741, -0.06349577754735947, -0.07345011830329895, -0.190763458609581, 0.04644688591361046, 0.11895180493593216, -0.05129421129822731, -0.05755064636468887, -0.1017720177769661, 0.12714987993240356, -0.22485120594501495, 0.13677503168582916, -0.014044085517525673, 0.08354876935482025, 0.05582480877637863, -0.08715038001537323, 0.13018359243869781, 0.04419915750622749, 0.003187768626958132, 0.22019414603710175, -0.010946360416710377, -0.05810131877660751, -0.04767701402306557, 0.24225687980651855, -0.06570287048816681, 0.16645558178424835, -0.09298132359981537, -0.14282548427581787, 0.044339049607515335, -0.017597166821360588, -0.15019211173057556, 0.04884759709239006, 0.023044146597385406, -0.023127727210521698, 0.08564712852239609, -0.07496529817581177, -0.18544380366802216, 0.13629862666130066, 0.14026713371276855, -0.0852426066994667, 0.017319971695542336, -0.040720488876104355, -0.08640937507152557, 0.00466454541310668, -0.0965920090675354, -0.007125312462449074, -0.011065398342907429, 0.06474386900663376, -0.02729201875627041, 0.11317043006420135, -0.07982437312602997, -0.18089687824249268, 0.08947788923978806, 0.04431336000561714, -0.07405228912830353, -0.07434578239917755, 0.22934582829475403, 0.08955667912960052, -0.024245280772447586, 0.03793540969491005, -0.07993017882108688, 0.04319804534316063, 0.0410105362534523, -0.18846623599529266, -0.13554202020168304, 0.06253671646118164, 0.16252051293849945, -0.19636408984661102, 0.10914502292871475, 0.035172078758478165, -0.026283835992217064, -0.12109780311584473, -0.12947875261306763, 0.00993418414145708, 0.07813093066215515, 0.13877874612808228, 0.051983676850795746, 0.0800984650850296, 0.22697120904922485, -0.15786810219287872, -0.045302681624889374, -0.010890752077102661, 0.02975514717400074, -0.18437781929969788, -0.1182871013879776, 0.04081530496478081, 0.1398920863866806, -0.058670733124017715, -0.12341650575399399, -0.01707928627729416, -0.08915793895721436, -0.007091139443218708, 0.23705914616584778, 0.07424333691596985, 0.03222043067216873, -0.09817875921726227, -0.14233335852622986, 0.10688213258981705, -0.09222845733165741, -0.010960593819618225, 0.15251561999320984, -0.048004552721977234, 0.09599341452121735, -0.20428466796875, -0.17598509788513184, -0.09861370921134949, -0.16033445298671722, 0.14265690743923187, 0.17981338500976562, 0.17145094275474548, 0.00930227991193533, -0.13981637358665466, -2.64672162753956e-32, 0.02470771037042141, 0.017103517428040504, -0.07388482242822647, -0.02908565290272236, -0.14654982089996338, -0.11053268611431122, 0.07846774160861969, -0.04219893366098404, 0.1101735457777977, -0.09824616461992264, -0.18065699934959412, 0.03375564515590668, 0.03592723608016968, 0.026059601455926895, 0.022281711921095848, 0.11641272902488708, 0.12704642117023468, -0.07507540285587311, -0.163687065243721, 0.03125794976949692, 0.0403834730386734, 0.17363521456718445, 0.1962517350912094, -0.027277065441012383, -0.03705677017569542, 0.1642366200685501, -0.052298348397016525, -0.06890713423490524, 0.2183513641357422, -0.08000122755765915, 0.03717824071645737, 0.08103934675455093, -0.06911929696798325, -0.033422958105802536, -0.02941901795566082, 0.05435911566019058, -0.29394182562828064, -0.06121949478983879, 0.05321669578552246, 0.19173628091812134, 0.07323473691940308, -0.06588131934404373, 0.13618351519107819, -0.02955705299973488, -0.08824091404676437, 0.10703849047422409, -0.08673557639122009, 0.053386107087135315, -0.07229918241500854, 0.027831807732582092, 0.006807382218539715, -0.10867894440889359, 0.0020685235504060984, 0.1282956898212433, 0.07958924025297165, -0.18223418295383453, 0.02212664671242237, 0.04466330632567406, -0.1478002369403839, 0.0014460793463513255, -0.09135358780622482, -0.18468759953975677, 0.25063490867614746, 0.12266518175601959, -0.027324656024575233, 0.23341569304466248, 0.29376763105392456, 0.06402043998241425, -0.00385704031214118, -0.04750516638159752, -0.0013443633215501904, -0.11121875047683716, -0.012156764045357704, -0.14654448628425598, -0.03657939285039902, -0.06889665126800537, -0.06478071957826614, 0.1340772658586502, -0.05056381970643997, 0.0034682434052228928, 0.04922429099678993, 0.10966506600379944, 0.04465001821517944, -0.15964394807815552, -0.035571660846471786, -0.09452824294567108, 0.05195266380906105, 0.0430326983332634, -0.060246653854846954, 0.12558521330356598, 0.007054486311972141, 0.24111823737621307, -0.10970494896173477, -0.10260290652513504, -0.002285687020048499, 0.10878641158342361, 0.10792262107133865, -0.0273281242698431, -0.10290736705064774, -0.016012175008654594, 0.05007362365722656, -0.19331680238246918, 0.047955095767974854, -0.14427754282951355, 0.1663263440132141, 0.13458707928657532, 0.18922080099582672, -0.18166348338127136, -0.1998690813779831, 0.019192630425095558, 0.014588369987905025, 0.020355165004730225, 0.21300983428955078, 0.11357014626264572, 0.09792822599411011, -0.061307065188884735, -0.000688366184476763, -0.04555826261639595, 0.2461595982313156, 0.22814202308654785, 0.07446881383657455, -0.07331270724534988, 0.0677715390920639, -0.08709204196929932, -0.061938803642988205, 0.15640926361083984, 0.09662949293851852, 0.16125106811523438, -0.042196065187454224, -0.03806512802839279, -0.016167545691132545, -0.04254283756017685, 6.807474619563436e-7, 0.18704332411289215, 0.08757230639457703, 0.19390583038330078, 0.0313061848282814, -0.018372902646660805, 0.004549737554043531, -0.048344533890485764, 0.02067122608423233, -0.005900911521166563, 0.1516043245792389, -0.08062844723463058, -0.13460463285446167, -0.1280355453491211, 0.10360778868198395, 0.00008199734293157235, 0.053299430757761, 0.02598213404417038, 0.07818467170000076, -0.16142763197422028, 0.05885017290711403, 0.08351822942495346, 0.071990467607975, -0.16109904646873474, 0.05120539665222168, 0.09391426295042038, -0.16069406270980835, -0.10741758346557617, 0.06787420809268951, 0.06381325423717499, -0.11697705090045929, 0.2357887178659439, -0.19966143369674683, 0.17966817319393158, 0.15722429752349854, 0.022656433284282684, 0.11592437326908112, -0.09091044217348099, -0.0747382864356041, -0.08392628282308578, 0.08972632884979248, 0.014820248819887638, -0.08857014775276184, 0.027268588542938232, -0.3849962651729584, 0.051457878202199936, -0.017855647951364517, 0.07667628675699234, -0.02089625410735607, -0.11881596595048904, 0.11111228168010712, -0.01207112055271864, 0.10770190507173538, 0.011655556969344616, 0.2635911703109741, 0.174237459897995, 0.20496436953544617, -0.06658276915550232, -0.1724056452512741, 0.01291458960622549, -0.003327261656522751, -0.07189756631851196, -0.15880288183689117, 0.1267865002155304, 0.1938597708940506, -0.07464934140443802, -0.03061014413833618, 0.08363179117441177, -7.009087678841288e-35, 0.0002473725180607289, -0.0905517190694809, 0.10108780860900879, -0.020563190802931786, 0.050665054470300674, -0.16469082236289978, 0.13875509798526764, 0.1661689132452011, -0.001164653105661273, -0.16479294002056122, -0.012307487428188324 ]
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.07471069693565369, 0.1530224084854126, 0.1268158107995987, -0.03860095515847206, 0.26767316460609436, 0.03870323300361633, 0.1680801510810852, -0.008150273002684116, -0.2682686746120453, 0.09121543914079666, -0.08208093047142029, -0.0566389299929142, 0.046521756798028946, 0.04740181937813759, -0.05109318345785141, 0.07141494005918503, 0.10683324933052063, -0.014600260183215141, -0.15825994312763214, 0.0037393427919596434, -0.049086201936006546, 0.017137423157691956, -0.009634051471948624, 0.18931730091571808, 0.0632639154791832, -0.0741288959980011, -0.02994288131594658, 0.038196079432964325, -0.1218792274594307, -0.06444338709115982, 0.018208330497145653, 0.05071447789669037, -0.12751878798007965, 0.01711471937596798, 0.000004563122274703346, -0.13501720130443573, -0.008872900158166885, 0.0279160737991333, 0.15771305561065674, -0.07984519749879837, 0.14155679941177368, -0.2585417330265045, -0.0074670989997684956, 0.034331005066633224, -0.1787116974592209, 0.147378072142601, 0.17852377891540527, 0.08823200315237045, 0.061663705855607986, 0.01472616195678711, 0.038828086107969284, -0.08140236139297485, -0.020512567833065987, -0.0020653223618865013, -0.165974423289299, 0.05153368413448334, -0.09610754251480103, -0.08214662969112396, -0.16793303191661835, -0.11856458336114883, -0.06422291696071625, -0.02715601958334446, -0.12212353199720383, -0.17255917191505432, 0.05623370036482811, -0.03440433740615845, -0.022527171298861504, -0.16398885846138, 0.05966690927743912, -0.022392485290765762, -0.15798035264015198, 0.03330889716744423, -0.03461802750825882, 0.08196640759706497, 0.11689038574695587, -0.198099285364151, 0.017624525353312492, 0.0038144683931022882, 0.024517018347978592, 0.2836887836456299, 0.0696432963013649, 0.043994154781103134, 0.06588864326477051, -0.17239709198474884, -0.1803327202796936, 0.32263320684432983, -0.030482633039355278, 0.07650716602802277, 0.03549713268876076, 0.008032168261706829, 0.1544596254825592, -0.1981526017189026, -0.03565309941768646, 0.06274481117725372, -0.17036443948745728, -0.05556637793779373, -0.13328659534454346, -0.22892102599143982, -0.005802393890917301, -0.16196823120117188, -0.17737989127635956, 0.11024490743875504, -0.029060503467917442, 0.04619012027978897, -0.09762682020664215, 0.1303700953722, 0.06313660740852356, 0.14194534718990326, -0.05323405563831329, -0.1329282969236374, 0.009667744860053062, -0.05068215727806091, 0.019162693992257118, 0.016544543206691742, 0.03972272202372551, 0.12625296413898468, 0.07024219632148743, 0.03074813447892666, -0.0831787958741188, 0.1302594095468521, 0.15906445682048798, 0.23971997201442719, -0.11222469061613083, -0.11990760266780853, 0.09253279864788055, 0.060852766036987305, -0.10867331176996231, -0.06017342954874039, -0.09534111618995667, 0.1445859670639038, 0.040214356034994125, -0.005124897696077824, -0.047045834362506866, -0.0029513004701584578, 0.11281043291091919, -0.07674451917409897, -0.04891156032681465, 0.029811589047312737, 0.30878084897994995, 0.032259225845336914, 0.07281672954559326, 0.0654066801071167, 0.03802809864282608, 0.08400774747133255, -0.007174186874181032, 0.04455873742699623, 0.10215351730585098, -0.1523238569498062, -0.05084537714719772, -0.1459238976240158, -0.15852609276771545, 0.026678558439016342, 0.08807063102722168, -0.07158003002405167, -0.12525735795497894, -0.0673682689666748, -0.12778453528881073, -0.07994359731674194, 0.05062135308980942, -0.12078340351581573, 0.12063323706388474, 0.008937126025557518, -0.13389840722084045, -0.08019407093524933, -0.06633492559194565, -0.14180830121040344, -0.02992386370897293, -0.060224272310733795, -0.007532227784395218, 0.012959497980773449, 0.3549429178237915, 0.15173344314098358, -0.011646519415080547, -0.003319391282275319, -0.409732848405838, 0.1046164259314537, -0.06673440337181091, -0.027644408866763115, -0.08667780458927155, -0.13992799818515778, -0.1668759137392044, 0.018860232084989548, -0.030350038781762123, -0.16458715498447418, 0.029399733990430832, -0.0159840639680624, 0.11227141320705414, 0.2867169678211212, -0.1143328845500946, -0.028455985710024834, 0.10879004001617432, 0.023606743663549423, -0.05296391621232033, -0.29081735014915466, 0.12474313378334045, -0.06820491701364517, -0.09341426938772202, -0.13996446132659912, -0.007617491763085127, -0.21111708879470825, 0.1976340264081955, -0.01758417673408985, -0.015813738107681274, 0.04325142875313759, 0.08934641629457474, -0.06465642154216766, -0.17814543843269348, 0.020932814106345177, -0.09921171516180038, -0.05420633777976036, -0.1186424121260643, 0.06781060993671417, -0.003680163761600852, 0.056098468601703644, -0.06100556626915932, -0.0008517175447195768, 0.09462513774633408, -0.12054439634084702, -0.11288329213857651, 0.21040329337120056, -0.05435318127274513, -0.03920415788888931, 0.01644986867904663, 0.13426975905895233, 0.10908378660678864, -0.0745161920785904, -0.0522114597260952, 0.07054757326841354, -0.027883978560566902, 0.19957253336906433, -0.06532824039459229, -0.02076053060591221, -0.05508904904127121, -0.1328691840171814, 0.050309110432863235, 0.13209347426891327, 0.04508136585354805, -0.11165676265954971, 0.2674405574798584, -0.018191155046224594, -0.1605496108531952, 0.1392439752817154, -0.1924825757741928, -0.0630473718047142, 0.1421038955450058, 0.35285359621047974, 0.1277361810207367, -0.05819281190633774, 0.1428755223751068, -0.12173425406217575, 0.09057582169771194, -0.007773710880428553, -0.22986501455307007, 0.0372314527630806, 0.03718319535255432, -0.13746505975723267, -0.012921927496790886, 0.040160734206438065, 0.08084411919116974, -0.06403131037950516, 0.09864676743745804, 0.009010269306600094, 0.0004590366443153471, 0.0778268575668335, 0.11354964226484299, -0.059456516057252884, -0.011539586819708347, -0.09797469526529312, 0.05851834639906883, 0.05181824043393135, 0.2176588922739029, 0.0029097222723066807, 0.10273917764425278, -0.021941151469945908, -0.18943490087985992, -0.2555864751338959, -0.0917079970240593, 0.22115568816661835, -0.14316965639591217, 0.13052619993686676, -0.1589064747095108, -0.042167313396930695, 0.0844542533159256, 0.07195162773132324, 0.009640666656196117, 0.12974199652671814, -0.07158076018095016, -0.1942618042230606, -0.4284619390964508, -0.07247108966112137, -0.04581749811768532, 0.029785405844449997, 0.02692761830985546, -0.06825286895036697, 0.08449480682611465, 0.06233760342001915, -0.03171020746231079, 0.16163408756256104, 0.0694800466299057, -0.09528257697820663, -0.11368773132562637, 0.22594350576400757, -0.07328666746616364, -0.07113689184188843, 0.11089495569467545, -0.03485601022839546, 0.018083354458212852, 0.07105214148759842, -0.1501730978488922, 0.08773790299892426, -0.2256516069173813, 0.0634668692946434, -0.058156561106443405, -0.00825522094964981, -0.1634872853755951, -0.004859026521444321, -0.011137723922729492, -0.23558871448040009, 0.058636099100112915, 0.06585389375686646, 0.09668448567390442, 0.07135282456874847, -0.006972616538405418, -0.15675906836986542, 0.06094907596707344, -0.08189442753791809, 0.015847697854042053, -0.09448318928480148, -0.055293936282396317, -0.19213491678237915, 0.08994552493095398, 0.16879943013191223, -0.2394174337387085, -0.1565338373184204, 0.05527348816394806, -0.06913432478904724, -0.048878978937864304, -0.10263841599225998, 0.07841641455888748, -0.051591433584690094, -0.11146628111600876, -0.23230333626270294, -0.1559617519378662, -0.023155564442276955, 0.0038122772239148617, 0.025075573474168777, 0.09863496571779251, -0.10255364328622818, -0.0815378800034523, 0.11803904175758362, -0.10650899261236191, -0.043608326464891434, -0.06841504573822021, 0.09492761641740799, -0.053706299513578415, 0.1703089475631714, -0.055945463478565216, -0.01678336225450039, -0.0931631550192833, 0.049067042768001556, -0.05284552276134491, 0.06044066697359085, 0.0694848895072937, -0.060190603137016296, -0.09052350372076035, -0.08390731364488602, 0.1683797538280487, -0.10668063908815384, 0.006689561530947685, -0.2843848764896393, 0.15770427882671356, 0.17339657247066498, -0.12164776027202606, 0.15071244537830353, 0.005533298011869192, -0.11233602464199066, 0.06601951271295547, -0.1394016146659851, -0.05990740656852722, -0.017040349543094635, 0.06686476618051529, -0.12086103856563568, -0.076073557138443, 0.1977391093969345, 0.23797933757305145, 0.2545028626918793, 0.015500077046453953, 0.04049641266465187, -0.147659569978714, -0.006717477459460497, 0.1405714601278305, -0.0659429281949997, -0.06504680216312408, -0.06183696165680885, 0.10894446074962616, -0.0002911737246904522, 0.33380234241485596, 0.1419966220855713, 0.129086434841156, 0.12050066143274307, 0.1568707525730133, -0.03979894891381264, -0.07903094589710236, -0.1236732006072998, 0.011088771745562553, 0.08223482221364975, 0.0164047684520483, -0.10660223662853241, 0.1035228744149208, 0.11891935765743256, 0.19016917049884796, 0.26083698868751526, 0.08152149617671967, 0.009391901083290577, -0.08157888054847717, 0.008730878122150898, -0.1047997772693634, 0.05141624063253403, -0.006233686115592718, -0.22230015695095062, -0.043694958090782166, -0.21886803209781647, -0.03898289054632187, 0.11002042889595032, 0.061540767550468445, 0.025208542123436928, -0.03949904069304466, -0.19155357778072357, 0.06244108825922012, 0.11229733377695084, -0.1705102175474167, -0.06919892877340317, 0.03916895017027855, -0.008135581389069557, 0.012471850961446762, 0.16118569672107697, 0.017924103885889053, 0.15195560455322266, -0.09469710290431976, -0.01841842569410801, 0.004106764215976, -0.06618261337280273, 0.1627359539270401, -0.11580013483762741, -0.06349577754735947, -0.07345011830329895, -0.190763458609581, 0.04644688591361046, 0.11895180493593216, -0.05129421129822731, -0.05755064636468887, -0.1017720177769661, 0.12714987993240356, -0.22485120594501495, 0.13677503168582916, -0.014044085517525673, 0.08354876935482025, 0.05582480877637863, -0.08715038001537323, 0.13018359243869781, 0.04419915750622749, 0.003187768626958132, 0.22019414603710175, -0.010946360416710377, -0.05810131877660751, -0.04767701402306557, 0.24225687980651855, -0.06570287048816681, 0.16645558178424835, -0.09298132359981537, -0.14282548427581787, 0.044339049607515335, -0.017597166821360588, -0.15019211173057556, 0.04884759709239006, 0.023044146597385406, -0.023127727210521698, 0.08564712852239609, -0.07496529817581177, -0.18544380366802216, 0.13629862666130066, 0.14026713371276855, -0.0852426066994667, 0.017319971695542336, -0.040720488876104355, -0.08640937507152557, 0.00466454541310668, -0.0965920090675354, -0.007125312462449074, -0.011065398342907429, 0.06474386900663376, -0.02729201875627041, 0.11317043006420135, -0.07982437312602997, -0.18089687824249268, 0.08947788923978806, 0.04431336000561714, -0.07405228912830353, -0.07434578239917755, 0.22934582829475403, 0.08955667912960052, -0.024245280772447586, 0.03793540969491005, -0.07993017882108688, 0.04319804534316063, 0.0410105362534523, -0.18846623599529266, -0.13554202020168304, 0.06253671646118164, 0.16252051293849945, -0.19636408984661102, 0.10914502292871475, 0.035172078758478165, -0.026283835992217064, -0.12109780311584473, -0.12947875261306763, 0.00993418414145708, 0.07813093066215515, 0.13877874612808228, 0.051983676850795746, 0.0800984650850296, 0.22697120904922485, -0.15786810219287872, -0.045302681624889374, -0.010890752077102661, 0.02975514717400074, -0.18437781929969788, -0.1182871013879776, 0.04081530496478081, 0.1398920863866806, -0.058670733124017715, -0.12341650575399399, -0.01707928627729416, -0.08915793895721436, -0.007091139443218708, 0.23705914616584778, 0.07424333691596985, 0.03222043067216873, -0.09817875921726227, -0.14233335852622986, 0.10688213258981705, -0.09222845733165741, -0.010960593819618225, 0.15251561999320984, -0.048004552721977234, 0.09599341452121735, -0.20428466796875, -0.17598509788513184, -0.09861370921134949, -0.16033445298671722, 0.14265690743923187, 0.17981338500976562, 0.17145094275474548, 0.00930227991193533, -0.13981637358665466, -2.64672162753956e-32, 0.02470771037042141, 0.017103517428040504, -0.07388482242822647, -0.02908565290272236, -0.14654982089996338, -0.11053268611431122, 0.07846774160861969, -0.04219893366098404, 0.1101735457777977, -0.09824616461992264, -0.18065699934959412, 0.03375564515590668, 0.03592723608016968, 0.026059601455926895, 0.022281711921095848, 0.11641272902488708, 0.12704642117023468, -0.07507540285587311, -0.163687065243721, 0.03125794976949692, 0.0403834730386734, 0.17363521456718445, 0.1962517350912094, -0.027277065441012383, -0.03705677017569542, 0.1642366200685501, -0.052298348397016525, -0.06890713423490524, 0.2183513641357422, -0.08000122755765915, 0.03717824071645737, 0.08103934675455093, -0.06911929696798325, -0.033422958105802536, -0.02941901795566082, 0.05435911566019058, -0.29394182562828064, -0.06121949478983879, 0.05321669578552246, 0.19173628091812134, 0.07323473691940308, -0.06588131934404373, 0.13618351519107819, -0.02955705299973488, -0.08824091404676437, 0.10703849047422409, -0.08673557639122009, 0.053386107087135315, -0.07229918241500854, 0.027831807732582092, 0.006807382218539715, -0.10867894440889359, 0.0020685235504060984, 0.1282956898212433, 0.07958924025297165, -0.18223418295383453, 0.02212664671242237, 0.04466330632567406, -0.1478002369403839, 0.0014460793463513255, -0.09135358780622482, -0.18468759953975677, 0.25063490867614746, 0.12266518175601959, -0.027324656024575233, 0.23341569304466248, 0.29376763105392456, 0.06402043998241425, -0.00385704031214118, -0.04750516638159752, -0.0013443633215501904, -0.11121875047683716, -0.012156764045357704, -0.14654448628425598, -0.03657939285039902, -0.06889665126800537, -0.06478071957826614, 0.1340772658586502, -0.05056381970643997, 0.0034682434052228928, 0.04922429099678993, 0.10966506600379944, 0.04465001821517944, -0.15964394807815552, -0.035571660846471786, -0.09452824294567108, 0.05195266380906105, 0.0430326983332634, -0.060246653854846954, 0.12558521330356598, 0.007054486311972141, 0.24111823737621307, -0.10970494896173477, -0.10260290652513504, -0.002285687020048499, 0.10878641158342361, 0.10792262107133865, -0.0273281242698431, -0.10290736705064774, -0.016012175008654594, 0.05007362365722656, -0.19331680238246918, 0.047955095767974854, -0.14427754282951355, 0.1663263440132141, 0.13458707928657532, 0.18922080099582672, -0.18166348338127136, -0.1998690813779831, 0.019192630425095558, 0.014588369987905025, 0.020355165004730225, 0.21300983428955078, 0.11357014626264572, 0.09792822599411011, -0.061307065188884735, -0.000688366184476763, -0.04555826261639595, 0.2461595982313156, 0.22814202308654785, 0.07446881383657455, -0.07331270724534988, 0.0677715390920639, -0.08709204196929932, -0.061938803642988205, 0.15640926361083984, 0.09662949293851852, 0.16125106811523438, -0.042196065187454224, -0.03806512802839279, -0.016167545691132545, -0.04254283756017685, 6.807474619563436e-7, 0.18704332411289215, 0.08757230639457703, 0.19390583038330078, 0.0313061848282814, -0.018372902646660805, 0.004549737554043531, -0.048344533890485764, 0.02067122608423233, -0.005900911521166563, 0.1516043245792389, -0.08062844723463058, -0.13460463285446167, -0.1280355453491211, 0.10360778868198395, 0.00008199734293157235, 0.053299430757761, 0.02598213404417038, 0.07818467170000076, -0.16142763197422028, 0.05885017290711403, 0.08351822942495346, 0.071990467607975, -0.16109904646873474, 0.05120539665222168, 0.09391426295042038, -0.16069406270980835, -0.10741758346557617, 0.06787420809268951, 0.06381325423717499, -0.11697705090045929, 0.2357887178659439, -0.19966143369674683, 0.17966817319393158, 0.15722429752349854, 0.022656433284282684, 0.11592437326908112, -0.09091044217348099, -0.0747382864356041, -0.08392628282308578, 0.08972632884979248, 0.014820248819887638, -0.08857014775276184, 0.027268588542938232, -0.3849962651729584, 0.051457878202199936, -0.017855647951364517, 0.07667628675699234, -0.02089625410735607, -0.11881596595048904, 0.11111228168010712, -0.01207112055271864, 0.10770190507173538, 0.011655556969344616, 0.2635911703109741, 0.174237459897995, 0.20496436953544617, -0.06658276915550232, -0.1724056452512741, 0.01291458960622549, -0.003327261656522751, -0.07189756631851196, -0.15880288183689117, 0.1267865002155304, 0.1938597708940506, -0.07464934140443802, -0.03061014413833618, 0.08363179117441177, -7.009087678841288e-35, 0.0002473725180607289, -0.0905517190694809, 0.10108780860900879, -0.020563190802931786, 0.050665054470300674, -0.16469082236289978, 0.13875509798526764, 0.1661689132452011, -0.001164653105661273, -0.16479294002056122, -0.012307487428188324 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
I'm currently adding it, the entire dataset is quite big around 30 GB so I add splits separately. You can take a look here https://huggingface.co/datasets/merve/coco
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
25
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). I'm currently adding it, the entire dataset is quite big around 30 GB so I add splits separately. You can take a look here https://huggingface.co/datasets/merve/coco
[ 0.13527792692184448, -0.018546681851148605, -0.008378577418625355, 0.11844579875469208, 0.1983574777841568, 0.0485551543533802, 0.034271467477083206, -0.07420387864112854, -0.07226762175559998, 0.18500801920890808, -0.08080825209617615, 0.007208665832877159, -0.0943077802658081, 0.20316123962402344, 0.001267589395865798, -0.11790041625499725, -0.08834857493638992, 0.0016441739862784743, -0.12184960395097733, -0.09825371950864792, -0.034483954310417175, 0.0129195936024189, 0.25132131576538086, -0.06468386948108673, -0.12565600872039795, -0.2162872850894928, -0.22589151561260223, 0.1598089188337326, -0.03705503046512604, -0.2153913676738739, 0.1267315000295639, -0.005346648395061493, 0.09449034184217453, 0.07487519085407257, 0.000005631206477119122, -0.0721447542309761, 0.010056346654891968, -0.030100608244538307, 0.008406594395637512, -0.11712824553251266, 0.057130731642246246, -0.013824117369949818, 0.025162700563669205, -0.04627041891217232, -0.0267124492675066, 0.12991733849048615, 0.005954653490334749, -0.02371981553733349, 0.17114560306072235, 0.14088742434978485, 0.02196364849805832, 0.09772128611803055, 0.006928403861820698, -0.11396454274654388, 0.06203699856996536, 0.0646388903260231, 0.008055458776652813, 0.26631906628608704, -0.028206737712025642, 0.07967229932546616, -0.0005257584853097796, 0.056051913648843765, 0.2045137733221054, -0.027616973966360092, 0.16318292915821075, 0.10355845838785172, -0.24029092490673065, -0.21931082010269165, 0.015084758400917053, 0.12065992504358292, 0.09671029448509216, 0.0410308800637722, -0.08374975621700287, 0.06404544413089752, 0.021121397614479065, -0.05601028352975845, -0.14922155439853668, -0.027551278471946716, 0.023595675826072693, 0.027572225779294968, -0.09515330195426941, -0.19007693231105804, -0.05619366466999054, -0.0013841165928170085, 0.08091766387224197, -0.020703155547380447, -0.10945919901132584, 0.012449213303625584, -0.01741500198841095, -0.01362814661115408, 0.04895647615194321, -0.07197364419698715, -0.15437725186347961, 0.015666846185922623, 0.08904946595430374, -0.06916258484125137, 0.01950201578438282, 0.101722352206707, -0.030659876763820648, -0.011103549040853977, -0.08458918333053589, -0.16712789237499237, -0.17700770497322083, 0.13050366938114166, -0.18602082133293152, 0.048364486545324326, -0.09980485588312149, 0.015817418694496155, 0.03321480751037598, 0.11424335092306137, -0.05869712680578232, 0.008818166330456734, -0.07986359298229218, 0.06971430033445358, -0.08035148680210114, 0.058545928448438644, -0.10231845080852509, 0.04132489114999771, 0.06502023339271545, -0.04068569466471672, 0.3211577832698822, 0.0770636722445488, 0.044202931225299835, 0.20650100708007812, 0.09024950116872787, -0.1077800765633583, -0.04288456588983536, 0.21635296940803528, 0.05647656321525574, -0.07901771366596222, -0.15361468493938446, 0.03370411694049835, 0.16045702993869781, -0.05177384987473488, 0.1790783554315567, -0.09693194180727005, -0.045127950608730316, -0.25533583760261536, 0.016358518972992897, -0.10236167907714844, -0.16308936476707458, -0.09007439762353897, -0.12756238877773285, 0.029220610857009888, -0.10775384306907654, -0.05396197363734245, 0.11417256295681, 0.13089652359485626, -0.08353633433580399, -0.027741145342588425, 0.05199256166815758, 0.06083904951810837, -0.22980934381484985, 0.03010253608226776, -0.014682428911328316, 0.03435315936803818, -0.1279507577419281, 0.11380543559789658, -0.19755251705646515, 0.12448662519454956, 0.08229321986436844, 0.08293788135051727, 0.011218080297112465, -0.013069632463157177, 0.008352193050086498, 0.17736902832984924, -0.01715468429028988, 0.01500245276838541, -0.08735178411006927, -0.1104581281542778, -0.013078930787742138, -0.22614891827106476, 0.008459559641778469, 0.03520522639155388, 0.035920679569244385, 0.021123331040143967, -0.11391154676675797, -0.10384032875299454, -0.16075552999973297, -0.02029012143611908, -0.03426601365208626, -0.17021140456199646, -0.014379899017512798, 0.0598529614508152, -0.027684355154633522, 0.08847612887620926, -0.18751950562000275, 0.16812102496623993, -0.14304284751415253, -0.07748211175203323, -0.10744023323059082, -0.006815846543759108, 0.07013848423957825, 0.02297040820121765, 0.02459563873708248, 0.0019019644241780043, 0.14554429054260254, -0.16224586963653564, -0.04013454541563988, -0.33357444405555725, -0.04743625596165657, -0.09139502048492432, 0.16250087320804596, -0.022124404087662697, -0.04653136804699898, -0.020254574716091156, -0.20030894875526428, 0.18147915601730347, 0.22420482337474823, -0.05759703740477562, -0.08630237728357315, -0.05847258120775223, -0.10899718850851059, -0.12341419607400894, -0.08917836844921112, -0.012119825929403305, -0.1115136370062828, -0.03793415054678917, 0.12934015691280365, 0.15801836550235748, -0.02186685986816883, 0.16677218675613403, 0.0926576554775238, 0.09799279272556305, 0.08762631565332413, 0.07382546365261078, 0.0026020053774118423, -0.0178567823022604, 0.276010125875473, -0.010464130900800228, -0.09404290467500687, -0.09858378767967224, 0.15069782733917236, 0.10332760959863663, -0.23275132477283478, 0.11611885577440262, 0.06339464336633682, -0.12368603050708771, 0.20820015668869019, -0.16477522253990173, 0.008332856930792332, -0.046996936202049255, -0.07844187319278717, -0.03499740734696388, -0.044155921787023544, 0.07274159789085388, -0.13142789900302887, -0.018084798008203506, 0.08753012120723724, -0.02834499627351761, 0.29087725281715393, 0.1864197701215744, 0.054435454308986664, -0.04856303706765175, -0.004334406927227974, -0.0726676732301712, 0.10110926628112793, 0.014962445013225079, -0.05636226758360863, -0.022267334163188934, -0.08190211653709412, -0.09140988439321518, -0.018757745623588562, 0.02966129779815674, 0.26674923300743103, -0.00940264854580164, 0.09776676446199417, -0.13604526221752167, 0.020344357937574387, 0.15598924458026886, -0.09599187970161438, -0.15909983217716217, -0.01471085287630558, -0.1565011888742447, -0.015355830080807209, -0.12762367725372314, 0.17090409994125366, -0.0705370232462883, 0.06441916525363922, -0.08838789165019989, -0.23383203148841858, -0.010483071208000183, 0.0558491125702858, -0.007827582769095898, 0.14572025835514069, 0.030645104125142097, -0.10237544775009155, -0.16379104554653168, 0.024805450811982155, -0.1189396008849144, 0.08780861645936966, -0.07658441364765167, 0.04429343342781067, -0.21495208144187927, -0.07775476574897766, -0.03668930381536484, -0.01901107095181942, 0.10449095815420151, -0.09319287538528442, 0.09075620770454407, -0.11540263891220093, 0.11680779606103897, 0.06457623094320297, 0.025642776861786842, 0.12318181246519089, -0.03693816065788269, 0.07045308500528336, 0.04385712742805481, -0.06083923205733299, 0.11578117311000824, -0.05053526535630226, -0.0645502582192421, 0.004831685218960047, -0.08002802729606628, -0.06001947820186615, -0.11725690215826035, 0.02702963538467884, -0.19379636645317078, -0.05670647695660591, 0.06357620656490326, 0.012775132432579994, -0.03348829224705696, -0.021564871072769165, -0.08379963785409927, -0.14949671924114227, 0.02023543231189251, -0.21104854345321655, -0.15891370177268982, 0.2273944616317749, 0.04898935928940773, -0.09237426519393921, 0.04148098826408386, 0.04633941873908043, -0.1023685485124588, 0.11588674038648605, -0.04395605996251106, -0.024076638743281364, -0.10804704576730728, 0.1313340812921524, 0.03605778515338898, 0.04581344127655029, -0.013566175475716591, -0.1383369415998459, -0.008817602880299091, -0.100088931620121, -0.20451141893863678, 0.038864865899086, -0.1906747668981552, 0.031085943803191185, 0.13397757709026337, 0.018082832917571068, 0.14763446152210236, -0.0030332806054502726, 0.02582317776978016, -0.013987068086862564, 0.07304365187883377, -0.09761536866426468, 0.23102952539920807, -0.11897190660238266, -0.09434022754430771, 0.2154892385005951, 0.20869427919387817, 0.07664507627487183, -0.02325572445988655, -0.16450108587741852, 0.17075690627098083, 0.04068472236394882, 0.14019829034805298, -0.018710212782025337, -0.16577129065990448, 0.23262625932693481, -0.05862165242433548, -0.10816843807697296, 0.07355222851037979, 0.09471387416124344, -0.09186232835054398, -0.12299506366252899, -0.005637850146740675, 0.08300132304430008, 0.03247395530343056, -0.10306835919618607, 0.03205556422472, -0.09374651312828064, 0.034586261957883835, -0.04598570987582207, -0.060536447912454605, -0.08058659732341766, 0.0643758475780487, -0.013844789937138557, 0.11769502609968185, -0.07482152432203293, -0.03288235515356064, -0.046261016279459, -0.21385763585567474, -0.06381707638502121, -0.06879720836877823, -0.04862303286790848, 0.09729812294244766, -0.0018934098770841956, -0.018905507400631905, 0.09822003543376923, 0.04684332758188248, 0.0414532907307148, 0.011422275565564632, -0.009905906394124031, -0.004727765452116728, 0.006380515173077583, 0.08688849210739136, 0.050368454307317734, 0.01964491978287697, 0.11931508034467697, 0.17237752676010132, -0.061634182929992676, 0.09083561599254608, 0.024219073355197906, -0.03805423155426979, -0.05558331683278084, 0.07096053659915924, 0.10509755462408066, -0.0895424410700798, -0.18325506150722504, 0.11286772787570953, 0.020513590425252914, 0.12863996624946594, 0.20387190580368042, -0.048778846859931946, 0.0912003368139267, -0.07102250307798386, 0.189491868019104, 0.08430460095405579, -0.010193501599133015, 0.3017931282520294, -0.047202132642269135, 0.01843404211103916, 0.12676960229873657, -0.013216609135270119, 0.3305390477180481, -0.22648005187511444, -0.13310506939888, -0.19751876592636108, -0.004536093212664127, 0.023487580940127373, 0.14074410498142242, 0.13044136762619019, -0.07724250853061676, 0.02311713993549347, -0.004039750434458256, -0.05928201973438263, 0.11528587341308594, 0.0010480035562068224, -0.1258378028869629, -0.15412954986095428, -0.07909989356994629, 0.004983017686754465, -0.02204165607690811, -0.01462477259337902, 0.10477349162101746, -0.019889429211616516, 0.061487890779972076, -0.06337592750787735, -0.025428855791687965, -0.048986904323101044, -0.11249925196170807, -0.017276683822274208, -0.05433374270796776, 0.045472268015146255, 0.37837839126586914, -0.15010787546634674, -0.10313288122415543, -0.05138816311955452, -0.01599009893834591, 0.06214753910899162, -0.021205047145485878, -0.030254287645220757, 0.19095925986766815, -0.07012388110160828, 0.040654320269823074, -0.006804004777222872, 0.09786231070756912, 0.03999131917953491, 0.17866250872612, 0.14991727471351624, -0.05906330421566963, 0.035495221614837646, -0.015585140325129032, 0.29123765230178833, -0.04275690019130707, -0.04692878946661949, -0.046300631016492844, -0.09397198259830475, -0.047782495617866516, 0.009380628354847431, -0.05032049119472504, -0.0627874881029129, 0.07258184999227524, -0.06026117876172066, 0.019934970885515213, 0.013257350772619247, 0.13888134062290192, 0.22502051293849945, -0.047197140753269196, -0.10768630355596542, 0.09230083227157593, -0.03787371888756752, -0.12279581278562546, -0.22557958960533142, 0.019407132640480995, 0.10591212660074234, 0.04137269780039787, 0.030276045203208923, 0.05227702856063843, 0.2008267194032669, -0.06979683041572571, 0.016994670033454895, -0.10400905460119247, 0.03635258227586746, -0.07357207685709, -0.02198580466210842, 0.18447300791740417, 0.002044919179752469, -0.008936780504882336, -0.052138861268758774, 0.07123667001724243, -0.1046345978975296, -0.16154178977012634, 0.17507781088352203, 0.05528852343559265, -0.048864614218473434, -0.04957053065299988, 0.004331325646489859, 0.014376780018210411, -0.004161791410297155, 0.1117667555809021, -0.0654858946800232, -0.07134285569190979, 0.09758064895868301, 0.1336418241262436, -0.19120046496391296, 0.010083561763167381, -0.016493847593665123, -0.009863189421594143, -0.20566082000732422, 0.013178047724068165, 0.11912929266691208, 0.19084694981575012, 0.217259481549263, 0.03449990600347519, -0.1960471123456955, -0.031602710485458374, -0.23371748626232147, -0.01802896335721016, 0.12352196872234344, 0.1712798774242401, -0.09337756037712097, 0.04325646534562111, -2.6384637797250335e-32, 0.001085910014808178, -0.05933058261871338, -0.0429738312959671, 0.01801423355937004, -0.04281068593263626, 0.0896373763680458, -0.02408033236861229, -0.08285588771104813, 0.043269041925668716, -0.04816383868455887, 0.0484476275742054, 0.08573465794324875, 0.11015243083238602, 0.1774258315563202, -0.05916992947459221, 0.01001712866127491, 0.03525650128722191, 0.07127608358860016, 0.004304456990212202, 0.061149511486291885, 0.019223026931285858, -0.09385174512863159, -0.05294548720121384, -0.0344664491713047, -0.08225065469741821, 0.04015299305319786, -0.07632143795490265, -0.017314866185188293, 0.04293610900640488, 0.26107344031333923, -0.0781749039888382, 0.027352575212717056, -0.04371066018939018, 0.1483774334192276, 0.050005391240119934, -0.012500481680035591, -0.09515228867530823, 0.043294377624988556, -0.19645465910434723, 0.15473105013370514, 0.10752572119235992, 0.007933267392218113, -0.09797060489654541, -0.07257859408855438, 0.19252830743789673, 0.062422607094049454, 0.07018346339464188, 0.000741571479011327, -0.09080443531274796, 0.04602615162730217, 0.006788379978388548, 0.06758318096399307, 0.07186011970043182, -0.08301836997270584, 0.12254374474287033, -0.06616319715976715, 0.040347855538129807, -0.00316571700386703, 0.10047932714223862, 0.07828062027692795, -0.07880079001188278, -0.05125134810805321, -0.08624839037656784, 0.0686267614364624, -0.0022184329573065042, 0.0523262582719326, -0.03318347781896591, -0.1549321562051773, 0.048257894814014435, -0.10715534538030624, 0.100227952003479, 0.21575598418712616, 0.07070787250995636, -0.0017322824569419026, -0.16840320825576782, 0.06360076367855072, -0.010899529792368412, -0.03373131901025772, 0.0038369777612388134, -0.08177987486124039, -0.05738561600446701, -0.12002430856227875, 0.026301758363842964, 0.09965509921312332, 0.12777946889400482, 0.09469469636678696, -0.09610283374786377, 0.013099201954901218, 0.015387555584311485, -0.010316463187336922, -0.17685526609420776, -0.07882104814052582, 0.09508846700191498, -0.08180063217878342, 0.04571953043341637, -0.07739584892988205, 0.03720584511756897, 0.23913542926311493, 0.05958704650402069, 0.01460329070687294, 0.005345531273633242, -0.06311430782079697, 0.21018719673156738, -0.026332881301641464, 0.07043591141700745, -0.1127670630812645, 0.23660540580749512, 0.24856534600257874, -0.20063745975494385, -0.05224183201789856, -0.04696439579129219, 0.10551711916923523, -0.027658656239509583, 0.20756064355373383, 0.12818510830402374, 0.03997725620865822, -0.1016346737742424, -0.04883819445967674, 0.12535376846790314, 0.1537572741508484, -0.21782955527305603, -0.1190701276063919, -0.04590621963143349, -0.07500053197145462, 0.007774277590215206, 0.14779528975486755, -0.24796853959560394, -0.09505345672369003, -0.09452376514673233, -0.2796380817890167, -0.03229866921901703, -0.013387849554419518, 7.480842896256945e-7, -0.30434197187423706, 0.12844343483448029, -0.01464789267629385, -0.07266859710216522, 0.003428689669817686, -0.08566964417695999, -0.24519237875938416, 0.008790552616119385, -0.15213823318481445, -0.07818643748760223, 0.05001673474907875, -0.03301366791129112, 0.04094524309039116, 0.024397704750299454, -0.044079024344682693, -0.039083998650312424, -0.10977731645107269, -0.012623729184269905, -0.05594533681869507, 0.12730027735233307, 0.039297234266996384, 0.23640120029449463, 0.08372528851032257, 0.05854260176420212, -0.007859356701374054, -0.02586425468325615, 0.011746084317564964, 0.05346854403614998, 0.05950813367962837, -0.10320199280977249, 0.11707399040460587, 0.18247464299201965, -0.1080809161067009, 0.08319214731454849, -0.11488498002290726, -0.02714858390390873, -0.019446611404418945, -0.19274550676345825, -0.03949021175503731, -0.016904471442103386, 0.02477245032787323, 0.12489766627550125, -0.07007019966840744, -0.13263927400112152, 0.12808191776275635, 0.0802040845155716, -0.006882880814373493, -0.10923287272453308, -0.11056963354349136, -0.01596236415207386, 0.05150480195879936, 0.010166333056986332, 0.07182189077138901, 0.26115572452545166, 0.07210735976696014, -0.15011204779148102, 0.04250779747962952, -0.14045603573322296, 0.10615383833646774, -0.022837575525045395, -0.1447199583053589, -0.04544101282954216, -0.09526289254426956, 0.1182776540517807, 0.18296971917152405, -0.05837178975343704, -0.11188140511512756, 1.5354110912067682e-34, -0.0421157069504261, -0.1028323620557785, 0.08856558054685593, 0.01871044561266899, -0.0902533009648323, 0.10559067130088806, -0.01710919477045536, -0.019768085330724716, 0.005922352429479361, -0.19756214320659637, 0.005618537310510874 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
I talked to @lhoestq and it's best if I download this dataset through TensorFlow datasets instead, so I'll be implementing that one really soon. @NielsRogge
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
25
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). I talked to @lhoestq and it's best if I download this dataset through TensorFlow datasets instead, so I'll be implementing that one really soon. @NielsRogge
[ 0.15642324090003967, 0.0017935438081622124, -0.013825317844748497, 0.10744178295135498, 0.20902030169963837, 0.06404190510511398, 0.02998143807053566, -0.09205643087625504, -0.07037162780761719, 0.18446609377861023, -0.07729795575141907, 0.02283557318150997, -0.06883211433887482, 0.16189704835414886, 0.013051992282271385, -0.08287164568901062, -0.1254027932882309, -0.001775049138814211, -0.13266943395137787, -0.10672327876091003, -0.03399650752544403, 0.030993826687335968, 0.22504501044750214, -0.08480145782232285, -0.0861482098698616, -0.20391297340393066, -0.20884078741073608, 0.16166427731513977, -0.05755915492773056, -0.23436760902404785, 0.16359710693359375, 0.015491805039346218, 0.0812935009598732, 0.06152592971920967, 0.000005703370334231295, -0.06485560536384583, 0.010766462422907352, -0.028139840811491013, 0.02577033080160618, -0.14606080949306488, 0.053839102387428284, -0.038338929414749146, 0.0012010495411232114, -0.06848147511482239, -0.043825678527355194, 0.1329774409532547, 0.040591347962617874, -0.006568781565874815, 0.15129783749580383, 0.13359902799129486, 0.027321379631757736, 0.11341153830289841, 0.02311295084655285, -0.14091777801513672, 0.061150483787059784, 0.08923836052417755, 0.0027569900266826153, 0.271577388048172, -0.05295795574784279, 0.0790228471159935, 0.048846449702978134, 0.07509631663560867, 0.1520974189043045, -0.03702453151345253, 0.16592736542224884, 0.09083300828933716, -0.19922834634780884, -0.22077108919620514, 0.006024448666721582, 0.15382979810237885, 0.10799878090620041, 0.030605074018239975, -0.06958447396755219, 0.074977345764637, 0.03163648396730423, -0.0458218939602375, -0.14886878430843353, -0.02400953508913517, 0.03148016706109047, 0.033292725682258606, -0.09654934704303741, -0.20847952365875244, -0.0516936331987381, 0.013515214435756207, 0.1461264044046402, -0.017282169312238693, -0.08102922141551971, 0.034403469413518906, -0.016255419701337814, -0.02219606377184391, 0.07275757938623428, -0.10156210511922836, -0.11792077124118805, 0.018882285803556442, 0.12118406593799591, -0.08626943081617355, 0.043388720601797104, 0.08131643384695053, -0.025591906160116196, 0.00654453132301569, -0.03886483237147331, -0.16526956856250763, -0.1844814270734787, 0.14961907267570496, -0.22783975303173065, 0.052328843623399734, -0.07159934937953949, 0.012494525872170925, 0.02450208179652691, 0.10188952833414078, -0.023146118968725204, 0.02799217402935028, -0.06554361432790756, 0.07463351637125015, -0.08877934515476227, 0.09286756068468094, -0.06356609612703323, 0.06247816979885101, 0.06869009882211685, -0.03872609883546829, 0.3179607689380646, 0.11209877580404282, -0.019198385998606682, 0.17656275629997253, 0.046024832874536514, -0.1185852661728859, -0.018250949680805206, 0.21799753606319427, 0.0271886195987463, -0.07476375997066498, -0.1545863300561905, 0.043055515736341476, 0.15402625501155853, -0.053855448961257935, 0.17857076227664948, -0.08725438266992569, -0.07429375499486923, -0.23884554207324982, 0.03772100433707237, -0.08157678693532944, -0.14808779954910278, -0.06933964788913727, -0.13778509199619293, 0.009913590736687183, -0.1136837974190712, -0.06514350324869156, 0.12117663770914078, 0.08534009009599686, -0.06331859529018402, -0.017189597710967064, 0.08093436062335968, 0.06642027944326401, -0.2595563232898712, 0.019723471254110336, -0.023170283064246178, 0.0038646808825433254, -0.12040863931179047, 0.09075498580932617, -0.18364101648330688, 0.12059737741947174, 0.07476989924907684, 0.058328233659267426, 0.013963138684630394, -0.052414245903491974, 0.0368141271173954, 0.2111625075340271, -0.039365459233522415, 0.0002464177377987653, -0.06111570820212364, -0.09070318937301636, 0.005095631815493107, -0.225204199552536, 0.00008534998778486624, 0.06461384892463684, 0.06167573481798172, 0.0029267503414303064, -0.10883623361587524, -0.15308493375778198, -0.15286536514759064, -0.015557602047920227, -0.05185716226696968, -0.18467682600021362, 0.0029123187996447086, 0.09489152580499649, -0.06237536296248436, 0.11262966692447662, -0.20043979585170746, 0.15265274047851562, -0.14039038121700287, -0.09025219827890396, -0.07747455686330795, -0.016004668548703194, 0.10954850167036057, 0.019093085080385208, 0.032893892377614975, 0.03236114978790283, 0.14428012073040009, -0.21243643760681152, -0.068024642765522, -0.3011329770088196, -0.03022087551653385, -0.0942586213350296, 0.16023218631744385, -0.026980850845575333, -0.05963373929262161, 0.014637012965977192, -0.18601185083389282, 0.1611097753047943, 0.22491878271102905, -0.01693563349545002, -0.06413869559764862, -0.08851025253534317, -0.1091017872095108, -0.12317153811454773, -0.06819754838943481, -0.014486778527498245, -0.10483122617006302, -0.05891264230012894, 0.1288902908563614, 0.1865973323583603, -0.008580588735640049, 0.1596231907606125, 0.08300063759088516, 0.09011643379926682, 0.10406363010406494, 0.04934018850326538, 0.022496825084090233, -0.025945652276277542, 0.23506198823451996, 0.005614034831523895, -0.08783380687236786, -0.08509358018636703, 0.13323771953582764, 0.09185680747032166, -0.25880274176597595, 0.09980891644954681, 0.0508057177066803, -0.08987697213888168, 0.18958957493305206, -0.17661625146865845, -0.0191532913595438, -0.028916247189044952, -0.06891556084156036, -0.01648937165737152, 0.00352516514249146, 0.07308950275182724, -0.10719345510005951, -0.03989196941256523, 0.045167747884988785, 0.015014843083918095, 0.30034273862838745, 0.20673252642154694, 0.038849882781505585, -0.01591566950082779, 0.010204567573964596, -0.029331747442483902, 0.0825006514787674, -0.014499975368380547, -0.09245894104242325, -0.049340467900037766, -0.09734059870243073, -0.06756705790758133, -0.00973464921116829, 0.03712303936481476, 0.2791716754436493, 0.023195382207632065, 0.1070234626531601, -0.14596368372440338, 0.047569673508405685, 0.1456748992204666, -0.14349989593029022, -0.14280016720294952, -0.02738410234451294, -0.14533163607120514, -0.028699537739157677, -0.11313946545124054, 0.15740321576595306, -0.08986848592758179, 0.055914733558893204, -0.050437211990356445, -0.2513819634914398, -0.023966295644640923, 0.046283647418022156, -0.02374512329697609, 0.1218065544962883, 0.012403564527630806, -0.11645779013633728, -0.18578162789344788, 0.028737418353557587, -0.1378559172153473, 0.08060803264379501, -0.05966915935277939, 0.04333372041583061, -0.22864273190498352, -0.08673712611198425, -0.03346329927444458, -0.04301900044083595, 0.10856879502534866, -0.0862952470779419, 0.0969490259885788, -0.12173035740852356, 0.1003640666604042, 0.06075359508395195, 0.03202155977487564, 0.10872054100036621, -0.07735227793455124, 0.0982302650809288, 0.057655226439237595, -0.029477395117282867, 0.09519429504871368, -0.04581630602478981, -0.06311452388763428, 0.0063035739585757256, -0.08567401021718979, -0.06896903365850449, -0.10959117859601974, -0.025137482210993767, -0.17084021866321564, -0.01868799515068531, 0.09342186152935028, 0.025163784623146057, -0.0649951919913292, -0.01303162518888712, -0.0849633738398552, -0.14245225489139557, 0.011753086932003498, -0.25085753202438354, -0.12005648761987686, 0.20807921886444092, 0.05490339547395706, -0.08976706117391586, 0.07384832948446274, 0.06214454397559166, -0.08800334483385086, 0.14541631937026978, -0.05175274237990379, -0.01565021462738514, -0.14686383306980133, 0.09968946874141693, 0.044978369027376175, 0.047573160380125046, -0.02726239152252674, -0.11247801780700684, 0.010529810562729836, -0.07838500291109085, -0.21779029071331024, 0.015490559861063957, -0.1962052583694458, 0.03698345646262169, 0.1044759675860405, 0.030063368380069733, 0.12579019367694855, 0.020414646714925766, 0.02081061527132988, -0.021620551124215126, 0.0824279710650444, -0.08211984485387802, 0.2256656438112259, -0.16083316504955292, -0.05592238903045654, 0.1885407716035843, 0.19008614122867584, 0.06151605397462845, -0.024547044187784195, -0.16348060965538025, 0.19751274585723877, 0.036969151347875595, 0.16376514732837677, 0.026495279744267464, -0.11844450980424881, 0.17904384434223175, -0.007890786975622177, -0.08497246354818344, 0.058095261454582214, 0.07284890115261078, -0.07568137347698212, -0.12348052114248276, 0.0507577620446682, 0.06838517636060715, 0.02194938063621521, -0.11943911015987396, 0.017864005640149117, -0.09462530165910721, 0.04753433167934418, -0.036240074783563614, -0.06075317785143852, -0.06061333790421486, 0.06481452286243439, 0.014849000610411167, 0.09712700545787811, -0.07747314125299454, 0.006474539637565613, -0.06515881419181824, -0.21206660568714142, -0.04607562720775604, -0.08083061128854752, -0.057083405554294586, 0.0895322635769844, 0.02471267059445381, -0.02654935047030449, 0.08681976050138474, 0.057607244700193405, 0.024576900526881218, 0.01358281634747982, 0.012871128506958485, 0.009413797408342361, 0.02574523165822029, 0.06073322147130966, 0.04271484538912773, -0.0030861650593578815, 0.06846147030591965, 0.14374634623527527, -0.03994619846343994, 0.11425086855888367, -0.010947383008897305, -0.055771756917238235, -0.080865278840065, 0.02623235061764717, 0.13568539917469025, -0.1005714014172554, -0.14887003600597382, 0.060708340257406235, -0.006344316527247429, 0.16544979810714722, 0.1845804899930954, -0.03398050740361214, 0.08986592292785645, -0.030221767723560333, 0.17612674832344055, 0.02581539936363697, -0.03235602751374245, 0.31351467967033386, -0.04847540706396103, 0.03412356600165367, 0.10222220420837402, -0.0345325842499733, 0.3136591613292694, -0.2013317048549652, -0.12175211310386658, -0.22772352397441864, 0.008050025440752506, 0.005732077639549971, 0.09214013814926147, 0.11354468762874603, -0.08775854110717773, 0.010199337266385555, -0.01588042452931404, -0.07680990546941757, 0.1266489177942276, -0.018775764852762222, -0.11343804001808167, -0.15850530564785004, -0.09964048117399216, 0.01853008382022381, -0.024222804233431816, -0.029920894652605057, 0.11589247733354568, -0.0511552132666111, 0.08419110625982285, -0.08474207669496536, 0.004063543863594532, -0.050644081085920334, -0.13934291899204254, -0.022346876561641693, -0.042184535413980484, 0.06499116867780685, 0.3819538652896881, -0.17526690661907196, -0.10646069794893265, -0.04184284061193466, -0.011881574057042599, 0.03358462080359459, -0.050180427730083466, -0.04688394069671631, 0.19201378524303436, -0.08790148794651031, 0.03822702169418335, 0.029880695044994354, 0.07100892066955566, 0.08196389675140381, 0.16101454198360443, 0.1634734869003296, -0.031478580087423325, 0.019598253071308136, 0.008928729221224785, 0.2661686837673187, 0.005729608703404665, -0.08291512727737427, -0.059372954070568085, -0.10082466155290604, -0.031580209732055664, 0.014490613713860512, -0.03899497166275978, -0.09824084490537643, 0.09127741307020187, -0.028412431478500366, 0.05847597494721413, -0.009953819215297699, 0.16088566184043884, 0.21963465213775635, -0.04651322588324547, -0.13010035455226898, 0.08213566243648529, 0.003441351465880871, -0.13842734694480896, -0.18921057879924774, -0.0067371646873652935, 0.10184837877750397, 0.018697690218687057, 0.04517275467514992, 0.057180535048246384, 0.21547788381576538, -0.07585440576076508, -0.000350490037817508, -0.13910110294818878, 0.02881532907485962, -0.01721367798745632, -0.03992082551121712, 0.1887526512145996, -0.0033544045872986317, -0.005011084023863077, -0.06706240773200989, 0.06513179838657379, -0.10717196017503738, -0.16050608456134796, 0.20667758584022522, 0.04404889792203903, -0.04199906438589096, -0.02019353024661541, 0.00022594041365664452, -0.02687191218137741, 0.014884000644087791, 0.10249600559473038, -0.04422648996114731, -0.04905107244849205, 0.08838977664709091, 0.11345770210027695, -0.14010624587535858, 0.015858519822359085, -0.02500309608876705, 0.022802336141467094, -0.19393318891525269, 0.02718493528664112, 0.10644660145044327, 0.18358804285526276, 0.23825575411319733, 0.041270069777965546, -0.1978229284286499, -0.04732721298933029, -0.21696940064430237, -0.025512665510177612, 0.12227220088243484, 0.16911810636520386, -0.07483778148889542, -0.03918619081377983, -2.693487494792674e-32, -0.02944941446185112, -0.03695400059223175, -0.04994041472673416, 0.03546566143631935, -0.020806139335036278, 0.06014172360301018, -0.017353517934679985, -0.08552093803882599, -0.007265720050781965, -0.03677652031183243, 0.07248017191886902, 0.08337394893169403, 0.1061316654086113, 0.19217517971992493, -0.053443197160959244, 0.04191109910607338, 0.024205265566706657, 0.06211785972118378, 0.022930530831217766, 0.08007292449474335, 0.019545473158359528, -0.11375229805707932, -0.002947425004094839, -0.06482191383838654, -0.038734011352062225, 0.01364203542470932, -0.06634506583213806, -0.022933561354875565, 0.06336755305528641, 0.2575838565826416, -0.10624578595161438, 0.03656056895852089, -0.0552254319190979, 0.13623833656311035, 0.047268547117710114, -0.021812988445162773, -0.09491681307554245, 0.0275349710136652, -0.21189434826374054, 0.15314669907093048, 0.10065644234418869, -0.03541555255651474, -0.11673244833946228, -0.09600522369146347, 0.1763768345117569, 0.06875798851251602, 0.08096297085285187, 0.01417557429522276, -0.0737561509013176, 0.054180774837732315, 0.001626680139452219, 0.06851619482040405, 0.0388440378010273, -0.09382504224777222, 0.09449326992034912, -0.027035145089030266, 0.04241005331277847, -0.023433580994606018, 0.0734952911734581, 0.060178130865097046, -0.11079450696706772, -0.0553128756582737, -0.08657969534397125, 0.023503705859184265, -0.006811703555285931, 0.056953877210617065, -0.025581005960702896, -0.14320893585681915, 0.04443791136145592, -0.07826386392116547, 0.06931866705417633, 0.20675237476825714, 0.0830710232257843, 0.02703237719833851, -0.20545493066310883, 0.07183928787708282, -0.00604268629103899, -0.006610443349927664, 0.011314311996102333, -0.057057932019233704, -0.060224682092666626, -0.1119769737124443, 0.030285827815532684, 0.08024445921182632, 0.11092444509267807, 0.07635748386383057, -0.10115180909633636, 0.0076403203420341015, -0.01382773369550705, -0.01238833088427782, -0.17197008430957794, -0.08017085492610931, 0.07514844834804535, -0.0803297758102417, 0.03715230152010918, -0.09442716091871262, 0.020736223086714745, 0.23261728882789612, 0.07316633313894272, 0.008677243255078793, 0.0197763629257679, -0.07910580933094025, 0.19519317150115967, -0.012616923078894615, 0.10424301773309708, -0.07972325384616852, 0.21386466920375824, 0.2522656321525574, -0.22105008363723755, -0.0354374460875988, -0.040093421936035156, 0.12033335864543915, -0.016223620623350143, 0.1881161481142044, 0.13453999161720276, 0.06231522560119629, -0.12434925138950348, -0.062402259558439255, 0.10546489804983139, 0.16591766476631165, -0.24198155105113983, -0.10984964668750763, -0.05377157777547836, -0.06917137652635574, -0.0019353871466591954, 0.15381599962711334, -0.240514874458313, -0.06695208698511124, -0.06387156993150711, -0.24296484887599945, -0.03210724517703056, -0.0268220417201519, 7.549581368948566e-7, -0.313705176115036, 0.09801589697599411, -0.002983241807669401, -0.058277614414691925, 0.002027373993769288, -0.07106362283229828, -0.2443685233592987, 0.03164919465780258, -0.1415308713912964, -0.08344638347625732, 0.03937684744596481, -0.0778658464550972, 0.04016217961907387, 0.02700209431350231, -0.014886495657265186, -0.028711620718240738, -0.1410931795835495, 0.019890377297997475, -0.03885261341929436, 0.11127442866563797, 0.044968802481889725, 0.22204498946666718, 0.09102868288755417, 0.072679802775383, -0.028358614072203636, -0.036100149154663086, 0.05323050916194916, 0.014111541211605072, 0.09650328010320663, -0.06242341920733452, 0.12359775602817535, 0.2284892052412033, -0.13654635846614838, 0.1131790429353714, -0.1095438003540039, -0.03580141067504883, -0.01997479982674122, -0.1840512454509735, -0.033108003437519073, -0.025056255981326103, -0.002534636063501239, 0.1049676164984703, -0.06183986738324165, -0.1330586075782776, 0.13373515009880066, 0.09484969079494476, -0.009099563583731651, -0.1300249844789505, -0.11576808989048004, -0.007362110074609518, 0.04705251380801201, 0.0106057645753026, 0.05334360525012016, 0.21367061138153076, 0.09833883494138718, -0.08691584318876266, 0.025858454406261444, -0.1536920815706253, 0.12054718285799026, -0.044975388795137405, -0.12112592905759811, -0.032272856682538986, -0.10598216950893402, 0.09663324058055878, 0.1921984851360321, -0.06629841774702072, -0.07486076653003693, 1.1167692244490984e-34, -0.04383574426174164, -0.09025230258703232, 0.12455422431230545, -0.01744000054895878, -0.08280486613512039, 0.07237844169139862, -0.006207732949405909, -0.06936304271221161, 0.014084489084780216, -0.21054904162883759, -0.00907061155885458 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
I started adding COCO, will be done tomorrow EOD my work so far https://github.com/merveenoyan/datasets (my fork)
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
16
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). I started adding COCO, will be done tomorrow EOD my work so far https://github.com/merveenoyan/datasets (my fork)
[ 0.15503309667110443, -0.010126002132892609, -0.024248354136943817, 0.10682795941829681, 0.20712175965309143, 0.05669884756207466, 0.006841737311333418, -0.09354560077190399, -0.0963604673743248, 0.17806823551654816, -0.060200516134500504, 0.03746224194765091, -0.05813336372375488, 0.17741098999977112, 0.0012712159659713507, -0.07086244970560074, -0.10256575793027878, 0.001669051474891603, -0.11386757344007492, -0.09958156198263168, -0.004398937802761793, 0.014648000709712505, 0.21145401895046234, -0.04581303894519806, -0.1352350115776062, -0.21658548712730408, -0.2077435702085495, 0.1749585121870041, -0.05658484622836113, -0.2416393905878067, 0.1628117710351944, 0.03298119828104973, 0.07056206464767456, 0.07135984301567078, 0.000005723126378143206, -0.08926291018724442, 0.039313286542892456, -0.015994621440768242, -0.0011751668062061071, -0.158963143825531, 0.04879448562860489, -0.041067108511924744, 0.02561183087527752, -0.052128758281469345, -0.014158082194626331, 0.11307758092880249, 0.014633217826485634, 0.007144687231630087, 0.14846497774124146, 0.1346481591463089, 0.026444144546985626, 0.08016984909772873, 0.014062553644180298, -0.1391323357820511, 0.0740557387471199, 0.08557983487844467, 0.01726507768034935, 0.2830461859703064, -0.02462671883404255, 0.05143493786454201, 0.04770199581980705, 0.07855468988418579, 0.14646358788013458, -0.030040301382541656, 0.15508580207824707, 0.09553033858537674, -0.19749070703983307, -0.2354300320148468, 0.0014150814386084676, 0.11385513842105865, 0.12057116627693176, 0.034328967332839966, -0.06384248286485672, 0.07442031800746918, 0.025888781994581223, -0.05023963749408722, -0.14824602007865906, -0.013719959184527397, 0.03682171180844307, 0.01282031461596489, -0.1140669584274292, -0.18709102272987366, -0.051149725914001465, 0.025933830067515373, 0.1529068946838379, -0.009960528463125229, -0.08702418953180313, 0.027651255950331688, -0.00877414084970951, -0.004659674130380154, 0.08369048684835434, -0.13030287623405457, -0.14154554903507233, 0.01887846738100052, 0.13837401568889618, -0.08114439994096756, 0.035208526998758316, 0.11902594566345215, -0.008074871264398098, -0.009521888568997383, -0.09660112112760544, -0.17631514370441437, -0.19861218333244324, 0.15325461328029633, -0.2059067189693451, 0.0965559333562851, -0.09496783465147018, 0.052991095930337906, 0.028407005593180656, 0.10385565459728241, -0.03592948615550995, 0.04101406782865524, -0.06189435347914696, 0.07536777853965759, -0.06419246643781662, 0.07831358909606934, -0.04862009361386299, 0.05202526971697807, 0.11022186279296875, -0.024264220148324966, 0.2939635217189789, 0.10149162262678146, -0.01308366097509861, 0.16255293786525726, 0.05538904666900635, -0.11619890481233597, -0.014288114383816719, 0.23301096260547638, 0.04291624575853348, -0.06791698187589645, -0.1696149706840515, 0.047364234924316406, 0.12997697293758392, -0.04914660379290581, 0.17496824264526367, -0.0858452245593071, -0.049860503524541855, -0.2263408601284027, 0.01661093533039093, -0.0855180099606514, -0.17653247714042664, -0.08214616030454636, -0.14495712518692017, -0.007260515820235014, -0.1060883179306984, -0.04197178781032562, 0.13738417625427246, 0.09948904067277908, -0.06753458082675934, -0.02106342650949955, 0.07616226375102997, 0.06233536824584007, -0.22908924520015717, 0.007611559703946114, -0.020941736176609993, 0.060208018869161606, -0.11035865545272827, 0.10021641850471497, -0.18188360333442688, 0.15379802882671356, 0.0662529245018959, 0.07271162420511246, 0.0500846765935421, -0.02706524170935154, 0.02925395593047142, 0.19732624292373657, -0.016030950471758842, 0.03259638696908951, -0.07928329706192017, -0.08788689970970154, 0.013090215623378754, -0.23033472895622253, -0.014854870736598969, 0.04663505032658577, 0.06828368455171585, 0.00569944316521287, -0.1334226131439209, -0.12980705499649048, -0.17665018141269684, -0.017838692292571068, -0.03718629479408264, -0.17395491898059845, -0.035866934806108475, 0.04106231778860092, -0.06940001994371414, 0.11576986312866211, -0.24539954960346222, 0.12806423008441925, -0.15128597617149353, -0.07524211704730988, -0.09647895395755768, -0.007784676738083363, 0.06793362647294998, 0.01715845800936222, 0.028503859415650368, -0.013098066672682762, 0.14006344974040985, -0.20142941176891327, -0.046241696923971176, -0.31397566199302673, -0.05806858837604523, -0.08946879953145981, 0.15969645977020264, -0.016182316467165947, -0.05212383717298508, 0.02650323510169983, -0.2026076465845108, 0.1780669242143631, 0.24445652961730957, -0.019467264413833618, -0.12981323897838593, -0.07247734814882278, -0.10124878585338593, -0.09956961870193481, -0.08433909714221954, 0.0014069735771045089, -0.10227181762456894, -0.04152948409318924, 0.09138225018978119, 0.16001644730567932, -0.030989939346909523, 0.1880941390991211, 0.07508716732263565, 0.09744244068861008, 0.09793169051408768, 0.05115490406751633, -0.006239760667085648, -0.014193190261721611, 0.23006848990917206, -0.004413845017552376, -0.08679866045713425, -0.08968306332826614, 0.15082237124443054, 0.0938597172498703, -0.2497081607580185, 0.08971118181943893, 0.07555671781301498, -0.09846268594264984, 0.1798143982887268, -0.18977589905261993, -0.003216085722669959, -0.03656458109617233, -0.05079752951860428, -0.023026959970593452, -0.02528153546154499, 0.05060403421521187, -0.12974685430526733, -0.03422408550977707, 0.05640844628214836, -0.011630537919700146, 0.30978527665138245, 0.19182360172271729, 0.018009059131145477, -0.019143827259540558, -0.010080832988023758, -0.03783680126070976, 0.11565326899290085, -0.0006671646260656416, -0.08654899895191193, -0.057054102420806885, -0.10378637909889221, -0.08007584512233734, -0.01209558267146349, 0.025704486295580864, 0.26924851536750793, 0.02388746477663517, 0.09908439218997955, -0.12093374878168106, 0.040253281593322754, 0.15393345057964325, -0.144673153758049, -0.15010017156600952, -0.04784177616238594, -0.1700069010257721, -0.0055966563522815704, -0.09488717466592789, 0.15871350467205048, -0.10702598094940186, 0.048777177929878235, -0.034001391381025314, -0.2412973940372467, -0.04677768424153328, 0.03378469496965408, -0.012928472831845284, 0.11879318952560425, 0.027934612706303596, -0.12954184412956238, -0.17929141223430634, 0.03879208862781525, -0.12563787400722504, 0.07177141308784485, -0.07084046304225922, 0.02526259608566761, -0.2389567643404007, -0.08898531645536423, -0.024359947070479393, -0.045618899166584015, 0.07884366810321808, -0.09863372892141342, 0.09670011699199677, -0.12444944679737091, 0.1164858490228653, 0.050165094435214996, 0.008011073805391788, 0.10677218437194824, -0.046492114663124084, 0.06640280783176422, 0.06052705645561218, -0.049381375312805176, 0.11873752623796463, -0.0330030620098114, -0.0433100201189518, 0.0002793766907416284, -0.06858833879232407, -0.0691889077425003, -0.12270816415548325, -0.015513431280851364, -0.17677898705005646, -0.019353924319148064, 0.08773088455200195, 0.005520561244338751, -0.044601261615753174, -0.031116953119635582, -0.10808940976858139, -0.15132054686546326, 0.0007842303602956235, -0.21378053724765778, -0.10816942155361176, 0.20432883501052856, 0.06150173395872116, -0.11291879415512085, 0.0806436538696289, 0.03195954114198685, -0.08379419893026352, 0.1416550874710083, -0.06851788610219955, -0.018257781863212585, -0.13429753482341766, 0.10748308897018433, 0.06510419398546219, 0.034876059740781784, -0.010648646391928196, -0.11660146713256836, 0.019696872681379318, -0.09440716356039047, -0.19039130210876465, 0.03442326933145523, -0.17970293760299683, 0.04341950640082359, 0.09916325658559799, 0.07258188724517822, 0.11440060287714005, 0.019739652052521706, 0.006079506129026413, -0.020828785374760628, 0.07642386108636856, -0.06228574365377426, 0.22972896695137024, -0.12957242131233215, -0.057769205421209335, 0.21610872447490692, 0.21158741414546967, 0.0642184317111969, 0.00022870389511808753, -0.16035957634449005, 0.19805996119976044, 0.05312706530094147, 0.16555817425251007, 0.0041243149898946285, -0.0963701531291008, 0.2085847109556198, -0.024633139371871948, -0.10112756490707397, 0.051578544080257416, 0.07528547197580338, -0.09307774901390076, -0.1411038190126419, 0.06123980134725571, 0.06749896705150604, 0.0523642860352993, -0.11211086809635162, -0.005252734757959843, -0.1026703417301178, 0.06714323908090591, -0.03421398624777794, -0.062179528176784515, -0.0581681989133358, 0.07767355442047119, 0.02141120284795761, 0.12123524397611618, -0.09668826311826706, -0.042173437774181366, -0.056924350559711456, -0.22795869410037994, -0.046619903296232224, -0.10838085412979126, -0.0588240846991539, 0.08192677050828934, 0.018848031759262085, -0.042451877146959305, 0.09333518892526627, 0.03720976784825325, 0.021775543689727783, 0.0456208810210228, 0.022450806573033333, -0.003257621079683304, 0.05254114046692848, 0.0626550167798996, 0.06641989201307297, -0.0016719986451789737, 0.0850481316447258, 0.1551302820444107, -0.057047709822654724, 0.08957745134830475, -0.005836359690874815, -0.04966939240694046, -0.06774570047855377, 0.020872466266155243, 0.11112214624881744, -0.12097463011741638, -0.1415245532989502, 0.06189354881644249, -0.013791707344353199, 0.1537424474954605, 0.1628360152244568, -0.037304479628801346, 0.09760364890098572, -0.03159666433930397, 0.18182596564292908, 0.05509479343891144, -0.010008858516812325, 0.2688165307044983, -0.04591938853263855, 0.06004713848233223, 0.11773606389760971, -0.038706619292497635, 0.33998316526412964, -0.21736763417720795, -0.12597794830799103, -0.1995055079460144, -0.0012046409538015723, 0.023047251626849174, 0.11882749199867249, 0.1283998042345047, -0.09385481476783752, -0.011370733380317688, -0.012951144948601723, -0.07725308835506439, 0.1343497931957245, -0.023851286619901657, -0.09520810842514038, -0.17160041630268097, -0.10384734719991684, 0.010210813023149967, -0.04194203019142151, -0.030590735375881195, 0.12478392571210861, -0.06406588107347488, 0.07073120027780533, -0.08236756920814514, 0.00361712952144444, -0.04280557855963707, -0.11935022473335266, -0.04270339757204056, -0.061867911368608475, 0.036641594022512436, 0.3497205972671509, -0.171625018119812, -0.10133033245801926, -0.024369196966290474, 0.0010340070584788918, 0.04377578943967819, -0.060265086591243744, -0.031003281474113464, 0.19556941092014313, -0.07225614041090012, 0.040335699915885925, 0.005836070980876684, 0.06573273241519928, 0.05682653933763504, 0.17370380461215973, 0.16938406229019165, -0.010572616942226887, 0.02150135114789009, 0.009580125100910664, 0.24193665385246277, -0.013268626295030117, -0.07756882905960083, -0.05907110497355461, -0.11425196379423141, -0.023510554805397987, 0.04726697504520416, -0.02382301352918148, -0.06938749551773071, 0.06573847681283951, -0.02651934139430523, 0.03455686196684837, 0.002580874366685748, 0.17758312821388245, 0.2496320903301239, -0.03377413749694824, -0.1251312494277954, 0.08250609040260315, 0.02083383873105049, -0.10750190913677216, -0.1900387406349182, 0.001266248058527708, 0.12247835099697113, 0.011004929430782795, 0.053789976984262466, 0.06756389886140823, 0.19410505890846252, -0.06740638613700867, 0.012235310859978199, -0.17181822657585144, 0.033927902579307556, -0.05685554817318916, -0.03123967908322811, 0.18927761912345886, -0.001021645381115377, -0.008078975602984428, -0.07908760011196136, 0.07786962389945984, -0.11094532161951065, -0.13095739483833313, 0.22303326427936554, 0.04267827793955803, -0.02429277077317238, -0.03708687424659729, 0.026335354894399643, -0.027059093117713928, 0.01232944242656231, 0.10892190784215927, -0.0720173567533493, -0.03861352801322937, 0.07358507066965103, 0.16498231887817383, -0.1591903418302536, -0.010746428743004799, -0.023963017389178276, -0.004615069832652807, -0.16596674919128418, 0.028173020109534264, 0.12863899767398834, 0.2248808741569519, 0.24617116153240204, 0.0369260273873806, -0.2006276696920395, -0.048607178032398224, -0.25609084963798523, -0.007693794555962086, 0.12478361278772354, 0.1628730446100235, -0.06013447418808937, -0.00839308463037014, -2.654585684746561e-32, -0.036291588097810745, -0.028953291475772858, -0.06598109006881714, 0.03831018507480621, -0.050726696848869324, 0.06887513399124146, -0.02718748152256012, -0.060189004987478256, 0.008482174947857857, -0.0616370365023613, 0.06105763465166092, 0.08877884596586227, 0.09642431885004044, 0.1785275936126709, -0.05283695459365845, 0.02983407862484455, 0.018871938809752464, 0.06980535387992859, -0.0018190211849287152, 0.04069904237985611, 0.005914217792451382, -0.09157596528530121, -0.03387976437807083, -0.0996449887752533, -0.04643184691667557, 0.04404695704579353, -0.10285703092813492, -0.004810164216905832, 0.07597663253545761, 0.26253771781921387, -0.11156584322452545, 0.03918028250336647, -0.053873591125011444, 0.13619892299175262, 0.014878428541123867, -0.01801968179643154, -0.10421287268400192, 0.01219931524246931, -0.2100939005613327, 0.17316044867038727, 0.1002814844250679, -0.008031212724745274, -0.11050184071063995, -0.08802400529384613, 0.14298057556152344, 0.07393103837966919, 0.09431935101747513, 0.01384570263326168, -0.09300228953361511, 0.07310904562473297, -0.0026706643402576447, 0.06028911843895912, 0.02184206061065197, -0.09870406985282898, 0.07780914753675461, -0.10199028253555298, 0.03479546681046486, 0.008159757591784, 0.08410272747278214, 0.08418693393468857, -0.10511276870965958, -0.04859543964266777, -0.09659765660762787, 0.050337083637714386, -0.004957182798534632, 0.074435755610466, 0.019143836572766304, -0.1357080191373825, 0.037204302847385406, -0.07649644464254379, 0.07736498862504959, 0.18579626083374023, 0.07568729668855667, 0.035616979002952576, -0.19307579100131989, 0.07827264070510864, -0.033459145575761795, -0.000013109794053889345, -0.04030851274728775, -0.05562334880232811, -0.0642830953001976, -0.11996974050998688, -0.025344649329781532, 0.08645551651716232, 0.11948870867490768, 0.08620967715978622, -0.09789405763149261, 0.01426081731915474, -0.023100024089217186, -0.030830832198262215, -0.1638558954000473, -0.04573190212249756, 0.036937322467565536, -0.07017696648836136, 0.025072835385799408, -0.08322212100028992, 0.027388786897063255, 0.2532569169998169, 0.07878020405769348, -0.00035840304917655885, -0.027476206421852112, -0.06342829763889313, 0.16946977376937866, 0.006177613511681557, 0.0996464192867279, -0.08705821633338928, 0.2238915115594864, 0.2569498121738434, -0.18260544538497925, -0.05765903368592262, -0.030028395354747772, 0.09765112400054932, 0.014439336955547333, 0.20850051939487457, 0.13354435563087463, 0.04867607355117798, -0.10988069325685501, -0.0545332171022892, 0.1082531064748764, 0.16692371666431427, -0.22457671165466309, -0.11304159462451935, -0.04328305646777153, -0.0769161805510521, 0.011291392147541046, 0.11952953785657883, -0.24667324125766754, -0.07391819357872009, -0.05916347727179527, -0.2380712330341339, -0.027222977951169014, -0.05332870036363602, 7.528823289248976e-7, -0.3133081793785095, 0.11819732934236526, 0.0018319233786314726, -0.06090925633907318, -0.018600724637508392, -0.08891771733760834, -0.2723467946052551, 0.02917664125561714, -0.13496838510036469, -0.05750872939825058, 0.053082261234521866, -0.06174442544579506, 0.04804809391498566, 0.014447648078203201, -0.01897246390581131, -0.054999057203531265, -0.09095573425292969, 0.006452016066759825, -0.06544259935617447, 0.12842309474945068, 0.01813768595457077, 0.21100512146949768, 0.0759066715836525, 0.07467847317457199, -0.01561875082552433, -0.02754279226064682, 0.049022458493709564, 0.02849537506699562, 0.10684239864349365, -0.07375700026750565, 0.1387418806552887, 0.22285470366477966, -0.1055452823638916, 0.09439961612224579, -0.08656100183725357, -0.011604949831962585, -0.029681820422410965, -0.18214476108551025, -0.014115854166448116, -0.02731200121343136, -0.013639228418469429, 0.11896836012601852, -0.04374783858656883, -0.12328718602657318, 0.12687119841575623, 0.08313300460577011, -0.009561723098158836, -0.12971344590187073, -0.11757543683052063, -0.03506559506058693, 0.05967411771416664, 0.026267195120453835, 0.04030965641140938, 0.2206549197435379, 0.08723626285791397, -0.09875170141458511, 0.003201565472409129, -0.14654426276683807, 0.13943375647068024, -0.0427912212908268, -0.13037462532520294, -0.03885527327656746, -0.11482788622379303, 0.07630360871553421, 0.1752016842365265, -0.06745199114084244, -0.09006287157535553, 1.1475222918418952e-34, -0.047089964151382446, -0.09278799593448639, 0.11325002461671829, -0.004023813642561436, -0.08228308707475662, 0.0738418772816658, 0.01351421419531107, -0.04053772613406181, 0.019190602004528046, -0.21407143771648407, -0.01012618187814951 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
Hi Merve @merveenoyan , thank you so much for your great contribution! May I ask about the current progress of your implementation? Cuz I see the pull request is still in progess here. Or can I just run the COCO scripts in your fork repo?
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
45
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hi Merve @merveenoyan , thank you so much for your great contribution! May I ask about the current progress of your implementation? Cuz I see the pull request is still in progess here. Or can I just run the COCO scripts in your fork repo?
[ 0.1474665105342865, -0.04782024398446083, -0.03305419534444809, 0.09279721975326538, 0.1755930781364441, 0.03538498654961586, 0.03610663488507271, -0.13116690516471863, -0.07289614528417587, 0.16167858242988586, -0.029213080182671547, -0.003008330473676324, -0.07311408966779709, 0.17728768289089203, 0.03919753432273865, -0.08926597237586975, -0.12614640593528748, 0.008714892901480198, -0.10857740044593811, -0.09577146917581558, -0.012397226877510548, 0.038459163159132004, 0.20089617371559143, -0.09734076261520386, -0.11561226099729538, -0.19748623669147491, -0.21726945042610168, 0.1577237844467163, -0.05329529568552971, -0.22077058255672455, 0.16539433598518372, 0.04204189032316208, 0.08622699975967407, 0.0793038159608841, 0.000005690043508366216, -0.09817653894424438, 0.01942349411547184, -0.017871133983135223, 0.030486315488815308, -0.16661128401756287, 0.04008766636252403, -0.0436987541615963, 0.00918267760425806, -0.05554014444351196, -0.018461456522345543, 0.13721229135990143, 0.04635490104556084, -0.018390966579318047, 0.1663089394569397, 0.09876294434070587, 0.005480331834405661, 0.09363873302936554, 0.030993442982435226, -0.13508322834968567, 0.0730474442243576, 0.13166692852973938, -0.0005963371368125081, 0.28805506229400635, -0.04860123619437218, 0.10022576153278351, 0.05323421582579613, 0.03262908384203911, 0.1441190093755722, -0.055333320051431656, 0.1608959585428238, 0.07674193382263184, -0.20528383553028107, -0.24826300144195557, 0.016623882576823235, 0.12474947422742844, 0.08758213371038437, -0.005864900536835194, -0.07253772765398026, 0.06386615335941315, 0.020901639014482498, -0.030862832441926003, -0.15541404485702515, -0.01982605643570423, 0.07689503580331802, 0.025378668680787086, -0.10942891985177994, -0.21265345811843872, -0.071978859603405, -0.020226236432790756, 0.17822852730751038, 0.016148142516613007, -0.07102472335100174, 0.004308479838073254, -0.011542028747498989, 0.014847381971776485, 0.06377658993005753, -0.11560564488172531, -0.1414288729429245, 0.05526074394583702, 0.15214601159095764, -0.09395905584096909, 0.028781697154045105, 0.10495630651712418, -0.006085176486521959, -0.017779136076569557, -0.09850797802209854, -0.15342561900615692, -0.20101217925548553, 0.14668165147304535, -0.18302112817764282, 0.07846753299236298, -0.05755334347486496, 0.007151366677135229, 0.028050893917679787, 0.1300513744354248, -0.036766376346349716, 0.03512010723352432, -0.04120808094739914, 0.07156865298748016, -0.06554470956325531, 0.10461847484111786, -0.055892400443553925, 0.08178047090768814, 0.09573210030794144, -0.02811598964035511, 0.3129541873931885, 0.09543131291866302, -0.0064408243633806705, 0.1809963434934616, 0.06332224607467651, -0.12864534556865692, -0.006647629197686911, 0.1889691948890686, 0.06446318328380585, -0.05110810697078705, -0.12496817111968994, 0.045738689601421356, 0.1499416083097458, -0.05826350301504135, 0.1816333830356598, -0.09779766947031021, -0.05787001550197601, -0.23771482706069946, 0.03853349760174751, -0.1048494353890419, -0.1676141768693924, -0.08187375962734222, -0.13906413316726685, -0.02901117503643036, -0.08635468035936356, -0.07147455960512161, 0.08612778782844543, 0.07662732899188995, -0.07245326042175293, 0.0014350870624184608, 0.0953802540898323, 0.07657691091299057, -0.26422515511512756, 0.019332103431224823, -0.005441595334559679, -0.0004662678111344576, -0.12634511291980743, 0.11349644511938095, -0.19445843994617462, 0.13145630061626434, 0.06602735817432404, 0.055284976959228516, 0.016607699915766716, -0.025016190484166145, 0.0379658080637455, 0.21789559721946716, -0.03608446195721626, 0.005631798878312111, -0.04745159670710564, -0.10109283775091171, -0.010826400481164455, -0.1986970603466034, 0.018611731007695198, 0.018451027572155, 0.06117886304855347, 0.01978471875190735, -0.11295945197343826, -0.14941103756427765, -0.14662612974643707, 0.010878953151404858, -0.052291832864284515, -0.18843525648117065, -0.015263197012245655, 0.06483068317174911, -0.04729796573519707, 0.1139041930437088, -0.2507355809211731, 0.1474788337945938, -0.13420893251895905, -0.05165752023458481, -0.10717735439538956, 0.010012788698077202, 0.08372767269611359, 0.018555721268057823, -0.004396687261760235, 0.015238221734762192, 0.14619681239128113, -0.21829961240291595, -0.04223766550421715, -0.2804790735244751, -0.035131581127643585, -0.09532274305820465, 0.19808229804039001, -0.006399718578904867, -0.06561075896024704, 0.009023751132190228, -0.17759062349796295, 0.12175863981246948, 0.2521863877773285, -0.048107363283634186, -0.06858182698488235, -0.09940790385007858, -0.12865395843982697, -0.0633172020316124, -0.08848435431718826, -0.011145324446260929, -0.11306025087833405, -0.05609802529215813, 0.13334359228610992, 0.18360494077205658, -0.019377386197447777, 0.1756620556116104, 0.09574375301599503, 0.08578292280435562, 0.0979374498128891, 0.05611575394868851, 0.015086640603840351, -0.03468790650367737, 0.2354435920715332, -0.0053020804189145565, -0.08707957714796066, -0.09450168162584305, 0.1702306717634201, 0.09535779058933258, -0.24337121844291687, 0.10022082924842834, 0.10675548017024994, -0.08715809136629105, 0.1949918568134308, -0.15172864496707916, -0.007735161576420069, -0.05864313244819641, -0.059128206223249435, -0.007711210288107395, -0.0173079464584589, 0.08451049774885178, -0.12240977585315704, -0.05048060417175293, 0.05136234685778618, -0.01944267936050892, 0.316048800945282, 0.19941601157188416, 0.047012168914079666, -0.01724550686776638, -0.0031683153938502073, -0.0750521868467331, 0.12009574472904205, -0.02455785684287548, -0.09573407471179962, -0.0717732161283493, -0.10528799146413803, -0.08015189319849014, -0.03368847444653511, 0.04017728194594383, 0.282338410615921, 0.026119379326701164, 0.07747230678796768, -0.12371557950973511, 0.06208260729908943, 0.16936703026294708, -0.1297549158334732, -0.15885445475578308, -0.017052406445145607, -0.14441998302936554, 0.03032642975449562, -0.1382169872522354, 0.16392599046230316, -0.0865330845117569, 0.04781511798501015, -0.05578077584505081, -0.2228313386440277, -0.01904086023569107, 0.041811347007751465, -0.041592083871364594, 0.12642504274845123, 0.03825606033205986, -0.08648920059204102, -0.17931431531906128, 0.006566664204001427, -0.13052453100681305, 0.08770103752613068, -0.059221331030130386, 0.05898437649011612, -0.21939517557621002, -0.063672736287117, -0.050078023225069046, -0.011820148676633835, 0.1126946210861206, -0.11460639536380768, 0.10987608134746552, -0.1356857717037201, 0.11492305994033813, 0.10837661474943161, 0.047152962535619736, 0.08599112182855606, -0.05323085933923721, 0.09373528510332108, 0.06340952217578888, -0.03627714887261391, 0.13053695857524872, -0.034344032406806946, -0.06397374719381332, -0.004985072184354067, -0.09653080254793167, -0.05244478955864906, -0.1207374632358551, -0.02442167140543461, -0.1699807494878769, -0.048038795590400696, 0.10346733778715134, 0.0029423614032566547, -0.06055866926908493, -0.018106883391737938, -0.11171410232782364, -0.14020608365535736, 0.03826248273253441, -0.26219499111175537, -0.10758408159017563, 0.24944590032100677, 0.06333890557289124, -0.09460953623056412, 0.061622798442840576, 0.04163584113121033, -0.0910920724272728, 0.1483491063117981, -0.07869255542755127, 0.00813948456197977, -0.14577636122703552, 0.08416667580604553, 0.05120464414358139, 0.05759184807538986, 0.008704057894647121, -0.1106414720416069, 0.012045886367559433, -0.09833097457885742, -0.19324542582035065, 0.02986137755215168, -0.1979217529296875, 0.03203160688281059, 0.13468033075332642, 0.02764253132045269, 0.14134569466114044, 0.041023124009370804, 0.0207224041223526, -0.030636118724942207, 0.02495476044714451, -0.07904841750860214, 0.21648964285850525, -0.1843980848789215, -0.03534156084060669, 0.18277396261692047, 0.17332743108272552, 0.062136080116033554, -0.015647685155272484, -0.16298918426036835, 0.20049884915351868, 0.03342469781637192, 0.1364564448595047, 0.013311848044395447, -0.11755218356847763, 0.14174558222293854, 0.019181253388524055, -0.1062484011054039, 0.06072907894849777, 0.07408647984266281, -0.0863737016916275, -0.11574427783489227, 0.027729270979762077, 0.10619140416383743, 0.07294990122318268, -0.10516269505023956, -0.0020675472915172577, -0.08799733221530914, 0.053697165101766586, -0.05994400754570961, -0.04181778430938721, -0.05040162801742554, 0.07472625374794006, 0.0384100005030632, 0.10124634951353073, -0.10657390207052231, -0.01410159282386303, -0.04174838215112686, -0.1997229903936386, -0.04226117208600044, -0.07134237140417099, -0.11100781708955765, 0.08141900599002838, 0.018116509541869164, 0.000028509723051683977, 0.08417243510484695, 0.061914581805467606, 0.03432377800345421, 0.012278195470571518, 0.004609571769833565, 0.007225658278912306, 0.022358104586601257, 0.06908851116895676, 0.04609934613108635, -0.025585534051060677, 0.0928482636809349, 0.15946540236473083, -0.08017861098051071, 0.11685946583747864, 0.003792470321059227, -0.060369279235601425, -0.09345287084579468, 0.006824582349509001, 0.127268448472023, -0.09968787431716919, -0.1582065373659134, 0.07047174125909805, 0.013414384797215462, 0.1507439911365509, 0.1588318645954132, -0.04705968126654625, 0.10014805197715759, -0.02335365116596222, 0.16991271078586578, 0.050534576177597046, -0.024341417476534843, 0.30823495984077454, -0.05729334056377411, 0.04802748188376427, 0.11757956445217133, -0.06276275962591171, 0.30265700817108154, -0.18562112748622894, -0.10175082832574844, -0.22647079825401306, -0.009161817841231823, 0.02581322379410267, 0.1253657341003418, 0.1414453387260437, -0.07672321796417236, 0.03719068691134453, -0.009518293663859367, -0.08342786878347397, 0.08595645427703857, 0.010340395383536816, -0.11615613102912903, -0.1570393145084381, -0.13560327887535095, 0.004272910766303539, -0.01389913260936737, -0.03812389075756073, 0.07990319281816483, -0.05937635526061058, 0.07265938818454742, -0.07009517401456833, -0.012872782535851002, -0.03760408237576485, -0.13671068847179413, -0.04281311854720116, -0.04476606100797653, 0.010527371428906918, 0.34614914655685425, -0.17522169649600983, -0.10850553959608078, -0.09802409261465073, 0.008835414424538612, 0.0403275229036808, -0.07310369610786438, -0.0689227506518364, 0.1589064747095108, -0.11213073134422302, 0.022672496736049652, -0.010973354801535606, 0.06072397902607918, 0.04529275745153427, 0.16811707615852356, 0.17111782729625702, -0.03276452794671059, 0.03369845077395439, 0.002136791357770562, 0.2517794072628021, -0.017669465392827988, -0.09173769503831863, -0.07323604077100754, -0.1352628767490387, -0.052883330732584, -0.024688003584742546, -0.0199817456305027, -0.07669763267040253, 0.04916619881987572, -0.019158093258738518, 0.07006826996803284, -0.0022147030103951693, 0.14031723141670227, 0.28724753856658936, -0.05149000510573387, -0.10684287548065186, 0.08513769507408142, 0.01515701413154602, -0.11810899525880814, -0.2022559940814972, -0.009725882671773434, 0.09993857145309448, 0.01386335864663124, 0.032825566828250885, 0.05785541236400604, 0.1843273937702179, -0.0835941880941391, 0.05103308707475662, -0.13587906956672668, 0.017481062561273575, -0.053658463060855865, -0.026139086112380028, 0.18948416411876678, -0.0013938411138951778, -0.012178597040474415, -0.07441537827253342, 0.09290198236703873, -0.13579526543617249, -0.1753672957420349, 0.20914536714553833, 0.045820094645023346, -0.04824066162109375, -0.04068659991025925, 0.019240055233240128, 0.023154636844992638, 0.007352378219366074, 0.10475122183561325, -0.05888108164072037, -0.03996533155441284, 0.07867144048213959, 0.12426865100860596, -0.14935827255249023, 0.005640602670609951, -0.016646862030029297, -0.0005388695280998945, -0.19820182025432587, 0.010284432210028172, 0.1067999079823494, 0.22153013944625854, 0.21820926666259766, 0.03703569620847702, -0.17866797745227814, -0.03931133449077606, -0.25164100527763367, -0.0153459832072258, 0.14955823123455048, 0.16897685825824738, -0.08865995705127716, -0.04280035197734833, -2.7039840715983415e-32, -0.015092034824192524, -0.022633425891399384, -0.06960056722164154, 0.08266866952180862, -0.009300099685788155, 0.03285980969667435, -0.015110449865460396, -0.05773482844233513, 0.018219145014882088, -0.035723164677619934, 0.08321582525968552, 0.11380758136510849, 0.10365624725818634, 0.17921802401542664, -0.048053063452243805, 0.03333302587270737, 0.03224002942442894, 0.04837165027856827, 0.042234718799591064, 0.07598918676376343, -0.008876143023371696, -0.12465982884168625, -0.03604082763195038, -0.043400343507528305, -0.025576572865247726, 0.018041057512164116, -0.05186047405004501, -0.0032240329310297966, 0.04583784565329552, 0.2680410146713257, -0.11371754109859467, 0.03471509367227554, -0.04604417085647583, 0.17187955975532532, 0.06168642267584801, 0.018543055281043053, -0.0641246810555458, 0.04683767259120941, -0.21812888979911804, 0.12922459840774536, 0.09323940426111221, -0.0074890051037073135, -0.11646848171949387, -0.0840090811252594, 0.1632159799337387, 0.08214270323514938, 0.08294429630041122, 0.03490638732910156, -0.0734756588935852, 0.0778614953160286, -0.00933469831943512, 0.04725946858525276, 0.02085292711853981, -0.07801888138055801, 0.09150344133377075, -0.045614276081323624, 0.060064829885959625, -0.03330790251493454, 0.07121941447257996, 0.04313800483942032, -0.10901100188493729, -0.05047227442264557, -0.10231418162584305, 0.031287070363759995, -0.02199450694024563, 0.07191667705774307, -0.05923992767930031, -0.1232769638299942, 0.056631628423929214, -0.04983781278133392, 0.08987981081008911, 0.23689399659633636, 0.09441826492547989, 0.0329599529504776, -0.23908856511116028, 0.07802169770002365, -0.03339406102895737, -0.012816118076443672, 0.02191661298274994, -0.06550487875938416, -0.09095311909914017, -0.14244456589221954, 0.02971423789858818, 0.05866345390677452, 0.10108702629804611, 0.06539961695671082, -0.11355318129062653, 0.002069417852908373, -0.01929015852510929, -0.01767992042005062, -0.15048082172870636, -0.03773745521903038, 0.038669340312480927, -0.0590173713862896, 0.05412141606211662, -0.10202250629663467, 0.0042921435087919235, 0.2665139436721802, 0.08805307000875473, 0.00950159877538681, -0.00009748816955834627, -0.06209740787744522, 0.18790483474731445, 0.009820107370615005, 0.09564992040395737, -0.08887598663568497, 0.22849762439727783, 0.2650471031665802, -0.21230928599834442, -0.012988063506782055, -0.04601209610700607, 0.13388919830322266, -0.019567014649510384, 0.16438832879066467, 0.11749345809221268, 0.04829065501689911, -0.0865502655506134, -0.05652784928679466, 0.09715607017278671, 0.1492069959640503, -0.25169137120246887, -0.0949014201760292, -0.05703689903020859, -0.07787159085273743, -0.01764995977282524, 0.1496373564004898, -0.21628426015377045, -0.0482320636510849, -0.05741487815976143, -0.23732680082321167, -0.030235040932893753, -0.015037843026220798, 7.52993230435095e-7, -0.27823856472969055, 0.11451483517885208, -0.01955137588083744, -0.06838789582252502, 0.027214134112000465, -0.07137446850538254, -0.25741949677467346, 0.03423215076327324, -0.11032837629318237, -0.06817154586315155, 0.0008182770689018071, -0.1190180629491806, 0.0393291674554348, 0.017509495839476585, -0.048828769475221634, -0.056973300874233246, -0.10801757872104645, 0.03252366557717323, -0.06593526899814606, 0.14798662066459656, 0.05305241048336029, 0.2268567681312561, 0.08730856329202652, 0.09621763229370117, -0.04313689470291138, -0.04806314408779144, 0.07128944247961044, 0.02830890193581581, 0.10129795968532562, -0.0770762488245964, 0.09492172300815582, 0.2158271223306656, -0.13581092655658722, 0.08702516555786133, -0.12705343961715698, -0.02426663413643837, -0.017239760607481003, -0.1529911309480667, -0.047090183943510056, -0.044908083975315094, 0.014952119439840317, 0.10920031368732452, -0.06637744605541229, -0.15332840383052826, 0.14133207499980927, 0.07174993306398392, -0.01711469516158104, -0.12108499556779861, -0.12617895007133484, -0.028767261654138565, 0.039959535002708435, 0.021837081760168076, 0.026165887713432312, 0.18088926374912262, 0.10144887119531631, -0.08632876724004745, 0.0028192170429974794, -0.11451549082994461, 0.11458342522382736, -0.03390711545944214, -0.110183484852314, -0.03131904825568199, -0.08947814255952835, 0.0856781154870987, 0.15472663938999176, -0.015118123963475227, -0.03850224241614342, 1.0350233498708751e-34, -0.03756299242377281, -0.06623627245426178, 0.12235309928655624, -0.026649218052625656, -0.07458008080720901, 0.05924771726131439, -0.002490671118721366, -0.05144031345844269, 0.018696937710046768, -0.21885770559310913, -0.01387861743569374 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
Hello @yixuanren I had another prioritized project about to be merged, but I'll start continuing today will finish up soon.
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
20
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hello @yixuanren I had another prioritized project about to be merged, but I'll start continuing today will finish up soon.
[ 0.14752842485904694, -0.015600194223225117, -0.00983299221843481, 0.10697872191667557, 0.20985139906406403, 0.058063484728336334, 0.032683733850717545, -0.10865992307662964, -0.07224807143211365, 0.16950255632400513, -0.0588625892996788, 0.0327485091984272, -0.0755554661154747, 0.174207866191864, 0.009358060546219349, -0.09925112873315811, -0.11002958565950394, 0.0009884401224553585, -0.13046643137931824, -0.10677198320627213, -0.021558299660682678, 0.02814992144703865, 0.21004149317741394, -0.09303056448698044, -0.10692014545202255, -0.19334416091442108, -0.22343380749225616, 0.1595837026834488, -0.06666471064090729, -0.23989443480968475, 0.15537875890731812, 0.007690417114645243, 0.07974821329116821, 0.056479547172784805, 0.000005623554898193106, -0.10305769741535187, 0.011461219750344753, -0.02245316281914711, 0.0169746745377779, -0.13373951613903046, 0.04935906082391739, -0.043926090002059937, 0.011890163645148277, -0.05428902804851532, -0.020427651703357697, 0.12572629749774933, 0.054590992629528046, -0.000414283451391384, 0.176330104470253, 0.12752443552017212, 0.02564450353384018, 0.09879697114229202, 0.027547432109713554, -0.15803389251232147, 0.0714413970708847, 0.09645304828882217, 0.005862739868462086, 0.285110741853714, -0.03781842440366745, 0.08420634269714355, 0.06479911506175995, 0.07405449450016022, 0.13762450218200684, -0.03974689915776253, 0.15738217532634735, 0.08394724130630493, -0.2023857831954956, -0.21569935977458954, 0.022311555221676826, 0.13132144510746002, 0.11464150249958038, 0.014259875752031803, -0.05335200950503349, 0.07858002930879593, 0.0408024825155735, -0.018621264025568962, -0.16502565145492554, -0.014480741694569588, 0.028277641162276268, 0.02387438900768757, -0.09597460180521011, -0.20009367167949677, -0.05373415723443031, 0.0016606339486315846, 0.17815379798412323, 0.0030806034337729216, -0.06150585412979126, 0.023543857038021088, -0.02906169928610325, -0.008649380877614021, 0.07088373601436615, -0.121121846139431, -0.1307189166545868, 0.03418692201375961, 0.1420440375804901, -0.08968355506658554, 0.015477568842470646, 0.11002776771783829, -0.01664610207080841, 0.02446826547384262, -0.05838828533887863, -0.1850023716688156, -0.18336781859397888, 0.14354686439037323, -0.19820834696292877, 0.050156064331531525, -0.051704924553632736, 0.00902019813656807, 0.013980947434902191, 0.12301147729158401, -0.019672665745019913, 0.022467659786343575, -0.0688149631023407, 0.08454875648021698, -0.09530944377183914, 0.11291905492544174, -0.07282345741987228, 0.06022593006491661, 0.08901805430650711, -0.0313783697783947, 0.32129228115081787, 0.09809736907482147, -0.009453949518501759, 0.18174538016319275, 0.05283508077263832, -0.11756209284067154, -0.011794461868703365, 0.22052857279777527, 0.03276248276233673, -0.07402919977903366, -0.15261201560497284, 0.05789528414607048, 0.13652898371219635, -0.04686225578188896, 0.17528705298900604, -0.079703189432621, -0.059718020260334015, -0.24217401444911957, 0.022928042337298393, -0.09394590556621552, -0.15008290112018585, -0.05140934884548187, -0.14267194271087646, -0.007791593670845032, -0.11571798473596573, -0.07394204288721085, 0.11543499678373337, 0.07741297036409378, -0.05476246401667595, -0.01835152879357338, 0.1053985059261322, 0.09280852228403091, -0.26327812671661377, 0.030423292890191078, -0.007590107154101133, -0.009504063054919243, -0.12497935444116592, 0.11416489630937576, -0.20152953267097473, 0.12349287420511246, 0.09074922651052475, 0.0650954619050026, 0.0332975797355175, -0.04274779558181763, 0.007785295136272907, 0.20612768828868866, -0.010047856718301773, -0.0029211086221039295, -0.051903869956731796, -0.08562062680721283, -0.002091008936986327, -0.21737411618232727, 0.012864343822002411, 0.038226839154958725, 0.08175200968980789, 0.002666530665010214, -0.12676666676998138, -0.13575610518455505, -0.13501287996768951, -0.006244667340070009, -0.06488260626792908, -0.19533495604991913, -0.012774123810231686, 0.09152796119451523, -0.05294327065348625, 0.11200336366891861, -0.2242928296327591, 0.15661488473415375, -0.14807039499282837, -0.06655724346637726, -0.09230014681816101, 0.004483917262405157, 0.09288976341485977, 0.02334001287817955, 0.026197079569101334, 0.02713671326637268, 0.15168757736682892, -0.22808824479579926, -0.04600151628255844, -0.29870882630348206, -0.013624721206724644, -0.0880088061094284, 0.16865646839141846, -0.020002730190753937, -0.05912139266729355, -0.002633525989949703, -0.18554703891277313, 0.15873482823371887, 0.22479000687599182, -0.03521953150629997, -0.05958861485123634, -0.10037940740585327, -0.12022437155246735, -0.10615306347608566, -0.05587770417332649, 0.019908463582396507, -0.10078636556863785, -0.06120381876826286, 0.11392015218734741, 0.18492668867111206, -0.008209171704947948, 0.15941578149795532, 0.08182063698768616, 0.08648289740085602, 0.12169840186834335, 0.052240222692489624, 0.014954976737499237, -0.03321287781000137, 0.24238038063049316, 0.006260936614125967, -0.08768176287412643, -0.07034604996442795, 0.14000006020069122, 0.07627251744270325, -0.23526234924793243, 0.10214696824550629, 0.09788525104522705, -0.07566782087087631, 0.20215798914432526, -0.19002313911914825, -0.017507128417491913, -0.03790691867470741, -0.05885208398103714, -0.004447797313332558, -0.03860380873084068, 0.07281047105789185, -0.11785639822483063, -0.059535034000873566, 0.049318693578243256, 0.017771074548363686, 0.3025548756122589, 0.18872106075286865, 0.06334387511014938, 0.006295105442404747, -0.004881198983639479, -0.03872846066951752, 0.07365860044956207, -0.02332599274814129, -0.1057671383023262, -0.06746237725019455, -0.12138157337903976, -0.09555064886808395, -0.015975257381796837, 0.027045436203479767, 0.2679475247859955, 0.02540326863527298, 0.10279031842947006, -0.11312133818864822, 0.043466102331876755, 0.15496255457401276, -0.12827609479427338, -0.152473583817482, -0.0016120703658089042, -0.15265586972236633, -0.0007101933006197214, -0.11231498420238495, 0.14134055376052856, -0.08428482711315155, 0.05601807311177254, -0.05546548590064049, -0.2508014738559723, -0.018487095832824707, 0.05092649534344673, -0.031665343791246414, 0.12904737889766693, 0.010819579474627972, -0.09106271713972092, -0.18595288693904877, 0.007831045426428318, -0.13195988535881042, 0.07395094633102417, -0.0733078122138977, 0.03954801335930824, -0.23283864557743073, -0.10681235045194626, -0.04680716246366501, -0.06472756713628769, 0.10245481133460999, -0.10409238189458847, 0.11049895733594894, -0.1148497685790062, 0.09065481275320053, 0.06717777997255325, 0.03941921517252922, 0.10881926119327545, -0.06661974638700485, 0.08285081386566162, 0.06264203041791916, -0.00929151102900505, 0.09341571480035782, -0.04507564753293991, -0.07503534853458405, 0.014366889372467995, -0.08762709051370621, -0.05715346708893776, -0.12729324400424957, -0.03575049713253975, -0.17553521692752838, -0.02736380510032177, 0.10407833755016327, -0.004614498000591993, -0.07475730031728745, -0.018534334376454353, -0.10554765164852142, -0.1275257170200348, 0.026968924328684807, -0.25164344906806946, -0.1221361756324768, 0.22161813080310822, 0.03912282735109329, -0.10913141071796417, 0.057332947850227356, 0.05378048121929169, -0.0999159887433052, 0.14049284160137177, -0.05314400792121887, -0.015168849378824234, -0.13627509772777557, 0.08324756473302841, 0.05231458693742752, 0.05339594930410385, -0.001269896631129086, -0.10871443897485733, 0.02416638284921646, -0.08553733676671982, -0.21310453116893768, 0.017115933820605278, -0.19107411801815033, 0.03323385864496231, 0.12696008384227753, 0.02507762797176838, 0.13044510781764984, 0.03182382136583328, 0.03386908397078514, -0.028790101408958435, 0.06850974261760712, -0.08466705679893494, 0.234128937125206, -0.1871749758720398, -0.07222642749547958, 0.17943976819515228, 0.17825379967689514, 0.045472294092178345, -0.0026825929526239634, -0.13436418771743774, 0.20958180725574493, 0.04307350516319275, 0.15070472657680511, 0.030224109068512917, -0.12514902651309967, 0.16962283849716187, -0.006251778453588486, -0.09148577600717545, 0.05300835520029068, 0.07695150375366211, -0.09083465486764908, -0.10717016458511353, 0.02795073576271534, 0.08470875769853592, 0.044206056743860245, -0.10859425365924835, 0.02045622281730175, -0.08793308585882187, 0.06403005868196487, -0.047379542142152786, -0.05545632541179657, -0.049938712269067764, 0.06799637526273727, 0.024161415174603462, 0.08165738731622696, -0.08274096250534058, -0.01202625222504139, -0.054438211023807526, -0.2168334424495697, -0.04625159874558449, -0.08857846260070801, -0.08161409199237823, 0.09422913193702698, 0.016795599833130836, -0.01567758433520794, 0.08107247948646545, 0.0413627028465271, 0.026129499077796936, 0.007764613255858421, -0.002446581842377782, 0.0118429409340024, 0.03887845203280449, 0.06155189871788025, 0.044468969106674194, -0.00786140188574791, 0.07252832502126694, 0.14262035489082336, -0.07954270392656326, 0.10580521821975708, -0.0060856337659060955, -0.045826613903045654, -0.0858621820807457, 0.023491699248552322, 0.1345711648464203, -0.09061446040868759, -0.14460758864879608, 0.08377961814403534, 0.006144274026155472, 0.17214669287204742, 0.19375577569007874, -0.051141731441020966, 0.08924119174480438, -0.019066667184233665, 0.1761644333600998, 0.04048507660627365, -0.012989941984415054, 0.305542916059494, -0.0585625059902668, 0.021627794951200485, 0.11645591259002686, -0.03251362964510918, 0.31984642148017883, -0.20720912516117096, -0.11635278910398483, -0.2602735757827759, -0.015402748249471188, 0.016208063811063766, 0.10455136001110077, 0.13619129359722137, -0.07313293218612671, 0.027188051491975784, -0.019580945372581482, -0.09039545804262161, 0.1135033369064331, -0.004123239312320948, -0.1072077825665474, -0.16441459953784943, -0.10350654274225235, 0.01386761013418436, -0.024392925202846527, -0.031154444441199303, 0.11677312850952148, -0.061026424169540405, 0.08819399774074554, -0.08985717594623566, 0.015352090820670128, -0.03975749760866165, -0.14686289429664612, -0.04861794412136078, -0.06458715349435806, 0.02664909139275551, 0.3546096682548523, -0.1420098841190338, -0.11697114259004593, -0.07548927515745163, -0.01605505682528019, 0.05833975225687027, -0.056637298315763474, -0.05704140290617943, 0.18632814288139343, -0.08035517483949661, 0.025708641856908798, 0.01084827072918415, 0.06351210176944733, 0.06865760684013367, 0.1687660813331604, 0.17627587914466858, -0.030116889625787735, 0.007914195768535137, 0.012732595205307007, 0.26775556802749634, -0.007248520851135254, -0.08504974842071533, -0.06866665929555893, -0.1058356761932373, -0.031350407749414444, 0.025935448706150055, -0.03281278908252716, -0.07906511425971985, 0.07830604165792465, -0.019777026027441025, 0.06587062776088715, -0.006670351605862379, 0.16287820041179657, 0.2468818724155426, -0.07471673935651779, -0.12155874073505402, 0.07954498380422592, -0.006124457344412804, -0.13664965331554413, -0.18341253697872162, -0.023766079917550087, 0.09520526230335236, 0.0033161526080220938, 0.048438768833875656, 0.07014934718608856, 0.19490234553813934, -0.06301373988389969, 0.017547952011227608, -0.13717837631702423, 0.04277319088578224, -0.03500666096806526, -0.04741797596216202, 0.18548472225666046, -0.006841190624982119, -0.010672439821064472, -0.08369702100753784, 0.08815857023000717, -0.10521838068962097, -0.182036891579628, 0.23730745911598206, 0.0653051882982254, -0.04083256050944328, -0.03578818216919899, 0.02290552482008934, -0.0355323851108551, 0.005000617355108261, 0.10002148896455765, -0.04334834963083267, -0.047477297484874725, 0.09622808545827866, 0.1262318640947342, -0.14363043010234833, 0.028769098222255707, -0.03910765424370766, 0.007451278157532215, -0.19050109386444092, 0.02197602204978466, 0.12088637053966522, 0.1912146508693695, 0.2592840790748596, 0.02913103625178337, -0.20042672753334045, -0.03932727500796318, -0.22422386705875397, -0.032546717673540115, 0.10782609134912491, 0.16526100039482117, -0.086000457406044, -0.03418900445103645, -2.67542337923e-32, -0.022784514352679253, -0.0389275848865509, -0.05819730833172798, 0.03713392838835716, -0.02677595615386963, 0.03992855176329613, -0.015264286659657955, -0.0941038653254509, -0.013220053166151047, -0.030979029834270477, 0.07831399142742157, 0.08575547486543655, 0.101307712495327, 0.19647172093391418, -0.06054941937327385, 0.05169519782066345, 0.044572614133358, 0.08009023219347, 0.02293047122657299, 0.060469187796115875, 0.0069814277812838554, -0.12910625338554382, -0.031951893121004105, -0.0550016425549984, -0.03390885144472122, 0.023450585082173347, -0.055156219750642776, 0.010244101285934448, 0.068666972219944, 0.26432162523269653, -0.12123183906078339, 0.05054965242743492, -0.05479240417480469, 0.16444072127342224, 0.055480875074863434, -0.0010978278005495667, -0.10606416314840317, 0.05921298637986183, -0.20915311574935913, 0.1343962699174881, 0.12950994074344635, -0.04726115241646767, -0.12460795044898987, -0.09867120534181595, 0.1885938197374344, 0.09245804697275162, 0.09360378980636597, 0.0064675831235945225, -0.08598886430263519, 0.06747929006814957, -0.0013211281038820744, 0.055945057421922684, 0.0256344061344862, -0.09597107768058777, 0.07979150861501694, -0.026114877313375473, 0.04052309691905975, -0.03697995841503143, 0.09460169076919556, 0.0763995572924614, -0.10291244834661484, -0.03314945846796036, -0.07159970700740814, 0.05000130459666252, -0.008486436679959297, 0.08146106451749802, -0.025402210652828217, -0.13496866822242737, 0.043513551354408264, -0.052199821919202805, 0.039794955402612686, 0.22251446545124054, 0.08637739717960358, 0.03674127906560898, -0.20964230597019196, 0.09966588020324707, -0.03289332613348961, 0.009405815042555332, 0.008696237578988075, -0.05773689225316048, -0.08263144642114639, -0.12505781650543213, 0.021264351904392242, 0.06925396621227264, 0.10557277500629425, 0.07883654534816742, -0.12089665979146957, -0.009410647675395012, -0.010494242422282696, -0.02038065902888775, -0.1558617800474167, -0.04107242822647095, 0.05132664740085602, -0.0786830484867096, 0.025867817923426628, -0.11786661297082901, 0.052629999816417694, 0.23698951303958893, 0.07219632714986801, 0.0023464420810341835, 0.008903300389647484, -0.06831178814172745, 0.18074911832809448, 0.002694732276722789, 0.09574636071920395, -0.09832897782325745, 0.21173261106014252, 0.25147637724876404, -0.22325192391872406, -0.023573139682412148, -0.026614254340529442, 0.12181680649518967, -0.014216091483831406, 0.18533305823802948, 0.13894544541835785, 0.05802483484148979, -0.10595841705799103, -0.06601955741643906, 0.11289075016975403, 0.1441442221403122, -0.23958247900009155, -0.11540423333644867, -0.07334766536951065, -0.07766788452863693, 0.0005686405347660184, 0.15245719254016876, -0.21626628935337067, -0.0724264457821846, -0.061838068068027496, -0.23764169216156006, -0.01592068001627922, -0.033191099762916565, 7.528957439717487e-7, -0.296172559261322, 0.09280990809202194, -0.013440369628369808, -0.075404092669487, -0.010123001411557198, -0.09310470521450043, -0.2533618211746216, 0.03151705488562584, -0.1448517143726349, -0.06945894658565521, 0.03362733870744705, -0.10516418516635895, 0.053637776523828506, 0.022888831794261932, -0.03894398733973503, -0.014942131005227566, -0.13353285193443298, 0.03676062077283859, -0.04307566583156586, 0.11357507854700089, 0.08011263608932495, 0.20783638954162598, 0.08112169057130814, 0.0835956484079361, -0.05497622862458229, -0.02665543369948864, 0.051497846841812134, 0.0024234787560999393, 0.06922152638435364, -0.06468047946691513, 0.11423588544130325, 0.21965058147907257, -0.13478216528892517, 0.09348148107528687, -0.09569697082042694, -0.04290848225355148, -0.015252434648573399, -0.18230943381786346, -0.031514301896095276, -0.02857981063425541, -0.0016545524122193456, 0.10702905803918839, -0.08184627443552017, -0.1109330803155899, 0.13706083595752716, 0.07589162141084671, 0.0018726115813478827, -0.11343491077423096, -0.13952139019966125, -0.010059110820293427, 0.03561408072710037, 0.012872752733528614, 0.03908652812242508, 0.21304404735565186, 0.0890287235379219, -0.0975750982761383, 0.008802788332104683, -0.13161849975585938, 0.11508350074291229, -0.024657176807522774, -0.1372792273759842, -0.044923216104507446, -0.09745654463768005, 0.08776580542325974, 0.1928800791501999, -0.03042234294116497, -0.06924068927764893, 1.0622704824034703e-34, -0.03982793539762497, -0.09621471911668777, 0.1339629888534546, -0.0007623662822879851, -0.07359794527292252, 0.062088411301374435, -0.04051314666867256, -0.061759836971759796, -0.0014792087022215128, -0.2094755917787552, 0.005281919613480568 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
> Hello @yixuanren I had another prioritized project about to be merged, but I'll start continuing today will finish up soon. It's really nice of you!! I see you've commited another version just now
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
34
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). > Hello @yixuanren I had another prioritized project about to be merged, but I'll start continuing today will finish up soon. It's really nice of you!! I see you've commited another version just now
[ 0.13645809888839722, -0.04027474671602249, -0.013494044542312622, 0.11391178518533707, 0.2089891880750656, 0.055769212543964386, 0.029357368126511574, -0.11573895066976547, -0.07348626852035522, 0.1687190681695938, -0.04947938770055771, 0.03790029510855675, -0.07885449379682541, 0.18454542756080627, 0.028159944340586662, -0.10216725617647171, -0.09544190764427185, 0.013054831884801388, -0.13400116562843323, -0.09105292707681656, -0.018530094996094704, 0.029131846502423286, 0.20648378133773804, -0.08408234268426895, -0.11346091330051422, -0.19524401426315308, -0.21981221437454224, 0.16244353353977203, -0.0562371127307415, -0.22803017497062683, 0.14823856949806213, 0.009351878426969051, 0.07787024229764938, 0.03621111437678337, 0.0000057395914154767524, -0.09754915535449982, 0.021064313128590584, -0.03498128429055214, 0.021572425961494446, -0.12956354022026062, 0.051845964044332504, -0.03696846961975098, 0.014504987746477127, -0.05479075759649277, -0.016828104853630066, 0.13343776762485504, 0.05774783715605736, 0.000871450814884156, 0.1834184229373932, 0.12019401788711548, 0.02528143674135208, 0.09847981482744217, 0.031202372163534164, -0.16352728009223938, 0.07838724553585052, 0.10212841629981995, 0.001369176316075027, 0.2682538330554962, -0.0409976989030838, 0.08738825470209122, 0.058974046260118484, 0.060961924493312836, 0.13426585495471954, -0.05042627826333046, 0.15750956535339355, 0.0838388055562973, -0.19961898028850555, -0.21233828365802765, 0.024781541898846626, 0.12333068251609802, 0.09704792499542236, 0.00934208370745182, -0.04932031407952309, 0.07407400757074356, 0.04019581899046898, -0.024172093719244003, -0.1677871197462082, -0.018981391564011574, 0.030974848195910454, 0.014435885474085808, -0.08536821603775024, -0.18672657012939453, -0.05035136640071869, -0.009438238106667995, 0.16629548370838165, 0.005625617690384388, -0.06649409979581833, 0.019439563155174255, -0.03429720923304558, 0.006147387437522411, 0.05878056213259697, -0.11632847785949707, -0.14008626341819763, 0.03583473712205887, 0.1286783665418625, -0.09645213931798935, 0.014298510737717152, 0.11016082018613815, -0.01512565091252327, 0.010607689619064331, -0.06550469249486923, -0.1833173781633377, -0.17390519380569458, 0.14842572808265686, -0.20577950775623322, 0.05989560857415199, -0.05222169682383537, 0.0041632093489170074, 0.001555789727717638, 0.12411387264728546, -0.03168998286128044, 0.025262843817472458, -0.0742904543876648, 0.09134260565042496, -0.07648716866970062, 0.11190210282802582, -0.08330915123224258, 0.06773937493562698, 0.08314187824726105, -0.02638586051762104, 0.3097887933254242, 0.09669418632984161, -0.006739557720720768, 0.1850002557039261, 0.06944090873003006, -0.12530210614204407, -0.020757749676704407, 0.22444738447666168, 0.03045293688774109, -0.07296930998563766, -0.14772559702396393, 0.06809467077255249, 0.14167894423007965, -0.04694799333810806, 0.1723276823759079, -0.08804906904697418, -0.04876609891653061, -0.23189732432365417, 0.022191792726516724, -0.10326089709997177, -0.15485261380672455, -0.05819622799754143, -0.12889154255390167, -0.013943188823759556, -0.11945806443691254, -0.07195935398340225, 0.11808755248785019, 0.06961840391159058, -0.05049354210495949, -0.012697539292275906, 0.10338188707828522, 0.10550108551979065, -0.24626508355140686, 0.022560354322195053, -0.01852327026426792, -0.010665950365364552, -0.13790443539619446, 0.11813409626483917, -0.19524551928043365, 0.12297668308019638, 0.08659837394952774, 0.06780783832073212, 0.025645289570093155, -0.03518885374069214, 0.008511979132890701, 0.20859159529209137, -0.025408202782273293, -0.01233717892318964, -0.05304231122136116, -0.09096719324588776, 0.0007912798901088536, -0.21217700839042664, 0.018851347267627716, 0.03724031150341034, 0.09709856659173965, 0.007831820286810398, -0.13194192945957184, -0.1311524212360382, -0.1334458291530609, -0.012991199269890785, -0.07672423124313354, -0.18458619713783264, -0.011220724321901798, 0.1001228541135788, -0.0533452033996582, 0.11420398205518723, -0.22500284016132355, 0.15190434455871582, -0.15328887104988098, -0.06663468480110168, -0.09133091568946838, 0.0027747394051402807, 0.09945855289697647, 0.009336951188743114, 0.010837070643901825, 0.03742107003927231, 0.15038985013961792, -0.2284243255853653, -0.04849635809659958, -0.2849849760532379, -0.014505438506603241, -0.08951366692781448, 0.17179927229881287, -0.018475741147994995, -0.06054770201444626, -0.006246453616768122, -0.17206436395645142, 0.13371093571186066, 0.22114066779613495, -0.0306234173476696, -0.03363611549139023, -0.09739549458026886, -0.12278260290622711, -0.10347398370504379, -0.0633622407913208, 0.006721134297549725, -0.10101113468408585, -0.06509068608283997, 0.0970664918422699, 0.1786249428987503, -0.013910291716456413, 0.15625864267349243, 0.09216954559087753, 0.09628330916166306, 0.11798004806041718, 0.04750502482056618, 0.02566073089838028, -0.03071054257452488, 0.23030589520931244, 0.010145076550543308, -0.07943298667669296, -0.06176096200942993, 0.15374451875686646, 0.0731695219874382, -0.239602193236351, 0.10397163778543472, 0.09992911666631699, -0.09178974479436874, 0.18738959729671478, -0.1857401728630066, -0.027562420815229416, -0.04032114893198013, -0.0635804682970047, -0.00043133264989592135, -0.028322022408246994, 0.07395641505718231, -0.11848277598619461, -0.06324788928031921, 0.05924995243549347, 0.00686102919280529, 0.3001609146595001, 0.17850244045257568, 0.05928082764148712, -0.003798598423600197, -0.004809752572327852, -0.04016731679439545, 0.07993512600660324, -0.023202834650874138, -0.10611414909362793, -0.07519923895597458, -0.11714918166399002, -0.10201121866703033, -0.025286328047513962, 0.022140709683299065, 0.2685824930667877, 0.024009836837649345, 0.10610689967870712, -0.11765412241220474, 0.04415041580796242, 0.16323460638523102, -0.1240086555480957, -0.1553899198770523, -0.005445455200970173, -0.1349688172340393, -0.00832234788686037, -0.12448886781930923, 0.14787521958351135, -0.07804373651742935, 0.05075301602482796, -0.058498725295066833, -0.24533510208129883, -0.0035232570953667164, 0.04990098997950554, -0.03575513884425163, 0.11598845571279526, 0.023185843601822853, -0.0893876776099205, -0.19111166894435883, 0.0014847349375486374, -0.12175774574279785, 0.07719968259334564, -0.07762984931468964, 0.036220304667949677, -0.22439873218536377, -0.10231409966945648, -0.039068229496479034, -0.043995000422000885, 0.10271010547876358, -0.10188043117523193, 0.09835468977689743, -0.12477097660303116, 0.10625432431697845, 0.08135955035686493, 0.04485116899013519, 0.09396207332611084, -0.05769219249486923, 0.0805792436003685, 0.06278561800718307, -0.009576188400387764, 0.09543512016534805, -0.04981101304292679, -0.06841348111629486, 0.010572811588644981, -0.08365762233734131, -0.05965326353907585, -0.11730046570301056, -0.035632893443107605, -0.181326761841774, -0.04181082919239998, 0.09315889328718185, -0.014068836346268654, -0.07421555370092392, -0.01204014103859663, -0.09614988416433334, -0.13314613699913025, 0.044105518609285355, -0.2428971529006958, -0.11966675519943237, 0.2268386036157608, 0.03388788923621178, -0.10144586116075516, 0.052138637751340866, 0.04409070685505867, -0.09848551452159882, 0.13577623665332794, -0.051482487469911575, -0.013082316145300865, -0.12212258577346802, 0.07788214087486267, 0.04441337659955025, 0.058083426207304, 0.0009907307103276253, -0.1091516762971878, 0.013614130206406116, -0.0819435864686966, -0.20186808705329895, 0.01543477363884449, -0.18068715929985046, 0.02553945779800415, 0.1277337372303009, 0.01850532926619053, 0.14109748601913452, 0.03816405311226845, 0.034315045922994614, -0.03656083717942238, 0.07236423343420029, -0.07866092771291733, 0.22375339269638062, -0.18501922488212585, -0.08107974380254745, 0.17897643148899078, 0.18293802440166473, 0.04121381416916847, -0.002364792861044407, -0.1440151184797287, 0.20043975114822388, 0.03733925521373749, 0.14399468898773193, 0.004149578046053648, -0.13311001658439636, 0.1658291220664978, -0.003701865440234542, -0.09166174381971359, 0.06710007786750793, 0.06965737789869308, -0.0946173146367073, -0.098870649933815, 0.02762461081147194, 0.09305505454540253, 0.06963969767093658, -0.1035684272646904, 0.009455284103751183, -0.09215608239173889, 0.0570860356092453, -0.06233571097254753, -0.05263087525963783, -0.04998540133237839, 0.06332205981016159, 0.016527492552995682, 0.08849018067121506, -0.0760674774646759, -0.009317051619291306, -0.05562995746731758, -0.2089129090309143, -0.0552750900387764, -0.09778286516666412, -0.09169517457485199, 0.08549302816390991, 0.015430738218128681, -0.028120007365942, 0.09088867157697678, 0.047478411346673965, 0.03561877831816673, 0.0019109133863821626, -0.013529932126402855, 0.006777515169233084, 0.03447525575757027, 0.07587909698486328, 0.04091876000165939, -0.019307490438222885, 0.07012049853801727, 0.14815019071102142, -0.0871661826968193, 0.11298973858356476, 0.010594448074698448, -0.05211825296282768, -0.08311063796281815, 0.026865234598517418, 0.13797476887702942, -0.088065966963768, -0.1459752768278122, 0.09321624040603638, 0.012808600440621376, 0.15616106986999512, 0.18104679882526398, -0.06162932887673378, 0.0744364932179451, -0.025078654289245605, 0.16523122787475586, 0.04205123707652092, -0.01208085473626852, 0.2933010160923004, -0.06645223498344421, 0.021586136892437935, 0.12025675922632217, -0.038644034415483475, 0.3049854040145874, -0.19694146513938904, -0.1240021288394928, -0.2658831775188446, -0.014053464867174625, 0.021471742540597916, 0.0960438996553421, 0.14025717973709106, -0.05244661122560501, 0.025091063231229782, -0.023081790655851364, -0.09132293611764908, 0.1060728132724762, 0.0058666011318564415, -0.09516028314828873, -0.15904705226421356, -0.09117244184017181, 0.0165556650608778, -0.023081209510564804, -0.03062107414007187, 0.11000014841556549, -0.0697779580950737, 0.08320551365613937, -0.0897161066532135, 0.019125955179333687, -0.03970951959490776, -0.14036551117897034, -0.05797666311264038, -0.05984290689229965, 0.023142743855714798, 0.3497788906097412, -0.13309621810913086, -0.11839741468429565, -0.07873561233282089, -0.01371566578745842, 0.05136611685156822, -0.046912770718336105, -0.055216770619153976, 0.19764284789562225, -0.07968990504741669, 0.01200819294899702, -0.00019385130144655704, 0.05769689008593559, 0.06654950231313705, 0.15462042391300201, 0.1808624118566513, -0.03409510850906372, 0.011403237469494343, -0.014359979890286922, 0.26911139488220215, -0.020091712474822998, -0.07638946920633316, -0.05977954342961311, -0.10150358080863953, -0.03693767637014389, 0.03504805266857147, -0.032250430434942245, -0.0860966220498085, 0.06330600380897522, -0.008350626565515995, 0.056357964873313904, -0.004031457472592592, 0.1650472730398178, 0.2530721127986908, -0.08151538670063019, -0.10845033079385757, 0.07891399413347244, -0.0020606296602636576, -0.11823005974292755, -0.1750507801771164, -0.01053708791732788, 0.10607146471738815, 0.006535687483847141, 0.04833279922604561, 0.07233519852161407, 0.18984158337116241, -0.06081582233309746, 0.031790852546691895, -0.15136197209358215, 0.047345954924821854, -0.033121876418590546, -0.05193374678492546, 0.1859235316514969, -0.0028664544224739075, -0.009164991788566113, -0.07975977659225464, 0.10445734113454819, -0.11023422330617905, -0.18509601056575775, 0.22650383412837982, 0.059568073600530624, -0.04346683621406555, -0.0357205905020237, 0.022351045161485672, -0.025064844638109207, 0.016939179971814156, 0.08494479954242706, -0.05098694935441017, -0.05401230230927467, 0.10443450510501862, 0.13561882078647614, -0.1482556164264679, 0.02096056379377842, -0.01969226263463497, 0.0027200705371797085, -0.18620939552783966, 0.025227012112736702, 0.11338476091623306, 0.20149759948253632, 0.24700036644935608, 0.0359879732131958, -0.2011362612247467, -0.032386403530836105, -0.2360876351594925, -0.044089388102293015, 0.12345675379037857, 0.16487222909927368, -0.09073232114315033, -0.04221167787909508, -2.716767278789946e-32, -0.03193730115890503, -0.034035101532936096, -0.06593111902475357, 0.04216330498456955, -0.02485758252441883, 0.03384585678577423, -0.003890733700245619, -0.07807733863592148, -0.008459351025521755, -0.031743861734867096, 0.06643621623516083, 0.09192683547735214, 0.1004226952791214, 0.19151665270328522, -0.05389075726270676, 0.04302557557821274, 0.061598822474479675, 0.08547727018594742, 0.03454431891441345, 0.06738454848527908, -0.0043662721291184425, -0.1276082843542099, -0.025335904210805893, -0.06037009879946709, -0.04402092471718788, 0.033614374697208405, -0.06006557121872902, 0.01045339647680521, 0.043568942695856094, 0.2579646408557892, -0.11902295053005219, 0.035294581204652786, -0.049847591668367386, 0.16356855630874634, 0.05483978986740112, 0.004507875069975853, -0.09758036583662033, 0.05924254283308983, -0.2072565108537674, 0.1389666646718979, 0.1164783164858818, -0.050712913274765015, -0.1322210282087326, -0.10193536430597305, 0.18010593950748444, 0.08860627561807632, 0.10629399865865707, -0.0009606416570022702, -0.07574623823165894, 0.05939789116382599, 0.009362396784126759, 0.05438336357474327, 0.017884613946080208, -0.09171129018068314, 0.07874823361635208, -0.012384174391627312, 0.03908013552427292, -0.048906873911619186, 0.08494914323091507, 0.07995177805423737, -0.08689644187688828, -0.01729188673198223, -0.06340478360652924, 0.0541609451174736, -0.012688799761235714, 0.07969074696302414, -0.031570278108119965, -0.12425500899553299, 0.04178661108016968, -0.05705949664115906, 0.0430234894156456, 0.2396913468837738, 0.09372173249721527, 0.039142265915870667, -0.2140192687511444, 0.09124337136745453, -0.04928208887577057, 0.02171754650771618, 0.000739905284717679, -0.05247127264738083, -0.09033704549074173, -0.11754032969474792, 0.02500152215361595, 0.06225375831127167, 0.08968263864517212, 0.07641100883483887, -0.10914690792560577, -0.014221481047570705, -0.0032109662424772978, -0.013932818546891212, -0.1543249785900116, -0.03273380547761917, 0.05725536867976189, -0.0821584165096283, 0.028386149555444717, -0.12519165873527527, 0.051161330193281174, 0.23688800632953644, 0.06464562565088272, 0.0013144499389454722, 0.0048714280128479, -0.07517673075199127, 0.1847715675830841, 0.005379249807447195, 0.10260079056024551, -0.09783315658569336, 0.23247700929641724, 0.2613247036933899, -0.21747370064258575, -0.018960503861308098, -0.03240460157394409, 0.11770565062761307, -0.020498240366578102, 0.18688993155956268, 0.13386976718902588, 0.043937988579273224, -0.10410609096288681, -0.06322766840457916, 0.10923320800065994, 0.14140912890434265, -0.24018770456314087, -0.11701686680316925, -0.07011622190475464, -0.07318989187479019, -0.004288115072995424, 0.15279333293437958, -0.2195049226284027, -0.07530763000249863, -0.06383601576089859, -0.24360248446464539, -0.026950297877192497, -0.030323222279548645, 7.566819135718106e-7, -0.29796499013900757, 0.09572819620370865, -0.013697437010705471, -0.06638353317975998, -0.0038535697385668755, -0.0836479663848877, -0.24329492449760437, 0.03969953581690788, -0.15422891080379486, -0.06199079379439354, 0.03277907520532608, -0.12271613627672195, 0.04167543351650238, 0.022065622732043266, -0.03751692920923233, -0.017799247056245804, -0.139439195394516, 0.03350842744112015, -0.0372142568230629, 0.09488579630851746, 0.0780317634344101, 0.22407330572605133, 0.09192448109388351, 0.08667980134487152, -0.039374690502882004, -0.03243689239025116, 0.05879141762852669, 0.00964046735316515, 0.06294815242290497, -0.06307321041822433, 0.12269667536020279, 0.22620907425880432, -0.1351347416639328, 0.09579586237668991, -0.09289220720529556, -0.04063611105084419, -0.0002761110954452306, -0.17311526834964752, -0.03457891196012497, -0.03859157860279083, 0.0017159851267933846, 0.10180877894163132, -0.07225446403026581, -0.12444427609443665, 0.13160191476345062, 0.07786442339420319, 0.01074075698852539, -0.11928074806928635, -0.1456010788679123, -0.003409444820135832, 0.04910125210881233, 0.005002876278012991, 0.032235633581876755, 0.20503805577754974, 0.09293195605278015, -0.08974434435367584, 0.0023253951221704483, -0.12140190601348877, 0.10141708701848984, -0.018904907628893852, -0.13377507030963898, -0.04115186259150505, -0.0938987210392952, 0.08528894186019897, 0.1907118260860443, -0.026528798043727875, -0.07226105779409409, 9.675482522181229e-35, -0.03478296473622322, -0.09814424812793732, 0.1297479271888733, -0.0007804238703101873, -0.07531481981277466, 0.06528354436159134, -0.04856815189123154, -0.05547022819519043, 0.01306187454611063, -0.19085362553596497, -0.0019634102936834097 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
Hi @NielsRogge and @merveenoyan, did you find a way to load a dataset with COCO annotations to HF's hub? I have a panoptic segmentation dataset in COCO format and would like to share it with the community. Thanks in advance :)
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
41
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hi @NielsRogge and @merveenoyan, did you find a way to load a dataset with COCO annotations to HF's hub? I have a panoptic segmentation dataset in COCO format and would like to share it with the community. Thanks in advance :)
[ 0.11792950332164764, -0.07631013542413712, -0.014937616884708405, 0.05459539592266083, 0.15888822078704834, 0.04796938598155975, -0.03693234547972679, -0.1354086995124817, 0.0006932566175237298, 0.15270362794399261, -0.057583555579185486, 0.02064638026058674, -0.08183217793703079, 0.11579442769289017, 0.006627622526139021, -0.07611316442489624, -0.14469511806964874, 0.029844993725419044, -0.10551143437623978, -0.11545108258724213, -0.005151021294295788, 0.04771570861339569, 0.1946280598640442, -0.08603981137275696, -0.16573025286197662, -0.10537856072187424, -0.226568803191185, 0.1459837406873703, -0.05214633420109749, -0.22286364436149597, 0.1929347962141037, 0.06395990401506424, 0.10733448714017868, 0.01506931520998478, 0.000005439498181658564, -0.10793907195329666, -0.02013433910906315, 0.019547106698155403, 0.03971651941537857, -0.1180403083562851, 0.05327939614653587, -0.020204635336995125, -0.08198370784521103, -0.09499657154083252, 0.04486255720257759, 0.1654536873102188, 0.011577462777495384, 0.008565131574869156, 0.16510173678398132, 0.10411974042654037, 0.011428451165556908, 0.11873840540647507, 0.04088931158185005, -0.1413397341966629, 0.027254164218902588, 0.1398898959159851, -0.00214134412817657, 0.33625349402427673, -0.09939835965633392, 0.06963542848825455, 0.030781041830778122, 0.015016076155006886, 0.13910797238349915, 0.02065659873187542, 0.18862295150756836, 0.053282421082258224, -0.2600069046020508, -0.2168274074792862, -0.0029697916470468044, 0.09864792972803116, 0.06738350540399551, -0.032766230404376984, -0.05550166219472885, 0.04522720351815224, 0.03713466599583626, 0.002357234014198184, -0.15917520225048065, -0.05894423648715019, 0.06130577251315117, 0.05232483148574829, -0.05059260502457619, -0.27727851271629333, -0.054617155343294144, -0.04416776821017265, 0.17502203583717346, 0.025306575000286102, -0.04116160050034523, -0.02974497154355049, -0.06498897075653076, -0.05170648917555809, 0.12563899159431458, -0.13565349578857422, -0.11066339910030365, 0.07819965481758118, 0.18958774209022522, -0.10631216317415237, 0.07075526565313339, 0.17025719583034515, 0.03715888038277626, -0.016835268586874008, -0.0940161794424057, -0.12998275458812714, -0.2252562940120697, 0.14076821506023407, -0.15423625707626343, 0.014429322443902493, -0.05990975350141525, -0.0009303002152591944, 0.07430113106966019, 0.08619146049022675, -0.05838039144873619, 0.017025599256157875, -0.05086562782526016, 0.07985424995422363, -0.06071655824780464, 0.12838171422481537, -0.052558571100234985, 0.01913876086473465, 0.06660612672567368, -0.027728019282221794, 0.31088873744010925, 0.1044657975435257, 0.007091482635587454, 0.17748135328292847, 0.06819585710763931, -0.09855323284864426, -0.03417188674211502, 0.16765613853931427, 0.05852041393518448, -0.03376463055610657, -0.14861750602722168, 0.07263459265232086, 0.1087164357304573, -0.047601986676454544, 0.15493091940879822, -0.07174437493085861, -0.0678522139787674, -0.24605001509189606, 0.11259230971336365, -0.08702807128429413, -0.1542770117521286, -0.05870752036571503, -0.13619665801525116, -0.011985158547759056, -0.035103291273117065, -0.022172216325998306, 0.07975772023200989, 0.13673056662082672, -0.08030130714178085, 0.007992027327418327, 0.059924423694610596, 0.06165608763694763, -0.31973063945770264, 0.0022509265691041946, 0.00328454771079123, -0.05878821387887001, -0.17475736141204834, 0.11054003983736038, -0.2341618686914444, 0.12567269802093506, 0.03385155275464058, 0.033630870282649994, 0.01047542318701744, 0.022476326674222946, 0.03731917962431908, 0.21305516362190247, 0.022330230101943016, 0.020094221457839012, 0.013293998315930367, -0.05769364535808563, -0.06733287125825882, -0.1858028620481491, 0.0043684691190719604, 0.049280472099781036, 0.010474693961441517, 0.08265087753534317, -0.06427798420190811, -0.2361016869544983, -0.16363151371479034, -0.006736039184033871, -0.004154240246862173, -0.18885166943073273, -0.07844467461109161, 0.034878209233284, -0.045296650379896164, 0.07850536704063416, -0.18049918115139008, 0.12284455448389053, -0.08334522694349289, -0.01567038521170616, -0.11811879277229309, 0.035788606852293015, 0.012682056985795498, 0.01797398552298546, -0.004381327889859676, 0.04414452612400055, 0.17562028765678406, -0.13275612890720367, 0.03655150905251503, -0.28982865810394287, 0.012797574512660503, -0.041488710790872574, 0.1580967754125595, 0.0447218157351017, -0.04166414216160774, 0.050148993730545044, -0.081820547580719, 0.14517833292484283, 0.2118951827287674, -0.08412563800811768, -0.06652364879846573, -0.0568164624273777, -0.1880785971879959, -0.07937037944793701, -0.09390607476234436, -0.0013768380740657449, -0.08797772228717804, -0.0648512914776802, 0.0977330133318901, 0.15639983117580414, 0.0238170325756073, 0.2583339810371399, 0.09292979538440704, 0.07891430705785751, 0.11003051698207855, 0.1425570547580719, 0.009447629563510418, -0.054626818746328354, 0.21082353591918945, -0.016523245722055435, -0.11613548547029495, -0.05961979925632477, 0.13716675341129303, 0.15162235498428345, -0.27934980392456055, 0.08289609104394913, 0.07551948726177216, -0.09115779399871826, 0.1861400455236435, -0.23446571826934814, 0.0275103822350502, -0.15474651753902435, -0.04004456475377083, 0.010980122722685337, -0.10897160321474075, 0.11398138105869293, -0.07528878003358841, -0.07651110738515854, 0.059702999889850616, 0.03689867630600929, 0.3125666081905365, 0.2160497009754181, 0.06052045896649361, 0.028967779129743576, 0.0005123015725985169, -0.10613628476858139, 0.07660159468650818, -0.06392039358615875, -0.09762199223041534, -0.043129805475473404, -0.07652820646762848, -0.035598255693912506, -0.018261998891830444, 0.01827617734670639, 0.20565269887447357, -0.00020497292280197144, 0.07559877634048462, -0.18199171125888824, 0.06255659461021423, 0.10201282799243927, -0.14447090029716492, -0.13538208603858948, -0.07676290720701218, -0.12951548397541046, 0.038961414247751236, -0.17456437647342682, 0.1856009066104889, -0.035435862839221954, 0.05552969127893448, -0.05240290239453316, -0.2652018070220947, -0.05449990928173065, 0.09216559678316116, -0.05271017551422119, 0.0667143166065216, 0.026790251955389977, -0.06719755381345749, -0.1248789131641388, 0.07732811570167542, -0.17381858825683594, 0.08965472131967545, -0.14649014174938202, 0.08729994297027588, -0.1447751224040985, -0.026017000898718834, -0.0712742954492569, -0.10672998428344727, 0.09994753450155258, -0.061560165137052536, 0.11432423442602158, -0.14987772703170776, 0.06120451167225838, 0.14752674102783203, 0.0924995020031929, 0.07202458381652832, 0.026983853429555893, 0.08456896990537643, 0.07901763170957565, 0.008556494489312172, 0.09070748090744019, -0.03452479466795921, -0.03397558256983757, 0.03228981792926788, -0.11104921996593475, -0.09076257795095444, -0.13627901673316956, -0.050919126719236374, -0.12334910780191422, -0.01813969761133194, 0.06390857696533203, 0.027050599455833435, -0.056531358510255814, -0.03751683980226517, -0.13125652074813843, -0.09022875875234604, 0.11440352350473404, -0.27175119519233704, -0.16269846260547638, 0.13187533617019653, 0.07275433838367462, -0.1141158863902092, 0.03067711740732193, 0.07126666605472565, -0.10112563520669937, 0.15026478469371796, -0.10011149197816849, -0.013201357796788216, -0.16648557782173157, 0.14942032098770142, -0.03951714560389519, 0.07268555462360382, 0.008039876818656921, -0.09514416009187698, 0.0320148840546608, -0.1275792270898819, -0.1647198498249054, 0.007742966990917921, -0.20958155393600464, 0.02095143310725689, 0.13506560027599335, -0.045482087880373, 0.11179779469966888, 0.016583045944571495, 0.01973932795226574, -0.036259207874536514, 0.04967694357037544, -0.1189497709274292, 0.30194470286369324, -0.15031717717647552, -0.057137902826070786, 0.09970017522573471, 0.18412046134471893, -0.010352996177971363, -0.036719921976327896, -0.07676565647125244, 0.23848998546600342, 0.029645433649420738, 0.14770959317684174, -0.0008945877198129892, -0.10676860064268112, 0.12883199751377106, -0.0008008776349015534, -0.04480556771159172, 0.021025629714131355, 0.09293196350336075, -0.1394958347082138, -0.09483416378498077, -0.009612499736249447, 0.12098004668951035, 0.0161218773573637, -0.12962201237678528, 0.012990174815058708, -0.09137869626283646, 0.07069841027259827, -0.06163940206170082, -0.07321289926767349, -0.06435023248195648, 0.14168979227542877, 0.06003573536872864, 0.10073497891426086, -0.11330915242433548, 0.00015895637625362724, 0.005780853796750307, -0.18144549429416656, -0.042512837797403336, -0.08191139996051788, -0.024654198437929153, 0.050205476582050323, 0.06640288978815079, 0.022016162052750587, 0.06759815663099289, 0.019818801432847977, -0.006855267100036144, -0.015847083181142807, 0.02636207453906536, 0.08048463612794876, -0.009823514148592949, 0.01709119789302349, 0.014750534668564796, 0.01172511838376522, -0.027996866032481194, 0.14936034381389618, -0.052990950644016266, 0.09547270089387894, -0.032372359186410904, -0.12519073486328125, -0.08238475769758224, 0.03539380803704262, 0.08147045224905014, -0.06410261988639832, -0.16454754769802094, 0.11149077117443085, 0.05696209520101547, 0.19409050047397614, 0.23087510466575623, -0.05363936722278595, 0.06456214934587479, 0.0011290102265775204, 0.21257537603378296, 0.03750895336270332, 0.02616453729569912, 0.3517187237739563, -0.0925145298242569, 0.026888959109783173, 0.11092458665370941, -0.032840628176927567, 0.36124545335769653, -0.1097293570637703, -0.13072027266025543, -0.19786585867404938, -0.057741641998291016, 0.015146264806389809, 0.05498513951897621, 0.1343214213848114, -0.10996494442224503, -0.010437746532261372, -0.015188060700893402, -0.10468817502260208, 0.10174012929201126, -0.03591204434633255, -0.13202501833438873, -0.17828400433063507, -0.07850024104118347, -0.0015474880347028375, -0.04509642720222473, -0.030509429052472115, 0.10465055704116821, -0.023625722154974937, 0.08987998962402344, -0.06643664091825485, -0.026406027376651764, -0.07249534875154495, -0.16173365712165833, -0.03401021659374237, -0.10406584292650223, 0.08450914174318314, 0.3747054636478424, -0.2246885746717453, -0.12711763381958008, -0.11941897869110107, -0.019697094336152077, 0.021014796569943428, -0.08065955340862274, -0.03846748545765877, 0.11992502957582474, -0.06907440721988678, 0.055890485644340515, 0.04908810555934906, 0.1081307977437973, 0.08042221516370773, 0.17870013415813446, 0.15629182755947113, -0.06979495286941528, 0.020964084193110466, 0.0762106329202652, 0.2611580491065979, -0.0026891904417425394, -0.13696788251399994, -0.06164681911468506, -0.12746474146842957, -0.06072348356246948, -0.037929605692625046, 0.0009856781689450145, 0.003289103275164962, 0.09035384654998779, -0.021319666877388954, 0.0855293869972229, -0.03479880094528198, 0.12530912458896637, 0.2751963436603546, -0.10948929190635681, -0.16919191181659698, 0.12689074873924255, -0.032208338379859924, -0.13344065845012665, -0.18904276192188263, -0.036085858941078186, 0.04617016762495041, 0.032395072281360626, 0.057840604335069656, 0.0763021782040596, 0.16129723191261292, -0.08243577927350998, 0.04470799118280411, -0.08871721476316452, 0.02643749490380287, -0.019270578399300575, 0.029762955382466316, 0.2044709473848343, -0.019924204796552658, -0.05165686458349228, -0.06023171544075012, 0.03579121455550194, -0.14181934297084808, -0.17802998423576355, 0.2343311905860901, 0.04874802753329277, -0.024165235459804535, -0.057814083993434906, -0.04419085755944252, 0.02670275792479515, -0.013748774304986, 0.08865153044462204, -0.043666839599609375, -0.030079204589128494, 0.03917675092816353, 0.15210187435150146, -0.13771791756153107, 0.046091388911008835, -0.06098667532205582, 0.007928208447992802, -0.21057268977165222, -0.04187805578112602, 0.11159340292215347, 0.12822972238063812, 0.21569007635116577, -0.03470062464475632, -0.17579464614391327, -0.05070868507027626, -0.28355488181114197, 0.008419619873166084, 0.07232820987701416, 0.11594711244106293, -0.026937104761600494, 0.014595713466405869, -2.6333342162516327e-32, -0.01181815192103386, -0.04732115939259529, -0.05010925978422165, -0.019498087465763092, -0.019092269241809845, 0.013292638584971428, -0.012611620128154755, -0.14810307323932648, 0.033276524394750595, -0.008237991482019424, 0.10213727504014969, 0.09084579348564148, 0.09045685827732086, 0.25601354241371155, -0.012457053177058697, 0.04940253123641014, 0.001564223668538034, 0.05223919823765755, 0.016618851572275162, 0.09984966367483139, 0.06618814170360565, -0.1572234183549881, -0.05218827351927757, 0.10669989883899689, -0.04952950030565262, -0.03705529868602753, -0.045208726078271866, 0.04480311647057533, 0.022702455520629883, 0.23137059807777405, -0.10081592947244644, 0.07131800800561905, -0.03801676258444786, 0.14451751112937927, 0.08233444392681122, 0.02100483700633049, -0.08317950367927551, 0.06682594120502472, -0.22343988716602325, 0.14142218232154846, 0.11490833759307861, -0.028816191479563713, -0.11080336570739746, -0.06956265866756439, 0.18763630092144012, 0.11332603543996811, 0.041963182389736176, 0.0677027478814125, -0.14584976434707642, 0.061702460050582886, -0.018563581630587578, 0.052417002618312836, 0.017990801483392715, -0.05694817751646042, 0.10422417521476746, -0.002935797208920121, 0.04009823128581047, -0.034907836467027664, 0.06766870617866516, 0.0619087889790535, -0.10236448049545288, -0.1246289536356926, -0.08851900696754456, 0.11431049555540085, -0.05626770481467247, 0.016964655369520187, 0.021189454942941666, -0.09364575892686844, 0.036676183342933655, -0.0022195547353476286, 0.13840188086032867, 0.16323353350162506, 0.09320231527090073, -0.03926248103380203, -0.25499218702316284, 0.0784338116645813, 0.014201130717992783, -0.028283605352044106, -0.0072214785031974316, -0.048611823469400406, -0.09521590918302536, -0.15246348083019257, -0.008793793618679047, 0.03308425843715668, 0.061228252947330475, 0.06357529759407043, -0.10862670838832855, -0.029419761151075363, -0.033483266830444336, -0.020992450416088104, -0.11530359089374542, -0.020129702985286713, 0.02632591500878334, -0.04199543595314026, 0.1033707708120346, -0.03411686420440674, 0.02869509905576706, 0.244569331407547, 0.09889520704746246, 0.04209781065583229, -0.07888252288103104, -0.012872488237917423, 0.17043021321296692, -0.026637854054570198, 0.07417663186788559, -0.11382223665714264, 0.21543997526168823, 0.24532142281532288, -0.16285105049610138, -0.024404488503932953, 0.012728427536785603, 0.13599851727485657, 0.010881154797971249, 0.10552346706390381, 0.1308269053697586, 0.06152598187327385, -0.09830042719841003, -0.054346803575754166, 0.07991073280572891, 0.16975724697113037, -0.23023691773414612, -0.059189531952142715, -0.05189218372106552, -0.062325507402420044, 0.027772080153226852, 0.17704427242279053, -0.18239940702915192, -0.043090254068374634, -0.08095093816518784, -0.2395889312028885, 0.0048323399387300014, 0.011390822939574718, 7.371197625616333e-7, -0.31472933292388916, 0.07497192174196243, -0.02928077057003975, -0.11716881394386292, 0.03557950258255005, -0.08699759840965271, -0.26570630073547363, 0.062010787427425385, -0.11354904621839523, -0.11803770065307617, 0.037004254758358, -0.07453196495771408, 0.02057540789246559, 0.04692050442099571, -0.05470989644527435, -0.05676383152604103, -0.1055658832192421, 0.03172501176595688, -0.0877198576927185, 0.19471462070941925, 0.10921458899974823, 0.20371507108211517, 0.024937717244029045, 0.05229533836245537, -0.05937410145998001, 0.058487117290496826, 0.06812330335378647, 0.06406275182962418, 0.04080552980303764, -0.0801057517528534, 0.013255264610052109, 0.23967351019382477, -0.16755731403827667, 0.15457144379615784, -0.15142442286014557, 0.004658625926822424, -0.04244021326303482, -0.22051972150802612, -0.02426699548959732, -0.0914500504732132, -0.021206744015216827, 0.1196674332022667, -0.060008659958839417, -0.15045946836471558, 0.15394136309623718, -0.0027601048350334167, 0.004584431182593107, -0.07546410709619522, -0.09545044600963593, -0.002573298988863826, 0.02706080488860607, 0.023626888170838356, 0.019469691440463066, 0.1991570144891739, 0.07758069783449173, -0.0696178674697876, 0.010722617618739605, -0.1319223940372467, 0.1444701850414276, -0.007700052578002214, -0.08520593494176865, -0.04977729171514511, -0.08087201416492462, 0.052696842700242996, 0.13279841840267181, 0.025385914370417595, 0.013429444283246994, 7.502727003536381e-35, -0.059737276285886765, -0.09440826624631882, 0.14431560039520264, 0.006605428643524647, -0.02156992070376873, 0.0843380019068718, -0.016167204827070236, -0.06043838709592819, 0.05694122985005379, -0.24367928504943848, 0.028215192258358 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
The COCO format is not supported out of the box in the HF's hub - you'd need to reformat it to an [ImageFolder](https://huggingface.co/docs/datasets/image_dataset#imagefolder) with metadata format, or write a [loading script](https://huggingface.co/docs/datasets/image_dataset#loading-script)
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
31
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). The COCO format is not supported out of the box in the HF's hub - you'd need to reformat it to an [ImageFolder](https://huggingface.co/docs/datasets/image_dataset#imagefolder) with metadata format, or write a [loading script](https://huggingface.co/docs/datasets/image_dataset#loading-script)
[ 0.12372873723506927, -0.07853671908378601, 0.03454887866973877, 0.073152557015419, 0.20806117355823517, 0.07824622094631195, -0.007721858099102974, -0.060841724276542664, -0.01758192852139473, 0.17209309339523315, -0.08179426193237305, 0.008095545694231987, -0.08285927027463913, 0.1518341302871704, 0.06134066358208656, -0.1278737187385559, -0.1459185928106308, 0.023530133068561554, -0.1383635401725769, -0.07865438610315323, 0.0019109941786155105, 0.04311509057879448, 0.2589208483695984, -0.07160542160272598, -0.1343022882938385, -0.15329097211360931, -0.23121890425682068, 0.18422067165374756, -0.036115311086177826, -0.24907054007053375, 0.1605236828327179, 0.05524732172489166, 0.10514374077320099, 0.03970642387866974, 0.000005678577508660965, -0.04821799322962761, -0.013196457177400589, -0.04420807957649231, 0.034904517233371735, -0.13846777379512787, 0.09869137406349182, -0.0027587488293647766, -0.03663376718759537, -0.06817816942930222, 0.0011630825465545058, 0.13472804427146912, 0.04417431354522705, 0.0019462889758870006, 0.12234994024038315, 0.1083853542804718, 0.02763485163450241, 0.13526958227157593, 0.011642573401331902, -0.14192068576812744, 0.027536693960428238, 0.09229221194982529, 0.017200753092765808, 0.273427814245224, -0.03915754333138466, 0.10159425437450409, -0.005466128699481487, 0.07345908135175705, 0.18471194803714752, -0.025274060666561127, 0.2407677173614502, 0.07103791832923889, -0.24422387778759003, -0.17258496582508087, -0.016593554988503456, 0.15701600909233093, 0.003085609059780836, -0.010027446784079075, -0.059122566133737564, 0.027009593322873116, 0.050692297518253326, -0.02945544384419918, -0.168672114610672, -0.035264331847429276, 0.05296862870454788, 0.029713070020079613, -0.021145667880773544, -0.19430051743984222, -0.05121669918298721, -0.01187288947403431, 0.1547618806362152, 0.001788960536941886, -0.08856379240751266, -0.022024046629667282, 0.010802742093801498, -0.03872578218579292, 0.05748215317726135, -0.08838381618261337, -0.14881537854671478, 0.05195523425936699, 0.1491594910621643, -0.08641918003559113, 0.08593351393938065, 0.12098973244428635, 0.04750508442521095, -0.03186316788196564, -0.07762843370437622, -0.15241603553295135, -0.2155502885580063, 0.15466398000717163, -0.2170180380344391, 0.02918786182999611, -0.07964512705802917, -0.027672789990901947, 0.046196531504392624, 0.1378161609172821, -0.014890235848724842, 0.0028583076782524586, -0.0665922462940216, 0.0747290700674057, -0.09080377966165543, 0.07879070192575455, -0.10999033600091934, 0.07939009368419647, 0.05822322517633438, -0.02825533039867878, 0.29675227403640747, 0.11456222087144852, -0.0031909614335745573, 0.2284846007823944, 0.08215553313493729, -0.10822909325361252, -0.011778726242482662, 0.17031967639923096, 0.04264358431100845, -0.06735911220312119, -0.13394063711166382, 0.09838142991065979, 0.1647198498249054, -0.008734545670449734, 0.14883416891098022, -0.09769568592309952, -0.023771489039063454, -0.249546080827713, 0.05925404652953148, -0.08657024055719376, -0.1562327742576599, -0.03343404829502106, -0.06700973957777023, 0.018707413226366043, -0.09232275187969208, -0.07668750733137131, 0.12253163009881973, 0.06860347837209702, -0.05675352364778519, -0.06342586129903793, 0.07756702601909637, 0.05705957114696503, -0.2846813201904297, -0.02294955961406231, 0.005530317313969135, -0.03741294518113136, -0.16801992058753967, 0.11428571492433548, -0.2785640060901642, 0.09563612192869186, 0.07427731156349182, 0.0669122114777565, 0.008982524275779724, 0.019981442019343376, 0.015841122716665268, 0.1880786120891571, -0.0002904882712755352, -0.047312863171100616, -0.020192841067910194, -0.07165499776601791, -0.05984007567167282, -0.2261456400156021, -0.0044035762548446655, 0.02834061160683632, -0.014914123341441154, 0.04750636965036392, -0.11769350618124008, -0.20361502468585968, -0.06775666028261185, -0.041379306465387344, -0.04949573799967766, -0.12830069661140442, -0.04276188835501671, 0.10022912919521332, -0.08478278666734695, 0.10394451022148132, -0.1799020767211914, 0.10998767614364624, -0.16169698536396027, -0.08621639758348465, -0.049567632377147675, -0.039567455649375916, 0.032802876085042953, -0.018520817160606384, -0.001749906106851995, 0.04968244582414627, 0.14865639805793762, -0.17858649790287018, -0.009125192649662495, -0.2799900472164154, -0.01022811233997345, -0.0345362089574337, 0.14834395051002502, 0.029077697545289993, -0.0371706560254097, -0.024831943213939667, -0.143917977809906, 0.1305389255285263, 0.21133311092853546, -0.04423580691218376, -0.09362170845270157, -0.06415582448244095, -0.1648530662059784, -0.12362458556890488, -0.12670129537582397, -0.05305979400873184, -0.09326718747615814, -0.1103949323296547, 0.10275613516569138, 0.13766410946846008, 0.016700567677617073, 0.22627589106559753, 0.10398117452859879, 0.1065632700920105, 0.0680626928806305, 0.0961572527885437, 0.043182581663131714, -0.02913142926990986, 0.2590329647064209, 0.005120039917528629, -0.07946231961250305, -0.0446205772459507, 0.14583827555179596, 0.11907624453306198, -0.29482778906822205, 0.13440349698066711, 0.06656971573829651, -0.13257838785648346, 0.1712561398744583, -0.16467975080013275, -0.004474037792533636, -0.11333883553743362, -0.05776727944612503, 0.029870226979255676, -0.06892021000385284, 0.08631321042776108, -0.11565083265304565, -0.04948782920837402, 0.09831427782773972, 0.0430932380259037, 0.28633520007133484, 0.16252227127552032, 0.0574551559984684, -0.051286451518535614, 0.007554041687399149, -0.11176135390996933, 0.0999053344130516, -0.00827439408749342, -0.09778057038784027, -0.07151959836483002, -0.058314017951488495, -0.08182158321142197, -0.06673672795295715, 0.016520977020263672, 0.24461758136749268, 0.0004125690902583301, 0.0903400108218193, -0.17186293005943298, -0.009309902787208557, 0.12287291139364243, -0.13404004275798798, -0.15172283351421356, -0.02265472151339054, -0.09073225408792496, -0.02687028795480728, -0.16223888099193573, 0.2123449593782425, -0.04418841749429703, 0.06731849908828735, -0.07466532289981842, -0.27014589309692383, -0.04252076894044876, 0.04437035694718361, -0.03734444081783295, 0.07360321283340454, 0.03654307499527931, -0.10155706852674484, -0.15752959251403809, 0.029777005314826965, -0.11747172474861145, 0.06463563442230225, -0.07000977545976639, 0.04899197071790695, -0.15464720129966736, -0.03052263893187046, -0.10893205553293228, -0.01944621466100216, 0.1287859082221985, -0.043125469237565994, 0.08406892418861389, -0.13275371491909027, 0.0917414128780365, 0.08488974720239639, 0.03681100532412529, 0.038603562861680984, -0.027329586446285248, 0.0830112025141716, 0.029229702427983284, -0.008256359025835991, 0.05063094571232796, -0.06362839788198471, -0.008953912183642387, -0.01344528142362833, -0.08134627342224121, -0.018314575776457787, -0.08138144761323929, -0.020606394857168198, -0.16496001183986664, -0.004229381680488586, 0.038731034845113754, 0.021189246326684952, -0.016845805570483208, -0.03089251182973385, -0.0927240252494812, -0.11358791589736938, 0.10545438528060913, -0.2043769508600235, -0.1593315601348877, 0.21197518706321716, 0.07144735008478165, -0.06847300380468369, 0.062311042100191116, 0.0702824667096138, -0.03614722937345505, 0.09344813972711563, -0.016615496948361397, -0.0224130991846323, -0.16335858404636383, 0.10735361278057098, -0.020003115758299828, 0.06573060899972916, -0.04299142584204674, -0.12151676416397095, 0.021640336140990257, -0.0790448859333992, -0.19173873960971832, -0.013095139525830746, -0.13939012587070465, 0.032297395169734955, 0.11472966521978378, -0.005126803647726774, 0.12606307864189148, 0.025477062910795212, -0.00450561149045825, -0.07655725628137589, 0.08101287484169006, -0.060662876814603806, 0.2082689106464386, -0.16503357887268066, -0.10656125843524933, 0.17801013588905334, 0.2054809033870697, 0.04785284772515297, -0.07778783142566681, -0.13964281976222992, 0.20591938495635986, 0.045885033905506134, 0.1656564176082611, -0.02032621204853058, -0.09047325700521469, 0.16059507429599762, 0.030869007110595703, -0.028043439611792564, 0.08268570899963379, 0.09944478422403336, -0.046714119613170624, -0.06217934191226959, -0.00927114300429821, 0.10197704285383224, 0.04080386459827423, -0.13065774738788605, 0.0034251739270985126, -0.07597560435533524, 0.02948375977575779, -0.04097816348075867, -0.09296032786369324, -0.07946125417947769, 0.11153587698936462, 0.050962693989276886, 0.11981840431690216, -0.03063942678272724, 0.01600564457476139, -0.04837644845247269, -0.1861538141965866, -0.05193649232387543, -0.07257608324289322, -0.026910487562417984, 0.09258578717708588, 0.02441607415676117, -0.022311951965093613, 0.07784852385520935, 0.02881138026714325, 0.0532153956592083, -0.036881223320961, -0.03237970545887947, -0.0039019405376166105, -0.030434882268309593, 0.058144014328718185, 0.06499701738357544, -0.001128394971601665, 0.004953145980834961, 0.17578358948230743, -0.023854035884141922, 0.03934250771999359, 0.009066113270819187, -0.08432431519031525, -0.0605940967798233, 0.04662742093205452, 0.15573059022426605, -0.07575256377458572, -0.1462039202451706, 0.07795850187540054, 0.036098554730415344, 0.15195319056510925, 0.2605205774307251, -0.052157312631607056, 0.08388423174619675, -0.027820732444524765, 0.1650359183549881, 0.06082933396100998, 0.0098591772839427, 0.31509193778038025, -0.07125427573919296, 0.006155714858323336, 0.1551642268896103, -0.013068480417132378, 0.27866125106811523, -0.1723254770040512, -0.18164314329624176, -0.22319011390209198, 0.023572763428092003, 0.019724635407328606, 0.06218862906098366, 0.1093767061829567, -0.028343865647912025, 0.0454677976667881, -0.016041137278079987, -0.09139132499694824, 0.1271582394838333, 0.0056297979317605495, -0.13817864656448364, -0.1221853569149971, -0.07372971624135971, 0.042036302387714386, -0.023713743314146996, -0.025237252935767174, 0.10207913815975189, 0.0693286880850792, 0.0605112761259079, -0.05893182009458542, 0.003228193847462535, -0.07608446478843689, -0.14880135655403137, -0.051438745111227036, -0.04935068264603615, -0.008101238869130611, 0.3783283233642578, -0.19904093444347382, -0.10837540030479431, -0.05249261483550072, -0.028323020786046982, 0.04120129346847534, -0.023016609251499176, -0.04205197095870972, 0.18222451210021973, -0.06548146158456802, 0.06744297593832016, -0.004703042563050985, 0.0570300929248333, 0.08355821669101715, 0.16525009274482727, 0.08614079654216766, -0.06851018220186234, 0.0007255589589476585, -0.0011695693247020245, 0.2547740638256073, -0.01334553025662899, -0.09790646284818649, -0.03581886366009712, -0.05797410383820534, -0.030553309246897697, -0.021129583939909935, -0.03395639732480049, -0.06689945608377457, 0.037442900240421295, 0.03715495765209198, 0.08753249794244766, -0.005582182668149471, 0.10640140622854233, 0.220770001411438, -0.1041741892695427, -0.1271272897720337, 0.10719510912895203, -0.061677221208810806, -0.11037943512201309, -0.18916742503643036, 0.019051775336265564, 0.15204426646232605, 0.06222395971417427, 0.06412197649478912, 0.06962376087903976, 0.17388026416301727, -0.06831687688827515, 0.06564591825008392, -0.15057165920734406, -0.0038258368149399757, 0.0026451917365193367, 0.028492378070950508, 0.1582634001970291, -0.0013709560735151172, -0.04049308970570564, -0.06953102350234985, 0.07185375690460205, -0.1048937514424324, -0.22522978484630585, 0.19972974061965942, 0.033567942678928375, -0.06097208708524704, -0.04609868302941322, -0.0655038058757782, 0.00925727654248476, 0.0004591865581460297, 0.12121423333883286, -0.047799307852983475, -0.0846005454659462, 0.04681972414255142, 0.17893022298812866, -0.15019488334655762, 0.029131891205906868, -0.011885958723723888, 0.006830692291259766, -0.2098957598209381, 0.0010406619403511286, 0.09797514975070953, 0.09134812653064728, 0.19877713918685913, 0.03422136232256889, -0.22076337039470673, -0.06863182038068771, -0.2294759750366211, -0.02674172632396221, 0.14375144243240356, 0.14167420566082, -0.05996349826455116, -0.005829561036080122, -2.7593395699465016e-32, -0.07015834003686905, -0.07232929021120071, -0.05104320868849754, 0.01507964264601469, -0.01700684428215027, 0.058211591094732285, -0.03840258717536926, -0.06544838100671768, 0.0009507971699349582, -0.04139168560504913, 0.09663312137126923, 0.03363357111811638, 0.09995730221271515, 0.19332049787044525, -0.023993829265236855, 0.04237879812717438, 0.04663792997598648, 0.04624393954873085, 0.016972124576568604, 0.12471631914377213, 0.06562847644090652, -0.1315491646528244, -0.031898319721221924, 0.0052585117518901825, -0.09910669922828674, 0.016850080341100693, -0.09108516573905945, 0.02718047983944416, 0.022876616567373276, 0.21994614601135254, -0.10312327742576599, 0.027515167370438576, -0.06869178265333176, 0.14997631311416626, 0.09917418658733368, 0.028798960149288177, -0.1293017864227295, 0.05936577543616295, -0.22520282864570618, 0.16017061471939087, 0.12767262756824493, -0.007855032570660114, -0.1545339971780777, -0.08030170202255249, 0.23085646331310272, 0.08453093469142914, 0.06300652772188187, 0.013736449182033539, -0.06785064190626144, -0.012465550564229488, -0.002142840065062046, 0.07911752164363861, 0.008480329997837543, -0.060878925025463104, 0.10934331268072128, -0.007106492295861244, 0.07446416467428207, -0.021424783393740654, 0.059615764766931534, 0.03508726879954338, -0.12269874662160873, -0.0614093579351902, -0.0804566890001297, 0.0844835415482521, -0.022737562656402588, 0.068757563829422, -0.05300720036029816, -0.16676805913448334, 0.013009632006287575, -0.04103356972336769, 0.1531657576560974, 0.18859705328941345, 0.10860705375671387, -0.030243633314967155, -0.23854398727416992, 0.10675716400146484, -0.025898413732647896, -0.06120854988694191, 0.019751103594899178, -0.050822995603084564, -0.04757607728242874, -0.08480403572320938, 0.002831915160641074, 0.0666695311665535, 0.07855051010847092, 0.08762457966804504, -0.07351309806108475, -0.05632337927818298, -0.011007420718669891, 0.01851874776184559, -0.16842013597488403, -0.04547997936606407, 0.07100512087345123, -0.042309992015361786, 0.03715675696730614, -0.019836198538541794, 0.05975984409451485, 0.2535754144191742, 0.06018643453717232, 0.010591174475848675, 0.005727841053158045, -0.08629367500543594, 0.22630061209201813, -0.02445179410278797, 0.08347221463918686, -0.10578031092882156, 0.2348022162914276, 0.24454720318317413, -0.21334612369537354, -0.046225037425756454, -0.014678947627544403, 0.10540208965539932, 0.002605454297736287, 0.14517518877983093, 0.10217001289129257, 0.01964454911649227, -0.15266826748847961, -0.10712417960166931, 0.06268153339624405, 0.13423693180084229, -0.21799029409885406, -0.07306807488203049, -0.07687073945999146, -0.0494895875453949, -0.003127730917185545, 0.1766393929719925, -0.2409093976020813, -0.070415198802948, -0.07400892674922943, -0.24432794749736786, -0.044212907552719116, 0.008633367717266083, 7.411076126118132e-7, -0.26801976561546326, 0.0830191969871521, 0.030545659363269806, -0.10680396109819412, 0.024262601509690285, -0.07660719007253647, -0.2058544009923935, 0.013903627172112465, -0.13952597975730896, -0.08291156589984894, 0.029927941039204597, -0.04754823446273804, 0.03044506162405014, -0.002403716091066599, -0.046571653336286545, -0.07827608287334442, -0.12131178379058838, -0.04876544699072838, -0.04008252173662186, 0.14967955648899078, 0.05120125040411949, 0.23204505443572998, 0.05784649774432182, 0.07073038071393967, 0.0032056800555437803, 0.01101965643465519, 0.043034520000219345, 0.06987394392490387, 0.06545419245958328, -0.05328916385769844, 0.03351026400923729, 0.17680777609348297, -0.16867026686668396, 0.13773790001869202, -0.16166606545448303, -0.006835707928985357, -0.007763582747429609, -0.17098790407180786, -0.05983784794807434, -0.07366344332695007, -0.00837012380361557, 0.16133765876293182, -0.047481607645750046, -0.20066498219966888, 0.14563365280628204, 0.058870721608400345, -0.0002569246862549335, -0.08352819830179214, -0.1528741419315338, 0.030596468597650528, 0.012332418002188206, -0.028154544532299042, 0.06809501349925995, 0.23913979530334473, 0.09580442309379578, -0.09367512911558151, 0.03894208371639252, -0.1460704803466797, 0.11440170556306839, -0.042805448174476624, -0.10750583559274673, -0.03730843588709831, -0.10792405158281326, 0.09731663763523102, 0.09226150810718536, -0.008192500099539757, -0.05176225304603577, 1.2396937911214544e-34, -0.0033893745858222246, -0.08000142872333527, 0.10565084218978882, 0.0014112386852502823, -0.06504222750663757, 0.13860860466957092, -0.01671828143298626, 0.008967802859842777, 0.05916734039783478, -0.18544073402881622, 0.004982151556760073 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
> The COCO format is not supported out of the box in the HF's hub - you'd need to reformat it to an [ImageFolder](https://huggingface.co/docs/datasets/image_dataset#imagefolder) with metadata format, or write a [loading script](https://huggingface.co/docs/datasets/image_dataset#loading-script) Hi @lhoestq , thank you for your quick reply. I've correctly created a metadata.jsonl file for a dataset with instance segmentation annotations [here](https://huggingface.co/datasets/lombardata/data_2017) but do not understand how I can integrate panoptic annotations with the metadata format of ImageFolder datasets. The "problem" with panoptic annotations is that we have a folder with images, a json file with annotations and another folder with png annotations. I checked between all the datasets already published on HuggingFace and, the only one who has uploaded a correct panoptic dataset is @NielsRogge [here](https://huggingface.co/datasets/nielsr/coco-panoptic-val2017) and [here](https://huggingface.co/datasets/nielsr/ade20k-panoptic-demo). Indeed he accomplished to have three fields : 1.image (image) 2.label (image) 3.segments_info (list) but I not find the corresponding code that allows to upload a panoptic dataset from this 3 sources. Can you please share an example code? Thanks !
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
163
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). > The COCO format is not supported out of the box in the HF's hub - you'd need to reformat it to an [ImageFolder](https://huggingface.co/docs/datasets/image_dataset#imagefolder) with metadata format, or write a [loading script](https://huggingface.co/docs/datasets/image_dataset#loading-script) Hi @lhoestq , thank you for your quick reply. I've correctly created a metadata.jsonl file for a dataset with instance segmentation annotations [here](https://huggingface.co/datasets/lombardata/data_2017) but do not understand how I can integrate panoptic annotations with the metadata format of ImageFolder datasets. The "problem" with panoptic annotations is that we have a folder with images, a json file with annotations and another folder with png annotations. I checked between all the datasets already published on HuggingFace and, the only one who has uploaded a correct panoptic dataset is @NielsRogge [here](https://huggingface.co/datasets/nielsr/coco-panoptic-val2017) and [here](https://huggingface.co/datasets/nielsr/ade20k-panoptic-demo). Indeed he accomplished to have three fields : 1.image (image) 2.label (image) 3.segments_info (list) but I not find the corresponding code that allows to upload a panoptic dataset from this 3 sources. Can you please share an example code? Thanks !
[ 0.12082384526729584, -0.18657545745372772, -0.04172132909297943, 0.10460475087165833, 0.2313598245382309, 0.04338958114385605, -0.06268314272165298, -0.17302513122558594, -0.16882382333278656, 0.10601446032524109, -0.08170059323310852, 0.0375770702958107, -0.0033848099410533905, 0.02654232271015644, 0.06233014166355133, -0.13440625369548798, -0.1670246422290802, 0.014257689006626606, -0.10734870284795761, -0.009373849257826805, 0.027758093550801277, 0.04970874264836311, 0.19435009360313416, -0.03718455880880356, -0.16697721183300018, -0.13524745404720306, -0.18048085272312164, 0.22530607879161835, -0.07047595083713531, -0.21812407672405243, 0.1563376784324646, 0.017336739227175713, 0.1202513575553894, 0.12823617458343506, 0.00000545488592251786, -0.05289316922426224, 0.037213344126939774, -0.021132949739694595, 0.037889234721660614, -0.1556248962879181, 0.11890280991792679, 0.007931333035230637, -0.018758626654744148, -0.10924102365970612, 0.0653073862195015, 0.035824790596961975, 0.011827570386230946, 0.02441098913550377, 0.1449139416217804, 0.09006930887699127, -0.011762534268200397, 0.11372723430395126, 0.05330581218004227, -0.08162184059619904, 0.034602221101522446, 0.11043576896190643, -0.0030811328906565905, 0.29948243498802185, -0.08354179561138153, 0.1320953220129013, 0.008479817770421505, 0.032782211899757385, 0.09588555246591568, -0.011148182675242424, 0.17250001430511475, 0.05546913668513298, -0.23694270849227905, -0.23941868543624878, -0.03215153142809868, 0.04310980811715126, 0.13969816267490387, -0.0275004543364048, -0.10082904994487762, 0.02189338393509388, 0.03230038657784462, -0.024166664108633995, -0.13907881081104279, -0.09044717997312546, 0.05953188240528107, -0.045483723282814026, -0.010625000111758709, -0.19848905503749847, -0.10222229361534119, -0.022572016343474388, 0.12667226791381836, 0.09183551371097565, -0.06657367199659348, -0.0996805876493454, -0.011149667203426361, -0.08102881908416748, 0.08569546788930893, -0.1652858406305313, -0.1362008899450302, 0.012513360008597374, 0.24694319069385529, -0.11341667175292969, 0.08502254635095596, 0.1135207861661911, 0.03336604684591293, -0.04308639466762543, -0.12136808782815933, -0.17454542219638824, -0.24747434258460999, 0.15267182886600494, -0.12487703561782837, 0.07945039868354797, 0.0010111782466992736, 0.09729287028312683, 0.03808927163481712, 0.05329563096165657, -0.07831474393606186, 0.08518362045288086, -0.0008488035527989268, 0.031852345913648605, 0.034488022327423096, 0.08769313991069794, -0.06563311070203781, 0.07697472721338272, 0.09751512110233307, -0.04249848425388336, 0.21557870507240295, -0.03444164618849754, 0.05990573391318321, 0.1369847059249878, 0.18148888647556305, -0.12322504073381424, -0.027987094596028328, 0.16638804972171783, 0.07061696797609329, 0.013337920419871807, -0.03297216817736626, 0.15600769221782684, 0.12760908901691437, 0.001426628907211125, 0.11220186203718185, -0.10103414207696915, 0.018109237775206566, -0.20265214145183563, 0.04361986368894577, -0.03407343104481697, -0.19326996803283691, -0.0874692052602768, -0.15616537630558014, -0.015060504898428917, 0.01565641164779663, -0.0028335850220173597, 0.025690974667668343, 0.24086810648441315, -0.065679632127285, -0.032599277794361115, 0.08988960087299347, 0.07717680186033249, -0.29991865158081055, 0.043700482696294785, 0.021948708221316338, 0.0412476509809494, -0.21566826105117798, 0.08760447055101395, -0.20076344907283783, 0.07088379561901093, 0.036311715841293335, 0.04755532741546631, 0.04166505113244057, 0.03214612603187561, -0.011801213026046753, 0.15789639949798584, 0.006623192224651575, 0.06032630801200867, 0.056911349296569824, -0.1049349308013916, -0.030483372509479523, -0.17546965181827545, -0.06947866827249527, 0.08056079596281052, 0.0009947933722287416, 0.10763993859291077, -0.11275319755077362, -0.2264479249715805, -0.10790316760540009, -0.06242482364177704, -0.02508394792675972, -0.14214321970939636, -0.0393836535513401, 0.002092469949275255, -0.08595272153615952, 0.101873479783535, -0.18804986774921417, 0.0380215123295784, -0.08513364940881729, -0.062399350106716156, -0.12088413536548615, 0.0731394961476326, -0.05956143140792847, -0.08717692643404007, -0.07380170375108719, 0.029419230297207832, 0.16153016686439514, -0.11383243650197983, -0.03169186785817146, -0.2547662556171417, -0.022109046578407288, 0.01306596864014864, 0.11374898999929428, -0.0011954216752201319, -0.03927621245384216, 0.009012904018163681, -0.18350686132907867, 0.09095173329114914, 0.24496853351593018, -0.036651648581027985, -0.12966035306453705, -0.033289916813373566, -0.21600793302059174, -0.14159920811653137, -0.14520089328289032, -0.05268554016947746, -0.12389767915010452, 0.00952711421996355, 0.10012275725603104, 0.005830361507833004, 0.009992307052016258, 0.15607258677482605, 0.16563570499420166, 0.13107948005199432, 0.05141730234026909, 0.11205083131790161, -0.0038362955674529076, -0.10607320815324783, 0.19049377739429474, -0.01729232259094715, -0.0836879089474678, -0.05280207097530365, 0.12633013725280762, 0.10419219732284546, -0.24030359089374542, 0.09840485453605652, 0.167832612991333, -0.06898748129606247, 0.09434308856725693, -0.1609911173582077, 0.052980080246925354, -0.1595918834209442, -0.017846988514065742, -0.047040581703186035, -0.17136217653751373, 0.1522454023361206, -0.058449212461709976, -0.029942980036139488, 0.07955939322710037, -0.022251827642321587, 0.32160893082618713, 0.1376529335975647, 0.023877795785665512, -0.051007915288209915, -0.03934643417596817, -0.16483011841773987, 0.10701337456703186, 0.007641986943781376, -0.02949371002614498, -0.08389230817556381, -0.07940615713596344, -0.05465001240372658, -0.10844455659389496, 0.008961884304881096, 0.23022766411304474, -0.05308621749281883, 0.037840425968170166, -0.1841147243976593, 0.1362595111131668, 0.1753307729959488, -0.11257889866828918, -0.1926070600748062, -0.09957911819219589, -0.11783083528280258, 0.06679632514715195, -0.18213269114494324, 0.24326516687870026, -0.06680961698293686, 0.06568223983049393, -0.007330767344683409, -0.16699637472629547, -0.07563409954309464, 0.0708722174167633, -0.05549555644392967, 0.04104581102728844, 0.10376790910959244, -0.0820528119802475, -0.20011436939239502, 0.043771788477897644, -0.2267230749130249, 0.05335138738155365, -0.11007232218980789, 0.06576242297887802, -0.05371903255581856, 0.01896415837109089, -0.07075593620538712, -0.06618590652942657, 0.05393983796238899, -0.01968519575893879, -0.057127565145492554, -0.16619832813739777, 0.08681021630764008, 0.19077222049236298, 0.05220292881131172, 0.061439141631126404, 0.06251370161771774, 0.11089915037155151, 0.10656506568193436, -0.056181248277425766, -0.0061868904158473015, -0.04856211319565773, 0.06704403460025787, 0.002638081321492791, -0.03305608034133911, -0.056272219866514206, -0.17292940616607666, 0.02737952210009098, -0.12425071746110916, 0.040021587163209915, 0.09666749089956284, 0.007846606895327568, 0.009754794649779797, -0.03745829686522484, -0.11976566165685654, -0.16237103939056396, 0.11285484582185745, -0.16640989482402802, -0.14864978194236755, 0.08055683225393295, 0.15041664242744446, -0.07959473878145218, 0.09146158397197723, 0.05900483578443527, -0.09743160009384155, 0.0697094202041626, -0.08109425008296967, 0.014335310086607933, -0.1591024398803711, 0.13604970276355743, -0.021576829254627228, 0.08855261653661728, 0.0314766950905323, -0.08093488216400146, 0.06440288573503494, -0.04740463197231293, -0.11043437570333481, -0.11211255192756653, -0.09563285112380981, 0.003481661668047309, 0.07424188405275345, 0.017633112147450447, 0.07467527687549591, 0.05677879974246025, -0.05890317261219025, -0.03738187253475189, 0.05831235274672508, -0.09765734523534775, 0.16897253692150116, -0.057719532400369644, -0.053110916167497635, 0.17084850370883942, 0.15686319768428802, 0.013549872674047947, -0.022677870467305183, -0.14250361919403076, 0.18878085911273956, 0.047482654452323914, 0.14895063638687134, -0.05663444474339485, -0.03657999634742737, 0.1485135853290558, 0.008904819376766682, -0.029031017795205116, 0.03604172542691231, 0.13369742035865784, -0.06517890095710754, -0.09424599260091782, 0.036477092653512955, 0.06790700554847717, 0.03562627360224724, -0.0856735035777092, -0.07777396589517593, -0.05683412775397301, 0.018351400271058083, -0.0537521168589592, -0.054329775273799896, -0.02280976064503193, 0.09604256600141525, 0.07080625742673874, 0.1483275443315506, -0.10976669937372208, 0.014674625359475613, 0.07125144451856613, -0.1474093645811081, -0.028935641050338745, -0.11986560374498367, 0.08912835270166397, 0.04525221884250641, 0.11377334594726562, 0.02207116410136223, 0.09161839634180069, -0.04282067343592644, 0.0180392824113369, 0.003280939068645239, 0.08812741190195084, 0.14093077182769775, -0.013767581433057785, -0.014966516755521297, 0.01173036452382803, -0.02474348247051239, 0.02595818229019642, 0.2288675606250763, -0.06747177988290787, 0.05702652782201767, 0.02700633928179741, -0.07689191401004791, -0.04641057923436165, 0.029298104345798492, 0.06224426254630089, -0.11298222839832306, -0.15335629880428314, 0.12378282099962234, 0.09511688351631165, 0.10361283272504807, 0.22077859938144684, -0.01795080676674843, 0.07066445052623749, -0.0038915532641112804, 0.1552664041519165, 0.0296797938644886, 0.053402870893478394, 0.2552051842212677, -0.05516367405653, 0.026484398171305656, 0.10107992589473724, -0.042381566017866135, 0.3639427721500397, -0.11189542710781097, -0.24342593550682068, -0.22888807952404022, 0.002817111788317561, -0.008383014239370823, 0.08313686400651932, 0.11485368758440018, -0.09113600105047226, -0.06138386204838753, -0.06822097301483154, -0.010570645332336426, 0.04611606523394585, 0.018446680158376694, -0.18991625308990479, -0.14655235409736633, -0.13112938404083252, 0.04801064357161522, -0.09390127658843994, -0.036678045988082886, 0.049389779567718506, -0.0037637115456163883, 0.04080678150057793, -0.04019124433398247, -0.05464406684041023, -0.07664665579795837, -0.055105388164520264, -0.054589152336120605, -0.03475392982363701, 0.11614255607128143, 0.38768911361694336, -0.10899561643600464, -0.12389331310987473, -0.019875364378094673, 0.07324226945638657, -0.05021626502275467, -0.07952843606472015, -0.029131464660167694, 0.23002901673316956, -0.11208469420671463, 0.03708120062947273, -0.016111699864268303, 0.12313762307167053, 0.12146599590778351, 0.1915159970521927, 0.1622932404279709, -0.08800070732831955, -0.05105167254805565, 0.02007276751101017, 0.20969192683696747, -0.05327017977833748, -0.13871897757053375, -0.051349736750125885, -0.15496399998664856, -0.06631763279438019, -0.022972024977207184, 0.021924644708633423, -0.09362911432981491, -0.0213539469987154, -0.023731578141450882, 0.05169380456209183, 0.014712497591972351, 0.08571851998567581, 0.23307150602340698, -0.1402750015258789, -0.1753983199596405, 0.06794723868370056, -0.0006662286468781531, -0.0416957251727581, -0.1924167424440384, -0.023387622088193893, 0.1537303626537323, 0.032882094383239746, 0.13228796422481537, 0.054086051881313324, 0.12121900916099548, -0.10113171488046646, 0.046919431537389755, -0.08733134716749191, -0.030164672061800957, -0.06581638753414154, 0.003678732318803668, 0.1892809271812439, 0.01150344219058752, -0.029243139550089836, -0.07604797184467316, 0.03865958750247955, -0.08258023858070374, -0.18185089528560638, 0.2030431479215622, 0.03838628530502319, 0.005749941803514957, -0.0614875927567482, -0.025126803666353226, -0.01747076027095318, -0.026161905378103256, 0.16371025145053864, -0.09031356126070023, -0.041282959282398224, -0.05289686843752861, 0.11769016087055206, -0.12085498124361038, -0.003686815733090043, -0.0006043800967745483, -0.007376531139016151, -0.12820236384868622, -0.13885986804962158, 0.09394361078739166, 0.09455053508281708, 0.1798284351825714, -0.01761908084154129, -0.18107502162456512, 0.0010831726249307394, -0.24702896177768707, 0.02772020734846592, 0.07768853008747101, 0.15315495431423187, 0.022071944549679756, 0.02991807460784912, -2.641252933945947e-32, -0.06854987144470215, -0.014652138575911522, 0.04121270030736923, 0.16302302479743958, 0.004694841336458921, 0.03293968737125397, -0.000836973893456161, -0.11114174872636795, 0.019210003316402435, -0.08584702014923096, 0.16023394465446472, 0.05825088918209076, 0.07870233803987503, 0.2272588163614273, 0.024218758568167686, 0.010933825746178627, -0.09336861222982407, 0.0804356187582016, 0.055037930607795715, 0.08951804041862488, 0.0959329828619957, -0.17684319615364075, -0.03162289038300514, -0.05294432118535042, -0.014376032166182995, 0.018589217215776443, -0.13608966767787933, -0.07947950065135956, 0.041778258979320526, 0.3018776476383209, -0.0653645470738411, 0.042433228343725204, -0.009719147346913815, 0.10938036441802979, 0.02748148888349533, 0.08035684376955032, -0.013365154154598713, -0.004543297924101353, -0.2050105780363083, 0.2123435139656067, 0.04864942654967308, 0.015144367702305317, -0.11840064078569412, -0.12011073529720306, 0.25297221541404724, 0.08225920796394348, 0.05287238955497742, 0.07147320359945297, -0.13144443929195404, 0.0264586228877306, 0.016452675685286522, 0.026145368814468384, 0.030430147424340248, -0.10112293064594269, 0.19018036127090454, -0.10057296603918076, 0.04148826748132706, -0.00021305758855305612, 0.07549801468849182, 0.0977575033903122, -0.09044093638658524, -0.12543202936649323, -0.07623149454593658, 0.21617677807807922, -0.02883678302168846, 0.008861174806952477, 0.09183391183614731, -0.06777685880661011, 0.13321207463741302, -0.11490535736083984, 0.15108709037303925, 0.10973471403121948, 0.10545561462640762, -0.04328944534063339, -0.22376425564289093, 0.19115406274795532, 0.02806016616523266, -0.09043876081705093, -0.0722222849726677, -0.07678752392530441, -0.08296012878417969, -0.13331635296344757, -0.04710780829191208, 0.07977242022752762, 0.0788515955209732, 0.01381299551576376, -0.1121213287115097, 0.048305243253707886, -0.040340274572372437, -0.028249302878975868, -0.07899213582277298, -0.011197870597243309, -0.029111646115779877, -0.027237210422754288, 0.08066385984420776, -0.020251382142305374, 0.05284800007939339, 0.233275905251503, -0.010772126726806164, 0.07976432889699936, -0.06242608278989792, -0.016847848892211914, 0.18320219218730927, -0.038956914097070694, 0.0926172286272049, -0.0435243584215641, 0.3518085181713104, 0.2085031121969223, -0.18259510397911072, -0.08209839463233948, 0.03684533014893532, 0.04185207933187485, 0.011226817965507507, 0.0449528843164444, 0.12157585471868515, 0.02634938433766365, -0.20794671773910522, -0.1348787397146225, 0.038467567414045334, 0.18063296377658844, -0.15326900780200958, -0.08618157356977463, -0.059685248881578445, -0.12638461589813232, 0.056944169104099274, 0.21836119890213013, -0.18528109788894653, -0.10741467028856277, -0.061459556221961975, -0.17371168732643127, -0.021579386666417122, -0.0379137322306633, 7.271948447851173e-7, -0.2257237434387207, 0.13959144055843353, -0.016856398433446884, -0.15194490551948547, 0.06958840042352676, -0.02740742452442646, -0.27258506417274475, 0.035735052078962326, -0.14976856112480164, -0.11045144498348236, 0.13806357979774475, -0.07118971645832062, -0.039766594767570496, 0.00733273196965456, -0.026380669325590134, -0.009727319702506065, -0.04758657515048981, 0.024105018004775047, -0.11780920624732971, 0.21294717490673065, 0.11941283196210861, 0.17085008323192596, -0.017410241067409515, 0.07439380884170532, -0.10894216597080231, 0.0757535770535469, 0.05208363011479378, 0.04376647621393204, 0.098026342689991, -0.05826495215296745, 0.015365740284323692, 0.23666925728321075, -0.10493677109479904, 0.20120523869991302, -0.19980870187282562, 0.0001272611552849412, -0.07892852276563644, -0.21825401484966278, -0.06266961246728897, -0.06166405975818634, 0.044653140008449554, 0.1313425451517105, -0.059894781559705734, -0.18750332295894623, 0.0752449557185173, -0.00797201693058014, -0.05242510139942169, -0.13840483129024506, -0.1499979943037033, 0.09033047407865524, 0.05591613054275513, 0.0022461097687482834, -0.011154950596392155, 0.17045645415782928, 0.10841256380081177, -0.08510516583919525, -0.02799324318766594, -0.13674291968345642, 0.18016284704208374, 0.024450154975056648, -0.07774168252944946, 0.012213882990181446, -0.11833367496728897, 0.0096526388078928, 0.16196519136428833, -0.021801086142659187, 0.04038675129413605, 9.957053597232736e-35, -0.01050188485532999, -0.12763141095638275, 0.07781606167554855, -0.09661625325679779, -0.08408896625041962, 0.10911138355731964, 0.04308384284377098, -0.00596635090187192, 0.06581363826990128, -0.19872263073921204, 0.09983988851308823 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
Both were uploaded using `ds.push_to_hub()` :) You can get a Dataset from a python dictionary using `ds = Dataset.from_dict(...)` and casts the paths to images to the `Image()` type using `ds = ds.cast_column("image", Image())`. ```python from datasets import Dataset, Image ds = Dataset.from_dict(...) ds = ds.cast_column("image", Image()) ds = ds.cast_column("label", Image()) ds.push_to_hub(...) ```
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
53
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Both were uploaded using `ds.push_to_hub()` :) You can get a Dataset from a python dictionary using `ds = Dataset.from_dict(...)` and casts the paths to images to the `Image()` type using `ds = ds.cast_column("image", Image())`. ```python from datasets import Dataset, Image ds = Dataset.from_dict(...) ds = ds.cast_column("image", Image()) ds = ds.cast_column("label", Image()) ds.push_to_hub(...) ```
[ 0.12779377400875092, 0.031671661883592606, 0.015505710616707802, 0.12134526669979095, 0.22383061051368713, 0.08540478348731995, 0.03226915001869202, -0.06671293079853058, -0.06793874502182007, 0.17631971836090088, -0.07875793427228928, 0.07008109986782074, -0.09895811229944229, 0.1940259039402008, 0.029679294675588608, -0.11288674920797348, -0.1268882006406784, -0.018176717683672905, -0.1317548006772995, -0.08401555567979813, -0.043935518711805344, 0.009145407937467098, 0.23282702267169952, -0.06138375401496887, -0.15199953317642212, -0.21010996401309967, -0.19020283222198486, 0.20596572756767273, -0.0288862157613039, -0.2806432247161865, 0.15550339221954346, 0.02571842633187771, 0.1093001440167427, 0.06285722553730011, 0.000005570485427597305, -0.052034892141819, 0.036137524992227554, -0.054024577140808105, 0.05141181871294975, -0.14187969267368317, 0.08418618142604828, -0.01249496079981327, 0.003977977205067873, -0.1165575459599495, -0.025943756103515625, 0.13534489274024963, 0.0548756904900074, 0.0014027669094502926, 0.14694060385227203, 0.09482444822788239, 0.016043158248066902, 0.11215995252132416, 0.008405009284615517, -0.12306731939315796, 0.04043992981314659, 0.08668757975101471, 0.015564823523163795, 0.2701128125190735, -0.03323893994092941, 0.06819579750299454, 0.025643760338425636, 0.10299106687307358, 0.13957448303699493, -0.054416194558143616, 0.185625821352005, 0.0808936282992363, -0.2006044089794159, -0.23238953948020935, -0.0054911463521420956, 0.13504844903945923, 0.054692089557647705, -0.020916426554322243, -0.07782743871212006, 0.03462995961308479, 0.043213725090026855, -0.06988868117332458, -0.17234684526920319, -0.03996822610497475, 0.024448152631521225, 0.02402421273291111, -0.06019624322652817, -0.15540455281734467, -0.04081137105822563, -0.008745102211833, 0.11689966917037964, 0.003402436152100563, -0.07698103040456772, 0.016578976064920425, -0.0028530918061733246, -0.011640462093055248, 0.07900770753622055, -0.08515649288892746, -0.10510700941085815, 0.0043898047879338264, 0.10796824842691422, -0.07610409706830978, 0.062485188245773315, 0.07312746345996857, -0.019855700433254242, 0.018890323117375374, -0.07733635604381561, -0.17152003943920135, -0.2045629471540451, 0.142914816737175, -0.2126183807849884, 0.050039418041706085, -0.11078198999166489, 0.06734368950128555, 0.03688863292336464, 0.10030721873044968, -0.041953280568122864, 0.009885633364319801, -0.07208044826984406, 0.08061318844556808, -0.04932797700166702, 0.09133969992399216, -0.07282465696334839, 0.07907258719205856, 0.04796706140041351, -0.013109851628541946, 0.31747448444366455, 0.13054317235946655, 0.0015290658921003342, 0.1778944432735443, 0.06841911375522614, -0.07917504012584686, -0.007290312554687262, 0.21548902988433838, 0.05358855053782463, -0.028798554092645645, -0.14352187514305115, 0.06146545335650444, 0.18280833959579468, -0.03609181195497513, 0.1817975789308548, -0.07052189856767654, -0.04778410866856575, -0.25550577044487, 0.061437658965587616, -0.08479179441928864, -0.1693209409713745, -0.04942648485302925, -0.11328433454036713, 0.013793370686471462, -0.11585073918104172, -0.04982801526784897, 0.13941413164138794, 0.04602927714586258, -0.07008697092533112, -0.0529460571706295, 0.07048741728067398, 0.09551721066236496, -0.24657179415225983, 0.028703344985842705, -0.030386827886104584, 0.02832316793501377, -0.13071602582931519, 0.07841652631759644, -0.22377759218215942, 0.11958036571741104, 0.0899939313530922, 0.06988904625177383, 0.003378411987796426, -0.02115584723651409, 0.016644233837723732, 0.17695949971675873, -0.002984320977702737, 0.0062732817605137825, -0.04331161081790924, -0.07278342545032501, -0.02840297669172287, -0.23875980079174042, -0.0033447546884417534, 0.014408254064619541, 0.04556688666343689, 0.02684898115694523, -0.12624378502368927, -0.1723133623600006, -0.1318936049938202, -0.06445373594760895, -0.04454899951815605, -0.13675729930400848, -0.0008921670960262418, 0.10277124494314194, 0.0008784664096310735, 0.09932540357112885, -0.18758589029312134, 0.15013423562049866, -0.14583970606327057, -0.08250833302736282, -0.06400668621063232, -0.02614317648112774, 0.07710906863212585, 0.02603830397129059, 0.0315115787088871, 0.019848182797431946, 0.1303183138370514, -0.18474678695201874, -0.02409220300614834, -0.31070777773857117, -0.05021031200885773, -0.09971795976161957, 0.13842549920082092, -0.05514137074351311, -0.04414226859807968, -0.036978594958782196, -0.17138829827308655, 0.17265620827674866, 0.23319527506828308, 0.007542735431343317, -0.11316811293363571, -0.0953274816274643, -0.10872011631727219, -0.11054936796426773, -0.06932748854160309, -0.016703525558114052, -0.08902667462825775, -0.08851877599954605, 0.08572008460760117, 0.14477494359016418, -0.006319412030279636, 0.16385316848754883, 0.10254563391208649, 0.12150006741285324, 0.11954484134912491, 0.07766491174697876, 0.018918391317129135, -0.01696198619902134, 0.2478322833776474, 0.026758871972560883, -0.0525091215968132, -0.08519364148378372, 0.12431219220161438, 0.08822159469127655, -0.23897486925125122, 0.11344022303819656, 0.04604968801140785, -0.1192280650138855, 0.17758876085281372, -0.17976723611354828, -0.029220638796687126, -0.06426069140434265, -0.03474258631467819, -0.015893638134002686, -0.0396195650100708, 0.10751385241746902, -0.10659009218215942, -0.021907618269324303, 0.06491763889789581, 0.0059518092311918736, 0.30986255407333374, 0.18880116939544678, 0.05910104140639305, -0.009344805963337421, -0.025284957140684128, -0.04500454664230347, 0.10189753770828247, 0.015725089237093925, -0.06362558156251907, -0.034446049481630325, -0.09071457386016846, -0.07622481137514114, -0.021170981228351593, 0.025557760149240494, 0.2818159759044647, 0.026724958792328835, 0.08624400943517685, -0.10266818851232529, -0.007871533744037151, 0.13653607666492462, -0.12984953820705414, -0.14589911699295044, -0.02489449456334114, -0.11968331784009933, -0.028901971876621246, -0.13398867845535278, 0.16300271451473236, -0.06676237285137177, 0.03875461965799332, -0.04328611120581627, -0.24759827554225922, -0.03857327252626419, 0.039982281625270844, -0.016314009204506874, 0.12551897764205933, 0.02932608872652054, -0.12233568727970123, -0.19292719662189484, 0.03700312599539757, -0.14490379393100739, 0.08202742040157318, -0.07316457480192184, 0.0347113274037838, -0.20212773978710175, -0.07487672567367554, -0.03251824900507927, -0.04439084604382515, 0.11800464242696762, -0.09358049929141998, 0.04895712435245514, -0.14680635929107666, 0.05844311788678169, 0.08266626298427582, 0.034344904124736786, 0.0856567770242691, -0.04825054854154587, 0.1073688343167305, 0.06752897053956985, -0.0241754911839962, 0.0773010328412056, -0.05181129649281502, -0.047714781016111374, 0.00314031052403152, -0.10326755046844482, -0.04104334115982056, -0.10869579762220383, -0.00791955180466175, -0.17627671360969543, -0.01193062961101532, 0.06637672334909439, 0.020045099779963493, -0.04189763218164444, -0.005169418174773455, -0.08874330669641495, -0.14777134358882904, 0.07235640287399292, -0.2390453964471817, -0.14405159652233124, 0.1943867802619934, 0.08660154044628143, -0.09727110713720322, 0.05961352586746216, 0.052139028906822205, -0.10706932842731476, 0.13092221319675446, -0.023872800171375275, -0.026885883882641792, -0.1097654476761818, 0.09972281754016876, 0.0637100338935852, 0.03161755949258804, -0.06538885831832886, -0.11939577013254166, 0.017576487734913826, -0.08807309716939926, -0.19404396414756775, -0.0233911145478487, -0.1812751144170761, 0.04761097952723503, 0.1438080072402954, 0.031080011278390884, 0.10315916687250137, 0.02679343894124031, 0.019786708056926727, -0.02296747826039791, 0.07258184999227524, -0.10168852657079697, 0.23391811549663544, -0.1928495317697525, -0.052815843373537064, 0.2019294649362564, 0.19507424533367157, 0.0494038350880146, -0.05401065573096275, -0.15192066133022308, 0.22517752647399902, 0.03823528438806534, 0.19852423667907715, -0.008684138767421246, -0.1166362464427948, 0.1757790446281433, 0.0008170377113856375, -0.08016709238290787, 0.036887701600790024, 0.08398938924074173, -0.09832722693681717, -0.11022908985614777, -0.008797948248684406, 0.06742668896913528, 0.0489826500415802, -0.1262495517730713, -0.0076821488328278065, -0.12421474605798721, 0.037450000643730164, -0.016539813950657845, -0.08350301533937454, -0.06819183379411697, 0.052345678210258484, 0.028515368700027466, 0.11665946990251541, -0.06727385520935059, 0.001357494154945016, -0.06390175223350525, -0.22069483995437622, -0.02505085989832878, -0.0931941568851471, -0.02840573713183403, 0.09837085753679276, 0.010575084947049618, -0.06647971272468567, 0.06856794655323029, 0.06834648549556732, 0.04074074327945709, -0.009501125663518906, 0.02419508807361126, -0.03870226815342903, -0.003121965331956744, 0.08348307013511658, 0.08689205348491669, -0.019199149683117867, 0.03010217286646366, 0.14271272718906403, -0.04032179340720177, 0.08858326077461243, 0.014204302802681923, -0.04922344908118248, -0.07199962437152863, 0.06405237317085266, 0.14923948049545288, -0.11841773986816406, -0.16006675362586975, 0.0705384686589241, 0.02281205728650093, 0.180851548910141, 0.2113291174173355, -0.02486143261194229, 0.07047325372695923, -0.0017682166071608663, 0.14438693225383759, 0.06222448870539665, 0.024157455191016197, 0.2568472623825073, -0.04026513919234276, 0.00044543531839735806, 0.15794792771339417, -0.05916158854961395, 0.3226081430912018, -0.20543751120567322, -0.16048289835453033, -0.25738516449928284, 0.04373491555452347, 0.003424376482143998, 0.13022710382938385, 0.07342488318681717, -0.02737913466989994, -0.041939202696084976, -0.001497731194831431, -0.1102866381406784, 0.10370136797428131, 0.01070542074739933, -0.11956005543470383, -0.15474313497543335, -0.11092427372932434, 0.030218692496418953, -0.047087933868169785, -0.02643067017197609, 0.12043385952711105, -0.05261865630745888, 0.0486798956990242, -0.05372919887304306, -0.006185418460518122, -0.05839196592569351, -0.13475212454795837, -0.027733586728572845, -0.045085273683071136, 0.06406614929437637, 0.3961828351020813, -0.14336231350898743, -0.11480551213026047, -0.036050502210855484, -0.031829118728637695, 0.04026027396321297, -0.015610359609127045, -0.05456071346998215, 0.21555502712726593, -0.07227978110313416, 0.037563830614089966, -0.006323186680674553, 0.023438969627022743, 0.07566461712121964, 0.16265147924423218, 0.14043079316616058, -0.036084894090890884, -0.025491323322057724, -0.02263183332979679, 0.2720828056335449, -0.045453183352947235, -0.08948246389627457, -0.058979254215955734, -0.10729295015335083, -0.04367230832576752, 0.0014498280361294746, -0.019395818933844566, -0.055335115641355515, 0.06490924954414368, -0.005940366070717573, 0.047527339309453964, 0.017115393653512, 0.17010441422462463, 0.24657435715198517, -0.059233855456113815, -0.15200281143188477, 0.1052396297454834, -0.026238365098834038, -0.08625935763120651, -0.1697080433368683, -0.016050634905695915, 0.11600647866725922, 0.023383526131510735, 0.0495489239692688, 0.06977253407239914, 0.21609245240688324, -0.06588566303253174, 0.02357575111091137, -0.14035886526107788, 0.05521596595644951, -0.02063450962305069, 0.0006124820793047547, 0.17995375394821167, -0.020889753475785255, -0.02728606015443802, -0.04554835334420204, 0.08923120051622391, -0.10107092559337616, -0.16860705614089966, 0.20684808492660522, 0.02376811020076275, -0.043074168264865875, -0.02020937390625477, -0.009319677017629147, -0.01733352616429329, -0.007292010355740786, 0.09274796396493912, -0.06366274505853653, -0.06577716022729874, 0.1145986020565033, 0.12018232047557831, -0.17572295665740967, 0.029871808364987373, 0.005552488379180431, -0.0033042971044778824, -0.21497716009616852, 0.015407971106469631, 0.1061963140964508, 0.157850444316864, 0.1976008266210556, 0.014660241082310677, -0.20312514901161194, -0.029925638809800148, -0.19668106734752655, 0.008965924382209778, 0.12880532443523407, 0.13422754406929016, -0.08413831889629364, -0.038424231112003326, -2.777026057948974e-32, -0.04810952767729759, -0.08415732532739639, -0.06234360113739967, 0.013968180865049362, -0.02551242522895336, 0.06976331025362015, -0.018988097086548805, -0.07432042807340622, -0.022446615621447563, -0.03553560748696327, 0.03923935443162918, 0.0708317831158638, 0.09081223607063293, 0.18183325231075287, -0.07724356651306152, 0.03868307173252106, 0.022073568776249886, 0.07047682255506516, 0.0001270425709662959, 0.10122858732938766, 0.051831357181072235, -0.1004047691822052, -0.0009420340647920966, -0.05776512622833252, -0.06635063141584396, 0.040004462003707886, -0.06332619488239288, -0.011900178156793118, 0.06312568485736847, 0.21419011056423187, -0.11457184702157974, 0.053130071610212326, -0.04762869328260422, 0.17217956483364105, 0.038162242621183395, 0.002456280868500471, -0.1304684579372406, 0.0602090060710907, -0.22171451151371002, 0.1512528955936432, 0.14725637435913086, 0.029018016532063484, -0.12086094170808792, -0.09341219067573547, 0.2180906981229782, 0.08059664815664291, 0.07165540009737015, -0.018130430951714516, -0.08497211337089539, 0.06470336019992828, 0.02306690439581871, 0.07381647080183029, 0.025796065106987953, -0.07121317833662033, 0.11776519566774368, -0.08210846781730652, 0.05559438839554787, 0.027565093711018562, 0.08141489326953888, 0.06998798996210098, -0.11168547719717026, -0.03797568380832672, -0.06244431436061859, 0.04974475875496864, -0.01341708842664957, 0.07371464371681213, 0.012457972392439842, -0.17479293048381805, 0.06088956072926521, -0.07526973634958267, 0.06831850856542587, 0.2201850414276123, 0.08873133361339569, 0.046856336295604706, -0.21849752962589264, 0.0789138674736023, -0.047720737755298615, -0.01643332839012146, -0.027215853333473206, -0.06743696331977844, -0.06124719977378845, -0.10088188201189041, 0.01950022578239441, 0.0948137566447258, 0.1249610111117363, 0.09391047805547714, -0.07907864451408386, 0.014268549159169197, -0.022768039256334305, -0.03285764157772064, -0.21020087599754333, -0.05786089971661568, 0.06995254755020142, -0.04405966401100159, 0.0409519262611866, -0.05711264908313751, 0.028520146384835243, 0.25639206171035767, 0.04060686007142067, -0.025209929794073105, 0.026091638952493668, -0.07488773763179779, 0.19034531712532043, 0.00837126187980175, 0.1267060935497284, -0.09703006595373154, 0.2119598388671875, 0.25143492221832275, -0.20867763459682465, -0.066086545586586, -0.04599635675549507, 0.0822545737028122, -0.00829818844795227, 0.19064754247665405, 0.1407880038022995, 0.04664001241326332, -0.14537660777568817, -0.08657769858837128, 0.10160010308027267, 0.1279648095369339, -0.19355687499046326, -0.10858157277107239, -0.05719916522502899, -0.08257617056369781, -0.037405066192150116, 0.14382025599479675, -0.25698959827423096, -0.10084927082061768, -0.05326658859848976, -0.25666067004203796, -0.019573187455534935, -0.00885019451379776, 7.460376423296111e-7, -0.2919759750366211, 0.1004834994673729, 0.007151562720537186, -0.06122423708438873, -0.01891561783850193, -0.04540375620126724, -0.23965080082416534, 0.003659043461084366, -0.11818300932645798, -0.13273149728775024, 0.052424512803554535, -0.08828854560852051, 0.029308071359992027, 0.04373561218380928, -0.01503456849604845, -0.020825471729040146, -0.12413229048252106, 0.0276449266821146, -0.05911436304450035, 0.11970249563455582, 0.04747607186436653, 0.20235973596572876, 0.0533340759575367, 0.04742671921849251, -0.0005110789206810296, -0.016278821974992752, 0.025766605511307716, 0.06252980977296829, 0.10172846913337708, -0.08911304920911789, 0.08431593328714371, 0.19139905273914337, -0.14072775840759277, 0.14505741000175476, -0.10265545547008514, 0.0015380140393972397, -0.006239031907171011, -0.19459961354732513, -0.08252672851085663, -0.025685714557766914, -0.009894200600683689, 0.13362669944763184, -0.03435458615422249, -0.131169855594635, 0.12635335326194763, 0.08099264651536942, -0.012768181972205639, -0.13090741634368896, -0.1199708878993988, 0.010898832231760025, 0.02756807580590248, 0.007414933294057846, 0.029226029291749, 0.2238859385251999, 0.06906632333993912, -0.07069409638643265, 0.031219016760587692, -0.19445361196994781, 0.11606651544570923, -0.052980683743953705, -0.1327158659696579, -0.0644373670220375, -0.12286938726902008, 0.08404987305402756, 0.1742393672466278, -0.0273663979023695, -0.0681622102856636, 1.067614504719274e-34, -0.03239979222416878, -0.08144909143447876, 0.1067153736948967, 0.017313791438937187, -0.09076870232820511, 0.10936228185892105, -0.01991671323776245, -0.03198155015707016, 0.057805418968200684, -0.17285948991775513, -0.019605129957199097 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
> Both were uploaded using `ds.push_to_hub()` :) > > You can get a Dataset from a python dictionary using `ds = Dataset.from_dict(...)` and casts the paths to images to the `Image()` type using `ds = ds.cast_column("image", Image())`. > > ```python > from datasets import Dataset, Image > > ds = Dataset.from_dict(...) > ds = ds.cast_column("image", Image()) > ds = ds.cast_column("label", Image()) > ds.push_to_hub(...) > ``` Thank you very much @lhoestq , I succesfully created a hf dataset [here](https://huggingface.co/datasets/lombardata/panoptic_2023_06_21) with the two fields : 1.image (image) 2.label (image) following your suggestions. Now still remain the problem of uploading **segments_info** information to the dataset. There is a function that easily imports the _panoptic_coco_annotation.json_ file to a segment_info field? I think we must define a **list_of_segment**, i.e. a list of lists of this type : ```python [ { "area": 214858, "bbox": [ 0, 0, 511, 760 ], "category_id": 0, "id": 7895160, "iscrowd": 0 }, { "area": 73067, "bbox": [ 98, 719, 413, 253 ], "category_id": 3, "id": 3289680, "iscrowd": 0 }, { "area": 832, "bbox": [ 53, 0, 101, 16 ], "category_id": 5, "id": 5273720, "iscrowd": 0 }, { "area": 70668, "bbox": [ 318, 60, 191, 392 ], "category_id": 8, "id": 15132390, "iscrowd": 0 }, { "area": 32696, "bbox": [ 0, 100, 78, 872 ], "category_id": 18, "id": 472063, "iscrowd": 0 }, { "area": 76045, "bbox": [ 42, 48, 264, 924 ], "category_id": 37, "id": 16713830, "iscrowd": 0 }, { "area": 27103, "bbox": [ 288, 482, 216, 306 ], "category_id": 47, "id": 16753408, "iscrowd": 0 } ] ``` and then apply again the **cast_column** function [here](https://github.com/huggingface/datasets/blob/2.13.0/src/datasets/arrow_dataset.py#L2060) but with a list as a second argument, like : ```python from datasets import Dataset, Image ds = ds.cast_column("image", Image()) ds = ds.cast_column("label", Image()) ds = ds.cast_column("segments_info", list) ``` but I do not see how to transfer the information of the _panoptic_coco_annotation.json_ to a list of lists of this type : ```python [ { "area": 214858, "bbox": [ 0, 0, 511, 760 ], "category_id": 0, "id": 7895160, "iscrowd": 0 }, { "area": 73067, "bbox": [ 98, 719, 413, 253 ], "category_id": 3, "id": 3289680, "iscrowd": 0 }, { "area": 832, "bbox": [ 53, 0, 101, 16 ], "category_id": 5, "id": 5273720, "iscrowd": 0 }, { "area": 70668, "bbox": [ 318, 60, 191, 392 ], "category_id": 8, "id": 15132390, "iscrowd": 0 }, { "area": 32696, "bbox": [ 0, 100, 78, 872 ], "category_id": 18, "id": 472063, "iscrowd": 0 }, { "area": 76045, "bbox": [ 42, 48, 264, 924 ], "category_id": 37, "id": 16713830, "iscrowd": 0 }, { "area": 27103, "bbox": [ 288, 482, 216, 306 ], "category_id": 47, "id": 16753408, "iscrowd": 0 } ] ``` like @NielsRogge has done [here](https://huggingface.co/datasets/nielsr/coco-panoptic-val2017) and [here](https://huggingface.co/datasets/nielsr/ade20k-panoptic-demo). Thank you again for your help and have a good day !
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
456
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). > Both were uploaded using `ds.push_to_hub()` :) > > You can get a Dataset from a python dictionary using `ds = Dataset.from_dict(...)` and casts the paths to images to the `Image()` type using `ds = ds.cast_column("image", Image())`. > > ```python > from datasets import Dataset, Image > > ds = Dataset.from_dict(...) > ds = ds.cast_column("image", Image()) > ds = ds.cast_column("label", Image()) > ds.push_to_hub(...) > ``` Thank you very much @lhoestq , I succesfully created a hf dataset [here](https://huggingface.co/datasets/lombardata/panoptic_2023_06_21) with the two fields : 1.image (image) 2.label (image) following your suggestions. Now still remain the problem of uploading **segments_info** information to the dataset. There is a function that easily imports the _panoptic_coco_annotation.json_ file to a segment_info field? I think we must define a **list_of_segment**, i.e. a list of lists of this type : ```python [ { "area": 214858, "bbox": [ 0, 0, 511, 760 ], "category_id": 0, "id": 7895160, "iscrowd": 0 }, { "area": 73067, "bbox": [ 98, 719, 413, 253 ], "category_id": 3, "id": 3289680, "iscrowd": 0 }, { "area": 832, "bbox": [ 53, 0, 101, 16 ], "category_id": 5, "id": 5273720, "iscrowd": 0 }, { "area": 70668, "bbox": [ 318, 60, 191, 392 ], "category_id": 8, "id": 15132390, "iscrowd": 0 }, { "area": 32696, "bbox": [ 0, 100, 78, 872 ], "category_id": 18, "id": 472063, "iscrowd": 0 }, { "area": 76045, "bbox": [ 42, 48, 264, 924 ], "category_id": 37, "id": 16713830, "iscrowd": 0 }, { "area": 27103, "bbox": [ 288, 482, 216, 306 ], "category_id": 47, "id": 16753408, "iscrowd": 0 } ] ``` and then apply again the **cast_column** function [here](https://github.com/huggingface/datasets/blob/2.13.0/src/datasets/arrow_dataset.py#L2060) but with a list as a second argument, like : ```python from datasets import Dataset, Image ds = ds.cast_column("image", Image()) ds = ds.cast_column("label", Image()) ds = ds.cast_column("segments_info", list) ``` but I do not see how to transfer the information of the _panoptic_coco_annotation.json_ to a list of lists of this type : ```python [ { "area": 214858, "bbox": [ 0, 0, 511, 760 ], "category_id": 0, "id": 7895160, "iscrowd": 0 }, { "area": 73067, "bbox": [ 98, 719, 413, 253 ], "category_id": 3, "id": 3289680, "iscrowd": 0 }, { "area": 832, "bbox": [ 53, 0, 101, 16 ], "category_id": 5, "id": 5273720, "iscrowd": 0 }, { "area": 70668, "bbox": [ 318, 60, 191, 392 ], "category_id": 8, "id": 15132390, "iscrowd": 0 }, { "area": 32696, "bbox": [ 0, 100, 78, 872 ], "category_id": 18, "id": 472063, "iscrowd": 0 }, { "area": 76045, "bbox": [ 42, 48, 264, 924 ], "category_id": 37, "id": 16713830, "iscrowd": 0 }, { "area": 27103, "bbox": [ 288, 482, 216, 306 ], "category_id": 47, "id": 16753408, "iscrowd": 0 } ] ``` like @NielsRogge has done [here](https://huggingface.co/datasets/nielsr/coco-panoptic-val2017) and [here](https://huggingface.co/datasets/nielsr/ade20k-panoptic-demo). Thank you again for your help and have a good day !
[ 0.09401364624500275, 0.0401008240878582, 0.012455863878130913, 0.08226265013217926, 0.2158568650484085, 0.09700886905193329, 0.00038110697641968727, -0.042014557868242264, -0.10486530512571335, 0.13974039256572723, -0.07766184955835342, 0.063692107796669, -0.08277508616447449, 0.18907973170280457, 0.031524308025836945, -0.15335005521774292, -0.18083225190639496, -0.013030221685767174, -0.15198522806167603, -0.038231007754802704, -0.04153432697057724, 0.02517266385257244, 0.24200224876403809, -0.04659537971019745, -0.18409574031829834, -0.14200466871261597, -0.18476366996765137, 0.23231443762779236, -0.021480875089764595, -0.2575302720069885, 0.1327972710132599, 0.055162325501441956, 0.1392502635717392, 0.059112176299095154, 0.000005364586286304984, -0.08845411241054535, 0.023626061156392097, -0.037384893745183945, 0.013012856245040894, -0.16552995145320892, 0.11807338148355484, -0.022081319242715836, -0.041479066014289856, -0.13238681852817535, 0.04430050402879715, 0.16136343777179718, 0.04170125722885132, 0.04447690397500992, 0.17874188721179962, 0.10098128765821457, 0.00015885649190749973, 0.06367093324661255, 0.02891957387328148, -0.10086143761873245, 0.06448107212781906, 0.11406676471233368, 0.018581902608275414, 0.2764934003353119, -0.08080726861953735, 0.08684031665325165, 0.037224020808935165, 0.08629067987203598, 0.12872561812400818, -0.04137185215950012, 0.21003898978233337, 0.06789939850568771, -0.22223463654518127, -0.21529880166053772, 0.0000014091156117501669, 0.11939336359500885, 0.043436482548713684, -0.06580345332622528, -0.08761867880821228, 0.027020534500479698, 0.014115736819803715, -0.09741224348545074, -0.18298473954200745, -0.0669328048825264, 0.040422696620225906, 0.042490165680646896, -0.016041729599237442, -0.12540172040462494, -0.04429683834314346, -0.016844389960169792, 0.09919971227645874, -0.021666759625077248, -0.08121179789304733, -0.0051055364310741425, -0.01935805007815361, -0.03889674320816994, 0.08644305169582367, -0.13003237545490265, -0.10714516043663025, 0.05019448697566986, 0.09537044167518616, -0.09433060884475708, 0.021502653136849403, 0.06892038881778717, 0.007545268628746271, -0.0007209832547232509, -0.11091764271259308, -0.1476539522409439, -0.19369398057460785, 0.13664712011814117, -0.21007414162158966, 0.07118026912212372, -0.10930845886468887, 0.07869444042444229, 0.03697247430682182, 0.07108321040868759, -0.07268842309713364, 0.009001104161143303, -0.07003004103899002, 0.07866525650024414, -0.009767336770892143, 0.11658883839845657, -0.0667412132024765, 0.10595465451478958, 0.04134850576519966, 0.02388290874660015, 0.33535343408584595, 0.06068907678127289, 0.01479491125792265, 0.16830071806907654, 0.044728104025125504, -0.10069045424461365, -0.011229134164750576, 0.1842995136976242, 0.09582008421421051, 0.0015365700237452984, -0.10263694077730179, 0.10095105320215225, 0.1878456324338913, -0.013885637745261192, 0.1721528321504593, -0.09276511520147324, -0.04023825749754906, -0.2147979438304901, 0.05090874060988426, -0.10919509828090668, -0.1131938099861145, -0.09970386326313019, -0.08034291863441467, -0.007127131335437298, -0.04084130376577377, -0.0055356714874506, 0.12548725306987762, 0.07629428803920746, -0.08573605120182037, -0.026099735870957375, 0.03336251899600029, 0.13034799695014954, -0.2786121070384979, 0.06593663990497589, 0.03492036461830139, 0.0430729016661644, -0.1310180127620697, 0.07182621955871582, -0.20133613049983978, 0.10035371780395508, 0.06229463592171669, 0.07698448747396469, 0.013760180212557316, -0.0193300973623991, 0.03331846371293068, 0.1507740318775177, -0.02391648106276989, 0.044497523456811905, -0.00840187631547451, -0.07478325068950653, -0.03715923801064491, -0.20896489918231964, -0.01804325357079506, 0.020915500819683075, 0.052368391305208206, 0.0632176473736763, -0.08181682974100113, -0.17619645595550537, -0.09710812568664551, -0.05200798436999321, -0.03547501936554909, -0.1056833267211914, -0.030741417780518532, 0.07028396427631378, 0.025509817525744438, 0.11571576446294785, -0.17175030708312988, 0.11145497858524323, -0.12239377945661545, -0.08078519999980927, -0.11268362402915955, -0.0359962061047554, 0.03464251384139061, 0.010673407465219498, 0.0036192352417856455, 0.03202193230390549, 0.10961268842220306, -0.12984198331832886, 0.005745371803641319, -0.29721763730049133, -0.023954328149557114, -0.07343204319477081, 0.0913572758436203, -0.03868822753429413, -0.024796823039650917, -0.013684234581887722, -0.15000279247760773, 0.1459975391626358, 0.22828367352485657, -0.02393689565360546, -0.11641895771026611, -0.0940294936299324, -0.17171481251716614, -0.11835073679685593, -0.061178479343652725, -0.02971821278333664, -0.0936504676938057, -0.1320541650056839, 0.05645511671900749, 0.09766460955142975, 0.010130561888217926, 0.15380771458148956, 0.08975786715745926, 0.11587371677160263, 0.1544502228498459, 0.057436466217041016, 0.007371192332357168, -0.02483626827597618, 0.22281652688980103, 0.017029527574777603, -0.05350067466497421, -0.049053024500608444, 0.13579536974430084, 0.11995941400527954, -0.23677031695842743, 0.08878345042467117, 0.05660034343600273, -0.09407944977283478, 0.13446654379367828, -0.15138386189937592, -0.011040984652936459, -0.15819452702999115, -0.010666639544069767, -0.03098095767199993, -0.12411385029554367, 0.13217929005622864, -0.10641597211360931, -0.016214437782764435, 0.10163307934999466, 0.017204705625772476, 0.31113550066947937, 0.14293847978115082, 0.06795634329319, 0.01853250153362751, -0.05158614739775658, -0.109622061252594, 0.10955334454774857, 0.008894864469766617, -0.04452364146709442, -0.03146367520093918, -0.04296266660094261, -0.07115188986063004, -0.05131561681628227, 0.0021608592942357063, 0.26473286747932434, 0.0359828844666481, 0.10554508119821548, -0.10749771445989609, -0.019542839378118515, 0.1478821337223053, -0.11046554893255234, -0.15350207686424255, -0.057456884533166885, -0.07690591365098953, 0.03292760252952576, -0.18841321766376495, 0.1770404577255249, -0.05930835008621216, 0.04339824244379997, -0.016109509393572807, -0.22341489791870117, -0.005071356892585754, 0.097640261054039, -0.024726659059524536, 0.09233937412500381, 0.07762937992811203, -0.1179286539554596, -0.17400933802127838, 0.03582391515374184, -0.1694534868001938, 0.05857260525226593, -0.08432542532682419, 0.06710667908191681, -0.17025749385356903, -0.07919251918792725, -0.02441062405705452, -0.013971399515867233, 0.11732634156942368, -0.1256273090839386, 0.012308616191148758, -0.148004949092865, 0.0788184329867363, 0.14777818322181702, 0.06599608063697815, 0.057869620621204376, 0.036667633801698685, 0.11782952398061752, 0.09204596281051636, -0.03914594650268555, 0.0253404900431633, -0.04511219635605812, 0.0003608375845942646, 0.0061906990595161915, -0.08369609713554382, -0.05312732234597206, -0.08339297026395798, -0.03598545119166374, -0.18109764158725739, -0.0047001345083117485, 0.05627818405628204, 0.01982812024652958, -0.038633257150650024, -0.025723200291395187, -0.09009575843811035, -0.14520439505577087, 0.11048723012208939, -0.24405908584594727, -0.1503283530473709, 0.20437219738960266, 0.14262567460536957, -0.08594593405723572, 0.09457477182149887, 0.07066689431667328, -0.11410064250230789, 0.15270456671714783, -0.027422085404396057, -0.016672780737280846, -0.11810939759016037, 0.1404058039188385, 0.042158618569374084, 0.01737685687839985, -0.051716044545173645, -0.08956851810216904, 0.03488866239786148, -0.07341642677783966, -0.1103639006614685, -0.009712062776088715, -0.15502749383449554, 0.07301491498947144, 0.15657539665699005, 0.03842213749885559, 0.07375616580247879, 0.016725940629839897, 0.005939655937254429, -0.04455185309052467, 0.09315620362758636, -0.08270429819822311, 0.21594522893428802, -0.19328705966472626, -0.04888182505965233, 0.18975532054901123, 0.17587877810001373, 0.06451830267906189, -0.04923350736498833, -0.12799851596355438, 0.2066122144460678, 0.006996005307883024, 0.14932413399219513, -0.018855279311537743, -0.12494303286075592, 0.18597574532032013, -0.011707012541592121, -0.06323477625846863, 0.026088783517479897, 0.09805183112621307, -0.10588859021663666, -0.0793980062007904, 0.008377903141081333, 0.07685380429029465, 0.039308756589889526, -0.11438342928886414, -0.015002514235675335, -0.08116547763347626, 0.0631544291973114, -0.042375318706035614, -0.10505619645118713, -0.040545739233493805, 0.06053957715630531, 0.03044535219669342, 0.13637091219425201, -0.09043048322200775, 0.005237961653620005, -0.05829661339521408, -0.21878737211227417, -0.0046293893828988075, -0.08181740343570709, -0.015482206828892231, 0.08288964629173279, 0.026506954804062843, -0.09466804563999176, 0.07933361083269119, 0.02530672401189804, 0.03437453508377075, -0.05113457888364792, 0.05716677010059357, -0.0463290736079216, 0.02543204464018345, 0.0672885924577713, 0.11219895631074905, -0.04833408072590828, 0.01836351491510868, 0.15628784894943237, -0.0708124190568924, 0.06703919172286987, 0.022609438747167587, -0.056947704404592514, -0.0630834624171257, 0.06550758332014084, 0.15298666059970856, -0.09946990758180618, -0.18704946339130402, 0.05228777974843979, 0.09766106307506561, 0.1664552539587021, 0.22925782203674316, -0.024240823462605476, 0.05577675253152847, 0.02077442780137062, 0.13209034502506256, 0.06824474036693573, 0.044957686215639114, 0.2604394257068634, -0.04363115131855011, -0.008949792012572289, 0.13626304268836975, -0.014972589910030365, 0.36173567175865173, -0.23477739095687866, -0.15225502848625183, -0.2376667857170105, 0.03138259798288345, 0.017777303233742714, 0.13001345098018646, 0.06659156084060669, -0.045920975506305695, -0.053105924278497696, -0.021137123927474022, -0.0921962633728981, 0.08892546594142914, 0.02037067897617817, -0.13738995790481567, -0.1662105768918991, -0.14800512790679932, 0.05799443647265434, -0.09297800809144974, -0.051473017781972885, 0.06154683604836464, -0.02468547597527504, 0.05212847515940666, -0.048521507531404495, 0.004376186523586512, -0.07502347230911255, -0.11920811980962753, -0.03836718201637268, -0.07772057503461838, 0.07128264755010605, 0.3869280219078064, -0.1654779464006424, -0.16478398442268372, -0.082040935754776, -0.010359389707446098, 0.009287368506193161, -0.023130999878048897, -0.044598307460546494, 0.2039506882429123, -0.07593155652284622, 0.061058077961206436, 0.0025134379975497723, 0.008927306160330772, 0.09767085313796997, 0.1777379959821701, 0.12486741691827774, -0.03641173243522644, 0.009263861924409866, 0.0018332793843001127, 0.2809835374355316, -0.05528774857521057, -0.11508285254240036, -0.05933476611971855, -0.13031113147735596, -0.07258095592260361, -0.021729925647377968, 0.010401214472949505, -0.045425571501255035, 0.043823935091495514, -0.024610882624983788, 0.04635564610362053, 0.02344873547554016, 0.09573918581008911, 0.25690391659736633, -0.09260684996843338, -0.16935259103775024, 0.09952307492494583, -0.04835324361920357, -0.06259724497795105, -0.21525098383426666, -0.036245912313461304, 0.15509673953056335, 0.007911345921456814, 0.06977227330207825, 0.07609525322914124, 0.1520097553730011, -0.06747198104858398, 0.07535640895366669, -0.1700897067785263, 0.022260066121816635, -0.052589189261198044, 0.0300686527043581, 0.1657099723815918, -0.019419576972723007, -0.043602731078863144, -0.056285180151462555, 0.09326126426458359, -0.12007633596658707, -0.18808260560035706, 0.2586742639541626, 0.011887953616678715, -0.07013408839702606, -0.04004461318254471, -0.044977739453315735, 0.007035001181066036, -0.02128242701292038, 0.11340252310037613, -0.08081133663654327, -0.06652967631816864, 0.08272068947553635, 0.13991734385490417, -0.1856173872947693, 0.01026010699570179, -0.021031983196735382, -0.025191178545355797, -0.20254909992218018, -0.01596526801586151, 0.1024300828576088, 0.12471375614404678, 0.17882727086544037, 0.009886117652058601, -0.22304432094097137, -0.043232694268226624, -0.22765250504016876, -0.012456334196031094, 0.10256654769182205, 0.13432615995407104, -0.039066240191459656, -0.011182276532053947, -2.786699494835478e-32, -0.043935250490903854, -0.09496413916349411, -0.022470686584711075, 0.022553250193595886, -0.052390653640031815, 0.049740493297576904, -0.001262474455870688, -0.13042688369750977, -0.02035767026245594, -0.0304840300232172, 0.07736934721469879, 0.029970312491059303, 0.09451792389154434, 0.18254725635051727, -0.07557890564203262, -0.000349816691596061, 0.0057234978303313255, 0.09997835010290146, 0.003241566475480795, 0.12778574228286743, 0.08018910884857178, -0.14038479328155518, 0.044842880219221115, -0.050059881061315536, -0.05756388232111931, 0.0038142164703458548, -0.09603175520896912, -0.007512149401009083, 0.030753720551729202, 0.24311070144176483, -0.1161869466304779, 0.035840656608343124, -0.02650037594139576, 0.13883690536022186, 0.06023293361067772, 0.055669911205768585, -0.14822301268577576, 0.06216643005609512, -0.25902143120765686, 0.16058501601219177, 0.13239531219005585, 0.042013466358184814, -0.1327163279056549, -0.09997361898422241, 0.2729204595088959, 0.07894815504550934, 0.04509377107024193, 0.04232369363307953, -0.08811426162719727, 0.04152626916766167, -0.008121208287775517, 0.06964612752199173, 0.04479043930768967, -0.07656707614660263, 0.1356164515018463, -0.09171684086322784, 0.06973161548376083, -0.0077524930238723755, 0.05081041902303696, 0.06861457973718643, -0.08149540424346924, -0.06980405002832413, -0.054682858288288116, 0.06336908787488937, 0.00844860915094614, 0.02810678817331791, -0.008158024400472641, -0.16787156462669373, 0.06944439560174942, -0.05992438644170761, 0.051611073315143585, 0.19278766214847565, 0.08436049520969391, 0.0009565646178089082, -0.24390655755996704, 0.07617967575788498, -0.038193073123693466, -0.06321355700492859, -0.056978605687618256, -0.05902548134326935, -0.10315832495689392, -0.10759467631578445, -0.005065799690783024, 0.0991034060716629, 0.12527869641780853, 0.08730702847242355, -0.07940968126058578, -0.014644479379057884, -0.03683686628937721, -0.02991790510714054, -0.19166524708271027, -0.005330121144652367, 0.06135242059826851, -0.012552027590572834, 0.042901840060949326, -0.08444435894489288, 0.04765426367521286, 0.28112655878067017, 0.03402087092399597, -0.026550663635134697, 0.01824885793030262, -0.059872858226299286, 0.2163863182067871, -0.04365703463554382, 0.09988316148519516, -0.08745870739221573, 0.24118280410766602, 0.27685248851776123, -0.16462481021881104, -0.05536597967147827, -0.027659598737955093, 0.041783399879932404, 0.01411727536469698, 0.19708788394927979, 0.1421789824962616, 0.04176349565386772, -0.16466131806373596, -0.07935412973165512, 0.10479428619146347, 0.10714558511972427, -0.2011602371931076, -0.07414334267377853, -0.08458200097084045, -0.06870827823877335, -0.010626697912812233, 0.1480797678232193, -0.2590337097644806, -0.10494775325059891, -0.02215864695608616, -0.21528540551662445, -0.0011844687396660447, 0.048870984464883804, 7.396392902592197e-7, -0.27653205394744873, 0.10206104815006256, 0.0017999622505158186, -0.0650041252374649, -0.01473122276365757, -0.02883516438305378, -0.24251508712768555, -0.009030675515532494, -0.14274747669696808, -0.08899334818124771, 0.11239635199308395, -0.10939910262823105, 0.048361293971538544, 0.04742971062660217, -0.028598636388778687, -0.04204176738858223, -0.10434845834970474, 0.008634956553578377, -0.08272673189640045, 0.17474187910556793, 0.07843894511461258, 0.2124059647321701, 0.028903627768158913, 0.0444813035428524, -0.00007618981180712581, 0.04262261092662811, 0.026482785120606422, 0.0761822834610939, 0.0708007663488388, -0.0331316739320755, 0.01751459203660488, 0.15671759843826294, -0.12848851084709167, 0.17294800281524658, -0.15654256939888, 0.02198903262615204, 0.006753654684871435, -0.19194865226745605, -0.0943697839975357, -0.06505390256643295, -0.01765255443751812, 0.1312725991010666, 0.0005210016970522702, -0.18304865062236786, 0.1227816641330719, 0.06766697764396667, -0.04989926889538765, -0.17102251946926117, -0.09728004038333893, 0.06927671283483505, 0.03174371272325516, 0.013249114155769348, 0.004660799168050289, 0.1931346356868744, 0.06081307306885719, -0.054592471569776535, 0.01818215660750866, -0.1859399825334549, 0.1256559193134308, -0.018417218700051308, -0.10929293185472488, -0.04955350607633591, -0.09935079514980316, 0.04824414849281311, 0.22111059725284576, -0.0375283807516098, -0.06481235474348068, 1.4709315526443194e-34, -0.0479576401412487, -0.11344584077596664, 0.0771012231707573, 0.0509805902838707, -0.08154293894767761, 0.1003493219614029, -0.0077332486398518085, 0.019082460552453995, 0.08830440789461136, -0.1735052466392517, 0.0030761591624468565 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
You can pass this data in .from_dict() - no need to cast anything for this column ```python ds = Dataset.from_dict({ "image": [...], "label": [...], "segments_info": [...], )} ``` where `segments_info` is the list of the segment_infos of all the examples in the dataset, and therefore is a list of lists of dicts.
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
52
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). You can pass this data in .from_dict() - no need to cast anything for this column ```python ds = Dataset.from_dict({ "image": [...], "label": [...], "segments_info": [...], )} ``` where `segments_info` is the list of the segment_infos of all the examples in the dataset, and therefore is a list of lists of dicts.
[ 0.09709950536489487, 0.01426684856414795, -0.010673126205801964, 0.10035882145166397, 0.20751546323299408, 0.08257630467414856, 0.053659431636333466, -0.06892380118370056, -0.06483914703130722, 0.11747262626886368, -0.051041580736637115, 0.04323738068342209, -0.11190138012170792, 0.1851988434791565, 0.05662420019507408, -0.13339786231517792, -0.11488473415374756, -0.003147148061543703, -0.14757007360458374, -0.06719178706407547, -0.03805211931467056, 0.02016993798315525, 0.2259853482246399, -0.07904703915119171, -0.11143229156732559, -0.20345811545848846, -0.21283884346485138, 0.1729811429977417, -0.025361182168126106, -0.29166385531425476, 0.17311376333236694, 0.04147989675402641, 0.1389213502407074, -0.0001400159962940961, 0.000005796729510620935, -0.04944955185055733, 0.05185191333293915, -0.07285154610872269, 0.014196665026247501, -0.15560166537761688, 0.0732157975435257, -0.033597394824028015, 0.047506656497716904, -0.13675713539123535, -0.034489959478378296, 0.10639651864767075, 0.022032415494322777, -0.008005090057849884, 0.17082786560058594, 0.10149532556533813, 0.03340928629040718, 0.07631233334541321, 0.010406306013464928, -0.13630244135856628, 0.05149024724960327, 0.11950664222240448, 0.03279545530676842, 0.274565190076828, -0.07576499134302139, 0.08491390198469162, 0.04360415041446686, 0.052203916013240814, 0.10474294424057007, -0.027401506900787354, 0.1782074123620987, 0.06164466217160225, -0.16408537328243256, -0.22436684370040894, 0.011373478919267654, 0.13819368183612823, 0.07329510152339935, -0.020757600665092468, -0.05326584354043007, 0.05519213154911995, 0.03647700324654579, -0.08881665021181107, -0.19100527465343475, -0.050398048013448715, 0.026455793529748917, 0.019847584888339043, -0.002484119962900877, -0.13208232820034027, -0.04023820534348488, -0.017427247017621994, 0.08674337714910507, -0.03580377995967865, -0.08958408236503601, 0.03550107032060623, 0.0007947466801851988, -0.004322770982980728, 0.05456086993217468, -0.06411963701248169, -0.12719769775867462, -0.002850349759683013, 0.10650784522294998, -0.0898025780916214, 0.036813024431467056, 0.03575269132852554, -0.005601777229458094, 0.04264379292726517, -0.0607609860599041, -0.14619965851306915, -0.15370556712150574, 0.09409496188163757, -0.23024606704711914, 0.03710023686289787, -0.09611859172582626, 0.05649559944868088, -0.014966077171266079, 0.10153128951787949, -0.056068334728479385, 0.04466605931520462, -0.08766748756170273, 0.09941137582063675, -0.02748495526611805, 0.09195439517498016, -0.07709722220897675, 0.11163053661584854, 0.01353179756551981, -0.01948661543428898, 0.3232165575027466, 0.10618142783641815, 0.020635589957237244, 0.20158229768276215, 0.033691808581352234, -0.09474669396877289, 0.015812018886208534, 0.17497141659259796, 0.07951255887746811, -0.016072668135166168, -0.12451288104057312, 0.08287809044122696, 0.20319914817810059, -0.057652637362480164, 0.17062890529632568, -0.06206369772553444, -0.04130154848098755, -0.27326738834381104, 0.056896671652793884, -0.11443357169628143, -0.16627249121665955, -0.019956711679697037, -0.07573748379945755, 0.025263920426368713, -0.12698456645011902, -0.04766922444105148, 0.15725752711296082, 0.05670441687107086, -0.04266469180583954, -0.06291483342647552, 0.04257465898990631, 0.08529513329267502, -0.28797397017478943, 0.03228280320763588, -0.05194579437375069, 0.00900314375758171, -0.12797865271568298, 0.07354936003684998, -0.18587152659893036, 0.11206457018852234, 0.07994668930768967, 0.05710519477725029, 0.012870474718511105, -0.07141613215208054, 0.033093106001615524, 0.19372263550758362, -0.07104374468326569, 0.02348601445555687, -0.07095645368099213, -0.10756362229585648, -0.013785135932266712, -0.20788641273975372, -0.008130873553454876, -0.004594454541802406, 0.06468293070793152, 0.01684553734958172, -0.11068156361579895, -0.11046022921800613, -0.14343272149562836, -0.030512981116771698, -0.04710547626018524, -0.16624031960964203, 0.057926665991544724, 0.10089424252510071, 0.055050019174814224, 0.1490028351545334, -0.17858262360095978, 0.13158294558525085, -0.1169627383351326, -0.0991450697183609, -0.04307406023144722, -0.014391321688890457, 0.10017240792512894, 0.030871760100126266, 0.02639826387166977, 0.03428920358419418, 0.12036296725273132, -0.1833428293466568, -0.021741684526205063, -0.293964147567749, -0.0640449970960617, -0.1142210066318512, 0.13867942988872528, -0.03189142420887947, -0.0394098162651062, -0.029684053733944893, -0.20020508766174316, 0.1201525628566742, 0.23681390285491943, -0.024297168478369713, -0.07964995503425598, -0.11474110186100006, -0.12792156636714935, -0.07664880156517029, -0.07302842289209366, -0.03501221537590027, -0.05545937269926071, -0.07624319195747375, 0.10652300715446472, 0.16022886335849762, -0.009162033908069134, 0.08765216916799545, 0.11418037861585617, 0.1323554515838623, 0.15667970478534698, 0.04939338192343712, 0.014663664624094963, -0.03773212805390358, 0.23139116168022156, 0.04559613764286041, -0.042529668658971786, -0.08695395290851593, 0.13589507341384888, 0.07020111382007599, -0.2060057520866394, 0.07453369349241257, 0.021617239341139793, -0.12150535732507706, 0.1501554399728775, -0.15603943169116974, -0.02239619754254818, -0.04320520535111427, -0.03733648359775543, -0.0019061887869611382, -0.04984702914953232, 0.11122019588947296, -0.09003032743930817, -0.035543590784072876, 0.08544019609689713, 0.02896883338689804, 0.30172955989837646, 0.1779678612947464, 0.04582427069544792, -0.029705582186579704, -0.04104959964752197, -0.0909443348646164, 0.08246778696775436, 0.02819240093231201, -0.06515631824731827, -0.057437147945165634, -0.09667186439037323, -0.09870654344558716, -0.011475074104964733, 0.019771119579672813, 0.2719727158546448, 0.0406222827732563, 0.097515769302845, -0.12370596081018448, -0.00987402256578207, 0.13845188915729523, -0.10552606731653214, -0.16265064477920532, -0.0205698125064373, -0.09962373226881027, -0.01668241247534752, -0.14856067299842834, 0.15646158158779144, -0.07909662276506424, 0.05552610009908676, -0.05826275423169136, -0.22867143154144287, -0.03957412764430046, 0.06066792830824852, -0.02390022575855255, 0.11387170106172562, 0.04884526878595352, -0.13227789103984833, -0.19286318123340607, 0.03305782377719879, -0.1373761147260666, 0.04823344945907593, -0.05874927341938019, 0.036704860627651215, -0.18706946074962616, -0.07050702720880508, -0.04896116256713867, -0.018129531294107437, 0.09623171389102936, -0.10076811909675598, 0.009685482829809189, -0.13000304996967316, 0.03201733157038689, 0.0758238360285759, 0.056528232991695404, 0.06861799210309982, 0.0026814942248165607, 0.12342856079339981, 0.057899922132492065, -0.03463759273290634, 0.07566002011299133, -0.059757109731435776, -0.0637664645910263, 0.0022225435823202133, -0.1143486425280571, -0.008334686979651451, -0.07980236411094666, -0.015062191523611546, -0.21269457042217255, -0.028774801641702652, 0.06664173305034637, 0.004273816477507353, -0.07658904790878296, -0.0035034155007451773, -0.07547861337661743, -0.11821707338094711, 0.04685254022479057, -0.23232944309711456, -0.14797744154930115, 0.23656141757965088, 0.09179436415433884, -0.09705859422683716, 0.08501733094453812, 0.054927632212638855, -0.09424535930156708, 0.19005529582500458, -0.03543548658490181, -0.026092814281582832, -0.042264118790626526, 0.08008117973804474, 0.04399513825774193, 0.025115743279457092, -0.08494006842374802, -0.1495884358882904, 0.04596678912639618, -0.08965018391609192, -0.18280525505542755, 0.046189986169338226, -0.17284347116947174, 0.023914311081171036, 0.13439586758613586, 0.002010549185797572, 0.14458176493644714, 0.03423956409096718, 0.014773005619645119, -0.032740239053964615, 0.06475840508937836, -0.06396223604679108, 0.21982119977474213, -0.2106133997440338, -0.09389536827802658, 0.20557335019111633, 0.18361838161945343, 0.059368036687374115, -0.06394004076719284, -0.14049756526947021, 0.2061775177717209, 0.03477238863706589, 0.1535782814025879, 0.022141678258776665, -0.13029877841472626, 0.1191115751862526, -0.002683520782738924, -0.08253012597560883, 0.04325367510318756, 0.05494140461087227, -0.11268960684537888, -0.07196749746799469, 0.0269272793084383, 0.08199691027402878, 0.07027469575405121, -0.11377109587192535, -0.06059437617659569, -0.1110394224524498, 0.04463766887784004, -0.024963421747088432, -0.04682399332523346, -0.0716957300901413, 0.03679043799638748, 0.05280087888240814, 0.08921974152326584, -0.08079027384519577, -0.019884219393134117, -0.0608428418636322, -0.19576790928840637, -0.05107440799474716, -0.07721681892871857, -0.03800404071807861, 0.08668287098407745, 0.01671142876148224, -0.055398475378751755, 0.07560322433710098, 0.06767493486404419, 0.057829733937978745, -0.02616899088025093, 0.059539102017879486, -0.029017150402069092, 0.041436195373535156, 0.09053339064121246, 0.1277301013469696, -0.037469226866960526, 0.04970596358180046, 0.1332373172044754, -0.07580605894327164, 0.09204886108636856, 0.04080137237906456, -0.049864981323480606, -0.0898360088467598, 0.07580533623695374, 0.1509391814470291, -0.14412271976470947, -0.1577952802181244, 0.06173357367515564, 0.02931066043674946, 0.18095067143440247, 0.21264342963695526, -0.017662350088357925, 0.03476116806268692, -0.00810161605477333, 0.12384714186191559, 0.04996440187096596, 0.04011965170502663, 0.27540895342826843, -0.032525766640901566, -0.01231592521071434, 0.12450750917196274, -0.0182733703404665, 0.28581058979034424, -0.2156461477279663, -0.1392858624458313, -0.28186702728271484, 0.0733698308467865, 0.033091988414525986, 0.10025183856487274, 0.08160172402858734, -0.04076116904616356, -0.030565785244107246, -0.041972286999225616, -0.11302272975444794, 0.08181701600551605, 0.02467111498117447, -0.11893608421087265, -0.1702267974615097, -0.15102845430374146, 0.02036283351480961, -0.034747254103422165, -0.014640867710113525, 0.0760892927646637, -0.059408608824014664, 0.048857420682907104, -0.011330862529575825, 0.01894448697566986, -0.05859367549419403, -0.15154679119586945, -0.021917782723903656, -0.010471184737980366, 0.08460651338100433, 0.4040451645851135, -0.11815716326236725, -0.12033827602863312, -0.083903968334198, 0.015732182189822197, 0.03637140244245529, -0.019584540277719498, -0.03199354559183121, 0.2003336101770401, -0.10493069142103195, 0.034794144332408905, -0.016246195882558823, 0.002331043826416135, 0.09420923888683319, 0.15694551169872284, 0.1753714233636856, -0.023192211985588074, 0.011135254986584187, -0.030326038599014282, 0.2679134011268616, -0.045898936688899994, -0.08554060757160187, -0.07463060319423676, -0.08242323249578476, -0.06593102961778641, -0.03355567157268524, -0.04321746528148651, -0.03935178741812706, 0.08041916787624359, 0.019987769424915314, 0.010887255892157555, 0.03091089241206646, 0.1747533082962036, 0.23680593073368073, -0.0559949167072773, -0.13142196834087372, 0.08754608035087585, -0.029036959633231163, -0.10356906056404114, -0.15530717372894287, -0.025517737492918968, 0.1364629566669464, 0.055261049419641495, 0.03777572512626648, 0.08348267525434494, 0.20988446474075317, -0.0526512935757637, 0.03350771218538284, -0.14688639342784882, 0.03579612448811531, -0.030079158022999763, -0.015501700341701508, 0.15466570854187012, -0.00844209548085928, -0.035051941871643066, -0.058935053646564484, 0.1086658388376236, -0.13829542696475983, -0.1286456435918808, 0.20836752653121948, 0.05886445194482803, -0.07024507224559784, -0.02987033687531948, 0.005040214397013187, -0.010317315347492695, -0.005079288501292467, 0.12777476012706757, -0.062108173966407776, -0.0693872943520546, 0.0782461166381836, 0.1004728451371193, -0.12155153602361679, 0.04316329210996628, -0.011298800818622112, -0.01716463826596737, -0.22282254695892334, 0.016417527571320534, 0.08330308645963669, 0.18893662095069885, 0.17016994953155518, -0.004157060757279396, -0.2116430103778839, -0.02378423884510994, -0.20549233257770538, -0.003186209127306938, 0.11403142660856247, 0.13010801374912262, -0.08498077094554901, -0.027600357308983803, -2.7532960596153365e-32, -0.031716618686914444, -0.08074118942022324, -0.06286333501338959, 0.014178148470818996, -0.054556697607040405, 0.06753098219633102, 0.015215972438454628, -0.04502290114760399, -0.007566409185528755, -0.012554340064525604, 0.06651591509580612, 0.08560918271541595, 0.08111825585365295, 0.14792746305465698, -0.063545823097229, 0.01424302440136671, 0.008120075799524784, 0.05325550585985184, 0.034297872334718704, 0.08603639900684357, 0.054615236818790436, -0.10368593782186508, 0.017930394038558006, -0.03414061293005943, -0.057935044169425964, 0.04020795598626137, -0.03757382184267044, -0.05473299324512482, 0.04992659017443657, 0.2025114744901657, -0.12114284932613373, 0.023616259917616844, -0.04268806800246239, 0.1940356194972992, 0.04174508526921272, 0.003451174357905984, -0.1161431297659874, 0.08694048970937729, -0.25319772958755493, 0.11722702533006668, 0.1530274599790573, 0.03755131736397743, -0.13915438950061798, -0.0886378139257431, 0.2579070031642914, 0.07731009274721146, 0.0664224624633789, -0.03030320070683956, -0.07718192040920258, 0.04793139174580574, 0.022316966205835342, 0.053832054138183594, 0.028068965300917625, -0.07399576902389526, 0.11490655690431595, -0.04405469447374344, 0.09629444032907486, -0.012576614506542683, 0.08188041299581528, 0.0872543677687645, -0.07520417124032974, -0.01286201924085617, -0.049546923488378525, 0.045090630650520325, 0.0009900202276185155, 0.08193264901638031, -0.0017898438964039087, -0.16750489175319672, 0.041154347360134125, -0.03394676372408867, 0.029114510864019394, 0.24595670402050018, 0.08866750448942184, 0.022391561418771744, -0.256011426448822, 0.08251803368330002, -0.0676020085811615, -0.03587812930345535, -0.025641759857535362, -0.07590090483427048, -0.08038928359746933, -0.08027414232492447, -0.0014672778779640794, 0.07796552032232285, 0.10809493064880371, 0.1161450520157814, -0.08368924260139465, 0.02342117391526699, -0.029415903612971306, -0.022775830700993538, -0.2363658994436264, -0.011236707679927349, 0.05866085737943649, -0.05045017972588539, 0.013747185468673706, -0.10205461084842682, 0.02253829687833786, 0.2245909720659256, 0.027390679344534874, -0.033034492284059525, 0.024566708132624626, -0.09812131524085999, 0.20195001363754272, -0.012532911263406277, 0.12068848311901093, -0.07728147506713867, 0.20851537585258484, 0.22298239171504974, -0.2465725541114807, -0.04923844709992409, -0.06618092209100723, 0.08888767659664154, -0.001677165855653584, 0.23690275847911835, 0.15997381508350372, 0.03978514298796654, -0.1218436136841774, -0.08127596974372864, 0.11194263398647308, 0.11596844345331192, -0.2244647741317749, -0.09166879951953888, -0.09287787228822708, -0.0828014388680458, 0.0002210362144978717, 0.1482965499162674, -0.27154821157455444, -0.14640937745571136, -0.04033948481082916, -0.20623496174812317, -0.010883565992116928, 0.010757329873740673, 7.537000783486292e-7, -0.29543617367744446, 0.10707471519708633, -0.023226704448461533, -0.0232694074511528, -0.022900376468896866, -0.020296666771173477, -0.20445415377616882, -0.0030935665126889944, -0.13274763524532318, -0.11935609579086304, 0.042630385607481, -0.10174565017223358, 0.04675786569714546, 0.05465247109532356, -0.07054801285266876, -0.00832192413508892, -0.11048214137554169, 0.01691756583750248, -0.06852257996797562, 0.1172400638461113, 0.0449465811252594, 0.19547928869724274, 0.07739175856113434, 0.0599096342921257, 0.01702183671295643, -0.023373665288090706, 0.035311222076416016, 0.04912658780813217, 0.08850481361150742, -0.02732548490166664, 0.09747151285409927, 0.16483120620250702, -0.16338451206684113, 0.169826939702034, -0.11337495595216751, -0.024325793609023094, -0.012066066265106201, -0.19436872005462646, -0.05763673782348633, -0.011423477903008461, 0.016921695321798325, 0.10777846723794937, -0.025069374591112137, -0.1387321650981903, 0.1330624371767044, 0.09568674117326736, 0.03272978216409683, -0.13715095818042755, -0.12071153521537781, 0.046969592571258545, 0.0042015607468783855, 0.0035216815304011106, 0.03856884315609932, 0.21486783027648926, 0.06465370953083038, -0.04667682573199272, 0.05950147658586502, -0.16518090665340424, 0.09343785792589188, -0.05424338951706886, -0.10844153165817261, -0.05221700295805931, -0.09409404546022415, 0.09755750000476837, 0.16778475046157837, -0.016771642491221428, -0.07197487354278564, 1.5304476122281691e-34, -0.039883941411972046, -0.07014131546020508, 0.0774783045053482, 0.037054307758808136, -0.0875539481639862, 0.06812155991792679, -0.02520083822309971, -0.04491838812828064, 0.05030159652233124, -0.15283086895942688, -0.03836463764309883 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
> You can pass this data in .from_dict() - no need to cast anything for this column > > ```python > ds = Dataset.from_dict({ > "image": [...], > "label": [...], > "segments_info": [...], > )} > ``` > > where `segments_info` is the list of the segment_infos of all the examples in the dataset, and therefore is a list of lists of dicts. Thank you for the quick reply @lhoestq , but then how to generate the `segments_info` list of lists of dicts starting from a _panoptic_coco_annotation.json_ file ?
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
89
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). > You can pass this data in .from_dict() - no need to cast anything for this column > > ```python > ds = Dataset.from_dict({ > "image": [...], > "label": [...], > "segments_info": [...], > )} > ``` > > where `segments_info` is the list of the segment_infos of all the examples in the dataset, and therefore is a list of lists of dicts. Thank you for the quick reply @lhoestq , but then how to generate the `segments_info` list of lists of dicts starting from a _panoptic_coco_annotation.json_ file ?
[ 0.107085682451725, -0.04349403828382492, -0.08724354952573776, 0.09967990219593048, 0.19450373947620392, 0.08216983824968338, 0.01016523689031601, -0.11828199028968811, -0.08905478566884995, 0.05700823664665222, -0.06356112658977509, 0.03923993185162544, -0.07243022322654724, 0.08382057398557663, 0.037451792508363724, -0.10363972932100296, -0.11722439527511597, -0.02197098918259144, -0.12744954228401184, -0.06004440784454346, -0.05554169416427612, 0.04822418838739395, 0.21338748931884766, -0.06235674023628235, -0.09889605641365051, -0.18224292993545532, -0.18845497071743011, 0.17408017814159393, -0.03909452632069588, -0.31453070044517517, 0.18388541042804718, 0.04315507411956787, 0.16162846982479095, -0.04938257113099098, 0.000005743707333749626, -0.03422481566667557, 0.10235462337732315, -0.08913557976484299, 0.019133364781737328, -0.2039446383714676, 0.02729985862970352, -0.012559930793941021, 0.06883548200130463, -0.17439591884613037, 0.010386653244495392, 0.08218026906251907, -0.042266830801963806, -0.011789868585765362, 0.17777642607688904, 0.08379407227039337, -0.004827277269214392, 0.01946738362312317, 0.01222589798271656, -0.11575765907764435, 0.05170876160264015, 0.1438596248626709, 0.03182230144739151, 0.2780131995677948, -0.10280520468950272, 0.07233701646327972, 0.05571117624640465, -0.009978709742426872, 0.039608389139175415, 0.039672255516052246, 0.13254280388355255, 0.009881317615509033, -0.17612385749816895, -0.2731158435344696, -0.01922708749771118, 0.11062495410442352, 0.10442183911800385, -0.04282768815755844, -0.05904613435268402, 0.08225410431623459, 0.024614151567220688, -0.10138309001922607, -0.20024240016937256, -0.03135168179869652, -0.0018478907877579331, -0.0014672100078314543, 0.053884174674749374, -0.16320644319057465, -0.07461002469062805, -0.03964045271277428, 0.09006357938051224, -0.05163247138261795, -0.08301228284835815, 0.012233024463057518, 0.011123969219624996, -0.015064768493175507, 0.07536691427230835, -0.10220443457365036, -0.14770746231079102, -0.013201706111431122, 0.16762420535087585, -0.11275430023670197, 0.06775926053524017, 0.011594966985285282, -0.002432021079584956, 0.08319441229104996, -0.0899871289730072, -0.1820683777332306, -0.141653910279274, 0.056722451001405716, -0.23359815776348114, 0.07360565662384033, -0.07906118035316467, 0.08197139203548431, -0.05976959317922592, 0.061307575553655624, -0.09138927608728409, 0.07143604010343552, -0.04595060646533966, 0.09121854603290558, 0.04545905068516731, 0.12151310592889786, -0.07503526657819748, 0.15130756795406342, 0.012805232778191566, 0.02090555615723133, 0.250007301568985, 0.029097625985741615, 0.07649224251508713, 0.1870192140340805, 0.049139779061079025, -0.15385937690734863, 0.02233712375164032, 0.11756191402673721, 0.0790177434682846, 0.022979680448770523, -0.05760340765118599, 0.1254781186580658, 0.19267787039279938, -0.037298109382390976, 0.13535770773887634, -0.05999072268605232, -0.020771319046616554, -0.27530667185783386, 0.06281104683876038, -0.11678872257471085, -0.17591583728790283, -0.047553420066833496, -0.07272760570049286, -0.0009806917514652014, -0.07106849551200867, -0.03977169468998909, 0.10123497247695923, 0.11982692033052444, -0.04894280806183815, -0.06981324404478073, 0.012314748018980026, 0.04551846534013748, -0.3241836130619049, 0.07403229176998138, -0.023750392720103264, 0.028536681085824966, -0.1313387006521225, 0.07566212862730026, -0.1495673656463623, 0.13175150752067566, 0.05644762143492699, 0.03456788882613182, 0.047912418842315674, -0.08761550486087799, 0.040554117411375046, 0.1564401239156723, -0.07793097198009491, 0.06152939423918724, -0.0443657822906971, -0.12202490866184235, -0.026334282010793686, -0.15604037046432495, -0.0639856606721878, 0.03500499948859215, 0.06497348099946976, 0.07407933473587036, -0.07029864937067032, -0.06571706384420395, -0.1332937777042389, -0.009357079863548279, 0.014979910105466843, -0.1702934205532074, 0.07834097743034363, 0.03722323104739189, 0.07324251532554626, 0.12971313297748566, -0.17308205366134644, 0.07684297114610672, -0.06319927424192429, -0.12824110686779022, -0.06703858077526093, 0.04277724400162697, 0.027325423434376717, -0.02419097349047661, 0.004835694562643766, 0.044430408626794815, 0.10188040137290955, -0.14211535453796387, -0.031595379114151, -0.2935151159763336, -0.045557018369436264, -0.05539294704794884, 0.15685667097568512, -0.03086056560277939, -0.05130494013428688, 0.05251433327794075, -0.22880233824253082, 0.09729333966970444, 0.198603555560112, -0.051203496754169464, -0.09229214489459991, -0.1162140816450119, -0.18642641603946686, -0.031317465007305145, -0.08253517746925354, -0.0473259799182415, -0.0712122842669487, -0.05523490160703659, 0.12159699946641922, 0.08910994976758957, 0.017373304814100266, 0.045282065868377686, 0.09675761312246323, 0.1232672706246376, 0.10542465001344681, 0.07834894210100174, -0.0006458592251874506, -0.08978500962257385, 0.2262149155139923, 0.02570655755698681, -0.031147180125117302, -0.10989599674940109, 0.15465298295021057, 0.03225404769182205, -0.13452433049678802, 0.02989845536649227, 0.022403618320822716, -0.09265105426311493, 0.07653199136257172, -0.13325582444667816, 0.04966316372156143, -0.06499027460813522, -0.007270144764333963, -0.04266824573278427, -0.11442352086305618, 0.1845303177833557, -0.06057241931557655, -0.004656132310628891, 0.06143822893500328, 0.03398633375763893, 0.32344356179237366, 0.1854015290737152, 0.044287826865911484, -0.02278137393295765, -0.0682365819811821, -0.09924813359975815, 0.090224489569664, 0.023242078721523285, -0.041272781789302826, -0.05003916844725609, -0.08741927146911621, -0.11429674178361893, -0.06838422268629074, 0.03981291130185127, 0.30754825472831726, 0.04077029600739479, 0.04067977890372276, -0.14501769840717316, 0.01774522103369236, 0.13438178598880768, -0.1086418405175209, -0.17905807495117188, -0.09332463890314102, -0.12435974925756454, 0.04939379170536995, -0.16163001954555511, 0.19232343137264252, -0.097857266664505, 0.08876919746398926, -0.05648251622915268, -0.15560758113861084, -0.12070488184690475, 0.08761841803789139, -0.015821145847439766, 0.10523540526628494, 0.10674542933702469, -0.0555652417242527, -0.19213612377643585, 0.05261271819472313, -0.241734579205513, 0.015796713531017303, -0.0964839905500412, 0.028082741424441338, -0.15207882225513458, -0.03018844686448574, -0.025947704911231995, -0.01142685767263174, 0.044845081865787506, -0.05201846733689308, -0.026640066877007484, -0.15355446934700012, -0.022951966151595116, 0.12802661955356598, 0.10886471718549728, 0.056527648121118546, 0.10529613494873047, 0.06019910052418709, 0.042392123490571976, -0.06387966126203537, 0.08463622629642487, -0.02299981564283371, -0.004967095330357552, -0.0058688209392130375, -0.11999598145484924, 0.028735505416989326, -0.1123577356338501, -0.013675032183527946, -0.2534334361553192, -0.02208101749420166, 0.11233963072299957, 0.0037067721132189035, -0.06870841234922409, -0.04097623750567436, -0.1268443763256073, -0.059284504503011703, -0.009496236220002174, -0.2198323756456375, -0.13637672364711761, 0.2539476752281189, 0.17285870015621185, -0.07056768983602524, 0.11327474564313889, 0.0653485432267189, -0.11461402475833893, 0.22515292465686798, -0.06987662613391876, -0.0201596450060606, -0.022207917645573616, 0.09913325309753418, 0.01798091270029545, 0.04717008024454117, -0.023528147488832474, -0.1640234738588333, 0.06415845453739166, -0.09170909970998764, -0.13969369232654572, 0.05174405127763748, -0.1678185611963272, 0.048441704362630844, 0.10759175568819046, 0.00458042835816741, 0.09953659772872925, 0.05581775680184364, -0.0035395417362451553, -0.00827637780457735, 0.043404776602983475, -0.04862753674387932, 0.20963013172149658, -0.15562927722930908, -0.059673476964235306, 0.20449772477149963, 0.11886066943407059, 0.03614949807524681, -0.009743278846144676, -0.08154567331075668, 0.15105357766151428, 0.060436490923166275, 0.13556179404258728, 0.015013656578958035, -0.089503712952137, 0.08759026974439621, 0.0026736219879239798, -0.07634509354829788, -0.0027946250047534704, 0.05999131128191948, -0.1543867439031601, -0.04209978133440018, 0.09692700207233429, 0.09231504052877426, 0.04766383022069931, -0.09340504556894302, -0.10090960562229156, -0.08741206675767899, 0.08807602524757385, -0.027259575203061104, -0.056540049612522125, 0.0011292643612250686, 0.038119520992040634, 0.06558305025100708, 0.11057814210653305, -0.14972181618213654, -0.051337145268917084, -0.04011470079421997, -0.19182315468788147, -0.06966033577919006, -0.06338386982679367, 0.02492750808596611, 0.10547531396150589, 0.04223700240254402, -0.042462896555662155, 0.08080825209617615, 0.009603769518435001, 0.017292216420173645, -0.02866831235587597, 0.17140986025333405, 0.06908106803894043, 0.10782480239868164, 0.07896602153778076, 0.14265204966068268, -0.032307662069797516, 0.0300099179148674, 0.1253713220357895, -0.08941929042339325, 0.06128814071416855, 0.033294353634119034, -0.018165769055485725, -0.09973767399787903, 0.10012979060411453, 0.12817899882793427, -0.1686227172613144, -0.19132789969444275, 0.10509220510721207, -0.008251175284385681, 0.17581641674041748, 0.19050216674804688, 0.012869884259998798, 0.05267997458577156, 0.032862987369298935, 0.1082712933421135, 0.05703529715538025, 0.07175785303115845, 0.30669501423835754, -0.03864069655537605, -0.03164420276880264, 0.0903414636850357, -0.02736590802669525, 0.31058400869369507, -0.17606201767921448, -0.16615110635757446, -0.28889021277427673, 0.07414273172616959, -0.012735206633806229, 0.05896124243736267, 0.09432917833328247, -0.10779324173927307, -0.042414069175720215, -0.048733796924352646, -0.04882471263408661, 0.07238062471151352, 0.03829360380768776, -0.20931461453437805, -0.1995231956243515, -0.23922736942768097, 0.0007243669824674726, -0.10868080705404282, -0.03157892823219299, 0.06302305310964584, -0.11329471319913864, 0.0474359467625618, 0.025248801335692406, 0.05928729102015495, -0.0751882940530777, -0.08726419508457184, -0.002457571681588888, 0.019823256880044937, 0.176279678940773, 0.40001383423805237, -0.11278674006462097, -0.09656273573637009, -0.0899009257555008, 0.08410767465829849, -0.018007971346378326, -0.020543230697512627, -0.04696816951036453, 0.22623421251773834, -0.10465682297945023, 0.02995094656944275, 0.009067291393876076, 0.025188585743308067, 0.13942500948905945, 0.1594470888376236, 0.19829882681369781, -0.022907977923750877, 0.023457098752260208, -0.011816547252237797, 0.22629015147686005, -0.08919476717710495, -0.11402585357427597, -0.09289596974849701, -0.11753908544778824, -0.0837920606136322, -0.10056322067975998, -0.016996264457702637, -0.01947772316634655, 0.0667557343840599, 0.02263868786394596, -0.026492232456803322, 0.03775894641876221, 0.17600640654563904, 0.2422095090150833, -0.06686875969171524, -0.12673042714595795, 0.044430628418922424, 0.012866589240729809, -0.1269131898880005, -0.17283152043819427, -0.07368195056915283, 0.12324204295873642, 0.05310033634305, 0.04622470214962959, 0.07550539076328278, 0.13847890496253967, -0.07088717818260193, 0.05315617099404335, -0.15513411164283752, 0.03579069674015045, -0.04660113528370857, -0.005085337441414595, 0.1562996655702591, -0.020740265026688576, -0.04280178248882294, -0.042488038539886475, 0.11230039596557617, -0.18231697380542755, -0.08045050501823425, 0.2096189707517624, 0.0510769784450531, -0.09209048002958298, -0.08064419031143188, 0.06668127328157425, 0.0011733901919797063, -0.03761119022965431, 0.18814043700695038, -0.0551946721971035, -0.03755051642656326, -0.013101830147206783, 0.054449811577796936, -0.08151254802942276, 0.05612475797533989, 0.003851474029943347, -0.023713937029242516, -0.1806686967611313, -0.03141852468252182, 0.08500140905380249, 0.20981571078300476, 0.1716969907283783, -0.009156699292361736, -0.1741761565208435, -0.0013527281116694212, -0.23293060064315796, 0.014624899253249168, 0.08977547287940979, 0.11568253487348557, -0.03675084561109543, -0.01100977137684822, -2.663245551629069e-32, -0.02204344980418682, -0.046323198825120926, -0.00827823393046856, 0.01589271053671837, -0.03859095275402069, 0.07510794699192047, 0.040639545768499374, -0.06301899254322052, 0.024331502616405487, -0.048025861382484436, 0.09901123493909836, 0.08509774506092072, 0.07096551358699799, 0.15387886762619019, -0.04883822798728943, 0.006295054219663143, -0.06631184369325638, 0.03645814582705498, 0.015820741653442383, 0.07722978293895721, 0.10329340398311615, -0.13364927470684052, 0.053826551884412766, -0.02741410955786705, -0.025975612923502922, -0.004987168591469526, -0.03023061715066433, -0.13223879039287567, 0.042172621935606, 0.2315753698348999, -0.14559996128082275, 0.0417814701795578, -0.02862984873354435, 0.20509183406829834, 0.02877732552587986, 0.003895008936524391, -0.07701191306114197, 0.07987359166145325, -0.24015863239765167, 0.09025200456380844, 0.12348706275224686, 0.0525251105427742, -0.11240182816982269, -0.06300671398639679, 0.28069499135017395, 0.11731922626495361, 0.0349624864757061, 0.00786222331225872, -0.1259355992078781, 0.08561254292726517, 0.05280715599656105, 0.012831833213567734, 0.040039271116256714, -0.08687817305326462, 0.13665859401226044, -0.06842955946922302, 0.0925886482000351, -0.05582781508564949, 0.0937841609120369, 0.1320110708475113, -0.047805722802877426, -0.036816053092479706, -0.03469879925251007, 0.0892193466424942, 0.03014894761145115, 0.11882318556308746, 0.04920203238725662, -0.08164004236459732, 0.05582762882113457, -0.00826608669012785, 0.012846020981669426, 0.22551032900810242, 0.0004277059924788773, 0.033770330250263214, -0.2885415852069855, 0.07647514343261719, -0.050563860684633255, -0.11446306109428406, -0.062292929738759995, -0.10398537665605545, -0.09678242355585098, -0.13607271015644073, 0.004041699226945639, 0.08817310631275177, 0.12057952582836151, 0.08929788321256638, -0.08996159583330154, 0.07844661921262741, -0.05319485813379288, -0.004954412113875151, -0.24847304821014404, 0.0226290300488472, 0.02427792176604271, 0.014219655655324459, 0.04903680458664894, -0.06531581282615662, 0.011799294501543045, 0.1949567347764969, 0.01967371627688408, -0.022533759474754333, 0.009897862561047077, -0.08787020295858383, 0.19048380851745605, -0.04320279881358147, 0.09870737791061401, -0.028158925473690033, 0.23176763951778412, 0.19040580093860626, -0.1877405047416687, -0.08157894015312195, -0.04537271708250046, 0.1030254065990448, -0.016015123575925827, 0.17911368608474731, 0.17801259458065033, 0.04573166370391846, -0.16059431433677673, -0.08521155267953873, 0.09486137330532074, 0.15154938399791718, -0.1963881403207779, -0.10753285884857178, -0.0973755270242691, -0.10266995429992676, 0.033137913793325424, 0.1733289361000061, -0.2953491508960724, -0.13580067455768585, -0.005195733159780502, -0.12461874634027481, 0.015464799478650093, 0.042172618210315704, 7.463542601726658e-7, -0.31390661001205444, 0.08325807005167007, -0.05674826726317406, -0.007253887597471476, -0.03819834440946579, -0.0058360924012959, -0.1659434735774994, 0.0005520487902686, -0.1255616396665573, -0.1347026228904724, 0.0694906935095787, -0.08831208199262619, 0.0050718411803245544, 0.07749474793672562, -0.12071040272712708, 0.036861736327409744, -0.07938806712627411, 0.051131077110767365, -0.11169319599866867, 0.15428006649017334, 0.08239252120256424, 0.1635463386774063, 0.05095880851149559, 0.056117452681064606, -0.04578281566500664, 0.019284212961792946, 0.04023183882236481, 0.030622432008385658, 0.06309153139591217, -0.002159952186048031, 0.09500278532505035, 0.13276004791259766, -0.07812628895044327, 0.21030957996845245, -0.12685942649841309, -0.019170338287949562, -0.05757784843444824, -0.21862614154815674, -0.028799502179026604, 0.005951422266662121, 0.08847316354513168, 0.09896355867385864, -0.009508381597697735, -0.11041070520877838, 0.10237854719161987, 0.07683373242616653, 0.033595629036426544, -0.15089885890483856, -0.1049143522977829, 0.09515029191970825, -0.05345984175801277, 0.008027772419154644, 0.03656464070081711, 0.1910998672246933, 0.07269052416086197, -0.027397502213716507, 0.05347837507724762, -0.1392151117324829, 0.08658576756715775, -0.0451490618288517, -0.1017107143998146, -0.004327897448092699, -0.051269639283418655, 0.02438698522746563, 0.15759168565273285, 0.04827895760536194, -0.012678171508014202, 1.795523884225999e-34, -0.07829948514699936, -0.07692018151283264, 0.0034963737707585096, 0.0029501281678676605, -0.09027594327926636, 0.041652288287878036, -0.015655970200896263, -0.04309125244617462, 0.04652564972639084, -0.15326055884361267, -0.00855077151209116 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
You read the JSON file and transform the data yourself. I don't think there's an automatic converter somewhere
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
18
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). You read the JSON file and transform the data yourself. I don't think there's an automatic converter somewhere
[ 0.05799384415149689, 0.030578410252928734, -0.010619452223181725, 0.08059336990118027, 0.16333869099617004, 0.014857217669487, 0.0025210382882505655, -0.07660580426454544, -0.13680921494960785, 0.10994289815425873, -0.05250432714819908, 0.07991097122430801, -0.061286624521017075, 0.2049691379070282, 0.016201388090848923, -0.08091632276773453, -0.11519161611795425, -0.0651715099811554, -0.13495607674121857, -0.07315567880868912, -0.03774324804544449, 0.0711277648806572, 0.26196402311325073, -0.10957077145576477, -0.12031645327806473, -0.1624038815498352, -0.13336671888828278, 0.17500373721122742, -0.05772077664732933, -0.2249196618795395, 0.1685832440853119, -0.007566801272332668, 0.1334674209356308, 0.02948809042572975, 0.000005767516995547339, -0.04024801775813103, 0.008340361528098583, -0.0671510249376297, 0.07109451293945312, -0.1479642391204834, 0.07833737134933472, -0.06512238085269928, 0.04689454287290573, -0.044903066009283066, -0.08871102333068848, 0.08778016269207001, 0.04301247000694275, -0.02109397202730179, 0.18132735788822174, 0.13884887099266052, 0.002417299896478653, 0.05962541326880455, 0.06511969119310379, -0.12177245318889618, -0.03677961975336075, 0.09474561363458633, -0.025716885924339294, 0.3271332085132599, -0.0683239996433258, 0.13546660542488098, -0.03766858950257301, 0.06063970550894737, 0.08801279962062836, -0.022776486352086067, 0.1953580379486084, -0.0001487213303335011, -0.20777539908885956, -0.2569724917411804, 0.0036055436357855797, 0.09433446824550629, 0.04086818918585777, 0.0038005849346518517, -0.09830370545387268, 0.049444377422332764, 0.06523625552654266, 0.012837717309594154, -0.1297680288553238, -0.042800284922122955, 0.06075610965490341, 0.05645051598548889, -0.0479532815515995, -0.15175990760326385, -0.04879041761159897, -0.07592058181762695, 0.02927243895828724, -0.003335782326757908, -0.09910009801387787, 0.0029892732854932547, 0.013953648507595062, -0.02876722440123558, 0.016388142481446266, -0.06283330917358398, -0.06118285283446312, -0.015180985443294048, 0.18543948233127594, -0.09266970306634903, 0.07968973368406296, 0.07757443189620972, -0.03065408580005169, 0.0008430463494732976, -0.011940736323595047, -0.1721491664648056, -0.16868673264980316, 0.10550110787153244, -0.23018670082092285, 0.03032011166214943, -0.08485039323568344, -0.005937008187174797, 0.017987558618187904, 0.041878435760736465, -0.04799219220876694, 0.010961515828967094, -0.12931472063064575, 0.03971080854535103, -0.08788593858480453, 0.10298480093479156, -0.0728878527879715, 0.08235134184360504, 0.05372757464647293, -0.09660591185092926, 0.3128126859664917, 0.12497720122337341, -0.02990563213825226, 0.15180593729019165, 0.0573202446103096, -0.03839205205440521, -0.004485678859055042, 0.17036819458007812, 0.06409083306789398, -0.032507363706827164, -0.044195108115673065, 0.08690415322780609, 0.16721774637699127, -0.028360946103930473, 0.18402579426765442, -0.11231528222560883, -0.07756533473730087, -0.23305854201316833, 0.04687240347266197, -0.04712479189038277, -0.1389346718788147, 0.02143484726548195, -0.06762411445379257, 0.003917910158634186, -0.1142110750079155, -0.06178497523069382, 0.11559238284826279, 0.048580482602119446, -0.05898583307862282, -0.02332579903304577, 0.03334035724401474, 0.15756505727767944, -0.2468211054801941, 0.043432436883449554, -0.01159533578902483, 0.0035884834360331297, -0.15689989924430847, 0.0960671529173851, -0.20762032270431519, 0.05956093966960907, 0.07562898844480515, 0.031207982450723648, 0.008289952762424946, 0.01721767894923687, 0.01796586811542511, 0.2034604400396347, -0.04687716066837311, 0.01607956737279892, -0.061029065400362015, -0.0491262823343277, 0.045058272778987885, -0.20145000517368317, 0.0594913586974144, -0.0018545326311141253, 0.005552434362471104, 0.03438951447606087, -0.1398037225008011, -0.13421311974525452, -0.13622990250587463, -0.007982819341123104, -0.10132575780153275, -0.15959104895591736, 0.017359133809804916, 0.08496445417404175, -0.08019798994064331, 0.08648841083049774, -0.1973225325345993, 0.20991219580173492, -0.14884549379348755, -0.05115192383527756, -0.03256389871239662, -0.08410323411226273, 0.14426597952842712, -0.0069825658574700356, 0.006569688208401203, 0.06740295141935349, 0.18622632324695587, -0.17011040449142456, -0.03692181780934334, -0.28882941603660583, -0.05719528719782829, -0.061583906412124634, 0.10901891440153122, -0.073216013610363, -0.04732213914394379, 0.03736717626452446, -0.17561760544776917, 0.09150328487157822, 0.22202979028224945, 0.008373457938432693, -0.10716819018125534, -0.10797517001628876, -0.16312599182128906, -0.0680275484919548, -0.06945981830358505, 0.02244909293949604, -0.06402962654829025, -0.15888294577598572, 0.07493354380130768, 0.17779871821403503, 0.02381294220685959, 0.1254066377878189, 0.15367087721824646, 0.12791617214679718, 0.026414139196276665, 0.07293543964624405, 0.08646844327449799, -0.04828951880335808, 0.21783336997032166, -0.027322804555296898, -0.02422390505671501, -0.058749862015247345, 0.14175750315189362, 0.02710604853928089, -0.1963302493095398, 0.1549362987279892, 0.0769236758351326, -0.10805664956569672, 0.12910078465938568, -0.17950411140918732, 0.022164173424243927, -0.04246455058455467, -0.028013408184051514, -0.013298160396516323, -0.05577670410275459, 0.14839527010917664, -0.12309345602989197, 0.019201068207621574, 0.1257818639278412, 0.00675843795761466, 0.38032129406929016, 0.16943643987178802, 0.011924924328923225, -0.0271505955606699, -0.060262180864810944, -0.07807043939828873, 0.09468036144971848, 0.002826469950377941, -0.06593797355890274, -0.03511134907603264, -0.06814713031053543, -0.05503889545798302, -0.0664677545428276, 0.05788441002368927, 0.29790058732032776, 0.014191223308444023, 0.07929020375013351, -0.15474054217338562, 0.03629203513264656, 0.16430847346782684, -0.1035306453704834, -0.12969589233398438, 0.02083471417427063, -0.1087728962302208, 0.02513190172612667, -0.22992438077926636, 0.21829049289226532, -0.07137700170278549, 0.07418472319841385, -0.02644127607345581, -0.27948197722435, -0.04669280722737312, 0.006871415302157402, -0.01400091964751482, 0.09547170251607895, 0.07650574296712875, -0.11981809139251709, -0.18008142709732056, -0.03322097659111023, -0.09577841311693192, 0.11354835331439972, -0.07124051451683044, 0.06825340539216995, -0.1462993025779724, -0.034204479306936264, -0.06829575449228287, 0.008747529238462448, 0.15604035556316376, -0.044793322682380676, 0.07008342444896698, -0.17156510055065155, 0.051677752286195755, 0.04561854898929596, 0.04409676790237427, 0.11189071089029312, -0.060716643929481506, 0.06619929522275925, -0.04241891950368881, 0.021199388429522514, 0.05885870009660721, -0.02131614089012146, -0.06901100277900696, 0.0028510375414043665, -0.07137501984834671, -0.01304582692682743, -0.09155012667179108, -0.016289716586470604, -0.1227731704711914, -0.009470741264522076, 0.08942227810621262, 0.051303930580616, -0.010750697925686836, -0.07772966474294662, -0.12233728915452957, -0.13429036736488342, 0.0610223151743412, -0.1733308881521225, -0.14091411232948303, 0.2945413887500763, 0.11044556647539139, -0.0899789035320282, 0.028841767460107803, 0.1434745341539383, -0.09809967130422592, 0.1014903262257576, -0.08474608510732651, -0.0051108780317008495, -0.15518049895763397, 0.11212132126092911, 0.013442941941320896, -0.0009467140771448612, -0.04749278724193573, -0.0982913225889206, 0.041134923696517944, -0.062074508517980576, -0.15248529613018036, 0.05782435089349747, -0.19152864813804626, -0.016247794032096863, 0.15498964488506317, -0.030337601900100708, 0.16867007315158844, 0.050785139203071594, -0.03672745078802109, -0.035919103771448135, 0.104674331843853, -0.06264889240264893, 0.24091170728206635, -0.167744979262352, -0.07139839977025986, 0.18702432513237, 0.2183048576116562, -0.02623837999999523, -0.05372186005115509, -0.15848763287067413, 0.1295497715473175, 0.07531514018774033, 0.2163025587797165, 0.02054635062813759, -0.10812058299779892, 0.17288798093795776, 0.013863710686564445, -0.1000150665640831, 0.040635157376527786, 0.03803037106990814, -0.09784647077322006, -0.08860558271408081, -0.01797502301633358, 0.052518799901008606, -0.006916623562574387, -0.07662855833768845, -0.022736746817827225, -0.11628957837820053, 0.02394265867769718, -0.024013129994273186, -0.04087858274579048, -0.09942946583032608, 0.07808884978294373, 0.03684372082352638, 0.11588515341281891, -0.08470705896615982, 0.030041664838790894, -0.07408004254102707, -0.192876398563385, 0.030687185004353523, -0.05944710224866867, 0.0007626545266248286, 0.06306707859039307, -0.013682418502867222, -0.01945723406970501, 0.03607070446014404, 0.023098275065422058, 0.052880216389894485, -0.039018385112285614, 0.02044994756579399, 0.02826150879263878, 0.04800556227564812, 0.08403415232896805, 0.05396904796361923, 0.01350261177867651, 0.03184226155281067, 0.19882529973983765, -0.05934254080057144, 0.08093895018100739, -0.03993430361151695, -0.014892653562128544, -0.054914526641368866, 0.09828346967697144, 0.1557278335094452, -0.1170954778790474, -0.17639407515525818, 0.1273551881313324, 0.045972149819135666, 0.17548270523548126, 0.21161282062530518, -0.03939399495720863, 0.01769322156906128, 0.042129602283239365, 0.20337939262390137, 0.06747420132160187, 0.02956593967974186, 0.28067547082901, -0.13063807785511017, 0.0264890193939209, 0.14407627284526825, -0.06546537578105927, 0.3006765842437744, -0.18055783212184906, -0.0723319724202156, -0.2743966579437256, 0.059846214950084686, 0.03570149093866348, 0.1469973921775818, 0.10994147509336472, -0.09738421440124512, 0.12210698425769806, 0.009314301423728466, -0.08809076249599457, 0.07080984860658646, -0.045880191028118134, -0.12264655530452728, -0.1384604573249817, -0.1436564177274704, 0.043572742491960526, -0.026608256623148918, 0.028522932901978493, 0.09481999278068542, 0.04175650328397751, 0.08005894720554352, -0.04841896519064903, -0.026365522295236588, -0.061319246888160706, -0.17009492218494415, -0.04378228634595871, 0.05482131242752075, 0.049504250288009644, 0.4015156924724579, -0.23714695870876312, -0.07817728817462921, -0.029845932498574257, 0.07165063172578812, -0.00845126062631607, -0.03164450824260712, -0.009123193100094795, 0.1542768031358719, -0.13260677456855774, 0.041131895035505295, 0.01168705802410841, -0.01537999976426363, 0.06436073780059814, 0.1716136932373047, 0.11391174793243408, -0.03911600261926651, -0.02367718331515789, 0.033946678042411804, 0.1691359132528305, -0.07835228741168976, -0.0365394726395607, -0.09023003280162811, -0.0912800282239914, 0.0515129528939724, -0.0022979460190981627, -0.024295484647154808, -0.0667414516210556, 0.06180410459637642, 0.017897920683026314, 0.03253473341464996, 0.018377866595983505, 0.17579947412014008, 0.28847736120224, -0.04760377109050751, -0.14896108210086823, 0.0959879606962204, -0.05761592090129852, -0.09552937000989914, -0.16492080688476562, -0.044284481555223465, 0.08244919031858444, 0.024093022570014, 0.07671455293893814, 0.04566537216305733, 0.2001502364873886, -0.038794130086898804, 0.07178191840648651, -0.16032662987709045, -0.05835205316543579, -0.0506766214966774, -0.03844992816448212, 0.23465335369110107, 0.009522179141640663, -0.012213555164635181, -0.03027259185910225, 0.08530569076538086, -0.1326805204153061, -0.1428747922182083, 0.16281558573246002, -0.011438226327300072, -0.06784424930810928, -0.06975308805704117, 0.01108091976493597, -0.019406959414482117, 0.0002277128369314596, 0.13715773820877075, -0.0566953644156456, -0.03999222069978714, 0.10172389447689056, 0.14667558670043945, -0.1682085543870926, 0.015243248082697392, -0.0502651147544384, 0.04769761115312576, -0.18289917707443237, -0.028363484889268875, 0.04730946198105812, 0.10776108503341675, 0.18259760737419128, 0.004366297274827957, -0.16861382126808167, 0.0021390479523688555, -0.20104113221168518, -0.02730095013976097, 0.19156795740127563, 0.19203810393810272, -0.10606271773576736, -0.08918295800685883, -2.6882659488863213e-32, -0.08978176862001419, -0.02303401380777359, 0.0010493064764887094, 0.0446440689265728, -0.018606221303343773, -0.005977037362754345, 0.021286746487021446, -0.06927482783794403, -0.007672281935811043, -0.035956766456365585, 0.06506387889385223, 0.028864072635769844, 0.09225758910179138, 0.18636178970336914, -0.016326850280165672, 0.047799065709114075, 0.040327902883291245, -0.006145266816020012, 0.02752423658967018, 0.08278706669807434, 0.0653088316321373, -0.13862693309783936, -0.0202509555965662, -0.08613011986017227, -0.09899246692657471, 0.06078684329986572, -0.08912303298711777, -0.004633632954210043, 0.0725952759385109, 0.16788262128829956, -0.09931370615959167, 0.04349225386977196, -0.045281536877155304, 0.18629145622253418, 0.06649754196405411, 0.050446685403585434, -0.16643935441970825, 0.10900287330150604, -0.2509944438934326, 0.17080917954444885, 0.10508780181407928, 0.016993340104818344, -0.09683597832918167, -0.09466534852981567, 0.25249674916267395, 0.03583579882979393, 0.03944843262434006, -0.05903526023030281, -0.03817665949463844, -0.004313861485570669, -0.04518714174628258, 0.03878386318683624, -0.0014261621981859207, -0.07364465296268463, 0.12322945892810822, 0.004413248039782047, 0.020758522674441338, -0.06353505700826645, 0.09810391813516617, 0.043723270297050476, -0.08375094830989838, -0.0636548176407814, -0.10038582235574722, 0.09775440394878387, -0.036052361130714417, 0.08116926997900009, -0.05406515672802925, -0.17915737628936768, 0.047455769032239914, -0.0011948642786592245, 0.14395888149738312, 0.257889986038208, 0.09343735873699188, 0.06243081018328667, -0.22717751562595367, 0.05188699811697006, -0.004389206413179636, -0.06727349013090134, 0.0044602928683161736, -0.09769138693809509, -0.10077232867479324, -0.11846034228801727, 0.0194239504635334, 0.038488999009132385, 0.1323554962873459, 0.03311987966299057, -0.11531912535429001, -0.013109783641994, 0.004397900775074959, 0.023582926020026207, -0.18659351766109467, -0.05972142517566681, 0.06754281371831894, -0.10490532219409943, 0.016461214050650597, -0.06548010557889938, 0.004153173416852951, 0.22740092873573303, 0.01987936533987522, 0.007781093008816242, 0.06801556795835495, -0.0864129364490509, 0.21097098290920258, -0.0693490281701088, 0.14456894993782043, -0.025810759514570236, 0.21683546900749207, 0.2756391167640686, -0.212021142244339, -0.08900575339794159, -0.020755058154463768, 0.09420085698366165, 0.023153843358159065, 0.1290566772222519, 0.08082052320241928, 0.05494417995214462, -0.11709775775671005, -0.06731889396905899, 0.08101718872785568, 0.1477392613887787, -0.2181738018989563, -0.16122959554195404, -0.08030253648757935, -0.059750065207481384, -0.06665509939193726, 0.13989683985710144, -0.2776719331741333, -0.09719613194465637, -0.04811808094382286, -0.23808331787586212, -0.03977657109498978, 0.00118461181409657, 7.48273180306569e-7, -0.242335706949234, 0.1554425060749054, -0.04662134870886803, -0.1033443957567215, 0.016497675329446793, -0.048083364963531494, -0.22179831564426422, 0.03496728464961052, -0.0698348730802536, -0.08293893188238144, -0.0034669216256588697, -0.11594107747077942, 0.0307451244443655, 0.07828336954116821, 0.012836133129894733, -0.028699684888124466, -0.13442012667655945, -0.002539044478908181, -0.06440082937479019, 0.11625772714614868, 0.10800459235906601, 0.2069861888885498, -0.002826652256771922, 0.038040634244680405, -0.054119277745485306, -0.024829566478729248, 0.003028272883966565, 0.0537463016808033, 0.03120807558298111, -0.053354278206825256, 0.08532429486513138, 0.1548982411623001, -0.09470868110656738, 0.11281954497098923, -0.10846774280071259, -0.010943688452243805, 0.006101675797253847, -0.15725070238113403, -0.04810147359967232, -0.0010151027236133814, 0.031601905822753906, 0.12919330596923828, -0.08456767350435257, -0.13834884762763977, 0.17788924276828766, 0.016459327191114426, 0.020335866138339043, -0.14427293837070465, -0.16188395023345947, 0.06968636810779572, -0.014104962348937988, -0.014189926907420158, 0.08148528635501862, 0.22366970777511597, 0.15931151807308197, -0.05952649936079979, 0.02263314090669155, -0.0822516605257988, 0.008486110717058182, -0.056258056312799454, -0.1628924310207367, 0.007855547592043877, -0.14497879147529602, 0.11826607584953308, 0.09028293192386627, 0.026841502636671066, 0.009472101926803589, 1.6456328572561806e-34, -0.04685395956039429, -0.06591493636369705, 0.07870712131261826, -0.021478349342942238, -0.09193751960992813, 0.0780055820941925, -0.04517081007361412, -0.03082151897251606, -0.01816026121377945, -0.22204701602458954, -0.008227881975471973 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
> You read the JSON file and transform the data yourself. I don't think there's an automatic converter somewhere Perfect, I've done it and succesfully uploaded a new dataset [here](https://huggingface.co/datasets/lombardata/panoptic_2023_06_22), but I've (I hope) a last problem. The dataset has currently 302 images and, when I upload it to the hub, only the first page of images is correctly uploaded. When I try to see the second/third/fourth page of items of my dataset, I can see that the fields **segments_info** and **image_name** are correctly uploaded, while the images are not (the "null" string is shown everywhere). I've checked the path of images that are not uploaded and they exists, is there a problem with the size of the dataset ? How can I upload the whole dataset to the hub ? Thank you again @lhoestq and have a good day !
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
141
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). > You read the JSON file and transform the data yourself. I don't think there's an automatic converter somewhere Perfect, I've done it and succesfully uploaded a new dataset [here](https://huggingface.co/datasets/lombardata/panoptic_2023_06_22), but I've (I hope) a last problem. The dataset has currently 302 images and, when I upload it to the hub, only the first page of images is correctly uploaded. When I try to see the second/third/fourth page of items of my dataset, I can see that the fields **segments_info** and **image_name** are correctly uploaded, while the images are not (the "null" string is shown everywhere). I've checked the path of images that are not uploaded and they exists, is there a problem with the size of the dataset ? How can I upload the whole dataset to the hub ? Thank you again @lhoestq and have a good day !
[ 0.10787024348974228, -0.07600587606430054, -0.030673202127218246, 0.11135440319776535, 0.19754816591739655, 0.059930142015218735, 0.012628136202692986, -0.017358899116516113, -0.1185724288225174, 0.19851890206336975, -0.05118224769830704, 0.013585306704044342, -0.06767337769269943, 0.14086000621318817, -0.04789276421070099, -0.03436768427491188, -0.08783263713121414, -0.006423229817301035, -0.13962838053703308, -0.07834476977586746, -0.053321391344070435, 0.02302236668765545, 0.22773966193199158, -0.027882546186447144, -0.25159215927124023, -0.12559828162193298, -0.1525602638721466, 0.19628386199474335, -0.07455803453922272, -0.26125776767730713, 0.16683906316757202, -0.01119228545576334, 0.07963794469833374, 0.07091514021158218, 0.000005338950813893462, -0.08266233652830124, 0.0977349653840065, -0.023604659363627434, -0.010843966156244278, -0.1581614464521408, 0.08882276713848114, -0.07646066695451736, 0.004519993904978037, -0.08759599924087524, 0.06850263476371765, 0.16972802579402924, 0.003423537826165557, 0.04276205971837044, 0.12999457120895386, 0.15034706890583038, -0.04923831671476364, 0.06620694696903229, 0.07268263399600983, -0.12923122942447662, 0.053468700498342514, 0.1346568465232849, -0.01179580856114626, 0.24662421643733978, -0.062462832778692245, 0.09612992405891418, 0.014512036927044392, 0.016832435503602028, 0.1548454761505127, 0.012556466273963451, 0.10287555307149887, 0.09585907310247421, -0.24450255930423737, -0.3261076807975769, 0.045382045209407806, 0.07087183743715286, 0.062248218804597855, 0.019538650289177895, -0.07185213267803192, 0.04013211652636528, 0.03465306758880615, -0.0320926159620285, -0.13388435542583466, -0.0283237025141716, 0.021837998181581497, 0.024117212742567062, -0.07910403609275818, -0.1793678253889084, -0.06175747141242027, -0.04259397089481354, 0.005524519830942154, -0.03072972223162651, -0.09876377880573273, -0.014018842950463295, -0.05879801884293556, -0.07331237196922302, 0.0875602588057518, -0.1005454733967781, -0.14022432267665863, 0.014809958636760712, 0.1448139101266861, -0.10234417021274567, 0.07483235001564026, 0.12303383648395538, 0.02767532505095005, -0.017713084816932678, -0.13935434818267822, -0.16853943467140198, -0.21999305486679077, 0.11173684895038605, -0.1627679467201233, 0.13300910592079163, -0.05029077082872391, 0.03131849691271782, 0.03704279661178589, 0.05122086778283119, -0.07945985347032547, 0.03391745686531067, -0.09123706072568893, 0.05195232853293419, 0.00751666072756052, 0.11122743040323257, -0.04145753011107445, 0.0275176540017128, 0.08409194648265839, 0.029851065948605537, 0.27900829911231995, 0.05670205503702164, 0.018076803535223007, 0.11069957911968231, 0.08395469933748245, -0.022168196737766266, 0.0018985409988090396, 0.22945550084114075, 0.024766677990555763, -0.06856203079223633, -0.12923511862754822, 0.04253663122653961, 0.14343824982643127, -0.08170752227306366, 0.15127433836460114, -0.1141020655632019, -0.076854407787323, -0.21947355568408966, 0.07205037772655487, -0.08523246645927429, -0.1368209421634674, -0.1517898291349411, -0.08454056829214096, -0.018932241946458817, -0.008473364636301994, 0.04816582426428795, 0.15342679619789124, 0.11408364772796631, -0.029613900929689407, -0.022416476160287857, 0.0030287145636975765, 0.09771708399057388, -0.22338749468326569, 0.07758700102567673, -0.0019648417364805937, 0.03375418484210968, -0.17276401817798615, 0.08217890560626984, -0.20462708175182343, 0.09113709628582001, 0.02535851113498211, 0.08924839645624161, 0.016971426084637642, 0.03187284618616104, -0.008348068222403526, 0.17519953846931458, 0.02737394906580448, 0.11346134543418884, -0.03760697692632675, -0.015429133549332619, 0.07551930844783783, -0.1805618554353714, -0.012732953764498234, 0.04914528876543045, -0.017478708177804947, 0.10628297924995422, -0.0996120274066925, -0.1709231436252594, -0.2310943901538849, -0.04483725503087044, -0.0429154634475708, -0.14150120317935944, -0.08559014648199081, -0.020435398444533348, -0.010848683305084705, 0.0654643252491951, -0.144523024559021, 0.07332691550254822, -0.11727168411016464, -0.0305270217359066, -0.15267497301101685, -0.012209811247885227, 0.073215052485466, -0.026694778352975845, -0.04729199782013893, -0.0127713643014431, 0.1203090250492096, -0.09120158106088638, -0.07101893424987793, -0.351354718208313, 0.02178160846233368, -0.026728758588433266, 0.14025363326072693, -0.04872254654765129, -0.0026385802775621414, 0.05475104972720146, -0.12428624927997589, 0.16530044376850128, 0.21139416098594666, -0.04691792652010918, -0.12606282532215118, -0.039298366755247116, -0.1585473120212555, -0.11419754475355148, -0.05822029709815979, 0.03401469066739082, -0.09524444490671158, -0.07387121766805649, 0.05034387856721878, 0.12645696103572845, 0.0023968457244336605, 0.19611786305904388, 0.02788698859512806, 0.08540725708007812, 0.03241036832332611, 0.10133162140846252, -0.007388707250356674, -0.04379688575863838, 0.20425979793071747, -0.04659319296479225, -0.10103888809680939, -0.073978953063488, 0.1451731026172638, 0.08481486886739731, -0.19850768148899078, 0.0852944403886795, 0.08978743106126785, -0.10304809361696243, 0.17126742005348206, -0.22883087396621704, 0.041408196091651917, -0.058174144476652145, 0.00417630048468709, -0.06747046113014221, -0.10965318232774734, 0.027324596419930458, -0.17339380085468292, 0.04176929220557213, 0.10836006700992584, -0.013416179455816746, 0.3495054244995117, 0.20262102782726288, 0.04219247028231621, 0.017716823145747185, -0.027227837592363358, -0.06420795619487762, 0.060754623264074326, 0.006585843861103058, -0.015247046947479248, -0.008655820041894913, -0.03420918062329292, -0.03084484301507473, -0.08421426266431808, 0.07804703712463379, 0.2614694833755493, -0.013271383009850979, 0.08215610682964325, -0.15148332715034485, 0.05033477023243904, 0.17308871448040009, -0.12108506262302399, -0.18551068007946014, -0.08463641256093979, -0.09779470413923264, 0.026634754613041878, -0.20739711821079254, 0.15990151464939117, -0.03642076253890991, 0.0847722664475441, 0.002237438689917326, -0.24347397685050964, 0.041598398238420486, 0.0759766474366188, -0.009212454780936241, 0.0557088777422905, 0.06467770785093307, -0.09490890800952911, -0.1220969557762146, 0.11019465327262878, -0.07902944833040237, 0.07814177125692368, -0.14037105441093445, 0.07698079198598862, -0.15306060016155243, -0.0547230988740921, -0.03860935568809509, 0.006412011105567217, 0.10608949512243271, -0.034495677798986435, 0.05403907969594002, -0.21395991742610931, 0.11813639104366302, 0.11516965925693512, 0.044304486364126205, 0.11402623355388641, 0.0484900176525116, -0.002184841549023986, 0.053051479160785675, -0.039988886564970016, 0.056670404970645905, 0.029832743108272552, -0.024552546441555023, 0.03908105194568634, -0.050643518567085266, -0.058850374072790146, -0.08200349658727646, 0.01071771327406168, -0.12609459459781647, 0.02512381598353386, 0.09306969493627548, 0.011136336252093315, 0.05333557724952698, -0.06159435585141182, -0.10070890188217163, -0.11795750260353088, 0.09175770729780197, -0.13999858498573303, -0.12838327884674072, 0.14415164291858673, 0.1346638947725296, -0.09953706711530685, 0.07292657345533371, 0.08239919692277908, -0.13525401055812836, 0.09252280741930008, -0.11429835110902786, -0.03621373698115349, -0.1312888115644455, 0.1988382786512375, 0.013261562213301659, -0.007732094265520573, 0.04856625199317932, -0.11198703944683075, 0.0027758898213505745, -0.05747149884700775, -0.0749298632144928, -0.014128769747912884, -0.1651456654071808, -0.02776981145143509, 0.10476894676685333, 0.0822070837020874, 0.14341376721858978, -0.0035814985167235136, -0.007439767476171255, -0.038494184613227844, 0.10305456072092056, -0.12366750836372375, 0.3333868682384491, -0.027267854660749435, -0.06452218443155289, 0.15373462438583374, 0.20602872967720032, 0.008626175113022327, 0.016289176419377327, -0.08313222229480743, 0.2044607251882553, -0.0233612023293972, 0.13128545880317688, -0.015971578657627106, -0.14667579531669617, 0.19962933659553528, -0.04028565436601639, -0.07398480176925659, 0.059597548097372055, 0.0559297539293766, -0.152528315782547, -0.0826752632856369, 0.04981175810098648, -0.042336903512477875, 0.014738366939127445, -0.1098661869764328, 0.0010614017955958843, -0.11328853666782379, 0.055073097348213196, -0.05247852951288223, -0.11505328118801117, -0.08347852528095245, 0.06575777381658554, -0.017356403172016144, 0.13629958033561707, -0.12747305631637573, 0.016784856095910072, -0.07079584151506424, -0.23583285510540009, 0.017228594049811363, -0.10675346851348877, 0.06448929756879807, 0.047821350395679474, 0.038007691502571106, -0.05779847130179405, 0.07849595695734024, 0.038200512528419495, -0.0314122773706913, 0.02529115602374077, 0.05700336769223213, 0.026753898710012436, -0.005706311669200659, 0.06896503269672394, 0.015436478890478611, -0.03716261684894562, -0.023397106677293777, 0.16434213519096375, -0.05848337709903717, 0.11856498569250107, -0.046768415719270706, -0.050856005400419235, -0.0850604847073555, 0.12215632200241089, 0.032862525433301926, -0.09433925151824951, -0.19196346402168274, 0.08889850229024887, 0.09140410274267197, 0.20920753479003906, 0.16846156120300293, -0.07190258055925369, 0.034501977264881134, -0.043404072523117065, 0.1430564820766449, 0.04874882102012634, 0.08051729202270508, 0.26461097598075867, -0.06820142269134521, 0.03792378678917885, 0.12295633554458618, -0.01918458379805088, 0.3762212097644806, -0.14740170538425446, -0.056909430772066116, -0.12703053653240204, -0.06545659154653549, -0.0012588649988174438, 0.10019723325967789, 0.10648678988218307, -0.16558894515037537, 0.007382295094430447, -0.06972061842679977, -0.08039151877164841, 0.13368172943592072, -0.010996907018125057, -0.15109990537166595, -0.2019813507795334, -0.0558953694999218, -0.029285432770848274, -0.10783757269382477, 0.022954583168029785, 0.09864845126867294, -0.041620925068855286, 0.08932491391897202, -0.10937123745679855, -0.056424181908369064, -0.06642232090234756, -0.16570617258548737, -0.04626043885946274, -0.09432642161846161, 0.09474756568670273, 0.4295945465564728, -0.24543717503547668, -0.1404828578233719, -0.07398895919322968, 0.06183784455060959, 0.03267070651054382, -0.004651139955967665, -0.009830822236835957, 0.18714426457881927, -0.08680093288421631, 0.07428603619337082, 0.005730720702558756, 0.07251274585723877, 0.06457901746034622, 0.20375514030456543, 0.06297925114631653, -0.015226001851260662, 0.05110308155417442, 0.027949603274464607, 0.26070284843444824, -0.07327038049697876, -0.04372958466410637, -0.0318816602230072, -0.15810951590538025, -0.02720046415925026, 0.017419690266251564, -0.03647313639521599, -0.02907775342464447, 0.009558197110891342, -0.0629032775759697, 0.0021608606912195683, -0.03702177479863167, 0.10952809453010559, 0.22199851274490356, -0.04126587510108948, -0.232466459274292, 0.11709008365869522, -0.03326036036014557, -0.08445575833320618, -0.21293707191944122, -0.0006411861395463347, 0.04881465062499046, -0.006941090803593397, 0.08382406830787659, 0.059301964938640594, 0.17200280725955963, -0.026766739785671234, 0.06434298306703568, -0.0974983274936676, -0.008412527851760387, -0.14730443060398102, 0.03512964025139809, 0.21072612702846527, -0.016203995794057846, 0.025870660319924355, -0.06255006790161133, 0.07246819883584976, -0.15216471254825592, -0.07433047145605087, 0.21389760076999664, 0.035989295691251755, -0.0010126845445483923, -0.009224540553987026, 0.024530014023184776, 0.04334620013833046, -0.0019519353518262506, 0.10048414021730423, -0.042545124888420105, -0.02257043682038784, 0.07508645951747894, 0.19059428572654724, -0.22532376646995544, 0.001853441121056676, 0.025303447619080544, 0.014475692994892597, -0.20127786695957184, -0.027903415262699127, 0.08060944080352783, 0.19441352784633636, 0.1532832682132721, -0.009864957071840763, -0.21306097507476807, -0.02727297507226467, -0.24774393439292908, 0.006014030892401934, 0.07626457512378693, 0.12250573188066483, 0.0005536298267543316, -0.03511651232838631, -2.656005388048767e-32, -0.040220387279987335, -0.06936702132225037, 0.014036471955478191, -0.04339272528886795, -0.0680626705288887, 0.03154873847961426, -0.0354977548122406, -0.14443323016166687, 0.006882988382130861, -0.016310343518853188, 0.018630260601639748, 0.07926536351442337, 0.08690203726291656, 0.2100515514612198, -0.0325385145843029, 0.01866750605404377, 0.0011521315900608897, 0.07091172784566879, -0.016219187527894974, 0.034298550337553024, 0.054594289511442184, -0.17007732391357422, -0.0053258854895830154, 0.04435654729604721, -0.008505742065608501, 0.07435117661952972, -0.12973178923130035, -0.0379926934838295, 0.08316665887832642, 0.25614508986473083, -0.10043512284755707, 0.05271730571985245, -0.006691791117191315, 0.11020105332136154, 0.027062295004725456, -0.025417225435376167, -0.11091457307338715, 0.03607165440917015, -0.2096029669046402, 0.20928379893302917, 0.10296660661697388, 0.024014955386519432, -0.03234994411468506, -0.11196256428956985, 0.18160228431224823, 0.09423018246889114, 0.05222196877002716, 0.03955740109086037, -0.1631336510181427, 0.005007416475564241, 0.009337167255580425, 0.030607575550675392, 0.02412385493516922, -0.08205000311136246, 0.11635328084230423, -0.07756921648979187, 0.009338600561022758, -0.04011662304401398, 0.0868598148226738, 0.07766907662153244, -0.09260579198598862, -0.08049449324607849, -0.07253841310739517, 0.08557472378015518, -0.014171991497278214, -0.040051087737083435, 0.05941706523299217, -0.08153945207595825, 0.06566962599754333, -0.0530647374689579, 0.11626818031072617, 0.15644165873527527, 0.05692441388964653, -0.002619323320686817, -0.20021569728851318, 0.05914691835641861, 0.014270825311541557, -0.11656307429075241, -0.10586937516927719, -0.016775883734226227, -0.06514815241098404, -0.18775054812431335, -0.0047052716836333275, 0.10638535767793655, 0.11014089733362198, 0.0022037504240870476, -0.10940463840961456, -0.0207220409065485, -0.013321560807526112, 0.00033878113026730716, -0.13903473317623138, -0.07055006176233292, 0.05019824206829071, -0.08233119547367096, -0.010952221229672432, -0.01957770623266697, 0.046731334179639816, 0.23881490528583527, 0.058550477027893066, 0.02543565072119236, -0.0354606956243515, -0.010572468861937523, 0.18282069265842438, 0.04082092270255089, 0.08986850082874298, -0.06864942610263824, 0.23338013887405396, 0.2742282748222351, -0.11062560230493546, -0.08754950761795044, -0.04902944713830948, 0.09883368015289307, 0.04044641926884651, 0.17208252847194672, 0.1125141903758049, 0.06964492052793503, -0.13783839344978333, -0.09966229647397995, 0.09309279173612595, 0.14233806729316711, -0.18420128524303436, -0.17305877804756165, -0.06377109885215759, -0.026936208829283714, -0.02744019217789173, 0.106531523168087, -0.3575665056705475, -0.06736316531896591, -0.0931243896484375, -0.2496235966682434, -0.0345495380461216, 0.023425763472914696, 7.470763989658735e-7, -0.3406068682670593, 0.14749741554260254, -0.04414839670062065, -0.036585647612810135, -0.008454659022390842, -0.09059558063745499, -0.2485482543706894, 0.09748098999261856, -0.16548244655132294, 0.04000336304306984, 0.1255110800266266, -0.039188530296087265, -0.01815951056778431, 0.06487579643726349, 0.023144252598285675, -0.07122080028057098, -0.08619337528944016, 0.03579747676849365, -0.12035652995109558, 0.20165367424488068, 0.0975319966673851, 0.17873017489910126, -0.053053129464387894, 0.0688672736287117, 0.022999657317996025, -0.021616023033857346, 0.002246376359835267, 0.0960657149553299, 0.044969912618398666, -0.07908851653337479, 0.07429139316082001, 0.25188565254211426, -0.05468787997961044, 0.10110294818878174, -0.07198287546634674, 0.09279808402061462, -0.07711199671030045, -0.276410847902298, -0.02211393229663372, -0.05173145979642868, 0.0006059471634216607, 0.0917842835187912, -0.049142610281705856, -0.1767740398645401, 0.17156819999217987, 0.04223667085170746, -0.006949650123715401, -0.054010916501283646, -0.11544737219810486, -0.029395869001746178, 0.08610297739505768, -0.002842116169631481, 0.014840880408883095, 0.21627092361450195, 0.11380451917648315, -0.15184801816940308, 0.008539514616131783, -0.11520352959632874, 0.07960633188486099, 0.003792001400142908, -0.10149180889129639, 0.004033922217786312, -0.09269610047340393, 0.06685323268175125, 0.20316024124622345, 0.05379805341362953, -0.05921081081032753, 8.461819043268276e-35, -0.06430542469024658, -0.11626894026994705, 0.07337307184934616, -0.017501434311270714, -0.04550667479634285, 0.07324144244194031, -0.0065889423713088036, 0.018792571499943733, 0.07399114966392517, -0.24611535668373108, 0.048320554196834564 ]
https://github.com/huggingface/datasets/issues/2526
Add COCO datasets
Awesome ! Your dataset looks all good 🤗 The `null` in the viewer is a bug on our side, let me investigate
## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
22
Add COCO datasets ## Adding a Dataset - **Name:** COCO - **Description:** COCO is a large-scale object detection, segmentation, and captioning dataset. - **Paper + website:** https://cocodataset.org/#home - **Data:** https://cocodataset.org/#download - **Motivation:** It would be great to have COCO available in HuggingFace datasets, as we are moving beyond just text. COCO includes multi-modalities (images + text), as well as a huge amount of images annotated with objects, segmentation masks, keypoints etc., on which models like DETR (which I recently added to HuggingFace Transformers) are trained. Currently, one needs to download everything from the website and place it in a local folder, but it would be much easier if we can directly access it through the datasets API. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Awesome ! Your dataset looks all good 🤗 The `null` in the viewer is a bug on our side, let me investigate
[ 0.12669309973716736, -0.09361183643341064, 0.02267075516283512, 0.13906297087669373, 0.22648315131664276, 0.05271830037236214, 0.031046899035573006, -0.09294537454843521, -0.10221549868583679, 0.1640252023935318, -0.0874558612704277, -0.00697174109518528, -0.06944679468870163, 0.13542616367340088, 0.019693342968821526, -0.008045065216720104, -0.11012208461761475, 0.023244637995958328, -0.14041030406951904, -0.0803600400686264, 0.008245980367064476, 0.012574478052556515, 0.20125441253185272, -0.026241229847073555, -0.17620357871055603, -0.2139291912317276, -0.24050483107566833, 0.17287029325962067, 0.0013998639769852161, -0.2846197783946991, 0.17938365042209625, 0.01739816926419735, 0.03859734535217285, 0.09134680777788162, 0.000005756272912549321, -0.06366796046495438, 0.07828554511070251, -0.02035081386566162, 0.0017671608366072178, -0.19148297607898712, 0.076691173017025, -0.07411496341228485, 0.028816519305109978, -0.04936332628130913, -0.025572653859853745, 0.10751654952764511, 0.004054819233715534, 0.02824316918849945, 0.07636357098817825, 0.1370537430047989, -0.0017839078791439533, 0.1348390430212021, 0.022784831002354622, -0.14682449400424957, 0.10253603756427765, 0.09339963644742966, -0.013928283005952835, 0.19877809286117554, -0.04527018964290619, 0.12122846394777298, 0.04062790423631668, 0.04059302806854248, 0.16194866597652435, -0.03913683816790581, 0.11544005572795868, 0.13436259329319, -0.19358418881893158, -0.24808242917060852, 0.019487248733639717, 0.09967967867851257, 0.08595473319292068, 0.05571681261062622, -0.06390807032585144, 0.06658376753330231, 0.03598162904381752, -0.01843545213341713, -0.12038584053516388, 0.03722257539629936, 0.05778390169143677, 0.03020644560456276, -0.06603291630744934, -0.1529887169599533, -0.06178269162774086, -0.0052681961096823215, 0.12937124073505402, 0.0021969503723084927, -0.09295641630887985, -0.018641652539372444, 0.022261565551161766, -0.06351856142282486, 0.08367925882339478, -0.11806341260671616, -0.16382797062397003, 0.01464125793427229, 0.1642681211233139, -0.049199413508176804, 0.06919939070940018, 0.12884843349456787, 0.0007681291899643838, -0.006364647764712572, -0.11618577688932419, -0.17354227602481842, -0.21473431587219238, 0.14209453761577606, -0.23300433158874512, 0.07467466592788696, -0.07394413650035858, 0.05310681462287903, -0.005541363265365362, 0.07860858738422394, -0.02094782330095768, 0.03866247460246086, -0.06670280545949936, 0.09301827102899551, -0.03593665733933449, 0.05348910391330719, -0.05405910313129425, 0.05447973683476448, 0.06970228999853134, -0.00412374921143055, 0.23935900628566742, 0.12289868295192719, -0.0028791073709726334, 0.19832302629947662, 0.03886629641056061, -0.033763669431209564, 0.01515891496092081, 0.19421622157096863, 0.02327745221555233, -0.1366707682609558, -0.17072926461696625, 0.06908435374498367, 0.15926246345043182, -0.0887480229139328, 0.15243588387966156, -0.14136667549610138, -0.045842841267585754, -0.23198090493679047, -0.007134994491934776, -0.0638420432806015, -0.16983306407928467, -0.10917168110609055, -0.0939829871058464, -0.010098347440361977, -0.08587707579135895, -0.01975545659661293, 0.1679878830909729, 0.04310388118028641, 0.015312633477151394, -0.06284080445766449, 0.08088255673646927, 0.0906560942530632, -0.2527022063732147, -0.004007047973573208, -0.07781682163476944, 0.045809563249349594, -0.09646958857774734, 0.13578924536705017, -0.22492027282714844, 0.13882462680339813, 0.04653225466609001, 0.10147736966609955, 0.035078264772892, -0.05393341928720474, 0.03649964556097984, 0.2253606766462326, -0.07528001070022583, -0.005689145065844059, -0.0688873752951622, -0.09072022885084152, -0.000031831550586503, -0.2381887584924698, -0.015149448066949844, 0.025891397148370743, 0.05160238593816757, 0.03243255987763405, -0.13690365850925446, -0.10832995176315308, -0.18296942114830017, -0.04478941485285759, -0.09361663460731506, -0.17033334076404572, 0.016576582565903664, 0.0727607011795044, -0.0778592973947525, 0.0980667769908905, -0.19914114475250244, 0.07168430835008621, -0.17679044604301453, -0.09434926509857178, -0.11739365756511688, -0.03509664162993431, 0.06747983396053314, 0.0055790855549275875, 0.005659887567162514, -0.021404923871159554, 0.09991081058979034, -0.1760176718235016, -0.07471675425767899, -0.2998047471046448, -0.07360333949327469, -0.027959834784269333, 0.16183559596538544, -0.035134728997945786, -0.09258756786584854, 0.027255253866314888, -0.20296582579612732, 0.1326390951871872, 0.21135008335113525, -0.025940364226698875, -0.09038342535495758, -0.07463511824607849, -0.0911293476819992, -0.1492169201374054, -0.11935753375291824, -0.03915848955512047, -0.05976416543126106, -0.004784645512700081, 0.032203223556280136, 0.18251390755176544, 0.0067860158160328865, 0.1968001425266266, 0.07137951254844666, 0.05609489604830742, 0.10814996063709259, 0.06557729095220566, 0.020456554368138313, -0.015125034376978874, 0.221566304564476, 0.04178832843899727, -0.0449807308614254, -0.08545754104852676, 0.19604475796222687, 0.11147011816501617, -0.232923224568367, 0.12623456120491028, 0.05114040896296501, -0.1683346927165985, 0.17755578458309174, -0.22814346849918365, 0.0030684994999319315, 0.0008281365735456347, -0.015654046088457108, -0.030313316732645035, -0.05738295242190361, 0.04951734095811844, -0.11039523035287857, -0.04525180906057358, 0.07246273756027222, -0.017766710370779037, 0.30367791652679443, 0.2035685032606125, 0.02909570373594761, -0.04503800347447395, 0.02442324161529541, -0.0824466422200203, 0.09327491372823715, 0.005109244491904974, -0.1493683010339737, -0.10361543297767639, -0.10964594781398773, -0.07662276923656464, -0.05049927532672882, -0.0184289813041687, 0.23494106531143188, -0.00004583553891279735, 0.11969475448131561, -0.18379203975200653, 0.0673460140824318, 0.15035031735897064, -0.14213018119335175, -0.15360672771930695, -0.001271465327590704, -0.1068645715713501, -0.032220643013715744, -0.15838460624217987, 0.11438263952732086, -0.07439284771680832, 0.044441480189561844, -0.02697930857539177, -0.2064366340637207, 0.03177250549197197, 0.08201482892036438, -0.0110925929620862, 0.05333919823169708, 0.011733029969036579, -0.11139301210641861, -0.1464429795742035, 0.09366171807050705, -0.025371907278895378, 0.07527699321508408, -0.11551753431558609, -0.0036759902723133564, -0.16989491879940033, -0.04003963619470596, -0.03907939791679382, -0.0746677964925766, 0.06408075988292694, -0.053801968693733215, 0.11050264537334442, -0.15100890398025513, 0.17989307641983032, 0.036657024174928665, 0.029384419322013855, 0.09671426564455032, -0.024242758750915527, 0.06082657352089882, 0.03873758018016815, -0.059219568967819214, 0.13792327046394348, -0.051426175981760025, -0.053060319274663925, 0.033341243863105774, -0.06080710142850876, -0.04770929366350174, -0.1281685084104538, -0.003222057828679681, -0.1161576509475708, 0.00458591990172863, 0.08435674756765366, -0.0063153947703540325, -0.052823424339294434, -0.022163914516568184, -0.1059759110212326, -0.1460326910018921, 0.08935054391622543, -0.18989667296409607, -0.138694629073143, 0.1673327535390854, 0.04122361168265343, -0.10998626798391342, 0.06058688461780548, 0.057859841734170914, -0.027579355984926224, 0.11733544617891312, -0.08893197774887085, 0.00530196912586689, -0.10327035188674927, 0.16752533614635468, 0.034432657063007355, -0.02749178744852543, 0.021186204627156258, -0.13740456104278564, 0.01951601728796959, -0.07422676682472229, -0.18135100603103638, 0.014268978498876095, -0.1107102781534195, 0.010075423866510391, 0.11208465695381165, 0.03871813789010048, 0.17821379005908966, 0.021161038428544998, -0.005326730664819479, -0.05729823559522629, 0.008975534699857235, -0.061207544058561325, 0.22976604104042053, -0.1141810193657875, -0.11551636457443237, 0.20837979018688202, 0.20442862808704376, 0.008636759594082832, 0.021111411973834038, -0.16618305444717407, 0.17665064334869385, -0.02230631560087204, 0.2100532203912735, 0.016380073502659798, -0.13552060723304749, 0.14421424269676208, -0.01001971960067749, -0.07356436550617218, 0.07544311136007309, 0.028726890683174133, -0.09466065466403961, -0.1404731273651123, 0.03625575825572014, 0.05256263539195061, 0.09173280745744705, -0.13948523998260498, -0.04368919879198074, -0.0812971368432045, 0.022814219817519188, -0.029546620324254036, -0.06582754850387573, -0.09252592921257019, 0.06597009301185608, 0.010076073929667473, 0.09963161498308182, -0.08286669850349426, -0.018709378316998482, -0.05191446840763092, -0.21539393067359924, 0.001644532079808414, -0.1346202790737152, -0.02423163503408432, 0.06694787740707397, 0.04557541385293007, -0.05684765800833702, 0.09091796725988388, 0.11693114042282104, 0.033907875418663025, 0.02790185809135437, 0.01772763952612877, -0.006106683053076267, -0.016798516735434532, 0.12724168598651886, 0.04568583518266678, -0.029850561171770096, 0.05819091200828552, 0.16743184626102448, -0.03938037529587746, 0.08772684633731842, -0.004781416617333889, -0.0652274414896965, -0.07569810748100281, 0.032968390733003616, 0.11191119998693466, -0.07447059452533722, -0.0685679093003273, 0.046222880482673645, 0.04941496253013611, 0.15139874815940857, 0.17057263851165771, -0.045912258327007294, 0.03511466085910797, -0.062163230031728745, 0.18419353663921356, 0.028435861691832542, 0.06552493572235107, 0.23296843469142914, -0.0505758598446846, 0.0645364448428154, 0.10247939825057983, -0.024049537256360054, 0.3400603234767914, -0.16362179815769196, -0.13309966027736664, -0.13840748369693756, -0.08183248341083527, 0.04608336091041565, 0.10855255275964737, 0.12018748372793198, -0.046329159289598465, 0.02893829345703125, -0.06731530278921127, -0.04874897375702858, 0.1518336534500122, -0.004444070626050234, -0.10986195504665375, -0.17451998591423035, -0.08456555753946304, -0.009781993925571442, -0.07170921564102173, 0.005223519634455442, 0.08016645908355713, -0.03924534097313881, 0.06616455316543579, -0.12772145867347717, 0.01932648941874504, -0.057213522493839264, -0.12547340989112854, -0.05547180399298668, 0.012004844844341278, 0.03014346957206726, 0.37847840785980225, -0.11319244652986526, -0.14118996262550354, -0.026995189487934113, 0.043867044150829315, 0.046024542301893234, -0.040354613214731216, 0.007239258848130703, 0.18193712830543518, -0.10679941624403, 0.05954185128211975, -0.01268746517598629, 0.056152600795030594, 0.05834196135401726, 0.13937072455883026, 0.1374904215335846, 0.025920145213603973, 0.048738688230514526, -0.022955523803830147, 0.24837392568588257, -0.04682241752743721, -0.008578553795814514, -0.04689320549368858, -0.09919554740190506, 0.030937526375055313, 0.033990297466516495, -0.02231910079717636, -0.08259652554988861, -0.0018039366696029902, 0.016400979831814766, -0.0010499781928956509, 0.010945667512714863, 0.20199580490589142, 0.2017100304365158, -0.005286811385303736, -0.15668943524360657, 0.12390829622745514, 0.015217145904898643, -0.07642670720815659, -0.1834018975496292, 0.05279043689370155, 0.11256330460309982, 0.0372418649494648, 0.07334738969802856, 0.07101592421531677, 0.1791796088218689, -0.026109009981155396, 0.10991787165403366, -0.13104355335235596, 0.06716710329055786, -0.022201580926775932, -0.04128051549196243, 0.18382614850997925, -0.0039810435846447945, 0.020651711151003838, -0.03515397012233734, 0.058421649038791656, -0.11517167091369629, -0.19593162834644318, 0.2255590856075287, 0.06558378785848618, -0.002210501814261079, 0.054677482694387436, 0.03791050240397453, 0.006727105006575584, 0.05317109823226929, 0.08731944113969803, -0.09007781744003296, -0.07960765808820724, 0.11651279032230377, 0.1783607304096222, -0.16772101819515228, -0.025737879797816277, 0.01731448620557785, 0.006311312317848206, -0.1987150013446808, 0.08195649832487106, 0.07219330966472626, 0.22185257077217102, 0.18965359032154083, 0.029638931155204773, -0.24659545719623566, -0.09925997257232666, -0.2382340282201767, -0.03784498944878578, 0.15032753348350525, 0.1839762032032013, -0.03576764464378357, -0.07708611339330673, -2.6908887706565936e-32, -0.030774932354688644, -0.0953359380364418, -0.07080628722906113, 0.03765721991658211, -0.01895390823483467, 0.0583571195602417, -0.052420344203710556, -0.014809400774538517, -0.026120590046048164, -0.01834496483206749, 0.04820656776428223, 0.09159961342811584, 0.0913192629814148, 0.15335263311862946, -0.04637831076979637, 0.01765330508351326, 0.03697524592280388, 0.08314137160778046, 0.04195187985897064, -0.008512141183018684, 0.01664971560239792, -0.09751739352941513, -0.021360797807574272, -0.08515144884586334, -0.004708067048341036, 0.01510053314268589, -0.12323527783155441, -0.008845563046634197, 0.05090154707431793, 0.23403696715831757, -0.10195419937372208, 0.01936398074030876, -0.018239131197333336, 0.12748706340789795, 0.05749993026256561, -0.0594683401286602, -0.08891607820987701, 0.05037985369563103, -0.22201362252235413, 0.15523497760295868, 0.07652141153812408, -0.0028939710464328527, -0.1818072646856308, -0.11611655354499817, 0.17335262894630432, 0.10846226662397385, 0.08696121722459793, 0.03273851424455643, -0.09005695581436157, 0.006469753570854664, 0.03317759931087494, 0.0343485027551651, -0.045088451355695724, -0.11163497716188431, 0.10977639257907867, -0.07641053199768066, 0.06875424087047577, -0.022031493484973907, 0.07463018596172333, 0.08426178246736526, -0.07685649394989014, -0.060286540538072586, -0.05576805770397186, 0.09529588371515274, -0.019198453053832054, 0.007823459804058075, 0.04028184711933136, -0.07081758975982666, 0.037785742431879044, -0.10814385116100311, 0.12104471772909164, 0.1710095852613449, 0.052891023457050323, 0.010510365478694439, -0.20075291395187378, 0.08481860905885696, -0.040863849222660065, -0.04102684557437897, -0.06267774105072021, -0.04050038754940033, -0.04035899415612221, -0.11814240366220474, 0.011011691763997078, 0.07727647572755814, 0.08184761554002762, 0.045159172266721725, -0.10144274681806564, -0.010308150202035904, 0.009051506407558918, 0.026687560603022575, -0.1545417755842209, -0.04143587499856949, 0.02815321460366249, -0.06571187824010849, 0.010819829069077969, -0.06668250262737274, 0.07349863648414612, 0.24025313556194305, 0.027909081429243088, -0.03245645761489868, -0.015080937184393406, -0.035610806196928024, 0.21049204468727112, 0.06949795037508011, 0.100602887570858, -0.0787336602807045, 0.2599143385887146, 0.21002526581287384, -0.12504270672798157, -0.09723372757434845, -0.10471368581056595, 0.13179175555706024, -0.014821463264524937, 0.22786113619804382, 0.08923140168190002, 0.022439202293753624, -0.1251457929611206, -0.08004109561443329, 0.08643617480993271, 0.21248194575309753, -0.26781243085861206, -0.09871351718902588, -0.13110770285129547, -0.13574159145355225, -0.021267801523208618, 0.1138392761349678, -0.28033915162086487, -0.07110647857189178, -0.06600342690944672, -0.211213156580925, -0.02528270334005356, -0.032616689801216125, 7.517327276218566e-7, -0.3104349672794342, 0.11092346161603928, 0.019669493660330772, -0.043330274522304535, -0.021503150463104248, -0.0735696479678154, -0.24522170424461365, 0.027473609894514084, -0.13900087773799896, -0.03292877599596977, 0.053649161010980606, -0.06834246218204498, 0.03920511156320572, 0.037954181432724, -0.040968168526887894, -0.0948108583688736, -0.07683715224266052, -0.03699200972914696, -0.10109220445156097, 0.14942289888858795, 0.03171265870332718, 0.19522611796855927, 0.0231375340372324, 0.07314624637365341, 0.016894234344363213, -0.013507173396646976, 0.02453533373773098, 0.0665774717926979, 0.08994276076555252, -0.12757368385791779, 0.14092713594436646, 0.27143076062202454, -0.12432779371738434, 0.09743110835552216, -0.049035895615816116, 0.007186179049313068, -0.0065145231783390045, -0.15949299931526184, -0.033663224428892136, -0.06798814237117767, 0.0294632725417614, 0.1766296774148941, -0.05688033252954483, -0.12734048068523407, 0.12494327127933502, 0.10057122260332108, 0.04444354772567749, -0.04339015856385231, -0.13242246210575104, 0.00803834106773138, 0.07388760894536972, -0.014085805974900723, 0.029530750587582588, 0.20042438805103302, 0.0852617397904396, -0.1461992710828781, 0.020313359797000885, -0.10136549174785614, 0.11638243496417999, -0.04796108230948448, -0.12252587080001831, -0.011211215518414974, -0.10029616951942444, 0.09484712779521942, 0.20652824640274048, -0.05117733031511307, -0.11116661131381989, 1.0860991533859545e-34, -0.04074802249670029, -0.07773678749799728, 0.10540845990180969, -0.02399073913693428, -0.07311230152845383, 0.07682739943265915, -0.016250688582658768, -0.02121742255985737, 0.05082282796502113, -0.20659145712852478, -0.02716909348964691 ]
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.22800764441490173, -0.04236624762415886, -0.09098862111568451, 0.17742420732975006, 0.09373518824577332, 0.08649959415197372, 0.1328573077917099, -0.13131099939346313, 0.08434145897626877, 0.07370124757289886, -0.007918046787381172, -0.07474711537361145, 0.05214928090572357, -0.06872308254241943, 0.015213417820632458, 0.0352051816880703, 0.04594680666923523, 0.08753503113985062, 0.07072269916534424, 0.04050420597195625, -0.07502277195453644, 0.1126672551035881, 0.05430825799703598, 0.049250528216362, -0.060405317693948746, -0.09536868333816528, -0.0742683932185173, 0.05010606721043587, -0.08950657397508621, -0.1249835193157196, 0.134695366024971, 0.04620033875107765, 0.0121323112398386, 0.1079130619764328, 0.00000643546127321315, 0.003012550063431263, 0.0422457791864872, 0.04939193278551102, 0.13542473316192627, 0.009459887631237507, 0.27446165680885315, -0.12237795442342758, 0.1706799864768982, -0.01613030955195427, 0.016503898426890373, -0.1310400366783142, 0.018014071509242058, 0.19948500394821167, 0.04118358716368675, 0.13758966326713562, -0.01930132322013378, -0.04430881887674332, 0.02933294139802456, -0.12338975816965103, 0.1938626617193222, 0.17178945243358612, 0.055821795016527176, 0.007623738143593073, -0.18270421028137207, -0.08925635367631912, 0.028769612312316895, 0.07727458328008652, 0.03125211223959923, 0.02009931392967701, -0.058941371738910675, -0.09308971464633942, -0.059012964367866516, -0.21688871085643768, -0.01025406364351511, 0.049188531935214996, 0.19575808942317963, 0.1912015974521637, -0.029118256643414497, 0.07034286856651306, -0.04630585387349129, 0.01914357766509056, -0.04667072370648384, -0.03570824861526489, -0.06280018389225006, -0.076913982629776, -0.12406091392040253, 0.047289058566093445, -0.0030432064086198807, 0.06270098686218262, 0.03198917582631111, 0.16930143535137177, -0.16419199109077454, -0.048373498022556305, -0.12322161346673965, -0.03353822976350784, 0.13015274703502655, 0.04036647453904152, -0.028549395501613617, -0.08107910305261612, 0.1667422652244568, -0.005962330847978592, -0.20713593065738678, 0.05007003992795944, 0.06072382628917694, -0.13802272081375122, -0.08868542313575745, -0.07456377893686295, -0.15760143101215363, -0.024470360949635506, 0.18038494884967804, 0.07913520932197571, 0.10160475969314575, -0.007015614304691553, 0.04642458260059357, 0.1562059074640274, 0.15196123719215393, 0.07974374294281006, -0.015511589124798775, -0.0670691505074501, -0.07082458585500717, 0.008694526739418507, -0.1400584876537323, 0.1059936061501503, -0.046418070793151855, 0.051050908863544464, 0.08423962444067001, -0.04609021171927452, -0.09978048503398895, -0.007388559635728598, -0.14195017516613007, -0.07118026167154312, 0.1132325753569603, 0.12984204292297363, 0.04837755113840103, -0.1979103535413742, -0.03911617398262024, -0.01868966408073902, -0.0652969479560852, -0.07747791707515717, -0.043987784534692764, -0.047144412994384766, 0.058336041867733, -0.06088952720165253, 0.06065889447927475, -0.039087094366550446, -0.11289603263139725, -0.002353125484660268, -0.09351729601621628, -0.027307920157909393, 0.07269232720136642, -0.014506367966532707, 0.07023067027330399, 0.07194545120000839, 0.07841479778289795, 0.18704140186309814, -0.11576966941356659, 0.11338433623313904, -0.22813476622104645, 0.05525993928313255, -0.05682527646422386, 0.12400022894144058, 0.010046460665762424, 0.08397430181503296, -0.03630581125617027, -0.024818984791636467, 0.153755784034729, 0.11554393172264099, 0.15342646837234497, -0.08919847011566162, 0.05167052149772644, 0.08943726122379303, 0.08223605155944824, -0.016302790492773056, -0.1513872742652893, -0.04528916999697685, 0.19033196568489075, 0.002144941594451666, -0.1269562840461731, -0.06250511109828949, 0.01755622774362564, 0.1839953064918518, 0.008869043551385403, 0.004660535603761673, -0.11463459581136703, 0.1157267764210701, 0.08580678701400757, -0.039785515516996384, -0.07968787848949432, -0.05050717666745186, 0.01464291475713253, 0.006154760718345642, -0.20534145832061768, -0.10134806483983994, 0.050697434693574905, -0.1295604705810547, -0.1207558885216713, 0.08677075803279877, -0.03184502571821213, -0.11945721507072449, -0.07784450054168701, -0.053853072226047516, 0.02885127253830433, -0.0702955573797226, 0.10125421732664108, -0.07680335640907288, -0.05114281550049782, 0.10915646702051163, 0.03548317402601242, 0.21980294585227966, 0.06199456378817558, 0.009010814130306244, -0.06646981835365295, 0.03492153808474541, 0.05498303100466728, -0.0348995216190815, 0.05642157793045044, -0.010132954455912113, 0.01394047774374485, -0.07029365748167038, -0.10049506276845932, -0.03454449400305748, -0.006559339817613363, -0.13611014187335968, -0.06757155805826187, 0.08791641145944595, -0.022361520677804947, 0.006432454101741314, -0.13223540782928467, 0.03037234954535961, -0.03213218227028847, 0.10794618725776672, -0.06261888891458511, 0.007089258171617985, 0.11763669550418854, 0.0843556821346283, -0.1286628097295761, -0.023705173283815384, 0.06508197635412216, 0.13774357736110687, 0.03560948371887207, -0.0350622683763504, 0.0565665028989315, -0.07931501418352127, 0.07933256775140762, 0.11175079643726349, -0.06398560106754303, 0.10811197757720947, -0.08302843570709229, 0.0971115231513977, 0.031334273517131805, -0.015509475022554398, -0.09514234960079193, 0.004110430832952261, -0.038970351219177246, -0.05066885054111481, 0.19389499723911285, 0.20792560279369354, -0.2125587910413742, -0.05779154971241951, -0.043090417981147766, -0.11876533925533295, 0.005026997532695532, 0.04459713399410248, -0.010700968094170094, -0.06214331090450287, 0.1311044692993164, -0.04746510833501816, -0.03234904259443283, -0.0459602028131485, 0.099632628262043, -0.06136823818087578, 0.0057837944477796555, -0.03927644342184067, 0.0019124727696180344, 0.13557381927967072, 0.028562171384692192, -0.05096755176782608, -0.09305893629789352, -0.09473857283592224, 0.11236228048801422, 0.12127327919006348, 0.05265489220619202, -0.040621593594551086, -0.006141814403235912, 0.15605229139328003, -0.10557430982589722, 0.05790673941373825, -0.07764600962400436, -0.05205664038658142, 0.04507023096084595, -0.07762590795755386, -0.0530136376619339, -0.20374879240989685, 0.0013339633587747812, 0.16012004017829895, -0.09854290634393692, -0.06898409128189087, -0.06027450039982796, -0.26684942841529846, -0.11799997836351395, -0.025980068370699883, -0.02286847122013569, 0.032124392688274384, -0.006036043632775545, 0.17629055678844452, -0.21770575642585754, 0.08639322966337204, -0.005480612628161907, -0.008482098579406738, -0.07337427884340286, 0.010498128831386566, -0.029726101085543633, -0.0676477774977684, -0.20919962227344513, -0.10567575693130493, 0.06870318204164505, 0.005172261036932468, 0.07798013836145401, 0.13435618579387665, 0.011950976215302944, -0.11512937396764755, -0.14255091547966003, -0.0823756754398346, 0.0116189606487751, 0.060191839933395386, -0.10946600884199142, -0.07577180117368698, -0.04238234832882881, 0.03050490841269493, -0.0020807969849556684, -0.15416477620601654, -0.07772614061832428, -0.0712251141667366, 0.06830888986587524, -0.12754933536052704, -0.03858272358775139, 0.07407893985509872, 0.08154428750276566, -0.025473985821008682, -0.02297285385429859, -0.07072325050830841, -0.1546882688999176, 0.0020774740260094404, 0.1463528722524643, -0.07475129514932632, -0.03885751962661743, 0.09998545795679092, 0.08878052234649658, -0.04586891084909439, -0.059829242527484894, -0.2439296990633011, -0.07148768752813339, -0.02604561112821102, -0.08182628452777863, -0.1467367559671402, 0.31911036372184753, 0.029367661103606224, -0.13054804503917694, -0.08471831679344177, -0.023143133148550987, -0.1219189316034317, 0.07347928732633591, -0.02241523563861847, -0.035317204892635345, -0.06728886812925339, 0.05661149322986603, 0.0996919646859169, 0.0846003070473671, -0.04524407908320427, 0.042246703058481216, -0.010060411877930164, 0.12048938125371933, 0.24244007468223572, -0.07907545566558838, -0.11396390199661255, 0.029057171195745468, -0.004306968301534653, 0.10240951180458069, 0.13597974181175232, -0.008300935849547386, 0.02319611795246601, 0.0304905716329813, 0.11447665095329285, -0.04216782748699188, 0.05672375112771988, -0.11057239025831223, -0.3130062520503998, -0.038326412439346313, 0.1078348159790039, 0.14759057760238647, 0.08404986560344696, 0.03216242790222168, 0.01365724392235279, -0.0406436026096344, 0.19831660389900208, 0.04712848737835884, -0.04831661656498909, -0.0731767863035202, -0.12758328020572662, 0.008094090968370438, -0.08829715847969055, 0.11384044587612152, 0.08440470695495605, 0.036886971443891525, 0.016604965552687645, 0.10152724385261536, 0.017376147210597992, -0.08868477493524551, -0.057985007762908936, 0.09125660359859467, 0.1263430416584015, -0.01704154722392559, 0.10486854612827301, -0.06510910391807556, 0.021189888939261436, 0.11693442612886429, 0.10748957097530365, -0.04616941139101982, -0.04312778636813164, 0.23645645380020142, -0.059021949768066406, -0.08356823772192001, -0.10352586209774017, -0.11263171583414078, -0.19077156484127045, -0.07783196866512299, -0.12426847964525223, 0.1012163758277893, 0.028389008715748787, -0.04681290313601494, -0.051798008382320404, 0.11460743099451065, 0.01003237720578909, 0.00910856481641531, -0.0262504443526268, 0.18483395874500275, -0.08039933443069458, 0.031027141958475113, 0.17507606744766235, 0.031153598800301552, -0.04474177211523056, 0.055662479251623154, -0.22373637557029724, -0.2026931792497635, 0.029110288247466087, -0.3899039328098297, 0.051944997161626816, 0.13816645741462708, -0.08491326868534088, -0.06043191999197006, 0.06380420923233032, -0.002935086376965046, -0.07428193092346191, 0.04781999811530113, 0.1936814785003662, -0.0932764783501625, 0.010997002944350243, -0.05131494998931885, -0.09416242688894272, 0.06994154304265976, -0.038571007549762726, 0.05613553524017334, 0.15169529616832733, 0.0018804037244990468, 0.12392497062683105, 0.15155984461307526, -0.02278413064777851, -0.1423717439174652, -0.037399500608444214, -0.1677156686782837, 0.021043358370661736, 0.21266792714595795, -0.15007750689983368, -0.008439287543296814, -0.04987289756536484, -0.0004038869228679687, 0.07264993339776993, -0.05163935571908951, -0.030810493975877762, 0.14185963571071625, -0.023294413462281227, 0.004143047146499157, -0.13214582204818726, -0.04164088889956474, -0.09670894593000412, 0.07586457580327988, 0.05897228419780731, 0.09724733233451843, 0.005703708156943321, -0.11708654463291168, 0.07553263753652573, -0.09755932539701462, -0.025789491832256317, -0.09771312773227692, 0.008333833888173103, -0.0009752118494361639, -0.07100192457437515, -0.129622220993042, 0.02225235477089882, 0.0710865780711174, 0.00470622256398201, -0.0395742766559124, 0.16516970098018646, 0.21686454117298126, 0.11229632794857025, 0.004887373652309179, 0.08521094918251038, -0.04063015803694725, 0.07063830643892288, -0.12757746875286102, -0.0702289268374443, 0.1331537812948227, -0.004590463824570179, -0.02704436518251896, -0.12185623496770859, 0.10867505520582199, 0.018241094425320625, -0.11119814217090607, -0.044458914548158646, 0.02193961851298809, -0.1418929398059845, -0.13070526719093323, -0.03345158323645592, 0.23779650032520294, -0.058464955538511276, -0.009244866669178009, -0.1580463945865631, 0.07513094693422318, -0.1584113985300064, -0.036945097148418427, -0.007488187402486801, -0.03471839055418968, -0.13727392256259918, 0.012980589643120766, 0.12361378967761993, -0.09598895162343979, 0.20482568442821503, 0.09815841913223267, -0.24196171760559082, 0.05674004554748535, -0.041797030717134476, 0.277560293674469, -0.17970974743366241, 0.050720736384391785, -0.10002311319112778, -0.08255019038915634, -0.1978086680173874, 0.1001935750246048, 0.052547354251146317, 0.12286831438541412, -0.05620931088924408, -0.15707404911518097, 0.10113558173179626, 0.04388106241822243, -0.14815810322761536, -0.057955194264650345, 0.08392461389303207, -0.13974855840206146, -0.034480657428503036, 0.036779358983039856, -2.5418660620782735e-32, -0.013628370128571987, 0.22798317670822144, -0.06264732778072357, 0.016481835395097733, -0.13982732594013214, 0.1743747889995575, -0.03671099990606308, -0.09458497166633606, -0.003237983677536249, 0.1144324466586113, 0.00023653218522667885, 0.17836129665374756, 0.09582842886447906, -0.00696316035464406, -0.06992749869823456, -0.07235372066497803, -0.03319265693426132, -0.1798606663942337, 0.05352536588907242, -0.04906269907951355, 0.17165696620941162, -0.026419181376695633, 0.13391321897506714, -0.32133975625038147, 0.09249573945999146, 0.12391125410795212, -0.14863455295562744, -0.007105921860784292, 0.21645325422286987, 0.031677860766649246, -0.015990888699889183, 0.11251894384622574, -0.06731844693422318, 0.12049981951713562, -0.0899425819516182, -0.08253777772188187, 0.0064653134904801846, -0.12191323935985565, -0.12057078629732132, 0.08166348934173584, -0.12152878940105438, 0.1029965952038765, 0.10464894771575928, -0.03718674182891846, -0.15431983768939972, 0.01836954616010189, -0.03213930502533913, -0.12580867111682892, 0.006539523601531982, -0.1424207240343094, 0.04563351348042488, 0.06788154691457748, -0.02654009871184826, 0.13842891156673431, 0.1356636881828308, -0.0931030735373497, 0.05967108532786369, 0.009121791459619999, -0.16114988923072815, 0.10643269866704941, 0.14035923779010773, -0.01460104901343584, 0.08297000825405121, -0.134882852435112, 0.09637164324522018, 0.08518901467323303, 0.2424963116645813, 0.13033746182918549, -0.010923369787633419, 0.1467081904411316, 0.014352521859109402, 0.10411353409290314, -0.038161925971508026, 0.06992951780557632, -0.16470463573932648, -0.12875662744045258, -0.06607889384031296, -0.008629576303064823, 0.04011855646967888, -0.060352448374032974, 0.1390930563211441, -0.12760519981384277, -0.15186730027198792, -0.07867235690355301, 0.019120266661047935, 0.07423034310340881, -0.07085809111595154, -0.08212996274232864, 0.024758484214544296, -0.10523636639118195, -0.0013913217699155211, 0.15098103880882263, -0.1942470818758011, -0.059393059462308884, -0.13802401721477509, 0.13233450055122375, -0.06407735496759415, 0.13589242100715637, 0.02619120478630066, -0.017640013247728348, -0.07633699476718903, 0.0739179402589798, 0.16203442215919495, 0.17808805406093597, 0.06623335182666779, 0.09124298393726349, 0.1518242061138153, 0.04609273746609688, -0.24532698094844818, -0.028178172186017036, 0.0906561091542244, 0.1152196004986763, 0.10654152929782867, -0.11941155046224594, 0.005981572903692722, -0.09689957648515701, 0.06775613129138947, -0.01142897829413414, 0.08211193978786469, 0.21312858164310455, -0.03885364904999733, 0.0109511474147439, -0.20234709978103638, -0.016214147210121155, 0.17213638126850128, 0.07114113122224808, -0.12687896192073822, -0.07416362315416336, 0.0009876363910734653, -0.012536600232124329, 0.07272636145353317, -0.06549830734729767, 8.094900181276898e-7, -0.05539240315556526, 0.15909244120121002, 0.03933344781398773, -0.03261350467801094, -0.03498674929141998, 0.06081545725464821, -0.12610502541065216, 0.08859781920909882, 0.06872208416461945, 0.24227751791477203, 0.09248536825180054, 0.031038714572787285, 0.017359556630253792, -0.03259856626391411, 0.12266145646572113, -0.12294681370258331, -0.10792253911495209, -0.004375951364636421, -0.08647423982620239, 0.0665142834186554, 0.11325957626104355, 0.25791093707084656, 0.015020276419818401, -0.016160529106855392, -0.05552007257938385, -0.06933393329381943, -0.1017535850405693, -0.12786880135536194, 0.018096404150128365, 0.04971398413181305, 0.0858948677778244, -0.07075835019350052, 0.16638308763504028, -0.08036169409751892, -0.08278318494558334, -0.10239977389574051, -0.17939430475234985, 0.09071589261293411, -0.007688190788030624, 0.15412956476211548, 0.00242899963632226, 0.01819516345858574, -0.11724770069122314, -0.1252487301826477, 0.08445987105369568, 0.05816877633333206, -0.11777838319540024, -0.039876602590084076, -0.12826025485992432, -0.009559120051562786, 0.09719284623861313, 0.028191791847348213, 0.032330047339200974, 0.02676238864660263, -0.0031872086692601442, -0.13287068903446198, -0.024509595707058907, 0.02729782834649086, 0.20038926601409912, -0.07250361889600754, -0.0009414477390237153, -0.14465704560279846, -0.028304174542427063, 0.14762113988399506, 0.10662220418453217, -0.06371451169252396, 0.05669659748673439, 2.473920155979143e-34, 0.05668534338474274, -0.03828613460063934, -0.10723493248224258, -0.1985008716583252, 0.05732220411300659, -0.032012857496738434, 0.06835588067770004, 0.018187517300248146, -0.16754955053329468, -0.058846477419137955, -0.07685030996799469 ]
https://github.com/huggingface/datasets/issues/2522
Documentation Mistakes in Dataset: emotion
The documentation has another bug in the dataset card [here](https://huggingface.co/datasets/emotion). In the dataset summary **six** emotions are mentioned: *"six basic emotions: anger, fear, joy, love, sadness, and surprise"*, however, in the datafields section we have only **five**: ``` label: a classification label, with possible values including sadness (0), joy (1), love (2), anger (3), fear (4). ```
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.
57
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. The documentation has another bug in the dataset card [here](https://huggingface.co/datasets/emotion). In the dataset summary **six** emotions are mentioned: *"six basic emotions: anger, fear, joy, love, sadness, and surprise"*, however, in the datafields section we have only **five**: ``` label: a classification label, with possible values including sadness (0), joy (1), love (2), anger (3), fear (4). ```
[ 0.25175732374191284, -0.03683600202202797, -0.10264426469802856, 0.18445436656475067, 0.1136327013373375, 0.08470528572797775, 0.1328248828649521, -0.13946516811847687, 0.07736194878816605, 0.03275825455784798, -0.028264323249459267, -0.08454079180955887, 0.06209608167409897, -0.07313782721757889, 0.01642638072371483, 0.01407629530876875, 0.04208553209900856, 0.06924494355916977, 0.0419117733836174, 0.04688714072108269, -0.05192330479621887, 0.07889236509799957, 0.07906989008188248, 0.033010754734277725, -0.11023304611444473, -0.05961984023451805, -0.08667433261871338, 0.06551840901374817, -0.09946244210004807, -0.11092644184827805, 0.13369035720825195, 0.0541582852602005, -0.02804611250758171, 0.12977571785449982, 0.000006438286618504208, 0.02249361388385296, 0.04101007431745529, 0.027918361127376556, 0.164173886179924, -0.001877198345027864, 0.2757326662540436, -0.10836184769868851, 0.1650257408618927, -0.019165609031915665, 0.023224707692861557, -0.127455472946167, -0.0044343555346131325, 0.23922447860240936, 0.1010681763291359, 0.11046634614467621, -0.023250317201018333, -0.07521427422761917, -0.01996411196887493, -0.09161505848169327, 0.19821155071258545, 0.1572328805923462, 0.045031268149614334, -0.010348008945584297, -0.12748774886131287, -0.05940921977162361, 0.026623623445630074, 0.056570906192064285, 0.03574962168931961, 0.007656563073396683, -0.032416146248579025, -0.08600366860628128, -0.06036429852247238, -0.22238372266292572, 0.0010736329713836312, 0.036839332431554794, 0.10964439064264297, 0.21728099882602692, -0.030224008485674858, 0.0597211979329586, -0.012875967659056187, -0.009987900033593178, -0.01285917405039072, -0.04349200800061226, -0.06686941534280777, -0.08610059320926666, -0.09570644795894623, 0.02119262143969536, -0.010435597039759159, 0.057945966720581055, 0.050019923597574234, 0.21820028126239777, -0.1720963418483734, -0.08443868160247803, -0.14502573013305664, -0.017719816416502, 0.11137718707323074, 0.054631318897008896, -0.0354917086660862, -0.07413282990455627, 0.17270678281784058, -0.007066697347909212, -0.25280144810676575, 0.05797486752271652, 0.06349381059408188, -0.1285797357559204, -0.08009663969278336, -0.0615961030125618, -0.17595423758029938, -0.03771352022886276, 0.18760305643081665, 0.09387629479169846, 0.11262700706720352, 0.025349782779812813, -0.003055332461372018, 0.16400577127933502, 0.13010276854038239, 0.08220479637384415, -0.03607878461480141, -0.021682651713490486, -0.06495621055364609, 0.005413322243839502, -0.17088167369365692, 0.08146430552005768, -0.0594969280064106, 0.0778210237622261, 0.0682675912976265, -0.0535002276301384, -0.053481150418519974, -0.0014640894951298833, -0.13960374891757965, -0.06980016827583313, 0.10214747488498688, 0.13211578130722046, 0.07257375866174698, -0.19210436940193176, -0.06110786646604538, -0.00869724340736866, -0.09827357530593872, -0.0766458585858345, -0.06340380758047104, -0.07006485760211945, 0.05913091078400612, -0.05954325571656227, 0.01764790527522564, -0.05699290707707405, -0.11657591164112091, 0.02188650704920292, -0.10018495470285416, -0.008364946581423283, 0.042771752923727036, -0.013226842507719994, 0.07306234538555145, 0.10249242931604385, 0.06692345440387726, 0.17692893743515015, -0.13878241181373596, 0.1419486701488495, -0.25061747431755066, 0.04788024723529816, -0.024850090965628624, 0.11395227909088135, 0.022625204175710678, 0.030290396884083748, -0.04490923881530762, -0.025268418714404106, 0.16013850271701813, 0.1013157069683075, 0.2020530104637146, -0.10482541471719742, 0.023383982479572296, 0.08993970602750778, 0.09098934382200241, -0.06632223725318909, -0.15851786732673645, -0.03815213218331337, 0.19943810999393463, 0.001411673380061984, -0.12789790332317352, -0.04860957711935043, 0.056128643453121185, 0.15041832625865936, 0.026298142969608307, -0.03755897283554077, -0.13822190463542938, 0.05739040672779083, 0.0928177759051323, -0.019140254706144333, -0.08837833255529404, -0.06736332178115845, 0.019143467769026756, 0.00993292685598135, -0.19082747399806976, -0.10110536217689514, 0.0200519822537899, -0.13011910021305084, -0.14594314992427826, 0.07835307717323303, -0.02166120707988739, -0.1244799867272377, -0.07821065932512283, -0.035502370446920395, 0.02230883575975895, -0.06379375606775284, 0.07762446254491806, -0.09675613790750504, -0.04743814468383789, 0.11333458870649338, 0.018491335213184357, 0.22642919421195984, 0.02884855307638645, -0.017013147473335266, -0.07444340735673904, 0.010648461990058422, 0.016639668494462967, -0.01289988961070776, 0.10476253181695938, -0.013036776334047318, -0.03610389679670334, -0.06587681919336319, -0.11757971346378326, -0.028839776292443275, 0.020698176696896553, -0.14118686318397522, -0.11250779032707214, 0.06774788349866867, -0.02923056110739708, -0.01692580245435238, -0.10684537887573242, 0.045395996421575546, 0.007980546914041042, 0.06948621571063995, -0.08178065717220306, 0.020299987867474556, 0.10872627049684525, 0.08430137485265732, -0.10700194537639618, -0.019831854850053787, 0.06265448778867722, 0.13263384997844696, 0.051311396062374115, -0.06913067400455475, 0.04174485057592392, -0.035196270793676376, 0.10317094624042511, 0.14988236129283905, -0.07040218263864517, 0.09884589165449142, -0.11889386922121048, 0.07738960534334183, 0.0400356762111187, -0.002881655003875494, -0.12095766514539719, -0.010077846236526966, -0.0089104687795043, -0.051947157829999924, 0.19776301085948944, 0.1818208247423172, -0.19788773357868195, -0.05639060214161873, -0.06311093270778656, -0.13085448741912842, 0.02783292718231678, 0.07207732647657394, -0.023892870172858238, -0.07821989804506302, 0.15110409259796143, -0.03248365595936775, -0.02387523092329502, -0.06450429558753967, 0.1052941158413887, -0.07980749011039734, -0.031006967648863792, -0.03206726908683777, -0.02184196561574936, 0.12903663516044617, 0.013933091424405575, -0.046842582523822784, -0.1130475103855133, -0.08798258751630783, 0.1294001191854477, 0.1279037445783615, 0.04003297910094261, -0.054840534925460815, -0.010181226767599583, 0.18909108638763428, -0.09158799052238464, 0.05563446879386902, -0.06715400516986847, -0.04515380039811134, 0.044085487723350525, -0.038917917758226395, -0.05582495406270027, -0.20922385156154633, -0.015777885913848877, 0.13543860614299774, -0.10949383676052094, -0.06158700957894325, -0.05363164842128754, -0.2566513419151306, -0.149911031126976, -0.031791191548109055, -0.07088008522987366, 0.005187463015317917, -0.03368330001831055, 0.20730669796466827, -0.21797733008861542, 0.11146068572998047, -0.002166007412597537, -0.015018971636891365, -0.06037203595042229, -0.016861122101545334, 0.0031587895937263966, -0.028646156191825867, -0.23671317100524902, -0.05651414394378662, 0.07000013440847397, 0.005531698931008577, 0.05955361947417259, 0.13906989991664886, 0.020478947088122368, -0.07633624225854874, -0.15036922693252563, -0.10277479141950607, 0.03575269132852554, 0.06690292805433273, -0.08994525671005249, -0.06366466730833054, -0.030832763761281967, 0.036591168493032455, 0.009032385423779488, -0.1609763652086258, -0.05861115828156471, -0.06180422380566597, 0.06524350494146347, -0.10940801352262497, -0.05458423122763634, 0.14708948135375977, 0.06370045989751816, -0.014148905873298645, -0.04911993071436882, -0.04613397270441055, -0.1457476019859314, 0.006749470718204975, 0.1567668914794922, -0.05197998136281967, -0.043600454926490784, 0.08779080957174301, 0.06103326380252838, -0.03978027030825615, -0.05376145988702774, -0.19576066732406616, -0.0748223140835762, 0.020460965111851692, -0.13595391809940338, -0.16109704971313477, 0.30179595947265625, 0.05895780399441719, -0.11738204210996628, -0.07948804646730423, 0.0037539375480264425, -0.06591539084911346, 0.051371920853853226, -0.02201087959110737, -0.005262666381895542, -0.12522214651107788, 0.061532773077487946, 0.06836959719657898, 0.0904390960931778, -0.0238483976572752, 0.06306494027376175, 0.012172537855803967, 0.11953902989625931, 0.21136049926280975, -0.11468412727117538, -0.10415083914995193, 0.030372481793165207, -0.03893641009926796, 0.05965687707066536, 0.12387945502996445, -0.0019954971503466368, 0.049994003027677536, 0.03972430154681206, 0.09592562913894653, -0.05350407212972641, 0.06917212158441544, -0.09561025351285934, -0.29641374945640564, -0.06138330698013306, 0.10111644119024277, 0.14647707343101501, 0.08691424876451492, 0.02644178830087185, 0.042900506407022476, -0.07698266953229904, 0.1788879632949829, 0.060271572321653366, -0.08849398791790009, -0.10669203847646713, -0.11185473948717117, -0.015571001917123795, -0.04562012851238251, 0.1250917762517929, 0.10379714518785477, 0.04610329493880272, 0.01103245373815298, 0.10274634510278702, 0.01329141203314066, -0.10202386975288391, -0.04305054992437363, 0.13538098335266113, 0.11765454709529877, -0.010285668075084686, 0.07005009055137634, -0.07425303012132645, 0.016614357009530067, 0.1729946732521057, 0.11325491964817047, -0.048972733318805695, -0.04612716659903526, 0.2495490312576294, -0.04510129988193512, -0.10503284633159637, -0.07419727742671967, -0.13603729009628296, -0.18600577116012573, -0.07658781856298447, -0.1771162897348404, 0.14987455308437347, 0.014089178293943405, -0.06699050962924957, -0.01933309994637966, 0.11986153572797775, 0.012332327663898468, -0.010024399496614933, -0.026560863479971886, 0.15392988920211792, -0.07345328480005264, 0.03257361799478531, 0.2013150006532669, 0.01936916634440422, -0.051944416016340256, 0.11560939252376556, -0.18756826221942902, -0.2241365760564804, 0.050007812678813934, -0.40329474210739136, 0.041580066084861755, 0.0983835756778717, -0.05907215550541878, -0.05912437662482262, 0.07822741568088531, -0.005421361420303583, -0.04558117315173149, 0.04816321283578873, 0.21697497367858887, -0.1239355206489563, -0.005572132300585508, -0.052396517246961594, -0.08351407945156097, 0.038144033402204514, -0.05889216065406799, 0.04779845103621483, 0.16383320093154907, 0.00404305150732398, 0.16573460400104523, 0.1672740876674652, -0.023784328252077103, -0.16864320635795593, -0.03480382636189461, -0.15925928950309753, -0.0037975136656314135, 0.2537023723125458, -0.1129721850156784, -0.017978401854634285, -0.05704335495829582, -0.005839604418724775, 0.0726236030459404, -0.049655698239803314, -0.05362294241786003, 0.15139774978160858, 0.002732560271397233, -0.005521893966943026, -0.11982414126396179, -0.046811316162347794, -0.0939878448843956, 0.10407034307718277, 0.07656274735927582, 0.07953232526779175, 0.012644241563975811, -0.1160486564040184, 0.05865836888551712, -0.10297348350286484, -0.06984947621822357, -0.0869257003068924, 0.008298595435917377, 0.005211998242884874, -0.04510984569787979, -0.0999593734741211, 0.014710663817822933, 0.05230310931801796, 0.05642937123775482, -0.006301629822701216, 0.13012532889842987, 0.2123701572418213, 0.12315815687179565, -0.030269265174865723, 0.07615836709737778, -0.04846591502428055, 0.037684403359889984, -0.08879195153713226, -0.0733875259757042, 0.13599418103694916, 0.03657406568527222, -0.006304783746600151, -0.05473272502422333, 0.09230736643075943, 0.015728535130620003, -0.09696507453918457, -0.0648072212934494, -0.0230712890625, -0.14066891372203827, -0.12014663219451904, -0.012186909094452858, 0.19620341062545776, -0.051020339131355286, -0.017841437831521034, -0.15778279304504395, 0.07472367584705353, -0.12285991758108139, -0.036163005977869034, -0.0013777492567896843, -0.011349741369485855, -0.1404648870229721, 0.0002876495709642768, 0.10573621839284897, -0.10483165830373764, 0.22234000265598297, 0.0900702103972435, -0.24411256611347198, 0.05608581006526947, -0.01074615865945816, 0.2538876533508301, -0.2016318142414093, 0.043760720640420914, -0.13324128091335297, -0.09984750300645828, -0.18078908324241638, 0.17613485455513, 0.06952451169490814, 0.1243160143494606, -0.015049707144498825, -0.1568528711795807, 0.07151423394680023, 0.056709010154008865, -0.13702794909477234, -0.06747554987668991, 0.06906413286924362, -0.08305247873067856, -0.035531844943761826, 0.014033555053174496, -2.5362028241695994e-32, -0.025910228490829468, 0.19700467586517334, -0.09978649020195007, -0.019853215664625168, -0.14822624623775482, 0.16010774672031403, -0.03956891968846321, -0.08543428778648376, -0.016600441187620163, 0.13574044406414032, 0.02313525229692459, 0.13583670556545258, 0.09189911186695099, 0.008802369236946106, -0.0733131542801857, -0.12834107875823975, -0.03022667020559311, -0.15218548476696014, 0.0284845270216465, -0.07039094716310501, 0.162021666765213, 0.013833112083375454, 0.1382371336221695, -0.34221524000167847, 0.12990222871303558, 0.1060362458229065, -0.1440054476261139, 0.0027070315554738045, 0.20647242665290833, 0.06118476018309593, -0.002339759608730674, 0.15519684553146362, -0.07222315669059753, 0.10791090130805969, -0.09621882438659668, -0.08124590665102005, -0.03609342500567436, -0.07829917967319489, -0.1211753711104393, 0.11761990934610367, -0.07029015570878983, 0.08812981843948364, 0.1285335123538971, -0.05364789441227913, -0.14938464760780334, -0.00717480992898345, -0.029666373506188393, -0.11592122167348862, -0.005373833701014519, -0.15300528705120087, 0.052730005234479904, 0.03950130566954613, -0.013491623103618622, 0.13276387751102448, 0.11543095111846924, -0.0898108258843422, 0.06734699755907059, 0.059951141476631165, -0.17631512880325317, 0.0737558901309967, 0.12825670838356018, -0.04943525046110153, 0.09285625070333481, -0.08934405446052551, 0.08527862280607224, 0.0797632485628128, 0.2501540184020996, 0.1696675717830658, -0.01889333687722683, 0.09375177323818207, 0.019070688635110855, 0.06031441316008568, -0.014890501275658607, 0.05953819677233696, -0.14582453668117523, -0.13823942840099335, -0.0381714403629303, -0.023338645696640015, -0.017346922308206558, -0.055027175694704056, 0.11300933361053467, -0.09071983397006989, -0.15704387426376343, -0.07123458385467529, 0.0071376049891114235, 0.05681075155735016, -0.08725381642580032, -0.03554321080446243, 0.03104325570166111, -0.11631404608488083, 0.03028920851647854, 0.16147540509700775, -0.19907599687576294, -0.03347251936793327, -0.14356739819049835, 0.10513463616371155, -0.03780181705951691, 0.16059377789497375, -0.016535837203264236, -0.02448068931698799, -0.037840623408555984, 0.03883711248636246, 0.17526327073574066, 0.17238706350326538, 0.049240872263908386, 0.08791610598564148, 0.15171730518341064, 0.056116506457328796, -0.2514105439186096, -0.027161579579114914, 0.10070324689149857, 0.12948347628116608, 0.11509840935468674, -0.10669051110744476, 0.0018776512006297708, -0.08203950524330139, 0.050474777817726135, -0.00985446572303772, 0.07994798570871353, 0.21968689560890198, -0.006611248012632132, -0.003112953156232834, -0.18818916380405426, -0.02627635933458805, 0.1772388517856598, 0.08017589151859283, -0.13279135525226593, -0.06578930467367172, 0.005796109791845083, -0.005477636121213436, 0.08619216829538345, -0.05375146120786667, 8.071974662016146e-7, -0.027793580666184425, 0.16120651364326477, 0.007909941487014294, -0.07093048840761185, -0.03798713535070419, 0.11653296649456024, -0.1559264063835144, 0.05359866842627525, 0.08202562481164932, 0.24237923324108124, 0.09076564759016037, -0.013240345753729343, 0.03089984506368637, -0.026111658662557602, 0.14672772586345673, -0.13347455859184265, -0.09644641727209091, -0.022472312673926353, -0.06784471124410629, 0.09012912213802338, 0.11978337913751602, 0.25948333740234375, 0.020748451352119446, -0.007472993340343237, -0.035111673176288605, -0.022178303450345993, -0.10319950431585312, -0.12339698523283005, 0.0070933327078819275, 0.017177073284983635, 0.06886688619852066, -0.06961402297019958, 0.1505243182182312, -0.06289059668779373, -0.10285535454750061, -0.13212957978248596, -0.16505680978298187, 0.09786058962345123, -0.004969446454197168, 0.1479169875383377, -0.02329120598733425, -0.0027088732458651066, -0.07751865684986115, -0.11610225588083267, 0.04855792224407196, 0.042300354689359665, -0.0787532776594162, -0.02491547353565693, -0.19138465821743011, 0.016492530703544617, 0.13331754505634308, 0.020454879850149155, 0.03147418051958084, 0.060418590903282166, -0.001265191938728094, -0.1114739179611206, -0.004809144418686628, 0.040060799568891525, 0.1804618239402771, -0.027277754619717598, -0.024054456502199173, -0.14215336740016937, 0.0077858190052211285, 0.12228652834892273, 0.14826327562332153, -0.13406048715114594, 0.04510995373129845, 2.378644272546333e-34, 0.06061157211661339, -0.05566130205988884, -0.08543206006288528, -0.19544562697410583, 0.035035282373428345, -0.03224310278892517, 0.060307640582323074, 0.019499892368912697, -0.15358975529670715, -0.031231295317411423, -0.03694319352507591 ]
https://github.com/huggingface/datasets/issues/2522
Documentation Mistakes in Dataset: emotion
@GDGauravDutta the dataset author replied in their issue: https://github.com/dair-ai/emotion_dataset/issues/2 > The dataset released is a preprocessed six emotion variant released for educational and research purposes. @albertovilla the dataset card was fixed with 6 emotions.
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.
34
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. @GDGauravDutta the dataset author replied in their issue: https://github.com/dair-ai/emotion_dataset/issues/2 > The dataset released is a preprocessed six emotion variant released for educational and research purposes. @albertovilla the dataset card was fixed with 6 emotions.
[ 0.24156638979911804, -0.03126821294426918, -0.10009147226810455, 0.1849220097064972, 0.08160791546106339, 0.07558383047580719, 0.14080896973609924, -0.1276383250951767, 0.07266323268413544, 0.06634838134050369, -0.02674126997590065, -0.06934620440006256, 0.05972222238779068, -0.0651874989271164, -0.010959923267364502, 0.0588686503469944, 0.07255182415246964, 0.087607741355896, 0.048964451998472214, 0.03834432363510132, -0.04652705416083336, 0.09714900702238083, 0.07647068798542023, 0.03340423107147217, -0.07926899194717407, -0.08163290470838547, -0.07170040905475616, 0.05451798066496849, -0.09464358538389206, -0.11020950227975845, 0.1438310295343399, 0.049736376851797104, 0.0029846453107893467, 0.12931914627552032, 0.000006406146894732956, 0.02664092369377613, 0.042587313801050186, 0.05676468461751938, 0.15363772213459015, 0.004991679452359676, 0.2678319811820984, -0.11217547953128815, 0.16604773700237274, 0.0015475635882467031, 0.004329876974225044, -0.13818828761577606, 0.007869947701692581, 0.18475383520126343, 0.08260440081357956, 0.13225193321704865, -0.014594895765185356, -0.06981326639652252, 0.024847788736224174, -0.11351022124290466, 0.18354183435440063, 0.17114301025867462, 0.05500122159719467, 0.014439234510064125, -0.19607669115066528, -0.07072263211011887, 0.04080904647707939, 0.07926829904317856, 0.03076453134417534, 0.023253021761775017, -0.07727242261171341, -0.1074991524219513, -0.04149123281240463, -0.21644826233386993, -0.0024451250210404396, 0.07199710607528687, 0.1651461273431778, 0.20196916162967682, -0.05758722126483917, 0.08769211173057556, -0.05808491259813309, 0.016550548374652863, -0.018277069553732872, -0.025955533608794212, -0.056068774312734604, -0.07622717320919037, -0.1197509616613388, 0.02088836580514908, -0.0030152834951877594, 0.05881631001830101, 0.040126483887434006, 0.1692681759595871, -0.17360468208789825, -0.07789744436740875, -0.1767064929008484, -0.01840251311659813, 0.13995987176895142, 0.033328719437122345, -0.03776118531823158, -0.07521233707666397, 0.16798029839992523, 0.025406308472156525, -0.21005074679851532, 0.04088320583105087, 0.056484825909137726, -0.15054269134998322, -0.07564394176006317, -0.0745423436164856, -0.16682109236717224, -0.03612839803099632, 0.18856461346149445, 0.07155279070138931, 0.10495071113109589, 0.02014181762933731, 0.02245866134762764, 0.18704409897327423, 0.14177203178405762, 0.10196512937545776, -0.012768511660397053, -0.06183497980237007, -0.0775424912571907, 0.025371849536895752, -0.1481238752603531, 0.08384965360164642, -0.04019959643483162, 0.06527966260910034, 0.06948824226856232, -0.04539349302649498, -0.07841567695140839, -0.027208857238292694, -0.1509891152381897, -0.05586330592632294, 0.11620396375656128, 0.1425219625234604, 0.044311221688985825, -0.19552941620349884, -0.03637121245265007, -0.026163175702095032, -0.07196924090385437, -0.045562297105789185, -0.03893937170505524, -0.06643460690975189, 0.06032973900437355, -0.06634259968996048, 0.03202395141124725, -0.055215854197740555, -0.10329434275627136, -0.017771990969777107, -0.12279164046049118, -0.042058464139699936, 0.06776328384876251, -0.013024993240833282, 0.03962840884923935, 0.08289767801761627, 0.07544852048158646, 0.19952398538589478, -0.1327882707118988, 0.12948469817638397, -0.26462337374687195, 0.06796867400407791, -0.0318458154797554, 0.13348990678787231, 0.021224651485681534, 0.0540553517639637, -0.03695061057806015, -0.047876209020614624, 0.14470456540584564, 0.11013101786375046, 0.16398648917675018, -0.09345827996730804, 0.04905076324939728, 0.11089485883712769, 0.09224342554807663, -0.018986515700817108, -0.1621440052986145, -0.03901247680187225, 0.20386327803134918, 0.028807561844587326, -0.13624273240566254, -0.05393363535404205, 0.03155139088630676, 0.15081162750720978, 0.0019471758278086782, 0.0019140306394547224, -0.1209230050444603, 0.10798703134059906, 0.0897698625922203, -0.035668231546878815, -0.08378036320209503, -0.06709937006235123, 0.035006362944841385, -0.01587710529565811, -0.18172399699687958, -0.11539380997419357, 0.041188959032297134, -0.12459396570920944, -0.14729169011116028, 0.09942620992660522, -0.010445338673889637, -0.1054627001285553, -0.055287327617406845, -0.08092901110649109, 0.022977735847234726, -0.08271317183971405, 0.10097896307706833, -0.07730292528867722, -0.059453822672367096, 0.09185986965894699, 0.04917003959417343, 0.22643029689788818, 0.03491587191820145, 0.00788808148354292, -0.0584532655775547, 0.011065643280744553, 0.030020054429769516, -0.03153858333826065, 0.06172757223248482, -0.03836628794670105, -0.014399931766092777, -0.05863248184323311, -0.10467737913131714, -0.02408572845160961, -0.005020591430366039, -0.10894662141799927, -0.06995688378810883, 0.0975688099861145, -0.01329428143799305, 0.025082312524318695, -0.10828373581171036, 0.02009647712111473, -0.026884345337748528, 0.10123713314533234, -0.0819639265537262, 0.004982264246791601, 0.1220979169011116, 0.07542375475168228, -0.13300566375255585, -0.03344648331403732, 0.06943652778863907, 0.15701206028461456, 0.04901508241891861, -0.04646463319659233, 0.05730424448847771, -0.06494276970624924, 0.09290600568056107, 0.1203198954463005, -0.05671660974621773, 0.10507804155349731, -0.10512666404247284, 0.08015387505292892, 0.05177437514066696, 0.010785577818751335, -0.10220696777105331, -0.006097168195992708, -0.03709392249584198, -0.0777401477098465, 0.2021571546792984, 0.21299658715724945, -0.2042788714170456, -0.057864975184202194, -0.040135208517313004, -0.10085355490446091, 0.017692679539322853, 0.06799357384443283, -0.002010307041928172, -0.062192581593990326, 0.1253329962491989, -0.029317300766706467, -0.03622526302933693, -0.04608228802680969, 0.11326325684785843, -0.07616226375102997, -0.01421462930738926, -0.05013960972428322, -0.030099909752607346, 0.12622858583927155, 0.013823702931404114, -0.04305610433220863, -0.09376879781484604, -0.09116088598966599, 0.10965372622013092, 0.10117211937904358, 0.04166127368807793, -0.04868711531162262, -0.009290384128689766, 0.1631103903055191, -0.10549776256084442, 0.05944206938147545, -0.055772244930267334, -0.05441512167453766, 0.0553143210709095, -0.06359004229307175, -0.0475081130862236, -0.2260473668575287, -0.03816607967019081, 0.14182226359844208, -0.09960299730300903, -0.0554276779294014, -0.05543896183371544, -0.28239676356315613, -0.10043509304523468, -0.02750897780060768, -0.031759485602378845, 0.016335247084498405, -0.02031906135380268, 0.17580445110797882, -0.22498191893100739, 0.1051545962691307, -0.0169826727360487, -0.0037216644268482924, -0.049109138548374176, -0.008867963217198849, -0.02233744226396084, -0.0551387257874012, -0.20525549352169037, -0.09902036190032959, 0.06977933645248413, -0.012243968434631824, 0.08310066163539886, 0.14294368028640747, 0.03082035481929779, -0.12360423058271408, -0.10197900235652924, -0.09766300022602081, 0.016341526061296463, 0.05872362479567528, -0.10003189742565155, -0.07930848002433777, -0.05466022342443466, 0.03371160849928856, 0.010120260529220104, -0.14606603980064392, -0.06982883810997009, -0.06289862096309662, 0.06725732982158661, -0.11965088546276093, -0.03810802847146988, 0.06876829266548157, 0.08193239569664001, -0.03637013956904411, -0.03639931231737137, -0.0668051466345787, -0.14007705450057983, 0.016885384917259216, 0.12369204312562943, -0.05517937242984772, -0.037599146366119385, 0.09060688316822052, 0.0958838015794754, -0.034741055220365524, -0.047985970973968506, -0.24469682574272156, -0.06676404178142548, -0.02674504555761814, -0.12031178921461105, -0.15300080180168152, 0.2836635112762451, 0.037093643099069595, -0.10917748510837555, -0.08821338415145874, 0.02997952699661255, -0.12429212778806686, 0.05693788453936577, -0.013889310881495476, -0.010539473965764046, -0.06798399984836578, 0.05532478168606758, 0.08699551224708557, 0.08035174757242203, -0.037843991070985794, 0.02756432071328163, -0.005654536187648773, 0.12132098525762558, 0.24462121725082397, -0.07382822036743164, -0.13303779065608978, 0.05082344636321068, -0.009357843548059464, 0.08460099250078201, 0.12336527556180954, -0.01221969723701477, 0.03526315838098526, 0.007190320175141096, 0.12519021332263947, -0.08933986723423004, 0.051011454313993454, -0.0939757227897644, -0.31386488676071167, -0.04654226452112198, 0.09950924664735794, 0.1356654018163681, 0.07778516411781311, 0.01664433628320694, 0.011595585383474827, -0.04603121057152748, 0.191389799118042, 0.047755640000104904, -0.054562199860811234, -0.08008910715579987, -0.11672802269458771, 0.016127722337841988, -0.07943154871463776, 0.1524730622768402, 0.10463707894086838, 0.06136830896139145, 0.02077627182006836, 0.09244620054960251, 0.011500401422381401, -0.09547749161720276, -0.04289707913994789, 0.12810078263282776, 0.13330955803394318, 0.0028619139920920134, 0.06981036067008972, -0.08235731720924377, 0.023836655542254448, 0.1249513104557991, 0.11379625648260117, -0.06414637714624405, -0.04924948886036873, 0.22736717760562897, -0.06586962193250656, -0.09935634583234787, -0.08298950642347336, -0.12107796221971512, -0.20124369859695435, -0.07076769322156906, -0.16380764544010162, 0.08366195857524872, 0.026504814624786377, -0.0479045994579792, -0.04308928921818733, 0.09381824731826782, 0.009897199459373951, 0.01072227768599987, -0.06197565421462059, 0.1838255524635315, -0.06804376095533371, 0.033090513199567795, 0.19421403110027313, 0.027142344042658806, -0.04781075567007065, 0.0651833564043045, -0.1976369023323059, -0.1742601990699768, 0.017741361632943153, -0.38480252027511597, 0.027018602937459946, 0.1418120563030243, -0.06843301653862, -0.06493569165468216, 0.09276624023914337, 0.0014403986278921366, -0.042943961918354034, 0.02727639488875866, 0.1770956963300705, -0.10104899108409882, -0.002856720704585314, -0.05944274365901947, -0.11901871114969254, 0.08408733457326889, -0.03324536979198456, 0.05912371352314949, 0.13552354276180267, 0.02230801060795784, 0.12398046255111694, 0.15441064536571503, -0.019206959754228592, -0.11770772933959961, -0.03387867286801338, -0.15102653205394745, 0.021825794130563736, 0.22233179211616516, -0.1468626707792282, -0.01038388442248106, -0.07381772994995117, 0.009998542256653309, 0.04833047464489937, -0.04865352809429169, -0.05307330563664436, 0.13968409597873688, -0.001665401505306363, -0.008057255297899246, -0.13240337371826172, -0.03447381407022476, -0.073482446372509, 0.09402545541524887, 0.049044571816921234, 0.07636747509241104, 0.028780497610569, -0.11474001407623291, 0.06050320342183113, -0.11189647018909454, -0.0309379193931818, -0.09814564883708954, -0.006117211189121008, 0.01787901297211647, -0.07007631659507751, -0.12471204251050949, -0.005384410731494427, 0.05030915513634682, -0.0071446835063397884, -0.04578899219632149, 0.15984445810317993, 0.20413443446159363, 0.11842963844537735, -0.005330871790647507, 0.09652119129896164, -0.03748587891459465, 0.05682707205414772, -0.14368553459644318, -0.06172781437635422, 0.11691735684871674, -0.009152325801551342, -0.00815100222826004, -0.10694538056850433, 0.12530548870563507, 0.010373084805905819, -0.11260154843330383, -0.06307477504014969, 0.002209013793617487, -0.11852844804525375, -0.1293884515762329, -0.007645098026841879, 0.21125595271587372, -0.05734233930706978, 0.004793064668774605, -0.1639908254146576, 0.0797666683793068, -0.14311952888965607, -0.02075606770813465, 0.008098196238279343, -0.03636055439710617, -0.13274458050727844, 0.01398530974984169, 0.10888580977916718, -0.10895518958568573, 0.21337231993675232, 0.09170151501893997, -0.2492598444223404, 0.04986075684428215, -0.03453605994582176, 0.2397107183933258, -0.19651784002780914, 0.03351457789540291, -0.1252581775188446, -0.0871494933962822, -0.1695253551006317, 0.12848494946956635, 0.08575280010700226, 0.14732463657855988, -0.02952529489994049, -0.15445253252983093, 0.11820929497480392, 0.06335663050413132, -0.12564487755298615, -0.057301975786685944, 0.08022819459438324, -0.13248109817504883, -0.03996162861585617, 0.031211253255605698, -2.562947671639508e-32, -0.002925899578258395, 0.2517133355140686, -0.08079306781291962, -0.007991003803908825, -0.13066479563713074, 0.18799461424350739, -0.048422351479530334, -0.09147090464830399, -0.043585583567619324, 0.11015559732913971, 0.012596393004059792, 0.16211915016174316, 0.09967214614152908, -0.003435131860896945, -0.06624812632799149, -0.07502938061952591, -0.03421526029706001, -0.173887699842453, 0.053627390414476395, -0.07809070497751236, 0.1578686386346817, -0.01460362784564495, 0.13914598524570465, -0.3045445382595062, 0.1106572300195694, 0.0995478704571724, -0.14440345764160156, 0.008445877581834793, 0.18686413764953613, 0.024570610374212265, 0.007178190629929304, 0.1385558396577835, -0.08406253159046173, 0.12632672488689423, -0.10512029379606247, -0.10334857553243637, -0.0008962071151472628, -0.11317364126443863, -0.13141772150993347, 0.0911102443933487, -0.11337605118751526, 0.10791563987731934, 0.1345188468694687, -0.057626206427812576, -0.14908498525619507, 0.005328277591615915, -0.03733496367931366, -0.1086471825838089, 0.009784265421330929, -0.14904475212097168, 0.05037130415439606, 0.04223311319947243, -0.025174086913466454, 0.1409720927476883, 0.12505567073822021, -0.0926479622721672, 0.043915756046772, 0.01648886501789093, -0.17122724652290344, 0.0940883457660675, 0.14827832579612732, -0.0476413369178772, 0.09211166203022003, -0.11106912046670914, 0.09502549469470978, 0.09272495657205582, 0.2298325002193451, 0.14237508177757263, -0.023252788931131363, 0.13915079832077026, 0.008604162372648716, 0.10325079411268234, -0.029368316754698753, 0.08658687770366669, -0.15607109665870667, -0.15200544893741608, -0.06926751136779785, -0.013236859813332558, 0.02542070671916008, -0.041209619492292404, 0.12150754779577255, -0.13069197535514832, -0.13562116026878357, -0.08013641834259033, 0.009151192381978035, 0.07496143132448196, -0.09057238698005676, -0.073404960334301, 0.03205333650112152, -0.092098668217659, 0.017759673297405243, 0.17239339649677277, -0.16915901005268097, -0.08078308403491974, -0.12721924483776093, 0.09962499886751175, -0.0690951943397522, 0.1566193401813507, 0.014129581861197948, 0.002645661821588874, -0.06889615952968597, 0.0673074796795845, 0.19262903928756714, 0.1902913749217987, 0.0555911548435688, 0.09133865684270859, 0.13721776008605957, 0.0685005933046341, -0.24553324282169342, -0.015923766419291496, 0.09920849651098251, 0.13969138264656067, 0.10351146012544632, -0.15015281736850739, 0.0019880463369190693, -0.07591860741376877, 0.058528222143650055, -0.03601972386240959, 0.08559056371450424, 0.22848638892173767, -0.019943760707974434, 0.018951892852783203, -0.21049202978610992, -0.007490220014005899, 0.15784500539302826, 0.0766206756234169, -0.11978217959403992, -0.06839024275541306, -0.010927136987447739, -0.00588630884885788, 0.07342127710580826, -0.0307733416557312, 8.071688739619276e-7, -0.04800858348608017, 0.15850156545639038, 0.01904314197599888, -0.034373145550489426, -0.035701580345630646, 0.07420266419649124, -0.15837468206882477, 0.08004666864871979, 0.06714387238025665, 0.23857054114341736, 0.09009575098752975, 0.025418749079108238, 0.023760417476296425, -0.030529560521245003, 0.1394936740398407, -0.11429845541715622, -0.09338728338479996, 0.015500796027481556, -0.06018674373626709, 0.06884574145078659, 0.14800845086574554, 0.27484261989593506, 0.00698206527158618, -0.031610239297151566, -0.06256204843521118, -0.05011485517024994, -0.08547404408454895, -0.13815222680568695, -0.01109843235462904, 0.04043607413768768, 0.07301632314920425, -0.06374017894268036, 0.1675754189491272, -0.0865623876452446, -0.10190476477146149, -0.12553468346595764, -0.20044441521167755, 0.09779399633407593, -0.01995040290057659, 0.18279731273651123, -0.008742820471525192, -0.0064239827916026115, -0.0791008323431015, -0.11005779355764389, 0.060830432921648026, 0.04715806990861893, -0.11340271681547165, -0.022095389664173126, -0.1673603057861328, 0.0010918357875198126, 0.11983060091733932, 0.027080142870545387, 0.023393483832478523, 0.049088578671216965, 0.0026735432911664248, -0.12069016695022583, -0.021457765251398087, 0.03291849419474602, 0.1897706687450409, -0.054450977593660355, -0.003943325020372868, -0.1466638594865799, -0.03221330791711807, 0.13579003512859344, 0.13098831474781036, -0.07294614613056183, 0.06290440261363983, 2.19539159091535e-34, 0.054125819355249405, -0.052311450242996216, -0.11723922938108444, -0.2008754014968872, 0.06275597214698792, -0.06449344754219055, 0.07152826339006424, 0.01318810973316431, -0.17497877776622772, -0.059799905866384506, -0.04494932293891907 ]
https://github.com/huggingface/datasets/issues/2520
Datasets with tricky task templates
The `task_templates` API is deprecated in favor of the `train-eval-index` YAML field, so I'm closing this issue.
I'm collecting a list of datasets here that don't follow the "standard" taxonomy and require further investigation to implement task templates for. ## Text classification * [hatexplain](https://huggingface.co/datasets/hatexplain): ostensibly a form of text classification, but not in the standard `(text, target)` format and each sample appears to be tokenized. * [muchocine](https://huggingface.co/datasets/muchocine): contains two candidate text columns (long-form and summary) which in principle requires two `TextClassification` templates which is not currently supported
17
Datasets with tricky task templates I'm collecting a list of datasets here that don't follow the "standard" taxonomy and require further investigation to implement task templates for. ## Text classification * [hatexplain](https://huggingface.co/datasets/hatexplain): ostensibly a form of text classification, but not in the standard `(text, target)` format and each sample appears to be tokenized. * [muchocine](https://huggingface.co/datasets/muchocine): contains two candidate text columns (long-form and summary) which in principle requires two `TextClassification` templates which is not currently supported The `task_templates` API is deprecated in favor of the `train-eval-index` YAML field, so I'm closing this issue.
[ 0.09924536198377609, 0.041405078023672104, 0.004697843454778194, 0.02477806806564331, 0.002326734596863389, 0.10055379569530487, 0.18566757440567017, 0.058110322803258896, -0.08948621898889542, 0.03727921470999718, 0.02492298185825348, -0.06415719538927078, -0.009977543726563454, 0.1397503763437271, 0.044248539954423904, -0.20046480000019073, -0.19421908259391785, -0.010171862319111824, -0.037587616592645645, -0.03454074636101723, -0.05412402004003525, 0.09008055180311203, 0.05335317552089691, 0.05398218706250191, 0.002601220738142729, -0.14147408306598663, -0.034818314015865326, 0.09535517543554306, 0.006733698770403862, 0.0017471805913373828, 0.18478986620903015, 0.023178525269031525, -0.10887113958597183, 0.0743103101849556, 0.000005970168331259629, 0.07832904160022736, -0.046486832201480865, -0.1150246113538742, -0.07066334784030914, -0.06281989812850952, 0.2748863697052002, -0.14439865946769714, 0.07760020345449448, 0.04051762819290161, -0.09612114727497101, -0.115627221763134, 0.1589251011610031, 0.29837822914123535, 0.2431788295507431, 0.07430661469697952, 0.025916989892721176, -0.029945529997348785, -0.22100432217121124, -0.14188989996910095, 0.11627238243818283, 0.22677738964557648, 0.045003775507211685, -0.06235726922750473, -0.0030412583146244287, 0.021636370569467545, 0.17540322244167328, -0.05779557302594185, -0.03861275315284729, 0.07644201070070267, 0.04631045088171959, -0.02914924919605255, -0.28027185797691345, -0.049509938806295395, 0.0651211142539978, 0.13012835383415222, -0.07127390056848526, -0.022255990654230118, -0.0010330602526664734, 0.0025443302001804113, -0.05184335261583328, -0.017306916415691376, -0.10708623379468918, 0.02772355079650879, -0.12666583061218262, 0.06186462193727493, 0.06734662503004074, 0.004298876505345106, -0.055999755859375, -0.024185223504900932, -0.06840947270393372, -0.021191710606217384, -0.1133551299571991, -0.09976554661989212, -0.07265029847621918, -0.021949751302599907, -0.03732531517744064, -0.08473951369524002, -0.06087420880794525, -0.16534475982189178, 0.061359550803899765, -0.05386922135949135, -0.21763011813163757, -0.22880998253822327, 0.09485211223363876, 0.03826158121228218, 0.16347596049308777, 0.03904929384589195, -0.16249489784240723, 0.14909516274929047, -0.036396656185388565, 0.011705031618475914, 0.03847797214984894, -0.05614576116204262, -0.015252274461090565, 0.0217173770070076, -0.08087645471096039, 0.1164790615439415, -0.2197171151638031, 0.17177319526672363, -0.04419972375035286, 0.19368985295295715, -0.15765410661697388, 0.09312648326158524, -0.09533324837684631, 0.09356597810983658, 0.19437001645565033, 0.15810228884220123, 0.09826938062906265, 0.06507322937250137, -0.0939522460103035, -0.012203487567603588, -0.008699249476194382, 0.07588167488574982, -0.07933434098958969, 0.017209116369485855, -0.04897741228342056, 0.09218627214431763, -0.015818122774362564, -0.16071678698062897, 0.20043215155601501, 0.018231861293315887, 0.02361103519797325, -0.1585061252117157, -0.01692129299044609, -0.11137842386960983, 0.07938142120838165, -0.08256606757640839, 0.024824297055602074, -0.04318102076649666, 0.11466296762228012, 0.06324765086174011, -0.0068555185571312904, 0.024847907945513725, -0.12057742476463318, 0.06468508392572403, -0.1484377086162567, 0.22485853731632233, -0.010207179933786392, -0.01181474607437849, -0.035653963685035706, 0.04264877364039421, -0.034662388265132904, 0.13204370439052582, -0.15580591559410095, 0.06371690332889557, 0.11127414554357529, -0.05290400609374046, 0.06720900535583496, 0.04649917781352997, -0.018855208531022072, 0.10030815005302429, 0.08813595026731491, 0.04971550405025482, 0.09398345649242401, 0.03483431413769722, -0.0006474889814853668, -0.02991943061351776, 0.022350559011101723, 0.00481461314484477, 0.09354357421398163, 0.22788935899734497, -0.04038865864276886, -0.05524991452693939, 0.032272957265377045, -0.025722220540046692, 0.06268604844808578, -0.038049183785915375, 0.009370232932269573, -0.15335188806056976, 0.1649007797241211, -0.1556428223848343, -0.13333413004875183, 0.1345522701740265, -0.08912113308906555, -0.10047738254070282, -0.10526479035615921, 0.009240795858204365, -0.033171139657497406, 0.0835135281085968, 0.15372785925865173, -0.02300295978784561, -0.0951482355594635, 0.006780602037906647, -0.04570433124899864, -0.17577479779720306, -0.07056517899036407, -0.04150675609707832, 0.025602642446756363, 0.0036329561844468117, -0.047253288328647614, -0.11283157765865326, -0.2136324942111969, 0.09250503778457642, 0.08789423853158951, 0.0012018298730254173, 0.06682978570461273, 0.028905723243951797, 0.04078676551580429, -0.09958858042955399, -0.08764003962278366, 0.03642409294843674, 0.05067870765924454, -0.10408676415681839, -0.17414140701293945, -0.05079587921500206, -0.05602620169520378, -0.06360676884651184, -0.16571174561977386, 0.11436314135789871, 0.268918514251709, 0.041507113724946976, 0.17226342856884003, 0.05054390802979469, 0.07141134142875671, 0.0944197028875351, -0.0300451647490263, -0.06622005999088287, 0.21295469999313354, -0.08220873773097992, -0.0662013366818428, -0.014550326392054558, 0.030048517510294914, 0.036255430430173874, 0.06540204584598541, -0.02499217540025711, -0.04361550137400627, 0.066722571849823, -0.09402532130479813, -0.14767888188362122, 0.09184954315423965, 0.16175322234630585, 0.014723159372806549, 0.14380484819412231, 0.02003687433898449, 0.04371352866292, 0.11345174908638, 0.08256153762340546, 0.09342774748802185, 0.11816846579313278, 0.1549128293991089, -0.054677754640579224, -0.1364423632621765, 0.04822375252842903, -0.04398487135767937, -0.10400617122650146, 0.0024142039474099874, -0.04658259078860283, -0.027376418933272362, -0.015432262793183327, 0.10025503486394882, 0.015311755239963531, -0.04782084748148918, -0.23875774443149567, -0.14295293390750885, 0.05511404946446419, 0.07320788502693176, -0.031023118644952774, -0.12296073138713837, -0.18494845926761627, 0.031094687059521675, -0.1528697907924652, -0.1705753058195114, -0.03090025670826435, 0.1405128836631775, 0.05472768098115921, -0.12569120526313782, 0.1559225618839264, 0.19578847289085388, -0.026996629312634468, 0.12277153879404068, 0.10725551843643188, -0.15067625045776367, -0.03903073072433472, -0.14270323514938354, 0.16301226615905762, -0.0720989778637886, -0.07693256437778473, 0.058594685047864914, -0.04646557196974754, -0.068971648812294, 0.026446137577295303, 0.030253730714321136, 0.15651346743106842, -0.16669118404388428, 0.09219865500926971, -0.02487877383828163, 0.12833404541015625, 0.018419817090034485, -0.00834102276712656, -0.05585997924208641, 0.03589631989598274, 0.13772307336330414, -0.021189633756875992, -0.031171400099992752, -0.011285603046417236, -0.025683514773845673, -0.045082733035087585, -0.0049107070080935955, 0.1348041594028473, -0.07483986765146255, 0.02207181602716446, -0.17409870028495789, -0.11552233248949051, 0.10225134342908859, 0.17213067412376404, 0.021676205098628998, 0.09157852083444595, -0.10037078708410263, -0.1019563153386116, -0.06442397087812424, -0.09017590433359146, -0.09432166814804077, -0.14064304530620575, 0.12659166753292084, -0.043496400117874146, -0.07242115586996078, 0.29677727818489075, 0.044667672365903854, -0.059019021689891815, 0.08477117121219635, 0.08552496135234833, -0.15132205188274384, 0.006064185407012701, 0.19438724219799042, -0.06973759829998016, -0.18871109187602997, 0.022079627960920334, -0.05278141424059868, -0.17160604894161224, 0.15465891361236572, -0.07194246351718903, 0.10840722918510437, -0.04171771928668022, -0.11239466816186905, 0.10055356472730637, -0.14085784554481506, 0.15702076256275177, -0.11592750251293182, 0.02308334968984127, -0.03466663137078285, 0.12530669569969177, -0.0317075252532959, 0.07250272482633591, -0.12370862811803818, 0.0114930160343647, -0.08319074660539627, 0.05486311390995979, 0.31570279598236084, -0.19700388610363007, 0.004698382690548897, 0.02401588298380375, 0.24078764021396637, -0.03992510214447975, -0.09277313947677612, -0.11860940605401993, 0.12969635426998138, -0.20484893023967743, -0.00012517187860794365, 0.01919924095273018, 0.03832586854696274, -0.1238885223865509, 0.032332248985767365, -0.02872665971517563, 0.059868574142456055, -0.06379193067550659, 0.06618580967187881, -0.26682472229003906, -0.052038632333278656, 0.049625907093286514, 0.16084584593772888, -0.10538306832313538, -0.17916959524154663, -0.1144428476691246, -0.07602115720510483, 0.09314817190170288, 0.047501590102910995, 0.04764861613512039, 0.05225203558802605, -0.07277712970972061, -0.022030020132660866, -0.17139580845832825, -0.03203221410512924, -0.12024401873350143, -0.016574839130043983, 0.056204233318567276, 0.13274122774600983, -0.015460501424968243, -0.10576321929693222, 0.10711199045181274, 0.07772934436798096, 0.01136364508420229, 0.013039454817771912, 0.022329501807689667, -0.07086344808340073, -0.08364710956811905, 0.14591389894485474, -0.024112487211823463, -0.04514293745160103, 0.048401519656181335, 0.06924530118703842, -0.06889227032661438, -0.14429928362369537, 0.08665964007377625, 0.1271473616361618, -0.1648591309785843, 0.05648387596011162, 0.03893328830599785, 0.2803725302219391, -0.0962730422616005, 0.12269345670938492, -0.10897409915924072, -0.15649519860744476, 0.0907750204205513, 0.24402280151844025, 0.05832942575216293, -0.1910959631204605, 0.01606176607310772, -0.0025700852274894714, 0.021320845931768417, -0.05032489821314812, -0.03202318027615547, 0.06516427546739578, -0.1419389843940735, -0.02530789189040661, -0.10459483414888382, -0.2859368324279785, 0.2344229817390442, 0.17030468583106995, -0.045463480055332184, 0.09694124758243561, -0.14775490760803223, 0.010950119234621525, -0.1133655458688736, 0.15681584179401398, -0.006633411627262831, -0.1942828893661499, -0.13116811215877533, -0.0740266814827919, -0.10197041928768158, 0.09514197707176208, -0.07808913290500641, -0.030241213738918304, -0.2265838235616684, 0.05266473814845085, 0.07211172580718994, 0.0007948811980895698, -0.019986243918538094, -0.009845040738582611, 0.05551280453801155, -0.18220016360282898, 0.17148049175739288, 0.1849023848772049, -0.1687532365322113, -0.07102034986019135, -0.006388505920767784, -0.07653140276670456, 0.041318170726299286, 0.020793722942471504, -0.045392151921987534, 0.0619606077671051, 0.08709434419870377, -0.05321808531880379, 0.043565619736909866, 0.1399470418691635, 0.0719708651304245, -0.005308439955115318, 0.17701280117034912, -0.003346494399011135, -0.14913272857666016, -0.02050705999135971, 0.272204726934433, -0.057848598808050156, -0.1115993931889534, -0.09596869349479675, 0.08027280867099762, 0.05311788618564606, 0.040496598929166794, -0.057731952518224716, 0.11278817057609558, -0.015579394064843655, 0.23885993659496307, -0.14533814787864685, 0.11933516710996628, -0.1363038867712021, 0.12138230353593826, -0.05970805883407593, 0.02423279918730259, -0.019817931577563286, -0.03321386128664017, -0.05296582356095314, -0.05852273106575012, 0.061246730387210846, 0.06322907656431198, 0.13504132628440857, 0.2070922702550888, 0.04216315224766731, 0.19937697052955627, 0.08875712007284164, -0.15340165793895721, -0.10340394079685211, -0.15469896793365479, 0.007396634668111801, -0.06798337399959564, -0.003080513561144471, -0.07629629224538803, -0.04884150251746178, -0.002534135477617383, 0.06307398527860641, 0.06593574583530426, 0.02461758814752102, 0.059785958379507065, 0.021759171038866043, -0.020079893991351128, -0.16926470398902893, 0.14969362318515778, 0.03669217228889465, 0.16369643807411194, 0.25680291652679443, -0.054060161113739014, -0.08133234828710556, 0.12270388752222061, 0.1261664181947708, -0.13358791172504425, 0.13709475100040436, -0.1302448958158493, -0.20748893916606903, -0.22301940619945526, 0.07491125166416168, -0.043037500232458115, -0.0414365716278553, 0.08021552860736847, -0.10507266223430634, 0.014474954456090927, 0.044488515704870224, 0.13914549350738525, -0.0676337257027626, -0.05652741715312004, -0.026032019406557083, -0.06686030328273773, -0.07660841941833496, -2.823135999354329e-32, 0.06249396130442619, 0.0585440918803215, -0.03182952478528023, -0.12833553552627563, -0.004546548705548048, 0.06756582856178284, 0.15082626044750214, -0.10240011662244797, 0.06076786294579506, -0.03654947131872177, -0.08300984650850296, 0.0030041916761547327, 0.06855396181344986, 0.0860174223780632, -0.016080815345048904, 0.0327802449464798, 0.07532676309347153, -0.11936556547880173, -0.16360537707805634, 0.05832740291953087, 0.1018003448843956, -0.08234239369630814, 0.04118100181221962, -0.11088728159666061, 0.10155855119228363, 0.08665048331022263, 0.058718279004096985, -0.004420958459377289, 0.028507109731435776, 0.1576438844203949, -0.1226339191198349, 0.12910571694374084, 0.12401031702756882, -0.0023695924319326878, -0.047443680465221405, 0.021800238639116287, -0.12278809398412704, -0.047283198684453964, 0.0806138888001442, -0.01686635985970497, -0.024854911491274834, -0.16282935440540314, 0.1847720593214035, 0.10161802172660828, -0.000607827678322792, 0.09791021049022675, 0.05023796483874321, -0.09071685373783112, 0.13326822221279144, 0.03242568299174309, 0.11962754279375076, 0.003349039936438203, 0.041985709220170975, -0.03320702537894249, 0.05654330179095268, 0.056773990392684937, 0.09181395173072815, -0.0944753885269165, -0.1731744110584259, 0.02959582395851612, 0.05191657319664955, 0.07848985493183136, 0.10267586261034012, -0.0034935693256556988, 0.036572471261024475, 0.01286154706031084, 0.15745845437049866, 0.1195029765367508, -0.04402308538556099, -0.09667474776506424, -0.04441940039396286, 0.11604766547679901, 0.023947350680828094, -0.10054775327444077, -0.028330454602837563, 0.07583799213171005, -0.04089479520916939, 0.051740556955337524, 0.036169834434986115, -0.0784432664513588, 0.01344943419098854, -0.1300385743379593, -0.03583197295665741, -0.025954823940992355, -0.016530418768525124, -0.05080297589302063, -0.14942055940628052, 0.04834564030170441, 0.02432798035442829, -0.03408610448241234, 0.009124787524342537, 0.13493451476097107, -0.078667551279068, 0.08149291574954987, -0.08173378556966782, 0.12170172482728958, -0.03241637721657753, 0.06103268638253212, 0.0057923332788050175, -0.164974182844162, 0.0036804527044296265, -0.019550807774066925, 0.20472125709056854, 0.07799670845270157, 0.12291646748781204, -0.08015970140695572, 0.06270764768123627, 0.0599600225687027, -0.28024351596832275, 0.022939927875995636, -0.06217595562338829, 0.14121219515800476, 0.0728820338845253, 0.04991887882351875, 0.16687855124473572, -0.034051232039928436, 0.03602008521556854, 0.09241355955600739, 0.1050250232219696, -0.12806293368339539, -0.1575963944196701, 0.11192764341831207, 0.03502269089221954, -0.02212643437087536, 0.045414868742227554, 0.05345698446035385, 0.023929767310619354, 0.016983577981591225, 0.08223613351583481, 0.05690937489271164, 0.04514198750257492, 0.005445348098874092, 7.51227389628184e-7, -0.04212285205721855, 0.16350311040878296, 0.0351562462747097, -0.11604153364896774, 0.011064128018915653, 0.20891022682189941, -0.02750394120812416, 0.12878979742527008, -0.206471785902977, 0.1099291741847992, 0.1100802943110466, -0.28058508038520813, 0.0032479220535606146, -0.07492206245660782, -0.07119624316692352, 0.08777205646038055, -0.12668058276176453, -0.03173115476965904, -0.1962965428829193, 0.06451839953660965, 0.2389528453350067, 0.1862158179283142, 0.03444715961813927, -0.01353505626320839, -0.08833833783864975, 0.04495972767472267, -0.004084330052137375, -0.08124536275863647, -0.04009082540869713, -0.06004203483462334, -0.026703596115112305, -0.04850650951266289, 0.021466514095664024, 0.14954231679439545, 0.06748200207948685, -0.04117189720273018, -0.03854559734463692, -0.06241434067487717, 0.04264502599835396, -0.06164851784706116, -0.05314027890563011, -0.08387067168951035, -0.11417564749717712, -0.07628946006298065, 0.2628196179866791, -0.1320023536682129, -0.15567646920681, 0.02299659140408039, -0.1462635099887848, 0.12578657269477844, -0.04835742339491844, 0.11471127718687057, 0.03303832560777664, 0.15043725073337555, 0.0026337597519159317, -0.03552180156111717, -0.01786186173558235, -0.16130998730659485, 0.041109245270490646, 0.0842529907822609, -0.10433617234230042, -0.20207670331001282, -0.07713530212640762, 0.0977201908826828, 0.146253764629364, -0.15334510803222656, -0.08455543220043182, 3.0568014276263554e-34, -0.04032733663916588, -0.035042956471443176, -0.11590929329395294, -0.09684527665376663, -0.15796732902526855, -0.23204563558101654, -0.10813156515359879, 0.03421062231063843, -0.029932742938399315, -0.22020871937274933, -0.07841381430625916 ]
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.05370331555604935, 0.09016449004411697, -0.06694222241640091, -0.16696515679359436, 0.16806840896606445, -0.11115274578332901, 0.14727525413036346, 0.07534642517566681, 0.09735727310180664, 0.07620877027511597, 0.05280112475156784, 0.10683634877204895, 0.01741383783519268, 0.13247166574001312, 0.03817718103528023, 0.02339528501033783, 0.05064952373504639, -0.04816356301307678, -0.10362361371517181, 0.03390316292643547, -0.15233592689037323, 0.1388334184885025, 0.1404346078634262, 0.23517337441444397, -0.1008652001619339, -0.18864615261554718, -0.10564950853586197, 0.14941303431987762, -0.04289303719997406, -0.009509672410786152, -0.05374997481703758, 0.04360440745949745, 0.028284698724746704, 0.0583784282207489, 0.000005208831225900212, -0.050401702523231506, 0.104510098695755, -0.048195041716098785, -0.02844415046274662, -0.020725427195429802, 0.09616108983755112, -0.037768248468637466, 0.07536747306585312, -0.010927136987447739, -0.09437023848295212, 0.028243789449334145, -0.06571900844573975, 0.0002415525377728045, 0.24271558225154877, 0.05466814711689949, -0.04502186179161072, -0.06068415939807892, -0.1109086275100708, -0.05912012979388237, -0.03442490100860596, -0.031064672395586967, 0.1612328588962555, 0.08856850117444992, -0.24361015856266022, -0.2590726912021637, -0.009002762846648693, -0.14801108837127686, -0.10901753604412079, -0.1478394716978073, -0.14203114807605743, -0.047129034996032715, -0.18981415033340454, -0.03644374758005142, -0.08622647821903229, 0.03005240485072136, -0.09184026718139648, -0.09458234161138535, -0.1372210532426834, 0.037482116371393204, -0.0960608422756195, -0.04727545380592346, -0.015766680240631104, -0.03321343660354614, 0.024577397853136063, 0.1695745438337326, 0.05971729755401611, 0.04643610492348671, 0.07566974312067032, -0.04009595513343811, -0.178714781999588, 0.06423065066337585, -0.10037796944379807, 0.14396396279335022, -0.05216943100094795, -0.10381440818309784, -0.02167399972677231, -0.05501318722963333, -0.028559919446706772, -0.07163837552070618, 0.006036486942321062, -0.03758072480559349, -0.06542310118675232, -0.18678779900074005, -0.023356197401881218, 0.14444881677627563, -0.13188888132572174, -0.12904316186904907, -0.05970335006713867, 0.09864385426044464, 0.02939266338944435, -0.05654362589120865, -0.0445367768406868, 0.27738067507743835, 0.0042129396460950375, -0.0771106407046318, -0.21645519137382507, 0.0996897742152214, -0.0888763964176178, -0.00909474492073059, 0.14938002824783325, 0.07293935865163803, -0.06302700936794281, 0.12495523691177368, 0.01729467511177063, 0.14648988842964172, -0.07575032114982605, 0.07484117895364761, -0.03686327487230301, -0.08959474414587021, 0.03329155966639519, -0.0016318646958097816, 0.11256963014602661, 0.08309721946716309, 0.009348176419734955, -0.034425631165504456, -0.05989198014140129, 0.009298941120505333, -0.03460659459233284, 0.009187386371195316, 0.09760359674692154, -0.027531130239367485, 0.022174401208758354, -0.1750277578830719, 0.015570275485515594, -0.16166052222251892, 0.15597127377986908, -0.12683770060539246, -0.0017097399104386568, -0.01410053949803114, 0.10691247135400772, 0.18241597712039948, 0.07712101936340332, -0.21815750002861023, -0.06891164928674698, -0.07064925134181976, -0.12562142312526703, 0.0925038754940033, -0.1883210837841034, 0.0697791576385498, -0.1958611160516739, 0.07628866285085678, -0.1206243708729744, -0.06591959297657013, -0.19956758618354797, -0.05927634984254837, 0.10347376018762589, -0.01730123721063137, 0.07507899403572083, -0.1601780503988266, 0.08336607366800308, 0.08428459614515305, -0.08679086714982986, 0.12722598016262054, -0.006392862182110548, -0.00985303707420826, 0.27684667706489563, -0.021756961941719055, -0.09421160817146301, -0.03357340022921562, -0.15440256893634796, 0.40206819772720337, -0.12825964391231537, 0.03976142778992653, -0.20624150335788727, -0.13163018226623535, 0.04949819669127464, -0.08629445731639862, -0.03946727141737938, -0.3293612599372864, 0.03970974311232567, -0.01980005018413067, -0.06375963985919952, 0.12267419695854187, 0.012485062703490257, -0.1070738211274147, -0.08878441154956818, 0.053729232400655746, 0.015392238274216652, -0.21672029793262482, 0.11786313354969025, -0.011209958232939243, -0.08173803240060806, -0.024956725537776947, 0.02022874355316162, -0.2084949016571045, 0.01435016468167305, -0.18735326826572418, 0.07004866003990173, 0.0277408380061388, 0.023806726559996605, -0.06063483655452728, -0.1709112823009491, 0.04363327473402023, 0.004188064485788345, -0.08687306195497513, -0.15379050374031067, 0.11203866451978683, -0.022778958082199097, 0.01731429621577263, -0.20187096297740936, -0.09340926259756088, 0.07683860510587692, -0.017292162403464317, 0.042175982147455215, 0.1520875096321106, -0.023728245869278908, -0.07287102937698364, 0.12211762368679047, 0.07058419287204742, 0.16471204161643982, 0.15207184851169586, -0.028959333896636963, -0.10925949364900589, 0.005152047146111727, 0.06489941477775574, -0.00918718334287405, -0.031028077006340027, 0.16326069831848145, 0.1680426001548767, 0.03006613813340664, -0.03357260301709175, 0.03831159323453903, -0.20055411756038666, -0.017101990059018135, 0.1226145476102829, -0.20970980823040009, 0.1095525398850441, -0.12525515258312225, -0.1340814083814621, 0.058996543288230896, 0.1704626828432083, 0.22906100749969482, 0.19933614134788513, -0.1311570554971695, 0.033897776156663895, 0.12409887462854385, 0.025458646938204765, -0.1652226746082306, 0.01569800078868866, -0.12158522754907608, -0.20786209404468536, 0.09426749497652054, -0.008346544578671455, 0.038308754563331604, -0.12583516538143158, 0.21124611794948578, -0.07142540067434311, 0.05713391304016113, -0.09890681505203247, 0.13523930311203003, -0.115238256752491, 0.08497539162635803, -0.04713338240981102, -0.026684198528528214, 0.08405373990535736, 0.09882160276174545, -0.04973987862467766, -0.052681367844343185, -0.05729810893535614, -0.08075825124979019, -0.07715031504631042, 0.05714881420135498, -0.008103625848889351, 0.07561811059713364, 0.045625731348991394, -0.19077254831790924, 0.0791667103767395, 0.1283460557460785, -0.043776270002126694, 0.06917370855808258, 0.1051005944609642, -0.15869848430156708, 0.24275006353855133, -0.2347393035888672, -0.05254844203591347, 0.00981190986931324, -0.0732087790966034, 0.02995040826499462, -0.09098679572343826, -0.05482763797044754, -0.03303905203938484, -0.014820101670920849, -0.17967069149017334, -0.05550985783338547, -0.07600203901529312, -0.08401031792163849, 0.03190955892205238, 0.02933652326464653, -0.07340794801712036, 0.01672920025885105, 0.04288711026310921, 0.11270526796579361, 0.3252256214618683, -0.2239973545074463, -0.09095628559589386, -0.039403703063726425, 0.006640837527811527, -0.003683242714032531, 0.1371079832315445, 0.1092490553855896, -0.13670165836811066, -0.05284078046679497, -0.17102302610874176, 0.16918660700321198, 0.020481813699007034, -0.04819118604063988, -0.010959678329527378, -0.06387414038181305, -0.05094245821237564, -0.007112898398190737, -0.009171154350042343, -0.11098194122314453, -0.1855107545852661, 0.09485208988189697, -0.04511948674917221, -0.031612373888492584, 0.2806595265865326, 0.03794143348932266, -0.06029629707336426, -0.046975623816251755, -0.15482129156589508, -0.1323886513710022, 0.10363319516181946, 0.1867906004190445, 0.018064871430397034, -0.08906931430101395, -0.03214400261640549, -0.08599170297384262, 0.12203213572502136, 0.06483124941587448, -0.07134705781936646, 0.06679642200469971, 0.0373433381319046, -0.0533951036632061, -0.007225906942039728, -0.025120602920651436, 0.14180594682693481, -0.07590588927268982, -0.1359693855047226, 0.005644829478114843, 0.061978843063116074, -0.1193789690732956, 0.22773072123527527, -0.15266555547714233, 0.20651587843894958, -0.009426030330359936, 0.1022682636976242, 0.2352871149778366, -0.061535272747278214, -0.05675892159342766, 0.053611062467098236, 0.15156352519989014, -0.08894472569227219, -0.013904104009270668, -0.19908954203128815, 0.19738557934761047, -0.06026501581072807, -0.24988536536693573, -0.1136869266629219, -0.05591108277440071, -0.021789368242025375, 0.02133600227534771, -0.11704492568969727, 0.037148188799619675, -0.11769336462020874, 0.09839660674333572, -0.05897645279765129, -0.058661721646785736, 0.17377257347106934, 0.1543327420949936, 0.09152868390083313, 0.03866461291909218, 0.11577708274126053, -0.13411617279052734, 0.23825740814208984, 0.1559542864561081, -0.17257198691368103, 0.045498237013816833, -0.1803400218486786, 0.038077179342508316, -0.10258045047521591, 0.10612247884273529, 0.024620337411761284, 0.005610935855656862, 0.038350801914930344, 0.21537581086158752, 0.14207151532173157, -0.05385016277432442, 0.10605423152446747, 0.2177080512046814, -0.010225743055343628, 0.10987994819879532, -0.15795229375362396, 0.15224581956863403, -0.019293786957859993, 0.10526402294635773, 0.3248504400253296, 0.051577191799879074, 0.0637781023979187, 0.06913790851831436, -0.07243417203426361, -0.012739891186356544, 0.07692787051200867, -0.07399267703294754, -0.05086638778448105, -0.243434876203537, -0.05998606979846954, 0.05078389495611191, 0.24700148403644562, 0.07308288663625717, -0.16134130954742432, 0.0008986752945929766, -0.011439106427133083, 0.08521606028079987, -0.04626011103391647, 0.0322880856692791, -0.08404198288917542, 0.1200389638543129, 0.07275348901748657, -0.0058552357368171215, -0.0873040109872818, 0.12195888161659241, -0.10724109411239624, 0.0876796543598175, -0.09462554007768631, -0.09865738451480865, 0.0666542574763298, 0.05992761626839638, -0.16221174597740173, 0.15806472301483154, -0.17556017637252808, 0.014829608611762524, -0.04447002336382866, 0.12315439432859421, 0.011494561098515987, -0.22782330214977264, -0.0643930733203888, -0.1609341949224472, -0.11255524307489395, 0.0574541836977005, -0.06104089692234993, 0.028881242498755455, -0.07837177067995071, 0.07504376769065857, 0.13231606781482697, 0.07632521539926529, 0.009415418840944767, 0.05014549940824509, 0.12495157122612, 0.06947515904903412, 0.18656273186206818, 0.3035963475704193, 0.0410495325922966, -0.12212543934583664, 0.06535711884498596, 0.11517854779958725, 0.031802862882614136, 0.021038608625531197, 0.11225494742393494, 0.0068795690312981606, -0.036063361912965775, 0.0239894799888134, 0.09039658308029175, 0.042630214244127274, -0.08618561923503876, 0.1341361403465271, 0.21517930924892426, 0.07200172543525696, -0.07004816085100174, 0.08466231822967529, 0.15664136409759521, 0.038098908960819244, 0.0006191818392835557, -0.14237511157989502, 0.054347097873687744, 0.04012613743543625, -0.080735944211483, 0.1108228787779808, -0.15268918871879578, 0.017233338207006454, 0.07377304136753082, 0.029755065217614174, -0.01720057614147663, -0.04752601310610771, 0.042124200612306595, 0.117930568754673, 0.025980941951274872, -0.07431191205978394, -0.07547079771757126, 0.0634840726852417, -0.13926774263381958, -0.037373725324869156, 0.06553352624177933, 0.1022992879152298, 0.0758320689201355, 0.07351283729076385, 0.11390189826488495, -0.09821229428052902, 0.03380511328577995, -0.08013667911291122, -0.001701820408925414, -0.25508251786231995, -0.028721218928694725, 0.2468760907649994, 0.05658067390322685, -0.005578133277595043, -0.039217013865709305, 0.09184910356998444, -0.12642282247543335, 0.06971008330583572, -0.050198234617710114, -0.061106882989406586, -0.04355587065219879, 0.16555069386959076, 0.017727704718708992, 0.15299245715141296, 0.12834616005420685, 0.14459185302257538, 0.03393683210015297, -0.045801449567079544, 0.05008404701948166, 0.12372229248285294, 0.04524993523955345, 0.17421221733093262, -0.1506914645433426, -0.12127919495105743, -0.3253590762615204, 0.06111764907836914, 0.04220771789550781, 0.1457187831401825, 0.07413565367460251, 0.0020780167542397976, -0.001318712835200131, -0.041157107800245285, -0.19342400133609772, -0.04836665466427803, 0.18545657396316528, 0.1354581117630005, -0.06518987566232681, 0.02047295682132244, -2.380665672835816e-32, 0.00804539117962122, -0.03186425566673279, -0.031685542315244675, -0.033678047358989716, -0.08809435367584229, 0.06714840978384018, 0.048388563096523285, -0.12560848891735077, 0.10163910686969757, 0.003917919471859932, -0.17852605879306793, -0.07396265864372253, 0.06874063611030579, 0.0626070573925972, -0.08919305354356766, 0.012403041124343872, 0.012309703044593334, 0.016459999606013298, -0.15388166904449463, 0.01789887621998787, 0.17462697625160217, 0.00893654115498066, 0.17699800431728363, -0.0068434299901127815, -0.07355832308530807, 0.07880449295043945, -0.037937525659799576, -0.2961626350879669, -0.07730220258235931, -0.008822846226394176, -0.0876278430223465, 0.22550764679908752, -0.05123966932296753, 0.002227123361080885, -0.05753890052437782, -0.09658283740282059, 0.011522303335368633, -0.062705397605896, 0.037710122764110565, -0.11092007905244827, 0.034815724939107895, 0.17821107804775238, 0.15246173739433289, -0.017789790406823158, -0.011985288932919502, 0.16097299754619598, 0.025848092511296272, 0.11724157631397247, -0.02007962018251419, -0.020599544048309326, 0.02325720340013504, 0.0318010076880455, -0.028786586597561836, -0.02438482828438282, -0.01754533126950264, -0.2881152033805847, 0.030572226271033287, -0.02372942678630352, -0.1612158715724945, 0.009774870239198208, 0.05508469417691231, -0.07949280738830566, 0.09001019597053528, -0.02633528970181942, 0.03158452734351158, -0.022832904011011124, 0.3494112193584442, 0.024621568620204926, 0.09193016588687897, -0.15071362257003784, 0.06299065798521042, -0.0029671064112335443, -0.18733981251716614, 0.01657530479133129, -0.07538136839866638, -0.026917265728116035, -0.08712779730558395, -0.0554308220744133, -0.0023356289602816105, -0.11366736888885498, -0.015325566753745079, 0.09234433621168137, 0.11180993169546127, 0.04354355111718178, -0.08379174023866653, -0.08124527335166931, 0.11203723400831223, -0.015587928704917431, -0.06506197154521942, -0.1321379542350769, -0.019885960966348648, 0.11189421266317368, -0.21882767975330353, 0.04296732321381569, -0.13447284698486328, -0.09211121499538422, -0.01345878466963768, 0.08666222542524338, -0.1618514060974121, -0.05813165754079819, -0.04540732502937317, -0.08320825546979904, 0.049763940274715424, 0.1140015721321106, 0.21548199653625488, -0.04873232915997505, 0.05314658582210541, -0.02707142010331154, -0.17496465146541595, 0.007041123695671558, -0.09322693943977356, 0.05252727121114731, 0.12365873903036118, 0.013814356178045273, 0.26304012537002563, -0.051909055560827255, -0.02029169164597988, -0.15955694019794464, 0.07111692428588867, 0.2502821981906891, -0.057577479630708694, -0.031261149793863297, -0.046233098953962326, -0.06954601407051086, 0.10296864062547684, 0.10074054449796677, -0.19894272089004517, -0.009531785733997822, 0.040233805775642395, -0.03175259009003639, 0.14036180078983307, -0.06785999238491058, 7.495020781789208e-7, 0.0059760198928415775, 0.0730656310915947, 0.06240839883685112, -0.13256245851516724, -0.09579396992921829, 0.15301427245140076, -0.21366414427757263, 0.0813998207449913, 0.10310570895671844, 0.16223128139972687, 0.0431327298283577, -0.14711998403072357, 0.014924793504178524, -0.0735122486948967, 0.005546296946704388, -0.06981898099184036, -0.12561190128326416, 0.14726123213768005, 0.004693268798291683, 0.07061006128787994, -0.08188484609127045, -0.024097494781017303, 0.1887701451778412, -0.06961384415626526, -0.008710703812539577, 0.13066136837005615, -0.07139185816049576, -0.004279129207134247, 0.03439377620816231, -0.027933118864893913, 0.09492919594049454, 0.0036284250672906637, 0.13881132006645203, 0.15072225034236908, -0.057981375604867935, 0.13647671043872833, -0.08102063089609146, 0.07579527050256729, -0.004538116045296192, -0.06889446824789047, -0.11841833591461182, 0.11128376424312592, 0.07897937297821045, -0.1546695977449417, 0.13022249937057495, -0.09063603729009628, -0.05624060332775116, -0.09812483936548233, -0.14620444178581238, 0.19987931847572327, 0.08967079967260361, 0.164496511220932, -0.03446348011493683, 0.30111163854599, -0.06864169985055923, 0.07865966856479645, -0.10048066824674606, -0.22562767565250397, 0.1585617959499359, -0.13826613128185272, -0.1701662242412567, -0.07075236737728119, -0.04322228580713272, 0.07906660437583923, -0.07075247168540955, -0.14740504324436188, -0.14911937713623047, 1.3148810041528144e-34, 0.03084416128695011, -0.03832034021615982, 0.0007571097230538726, -0.10299127548933029, -0.09319563955068588, -0.10662496089935303, 0.21076728403568268, 0.173990398645401, -0.018077651038765907, -0.07614430785179138, -0.07029768824577332 ]
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.05370331555604935, 0.09016449004411697, -0.06694222241640091, -0.16696515679359436, 0.16806840896606445, -0.11115274578332901, 0.14727525413036346, 0.07534642517566681, 0.09735727310180664, 0.07620877027511597, 0.05280112475156784, 0.10683634877204895, 0.01741383783519268, 0.13247166574001312, 0.03817718103528023, 0.02339528501033783, 0.05064952373504639, -0.04816356301307678, -0.10362361371517181, 0.03390316292643547, -0.15233592689037323, 0.1388334184885025, 0.1404346078634262, 0.23517337441444397, -0.1008652001619339, -0.18864615261554718, -0.10564950853586197, 0.14941303431987762, -0.04289303719997406, -0.009509672410786152, -0.05374997481703758, 0.04360440745949745, 0.028284698724746704, 0.0583784282207489, 0.000005208831225900212, -0.050401702523231506, 0.104510098695755, -0.048195041716098785, -0.02844415046274662, -0.020725427195429802, 0.09616108983755112, -0.037768248468637466, 0.07536747306585312, -0.010927136987447739, -0.09437023848295212, 0.028243789449334145, -0.06571900844573975, 0.0002415525377728045, 0.24271558225154877, 0.05466814711689949, -0.04502186179161072, -0.06068415939807892, -0.1109086275100708, -0.05912012979388237, -0.03442490100860596, -0.031064672395586967, 0.1612328588962555, 0.08856850117444992, -0.24361015856266022, -0.2590726912021637, -0.009002762846648693, -0.14801108837127686, -0.10901753604412079, -0.1478394716978073, -0.14203114807605743, -0.047129034996032715, -0.18981415033340454, -0.03644374758005142, -0.08622647821903229, 0.03005240485072136, -0.09184026718139648, -0.09458234161138535, -0.1372210532426834, 0.037482116371393204, -0.0960608422756195, -0.04727545380592346, -0.015766680240631104, -0.03321343660354614, 0.024577397853136063, 0.1695745438337326, 0.05971729755401611, 0.04643610492348671, 0.07566974312067032, -0.04009595513343811, -0.178714781999588, 0.06423065066337585, -0.10037796944379807, 0.14396396279335022, -0.05216943100094795, -0.10381440818309784, -0.02167399972677231, -0.05501318722963333, -0.028559919446706772, -0.07163837552070618, 0.006036486942321062, -0.03758072480559349, -0.06542310118675232, -0.18678779900074005, -0.023356197401881218, 0.14444881677627563, -0.13188888132572174, -0.12904316186904907, -0.05970335006713867, 0.09864385426044464, 0.02939266338944435, -0.05654362589120865, -0.0445367768406868, 0.27738067507743835, 0.0042129396460950375, -0.0771106407046318, -0.21645519137382507, 0.0996897742152214, -0.0888763964176178, -0.00909474492073059, 0.14938002824783325, 0.07293935865163803, -0.06302700936794281, 0.12495523691177368, 0.01729467511177063, 0.14648988842964172, -0.07575032114982605, 0.07484117895364761, -0.03686327487230301, -0.08959474414587021, 0.03329155966639519, -0.0016318646958097816, 0.11256963014602661, 0.08309721946716309, 0.009348176419734955, -0.034425631165504456, -0.05989198014140129, 0.009298941120505333, -0.03460659459233284, 0.009187386371195316, 0.09760359674692154, -0.027531130239367485, 0.022174401208758354, -0.1750277578830719, 0.015570275485515594, -0.16166052222251892, 0.15597127377986908, -0.12683770060539246, -0.0017097399104386568, -0.01410053949803114, 0.10691247135400772, 0.18241597712039948, 0.07712101936340332, -0.21815750002861023, -0.06891164928674698, -0.07064925134181976, -0.12562142312526703, 0.0925038754940033, -0.1883210837841034, 0.0697791576385498, -0.1958611160516739, 0.07628866285085678, -0.1206243708729744, -0.06591959297657013, -0.19956758618354797, -0.05927634984254837, 0.10347376018762589, -0.01730123721063137, 0.07507899403572083, -0.1601780503988266, 0.08336607366800308, 0.08428459614515305, -0.08679086714982986, 0.12722598016262054, -0.006392862182110548, -0.00985303707420826, 0.27684667706489563, -0.021756961941719055, -0.09421160817146301, -0.03357340022921562, -0.15440256893634796, 0.40206819772720337, -0.12825964391231537, 0.03976142778992653, -0.20624150335788727, -0.13163018226623535, 0.04949819669127464, -0.08629445731639862, -0.03946727141737938, -0.3293612599372864, 0.03970974311232567, -0.01980005018413067, -0.06375963985919952, 0.12267419695854187, 0.012485062703490257, -0.1070738211274147, -0.08878441154956818, 0.053729232400655746, 0.015392238274216652, -0.21672029793262482, 0.11786313354969025, -0.011209958232939243, -0.08173803240060806, -0.024956725537776947, 0.02022874355316162, -0.2084949016571045, 0.01435016468167305, -0.18735326826572418, 0.07004866003990173, 0.0277408380061388, 0.023806726559996605, -0.06063483655452728, -0.1709112823009491, 0.04363327473402023, 0.004188064485788345, -0.08687306195497513, -0.15379050374031067, 0.11203866451978683, -0.022778958082199097, 0.01731429621577263, -0.20187096297740936, -0.09340926259756088, 0.07683860510587692, -0.017292162403464317, 0.042175982147455215, 0.1520875096321106, -0.023728245869278908, -0.07287102937698364, 0.12211762368679047, 0.07058419287204742, 0.16471204161643982, 0.15207184851169586, -0.028959333896636963, -0.10925949364900589, 0.005152047146111727, 0.06489941477775574, -0.00918718334287405, -0.031028077006340027, 0.16326069831848145, 0.1680426001548767, 0.03006613813340664, -0.03357260301709175, 0.03831159323453903, -0.20055411756038666, -0.017101990059018135, 0.1226145476102829, -0.20970980823040009, 0.1095525398850441, -0.12525515258312225, -0.1340814083814621, 0.058996543288230896, 0.1704626828432083, 0.22906100749969482, 0.19933614134788513, -0.1311570554971695, 0.033897776156663895, 0.12409887462854385, 0.025458646938204765, -0.1652226746082306, 0.01569800078868866, -0.12158522754907608, -0.20786209404468536, 0.09426749497652054, -0.008346544578671455, 0.038308754563331604, -0.12583516538143158, 0.21124611794948578, -0.07142540067434311, 0.05713391304016113, -0.09890681505203247, 0.13523930311203003, -0.115238256752491, 0.08497539162635803, -0.04713338240981102, -0.026684198528528214, 0.08405373990535736, 0.09882160276174545, -0.04973987862467766, -0.052681367844343185, -0.05729810893535614, -0.08075825124979019, -0.07715031504631042, 0.05714881420135498, -0.008103625848889351, 0.07561811059713364, 0.045625731348991394, -0.19077254831790924, 0.0791667103767395, 0.1283460557460785, -0.043776270002126694, 0.06917370855808258, 0.1051005944609642, -0.15869848430156708, 0.24275006353855133, -0.2347393035888672, -0.05254844203591347, 0.00981190986931324, -0.0732087790966034, 0.02995040826499462, -0.09098679572343826, -0.05482763797044754, -0.03303905203938484, -0.014820101670920849, -0.17967069149017334, -0.05550985783338547, -0.07600203901529312, -0.08401031792163849, 0.03190955892205238, 0.02933652326464653, -0.07340794801712036, 0.01672920025885105, 0.04288711026310921, 0.11270526796579361, 0.3252256214618683, -0.2239973545074463, -0.09095628559589386, -0.039403703063726425, 0.006640837527811527, -0.003683242714032531, 0.1371079832315445, 0.1092490553855896, -0.13670165836811066, -0.05284078046679497, -0.17102302610874176, 0.16918660700321198, 0.020481813699007034, -0.04819118604063988, -0.010959678329527378, -0.06387414038181305, -0.05094245821237564, -0.007112898398190737, -0.009171154350042343, -0.11098194122314453, -0.1855107545852661, 0.09485208988189697, -0.04511948674917221, -0.031612373888492584, 0.2806595265865326, 0.03794143348932266, -0.06029629707336426, -0.046975623816251755, -0.15482129156589508, -0.1323886513710022, 0.10363319516181946, 0.1867906004190445, 0.018064871430397034, -0.08906931430101395, -0.03214400261640549, -0.08599170297384262, 0.12203213572502136, 0.06483124941587448, -0.07134705781936646, 0.06679642200469971, 0.0373433381319046, -0.0533951036632061, -0.007225906942039728, -0.025120602920651436, 0.14180594682693481, -0.07590588927268982, -0.1359693855047226, 0.005644829478114843, 0.061978843063116074, -0.1193789690732956, 0.22773072123527527, -0.15266555547714233, 0.20651587843894958, -0.009426030330359936, 0.1022682636976242, 0.2352871149778366, -0.061535272747278214, -0.05675892159342766, 0.053611062467098236, 0.15156352519989014, -0.08894472569227219, -0.013904104009270668, -0.19908954203128815, 0.19738557934761047, -0.06026501581072807, -0.24988536536693573, -0.1136869266629219, -0.05591108277440071, -0.021789368242025375, 0.02133600227534771, -0.11704492568969727, 0.037148188799619675, -0.11769336462020874, 0.09839660674333572, -0.05897645279765129, -0.058661721646785736, 0.17377257347106934, 0.1543327420949936, 0.09152868390083313, 0.03866461291909218, 0.11577708274126053, -0.13411617279052734, 0.23825740814208984, 0.1559542864561081, -0.17257198691368103, 0.045498237013816833, -0.1803400218486786, 0.038077179342508316, -0.10258045047521591, 0.10612247884273529, 0.024620337411761284, 0.005610935855656862, 0.038350801914930344, 0.21537581086158752, 0.14207151532173157, -0.05385016277432442, 0.10605423152446747, 0.2177080512046814, -0.010225743055343628, 0.10987994819879532, -0.15795229375362396, 0.15224581956863403, -0.019293786957859993, 0.10526402294635773, 0.3248504400253296, 0.051577191799879074, 0.0637781023979187, 0.06913790851831436, -0.07243417203426361, -0.012739891186356544, 0.07692787051200867, -0.07399267703294754, -0.05086638778448105, -0.243434876203537, -0.05998606979846954, 0.05078389495611191, 0.24700148403644562, 0.07308288663625717, -0.16134130954742432, 0.0008986752945929766, -0.011439106427133083, 0.08521606028079987, -0.04626011103391647, 0.0322880856692791, -0.08404198288917542, 0.1200389638543129, 0.07275348901748657, -0.0058552357368171215, -0.0873040109872818, 0.12195888161659241, -0.10724109411239624, 0.0876796543598175, -0.09462554007768631, -0.09865738451480865, 0.0666542574763298, 0.05992761626839638, -0.16221174597740173, 0.15806472301483154, -0.17556017637252808, 0.014829608611762524, -0.04447002336382866, 0.12315439432859421, 0.011494561098515987, -0.22782330214977264, -0.0643930733203888, -0.1609341949224472, -0.11255524307489395, 0.0574541836977005, -0.06104089692234993, 0.028881242498755455, -0.07837177067995071, 0.07504376769065857, 0.13231606781482697, 0.07632521539926529, 0.009415418840944767, 0.05014549940824509, 0.12495157122612, 0.06947515904903412, 0.18656273186206818, 0.3035963475704193, 0.0410495325922966, -0.12212543934583664, 0.06535711884498596, 0.11517854779958725, 0.031802862882614136, 0.021038608625531197, 0.11225494742393494, 0.0068795690312981606, -0.036063361912965775, 0.0239894799888134, 0.09039658308029175, 0.042630214244127274, -0.08618561923503876, 0.1341361403465271, 0.21517930924892426, 0.07200172543525696, -0.07004816085100174, 0.08466231822967529, 0.15664136409759521, 0.038098908960819244, 0.0006191818392835557, -0.14237511157989502, 0.054347097873687744, 0.04012613743543625, -0.080735944211483, 0.1108228787779808, -0.15268918871879578, 0.017233338207006454, 0.07377304136753082, 0.029755065217614174, -0.01720057614147663, -0.04752601310610771, 0.042124200612306595, 0.117930568754673, 0.025980941951274872, -0.07431191205978394, -0.07547079771757126, 0.0634840726852417, -0.13926774263381958, -0.037373725324869156, 0.06553352624177933, 0.1022992879152298, 0.0758320689201355, 0.07351283729076385, 0.11390189826488495, -0.09821229428052902, 0.03380511328577995, -0.08013667911291122, -0.001701820408925414, -0.25508251786231995, -0.028721218928694725, 0.2468760907649994, 0.05658067390322685, -0.005578133277595043, -0.039217013865709305, 0.09184910356998444, -0.12642282247543335, 0.06971008330583572, -0.050198234617710114, -0.061106882989406586, -0.04355587065219879, 0.16555069386959076, 0.017727704718708992, 0.15299245715141296, 0.12834616005420685, 0.14459185302257538, 0.03393683210015297, -0.045801449567079544, 0.05008404701948166, 0.12372229248285294, 0.04524993523955345, 0.17421221733093262, -0.1506914645433426, -0.12127919495105743, -0.3253590762615204, 0.06111764907836914, 0.04220771789550781, 0.1457187831401825, 0.07413565367460251, 0.0020780167542397976, -0.001318712835200131, -0.041157107800245285, -0.19342400133609772, -0.04836665466427803, 0.18545657396316528, 0.1354581117630005, -0.06518987566232681, 0.02047295682132244, -2.380665672835816e-32, 0.00804539117962122, -0.03186425566673279, -0.031685542315244675, -0.033678047358989716, -0.08809435367584229, 0.06714840978384018, 0.048388563096523285, -0.12560848891735077, 0.10163910686969757, 0.003917919471859932, -0.17852605879306793, -0.07396265864372253, 0.06874063611030579, 0.0626070573925972, -0.08919305354356766, 0.012403041124343872, 0.012309703044593334, 0.016459999606013298, -0.15388166904449463, 0.01789887621998787, 0.17462697625160217, 0.00893654115498066, 0.17699800431728363, -0.0068434299901127815, -0.07355832308530807, 0.07880449295043945, -0.037937525659799576, -0.2961626350879669, -0.07730220258235931, -0.008822846226394176, -0.0876278430223465, 0.22550764679908752, -0.05123966932296753, 0.002227123361080885, -0.05753890052437782, -0.09658283740282059, 0.011522303335368633, -0.062705397605896, 0.037710122764110565, -0.11092007905244827, 0.034815724939107895, 0.17821107804775238, 0.15246173739433289, -0.017789790406823158, -0.011985288932919502, 0.16097299754619598, 0.025848092511296272, 0.11724157631397247, -0.02007962018251419, -0.020599544048309326, 0.02325720340013504, 0.0318010076880455, -0.028786586597561836, -0.02438482828438282, -0.01754533126950264, -0.2881152033805847, 0.030572226271033287, -0.02372942678630352, -0.1612158715724945, 0.009774870239198208, 0.05508469417691231, -0.07949280738830566, 0.09001019597053528, -0.02633528970181942, 0.03158452734351158, -0.022832904011011124, 0.3494112193584442, 0.024621568620204926, 0.09193016588687897, -0.15071362257003784, 0.06299065798521042, -0.0029671064112335443, -0.18733981251716614, 0.01657530479133129, -0.07538136839866638, -0.026917265728116035, -0.08712779730558395, -0.0554308220744133, -0.0023356289602816105, -0.11366736888885498, -0.015325566753745079, 0.09234433621168137, 0.11180993169546127, 0.04354355111718178, -0.08379174023866653, -0.08124527335166931, 0.11203723400831223, -0.015587928704917431, -0.06506197154521942, -0.1321379542350769, -0.019885960966348648, 0.11189421266317368, -0.21882767975330353, 0.04296732321381569, -0.13447284698486328, -0.09211121499538422, -0.01345878466963768, 0.08666222542524338, -0.1618514060974121, -0.05813165754079819, -0.04540732502937317, -0.08320825546979904, 0.049763940274715424, 0.1140015721321106, 0.21548199653625488, -0.04873232915997505, 0.05314658582210541, -0.02707142010331154, -0.17496465146541595, 0.007041123695671558, -0.09322693943977356, 0.05252727121114731, 0.12365873903036118, 0.013814356178045273, 0.26304012537002563, -0.051909055560827255, -0.02029169164597988, -0.15955694019794464, 0.07111692428588867, 0.2502821981906891, -0.057577479630708694, -0.031261149793863297, -0.046233098953962326, -0.06954601407051086, 0.10296864062547684, 0.10074054449796677, -0.19894272089004517, -0.009531785733997822, 0.040233805775642395, -0.03175259009003639, 0.14036180078983307, -0.06785999238491058, 7.495020781789208e-7, 0.0059760198928415775, 0.0730656310915947, 0.06240839883685112, -0.13256245851516724, -0.09579396992921829, 0.15301427245140076, -0.21366414427757263, 0.0813998207449913, 0.10310570895671844, 0.16223128139972687, 0.0431327298283577, -0.14711998403072357, 0.014924793504178524, -0.0735122486948967, 0.005546296946704388, -0.06981898099184036, -0.12561190128326416, 0.14726123213768005, 0.004693268798291683, 0.07061006128787994, -0.08188484609127045, -0.024097494781017303, 0.1887701451778412, -0.06961384415626526, -0.008710703812539577, 0.13066136837005615, -0.07139185816049576, -0.004279129207134247, 0.03439377620816231, -0.027933118864893913, 0.09492919594049454, 0.0036284250672906637, 0.13881132006645203, 0.15072225034236908, -0.057981375604867935, 0.13647671043872833, -0.08102063089609146, 0.07579527050256729, -0.004538116045296192, -0.06889446824789047, -0.11841833591461182, 0.11128376424312592, 0.07897937297821045, -0.1546695977449417, 0.13022249937057495, -0.09063603729009628, -0.05624060332775116, -0.09812483936548233, -0.14620444178581238, 0.19987931847572327, 0.08967079967260361, 0.164496511220932, -0.03446348011493683, 0.30111163854599, -0.06864169985055923, 0.07865966856479645, -0.10048066824674606, -0.22562767565250397, 0.1585617959499359, -0.13826613128185272, -0.1701662242412567, -0.07075236737728119, -0.04322228580713272, 0.07906660437583923, -0.07075247168540955, -0.14740504324436188, -0.14911937713623047, 1.3148810041528144e-34, 0.03084416128695011, -0.03832034021615982, 0.0007571097230538726, -0.10299127548933029, -0.09319563955068588, -0.10662496089935303, 0.21076728403568268, 0.173990398645401, -0.018077651038765907, -0.07614430785179138, -0.07029768824577332 ]
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.05370331555604935, 0.09016449004411697, -0.06694222241640091, -0.16696515679359436, 0.16806840896606445, -0.11115274578332901, 0.14727525413036346, 0.07534642517566681, 0.09735727310180664, 0.07620877027511597, 0.05280112475156784, 0.10683634877204895, 0.01741383783519268, 0.13247166574001312, 0.03817718103528023, 0.02339528501033783, 0.05064952373504639, -0.04816356301307678, -0.10362361371517181, 0.03390316292643547, -0.15233592689037323, 0.1388334184885025, 0.1404346078634262, 0.23517337441444397, -0.1008652001619339, -0.18864615261554718, -0.10564950853586197, 0.14941303431987762, -0.04289303719997406, -0.009509672410786152, -0.05374997481703758, 0.04360440745949745, 0.028284698724746704, 0.0583784282207489, 0.000005208831225900212, -0.050401702523231506, 0.104510098695755, -0.048195041716098785, -0.02844415046274662, -0.020725427195429802, 0.09616108983755112, -0.037768248468637466, 0.07536747306585312, -0.010927136987447739, -0.09437023848295212, 0.028243789449334145, -0.06571900844573975, 0.0002415525377728045, 0.24271558225154877, 0.05466814711689949, -0.04502186179161072, -0.06068415939807892, -0.1109086275100708, -0.05912012979388237, -0.03442490100860596, -0.031064672395586967, 0.1612328588962555, 0.08856850117444992, -0.24361015856266022, -0.2590726912021637, -0.009002762846648693, -0.14801108837127686, -0.10901753604412079, -0.1478394716978073, -0.14203114807605743, -0.047129034996032715, -0.18981415033340454, -0.03644374758005142, -0.08622647821903229, 0.03005240485072136, -0.09184026718139648, -0.09458234161138535, -0.1372210532426834, 0.037482116371393204, -0.0960608422756195, -0.04727545380592346, -0.015766680240631104, -0.03321343660354614, 0.024577397853136063, 0.1695745438337326, 0.05971729755401611, 0.04643610492348671, 0.07566974312067032, -0.04009595513343811, -0.178714781999588, 0.06423065066337585, -0.10037796944379807, 0.14396396279335022, -0.05216943100094795, -0.10381440818309784, -0.02167399972677231, -0.05501318722963333, -0.028559919446706772, -0.07163837552070618, 0.006036486942321062, -0.03758072480559349, -0.06542310118675232, -0.18678779900074005, -0.023356197401881218, 0.14444881677627563, -0.13188888132572174, -0.12904316186904907, -0.05970335006713867, 0.09864385426044464, 0.02939266338944435, -0.05654362589120865, -0.0445367768406868, 0.27738067507743835, 0.0042129396460950375, -0.0771106407046318, -0.21645519137382507, 0.0996897742152214, -0.0888763964176178, -0.00909474492073059, 0.14938002824783325, 0.07293935865163803, -0.06302700936794281, 0.12495523691177368, 0.01729467511177063, 0.14648988842964172, -0.07575032114982605, 0.07484117895364761, -0.03686327487230301, -0.08959474414587021, 0.03329155966639519, -0.0016318646958097816, 0.11256963014602661, 0.08309721946716309, 0.009348176419734955, -0.034425631165504456, -0.05989198014140129, 0.009298941120505333, -0.03460659459233284, 0.009187386371195316, 0.09760359674692154, -0.027531130239367485, 0.022174401208758354, -0.1750277578830719, 0.015570275485515594, -0.16166052222251892, 0.15597127377986908, -0.12683770060539246, -0.0017097399104386568, -0.01410053949803114, 0.10691247135400772, 0.18241597712039948, 0.07712101936340332, -0.21815750002861023, -0.06891164928674698, -0.07064925134181976, -0.12562142312526703, 0.0925038754940033, -0.1883210837841034, 0.0697791576385498, -0.1958611160516739, 0.07628866285085678, -0.1206243708729744, -0.06591959297657013, -0.19956758618354797, -0.05927634984254837, 0.10347376018762589, -0.01730123721063137, 0.07507899403572083, -0.1601780503988266, 0.08336607366800308, 0.08428459614515305, -0.08679086714982986, 0.12722598016262054, -0.006392862182110548, -0.00985303707420826, 0.27684667706489563, -0.021756961941719055, -0.09421160817146301, -0.03357340022921562, -0.15440256893634796, 0.40206819772720337, -0.12825964391231537, 0.03976142778992653, -0.20624150335788727, -0.13163018226623535, 0.04949819669127464, -0.08629445731639862, -0.03946727141737938, -0.3293612599372864, 0.03970974311232567, -0.01980005018413067, -0.06375963985919952, 0.12267419695854187, 0.012485062703490257, -0.1070738211274147, -0.08878441154956818, 0.053729232400655746, 0.015392238274216652, -0.21672029793262482, 0.11786313354969025, -0.011209958232939243, -0.08173803240060806, -0.024956725537776947, 0.02022874355316162, -0.2084949016571045, 0.01435016468167305, -0.18735326826572418, 0.07004866003990173, 0.0277408380061388, 0.023806726559996605, -0.06063483655452728, -0.1709112823009491, 0.04363327473402023, 0.004188064485788345, -0.08687306195497513, -0.15379050374031067, 0.11203866451978683, -0.022778958082199097, 0.01731429621577263, -0.20187096297740936, -0.09340926259756088, 0.07683860510587692, -0.017292162403464317, 0.042175982147455215, 0.1520875096321106, -0.023728245869278908, -0.07287102937698364, 0.12211762368679047, 0.07058419287204742, 0.16471204161643982, 0.15207184851169586, -0.028959333896636963, -0.10925949364900589, 0.005152047146111727, 0.06489941477775574, -0.00918718334287405, -0.031028077006340027, 0.16326069831848145, 0.1680426001548767, 0.03006613813340664, -0.03357260301709175, 0.03831159323453903, -0.20055411756038666, -0.017101990059018135, 0.1226145476102829, -0.20970980823040009, 0.1095525398850441, -0.12525515258312225, -0.1340814083814621, 0.058996543288230896, 0.1704626828432083, 0.22906100749969482, 0.19933614134788513, -0.1311570554971695, 0.033897776156663895, 0.12409887462854385, 0.025458646938204765, -0.1652226746082306, 0.01569800078868866, -0.12158522754907608, -0.20786209404468536, 0.09426749497652054, -0.008346544578671455, 0.038308754563331604, -0.12583516538143158, 0.21124611794948578, -0.07142540067434311, 0.05713391304016113, -0.09890681505203247, 0.13523930311203003, -0.115238256752491, 0.08497539162635803, -0.04713338240981102, -0.026684198528528214, 0.08405373990535736, 0.09882160276174545, -0.04973987862467766, -0.052681367844343185, -0.05729810893535614, -0.08075825124979019, -0.07715031504631042, 0.05714881420135498, -0.008103625848889351, 0.07561811059713364, 0.045625731348991394, -0.19077254831790924, 0.0791667103767395, 0.1283460557460785, -0.043776270002126694, 0.06917370855808258, 0.1051005944609642, -0.15869848430156708, 0.24275006353855133, -0.2347393035888672, -0.05254844203591347, 0.00981190986931324, -0.0732087790966034, 0.02995040826499462, -0.09098679572343826, -0.05482763797044754, -0.03303905203938484, -0.014820101670920849, -0.17967069149017334, -0.05550985783338547, -0.07600203901529312, -0.08401031792163849, 0.03190955892205238, 0.02933652326464653, -0.07340794801712036, 0.01672920025885105, 0.04288711026310921, 0.11270526796579361, 0.3252256214618683, -0.2239973545074463, -0.09095628559589386, -0.039403703063726425, 0.006640837527811527, -0.003683242714032531, 0.1371079832315445, 0.1092490553855896, -0.13670165836811066, -0.05284078046679497, -0.17102302610874176, 0.16918660700321198, 0.020481813699007034, -0.04819118604063988, -0.010959678329527378, -0.06387414038181305, -0.05094245821237564, -0.007112898398190737, -0.009171154350042343, -0.11098194122314453, -0.1855107545852661, 0.09485208988189697, -0.04511948674917221, -0.031612373888492584, 0.2806595265865326, 0.03794143348932266, -0.06029629707336426, -0.046975623816251755, -0.15482129156589508, -0.1323886513710022, 0.10363319516181946, 0.1867906004190445, 0.018064871430397034, -0.08906931430101395, -0.03214400261640549, -0.08599170297384262, 0.12203213572502136, 0.06483124941587448, -0.07134705781936646, 0.06679642200469971, 0.0373433381319046, -0.0533951036632061, -0.007225906942039728, -0.025120602920651436, 0.14180594682693481, -0.07590588927268982, -0.1359693855047226, 0.005644829478114843, 0.061978843063116074, -0.1193789690732956, 0.22773072123527527, -0.15266555547714233, 0.20651587843894958, -0.009426030330359936, 0.1022682636976242, 0.2352871149778366, -0.061535272747278214, -0.05675892159342766, 0.053611062467098236, 0.15156352519989014, -0.08894472569227219, -0.013904104009270668, -0.19908954203128815, 0.19738557934761047, -0.06026501581072807, -0.24988536536693573, -0.1136869266629219, -0.05591108277440071, -0.021789368242025375, 0.02133600227534771, -0.11704492568969727, 0.037148188799619675, -0.11769336462020874, 0.09839660674333572, -0.05897645279765129, -0.058661721646785736, 0.17377257347106934, 0.1543327420949936, 0.09152868390083313, 0.03866461291909218, 0.11577708274126053, -0.13411617279052734, 0.23825740814208984, 0.1559542864561081, -0.17257198691368103, 0.045498237013816833, -0.1803400218486786, 0.038077179342508316, -0.10258045047521591, 0.10612247884273529, 0.024620337411761284, 0.005610935855656862, 0.038350801914930344, 0.21537581086158752, 0.14207151532173157, -0.05385016277432442, 0.10605423152446747, 0.2177080512046814, -0.010225743055343628, 0.10987994819879532, -0.15795229375362396, 0.15224581956863403, -0.019293786957859993, 0.10526402294635773, 0.3248504400253296, 0.051577191799879074, 0.0637781023979187, 0.06913790851831436, -0.07243417203426361, -0.012739891186356544, 0.07692787051200867, -0.07399267703294754, -0.05086638778448105, -0.243434876203537, -0.05998606979846954, 0.05078389495611191, 0.24700148403644562, 0.07308288663625717, -0.16134130954742432, 0.0008986752945929766, -0.011439106427133083, 0.08521606028079987, -0.04626011103391647, 0.0322880856692791, -0.08404198288917542, 0.1200389638543129, 0.07275348901748657, -0.0058552357368171215, -0.0873040109872818, 0.12195888161659241, -0.10724109411239624, 0.0876796543598175, -0.09462554007768631, -0.09865738451480865, 0.0666542574763298, 0.05992761626839638, -0.16221174597740173, 0.15806472301483154, -0.17556017637252808, 0.014829608611762524, -0.04447002336382866, 0.12315439432859421, 0.011494561098515987, -0.22782330214977264, -0.0643930733203888, -0.1609341949224472, -0.11255524307489395, 0.0574541836977005, -0.06104089692234993, 0.028881242498755455, -0.07837177067995071, 0.07504376769065857, 0.13231606781482697, 0.07632521539926529, 0.009415418840944767, 0.05014549940824509, 0.12495157122612, 0.06947515904903412, 0.18656273186206818, 0.3035963475704193, 0.0410495325922966, -0.12212543934583664, 0.06535711884498596, 0.11517854779958725, 0.031802862882614136, 0.021038608625531197, 0.11225494742393494, 0.0068795690312981606, -0.036063361912965775, 0.0239894799888134, 0.09039658308029175, 0.042630214244127274, -0.08618561923503876, 0.1341361403465271, 0.21517930924892426, 0.07200172543525696, -0.07004816085100174, 0.08466231822967529, 0.15664136409759521, 0.038098908960819244, 0.0006191818392835557, -0.14237511157989502, 0.054347097873687744, 0.04012613743543625, -0.080735944211483, 0.1108228787779808, -0.15268918871879578, 0.017233338207006454, 0.07377304136753082, 0.029755065217614174, -0.01720057614147663, -0.04752601310610771, 0.042124200612306595, 0.117930568754673, 0.025980941951274872, -0.07431191205978394, -0.07547079771757126, 0.0634840726852417, -0.13926774263381958, -0.037373725324869156, 0.06553352624177933, 0.1022992879152298, 0.0758320689201355, 0.07351283729076385, 0.11390189826488495, -0.09821229428052902, 0.03380511328577995, -0.08013667911291122, -0.001701820408925414, -0.25508251786231995, -0.028721218928694725, 0.2468760907649994, 0.05658067390322685, -0.005578133277595043, -0.039217013865709305, 0.09184910356998444, -0.12642282247543335, 0.06971008330583572, -0.050198234617710114, -0.061106882989406586, -0.04355587065219879, 0.16555069386959076, 0.017727704718708992, 0.15299245715141296, 0.12834616005420685, 0.14459185302257538, 0.03393683210015297, -0.045801449567079544, 0.05008404701948166, 0.12372229248285294, 0.04524993523955345, 0.17421221733093262, -0.1506914645433426, -0.12127919495105743, -0.3253590762615204, 0.06111764907836914, 0.04220771789550781, 0.1457187831401825, 0.07413565367460251, 0.0020780167542397976, -0.001318712835200131, -0.041157107800245285, -0.19342400133609772, -0.04836665466427803, 0.18545657396316528, 0.1354581117630005, -0.06518987566232681, 0.02047295682132244, -2.380665672835816e-32, 0.00804539117962122, -0.03186425566673279, -0.031685542315244675, -0.033678047358989716, -0.08809435367584229, 0.06714840978384018, 0.048388563096523285, -0.12560848891735077, 0.10163910686969757, 0.003917919471859932, -0.17852605879306793, -0.07396265864372253, 0.06874063611030579, 0.0626070573925972, -0.08919305354356766, 0.012403041124343872, 0.012309703044593334, 0.016459999606013298, -0.15388166904449463, 0.01789887621998787, 0.17462697625160217, 0.00893654115498066, 0.17699800431728363, -0.0068434299901127815, -0.07355832308530807, 0.07880449295043945, -0.037937525659799576, -0.2961626350879669, -0.07730220258235931, -0.008822846226394176, -0.0876278430223465, 0.22550764679908752, -0.05123966932296753, 0.002227123361080885, -0.05753890052437782, -0.09658283740282059, 0.011522303335368633, -0.062705397605896, 0.037710122764110565, -0.11092007905244827, 0.034815724939107895, 0.17821107804775238, 0.15246173739433289, -0.017789790406823158, -0.011985288932919502, 0.16097299754619598, 0.025848092511296272, 0.11724157631397247, -0.02007962018251419, -0.020599544048309326, 0.02325720340013504, 0.0318010076880455, -0.028786586597561836, -0.02438482828438282, -0.01754533126950264, -0.2881152033805847, 0.030572226271033287, -0.02372942678630352, -0.1612158715724945, 0.009774870239198208, 0.05508469417691231, -0.07949280738830566, 0.09001019597053528, -0.02633528970181942, 0.03158452734351158, -0.022832904011011124, 0.3494112193584442, 0.024621568620204926, 0.09193016588687897, -0.15071362257003784, 0.06299065798521042, -0.0029671064112335443, -0.18733981251716614, 0.01657530479133129, -0.07538136839866638, -0.026917265728116035, -0.08712779730558395, -0.0554308220744133, -0.0023356289602816105, -0.11366736888885498, -0.015325566753745079, 0.09234433621168137, 0.11180993169546127, 0.04354355111718178, -0.08379174023866653, -0.08124527335166931, 0.11203723400831223, -0.015587928704917431, -0.06506197154521942, -0.1321379542350769, -0.019885960966348648, 0.11189421266317368, -0.21882767975330353, 0.04296732321381569, -0.13447284698486328, -0.09211121499538422, -0.01345878466963768, 0.08666222542524338, -0.1618514060974121, -0.05813165754079819, -0.04540732502937317, -0.08320825546979904, 0.049763940274715424, 0.1140015721321106, 0.21548199653625488, -0.04873232915997505, 0.05314658582210541, -0.02707142010331154, -0.17496465146541595, 0.007041123695671558, -0.09322693943977356, 0.05252727121114731, 0.12365873903036118, 0.013814356178045273, 0.26304012537002563, -0.051909055560827255, -0.02029169164597988, -0.15955694019794464, 0.07111692428588867, 0.2502821981906891, -0.057577479630708694, -0.031261149793863297, -0.046233098953962326, -0.06954601407051086, 0.10296864062547684, 0.10074054449796677, -0.19894272089004517, -0.009531785733997822, 0.040233805775642395, -0.03175259009003639, 0.14036180078983307, -0.06785999238491058, 7.495020781789208e-7, 0.0059760198928415775, 0.0730656310915947, 0.06240839883685112, -0.13256245851516724, -0.09579396992921829, 0.15301427245140076, -0.21366414427757263, 0.0813998207449913, 0.10310570895671844, 0.16223128139972687, 0.0431327298283577, -0.14711998403072357, 0.014924793504178524, -0.0735122486948967, 0.005546296946704388, -0.06981898099184036, -0.12561190128326416, 0.14726123213768005, 0.004693268798291683, 0.07061006128787994, -0.08188484609127045, -0.024097494781017303, 0.1887701451778412, -0.06961384415626526, -0.008710703812539577, 0.13066136837005615, -0.07139185816049576, -0.004279129207134247, 0.03439377620816231, -0.027933118864893913, 0.09492919594049454, 0.0036284250672906637, 0.13881132006645203, 0.15072225034236908, -0.057981375604867935, 0.13647671043872833, -0.08102063089609146, 0.07579527050256729, -0.004538116045296192, -0.06889446824789047, -0.11841833591461182, 0.11128376424312592, 0.07897937297821045, -0.1546695977449417, 0.13022249937057495, -0.09063603729009628, -0.05624060332775116, -0.09812483936548233, -0.14620444178581238, 0.19987931847572327, 0.08967079967260361, 0.164496511220932, -0.03446348011493683, 0.30111163854599, -0.06864169985055923, 0.07865966856479645, -0.10048066824674606, -0.22562767565250397, 0.1585617959499359, -0.13826613128185272, -0.1701662242412567, -0.07075236737728119, -0.04322228580713272, 0.07906660437583923, -0.07075247168540955, -0.14740504324436188, -0.14911937713623047, 1.3148810041528144e-34, 0.03084416128695011, -0.03832034021615982, 0.0007571097230538726, -0.10299127548933029, -0.09319563955068588, -0.10662496089935303, 0.21076728403568268, 0.173990398645401, -0.018077651038765907, -0.07614430785179138, -0.07029768824577332 ]
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.05370331555604935, 0.09016449004411697, -0.06694222241640091, -0.16696515679359436, 0.16806840896606445, -0.11115274578332901, 0.14727525413036346, 0.07534642517566681, 0.09735727310180664, 0.07620877027511597, 0.05280112475156784, 0.10683634877204895, 0.01741383783519268, 0.13247166574001312, 0.03817718103528023, 0.02339528501033783, 0.05064952373504639, -0.04816356301307678, -0.10362361371517181, 0.03390316292643547, -0.15233592689037323, 0.1388334184885025, 0.1404346078634262, 0.23517337441444397, -0.1008652001619339, -0.18864615261554718, -0.10564950853586197, 0.14941303431987762, -0.04289303719997406, -0.009509672410786152, -0.05374997481703758, 0.04360440745949745, 0.028284698724746704, 0.0583784282207489, 0.000005208831225900212, -0.050401702523231506, 0.104510098695755, -0.048195041716098785, -0.02844415046274662, -0.020725427195429802, 0.09616108983755112, -0.037768248468637466, 0.07536747306585312, -0.010927136987447739, -0.09437023848295212, 0.028243789449334145, -0.06571900844573975, 0.0002415525377728045, 0.24271558225154877, 0.05466814711689949, -0.04502186179161072, -0.06068415939807892, -0.1109086275100708, -0.05912012979388237, -0.03442490100860596, -0.031064672395586967, 0.1612328588962555, 0.08856850117444992, -0.24361015856266022, -0.2590726912021637, -0.009002762846648693, -0.14801108837127686, -0.10901753604412079, -0.1478394716978073, -0.14203114807605743, -0.047129034996032715, -0.18981415033340454, -0.03644374758005142, -0.08622647821903229, 0.03005240485072136, -0.09184026718139648, -0.09458234161138535, -0.1372210532426834, 0.037482116371393204, -0.0960608422756195, -0.04727545380592346, -0.015766680240631104, -0.03321343660354614, 0.024577397853136063, 0.1695745438337326, 0.05971729755401611, 0.04643610492348671, 0.07566974312067032, -0.04009595513343811, -0.178714781999588, 0.06423065066337585, -0.10037796944379807, 0.14396396279335022, -0.05216943100094795, -0.10381440818309784, -0.02167399972677231, -0.05501318722963333, -0.028559919446706772, -0.07163837552070618, 0.006036486942321062, -0.03758072480559349, -0.06542310118675232, -0.18678779900074005, -0.023356197401881218, 0.14444881677627563, -0.13188888132572174, -0.12904316186904907, -0.05970335006713867, 0.09864385426044464, 0.02939266338944435, -0.05654362589120865, -0.0445367768406868, 0.27738067507743835, 0.0042129396460950375, -0.0771106407046318, -0.21645519137382507, 0.0996897742152214, -0.0888763964176178, -0.00909474492073059, 0.14938002824783325, 0.07293935865163803, -0.06302700936794281, 0.12495523691177368, 0.01729467511177063, 0.14648988842964172, -0.07575032114982605, 0.07484117895364761, -0.03686327487230301, -0.08959474414587021, 0.03329155966639519, -0.0016318646958097816, 0.11256963014602661, 0.08309721946716309, 0.009348176419734955, -0.034425631165504456, -0.05989198014140129, 0.009298941120505333, -0.03460659459233284, 0.009187386371195316, 0.09760359674692154, -0.027531130239367485, 0.022174401208758354, -0.1750277578830719, 0.015570275485515594, -0.16166052222251892, 0.15597127377986908, -0.12683770060539246, -0.0017097399104386568, -0.01410053949803114, 0.10691247135400772, 0.18241597712039948, 0.07712101936340332, -0.21815750002861023, -0.06891164928674698, -0.07064925134181976, -0.12562142312526703, 0.0925038754940033, -0.1883210837841034, 0.0697791576385498, -0.1958611160516739, 0.07628866285085678, -0.1206243708729744, -0.06591959297657013, -0.19956758618354797, -0.05927634984254837, 0.10347376018762589, -0.01730123721063137, 0.07507899403572083, -0.1601780503988266, 0.08336607366800308, 0.08428459614515305, -0.08679086714982986, 0.12722598016262054, -0.006392862182110548, -0.00985303707420826, 0.27684667706489563, -0.021756961941719055, -0.09421160817146301, -0.03357340022921562, -0.15440256893634796, 0.40206819772720337, -0.12825964391231537, 0.03976142778992653, -0.20624150335788727, -0.13163018226623535, 0.04949819669127464, -0.08629445731639862, -0.03946727141737938, -0.3293612599372864, 0.03970974311232567, -0.01980005018413067, -0.06375963985919952, 0.12267419695854187, 0.012485062703490257, -0.1070738211274147, -0.08878441154956818, 0.053729232400655746, 0.015392238274216652, -0.21672029793262482, 0.11786313354969025, -0.011209958232939243, -0.08173803240060806, -0.024956725537776947, 0.02022874355316162, -0.2084949016571045, 0.01435016468167305, -0.18735326826572418, 0.07004866003990173, 0.0277408380061388, 0.023806726559996605, -0.06063483655452728, -0.1709112823009491, 0.04363327473402023, 0.004188064485788345, -0.08687306195497513, -0.15379050374031067, 0.11203866451978683, -0.022778958082199097, 0.01731429621577263, -0.20187096297740936, -0.09340926259756088, 0.07683860510587692, -0.017292162403464317, 0.042175982147455215, 0.1520875096321106, -0.023728245869278908, -0.07287102937698364, 0.12211762368679047, 0.07058419287204742, 0.16471204161643982, 0.15207184851169586, -0.028959333896636963, -0.10925949364900589, 0.005152047146111727, 0.06489941477775574, -0.00918718334287405, -0.031028077006340027, 0.16326069831848145, 0.1680426001548767, 0.03006613813340664, -0.03357260301709175, 0.03831159323453903, -0.20055411756038666, -0.017101990059018135, 0.1226145476102829, -0.20970980823040009, 0.1095525398850441, -0.12525515258312225, -0.1340814083814621, 0.058996543288230896, 0.1704626828432083, 0.22906100749969482, 0.19933614134788513, -0.1311570554971695, 0.033897776156663895, 0.12409887462854385, 0.025458646938204765, -0.1652226746082306, 0.01569800078868866, -0.12158522754907608, -0.20786209404468536, 0.09426749497652054, -0.008346544578671455, 0.038308754563331604, -0.12583516538143158, 0.21124611794948578, -0.07142540067434311, 0.05713391304016113, -0.09890681505203247, 0.13523930311203003, -0.115238256752491, 0.08497539162635803, -0.04713338240981102, -0.026684198528528214, 0.08405373990535736, 0.09882160276174545, -0.04973987862467766, -0.052681367844343185, -0.05729810893535614, -0.08075825124979019, -0.07715031504631042, 0.05714881420135498, -0.008103625848889351, 0.07561811059713364, 0.045625731348991394, -0.19077254831790924, 0.0791667103767395, 0.1283460557460785, -0.043776270002126694, 0.06917370855808258, 0.1051005944609642, -0.15869848430156708, 0.24275006353855133, -0.2347393035888672, -0.05254844203591347, 0.00981190986931324, -0.0732087790966034, 0.02995040826499462, -0.09098679572343826, -0.05482763797044754, -0.03303905203938484, -0.014820101670920849, -0.17967069149017334, -0.05550985783338547, -0.07600203901529312, -0.08401031792163849, 0.03190955892205238, 0.02933652326464653, -0.07340794801712036, 0.01672920025885105, 0.04288711026310921, 0.11270526796579361, 0.3252256214618683, -0.2239973545074463, -0.09095628559589386, -0.039403703063726425, 0.006640837527811527, -0.003683242714032531, 0.1371079832315445, 0.1092490553855896, -0.13670165836811066, -0.05284078046679497, -0.17102302610874176, 0.16918660700321198, 0.020481813699007034, -0.04819118604063988, -0.010959678329527378, -0.06387414038181305, -0.05094245821237564, -0.007112898398190737, -0.009171154350042343, -0.11098194122314453, -0.1855107545852661, 0.09485208988189697, -0.04511948674917221, -0.031612373888492584, 0.2806595265865326, 0.03794143348932266, -0.06029629707336426, -0.046975623816251755, -0.15482129156589508, -0.1323886513710022, 0.10363319516181946, 0.1867906004190445, 0.018064871430397034, -0.08906931430101395, -0.03214400261640549, -0.08599170297384262, 0.12203213572502136, 0.06483124941587448, -0.07134705781936646, 0.06679642200469971, 0.0373433381319046, -0.0533951036632061, -0.007225906942039728, -0.025120602920651436, 0.14180594682693481, -0.07590588927268982, -0.1359693855047226, 0.005644829478114843, 0.061978843063116074, -0.1193789690732956, 0.22773072123527527, -0.15266555547714233, 0.20651587843894958, -0.009426030330359936, 0.1022682636976242, 0.2352871149778366, -0.061535272747278214, -0.05675892159342766, 0.053611062467098236, 0.15156352519989014, -0.08894472569227219, -0.013904104009270668, -0.19908954203128815, 0.19738557934761047, -0.06026501581072807, -0.24988536536693573, -0.1136869266629219, -0.05591108277440071, -0.021789368242025375, 0.02133600227534771, -0.11704492568969727, 0.037148188799619675, -0.11769336462020874, 0.09839660674333572, -0.05897645279765129, -0.058661721646785736, 0.17377257347106934, 0.1543327420949936, 0.09152868390083313, 0.03866461291909218, 0.11577708274126053, -0.13411617279052734, 0.23825740814208984, 0.1559542864561081, -0.17257198691368103, 0.045498237013816833, -0.1803400218486786, 0.038077179342508316, -0.10258045047521591, 0.10612247884273529, 0.024620337411761284, 0.005610935855656862, 0.038350801914930344, 0.21537581086158752, 0.14207151532173157, -0.05385016277432442, 0.10605423152446747, 0.2177080512046814, -0.010225743055343628, 0.10987994819879532, -0.15795229375362396, 0.15224581956863403, -0.019293786957859993, 0.10526402294635773, 0.3248504400253296, 0.051577191799879074, 0.0637781023979187, 0.06913790851831436, -0.07243417203426361, -0.012739891186356544, 0.07692787051200867, -0.07399267703294754, -0.05086638778448105, -0.243434876203537, -0.05998606979846954, 0.05078389495611191, 0.24700148403644562, 0.07308288663625717, -0.16134130954742432, 0.0008986752945929766, -0.011439106427133083, 0.08521606028079987, -0.04626011103391647, 0.0322880856692791, -0.08404198288917542, 0.1200389638543129, 0.07275348901748657, -0.0058552357368171215, -0.0873040109872818, 0.12195888161659241, -0.10724109411239624, 0.0876796543598175, -0.09462554007768631, -0.09865738451480865, 0.0666542574763298, 0.05992761626839638, -0.16221174597740173, 0.15806472301483154, -0.17556017637252808, 0.014829608611762524, -0.04447002336382866, 0.12315439432859421, 0.011494561098515987, -0.22782330214977264, -0.0643930733203888, -0.1609341949224472, -0.11255524307489395, 0.0574541836977005, -0.06104089692234993, 0.028881242498755455, -0.07837177067995071, 0.07504376769065857, 0.13231606781482697, 0.07632521539926529, 0.009415418840944767, 0.05014549940824509, 0.12495157122612, 0.06947515904903412, 0.18656273186206818, 0.3035963475704193, 0.0410495325922966, -0.12212543934583664, 0.06535711884498596, 0.11517854779958725, 0.031802862882614136, 0.021038608625531197, 0.11225494742393494, 0.0068795690312981606, -0.036063361912965775, 0.0239894799888134, 0.09039658308029175, 0.042630214244127274, -0.08618561923503876, 0.1341361403465271, 0.21517930924892426, 0.07200172543525696, -0.07004816085100174, 0.08466231822967529, 0.15664136409759521, 0.038098908960819244, 0.0006191818392835557, -0.14237511157989502, 0.054347097873687744, 0.04012613743543625, -0.080735944211483, 0.1108228787779808, -0.15268918871879578, 0.017233338207006454, 0.07377304136753082, 0.029755065217614174, -0.01720057614147663, -0.04752601310610771, 0.042124200612306595, 0.117930568754673, 0.025980941951274872, -0.07431191205978394, -0.07547079771757126, 0.0634840726852417, -0.13926774263381958, -0.037373725324869156, 0.06553352624177933, 0.1022992879152298, 0.0758320689201355, 0.07351283729076385, 0.11390189826488495, -0.09821229428052902, 0.03380511328577995, -0.08013667911291122, -0.001701820408925414, -0.25508251786231995, -0.028721218928694725, 0.2468760907649994, 0.05658067390322685, -0.005578133277595043, -0.039217013865709305, 0.09184910356998444, -0.12642282247543335, 0.06971008330583572, -0.050198234617710114, -0.061106882989406586, -0.04355587065219879, 0.16555069386959076, 0.017727704718708992, 0.15299245715141296, 0.12834616005420685, 0.14459185302257538, 0.03393683210015297, -0.045801449567079544, 0.05008404701948166, 0.12372229248285294, 0.04524993523955345, 0.17421221733093262, -0.1506914645433426, -0.12127919495105743, -0.3253590762615204, 0.06111764907836914, 0.04220771789550781, 0.1457187831401825, 0.07413565367460251, 0.0020780167542397976, -0.001318712835200131, -0.041157107800245285, -0.19342400133609772, -0.04836665466427803, 0.18545657396316528, 0.1354581117630005, -0.06518987566232681, 0.02047295682132244, -2.380665672835816e-32, 0.00804539117962122, -0.03186425566673279, -0.031685542315244675, -0.033678047358989716, -0.08809435367584229, 0.06714840978384018, 0.048388563096523285, -0.12560848891735077, 0.10163910686969757, 0.003917919471859932, -0.17852605879306793, -0.07396265864372253, 0.06874063611030579, 0.0626070573925972, -0.08919305354356766, 0.012403041124343872, 0.012309703044593334, 0.016459999606013298, -0.15388166904449463, 0.01789887621998787, 0.17462697625160217, 0.00893654115498066, 0.17699800431728363, -0.0068434299901127815, -0.07355832308530807, 0.07880449295043945, -0.037937525659799576, -0.2961626350879669, -0.07730220258235931, -0.008822846226394176, -0.0876278430223465, 0.22550764679908752, -0.05123966932296753, 0.002227123361080885, -0.05753890052437782, -0.09658283740282059, 0.011522303335368633, -0.062705397605896, 0.037710122764110565, -0.11092007905244827, 0.034815724939107895, 0.17821107804775238, 0.15246173739433289, -0.017789790406823158, -0.011985288932919502, 0.16097299754619598, 0.025848092511296272, 0.11724157631397247, -0.02007962018251419, -0.020599544048309326, 0.02325720340013504, 0.0318010076880455, -0.028786586597561836, -0.02438482828438282, -0.01754533126950264, -0.2881152033805847, 0.030572226271033287, -0.02372942678630352, -0.1612158715724945, 0.009774870239198208, 0.05508469417691231, -0.07949280738830566, 0.09001019597053528, -0.02633528970181942, 0.03158452734351158, -0.022832904011011124, 0.3494112193584442, 0.024621568620204926, 0.09193016588687897, -0.15071362257003784, 0.06299065798521042, -0.0029671064112335443, -0.18733981251716614, 0.01657530479133129, -0.07538136839866638, -0.026917265728116035, -0.08712779730558395, -0.0554308220744133, -0.0023356289602816105, -0.11366736888885498, -0.015325566753745079, 0.09234433621168137, 0.11180993169546127, 0.04354355111718178, -0.08379174023866653, -0.08124527335166931, 0.11203723400831223, -0.015587928704917431, -0.06506197154521942, -0.1321379542350769, -0.019885960966348648, 0.11189421266317368, -0.21882767975330353, 0.04296732321381569, -0.13447284698486328, -0.09211121499538422, -0.01345878466963768, 0.08666222542524338, -0.1618514060974121, -0.05813165754079819, -0.04540732502937317, -0.08320825546979904, 0.049763940274715424, 0.1140015721321106, 0.21548199653625488, -0.04873232915997505, 0.05314658582210541, -0.02707142010331154, -0.17496465146541595, 0.007041123695671558, -0.09322693943977356, 0.05252727121114731, 0.12365873903036118, 0.013814356178045273, 0.26304012537002563, -0.051909055560827255, -0.02029169164597988, -0.15955694019794464, 0.07111692428588867, 0.2502821981906891, -0.057577479630708694, -0.031261149793863297, -0.046233098953962326, -0.06954601407051086, 0.10296864062547684, 0.10074054449796677, -0.19894272089004517, -0.009531785733997822, 0.040233805775642395, -0.03175259009003639, 0.14036180078983307, -0.06785999238491058, 7.495020781789208e-7, 0.0059760198928415775, 0.0730656310915947, 0.06240839883685112, -0.13256245851516724, -0.09579396992921829, 0.15301427245140076, -0.21366414427757263, 0.0813998207449913, 0.10310570895671844, 0.16223128139972687, 0.0431327298283577, -0.14711998403072357, 0.014924793504178524, -0.0735122486948967, 0.005546296946704388, -0.06981898099184036, -0.12561190128326416, 0.14726123213768005, 0.004693268798291683, 0.07061006128787994, -0.08188484609127045, -0.024097494781017303, 0.1887701451778412, -0.06961384415626526, -0.008710703812539577, 0.13066136837005615, -0.07139185816049576, -0.004279129207134247, 0.03439377620816231, -0.027933118864893913, 0.09492919594049454, 0.0036284250672906637, 0.13881132006645203, 0.15072225034236908, -0.057981375604867935, 0.13647671043872833, -0.08102063089609146, 0.07579527050256729, -0.004538116045296192, -0.06889446824789047, -0.11841833591461182, 0.11128376424312592, 0.07897937297821045, -0.1546695977449417, 0.13022249937057495, -0.09063603729009628, -0.05624060332775116, -0.09812483936548233, -0.14620444178581238, 0.19987931847572327, 0.08967079967260361, 0.164496511220932, -0.03446348011493683, 0.30111163854599, -0.06864169985055923, 0.07865966856479645, -0.10048066824674606, -0.22562767565250397, 0.1585617959499359, -0.13826613128185272, -0.1701662242412567, -0.07075236737728119, -0.04322228580713272, 0.07906660437583923, -0.07075247168540955, -0.14740504324436188, -0.14911937713623047, 1.3148810041528144e-34, 0.03084416128695011, -0.03832034021615982, 0.0007571097230538726, -0.10299127548933029, -0.09319563955068588, -0.10662496089935303, 0.21076728403568268, 0.173990398645401, -0.018077651038765907, -0.07614430785179138, -0.07029768824577332 ]
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.05370331555604935, 0.09016449004411697, -0.06694222241640091, -0.16696515679359436, 0.16806840896606445, -0.11115274578332901, 0.14727525413036346, 0.07534642517566681, 0.09735727310180664, 0.07620877027511597, 0.05280112475156784, 0.10683634877204895, 0.01741383783519268, 0.13247166574001312, 0.03817718103528023, 0.02339528501033783, 0.05064952373504639, -0.04816356301307678, -0.10362361371517181, 0.03390316292643547, -0.15233592689037323, 0.1388334184885025, 0.1404346078634262, 0.23517337441444397, -0.1008652001619339, -0.18864615261554718, -0.10564950853586197, 0.14941303431987762, -0.04289303719997406, -0.009509672410786152, -0.05374997481703758, 0.04360440745949745, 0.028284698724746704, 0.0583784282207489, 0.000005208831225900212, -0.050401702523231506, 0.104510098695755, -0.048195041716098785, -0.02844415046274662, -0.020725427195429802, 0.09616108983755112, -0.037768248468637466, 0.07536747306585312, -0.010927136987447739, -0.09437023848295212, 0.028243789449334145, -0.06571900844573975, 0.0002415525377728045, 0.24271558225154877, 0.05466814711689949, -0.04502186179161072, -0.06068415939807892, -0.1109086275100708, -0.05912012979388237, -0.03442490100860596, -0.031064672395586967, 0.1612328588962555, 0.08856850117444992, -0.24361015856266022, -0.2590726912021637, -0.009002762846648693, -0.14801108837127686, -0.10901753604412079, -0.1478394716978073, -0.14203114807605743, -0.047129034996032715, -0.18981415033340454, -0.03644374758005142, -0.08622647821903229, 0.03005240485072136, -0.09184026718139648, -0.09458234161138535, -0.1372210532426834, 0.037482116371393204, -0.0960608422756195, -0.04727545380592346, -0.015766680240631104, -0.03321343660354614, 0.024577397853136063, 0.1695745438337326, 0.05971729755401611, 0.04643610492348671, 0.07566974312067032, -0.04009595513343811, -0.178714781999588, 0.06423065066337585, -0.10037796944379807, 0.14396396279335022, -0.05216943100094795, -0.10381440818309784, -0.02167399972677231, -0.05501318722963333, -0.028559919446706772, -0.07163837552070618, 0.006036486942321062, -0.03758072480559349, -0.06542310118675232, -0.18678779900074005, -0.023356197401881218, 0.14444881677627563, -0.13188888132572174, -0.12904316186904907, -0.05970335006713867, 0.09864385426044464, 0.02939266338944435, -0.05654362589120865, -0.0445367768406868, 0.27738067507743835, 0.0042129396460950375, -0.0771106407046318, -0.21645519137382507, 0.0996897742152214, -0.0888763964176178, -0.00909474492073059, 0.14938002824783325, 0.07293935865163803, -0.06302700936794281, 0.12495523691177368, 0.01729467511177063, 0.14648988842964172, -0.07575032114982605, 0.07484117895364761, -0.03686327487230301, -0.08959474414587021, 0.03329155966639519, -0.0016318646958097816, 0.11256963014602661, 0.08309721946716309, 0.009348176419734955, -0.034425631165504456, -0.05989198014140129, 0.009298941120505333, -0.03460659459233284, 0.009187386371195316, 0.09760359674692154, -0.027531130239367485, 0.022174401208758354, -0.1750277578830719, 0.015570275485515594, -0.16166052222251892, 0.15597127377986908, -0.12683770060539246, -0.0017097399104386568, -0.01410053949803114, 0.10691247135400772, 0.18241597712039948, 0.07712101936340332, -0.21815750002861023, -0.06891164928674698, -0.07064925134181976, -0.12562142312526703, 0.0925038754940033, -0.1883210837841034, 0.0697791576385498, -0.1958611160516739, 0.07628866285085678, -0.1206243708729744, -0.06591959297657013, -0.19956758618354797, -0.05927634984254837, 0.10347376018762589, -0.01730123721063137, 0.07507899403572083, -0.1601780503988266, 0.08336607366800308, 0.08428459614515305, -0.08679086714982986, 0.12722598016262054, -0.006392862182110548, -0.00985303707420826, 0.27684667706489563, -0.021756961941719055, -0.09421160817146301, -0.03357340022921562, -0.15440256893634796, 0.40206819772720337, -0.12825964391231537, 0.03976142778992653, -0.20624150335788727, -0.13163018226623535, 0.04949819669127464, -0.08629445731639862, -0.03946727141737938, -0.3293612599372864, 0.03970974311232567, -0.01980005018413067, -0.06375963985919952, 0.12267419695854187, 0.012485062703490257, -0.1070738211274147, -0.08878441154956818, 0.053729232400655746, 0.015392238274216652, -0.21672029793262482, 0.11786313354969025, -0.011209958232939243, -0.08173803240060806, -0.024956725537776947, 0.02022874355316162, -0.2084949016571045, 0.01435016468167305, -0.18735326826572418, 0.07004866003990173, 0.0277408380061388, 0.023806726559996605, -0.06063483655452728, -0.1709112823009491, 0.04363327473402023, 0.004188064485788345, -0.08687306195497513, -0.15379050374031067, 0.11203866451978683, -0.022778958082199097, 0.01731429621577263, -0.20187096297740936, -0.09340926259756088, 0.07683860510587692, -0.017292162403464317, 0.042175982147455215, 0.1520875096321106, -0.023728245869278908, -0.07287102937698364, 0.12211762368679047, 0.07058419287204742, 0.16471204161643982, 0.15207184851169586, -0.028959333896636963, -0.10925949364900589, 0.005152047146111727, 0.06489941477775574, -0.00918718334287405, -0.031028077006340027, 0.16326069831848145, 0.1680426001548767, 0.03006613813340664, -0.03357260301709175, 0.03831159323453903, -0.20055411756038666, -0.017101990059018135, 0.1226145476102829, -0.20970980823040009, 0.1095525398850441, -0.12525515258312225, -0.1340814083814621, 0.058996543288230896, 0.1704626828432083, 0.22906100749969482, 0.19933614134788513, -0.1311570554971695, 0.033897776156663895, 0.12409887462854385, 0.025458646938204765, -0.1652226746082306, 0.01569800078868866, -0.12158522754907608, -0.20786209404468536, 0.09426749497652054, -0.008346544578671455, 0.038308754563331604, -0.12583516538143158, 0.21124611794948578, -0.07142540067434311, 0.05713391304016113, -0.09890681505203247, 0.13523930311203003, -0.115238256752491, 0.08497539162635803, -0.04713338240981102, -0.026684198528528214, 0.08405373990535736, 0.09882160276174545, -0.04973987862467766, -0.052681367844343185, -0.05729810893535614, -0.08075825124979019, -0.07715031504631042, 0.05714881420135498, -0.008103625848889351, 0.07561811059713364, 0.045625731348991394, -0.19077254831790924, 0.0791667103767395, 0.1283460557460785, -0.043776270002126694, 0.06917370855808258, 0.1051005944609642, -0.15869848430156708, 0.24275006353855133, -0.2347393035888672, -0.05254844203591347, 0.00981190986931324, -0.0732087790966034, 0.02995040826499462, -0.09098679572343826, -0.05482763797044754, -0.03303905203938484, -0.014820101670920849, -0.17967069149017334, -0.05550985783338547, -0.07600203901529312, -0.08401031792163849, 0.03190955892205238, 0.02933652326464653, -0.07340794801712036, 0.01672920025885105, 0.04288711026310921, 0.11270526796579361, 0.3252256214618683, -0.2239973545074463, -0.09095628559589386, -0.039403703063726425, 0.006640837527811527, -0.003683242714032531, 0.1371079832315445, 0.1092490553855896, -0.13670165836811066, -0.05284078046679497, -0.17102302610874176, 0.16918660700321198, 0.020481813699007034, -0.04819118604063988, -0.010959678329527378, -0.06387414038181305, -0.05094245821237564, -0.007112898398190737, -0.009171154350042343, -0.11098194122314453, -0.1855107545852661, 0.09485208988189697, -0.04511948674917221, -0.031612373888492584, 0.2806595265865326, 0.03794143348932266, -0.06029629707336426, -0.046975623816251755, -0.15482129156589508, -0.1323886513710022, 0.10363319516181946, 0.1867906004190445, 0.018064871430397034, -0.08906931430101395, -0.03214400261640549, -0.08599170297384262, 0.12203213572502136, 0.06483124941587448, -0.07134705781936646, 0.06679642200469971, 0.0373433381319046, -0.0533951036632061, -0.007225906942039728, -0.025120602920651436, 0.14180594682693481, -0.07590588927268982, -0.1359693855047226, 0.005644829478114843, 0.061978843063116074, -0.1193789690732956, 0.22773072123527527, -0.15266555547714233, 0.20651587843894958, -0.009426030330359936, 0.1022682636976242, 0.2352871149778366, -0.061535272747278214, -0.05675892159342766, 0.053611062467098236, 0.15156352519989014, -0.08894472569227219, -0.013904104009270668, -0.19908954203128815, 0.19738557934761047, -0.06026501581072807, -0.24988536536693573, -0.1136869266629219, -0.05591108277440071, -0.021789368242025375, 0.02133600227534771, -0.11704492568969727, 0.037148188799619675, -0.11769336462020874, 0.09839660674333572, -0.05897645279765129, -0.058661721646785736, 0.17377257347106934, 0.1543327420949936, 0.09152868390083313, 0.03866461291909218, 0.11577708274126053, -0.13411617279052734, 0.23825740814208984, 0.1559542864561081, -0.17257198691368103, 0.045498237013816833, -0.1803400218486786, 0.038077179342508316, -0.10258045047521591, 0.10612247884273529, 0.024620337411761284, 0.005610935855656862, 0.038350801914930344, 0.21537581086158752, 0.14207151532173157, -0.05385016277432442, 0.10605423152446747, 0.2177080512046814, -0.010225743055343628, 0.10987994819879532, -0.15795229375362396, 0.15224581956863403, -0.019293786957859993, 0.10526402294635773, 0.3248504400253296, 0.051577191799879074, 0.0637781023979187, 0.06913790851831436, -0.07243417203426361, -0.012739891186356544, 0.07692787051200867, -0.07399267703294754, -0.05086638778448105, -0.243434876203537, -0.05998606979846954, 0.05078389495611191, 0.24700148403644562, 0.07308288663625717, -0.16134130954742432, 0.0008986752945929766, -0.011439106427133083, 0.08521606028079987, -0.04626011103391647, 0.0322880856692791, -0.08404198288917542, 0.1200389638543129, 0.07275348901748657, -0.0058552357368171215, -0.0873040109872818, 0.12195888161659241, -0.10724109411239624, 0.0876796543598175, -0.09462554007768631, -0.09865738451480865, 0.0666542574763298, 0.05992761626839638, -0.16221174597740173, 0.15806472301483154, -0.17556017637252808, 0.014829608611762524, -0.04447002336382866, 0.12315439432859421, 0.011494561098515987, -0.22782330214977264, -0.0643930733203888, -0.1609341949224472, -0.11255524307489395, 0.0574541836977005, -0.06104089692234993, 0.028881242498755455, -0.07837177067995071, 0.07504376769065857, 0.13231606781482697, 0.07632521539926529, 0.009415418840944767, 0.05014549940824509, 0.12495157122612, 0.06947515904903412, 0.18656273186206818, 0.3035963475704193, 0.0410495325922966, -0.12212543934583664, 0.06535711884498596, 0.11517854779958725, 0.031802862882614136, 0.021038608625531197, 0.11225494742393494, 0.0068795690312981606, -0.036063361912965775, 0.0239894799888134, 0.09039658308029175, 0.042630214244127274, -0.08618561923503876, 0.1341361403465271, 0.21517930924892426, 0.07200172543525696, -0.07004816085100174, 0.08466231822967529, 0.15664136409759521, 0.038098908960819244, 0.0006191818392835557, -0.14237511157989502, 0.054347097873687744, 0.04012613743543625, -0.080735944211483, 0.1108228787779808, -0.15268918871879578, 0.017233338207006454, 0.07377304136753082, 0.029755065217614174, -0.01720057614147663, -0.04752601310610771, 0.042124200612306595, 0.117930568754673, 0.025980941951274872, -0.07431191205978394, -0.07547079771757126, 0.0634840726852417, -0.13926774263381958, -0.037373725324869156, 0.06553352624177933, 0.1022992879152298, 0.0758320689201355, 0.07351283729076385, 0.11390189826488495, -0.09821229428052902, 0.03380511328577995, -0.08013667911291122, -0.001701820408925414, -0.25508251786231995, -0.028721218928694725, 0.2468760907649994, 0.05658067390322685, -0.005578133277595043, -0.039217013865709305, 0.09184910356998444, -0.12642282247543335, 0.06971008330583572, -0.050198234617710114, -0.061106882989406586, -0.04355587065219879, 0.16555069386959076, 0.017727704718708992, 0.15299245715141296, 0.12834616005420685, 0.14459185302257538, 0.03393683210015297, -0.045801449567079544, 0.05008404701948166, 0.12372229248285294, 0.04524993523955345, 0.17421221733093262, -0.1506914645433426, -0.12127919495105743, -0.3253590762615204, 0.06111764907836914, 0.04220771789550781, 0.1457187831401825, 0.07413565367460251, 0.0020780167542397976, -0.001318712835200131, -0.041157107800245285, -0.19342400133609772, -0.04836665466427803, 0.18545657396316528, 0.1354581117630005, -0.06518987566232681, 0.02047295682132244, -2.380665672835816e-32, 0.00804539117962122, -0.03186425566673279, -0.031685542315244675, -0.033678047358989716, -0.08809435367584229, 0.06714840978384018, 0.048388563096523285, -0.12560848891735077, 0.10163910686969757, 0.003917919471859932, -0.17852605879306793, -0.07396265864372253, 0.06874063611030579, 0.0626070573925972, -0.08919305354356766, 0.012403041124343872, 0.012309703044593334, 0.016459999606013298, -0.15388166904449463, 0.01789887621998787, 0.17462697625160217, 0.00893654115498066, 0.17699800431728363, -0.0068434299901127815, -0.07355832308530807, 0.07880449295043945, -0.037937525659799576, -0.2961626350879669, -0.07730220258235931, -0.008822846226394176, -0.0876278430223465, 0.22550764679908752, -0.05123966932296753, 0.002227123361080885, -0.05753890052437782, -0.09658283740282059, 0.011522303335368633, -0.062705397605896, 0.037710122764110565, -0.11092007905244827, 0.034815724939107895, 0.17821107804775238, 0.15246173739433289, -0.017789790406823158, -0.011985288932919502, 0.16097299754619598, 0.025848092511296272, 0.11724157631397247, -0.02007962018251419, -0.020599544048309326, 0.02325720340013504, 0.0318010076880455, -0.028786586597561836, -0.02438482828438282, -0.01754533126950264, -0.2881152033805847, 0.030572226271033287, -0.02372942678630352, -0.1612158715724945, 0.009774870239198208, 0.05508469417691231, -0.07949280738830566, 0.09001019597053528, -0.02633528970181942, 0.03158452734351158, -0.022832904011011124, 0.3494112193584442, 0.024621568620204926, 0.09193016588687897, -0.15071362257003784, 0.06299065798521042, -0.0029671064112335443, -0.18733981251716614, 0.01657530479133129, -0.07538136839866638, -0.026917265728116035, -0.08712779730558395, -0.0554308220744133, -0.0023356289602816105, -0.11366736888885498, -0.015325566753745079, 0.09234433621168137, 0.11180993169546127, 0.04354355111718178, -0.08379174023866653, -0.08124527335166931, 0.11203723400831223, -0.015587928704917431, -0.06506197154521942, -0.1321379542350769, -0.019885960966348648, 0.11189421266317368, -0.21882767975330353, 0.04296732321381569, -0.13447284698486328, -0.09211121499538422, -0.01345878466963768, 0.08666222542524338, -0.1618514060974121, -0.05813165754079819, -0.04540732502937317, -0.08320825546979904, 0.049763940274715424, 0.1140015721321106, 0.21548199653625488, -0.04873232915997505, 0.05314658582210541, -0.02707142010331154, -0.17496465146541595, 0.007041123695671558, -0.09322693943977356, 0.05252727121114731, 0.12365873903036118, 0.013814356178045273, 0.26304012537002563, -0.051909055560827255, -0.02029169164597988, -0.15955694019794464, 0.07111692428588867, 0.2502821981906891, -0.057577479630708694, -0.031261149793863297, -0.046233098953962326, -0.06954601407051086, 0.10296864062547684, 0.10074054449796677, -0.19894272089004517, -0.009531785733997822, 0.040233805775642395, -0.03175259009003639, 0.14036180078983307, -0.06785999238491058, 7.495020781789208e-7, 0.0059760198928415775, 0.0730656310915947, 0.06240839883685112, -0.13256245851516724, -0.09579396992921829, 0.15301427245140076, -0.21366414427757263, 0.0813998207449913, 0.10310570895671844, 0.16223128139972687, 0.0431327298283577, -0.14711998403072357, 0.014924793504178524, -0.0735122486948967, 0.005546296946704388, -0.06981898099184036, -0.12561190128326416, 0.14726123213768005, 0.004693268798291683, 0.07061006128787994, -0.08188484609127045, -0.024097494781017303, 0.1887701451778412, -0.06961384415626526, -0.008710703812539577, 0.13066136837005615, -0.07139185816049576, -0.004279129207134247, 0.03439377620816231, -0.027933118864893913, 0.09492919594049454, 0.0036284250672906637, 0.13881132006645203, 0.15072225034236908, -0.057981375604867935, 0.13647671043872833, -0.08102063089609146, 0.07579527050256729, -0.004538116045296192, -0.06889446824789047, -0.11841833591461182, 0.11128376424312592, 0.07897937297821045, -0.1546695977449417, 0.13022249937057495, -0.09063603729009628, -0.05624060332775116, -0.09812483936548233, -0.14620444178581238, 0.19987931847572327, 0.08967079967260361, 0.164496511220932, -0.03446348011493683, 0.30111163854599, -0.06864169985055923, 0.07865966856479645, -0.10048066824674606, -0.22562767565250397, 0.1585617959499359, -0.13826613128185272, -0.1701662242412567, -0.07075236737728119, -0.04322228580713272, 0.07906660437583923, -0.07075247168540955, -0.14740504324436188, -0.14911937713623047, 1.3148810041528144e-34, 0.03084416128695011, -0.03832034021615982, 0.0007571097230538726, -0.10299127548933029, -0.09319563955068588, -0.10662496089935303, 0.21076728403568268, 0.173990398645401, -0.018077651038765907, -0.07614430785179138, -0.07029768824577332 ]
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.05370331555604935, 0.09016449004411697, -0.06694222241640091, -0.16696515679359436, 0.16806840896606445, -0.11115274578332901, 0.14727525413036346, 0.07534642517566681, 0.09735727310180664, 0.07620877027511597, 0.05280112475156784, 0.10683634877204895, 0.01741383783519268, 0.13247166574001312, 0.03817718103528023, 0.02339528501033783, 0.05064952373504639, -0.04816356301307678, -0.10362361371517181, 0.03390316292643547, -0.15233592689037323, 0.1388334184885025, 0.1404346078634262, 0.23517337441444397, -0.1008652001619339, -0.18864615261554718, -0.10564950853586197, 0.14941303431987762, -0.04289303719997406, -0.009509672410786152, -0.05374997481703758, 0.04360440745949745, 0.028284698724746704, 0.0583784282207489, 0.000005208831225900212, -0.050401702523231506, 0.104510098695755, -0.048195041716098785, -0.02844415046274662, -0.020725427195429802, 0.09616108983755112, -0.037768248468637466, 0.07536747306585312, -0.010927136987447739, -0.09437023848295212, 0.028243789449334145, -0.06571900844573975, 0.0002415525377728045, 0.24271558225154877, 0.05466814711689949, -0.04502186179161072, -0.06068415939807892, -0.1109086275100708, -0.05912012979388237, -0.03442490100860596, -0.031064672395586967, 0.1612328588962555, 0.08856850117444992, -0.24361015856266022, -0.2590726912021637, -0.009002762846648693, -0.14801108837127686, -0.10901753604412079, -0.1478394716978073, -0.14203114807605743, -0.047129034996032715, -0.18981415033340454, -0.03644374758005142, -0.08622647821903229, 0.03005240485072136, -0.09184026718139648, -0.09458234161138535, -0.1372210532426834, 0.037482116371393204, -0.0960608422756195, -0.04727545380592346, -0.015766680240631104, -0.03321343660354614, 0.024577397853136063, 0.1695745438337326, 0.05971729755401611, 0.04643610492348671, 0.07566974312067032, -0.04009595513343811, -0.178714781999588, 0.06423065066337585, -0.10037796944379807, 0.14396396279335022, -0.05216943100094795, -0.10381440818309784, -0.02167399972677231, -0.05501318722963333, -0.028559919446706772, -0.07163837552070618, 0.006036486942321062, -0.03758072480559349, -0.06542310118675232, -0.18678779900074005, -0.023356197401881218, 0.14444881677627563, -0.13188888132572174, -0.12904316186904907, -0.05970335006713867, 0.09864385426044464, 0.02939266338944435, -0.05654362589120865, -0.0445367768406868, 0.27738067507743835, 0.0042129396460950375, -0.0771106407046318, -0.21645519137382507, 0.0996897742152214, -0.0888763964176178, -0.00909474492073059, 0.14938002824783325, 0.07293935865163803, -0.06302700936794281, 0.12495523691177368, 0.01729467511177063, 0.14648988842964172, -0.07575032114982605, 0.07484117895364761, -0.03686327487230301, -0.08959474414587021, 0.03329155966639519, -0.0016318646958097816, 0.11256963014602661, 0.08309721946716309, 0.009348176419734955, -0.034425631165504456, -0.05989198014140129, 0.009298941120505333, -0.03460659459233284, 0.009187386371195316, 0.09760359674692154, -0.027531130239367485, 0.022174401208758354, -0.1750277578830719, 0.015570275485515594, -0.16166052222251892, 0.15597127377986908, -0.12683770060539246, -0.0017097399104386568, -0.01410053949803114, 0.10691247135400772, 0.18241597712039948, 0.07712101936340332, -0.21815750002861023, -0.06891164928674698, -0.07064925134181976, -0.12562142312526703, 0.0925038754940033, -0.1883210837841034, 0.0697791576385498, -0.1958611160516739, 0.07628866285085678, -0.1206243708729744, -0.06591959297657013, -0.19956758618354797, -0.05927634984254837, 0.10347376018762589, -0.01730123721063137, 0.07507899403572083, -0.1601780503988266, 0.08336607366800308, 0.08428459614515305, -0.08679086714982986, 0.12722598016262054, -0.006392862182110548, -0.00985303707420826, 0.27684667706489563, -0.021756961941719055, -0.09421160817146301, -0.03357340022921562, -0.15440256893634796, 0.40206819772720337, -0.12825964391231537, 0.03976142778992653, -0.20624150335788727, -0.13163018226623535, 0.04949819669127464, -0.08629445731639862, -0.03946727141737938, -0.3293612599372864, 0.03970974311232567, -0.01980005018413067, -0.06375963985919952, 0.12267419695854187, 0.012485062703490257, -0.1070738211274147, -0.08878441154956818, 0.053729232400655746, 0.015392238274216652, -0.21672029793262482, 0.11786313354969025, -0.011209958232939243, -0.08173803240060806, -0.024956725537776947, 0.02022874355316162, -0.2084949016571045, 0.01435016468167305, -0.18735326826572418, 0.07004866003990173, 0.0277408380061388, 0.023806726559996605, -0.06063483655452728, -0.1709112823009491, 0.04363327473402023, 0.004188064485788345, -0.08687306195497513, -0.15379050374031067, 0.11203866451978683, -0.022778958082199097, 0.01731429621577263, -0.20187096297740936, -0.09340926259756088, 0.07683860510587692, -0.017292162403464317, 0.042175982147455215, 0.1520875096321106, -0.023728245869278908, -0.07287102937698364, 0.12211762368679047, 0.07058419287204742, 0.16471204161643982, 0.15207184851169586, -0.028959333896636963, -0.10925949364900589, 0.005152047146111727, 0.06489941477775574, -0.00918718334287405, -0.031028077006340027, 0.16326069831848145, 0.1680426001548767, 0.03006613813340664, -0.03357260301709175, 0.03831159323453903, -0.20055411756038666, -0.017101990059018135, 0.1226145476102829, -0.20970980823040009, 0.1095525398850441, -0.12525515258312225, -0.1340814083814621, 0.058996543288230896, 0.1704626828432083, 0.22906100749969482, 0.19933614134788513, -0.1311570554971695, 0.033897776156663895, 0.12409887462854385, 0.025458646938204765, -0.1652226746082306, 0.01569800078868866, -0.12158522754907608, -0.20786209404468536, 0.09426749497652054, -0.008346544578671455, 0.038308754563331604, -0.12583516538143158, 0.21124611794948578, -0.07142540067434311, 0.05713391304016113, -0.09890681505203247, 0.13523930311203003, -0.115238256752491, 0.08497539162635803, -0.04713338240981102, -0.026684198528528214, 0.08405373990535736, 0.09882160276174545, -0.04973987862467766, -0.052681367844343185, -0.05729810893535614, -0.08075825124979019, -0.07715031504631042, 0.05714881420135498, -0.008103625848889351, 0.07561811059713364, 0.045625731348991394, -0.19077254831790924, 0.0791667103767395, 0.1283460557460785, -0.043776270002126694, 0.06917370855808258, 0.1051005944609642, -0.15869848430156708, 0.24275006353855133, -0.2347393035888672, -0.05254844203591347, 0.00981190986931324, -0.0732087790966034, 0.02995040826499462, -0.09098679572343826, -0.05482763797044754, -0.03303905203938484, -0.014820101670920849, -0.17967069149017334, -0.05550985783338547, -0.07600203901529312, -0.08401031792163849, 0.03190955892205238, 0.02933652326464653, -0.07340794801712036, 0.01672920025885105, 0.04288711026310921, 0.11270526796579361, 0.3252256214618683, -0.2239973545074463, -0.09095628559589386, -0.039403703063726425, 0.006640837527811527, -0.003683242714032531, 0.1371079832315445, 0.1092490553855896, -0.13670165836811066, -0.05284078046679497, -0.17102302610874176, 0.16918660700321198, 0.020481813699007034, -0.04819118604063988, -0.010959678329527378, -0.06387414038181305, -0.05094245821237564, -0.007112898398190737, -0.009171154350042343, -0.11098194122314453, -0.1855107545852661, 0.09485208988189697, -0.04511948674917221, -0.031612373888492584, 0.2806595265865326, 0.03794143348932266, -0.06029629707336426, -0.046975623816251755, -0.15482129156589508, -0.1323886513710022, 0.10363319516181946, 0.1867906004190445, 0.018064871430397034, -0.08906931430101395, -0.03214400261640549, -0.08599170297384262, 0.12203213572502136, 0.06483124941587448, -0.07134705781936646, 0.06679642200469971, 0.0373433381319046, -0.0533951036632061, -0.007225906942039728, -0.025120602920651436, 0.14180594682693481, -0.07590588927268982, -0.1359693855047226, 0.005644829478114843, 0.061978843063116074, -0.1193789690732956, 0.22773072123527527, -0.15266555547714233, 0.20651587843894958, -0.009426030330359936, 0.1022682636976242, 0.2352871149778366, -0.061535272747278214, -0.05675892159342766, 0.053611062467098236, 0.15156352519989014, -0.08894472569227219, -0.013904104009270668, -0.19908954203128815, 0.19738557934761047, -0.06026501581072807, -0.24988536536693573, -0.1136869266629219, -0.05591108277440071, -0.021789368242025375, 0.02133600227534771, -0.11704492568969727, 0.037148188799619675, -0.11769336462020874, 0.09839660674333572, -0.05897645279765129, -0.058661721646785736, 0.17377257347106934, 0.1543327420949936, 0.09152868390083313, 0.03866461291909218, 0.11577708274126053, -0.13411617279052734, 0.23825740814208984, 0.1559542864561081, -0.17257198691368103, 0.045498237013816833, -0.1803400218486786, 0.038077179342508316, -0.10258045047521591, 0.10612247884273529, 0.024620337411761284, 0.005610935855656862, 0.038350801914930344, 0.21537581086158752, 0.14207151532173157, -0.05385016277432442, 0.10605423152446747, 0.2177080512046814, -0.010225743055343628, 0.10987994819879532, -0.15795229375362396, 0.15224581956863403, -0.019293786957859993, 0.10526402294635773, 0.3248504400253296, 0.051577191799879074, 0.0637781023979187, 0.06913790851831436, -0.07243417203426361, -0.012739891186356544, 0.07692787051200867, -0.07399267703294754, -0.05086638778448105, -0.243434876203537, -0.05998606979846954, 0.05078389495611191, 0.24700148403644562, 0.07308288663625717, -0.16134130954742432, 0.0008986752945929766, -0.011439106427133083, 0.08521606028079987, -0.04626011103391647, 0.0322880856692791, -0.08404198288917542, 0.1200389638543129, 0.07275348901748657, -0.0058552357368171215, -0.0873040109872818, 0.12195888161659241, -0.10724109411239624, 0.0876796543598175, -0.09462554007768631, -0.09865738451480865, 0.0666542574763298, 0.05992761626839638, -0.16221174597740173, 0.15806472301483154, -0.17556017637252808, 0.014829608611762524, -0.04447002336382866, 0.12315439432859421, 0.011494561098515987, -0.22782330214977264, -0.0643930733203888, -0.1609341949224472, -0.11255524307489395, 0.0574541836977005, -0.06104089692234993, 0.028881242498755455, -0.07837177067995071, 0.07504376769065857, 0.13231606781482697, 0.07632521539926529, 0.009415418840944767, 0.05014549940824509, 0.12495157122612, 0.06947515904903412, 0.18656273186206818, 0.3035963475704193, 0.0410495325922966, -0.12212543934583664, 0.06535711884498596, 0.11517854779958725, 0.031802862882614136, 0.021038608625531197, 0.11225494742393494, 0.0068795690312981606, -0.036063361912965775, 0.0239894799888134, 0.09039658308029175, 0.042630214244127274, -0.08618561923503876, 0.1341361403465271, 0.21517930924892426, 0.07200172543525696, -0.07004816085100174, 0.08466231822967529, 0.15664136409759521, 0.038098908960819244, 0.0006191818392835557, -0.14237511157989502, 0.054347097873687744, 0.04012613743543625, -0.080735944211483, 0.1108228787779808, -0.15268918871879578, 0.017233338207006454, 0.07377304136753082, 0.029755065217614174, -0.01720057614147663, -0.04752601310610771, 0.042124200612306595, 0.117930568754673, 0.025980941951274872, -0.07431191205978394, -0.07547079771757126, 0.0634840726852417, -0.13926774263381958, -0.037373725324869156, 0.06553352624177933, 0.1022992879152298, 0.0758320689201355, 0.07351283729076385, 0.11390189826488495, -0.09821229428052902, 0.03380511328577995, -0.08013667911291122, -0.001701820408925414, -0.25508251786231995, -0.028721218928694725, 0.2468760907649994, 0.05658067390322685, -0.005578133277595043, -0.039217013865709305, 0.09184910356998444, -0.12642282247543335, 0.06971008330583572, -0.050198234617710114, -0.061106882989406586, -0.04355587065219879, 0.16555069386959076, 0.017727704718708992, 0.15299245715141296, 0.12834616005420685, 0.14459185302257538, 0.03393683210015297, -0.045801449567079544, 0.05008404701948166, 0.12372229248285294, 0.04524993523955345, 0.17421221733093262, -0.1506914645433426, -0.12127919495105743, -0.3253590762615204, 0.06111764907836914, 0.04220771789550781, 0.1457187831401825, 0.07413565367460251, 0.0020780167542397976, -0.001318712835200131, -0.041157107800245285, -0.19342400133609772, -0.04836665466427803, 0.18545657396316528, 0.1354581117630005, -0.06518987566232681, 0.02047295682132244, -2.380665672835816e-32, 0.00804539117962122, -0.03186425566673279, -0.031685542315244675, -0.033678047358989716, -0.08809435367584229, 0.06714840978384018, 0.048388563096523285, -0.12560848891735077, 0.10163910686969757, 0.003917919471859932, -0.17852605879306793, -0.07396265864372253, 0.06874063611030579, 0.0626070573925972, -0.08919305354356766, 0.012403041124343872, 0.012309703044593334, 0.016459999606013298, -0.15388166904449463, 0.01789887621998787, 0.17462697625160217, 0.00893654115498066, 0.17699800431728363, -0.0068434299901127815, -0.07355832308530807, 0.07880449295043945, -0.037937525659799576, -0.2961626350879669, -0.07730220258235931, -0.008822846226394176, -0.0876278430223465, 0.22550764679908752, -0.05123966932296753, 0.002227123361080885, -0.05753890052437782, -0.09658283740282059, 0.011522303335368633, -0.062705397605896, 0.037710122764110565, -0.11092007905244827, 0.034815724939107895, 0.17821107804775238, 0.15246173739433289, -0.017789790406823158, -0.011985288932919502, 0.16097299754619598, 0.025848092511296272, 0.11724157631397247, -0.02007962018251419, -0.020599544048309326, 0.02325720340013504, 0.0318010076880455, -0.028786586597561836, -0.02438482828438282, -0.01754533126950264, -0.2881152033805847, 0.030572226271033287, -0.02372942678630352, -0.1612158715724945, 0.009774870239198208, 0.05508469417691231, -0.07949280738830566, 0.09001019597053528, -0.02633528970181942, 0.03158452734351158, -0.022832904011011124, 0.3494112193584442, 0.024621568620204926, 0.09193016588687897, -0.15071362257003784, 0.06299065798521042, -0.0029671064112335443, -0.18733981251716614, 0.01657530479133129, -0.07538136839866638, -0.026917265728116035, -0.08712779730558395, -0.0554308220744133, -0.0023356289602816105, -0.11366736888885498, -0.015325566753745079, 0.09234433621168137, 0.11180993169546127, 0.04354355111718178, -0.08379174023866653, -0.08124527335166931, 0.11203723400831223, -0.015587928704917431, -0.06506197154521942, -0.1321379542350769, -0.019885960966348648, 0.11189421266317368, -0.21882767975330353, 0.04296732321381569, -0.13447284698486328, -0.09211121499538422, -0.01345878466963768, 0.08666222542524338, -0.1618514060974121, -0.05813165754079819, -0.04540732502937317, -0.08320825546979904, 0.049763940274715424, 0.1140015721321106, 0.21548199653625488, -0.04873232915997505, 0.05314658582210541, -0.02707142010331154, -0.17496465146541595, 0.007041123695671558, -0.09322693943977356, 0.05252727121114731, 0.12365873903036118, 0.013814356178045273, 0.26304012537002563, -0.051909055560827255, -0.02029169164597988, -0.15955694019794464, 0.07111692428588867, 0.2502821981906891, -0.057577479630708694, -0.031261149793863297, -0.046233098953962326, -0.06954601407051086, 0.10296864062547684, 0.10074054449796677, -0.19894272089004517, -0.009531785733997822, 0.040233805775642395, -0.03175259009003639, 0.14036180078983307, -0.06785999238491058, 7.495020781789208e-7, 0.0059760198928415775, 0.0730656310915947, 0.06240839883685112, -0.13256245851516724, -0.09579396992921829, 0.15301427245140076, -0.21366414427757263, 0.0813998207449913, 0.10310570895671844, 0.16223128139972687, 0.0431327298283577, -0.14711998403072357, 0.014924793504178524, -0.0735122486948967, 0.005546296946704388, -0.06981898099184036, -0.12561190128326416, 0.14726123213768005, 0.004693268798291683, 0.07061006128787994, -0.08188484609127045, -0.024097494781017303, 0.1887701451778412, -0.06961384415626526, -0.008710703812539577, 0.13066136837005615, -0.07139185816049576, -0.004279129207134247, 0.03439377620816231, -0.027933118864893913, 0.09492919594049454, 0.0036284250672906637, 0.13881132006645203, 0.15072225034236908, -0.057981375604867935, 0.13647671043872833, -0.08102063089609146, 0.07579527050256729, -0.004538116045296192, -0.06889446824789047, -0.11841833591461182, 0.11128376424312592, 0.07897937297821045, -0.1546695977449417, 0.13022249937057495, -0.09063603729009628, -0.05624060332775116, -0.09812483936548233, -0.14620444178581238, 0.19987931847572327, 0.08967079967260361, 0.164496511220932, -0.03446348011493683, 0.30111163854599, -0.06864169985055923, 0.07865966856479645, -0.10048066824674606, -0.22562767565250397, 0.1585617959499359, -0.13826613128185272, -0.1701662242412567, -0.07075236737728119, -0.04322228580713272, 0.07906660437583923, -0.07075247168540955, -0.14740504324436188, -0.14911937713623047, 1.3148810041528144e-34, 0.03084416128695011, -0.03832034021615982, 0.0007571097230538726, -0.10299127548933029, -0.09319563955068588, -0.10662496089935303, 0.21076728403568268, 0.173990398645401, -0.018077651038765907, -0.07614430785179138, -0.07029768824577332 ]
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.05370331555604935, 0.09016449004411697, -0.06694222241640091, -0.16696515679359436, 0.16806840896606445, -0.11115274578332901, 0.14727525413036346, 0.07534642517566681, 0.09735727310180664, 0.07620877027511597, 0.05280112475156784, 0.10683634877204895, 0.01741383783519268, 0.13247166574001312, 0.03817718103528023, 0.02339528501033783, 0.05064952373504639, -0.04816356301307678, -0.10362361371517181, 0.03390316292643547, -0.15233592689037323, 0.1388334184885025, 0.1404346078634262, 0.23517337441444397, -0.1008652001619339, -0.18864615261554718, -0.10564950853586197, 0.14941303431987762, -0.04289303719997406, -0.009509672410786152, -0.05374997481703758, 0.04360440745949745, 0.028284698724746704, 0.0583784282207489, 0.000005208831225900212, -0.050401702523231506, 0.104510098695755, -0.048195041716098785, -0.02844415046274662, -0.020725427195429802, 0.09616108983755112, -0.037768248468637466, 0.07536747306585312, -0.010927136987447739, -0.09437023848295212, 0.028243789449334145, -0.06571900844573975, 0.0002415525377728045, 0.24271558225154877, 0.05466814711689949, -0.04502186179161072, -0.06068415939807892, -0.1109086275100708, -0.05912012979388237, -0.03442490100860596, -0.031064672395586967, 0.1612328588962555, 0.08856850117444992, -0.24361015856266022, -0.2590726912021637, -0.009002762846648693, -0.14801108837127686, -0.10901753604412079, -0.1478394716978073, -0.14203114807605743, -0.047129034996032715, -0.18981415033340454, -0.03644374758005142, -0.08622647821903229, 0.03005240485072136, -0.09184026718139648, -0.09458234161138535, -0.1372210532426834, 0.037482116371393204, -0.0960608422756195, -0.04727545380592346, -0.015766680240631104, -0.03321343660354614, 0.024577397853136063, 0.1695745438337326, 0.05971729755401611, 0.04643610492348671, 0.07566974312067032, -0.04009595513343811, -0.178714781999588, 0.06423065066337585, -0.10037796944379807, 0.14396396279335022, -0.05216943100094795, -0.10381440818309784, -0.02167399972677231, -0.05501318722963333, -0.028559919446706772, -0.07163837552070618, 0.006036486942321062, -0.03758072480559349, -0.06542310118675232, -0.18678779900074005, -0.023356197401881218, 0.14444881677627563, -0.13188888132572174, -0.12904316186904907, -0.05970335006713867, 0.09864385426044464, 0.02939266338944435, -0.05654362589120865, -0.0445367768406868, 0.27738067507743835, 0.0042129396460950375, -0.0771106407046318, -0.21645519137382507, 0.0996897742152214, -0.0888763964176178, -0.00909474492073059, 0.14938002824783325, 0.07293935865163803, -0.06302700936794281, 0.12495523691177368, 0.01729467511177063, 0.14648988842964172, -0.07575032114982605, 0.07484117895364761, -0.03686327487230301, -0.08959474414587021, 0.03329155966639519, -0.0016318646958097816, 0.11256963014602661, 0.08309721946716309, 0.009348176419734955, -0.034425631165504456, -0.05989198014140129, 0.009298941120505333, -0.03460659459233284, 0.009187386371195316, 0.09760359674692154, -0.027531130239367485, 0.022174401208758354, -0.1750277578830719, 0.015570275485515594, -0.16166052222251892, 0.15597127377986908, -0.12683770060539246, -0.0017097399104386568, -0.01410053949803114, 0.10691247135400772, 0.18241597712039948, 0.07712101936340332, -0.21815750002861023, -0.06891164928674698, -0.07064925134181976, -0.12562142312526703, 0.0925038754940033, -0.1883210837841034, 0.0697791576385498, -0.1958611160516739, 0.07628866285085678, -0.1206243708729744, -0.06591959297657013, -0.19956758618354797, -0.05927634984254837, 0.10347376018762589, -0.01730123721063137, 0.07507899403572083, -0.1601780503988266, 0.08336607366800308, 0.08428459614515305, -0.08679086714982986, 0.12722598016262054, -0.006392862182110548, -0.00985303707420826, 0.27684667706489563, -0.021756961941719055, -0.09421160817146301, -0.03357340022921562, -0.15440256893634796, 0.40206819772720337, -0.12825964391231537, 0.03976142778992653, -0.20624150335788727, -0.13163018226623535, 0.04949819669127464, -0.08629445731639862, -0.03946727141737938, -0.3293612599372864, 0.03970974311232567, -0.01980005018413067, -0.06375963985919952, 0.12267419695854187, 0.012485062703490257, -0.1070738211274147, -0.08878441154956818, 0.053729232400655746, 0.015392238274216652, -0.21672029793262482, 0.11786313354969025, -0.011209958232939243, -0.08173803240060806, -0.024956725537776947, 0.02022874355316162, -0.2084949016571045, 0.01435016468167305, -0.18735326826572418, 0.07004866003990173, 0.0277408380061388, 0.023806726559996605, -0.06063483655452728, -0.1709112823009491, 0.04363327473402023, 0.004188064485788345, -0.08687306195497513, -0.15379050374031067, 0.11203866451978683, -0.022778958082199097, 0.01731429621577263, -0.20187096297740936, -0.09340926259756088, 0.07683860510587692, -0.017292162403464317, 0.042175982147455215, 0.1520875096321106, -0.023728245869278908, -0.07287102937698364, 0.12211762368679047, 0.07058419287204742, 0.16471204161643982, 0.15207184851169586, -0.028959333896636963, -0.10925949364900589, 0.005152047146111727, 0.06489941477775574, -0.00918718334287405, -0.031028077006340027, 0.16326069831848145, 0.1680426001548767, 0.03006613813340664, -0.03357260301709175, 0.03831159323453903, -0.20055411756038666, -0.017101990059018135, 0.1226145476102829, -0.20970980823040009, 0.1095525398850441, -0.12525515258312225, -0.1340814083814621, 0.058996543288230896, 0.1704626828432083, 0.22906100749969482, 0.19933614134788513, -0.1311570554971695, 0.033897776156663895, 0.12409887462854385, 0.025458646938204765, -0.1652226746082306, 0.01569800078868866, -0.12158522754907608, -0.20786209404468536, 0.09426749497652054, -0.008346544578671455, 0.038308754563331604, -0.12583516538143158, 0.21124611794948578, -0.07142540067434311, 0.05713391304016113, -0.09890681505203247, 0.13523930311203003, -0.115238256752491, 0.08497539162635803, -0.04713338240981102, -0.026684198528528214, 0.08405373990535736, 0.09882160276174545, -0.04973987862467766, -0.052681367844343185, -0.05729810893535614, -0.08075825124979019, -0.07715031504631042, 0.05714881420135498, -0.008103625848889351, 0.07561811059713364, 0.045625731348991394, -0.19077254831790924, 0.0791667103767395, 0.1283460557460785, -0.043776270002126694, 0.06917370855808258, 0.1051005944609642, -0.15869848430156708, 0.24275006353855133, -0.2347393035888672, -0.05254844203591347, 0.00981190986931324, -0.0732087790966034, 0.02995040826499462, -0.09098679572343826, -0.05482763797044754, -0.03303905203938484, -0.014820101670920849, -0.17967069149017334, -0.05550985783338547, -0.07600203901529312, -0.08401031792163849, 0.03190955892205238, 0.02933652326464653, -0.07340794801712036, 0.01672920025885105, 0.04288711026310921, 0.11270526796579361, 0.3252256214618683, -0.2239973545074463, -0.09095628559589386, -0.039403703063726425, 0.006640837527811527, -0.003683242714032531, 0.1371079832315445, 0.1092490553855896, -0.13670165836811066, -0.05284078046679497, -0.17102302610874176, 0.16918660700321198, 0.020481813699007034, -0.04819118604063988, -0.010959678329527378, -0.06387414038181305, -0.05094245821237564, -0.007112898398190737, -0.009171154350042343, -0.11098194122314453, -0.1855107545852661, 0.09485208988189697, -0.04511948674917221, -0.031612373888492584, 0.2806595265865326, 0.03794143348932266, -0.06029629707336426, -0.046975623816251755, -0.15482129156589508, -0.1323886513710022, 0.10363319516181946, 0.1867906004190445, 0.018064871430397034, -0.08906931430101395, -0.03214400261640549, -0.08599170297384262, 0.12203213572502136, 0.06483124941587448, -0.07134705781936646, 0.06679642200469971, 0.0373433381319046, -0.0533951036632061, -0.007225906942039728, -0.025120602920651436, 0.14180594682693481, -0.07590588927268982, -0.1359693855047226, 0.005644829478114843, 0.061978843063116074, -0.1193789690732956, 0.22773072123527527, -0.15266555547714233, 0.20651587843894958, -0.009426030330359936, 0.1022682636976242, 0.2352871149778366, -0.061535272747278214, -0.05675892159342766, 0.053611062467098236, 0.15156352519989014, -0.08894472569227219, -0.013904104009270668, -0.19908954203128815, 0.19738557934761047, -0.06026501581072807, -0.24988536536693573, -0.1136869266629219, -0.05591108277440071, -0.021789368242025375, 0.02133600227534771, -0.11704492568969727, 0.037148188799619675, -0.11769336462020874, 0.09839660674333572, -0.05897645279765129, -0.058661721646785736, 0.17377257347106934, 0.1543327420949936, 0.09152868390083313, 0.03866461291909218, 0.11577708274126053, -0.13411617279052734, 0.23825740814208984, 0.1559542864561081, -0.17257198691368103, 0.045498237013816833, -0.1803400218486786, 0.038077179342508316, -0.10258045047521591, 0.10612247884273529, 0.024620337411761284, 0.005610935855656862, 0.038350801914930344, 0.21537581086158752, 0.14207151532173157, -0.05385016277432442, 0.10605423152446747, 0.2177080512046814, -0.010225743055343628, 0.10987994819879532, -0.15795229375362396, 0.15224581956863403, -0.019293786957859993, 0.10526402294635773, 0.3248504400253296, 0.051577191799879074, 0.0637781023979187, 0.06913790851831436, -0.07243417203426361, -0.012739891186356544, 0.07692787051200867, -0.07399267703294754, -0.05086638778448105, -0.243434876203537, -0.05998606979846954, 0.05078389495611191, 0.24700148403644562, 0.07308288663625717, -0.16134130954742432, 0.0008986752945929766, -0.011439106427133083, 0.08521606028079987, -0.04626011103391647, 0.0322880856692791, -0.08404198288917542, 0.1200389638543129, 0.07275348901748657, -0.0058552357368171215, -0.0873040109872818, 0.12195888161659241, -0.10724109411239624, 0.0876796543598175, -0.09462554007768631, -0.09865738451480865, 0.0666542574763298, 0.05992761626839638, -0.16221174597740173, 0.15806472301483154, -0.17556017637252808, 0.014829608611762524, -0.04447002336382866, 0.12315439432859421, 0.011494561098515987, -0.22782330214977264, -0.0643930733203888, -0.1609341949224472, -0.11255524307489395, 0.0574541836977005, -0.06104089692234993, 0.028881242498755455, -0.07837177067995071, 0.07504376769065857, 0.13231606781482697, 0.07632521539926529, 0.009415418840944767, 0.05014549940824509, 0.12495157122612, 0.06947515904903412, 0.18656273186206818, 0.3035963475704193, 0.0410495325922966, -0.12212543934583664, 0.06535711884498596, 0.11517854779958725, 0.031802862882614136, 0.021038608625531197, 0.11225494742393494, 0.0068795690312981606, -0.036063361912965775, 0.0239894799888134, 0.09039658308029175, 0.042630214244127274, -0.08618561923503876, 0.1341361403465271, 0.21517930924892426, 0.07200172543525696, -0.07004816085100174, 0.08466231822967529, 0.15664136409759521, 0.038098908960819244, 0.0006191818392835557, -0.14237511157989502, 0.054347097873687744, 0.04012613743543625, -0.080735944211483, 0.1108228787779808, -0.15268918871879578, 0.017233338207006454, 0.07377304136753082, 0.029755065217614174, -0.01720057614147663, -0.04752601310610771, 0.042124200612306595, 0.117930568754673, 0.025980941951274872, -0.07431191205978394, -0.07547079771757126, 0.0634840726852417, -0.13926774263381958, -0.037373725324869156, 0.06553352624177933, 0.1022992879152298, 0.0758320689201355, 0.07351283729076385, 0.11390189826488495, -0.09821229428052902, 0.03380511328577995, -0.08013667911291122, -0.001701820408925414, -0.25508251786231995, -0.028721218928694725, 0.2468760907649994, 0.05658067390322685, -0.005578133277595043, -0.039217013865709305, 0.09184910356998444, -0.12642282247543335, 0.06971008330583572, -0.050198234617710114, -0.061106882989406586, -0.04355587065219879, 0.16555069386959076, 0.017727704718708992, 0.15299245715141296, 0.12834616005420685, 0.14459185302257538, 0.03393683210015297, -0.045801449567079544, 0.05008404701948166, 0.12372229248285294, 0.04524993523955345, 0.17421221733093262, -0.1506914645433426, -0.12127919495105743, -0.3253590762615204, 0.06111764907836914, 0.04220771789550781, 0.1457187831401825, 0.07413565367460251, 0.0020780167542397976, -0.001318712835200131, -0.041157107800245285, -0.19342400133609772, -0.04836665466427803, 0.18545657396316528, 0.1354581117630005, -0.06518987566232681, 0.02047295682132244, -2.380665672835816e-32, 0.00804539117962122, -0.03186425566673279, -0.031685542315244675, -0.033678047358989716, -0.08809435367584229, 0.06714840978384018, 0.048388563096523285, -0.12560848891735077, 0.10163910686969757, 0.003917919471859932, -0.17852605879306793, -0.07396265864372253, 0.06874063611030579, 0.0626070573925972, -0.08919305354356766, 0.012403041124343872, 0.012309703044593334, 0.016459999606013298, -0.15388166904449463, 0.01789887621998787, 0.17462697625160217, 0.00893654115498066, 0.17699800431728363, -0.0068434299901127815, -0.07355832308530807, 0.07880449295043945, -0.037937525659799576, -0.2961626350879669, -0.07730220258235931, -0.008822846226394176, -0.0876278430223465, 0.22550764679908752, -0.05123966932296753, 0.002227123361080885, -0.05753890052437782, -0.09658283740282059, 0.011522303335368633, -0.062705397605896, 0.037710122764110565, -0.11092007905244827, 0.034815724939107895, 0.17821107804775238, 0.15246173739433289, -0.017789790406823158, -0.011985288932919502, 0.16097299754619598, 0.025848092511296272, 0.11724157631397247, -0.02007962018251419, -0.020599544048309326, 0.02325720340013504, 0.0318010076880455, -0.028786586597561836, -0.02438482828438282, -0.01754533126950264, -0.2881152033805847, 0.030572226271033287, -0.02372942678630352, -0.1612158715724945, 0.009774870239198208, 0.05508469417691231, -0.07949280738830566, 0.09001019597053528, -0.02633528970181942, 0.03158452734351158, -0.022832904011011124, 0.3494112193584442, 0.024621568620204926, 0.09193016588687897, -0.15071362257003784, 0.06299065798521042, -0.0029671064112335443, -0.18733981251716614, 0.01657530479133129, -0.07538136839866638, -0.026917265728116035, -0.08712779730558395, -0.0554308220744133, -0.0023356289602816105, -0.11366736888885498, -0.015325566753745079, 0.09234433621168137, 0.11180993169546127, 0.04354355111718178, -0.08379174023866653, -0.08124527335166931, 0.11203723400831223, -0.015587928704917431, -0.06506197154521942, -0.1321379542350769, -0.019885960966348648, 0.11189421266317368, -0.21882767975330353, 0.04296732321381569, -0.13447284698486328, -0.09211121499538422, -0.01345878466963768, 0.08666222542524338, -0.1618514060974121, -0.05813165754079819, -0.04540732502937317, -0.08320825546979904, 0.049763940274715424, 0.1140015721321106, 0.21548199653625488, -0.04873232915997505, 0.05314658582210541, -0.02707142010331154, -0.17496465146541595, 0.007041123695671558, -0.09322693943977356, 0.05252727121114731, 0.12365873903036118, 0.013814356178045273, 0.26304012537002563, -0.051909055560827255, -0.02029169164597988, -0.15955694019794464, 0.07111692428588867, 0.2502821981906891, -0.057577479630708694, -0.031261149793863297, -0.046233098953962326, -0.06954601407051086, 0.10296864062547684, 0.10074054449796677, -0.19894272089004517, -0.009531785733997822, 0.040233805775642395, -0.03175259009003639, 0.14036180078983307, -0.06785999238491058, 7.495020781789208e-7, 0.0059760198928415775, 0.0730656310915947, 0.06240839883685112, -0.13256245851516724, -0.09579396992921829, 0.15301427245140076, -0.21366414427757263, 0.0813998207449913, 0.10310570895671844, 0.16223128139972687, 0.0431327298283577, -0.14711998403072357, 0.014924793504178524, -0.0735122486948967, 0.005546296946704388, -0.06981898099184036, -0.12561190128326416, 0.14726123213768005, 0.004693268798291683, 0.07061006128787994, -0.08188484609127045, -0.024097494781017303, 0.1887701451778412, -0.06961384415626526, -0.008710703812539577, 0.13066136837005615, -0.07139185816049576, -0.004279129207134247, 0.03439377620816231, -0.027933118864893913, 0.09492919594049454, 0.0036284250672906637, 0.13881132006645203, 0.15072225034236908, -0.057981375604867935, 0.13647671043872833, -0.08102063089609146, 0.07579527050256729, -0.004538116045296192, -0.06889446824789047, -0.11841833591461182, 0.11128376424312592, 0.07897937297821045, -0.1546695977449417, 0.13022249937057495, -0.09063603729009628, -0.05624060332775116, -0.09812483936548233, -0.14620444178581238, 0.19987931847572327, 0.08967079967260361, 0.164496511220932, -0.03446348011493683, 0.30111163854599, -0.06864169985055923, 0.07865966856479645, -0.10048066824674606, -0.22562767565250397, 0.1585617959499359, -0.13826613128185272, -0.1701662242412567, -0.07075236737728119, -0.04322228580713272, 0.07906660437583923, -0.07075247168540955, -0.14740504324436188, -0.14911937713623047, 1.3148810041528144e-34, 0.03084416128695011, -0.03832034021615982, 0.0007571097230538726, -0.10299127548933029, -0.09319563955068588, -0.10662496089935303, 0.21076728403568268, 0.173990398645401, -0.018077651038765907, -0.07614430785179138, -0.07029768824577332 ]
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.15389961004257202, 0.2028130292892456, -0.17879606783390045, 0.10227102786302567, 0.05741019546985626, 0.22558718919754028, 0.1638682782649994, -0.054137032479047775, -0.05728602409362793, 0.26740315556526184, -0.05897163599729538, 0.13443514704704285, -0.07579287886619568, 0.03541171923279762, -0.04403544217348099, -0.1673624962568283, 0.04971572756767273, 0.06479756534099579, -0.0869983583688736, 0.06693712621927261, 0.06847301870584488, -0.0010416693985462189, 0.061702910810709, 0.05522295460104942, -0.07679405808448792, 0.04058685898780823, 0.013333361595869064, -0.0307677760720253, 0.08095867931842804, 0.14336593449115753, 0.1695154458284378, 0.07886835187673569, -0.0173968318849802, -0.01802562177181244, 0.000005079866241430864, 0.0008927637245506048, 0.06440164148807526, -0.0960487350821495, -0.1566476672887802, -0.05744028091430664, -0.08073891699314117, 0.08381195366382599, 0.054515641182661057, -0.08930610120296478, -0.12032631784677505, -0.0944867953658104, 0.08764798194169998, -0.0009478986030444503, 0.1458350121974945, -0.08429112285375595, -0.10237020254135132, 0.019047655165195465, -0.07728957384824753, -0.04055905342102051, 0.041102271527051926, 0.18309743702411652, 0.005558095406740904, 0.11218098551034927, -0.3022628426551819, -0.09321530908346176, 0.18775351345539093, -0.10665672272443771, 0.0808563232421875, 0.16552308201789856, -0.1372452676296234, -0.0353708453476429, -0.27503830194473267, 0.034731119871139526, 0.047782912850379944, 0.24923698604106903, -0.0372626893222332, -0.21371984481811523, -0.002697273623198271, -0.03580716252326965, 0.015734193846583366, 0.01945812627673149, -0.18872936069965363, -0.010420315898954868, -0.051380276679992676, 0.09994693845510483, -0.07401397079229355, -0.018117494881153107, 0.05951093137264252, -0.11448618769645691, -0.10183705389499664, -0.17969630658626556, -0.12503637373447418, 0.15186968445777893, -0.1090305745601654, -0.021210744976997375, 0.06326515227556229, 0.14800958335399628, -0.026800140738487244, 0.007440946064889431, -0.11206469684839249, 0.14861595630645752, -0.18967464566230774, -0.07267685234546661, 0.10946907103061676, -0.08697380125522614, 0.12802214920520782, 0.07550501823425293, -0.19909235835075378, -0.03166082128882408, 0.18551544845104218, -0.08009355515241623, -0.21927861869335175, -0.10283609479665756, 0.01989836059510708, -0.08126439154148102, -0.11492139101028442, 0.09604153037071228, -0.01265814621001482, -0.11340518295764923, 0.1125311329960823, 0.21202386915683746, -0.021333852782845497, 0.052194755524396896, -0.140424445271492, 0.012085973285138607, -0.05330805107951164, 0.12431757152080536, -0.08404408395290375, 0.004962370730936527, 0.02291261963546276, -0.0884086936712265, 0.005194184370338917, -0.001441458472982049, -0.005875290837138891, -0.08644883334636688, 0.08171030133962631, -0.001797571312636137, 0.1306464970111847, -0.0067763617262244225, -0.01912037841975689, -0.14115552604198456, -0.09232012927532196, -0.004606782458722591, 0.04176194593310356, -0.06996459513902664, 0.16798870265483856, -0.029422085732221603, -0.024421053007245064, -0.006292044185101986, 0.1866896152496338, -0.025571128353476524, -0.02306591346859932, 0.0003899444709531963, -0.1357836127281189, 0.33531293272972107, 0.04986974596977234, 0.2468690574169159, -0.1276472508907318, 0.2279207557439804, 0.01749860681593418, -0.011280493810772896, -0.022369449958205223, -0.11834392696619034, -0.2949596047401428, -0.011912400834262371, 0.06183294579386711, -0.09618721157312393, 0.020873960107564926, 0.0537622794508934, 0.09510418027639389, 0.10346661508083344, -0.023882659152150154, 0.1335161328315735, -0.08277293294668198, -0.1602594405412674, -0.09052210301160812, -0.02141762524843216, -0.03110865131020546, -0.11881794035434723, 0.03920917585492134, 0.11828101426362991, 0.04335150867700577, 0.16673046350479126, -0.013037268072366714, 0.10607215762138367, 0.12028487771749496, 0.06621122360229492, 0.07934457063674927, -0.05555905029177666, 0.27967652678489685, -0.05402086302638054, 0.01572423055768013, -0.05117342621088028, -0.12182130664587021, -0.09280736744403839, 0.017628539353609085, -0.06362548470497131, 0.11879660934209824, 0.31476080417633057, -0.033007994294166565, 0.05458827316761017, 0.13470250368118286, -0.002038781763985753, 0.10800179839134216, -0.052123960107564926, -0.22347550094127655, -0.20647993683815002, -0.11545463651418686, -0.007232203613966703, 0.054853856563568115, -0.1354217231273651, -0.14553289115428925, 0.10925091058015823, 0.12646779417991638, -0.17613521218299866, 0.07083842158317566, -0.16916604340076447, 0.020824143663048744, -0.08161147683858871, -0.024839283898472786, 0.19111701846122742, -0.1388896405696869, 0.012579906731843948, -0.031407762318849564, 0.03546828031539917, 0.0004147991712670773, 0.16582244634628296, 0.022287776693701744, 0.02555985562503338, 0.05069524049758911, 0.13044403493404388, 0.06468039005994797, 0.11273295432329178, 0.11385843902826309, 0.00676572835072875, -0.06705823540687561, -0.08692184090614319, 0.2699093520641327, -0.003069857368245721, -0.07136759161949158, 0.062333762645721436, 0.04294745624065399, -0.11771579086780548, 0.0857272818684578, 0.010889560915529728, -0.3655199706554413, 0.08882499486207962, -0.06503798067569733, -0.004901226609945297, -0.12671113014221191, 0.1690109819173813, -0.10562025010585785, -0.016934629529714584, -0.006772428285330534, -0.06120707467198372, 0.1890738308429718, 0.08728838711977005, 0.02846452407538891, -0.051526449620723724, -0.06532441824674606, 0.05320991203188896, 0.07001476734876633, 0.16291803121566772, -0.08708446472883224, 0.15446317195892334, -0.20695741474628448, 0.0395018495619297, 0.07281307131052017, 0.009303460828959942, -0.05813783034682274, 0.07531034201383591, 0.07842922955751419, 0.12976640462875366, -0.04606757313013077, 0.15094467997550964, 0.14666378498077393, 0.09341377019882202, -0.03639619052410126, -0.030273154377937317, -0.04883618280291557, -0.17967577278614044, -0.09924343228340149, 0.07617402821779251, 0.10147362947463989, 0.24524439871311188, -0.2755858600139618, 0.031563229858875275, 0.13252858817577362, 0.02470666915178299, 0.12370327115058899, -0.08391853421926498, -0.18882261216640472, -0.14968988299369812, 0.1831628382205963, 0.20841450989246368, 0.04428649693727493, -0.09732397645711899, 0.0678480789065361, 0.004715775139629841, 0.17920415103435516, 0.06109500303864479, -0.011831902898848057, 0.026142993941903114, -0.15483693778514862, 0.054276756942272186, -0.046060770750045776, 0.03662998601794243, 0.18458446860313416, 0.07476522773504257, 0.04285823181271553, 0.13801909983158112, 0.28622332215309143, 0.05749504268169403, -0.18440945446491241, -0.2886868715286255, 0.19278584420681, 0.03961949050426483, 0.1608150750398636, 0.169648215174675, 0.1100362166762352, 0.0065043154172599316, -0.2033378779888153, -0.10855158418416977, 0.052320074290037155, 0.0012971146497875452, -0.1742943674325943, 0.0035402709618210793, -0.110047847032547, 0.12454421818256378, -0.11153917759656906, 0.1481354981660843, 0.1350499540567398, 0.022582288831472397, 0.15430277585983276, -0.0970633402466774, -0.03327053412795067, -0.13084980845451355, -0.02739637903869152, 0.07402276247739792, 0.10018646717071533, -0.1080554723739624, -0.115525022149086, 0.08177623897790909, 0.14841099083423615, 0.06239693611860275, 0.029087768867611885, 0.09331712871789932, -0.010873975232243538, 0.033050600439310074, 0.18184059858322144, -0.09351689368486404, 0.04226568713784218, 0.05113440752029419, -0.04691065475344658, -0.17251405119895935, -0.08745763450860977, 0.07736074924468994, -0.09909802675247192, 0.0029375297017395496, 0.0824025496840477, 0.15583536028862, -0.23852317035198212, 0.11771416664123535, -0.23522765934467316, -0.008057476952672005, -0.0008547818870283663, 0.08816838264465332, 0.032786548137664795, -0.20946645736694336, -0.01062804739922285, -0.039953697472810745, -0.04606369510293007, 0.1063387393951416, 0.0350273922085762, -0.17120248079299927, -0.1167680025100708, -0.2329515814781189, 0.02556254342198372, -0.01802907884120941, -0.05339908227324486, -0.010004501789808273, 0.011382102966308594, -0.028598671779036522, -0.06213218718767166, -0.13209298253059387, -0.004246829077601433, -0.14461587369441986, -0.10136761516332626, -0.00544104864820838, -0.1247154027223587, 0.036691814661026, -0.04385151341557503, -0.059385571628808975, -0.12162641435861588, 0.21892233192920685, -0.12914623320102692, 0.052940431982278824, -0.002618944738060236, -0.00033543980680406094, 0.013071761466562748, 0.013542195782065392, 0.11733531206846237, 0.10999634861946106, 0.21554113924503326, 0.0044705504551529884, -0.006540978793054819, -0.0030048962216824293, -0.03017015941441059, -0.07024688273668289, 0.04108278080821037, -0.09164520353078842, -0.0292431078851223, 0.1514129340648651, 0.1065780445933342, -0.018259277567267418, -0.060492757707834244, -0.09776973724365234, -0.11639045178890228, -0.049439702183008194, 0.2151513397693634, 0.051592424511909485, -0.1818131059408188, -0.11555077880620956, 0.11449293047189713, 0.0040010204538702965, -0.24711653590202332, 0.022932900115847588, -0.013765353709459305, 0.014209953136742115, 0.0951654240489006, -0.09982465207576752, -0.34093502163887024, 0.03757837787270546, 0.05969473719596863, 0.11651542782783508, 0.10877548158168793, 0.12147554755210876, 0.0352846123278141, -0.037311285734176636, 0.15477819740772247, 0.022518154233694077, 0.2202885001897812, -0.10848776251077652, -0.07118873298168182, -0.12215176969766617, -0.07801211625337601, 0.07451741397380829, 0.1591869592666626, -0.014664672315120697, 0.13647858798503876, -0.02400515414774418, -0.04092641919851303, -0.0441816970705986, -0.15357914566993713, 0.0052968948148190975, -0.22859002649784088, -0.04146833345293999, -0.1041465550661087, -0.04812605679035187, 0.1743154078722, -0.028747839853167534, 0.01422211155295372, -0.06818319857120514, -0.0302084032446146, -0.014118033461272717, -0.13234379887580872, -0.05598726496100426, -0.05037014186382294, 0.09983573108911514, -0.23348817229270935, 0.04458843916654587, 0.05751406401395798, 0.017623625695705414, -0.12154549360275269, -0.049896616488695145, -0.09850186854600906, 0.07657667249441147, 0.10239256173372269, 0.07897628098726273, 0.12995456159114838, 0.1500292867422104, -0.08233945816755295, -0.13541492819786072, 0.06323926150798798, 0.08826378732919693, 0.09135595709085464, 0.006448655854910612, 0.2205372303724289, 0.02472979947924614, -0.1522999405860901, 0.13439935445785522, -0.20477494597434998, -0.03892757371068001, -0.14054930210113525, 0.1462162584066391, -0.10625406354665756, -0.01399279572069645, -0.12213844805955887, 0.09264254570007324, -0.21373604238033295, -0.19049042463302612, -0.06338903307914734, 0.033254995942115784, -0.06781924515962601, 0.250057578086853, -0.06630458682775497, -0.03063943237066269, 0.07362636178731918, -0.07884500920772552, 0.0893130674958229, -0.1362556517124176, 0.01904308795928955, -0.24865111708641052, 0.13128003478050232, 0.12735183537006378, 0.029850564897060394, -0.12072780728340149, 0.12830333411693573, -0.072530098259449, 0.2054443359375, -0.09906905889511108, -0.016805114224553108, 0.05171078070998192, -0.01833084225654602, -0.06817714124917984, -0.19092537462711334, -0.01313844509422779, -0.03889048472046852, 0.012687388807535172, 0.06138249859213829, -0.08665696531534195, 0.05313481390476227, -0.15610571205615997, 0.031192293390631676, 0.15751363337039948, 0.06965121626853943, 0.06424951553344727, -0.014125406742095947, -0.06711380183696747, -0.03880046680569649, -0.03218377009034157, 0.10145273059606552, -0.173532173037529, 0.2465316355228424, -0.05385703593492508, 0.15655533969402313, -0.16700497269630432, -0.2213059812784195, 0.10587441176176071, 0.12587083876132965, -0.08372440934181213, -0.08948265761137009, 0.14717088639736176, 0.025376714766025543, 0.022239699959754944, 0.1124567985534668, 0.020634401589632034, 0.06517669558525085, -0.17308221757411957, -0.02897994965314865, -2.2692900810208998e-32, 0.1444987803697586, 0.0981476753950119, -0.05071059614419937, -0.05976422503590584, 0.09468650817871094, -0.11970730870962143, -0.10667680203914642, -0.14960435032844543, 0.04248616844415665, 0.08789945393800735, -0.2104305475950241, 0.08771799504756927, 0.14716917276382446, -0.057584237307310104, -0.02396123856306076, -0.007066765800118446, 0.05985400825738907, -0.1311682015657425, 0.17142698168754578, 0.15001899003982544, 0.19336529076099396, -0.03536520525813103, -0.043037112802267075, 0.06603588163852692, -0.21310646831989288, -0.17083631455898285, -0.07895440608263016, 0.17823682725429535, 0.05955495685338974, 0.005313148722052574, -0.1258566677570343, 0.12086138874292374, 0.19468532502651215, -0.09162572771310806, -0.18899235129356384, 0.11201754212379456, -0.30223745107650757, -0.054525356739759445, -0.09562736004590988, 0.04024413600564003, -0.06250239163637161, 0.07407354563474655, 0.3342117965221405, -0.09913527220487595, -0.060056380927562714, 0.13035117089748383, -0.060942742973566055, -0.1167461946606636, 0.015834545716643333, -0.033366598188877106, 0.07729718834161758, 0.0062079038470983505, 0.08797173202037811, -0.02591877616941929, 0.04742271080613136, 0.0856301486492157, -0.16097478568553925, -0.07466650009155273, -0.12193245440721512, 0.2450750470161438, 0.12717773020267487, 0.11029981076717377, 0.0029906705021858215, -0.059741418808698654, 0.0919422060251236, 0.05717814341187477, 0.3092411458492279, -0.16178983449935913, 0.14736132323741913, 0.07723212987184525, -0.013370636850595474, 0.07942530512809753, -0.13636083900928497, 0.11567475646734238, -0.02892877720296383, -0.07769257575273514, -0.20405475795269012, 0.177773579955101, -0.21914955973625183, -0.0964953750371933, -0.08770101517438889, -0.13044428825378418, 0.08416461199522018, 0.014167449437081814, 0.08297616988420486, 0.15628014504909515, 0.019535867497324944, 0.13673120737075806, 0.0897715836763382, -0.05924414098262787, -0.19882042706012726, 0.03574107214808464, -0.1493966430425644, -0.06403212249279022, -0.04142855107784271, 0.23519334197044373, -0.03217458352446556, -0.037559449672698975, -0.007014202885329723, -0.16790643334388733, -0.0022260926198214293, -0.061539843678474426, 0.011447136290371418, 0.07519291341304779, 0.06443538516759872, 0.02730444259941578, 0.007093752268701792, 0.022278716787695885, -0.27688199281692505, 0.12103718519210815, -0.05276046693325043, -0.00448871124535799, 0.07666964083909988, -0.08086039870977402, -0.0408218689262867, -0.04358440265059471, 0.11570754647254944, 0.08406095951795578, 0.014303410425782204, -0.06304321438074112, -0.18210911750793457, -0.01706160604953766, -0.0016149836592376232, 0.03881095349788666, -0.026877494528889656, 0.05450262874364853, -0.08372608572244644, -0.09586139023303986, 0.10398433357477188, -0.09397684037685394, 0.055047325789928436, 0.09669670462608337, 7.026690127531765e-7, -0.13638082146644592, -0.06362404674291611, 0.08972672373056412, -0.019802067428827286, 0.10405019670724869, 0.20134121179580688, 0.06050694361329079, 0.21965084969997406, -0.1324949413537979, 0.10521703213453293, 0.2515169382095337, -0.13172878324985504, -0.020493630319833755, -0.023449746891856194, -0.04117395356297493, 0.027768561616539955, -0.07264266908168793, -0.03863697499036789, -0.14588747918605804, 0.07249823957681656, -0.012079023756086826, 0.053983889520168304, -0.010053001344203949, -0.14509578049182892, 0.09785328805446625, -0.12015368789434433, -0.1877662092447281, 0.08840646594762802, -0.009041324257850647, 0.07968320697546005, 0.08109809458255768, -0.04270588606595993, -0.07559965550899506, 0.07646498084068298, -0.02585187926888466, 0.031975410878658295, -0.06546284258365631, 0.0053489357233047485, -0.013678763061761856, 0.03298529237508774, 0.09172402322292328, -0.18609514832496643, -0.06341972202062607, -0.062412869185209274, 0.18483684957027435, -0.07527145743370056, -0.14220820367336273, 0.01953267492353916, 0.0712570995092392, 0.037582747638225555, 0.04855616018176079, 0.15879276394844055, -0.11552813649177551, 0.07078734785318375, -0.15871384739875793, -0.028003551065921783, -0.1408737301826477, -0.09857156127691269, 0.018962595611810684, -0.024180427193641663, -0.0919574499130249, 0.010809103026986122, 0.045938827097415924, -0.09803968667984009, 0.048594146966934204, 0.143673837184906, 0.0146756237372756, 1.6155395131089089e-34, -0.0010955549078062177, 0.11043019592761993, 0.045869216322898865, -0.15690046548843384, -0.030601808801293373, -0.0915195643901825, -0.08688080310821533, 0.010493078269064426, 0.007469349540770054, 0.0012907444033771753, -0.1046653687953949 ]
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.11698248982429504, 0.26346275210380554, -0.16701936721801758, 0.0933193638920784, 0.050824087113142014, 0.24084331095218658, 0.12720468640327454, -0.00689123896881938, -0.13017094135284424, 0.27320826053619385, -0.10908448696136475, 0.17241224646568298, -0.06920033693313599, 0.05889592319726944, -0.003836229210719466, -0.1062362939119339, 0.045138318091630936, 0.04395884647965431, -0.06534867733716965, 0.10963255912065506, 0.038606710731983185, 0.00020059497910551727, -0.013053896836936474, 0.07609190791845322, -0.07461562007665634, 0.061075784265995026, 0.03588659688830376, 0.005083879455924034, 0.03235744312405586, 0.05159182846546173, 0.227548286318779, 0.08893898129463196, -0.03087037242949009, -0.061566635966300964, 0.000004951461505697807, 0.05656667798757553, 0.11037339270114899, -0.1250697821378708, -0.10405877232551575, -0.03558039665222168, -0.03910047188401222, 0.04979604110121727, 0.08351855725049973, -0.14278766512870789, -0.06809335201978683, -0.017746616154909134, 0.005623921751976013, 0.0813029482960701, 0.13816235959529877, -0.0929214283823967, -0.10985687375068665, 0.08061669021844864, -0.09692114591598511, -0.05016931891441345, 0.04561435803771019, 0.13403630256652832, 0.04773456230759621, 0.11561161279678345, -0.27201253175735474, -0.16655591130256653, 0.16930221021175385, -0.1413949579000473, 0.06985070556402206, 0.15220150351524353, -0.053316861391067505, 0.00436389772221446, -0.2951240837574005, 0.03107488714158535, 0.00781715102493763, 0.19349674880504608, -0.10015568137168884, -0.2601400911808014, 0.0031327162869274616, -0.09243814647197723, 0.015413235872983932, -0.02436179667711258, -0.2205611616373062, -0.019225148484110832, -0.0937422439455986, 0.06733754277229309, -0.07891035825014114, -0.005612825509160757, 0.02222481183707714, -0.09408842772245407, -0.09010230004787445, -0.14523430168628693, -0.05330956354737282, 0.16477806866168976, -0.02442629262804985, 0.03445718064904213, 0.048901572823524475, 0.15171098709106445, -0.012528820894658566, -0.003972876816987991, -0.12018422037363052, 0.08043695241212845, -0.16603505611419678, -0.005244008265435696, 0.1011861264705658, -0.1168401762843132, 0.09246800094842911, 0.0684993788599968, -0.1679692268371582, -0.04212724044919014, 0.16481395065784454, -0.10417100787162781, -0.2140924036502838, -0.0376867912709713, -0.06413646042346954, -0.06124085187911987, -0.12580420076847076, 0.13156946003437042, -0.017845524474978447, -0.1228066012263298, 0.11126386374235153, 0.22173097729682922, -0.038136597722768784, 0.0656784251332283, -0.1528111696243286, 0.024532616138458252, -0.11858487129211426, 0.12413600832223892, -0.027503861114382744, -0.0012995231663808227, 0.02703617513179779, -0.11142008751630783, 0.015103050507605076, 0.025247765704989433, -0.08988180011510849, -0.01829122006893158, 0.08287937194108963, 0.007181450258940458, 0.0986916646361351, -0.036977726966142654, -0.013197648338973522, -0.11688961833715439, -0.1347072869539261, -0.03146200627088547, 0.11548545211553574, -0.014223717153072357, 0.11747989803552628, 0.000506076030433178, -0.039675869047641754, 0.037290435284376144, 0.1778436154127121, -0.006463242694735527, -0.06041184440255165, 0.015146205201745033, -0.16514448821544647, 0.30494311451911926, 0.09946517646312714, 0.17975887656211853, -0.12613055109977722, 0.23442614078521729, -0.015509562566876411, -0.0008286034571938217, -0.07611162960529327, -0.14030218124389648, -0.3250947594642639, 0.016616279259324074, 0.08208008855581284, -0.18578264117240906, -0.031341664493083954, -0.009626282379031181, 0.0591302327811718, 0.07053876668214798, 0.06226957216858864, 0.09565628319978714, 0.00925565417855978, -0.16051574051380157, -0.07751661539077759, -0.017707262188196182, -0.07342617213726044, -0.1553533375263214, 0.044195108115673065, 0.15323826670646667, 0.0074829827062785625, 0.16626712679862976, -0.010742287151515484, 0.047354672104120255, 0.14902818202972412, 0.07813883572816849, 0.06017202138900757, -0.11181341111660004, 0.27038878202438354, -0.08205760270357132, -0.04986238852143288, -0.03386883810162544, -0.12968379259109497, -0.10402523726224899, 0.028419794514775276, -0.0719984918832779, 0.1108514815568924, 0.27489173412323, -0.022906657308340073, 0.002448201412335038, 0.13422097265720367, -0.06840125471353531, 0.16738811135292053, -0.06383940577507019, -0.13030460476875305, -0.17168180644512177, -0.0819573774933815, -0.04423823952674866, 0.048561565577983856, -0.09820519387722015, -0.16081880033016205, 0.16218721866607666, 0.04836447909474373, -0.12876729667186737, 0.02570107951760292, -0.21267201006412506, 0.023417282849550247, -0.08510584384202957, -0.06231343746185303, 0.20936442911624908, -0.12877915799617767, -0.01816832832992077, -0.0320722721517086, 0.0006181288044899702, 0.020634574815630913, 0.09228672087192535, 0.043584950268268585, 0.04416350647807121, -0.0008276378503069282, 0.14448918402194977, 0.0018258087802678347, 0.007377739530056715, 0.09354854375123978, 0.021179068833589554, -0.07696948945522308, -0.08712942898273468, 0.3252411484718323, 0.013656836934387684, -0.05789737030863762, 0.029463842511177063, -0.010601148009300232, 0.002976285293698311, 0.1038079559803009, 0.02670978009700775, -0.3318048417568207, 0.11325380206108093, -0.049462124705314636, 0.02621934749186039, -0.0986206978559494, 0.25751298666000366, -0.09927274286746979, 0.0011567071778699756, -0.0021675911266356707, 0.005983181297779083, 0.16448311507701874, 0.12825807929039001, 0.03066122904419899, -0.04389963671565056, -0.035184383392333984, 0.027545392513275146, -0.000056889788538683206, 0.12714245915412903, -0.07550964504480362, 0.18533922731876373, -0.20239947736263275, 0.010232576169073582, 0.046073004603385925, 0.03548669070005417, -0.03406141698360443, 0.03260577842593193, 0.07063248753547668, 0.09585922211408615, -0.07405243813991547, 0.13888128101825714, 0.1441432237625122, 0.10517960041761398, -0.027528876438736916, -0.03792459890246391, -0.027322491630911827, -0.07191037386655807, -0.050678569823503494, 0.06363119184970856, 0.13641877472400665, 0.24253077805042267, -0.2617717683315277, 0.030096305534243584, 0.09336341917514801, 0.0281902514398098, 0.13912227749824524, -0.09557457268238068, -0.13154534995555878, -0.0937468633055687, 0.16778087615966797, 0.10240103304386139, 0.003074193373322487, -0.12324399501085281, 0.04327014833688736, -0.0248896311968565, 0.18692448735237122, 0.0784047394990921, -0.002758603310212493, -0.028771471232175827, -0.1545880287885666, 0.012283740565180779, -0.03824552521109581, 0.030477261170744896, 0.2719734311103821, 0.09888779371976852, 0.0007113494793884456, 0.12079295516014099, 0.24952556192874908, 0.06595519185066223, -0.14484508335590363, -0.27847719192504883, 0.1255757063627243, 0.08606137335300446, 0.08858635276556015, 0.140108123421669, 0.13588544726371765, -0.052841298282146454, -0.25512462854385376, -0.15633057057857513, 0.0657564103603363, -0.009030853398144245, -0.19801932573318481, 0.07866183668375015, -0.14455923438072205, 0.13996143639087677, -0.16202963888645172, 0.14003488421440125, 0.06407155841588974, -0.019545728340744972, 0.13722939789295197, 0.019199810922145844, -0.03404553234577179, -0.14575275778770447, -0.0031520433258265257, 0.01728333719074726, 0.03394274413585663, -0.1321449726819992, -0.08321026712656021, -0.002905703615397215, 0.20345649123191833, 0.10976633429527283, 0.001092940685339272, 0.12477601319551468, 0.02098953165113926, -0.03821973875164986, 0.18564645946025848, -0.09672551602125168, -0.0007702020811848342, 0.0876367837190628, 0.10242100805044174, -0.17093364894390106, -0.059044063091278076, 0.05403101071715355, -0.057766228914260864, 0.053608238697052, 0.07198144495487213, 0.19096094369888306, -0.2902262210845947, 0.08684416115283966, -0.2578127086162567, 0.010949607007205486, 0.011049031279981136, 0.12809327244758606, 0.08548498153686523, -0.25745102763175964, 0.0210457481443882, -0.025915438309311867, -0.10031309723854065, 0.03756902366876602, 0.09680379182100296, -0.14137588441371918, -0.10549014061689377, -0.16723152995109558, 0.057367514818906784, 0.0028209337033331394, -0.027716828510165215, -0.030026555061340332, 0.05650077015161514, -0.03926299139857292, -0.04953547567129135, -0.17126557230949402, 0.007041572127491236, -0.13138450682163239, -0.05153264105319977, 0.0004478516348171979, -0.12493693828582764, 0.057758014649152756, -0.06585849821567535, -0.0423106923699379, -0.11021833121776581, 0.21925009787082672, -0.13407020270824432, 0.11442439258098602, -0.006436447147279978, 0.002622197847813368, 0.0225997194647789, -0.023575881496071815, 0.0968465581536293, 0.13590073585510254, 0.11602579802274704, 0.0403447262942791, 0.00006967617810005322, -0.007457995321601629, 0.005071516148746014, -0.022959917783737183, 0.05239740014076233, -0.1001611053943634, -0.06868734955787659, 0.07126494497060776, 0.0710444524884224, -0.024945050477981567, -0.014687420800328255, -0.14341314136981964, -0.11676324158906937, -0.04696715250611305, 0.21095170080661774, 0.10987668484449387, -0.14250831305980682, -0.13826696574687958, 0.11231840401887894, -0.05151046812534332, -0.2762301564216614, 0.013906246051192284, -0.01888461783528328, 0.06981546431779861, 0.076187364757061, -0.04702116921544075, -0.25728827714920044, 0.05906582251191139, 0.07966427505016327, 0.15806326270103455, 0.11542258411645889, 0.11798148602247238, 0.05791586637496948, -0.025941085070371628, 0.08136746287345886, 0.023908616974949837, 0.2068488597869873, -0.06893782317638397, -0.12452848255634308, -0.1750609427690506, -0.10339850932359695, 0.0970291867852211, 0.07802500575780869, -0.04812850430607796, 0.16250738501548767, -0.07579846680164337, -0.09058336168527603, 0.012645771726965904, -0.15760678052902222, 0.0026408927515149117, -0.27634719014167786, -0.06817526370286942, -0.06970848888158798, 0.02503843419253826, 0.08012159168720245, -0.05501307174563408, -0.028611265122890472, -0.07664017379283905, -0.04499443992972374, -0.002074381336569786, -0.11287317425012589, -0.06399889290332794, 0.003949529025703669, 0.08334296941757202, -0.15520703792572021, 0.06746101379394531, 0.025843216106295586, 0.05994034186005592, -0.0982842966914177, -0.07942499965429306, -0.04140619561076164, 0.06606882810592651, 0.09102039039134979, 0.030627775937318802, 0.13769562542438507, 0.20551620423793793, -0.07087976485490799, -0.09910190850496292, 0.0932970643043518, 0.12103303521871567, 0.07397790998220444, 0.06877443194389343, 0.24847355484962463, -0.013032931834459305, -0.1250908225774765, 0.0774301141500473, -0.22774145007133484, -0.018960660323500633, -0.17788073420524597, 0.09029555320739746, -0.09799099713563919, 0.015650378540158272, -0.13438615202903748, 0.10029063373804092, -0.19252969324588776, -0.025930512696504593, -0.05519552901387215, 0.0887276902794838, -0.008116107434034348, 0.2001635581254959, -0.06180475279688835, -0.07161436975002289, 0.0684637650847435, -0.04000834748148918, 0.04894508793950081, -0.07325161248445511, -0.030299536883831024, -0.27880197763442993, 0.10444866120815277, 0.11300114542245865, 0.04690895974636078, -0.05638808757066727, 0.12380437552928925, -0.09691386669874191, 0.19488677382469177, -0.08131483197212219, 0.020589781925082207, 0.09661392867565155, 0.015293044038116932, -0.038411807268857956, -0.2020173966884613, -0.040344689041376114, 0.005110889207571745, 0.00044462576624937356, 0.10304301977157593, -0.10314041376113892, 0.04064125195145607, -0.1635584980249405, -0.03217717260122299, 0.09719142317771912, 0.07522689551115036, 0.08268506824970245, 0.046865686774253845, -0.07913675904273987, -0.04819170758128166, -0.03536846861243248, 0.08413682132959366, -0.2052837461233139, 0.21629680693149567, 0.004013246390968561, 0.1764172464609146, -0.2182190716266632, -0.24585208296775818, 0.10014829784631729, 0.11268774420022964, -0.09930633008480072, -0.10135401040315628, 0.13520395755767822, 0.03128513693809509, 0.04001334309577942, 0.14706780016422272, -0.033606965094804764, 0.14477840065956116, -0.19022762775421143, -0.05705217644572258, -2.485762361575815e-32, 0.15753887593746185, 0.06140384078025818, -0.02432977594435215, -0.13445262610912323, 0.10512050241231918, -0.15364937484264374, -0.08476144075393677, -0.15684355795383453, 0.0460679829120636, 0.026096921414136887, -0.19237925112247467, 0.07687702029943466, 0.14135447144508362, -0.06304173171520233, -0.015734869986772537, 0.04402931407094002, 0.06701844930648804, -0.10541693866252899, 0.16005511581897736, 0.16009995341300964, 0.20888373255729675, -0.049233805388212204, -0.020147742703557014, 0.09780923277139664, -0.19993655383586884, -0.16657117009162903, -0.0950898677110672, 0.11385560780763626, 0.052984997630119324, 0.014274724759161472, -0.16517402231693268, 0.10539144277572632, 0.21772029995918274, 0.03496208414435387, -0.16505523025989532, 0.04418948292732239, -0.2883846163749695, -0.050733692944049835, -0.08404607325792313, -0.002124471589922905, -0.04434046149253845, 0.06690449267625809, 0.3754652142524719, -0.1489075869321823, -0.06787101179361343, 0.16622428596019745, -0.015339614823460579, -0.06820712238550186, 0.02612580545246601, 0.042276304215192795, 0.12550558149814606, -0.010284439660608768, 0.05742862820625305, -0.04331236332654953, -0.015406869351863861, 0.09230591356754303, -0.11236784607172012, -0.10170718282461166, -0.1212976723909378, 0.17285537719726562, 0.11653740704059601, 0.058920472860336304, -0.005949185695499182, -0.038409337401390076, 0.038157083094120026, 0.03144163265824318, 0.2196207493543625, -0.176161527633667, 0.11984679847955704, 0.11351681500673294, -0.0736585408449173, 0.050537679344415665, -0.08210356533527374, 0.030069107189774513, -0.10687929391860962, 0.00005685678843292408, -0.21638616919517517, 0.22856289148330688, -0.15218158066272736, -0.01792212761938572, -0.09968609362840652, -0.07133904844522476, 0.06311352550983429, 0.05293659120798111, 0.16257517039775848, 0.05169488117098808, 0.05396702513098717, 0.12507334351539612, 0.036501117050647736, -0.12203121185302734, -0.2546934485435486, 0.07813723385334015, -0.09432854503393173, -0.000049734098865883425, -0.024548659101128578, 0.27005887031555176, -0.029012328013777733, 0.007850827649235725, -0.01682940497994423, -0.16032657027244568, -0.011631726287305355, -0.03316476568579674, 0.02814464643597603, 0.06630939245223999, 0.10419503599405289, -0.0371558852493763, -0.019477101042866707, 0.02402452379465103, -0.27019742131233215, 0.10992977023124695, -0.036341942846775055, 0.010661107487976551, 0.16388794779777527, -0.01175037119537592, -0.04912346601486206, -0.018338307738304138, 0.054020121693611145, 0.08064071089029312, 0.01584642566740513, -0.05548802763223648, -0.11017002910375595, -0.03313317894935608, 0.020501306280493736, -0.0029480550438165665, 0.03201669454574585, 0.07503961771726608, -0.10412706434726715, -0.052369218319654465, 0.08645057678222656, -0.02296208217740059, 0.055054403841495514, 0.07495157420635223, 7.111146373972588e-7, -0.10276297479867935, -0.13091054558753967, 0.10800012201070786, 0.012347610667347908, 0.046006347984075546, 0.21348512172698975, 0.011625276878476143, 0.24055670201778412, -0.21017520129680634, 0.12649086117744446, 0.2846813499927521, -0.13008181750774384, -0.021701307967305183, -0.022773750126361847, -0.006473321933299303, 0.031087471172213554, -0.1498347371816635, -0.03574192896485329, -0.0692770928144455, 0.0829707607626915, 0.04307657852768898, 0.02447913959622383, -0.04237569496035576, -0.16260972619056702, 0.0581849068403244, -0.15012039244174957, -0.14289332926273346, 0.042740724980831146, -0.0392649844288826, 0.08436691015958786, 0.05863416567444801, -0.023928387090563774, -0.07629036158323288, 0.102147676050663, -0.011090358719229698, 0.03191939368844032, -0.1048227995634079, -0.04672742262482643, -0.0564027801156044, 0.028156643733382225, 0.04256341606378555, -0.16274204850196838, 0.03682441636919975, -0.09913739562034607, 0.19412104785442352, -0.033597443252801895, -0.15607762336730957, 0.04153001308441162, 0.035899579524993896, 0.050675250589847565, 0.04166809841990471, 0.14546386897563934, -0.17977474629878998, 0.037897855043411255, -0.18945926427841187, -0.03621460497379303, -0.16701388359069824, -0.06941812485456467, 0.07120195776224136, -0.027447957545518875, -0.07246433943510056, 0.011085795238614082, 0.09353697299957275, -0.11574319750070572, 0.025775767862796783, 0.08952867984771729, 0.04600660875439644, 1.2086884057029636e-34, 0.06899946928024292, 0.09128744155168533, 0.046692050993442535, -0.10680339485406876, 0.043227359652519226, -0.09008767455816269, -0.11273235082626343, -0.043152179569005966, 0.023626549169421196, -0.04961339011788368, -0.08737414330244064 ]
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.1334141045808792, 0.2000846564769745, -0.1783505529165268, 0.1565319299697876, 0.043268125504255295, 0.21818025410175323, 0.12259552627801895, -0.049696698784828186, -0.04221073165535927, 0.24097882211208344, -0.06484348326921463, 0.13951407372951508, -0.05779057368636131, 0.05101512372493744, -0.06428248435258865, -0.1801692098379135, 0.02949151210486889, 0.03671100363135338, -0.07482188194990158, 0.05697275325655937, 0.0960528552532196, 0.011493547819554806, 0.057552434504032135, 0.03830879181623459, -0.06822405755519867, 0.035440780222415924, 0.006429153960198164, -0.042440399527549744, 0.12236812710762024, 0.16318102180957794, 0.15273870527744293, 0.05968452990055084, -0.04226548597216606, 0.0022920696064829826, 0.000005083308678877074, 0.0036663622595369816, 0.055169351398944855, -0.08825559914112091, -0.12300068140029907, -0.0780525952577591, -0.03294745832681656, 0.0838560163974762, 0.05114874988794327, -0.11531289666891098, -0.12421543896198273, -0.03710150346159935, 0.04220519959926605, 0.018578125163912773, 0.1210034191608429, -0.08549456298351288, -0.11343161761760712, 0.0006985926302149892, -0.08360587805509567, -0.02157101035118103, 0.04266594722867012, 0.1775738149881363, 0.012847973965108395, 0.11416098475456238, -0.27069729566574097, -0.08771555870771408, 0.17833413183689117, -0.11794883012771606, 0.08368507772684097, 0.15473651885986328, -0.11549869924783707, -0.04042103514075279, -0.333619087934494, 0.042882874608039856, 0.03874156251549721, 0.24813716113567352, -0.04010751098394394, -0.22005178034305573, 0.0030873536597937346, -0.023384427651762962, -0.010262084193527699, 0.025863705202937126, -0.1834075152873993, 0.032710105180740356, -0.06290187686681747, 0.09784919023513794, -0.06976452469825745, -0.01718977838754654, 0.06515705585479736, -0.12184794992208481, -0.08356303721666336, -0.12925995886325836, -0.0840575322508812, 0.18428237736225128, -0.12052552402019501, -0.019274728372693062, 0.009732811711728573, 0.1484961062669754, -0.02861616760492325, -0.0022847624495625496, -0.09842509031295776, 0.13652773201465607, -0.17984335124492645, -0.056457456201314926, 0.09661267697811127, -0.07457488030195236, 0.11994817852973938, 0.08918223530054092, -0.17830869555473328, -0.03506898507475853, 0.17878034710884094, -0.0828157290816307, -0.2005196064710617, -0.10677023231983185, 0.018402697518467903, -0.08190219849348068, -0.13066963851451874, 0.0932057723402977, -0.02556399442255497, -0.09382419288158417, 0.10988778620958328, 0.20122621953487396, -0.0656040832400322, 0.08287741243839264, -0.09486933797597885, 0.0345805324614048, -0.0744248703122139, 0.11711236089468002, -0.06867332011461258, 0.009229904040694237, 0.026608597487211227, -0.11322156339883804, 0.0047480142675340176, -0.04187873378396034, 0.0024243402294814587, -0.07841558009386063, 0.12166997790336609, -0.018112150952219963, 0.1137070581316948, -0.005521215498447418, -0.05498310923576355, -0.14756226539611816, -0.07375530898571014, -0.03434963896870613, 0.05551406368613243, -0.04537510126829147, 0.19536438584327698, -0.06517121940851212, -0.051788076758384705, -0.01619892567396164, 0.2024405300617218, 0.0022088370751589537, -0.0334223173558712, 0.005697410553693771, -0.16729024052619934, 0.3461136221885681, 0.057875823229551315, 0.2416028082370758, -0.15204289555549622, 0.23341315984725952, 0.01554182730615139, 0.007717571221292019, -0.036734871566295624, -0.1684843897819519, -0.288560152053833, -0.015169224701821804, 0.08229134231805801, -0.11449765413999557, 0.01755722053349018, 0.024374593049287796, 0.08857499063014984, 0.0999026745557785, -0.026778915897011757, 0.11968998610973358, -0.0716235563158989, -0.16931766271591187, -0.09200923144817352, 0.01767507940530777, -0.042889825999736786, -0.1391090452671051, 0.026108942925930023, 0.13985899090766907, 0.02538568153977394, 0.18470409512519836, -0.014958664774894714, 0.14302688837051392, 0.1285925954580307, 0.09184195846319199, 0.08558693528175354, -0.05082089453935623, 0.27616098523139954, -0.06269291788339615, 0.04096116125583649, -0.037749845534563065, -0.1337365359067917, -0.08505817502737045, 0.0053338357247412205, -0.040717530995607376, 0.13308125734329224, 0.2971791625022888, -0.018554769456386566, 0.036660242825746536, 0.13615469634532928, 0.0032206298783421516, 0.10452447086572647, -0.026515096426010132, -0.23382049798965454, -0.18166206777095795, -0.06811308860778809, 0.006944817025214434, 0.06638974696397781, -0.15490297973155975, -0.12240656465291977, 0.13432076573371887, 0.14591829478740692, -0.17448431253433228, 0.10806415230035782, -0.16764746606349945, 0.03757278248667717, -0.08479604125022888, -0.03395860642194748, 0.21053259074687958, -0.1456129103899002, 0.004609948489814997, -0.031296826899051666, 0.008347760885953903, 0.031422682106494904, 0.15165963768959045, 0.01770685613155365, 0.003733149031177163, 0.025181030854582787, 0.14970426261425018, 0.02736176922917366, 0.10364285856485367, 0.08464363217353821, -0.0052467212080955505, -0.07627326250076294, -0.0873107984662056, 0.28063398599624634, 0.013615951873362064, -0.048332154750823975, 0.06429966539144516, 0.01602751761674881, -0.07762531191110611, 0.11250528693199158, 0.03255390003323555, -0.36668750643730164, 0.1037733256816864, -0.06402351707220078, -0.004869530443102121, -0.1147247776389122, 0.1902005821466446, -0.0990087166428566, -0.010377457365393639, -0.002025374211370945, -0.023731356486678123, 0.18203888833522797, 0.10236012935638428, 0.029495196416974068, -0.04637192562222481, -0.055696871131658554, 0.0489577054977417, 0.07437124848365784, 0.20081079006195068, -0.0855272114276886, 0.10418552905321121, -0.22422735393047333, 0.046449773013591766, 0.08911267668008804, -0.005942359566688538, -0.08147775381803513, 0.06247696653008461, 0.07149038463830948, 0.13003137707710266, -0.007984505966305733, 0.1276422142982483, 0.15999533236026764, 0.06175197288393974, -0.015057955868542194, -0.03153156861662865, -0.04552363604307175, -0.15822282433509827, -0.07081283628940582, 0.07067231088876724, 0.14009147882461548, 0.24763377010822296, -0.23717105388641357, 0.019306661561131477, 0.15056759119033813, 0.022359028458595276, 0.1119266152381897, -0.05830317735671997, -0.19709885120391846, -0.16725894808769226, 0.14707404375076294, 0.23084448277950287, -0.006680980324745178, -0.07954158633947372, 0.04336649179458618, 0.038445428013801575, 0.18776296079158783, 0.03771047294139862, 0.0327310748398304, 0.014534073881804943, -0.13993296027183533, 0.01783536560833454, -0.09150822460651398, 0.029937593266367912, 0.19090981781482697, 0.07825969159603119, 0.04303045943379402, 0.12516823410987854, 0.25875645875930786, 0.09536309540271759, -0.19238987565040588, -0.31285223364830017, 0.14548975229263306, 0.038822468370199203, 0.13782237470149994, 0.16722752153873444, 0.1273566484451294, 0.0014366854447871447, -0.21585765480995178, -0.12183263897895813, 0.05207062512636185, -0.01312245987355709, -0.15770229697227478, -0.009185094386339188, -0.12842558324337006, 0.13505278527736664, -0.11665648221969604, 0.14614951610565186, 0.13744382560253143, 0.013368799351155758, 0.18981099128723145, -0.08985012024641037, -0.02181060053408146, -0.13845373690128326, -0.040007103234529495, 0.10387028753757477, 0.11831499636173248, -0.1302160620689392, -0.10137608647346497, 0.08520014584064484, 0.18897570669651031, 0.09585750848054886, 0.009398546069860458, 0.07366034388542175, -0.007296063005924225, 0.0361240953207016, 0.17924416065216064, -0.10526586323976517, 0.04020636901259422, 0.0618664026260376, -0.04679526016116142, -0.17121101915836334, -0.08643263578414917, 0.07756993174552917, -0.11736927181482315, 0.05050292983651161, 0.09101875126361847, 0.14094166457653046, -0.2275826334953308, 0.11704365164041519, -0.20379285514354706, 0.007960153743624687, 0.0028683729469776154, 0.09160139411687851, 0.04327552020549774, -0.2692323327064514, -0.036771271377801895, -0.0645017921924591, -0.05451280623674393, 0.0353342704474926, 0.05788513273000717, -0.14878086745738983, -0.08936315774917603, -0.23584310710430145, 0.029914729297161102, -0.045279040932655334, -0.053334858268499374, -0.03715786710381508, 0.028667379170656204, -0.04246174171566963, -0.05137448012828827, -0.13497495651245117, 0.013803708367049694, -0.15781167149543762, -0.12356676161289215, -0.017834356054663658, -0.1347687691450119, 0.0246343482285738, -0.037196166813373566, -0.07202742248773575, -0.14697688817977905, 0.22242426872253418, -0.11780130118131638, 0.04781467467546463, -0.009341121651232243, -0.017926881089806557, -0.003173394361510873, 0.04909991845488548, 0.09129319339990616, 0.12307537347078323, 0.1937018483877182, 0.036263607442379, 0.0006457197014242411, -0.010550016537308693, -0.02299305982887745, -0.0939583107829094, 0.036346424371004105, -0.09942794591188431, -0.04937906190752983, 0.14511583745479584, 0.1005147323012352, -0.03180813416838646, -0.04425783455371857, -0.05588911473751068, -0.1441221833229065, -0.052178625017404556, 0.15991313755512238, 0.0447651632130146, -0.17744697630405426, -0.12541957199573517, 0.14760176837444305, 0.04226401820778847, -0.2624354958534241, 0.006532132159918547, -0.012804261408746243, 0.02704397588968277, 0.07287342846393585, -0.08048418909311295, -0.29585328698158264, 0.03248141333460808, 0.08983810991048813, 0.10969825834035873, 0.1264217495918274, 0.10918047279119492, 0.03959357365965843, -0.0815085768699646, 0.1524682193994522, -0.01776416040956974, 0.19465363025665283, -0.04807811975479126, -0.03839413449168205, -0.09845258295536041, -0.07492787390947342, 0.06051958352327347, 0.1162957102060318, -0.032831620424985886, 0.1725081354379654, -0.039424680173397064, -0.08085767924785614, -0.04870842024683952, -0.1458429992198944, -0.014208680018782616, -0.2389499843120575, -0.01953854411840439, -0.07169193029403687, -0.0349883958697319, 0.15508098900318146, -0.020015977323055267, 0.002681148936972022, -0.08212357014417648, -0.025702090933918953, -0.017175989225506783, -0.09627943485975266, -0.06002817302942276, -0.010365249589085579, 0.08580143004655838, -0.2929316461086273, 0.035870227962732315, 0.07938399910926819, 0.023604515939950943, -0.0771215632557869, -0.10045082867145538, -0.06905842572450638, 0.07103588432073593, 0.11117543280124664, 0.06914633512496948, 0.11698266118764877, 0.1402999460697174, -0.08695610612630844, -0.10278768837451935, 0.09445025771856308, 0.05186383053660393, 0.10224229842424393, -0.017405135557055473, 0.23123177886009216, 0.04215140640735626, -0.1402527242898941, 0.14354105293750763, -0.17574535310268402, -0.04451318085193634, -0.16141057014465332, 0.13360434770584106, -0.12118227779865265, -0.04050922393798828, -0.12371021509170532, 0.074831023812294, -0.20505164563655853, -0.16371308267116547, -0.05928755924105644, 0.05937841162085533, -0.03182407096028328, 0.23900780081748962, -0.05913949012756348, -0.027000488713383675, 0.06521093100309372, -0.08210736513137817, 0.09148834645748138, -0.10465569794178009, 0.02712363377213478, -0.25254109501838684, 0.13988474011421204, 0.15562021732330322, 0.04723135009407997, -0.12185703963041306, 0.09248857200145721, -0.04232475906610489, 0.23252329230308533, -0.07051670551300049, -0.010212648659944534, 0.07603682577610016, -0.021123003214597702, -0.0889308825135231, -0.18026208877563477, -0.0495290644466877, -0.03651685267686844, 0.027075843885540962, 0.06542349606752396, -0.10718875378370285, 0.03922293707728386, -0.1696270853281021, 0.06403086334466934, 0.13459645211696625, 0.08774316310882568, 0.03931579738855362, 0.05682947114109993, -0.0717807337641716, -0.04534229636192322, -0.03673785552382469, 0.09218200296163559, -0.19290512800216675, 0.23271231353282928, -0.05699891597032547, 0.13331088423728943, -0.156107559800148, -0.21282371878623962, 0.12028622627258301, 0.14123143255710602, -0.10967165976762772, -0.09456289559602737, 0.13465291261672974, 0.02553900144994259, 0.018642593175172806, 0.07702270150184631, 0.017378157004714012, 0.029152240604162216, -0.18260928988456726, -0.016806934028863907, -2.282975920937142e-32, 0.16439056396484375, 0.11453358083963394, -0.04031360149383545, -0.07346805185079575, 0.08086581528186798, -0.12202445417642593, -0.09905797243118286, -0.13794125616550446, 0.07371512800455093, 0.09525042772293091, -0.19273215532302856, 0.09110972285270691, 0.1467917263507843, -0.0492347814142704, -0.03360766917467117, -0.012210436165332794, 0.06007591634988785, -0.11539514362812042, 0.14478839933872223, 0.1382320076227188, 0.18861480057239532, -0.02125687524676323, -0.042274221777915955, 0.049786098301410675, -0.24695360660552979, -0.19866932928562164, -0.04426947236061096, 0.15609706938266754, 0.015302768908441067, 0.01934252679347992, -0.13892993330955505, 0.13802528381347656, 0.20635004341602325, -0.09455354511737823, -0.18678419291973114, 0.11765016615390778, -0.31084853410720825, -0.03596503660082817, -0.07104096561670303, 0.03298230841755867, -0.08762730658054352, 0.06334270536899567, 0.3563830554485321, -0.08334916085004807, -0.07719950377941132, 0.1349843293428421, -0.09637623280286789, -0.09108242392539978, 0.01711343042552471, -0.03296145051717758, 0.07524701207876205, 0.013045014813542366, 0.09976446628570557, -0.020762450993061066, 0.04658497869968414, 0.05586375296115875, -0.15401393175125122, -0.05927964299917221, -0.11987065523862839, 0.23579230904579163, 0.10465507209300995, 0.09733480215072632, -0.010352353565394878, -0.08663776516914368, 0.10480500012636185, 0.0999053344130516, 0.3072279691696167, -0.16123734414577484, 0.139631986618042, 0.08982338756322861, -0.02211509644985199, 0.0689830332994461, -0.11886315792798996, 0.08163675665855408, -0.05338456481695175, -0.06339041143655777, -0.19572080671787262, 0.19615930318832397, -0.2223128378391266, -0.12199033796787262, -0.07066141813993454, -0.13737601041793823, 0.08767033368349075, 0.009120838716626167, 0.07603232562541962, 0.15174590051174164, 0.03050355240702629, 0.15287773311138153, 0.11818902939558029, -0.07567977905273438, -0.1874167025089264, 0.07002763450145721, -0.12833847105503082, -0.06462392210960388, -0.0348171591758728, 0.22623960673809052, -0.04437195137143135, -0.031170904636383057, -0.01653987355530262, -0.1565200388431549, -0.01700402796268463, -0.054554663598537445, -0.0009647237602621317, 0.06242300197482109, 0.04684113338589668, 0.0034241771791130304, 0.006457276176661253, 0.034095048904418945, -0.2527328133583069, 0.12580643594264984, -0.05736187845468521, -0.01621861383318901, 0.08392257243394852, -0.03887377679347992, -0.04698488488793373, -0.048609841614961624, 0.13079333305358887, 0.09199847280979156, -0.010169262066483498, -0.050818655639886856, -0.15941114723682404, -0.061220694333314896, 0.01059259194880724, 0.01890302263200283, -0.031325701624155045, 0.06514483690261841, -0.09573090076446533, -0.08442657440900803, 0.07441811263561249, -0.09996030479669571, 0.07618121057748795, 0.12585556507110596, 7.02588749845745e-7, -0.12883645296096802, -0.06636013835668564, 0.1028943657875061, -0.044025719165802, 0.08315715938806534, 0.20441722869873047, 0.06635474413633347, 0.23250111937522888, -0.13836045563220978, 0.12489721179008484, 0.20688453316688538, -0.1277822107076645, -0.02338198386132717, -0.06214550510048866, -0.11295343190431595, 0.013284686952829361, -0.09674838930368423, -0.059661705046892166, -0.14364585280418396, 0.08610699325799942, -0.03221791610121727, 0.05440957844257355, -0.02830050326883793, -0.14975890517234802, 0.09890244156122208, -0.14814473688602448, -0.18997934460639954, 0.11483722180128098, -0.025897227227687836, 0.07537837326526642, 0.05285971239209175, -0.03477472439408302, -0.058222658932209015, 0.06179812550544739, -0.030191825702786446, 0.03829754516482353, -0.03185758739709854, 0.014909189194440842, -0.009001494385302067, 0.03845156729221344, 0.06275712698698044, -0.1792854219675064, -0.045658987015485764, -0.018981298431754112, 0.17321301996707916, -0.029932700097560883, -0.18017511069774628, 0.02473762445151806, 0.06798204779624939, 0.012601962313055992, 0.00952280405908823, 0.1640431135892868, -0.08969593793153763, 0.0583219975233078, -0.13369296491146088, -0.049780260771512985, -0.13586503267288208, -0.09534836560487747, 0.021907629445195198, -0.06520844250917435, -0.08243626356124878, 0.012511186301708221, 0.023312710225582123, -0.0882515087723732, 0.06401589512825012, 0.1546831578016281, 0.004541309084743261, 1.582324680447227e-34, 0.03136511147022247, 0.11214914917945862, 0.0191836915910244, -0.1632968634366989, -0.026323672384023666, -0.09122166037559509, -0.13430723547935486, -0.005028649233281612, 0.017160966992378235, -0.001929841237142682, -0.11044742912054062 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
Hello, I'm also interested in this feature. Has there been progress on this issue? Could we use a similar trick as above, but with a better hashing algorithm like SHA? We could also use a [bloom filter](https://en.wikipedia.org/wiki/Bloom_filter), should we care a lot about collision in this case?
**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
47
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 Hello, I'm also interested in this feature. Has there been progress on this issue? Could we use a similar trick as above, but with a better hashing algorithm like SHA? We could also use a [bloom filter](https://en.wikipedia.org/wiki/Bloom_filter), should we care a lot about collision in this case?
[ -0.12271387875080109, 0.162247434258461, -0.19524694979190826, 0.10687211155891418, 0.007822252810001373, 0.2242049276828766, 0.1817471981048584, -0.05770740285515785, -0.052660081535577774, 0.2714129388332367, -0.007751982193440199, 0.05278667062520981, -0.13640113174915314, 0.14071401953697205, -0.06192983686923981, -0.1763472855091095, 0.07306280732154846, 0.08984503895044327, -0.12347685545682907, 0.07518216222524643, 0.06504472345113754, -0.01853656955063343, 0.12280783802270889, 0.0744728147983551, -0.038845449686050415, 0.062471408396959305, -0.02390570193529129, -0.05160817131400108, 0.10756157338619232, 0.14041033387184143, 0.1574200689792633, 0.07866467535495758, -0.05145065858960152, -0.04102097451686859, 0.000004814753538084915, 0.012163098901510239, 0.07590930163860321, -0.09237543493509293, -0.04763355851173401, -0.044092241674661636, -0.050073180347681046, 0.04535797983407974, 0.029435260221362114, -0.1082368791103363, -0.12950313091278076, -0.01507212407886982, 0.037915077060461044, 0.052640534937381744, 0.14800098538398743, -0.1453205943107605, -0.10120401531457901, -0.0029381103813648224, -0.05028695613145828, -0.03454219922423363, -0.006491334177553654, 0.1722465604543686, 0.025242283940315247, 0.12175079435110092, -0.3098642826080322, -0.11593200266361237, 0.1330099105834961, -0.0447634793817997, 0.07361967116594315, 0.169160395860672, -0.04998966306447983, 0.009621079079806805, -0.24692054092884064, 0.06690416485071182, 0.06057934835553169, 0.20257745683193207, -0.12373696267604828, -0.2182272970676422, 0.003968995064496994, -0.09498611837625504, -0.030302831903100014, -0.05262768268585205, -0.13226279616355896, -0.03564073145389557, 0.0009380199480801821, 0.14384955167770386, -0.1527315229177475, -0.03782500699162483, 0.06357445567846298, -0.06163148954510689, -0.052895866334438324, -0.20538941025733948, -0.07865401357412338, 0.15442833304405212, -0.07774827629327774, 0.036390822380781174, 0.07832779735326767, 0.13508658111095428, -0.022208664566278458, -0.02459017187356949, -0.118308424949646, 0.1242913231253624, -0.19828680157661438, -0.03863654285669327, 0.08513471484184265, -0.10851424932479858, 0.1090821698307991, 0.06810303032398224, -0.23468557000160217, -0.02436101995408535, 0.1379048079252243, -0.14865431189537048, -0.1561756581068039, -0.12927792966365814, 0.020681107416749, -0.07586977630853653, -0.1140793114900589, 0.08686123043298721, 0.025208154693245888, -0.10268209874629974, 0.04409768804907799, 0.19885067641735077, -0.07472022622823715, 0.10809562355279922, -0.1408129334449768, 0.03465986251831055, -0.12887050211429596, 0.11722063273191452, -0.05364714190363884, 0.04136981815099716, -0.015707330778241158, -0.12183183431625366, -0.02776983194053173, -0.007280938792973757, -0.03069847635924816, -0.052793100476264954, 0.1441749632358551, 0.020509066060185432, 0.1426440328359604, -0.03384658694267273, -0.011737975291907787, -0.16710039973258972, -0.14541614055633545, -0.04455585777759552, 0.07314008474349976, -0.01847091317176819, 0.16336090862751007, 0.05318869650363922, 0.005223716143518686, 0.02780691348016262, 0.24257692694664001, -0.048109423369169235, -0.02761937491595745, 0.04632227495312691, -0.1668405532836914, 0.3358231782913208, 0.05437852069735527, 0.2784383296966553, -0.15980151295661926, 0.2676777243614197, -0.04925926774740219, -0.04112670570611954, 0.05045028030872345, -0.16051188111305237, -0.2994288206100464, -0.03281363099813461, 0.09051376581192017, -0.13437749445438385, -0.0314176082611084, 0.044573839753866196, 0.08048070967197418, 0.08201680332422256, 0.04050910472869873, 0.10172323137521744, -0.1023595780134201, -0.16191385686397552, -0.13250626623630524, 0.0015380318509414792, -0.044616684317588806, -0.19221465289592743, 0.003781301900744438, 0.10117531567811966, 0.011159361340105534, 0.1949007213115692, -0.06340169906616211, 0.11263356357812881, 0.10673996806144714, 0.10619612783193588, 0.12478627264499664, -0.06254558265209198, 0.2699887454509735, -0.07824280858039856, 0.03072361648082733, -0.05455020070075989, -0.1542762964963913, -0.10427064448595047, -0.026588760316371918, -0.08896190673112869, 0.12225177884101868, 0.30831798911094666, -0.007977744564414024, 0.048419609665870667, 0.17897753417491913, -0.024516835808753967, 0.09114750474691391, -0.039721254259347916, -0.11083412170410156, -0.17761139571666718, -0.11476147919893265, -0.03524303436279297, 0.08714275807142258, -0.12655724585056305, -0.012362954206764698, 0.11329121887683868, 0.13245433568954468, -0.16799472272396088, 0.015432927757501602, -0.14245139062404633, 0.014158027246594429, -0.11117421835660934, -0.09849300235509872, 0.25223326683044434, -0.17048856616020203, -0.030355041846632957, -0.055786848068237305, 0.0012249419232830405, 0.014991243369877338, 0.19117988646030426, -0.05285037308931351, 0.009707720950245857, 0.03166534751653671, 0.1072436273097992, 0.0405338779091835, 0.09617489576339722, 0.1274133026599884, 0.007184067275375128, -0.08801335841417313, -0.10834208875894547, 0.26876622438430786, -0.0315236859023571, -0.1264900118112564, 0.061371177434921265, 0.09633230417966843, -0.039498910307884216, 0.12210984528064728, -0.02643320895731449, -0.3299556076526642, 0.043123263865709305, -0.11397058516740799, 0.0075484151020646095, -0.1534091979265213, 0.18203045427799225, -0.10503850877285004, -0.06010299548506737, -0.06795866787433624, -0.02014821767807007, 0.16682912409305573, 0.12509112060070038, -0.006886808667331934, -0.07073364406824112, -0.021575115621089935, -0.08877793699502945, 0.0935852900147438, 0.1894209086894989, -0.09015107154846191, 0.1538306474685669, -0.15131419897079468, -0.02041444554924965, 0.06943020969629288, 0.0003244918189011514, -0.07476334273815155, 0.04106608033180237, 0.00938381440937519, 0.19150801002979279, -0.06952567398548126, 0.16677595674991608, 0.13622869551181793, 0.09626579284667969, -0.04393128305673599, -0.056491412222385406, -0.04176361858844757, -0.15106640756130219, -0.08000589907169342, 0.0997227132320404, 0.09210596978664398, 0.285787969827652, -0.239167258143425, 0.03244795650243759, 0.12831434607505798, 0.019406989216804504, 0.11797497421503067, -0.12383577227592468, -0.17851310968399048, -0.10179143399000168, 0.1524229496717453, 0.1330282837152481, -0.004201536998152733, -0.11802899837493896, 0.040050845593214035, -0.02258056029677391, 0.2015320062637329, 0.057041265070438385, -0.04552239179611206, -0.03652806207537651, -0.09351833164691925, 0.03963175788521767, -0.02111721783876419, -0.006172484718263149, 0.2272154837846756, 0.12218493223190308, 0.048320792615413666, 0.17076146602630615, 0.2332017868757248, 0.033366236835718155, -0.1576174944639206, -0.3369532525539398, 0.10543940216302872, -0.021025054156780243, 0.11736176162958145, 0.09975437074899673, 0.13601230084896088, -0.0052103749476373196, -0.23979069292545319, -0.07821403443813324, 0.03463723510503769, -0.039348553866147995, -0.16591940820217133, 0.08299516886472702, -0.1018984317779541, 0.12029138207435608, -0.10219958424568176, 0.13643038272857666, 0.11325038969516754, 0.009910205379128456, 0.08815687149763107, -0.06372154504060745, -0.015017641708254814, -0.1900121569633484, -0.029262948781251907, 0.010710488073527813, 0.13944976031780243, -0.1742256134748459, -0.08482574671506882, -0.008817038498818874, 0.22872520983219147, 0.04304785281419754, -0.009225246496498585, 0.11339958012104034, 0.0032320101745426655, -0.02792082354426384, 0.18020732700824738, -0.07604904472827911, 0.03698185458779335, 0.06829991936683655, -0.05018896609544754, -0.1356499046087265, -0.14936792850494385, 0.07472924143075943, -0.051679689437150955, -0.009276841767132282, 0.021267300471663475, 0.14687472581863403, -0.20268139243125916, 0.09940991550683975, -0.17475076019763947, 0.050513856112957, -0.03756251186132431, 0.15207456052303314, 0.03906085342168808, -0.1902477741241455, -0.01555959414690733, -0.007014794275164604, -0.036560870707035065, 0.10303714126348495, 0.10757759213447571, -0.1398717761039734, -0.1671895980834961, -0.1603897660970688, 0.06478361785411835, -0.00748781394213438, -0.011066640727221966, 0.05903903767466545, 0.024781623855233192, -0.08336686342954636, -0.023583421483635902, -0.14208462834358215, 0.008128620684146881, -0.2542165219783783, -0.07664839923381805, -0.023385077714920044, -0.1116405576467514, -0.008965662680566311, -0.07279501110315323, 0.009310849010944366, -0.09595894813537598, 0.21807259321212769, -0.1301649808883667, 0.07802335172891617, -0.011516228318214417, 0.012919536791741848, 0.0063051143661141396, 0.05538399517536163, 0.10485705733299255, 0.03690841421484947, 0.17578156292438507, -0.013293180614709854, 0.01319817267358303, 0.05909175053238869, -0.07021845877170563, -0.02147090993821621, 0.011414654552936554, -0.08503060042858124, 0.020612958818674088, 0.20460334420204163, 0.10637534409761429, 0.0010417662560939789, -0.02201754041016102, -0.053059425204992294, -0.06478662043809891, -0.04007606953382492, 0.1995021104812622, 0.031393010169267654, -0.1780325025320053, -0.12580716609954834, 0.10881184786558151, 0.01092118863016367, -0.31281620264053345, -0.008528599515557289, -0.03694945573806763, 0.037117037922143936, 0.062354739755392075, -0.09025991708040237, -0.29415038228034973, 0.06547688692808151, 0.12617436051368713, 0.1449490338563919, 0.1382412612438202, 0.10640961676836014, 0.07467734813690186, 0.06798546761274338, 0.16698315739631653, -0.022509142756462097, 0.2009236216545105, -0.11267075687646866, -0.08522655069828033, -0.1262892782688141, -0.13864271342754364, 0.06287625432014465, 0.12896502017974854, -0.010058990679681301, 0.12529635429382324, 0.026510337367653847, -0.09597635269165039, 0.031903866678476334, -0.15065255761146545, -0.044560015201568604, -0.22935429215431213, -0.06947632879018784, -0.06939486414194107, -0.09473573416471481, 0.13665328919887543, -0.05235864594578743, 0.05641455203294754, -0.017158886417746544, -0.04975161701440811, 0.028141088783740997, -0.16867250204086304, -0.06403539329767227, -0.05061643198132515, 0.041200872510671616, -0.2675016522407532, 0.0348801426589489, 0.1055433601140976, 0.13050195574760437, -0.10991791635751724, -0.10832439363002777, -0.15997131168842316, 0.059900131076574326, 0.05804949253797531, 0.0898752212524414, 0.1558961719274521, 0.1801440417766571, -0.09196535497903824, -0.12286247313022614, 0.12729398906230927, 0.07824596762657166, 0.1490582525730133, 0.04661236330866814, 0.1849585324525833, -0.0019184028496965766, -0.14451085031032562, 0.15677094459533691, -0.2162162810564041, -0.025827573612332344, -0.1129954531788826, 0.06394381821155548, -0.130912184715271, -0.019135737791657448, -0.12879379093647003, 0.22800418734550476, -0.21359573304653168, -0.12920540571212769, -0.06596973538398743, 0.010595777072012424, 0.012652217410504818, 0.27301260828971863, -0.04788755998015404, -0.08682982623577118, 0.098177969455719, -0.13753315806388855, 0.08285702019929886, -0.07109098881483078, 0.020360765978693962, -0.30643531680107117, 0.15008117258548737, 0.0788237601518631, -0.005859097931534052, -0.07490332424640656, 0.06496788561344147, -0.05240956321358681, 0.17553550004959106, -0.09000489115715027, 0.04497790336608887, 0.04061290621757507, -0.11114689707756042, -0.10356020927429199, -0.18123342096805573, 0.021134192124009132, -0.021099017933011055, -0.030179722234606743, 0.042425964027643204, -0.08023454993963242, 0.05885593593120575, -0.1492435485124588, 0.049123842269182205, 0.10004359483718872, 0.07550467550754547, 0.09120716154575348, -0.027217647060751915, -0.10311421751976013, -0.023616280406713486, -0.009020458906888962, 0.03582027181982994, -0.10495125502347946, 0.1938203126192093, -0.020076362416148186, 0.1813770830631256, -0.16508908569812775, -0.21206197142601013, 0.15861168503761292, 0.14695654809474945, -0.06965558975934982, -0.09475596249103546, 0.18311908841133118, 0.022440968081355095, -0.018045110628008842, 0.12290439754724503, 0.05484986677765846, 0.13935211300849915, -0.13251368701457977, -0.02019466459751129, -2.3253693900155787e-32, 0.15859201550483704, 0.05432545766234398, -0.07142315059900284, -0.09462226182222366, 0.08987238258123398, -0.12850452959537506, -0.1183217465877533, -0.15114735066890717, 0.07012544572353363, 0.032752253115177155, -0.21786868572235107, 0.12343540787696838, 0.15083222091197968, -0.03827689215540886, 0.017810454592108727, -0.016227681189775467, 0.10677246004343033, -0.1378086656332016, 0.16292285919189453, 0.09032285958528519, 0.20631764829158783, -0.041812993586063385, -0.08680462837219238, 0.12965266406536102, -0.1840677559375763, -0.14194270968437195, -0.10331317037343979, 0.13133776187896729, 0.020304271951317787, 0.008126122877001762, -0.15945309400558472, 0.132828950881958, 0.19556467235088348, 0.043113965541124344, -0.19156844913959503, 0.10883944481611252, -0.30867713689804077, -0.026158668100833893, -0.04947910085320473, 0.030999766662716866, -0.0316910557448864, 0.128325954079628, 0.3140372931957245, -0.10617799311876297, -0.1161966472864151, 0.15454967319965363, -0.05104610323905945, -0.10893427580595016, 0.006194119341671467, 0.012422923929989338, 0.11098825186491013, -0.026291757822036743, 0.041455116122961044, 0.03809146583080292, 0.006798974238336086, 0.10454261302947998, -0.11333564668893814, -0.007479208055883646, -0.17388692498207092, 0.236432284116745, 0.12049583345651627, 0.07746245712041855, 0.004693792667239904, -0.03651340305805206, 0.07380174845457077, 0.10815558582544327, 0.30247431993484497, -0.2003263384103775, 0.10312428325414658, 0.06124890223145485, 0.045948684215545654, 0.019955718889832497, -0.09899619966745377, 0.13694371283054352, -0.09913310408592224, -0.04540366679430008, -0.21645081043243408, 0.20081818103790283, -0.11831959336996078, -0.11185908317565918, -0.08327770233154297, -0.07528524845838547, 0.03443238139152527, 0.037085242569446564, 0.07918252050876617, 0.08663620054721832, 0.03183181211352348, 0.1597903072834015, 0.04212391749024391, -0.05736883357167244, -0.20933140814304352, 0.1257237195968628, -0.1193026676774025, -0.024690840393304825, -0.031700700521469116, 0.16153551638126373, -0.06387478858232498, 0.026348719373345375, 0.003587393555790186, -0.1581205427646637, 0.010021211579442024, -0.030188769102096558, 0.027660509571433067, -0.06764440983533859, 0.08146635442972183, -0.04452458769083023, 0.06529825180768967, 0.04085944592952728, -0.23660124838352203, 0.12484852224588394, -0.021990926936268806, -0.02670333720743656, 0.13639624416828156, -0.08101195842027664, -0.08643022179603577, 0.03915712609887123, 0.13350339233875275, 0.07255594432353973, 0.0242142416536808, 0.042477358132600784, -0.13410747051239014, -0.02732422947883606, -0.0044901371002197266, 0.007739263121038675, 0.0003659008943941444, 0.08002333343029022, -0.13647210597991943, -0.1363115757703781, 0.11740884184837341, -0.0715910866856575, 0.02495340257883072, 0.10818520933389664, 6.963717282815196e-7, -0.11263194680213928, -0.0648060142993927, 0.08347880095243454, -0.055234842002391815, 0.037116121500730515, 0.1991814523935318, 0.01997862569987774, 0.24474498629570007, -0.1368633657693863, 0.13505981862545013, 0.20923872292041779, -0.1983177214860916, 0.00021276265033520758, -0.025215601548552513, -0.07876276224851608, 0.010483971796929836, -0.14382438361644745, -0.06640104204416275, -0.12381614744663239, 0.042194776237010956, 0.000802184920758009, 0.050314366817474365, -0.03394743427634239, -0.14063525199890137, 0.09657348692417145, -0.09688075631856918, -0.1510469615459442, 0.08381382375955582, -0.028133736923336983, 0.05511927977204323, 0.0623842291533947, -0.05269213765859604, -0.011037546209990978, 0.08664771169424057, -0.06590595841407776, 0.017871685326099396, -0.05119679868221283, -0.03784210607409477, -0.03174515813589096, 0.03545171394944191, 0.06577174365520477, -0.1569007784128189, -0.07766661047935486, -0.045955441892147064, 0.20070727169513702, 0.0012434525415301323, -0.10460178554058075, 0.08963119238615036, 0.028543030843138695, 0.054482538253068924, 0.08815111964941025, 0.2083577960729599, -0.13480772078037262, 0.054166026413440704, -0.15845580399036407, -0.045153092592954636, -0.07923755049705505, -0.06392782926559448, 0.062374334782361984, -0.06371192634105682, -0.08278215676546097, 0.07354505360126495, 0.054028838872909546, -0.0668562725186348, 0.0207147765904665, 0.09000083059072495, -0.007129067555069923, 9.154237447341043e-35, -0.026440147310495377, 0.14742286503314972, 0.04315510764718056, -0.18383869528770447, -0.01737385243177414, -0.03610096126794815, -0.16169647872447968, 0.06648069620132446, -0.017161035910248756, -0.017384245991706848, -0.11955888569355011 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
For reference, we can get a solution fairly easily if we assume that we can hold in memory all unique values. ```python from datasets import Dataset from itertools import cycle from functools import partial memory = set() def is_unique(elem:Any , column: str, memory: set) -> bool: if elem[column] in memory: return False else: memory.add(elem[column]) return True # Example dataset ds = Dataset.from_dict({"col1" : [sent for i, sent in zip(range(10), cycle(["apple", "orange", "pear"]))], "col2": [i % 5 for i in range(10)]}) # Drop duplicates in `ds` on "col1" ds2 = ds.filter(partial(is_unique, column="col1", memory=memory)) ``` Of course, we can improve the API so that we can introduce `Dataset.drop_duplicates`. For the parallel version, we can use a shared memory set.
**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
117
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 For reference, we can get a solution fairly easily if we assume that we can hold in memory all unique values. ```python from datasets import Dataset from itertools import cycle from functools import partial memory = set() def is_unique(elem:Any , column: str, memory: set) -> bool: if elem[column] in memory: return False else: memory.add(elem[column]) return True # Example dataset ds = Dataset.from_dict({"col1" : [sent for i, sent in zip(range(10), cycle(["apple", "orange", "pear"]))], "col2": [i % 5 for i in range(10)]}) # Drop duplicates in `ds` on "col1" ds2 = ds.filter(partial(is_unique, column="col1", memory=memory)) ``` Of course, we can improve the API so that we can introduce `Dataset.drop_duplicates`. For the parallel version, we can use a shared memory set.
[ -0.13057415187358856, 0.280501127243042, -0.14725366234779358, 0.1575832962989807, 0.053571682423353195, 0.22432944178581238, 0.1550547033548355, -0.07601239532232285, -0.006595909129828215, 0.239261195063591, -0.10945244133472443, 0.1515994817018509, -0.12401335686445236, 0.027940483763813972, -0.08094988763332367, -0.18266907334327698, 0.028673555701971054, 0.13509880006313324, -0.11551421135663986, 0.09306447952985764, 0.05324985831975937, 0.03900507465004921, 0.029703136533498764, 0.05894218012690544, -0.03777929022908211, -0.04506369307637215, 0.05479598790407181, 0.0019008246017619967, 0.08016839623451233, 0.14529360830783844, 0.1529456377029419, 0.07156544923782349, -0.08364406228065491, -0.06323374062776566, 0.000004792458184965653, 0.056140657514333725, 0.1280493140220642, -0.08079564571380615, -0.13325519859790802, -0.024394840002059937, -0.018292609602212906, 0.13282933831214905, 0.04616532847285271, -0.10358916223049164, -0.0986601784825325, -0.04380132630467415, -0.048189304769039154, -0.04576818272471428, 0.22855620086193085, -0.08698949217796326, -0.09800150990486145, 0.030929092317819595, -0.12106665223836899, -0.03477012366056442, -0.04483857378363609, 0.10634627193212509, 0.007654666900634766, -0.034189097583293915, -0.280592679977417, -0.13983778655529022, 0.17343904078006744, -0.04719819128513336, 0.13467060029506683, 0.14747615158557892, -0.14438919723033905, -0.11854769289493561, -0.31239426136016846, 0.02038704790174961, -0.049960456788539886, 0.17305471003055573, -0.03415413945913315, -0.21943897008895874, -0.06833402067422867, -0.045079704374074936, -0.065955251455307, -0.037525031715631485, -0.2257348895072937, -0.009208199568092823, -0.1627475768327713, 0.1668369174003601, -0.06732530146837234, 0.00680296728387475, 0.04977994039654732, -0.10076441615819931, -0.11338880658149719, -0.12287072837352753, -0.08601965010166168, 0.1546427458524704, -0.057243917137384415, -0.02500603348016739, 0.09020761400461197, 0.10777578502893448, 0.03975285217165947, 0.0021847609896212816, -0.11288471519947052, 0.1553376317024231, -0.13255976140499115, -0.05722014233469963, 0.09776224195957184, -0.07644367218017578, 0.14201636612415314, 0.028452694416046143, -0.14904294908046722, -0.10178238898515701, 0.1865006685256958, -0.09776529669761658, -0.26494666934013367, -0.031679537147283554, -0.0698302760720253, -0.050369519740343094, -0.15150517225265503, 0.09445150941610336, -0.0042471145279705524, -0.10730363428592682, 0.1083265170454979, 0.21267510950565338, -0.006327534560114145, 0.11879675835371017, -0.15450327098369598, 0.06144273281097412, 0.004164417274296284, 0.11940755695104599, -0.06957835704088211, -0.019645242020487785, 0.07044437527656555, -0.05171158164739609, 0.03621964529156685, -0.033702075481414795, -0.0868731290102005, -0.10058996826410294, 0.056301217526197433, -0.013458176515996456, 0.11028164625167847, -0.024763021618127823, -0.03739788755774498, -0.05678602308034897, -0.07386232912540436, -0.03233037516474724, 0.07599388062953949, -0.02011754736304283, 0.16907067596912384, -0.0009820141131058335, -0.0018643034854903817, 0.09708936512470245, 0.16080468893051147, 0.034514203667640686, 0.03006557747721672, 0.06238558888435364, -0.19795487821102142, 0.3254322409629822, 0.0589110441505909, 0.20426082611083984, -0.1325921267271042, 0.2033020257949829, -0.06202462688088417, 0.00651753693819046, 0.033604323863983154, -0.10629328340291977, -0.3292323350906372, 0.09879004955291748, 0.023996155709028244, -0.18605442345142365, -0.03234291449189186, -0.02914542518556118, 0.10011115670204163, 0.14959673583507538, 0.01802654005587101, 0.1449308693408966, -0.11667267233133316, -0.1588141918182373, -0.0642128735780716, 0.07252979278564453, 0.0054738568142056465, -0.1488642692565918, 0.06847071647644043, 0.08512315899133682, 0.017735954374074936, 0.0993165522813797, -0.00008710442489245906, 0.016005322337150574, 0.1310814470052719, 0.1738804578781128, 0.06669016927480698, -0.061302173882722855, 0.278460830450058, -0.003892787965014577, -0.040562473237514496, 0.02302956022322178, -0.16301721334457397, -0.05707811564207077, -0.02172328345477581, -0.07534096390008926, 0.1355866938829422, 0.3631749153137207, 0.009898852556943893, 0.06661441177129745, 0.07399410754442215, -0.025721006095409393, 0.09049464017152786, -0.013938971795141697, -0.21205376088619232, -0.17401358485221863, -0.08196017146110535, -0.029093222692608833, 0.06941194832324982, -0.06147937476634979, -0.0981387197971344, 0.16467121243476868, 0.1773943454027176, -0.1554708182811737, 0.04353567957878113, -0.19851259887218475, -0.024569053202867508, -0.0348990336060524, -0.05395142361521721, 0.13390514254570007, -0.17025251686573029, -0.015490087680518627, 0.0030199922621250153, 0.0059055848978459835, 0.001170095056295395, 0.19229945540428162, -0.0006515190470963717, -0.0054924567230045795, 0.03735437989234924, 0.11831436306238174, 0.06582794338464737, 0.08561597764492035, 0.04577655345201492, 0.02022460475564003, -0.022481711581349373, -0.07253774255514145, 0.31224822998046875, 0.0011243243934586644, 0.02943163737654686, 0.07045149058103561, -0.029187029227614403, -0.04603327810764313, 0.06013300642371178, 0.08018551021814346, -0.38944610953330994, 0.08138622343540192, -0.03251158818602562, 0.0573672316968441, -0.11682894825935364, 0.2470112442970276, -0.08331984281539917, 0.005232129245996475, -0.02864377573132515, 0.021118856966495514, 0.1299152672290802, 0.08035965263843536, -0.011570257134735584, -0.03904671594500542, -0.05012444034218788, 0.0007277244585566223, 0.08546444773674011, 0.21527345478534698, -0.05813916027545929, 0.13403543829917908, -0.1605139821767807, 0.021014440804719925, 0.030406836420297623, -0.04394506290555, -0.09438403695821762, 0.05549763888120651, 0.013691432774066925, 0.16314485669136047, -0.04335641488432884, 0.1397532820701599, 0.15864914655685425, 0.09861736744642258, 0.03378196805715561, -0.018132992088794708, -0.08339208364486694, -0.03895509988069534, 0.034201931208372116, 0.06974188983440399, 0.13243654370307922, 0.18792672455310822, -0.2563488781452179, -0.03327590599656105, 0.14099323749542236, 0.03724154457449913, 0.15645863115787506, -0.08223928511142731, -0.15783411264419556, -0.11108329147100449, 0.17997251451015472, 0.11603222787380219, 0.05982520058751106, -0.08830363303422928, 0.05072903633117676, -0.01623031497001648, 0.21753889322280884, 0.08082228899002075, -0.012184473685920238, 0.05413205921649933, -0.10607833415269852, 0.024766696617007256, -0.02543048746883869, -0.07899343967437744, 0.29323452711105347, 0.13267111778259277, 0.021978750824928284, 0.051043711602687836, 0.2363513559103012, 0.08297617733478546, -0.1394326537847519, -0.19537876546382904, 0.15774600207805634, 0.030926033854484558, 0.1619431972503662, 0.09193741530179977, 0.15592354536056519, 0.02958342619240284, -0.1817365288734436, -0.12341942638158798, 0.029396407306194305, -0.02306092530488968, -0.1804279386997223, -0.05145514756441116, -0.11265887320041656, 0.09527663141489029, -0.13005667924880981, 0.08023478835821152, 0.0832524523139, -0.035202838480472565, 0.20430156588554382, -0.034599702805280685, -0.03180980682373047, -0.11821996420621872, -0.03465438261628151, 0.10458076745271683, 0.12878990173339844, -0.14936287701129913, -0.08637724071741104, 0.06325709074735641, 0.17665588855743408, 0.11659253388643265, 0.020262056961655617, 0.06453028321266174, -0.03342854976654053, 0.010854119434952736, 0.14208024740219116, -0.11858942359685898, 0.09030244499444962, 0.030475448817014694, 0.009549247100949287, -0.194240540266037, -0.10536413639783859, 0.07232514768838882, -0.057172033935785294, 0.01801851950585842, 0.09588061273097992, 0.1110343337059021, -0.2648713290691376, 0.07240201532840729, -0.30512604117393494, 0.04441709443926811, 0.013447020202875137, 0.03966766595840454, 0.0734950602054596, -0.18802207708358765, 0.005953080486506224, -0.044826678931713104, 0.007156072650104761, -0.0035173497162759304, 0.07361000031232834, -0.13455472886562347, -0.11090488731861115, -0.14466358721256256, -0.01179150678217411, -0.05174083635210991, 0.011259124614298344, -0.07433373481035233, -0.004384817089885473, 0.005995660554617643, -0.0946219339966774, -0.1383029967546463, -0.010355161502957344, -0.11611240357160568, -0.07313288003206253, -0.004579773172736168, -0.1721378117799759, -0.00022536746109835804, -0.012714562937617302, -0.13339266180992126, -0.08511285483837128, 0.23200641572475433, -0.09821786731481552, 0.022371701896190643, 0.023008370772004128, -0.034385062754154205, -0.07571934163570404, 0.02675510197877884, 0.14185307919979095, 0.06977888196706772, 0.1295539289712906, 0.05052535608410835, 0.041937634348869324, 0.06423957645893097, -0.0222224909812212, -0.10029689967632294, 0.08423447608947754, -0.11974158883094788, -0.06900577247142792, 0.11382216960191727, 0.129786878824234, -0.046645402908325195, -0.08183921873569489, -0.0731692761182785, -0.08542744070291519, -0.07333100587129593, 0.15658944845199585, 0.059770360589027405, -0.1813393384218216, -0.1407729983329773, 0.026734407991170883, -0.020336996763944626, -0.30406948924064636, 0.0467601977288723, 0.00655669579282403, 0.09453924745321274, 0.10292933136224747, -0.10421600937843323, -0.29090023040771484, 0.09863097220659256, 0.06685227900743484, 0.17414183914661407, 0.1299511343240738, 0.13311514258384705, 0.028769763186573982, -0.006959101185202599, 0.05431012436747551, 0.06409435719251633, 0.2494322806596756, -0.09727798402309418, -0.06937456876039505, -0.10506027936935425, -0.10206618905067444, 0.03956732898950577, 0.17027178406715393, -0.046420831233263016, 0.15321962535381317, -0.07795535773038864, -0.06501778960227966, -0.04816211387515068, -0.23004786670207977, 0.030194073915481567, -0.25411537289619446, -0.06146935001015663, -0.07098787277936935, -0.04274483397603035, 0.15595950186252594, 0.005570565816015005, 0.10695851594209671, -0.14954230189323425, -0.021502509713172913, -0.012981281615793705, -0.13780280947685242, -0.08142025023698807, 0.0005481095868162811, 0.11692620068788528, -0.23298229277133942, -0.020044026896357536, 0.09204768389463425, 0.12059613317251205, -0.13146162033081055, -0.08883251249790192, -0.08427630364894867, 0.09335165470838547, 0.10348464548587799, 0.13848184049129486, 0.0945298969745636, 0.2393704652786255, -0.12708590924739838, -0.09878427535295486, 0.08659868687391281, 0.12211603671312332, 0.09886689484119415, -0.03408041223883629, 0.24699795246124268, 0.004488905426114798, -0.10010581463575363, 0.1794583946466446, -0.17244194447994232, -0.010686922818422318, -0.14611037075519562, 0.06945375353097916, -0.13418439030647278, -0.0607588030397892, -0.08973711729049683, 0.0860641747713089, -0.1871616542339325, -0.07298552244901657, -0.032640133053064346, 0.09006933122873306, -0.06433986127376556, 0.28142014145851135, -0.06600180268287659, -0.05045781284570694, 0.1274503767490387, -0.11404313892126083, 0.12312158197164536, -0.1430390179157257, 0.08843255043029785, -0.21315036714076996, 0.1713840514421463, 0.1692020446062088, 0.04301324114203453, -0.1490614414215088, 0.16078534722328186, -0.11463667452335358, 0.2062876969575882, 0.009388808161020279, 0.019813010469079018, 0.047458089888095856, -0.06513737142086029, -0.0810386911034584, -0.19961775839328766, -0.0715469941496849, -0.0792197585105896, 0.044061530381441116, 0.08588581532239914, -0.109516941010952, 0.059977997094392776, -0.1540830135345459, -0.018307385966181755, 0.16958655416965485, 0.03188078850507736, 0.10439003258943558, 0.03778922185301781, -0.14152319729328156, -0.052941080182790756, -0.00868619792163372, 0.07817219197750092, -0.18030819296836853, 0.31396615505218506, -0.050012100487947464, 0.18836307525634766, -0.22064989805221558, -0.10467485338449478, 0.10298533737659454, 0.16137376427650452, -0.07276100665330887, -0.16442473232746124, 0.11019773781299591, 0.0843391939997673, 0.0019702352583408356, 0.10090291500091553, 0.06218709051609039, 0.05073085427284241, -0.18821462988853455, -0.06286924332380295, -2.3473888971319756e-32, 0.1432628035545349, 0.16319817304611206, -0.04910704493522644, -0.12190178781747818, 0.12942510843276978, -0.11908204108476639, -0.08311935514211655, -0.18430161476135254, 0.0678248256444931, 0.07877465337514877, -0.22995728254318237, 0.06875921040773392, 0.15391762554645538, -0.02078792080283165, -0.09870358556509018, 0.055724773555994034, 0.06157528981566429, -0.06007999926805496, 0.18048813939094543, 0.073029525578022, 0.18897266685962677, -0.03969623148441315, -0.005171801429241896, 0.06591702252626419, -0.21440881490707397, -0.1527377814054489, -0.09031014144420624, 0.11036416888237, -0.04769602417945862, -0.04121791198849678, -0.15373928844928741, 0.13564418256282806, 0.15775686502456665, -0.08991953730583191, -0.21219585835933685, 0.055011287331581116, -0.2645644545555115, -0.04520251229405403, -0.04448159039020538, 0.018650995567440987, -0.02074998989701271, 0.15498945116996765, 0.3316620886325836, -0.0994970053434372, -0.05356338992714882, 0.1652582734823227, -0.09708084911108017, -0.07360731810331345, 0.003374178195372224, -0.00020074872008990496, 0.16072995960712433, -0.012154958210885525, 0.09086973965167999, 0.010011655278503895, 0.0055746776051819324, 0.031656600534915924, -0.18392430245876312, 0.05992504209280014, -0.09232285618782043, 0.2440311461687088, 0.03575422242283821, 0.10784336179494858, 0.02873839996755123, -0.08826630562543869, 0.11200166493654251, 0.010238911025226116, 0.2832989990711212, -0.17894811928272247, 0.08033576607704163, 0.07211489230394363, -0.052230097353458405, -0.05317869037389755, -0.1179928258061409, 0.04428045451641083, -0.09609387069940567, -0.03344765305519104, -0.1802135705947876, 0.15346767008304596, -0.23682557046413422, -0.08660903573036194, -0.10854630172252655, -0.031271740794181824, 0.08730320632457733, 0.06054532155394554, 0.1409253031015396, 0.10525815933942795, 0.05298558622598648, 0.09130145609378815, 0.05992266908288002, -0.10872702300548553, -0.24706925451755524, 0.08834199607372284, -0.15489311516284943, -0.04013404622673988, -0.009295180439949036, 0.20306406915187836, -0.02949073351919651, 0.0009371685446240008, -0.04852738231420517, -0.17221595346927643, -0.03706957772374153, 0.0032724933698773384, -0.024762365967035294, 0.04907017946243286, 0.044423412531614304, 0.01608189195394516, 0.01400676928460598, 0.03233823925256729, -0.1971452832221985, 0.08643538504838943, -0.036354564130306244, 0.016834096983075142, 0.13149245083332062, -0.02541256882250309, -0.011619595810770988, -0.012793054804205894, 0.1340854912996292, 0.07799138128757477, 0.01136646419763565, -0.12713328003883362, -0.1439923793077469, -0.055278003215789795, -0.011346268467605114, 0.009870638139545918, 0.013753164559602737, 0.08872000128030777, -0.10967779159545898, -0.08440443128347397, -0.053579192608594894, -0.048316337168216705, 0.08395566791296005, 0.11723189800977707, 6.807499062233546e-7, -0.08314438164234161, -0.1655837744474411, 0.09437761455774307, 0.04393173009157181, 0.04779206961393356, 0.09132882207632065, 0.03932826593518257, 0.19710060954093933, -0.1513158529996872, 0.07670112699270248, 0.23854845762252808, -0.17840376496315002, -0.04251597076654434, -0.029054364189505577, -0.06195872277021408, 0.05429212003946304, -0.17948442697525024, -0.0021232389844954014, -0.07559344172477722, 0.09053217619657516, -0.0050149899907410145, -0.04276299104094505, 0.014718804508447647, -0.18981972336769104, 0.05841762199997902, -0.037207089364528656, -0.16505299508571625, 0.08815345913171768, -0.0604122094810009, 0.06238769739866257, 0.00951319094747305, -0.13222670555114746, -0.010353071615099907, 0.11369460821151733, -0.03610384836792946, -0.036614008247852325, -0.03544178977608681, -0.029377160593867302, -0.04953025281429291, 0.0013776673004031181, 0.04451853409409523, -0.1532122790813446, -0.008835646323859692, -0.032099127769470215, 0.1552155315876007, -0.02430168353021145, -0.130020871758461, 0.012204471044242382, 0.0806451365351677, 0.04076575115323067, 0.05666378140449524, 0.17832247912883759, -0.09981974959373474, 0.10385822504758835, -0.19036826491355896, -0.016088830307126045, -0.12583139538764954, -0.11963050812482834, 0.05275905504822731, -0.058157779276371, -0.12102994322776794, 0.032263752073049545, 0.015620799735188484, -0.0987531840801239, 0.04171692579984665, 0.16260387003421783, 0.05172346159815788, 8.261927032471538e-35, -0.039938271045684814, 0.10630419105291367, 0.06402125209569931, -0.10829533636569977, -0.05393953248858452, -0.12716662883758545, -0.14622384309768677, -0.0336579754948616, 0.0076409000903368, 0.015416769310832024, -0.10305985808372498 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
An approach that works assuming you can hold the all the unique document hashes in memory: ```python from datasets import load_dataset def get_hash(example): """Get hash of content field.""" return {"hash": hash(example["content"])} # can use any hashing function here def check_uniques(example, uniques): """Check if current hash is still in set of unique hashes and remove if true.""" if example["hash"] in uniques: uniques.remove(example["hash"]) return True else: return False ds = load_dataset("some_dataset") ds = ds.map(get_hash) uniques = set(ds.unique("hash")) ds_filter = ds.filter(check_uniques, fn_kwargs={"uniques": uniques}) ``` If the `uniques` could be stored in arrow then no additional memory would used at all but I don't know if this is possible.
**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
105
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 An approach that works assuming you can hold the all the unique document hashes in memory: ```python from datasets import load_dataset def get_hash(example): """Get hash of content field.""" return {"hash": hash(example["content"])} # can use any hashing function here def check_uniques(example, uniques): """Check if current hash is still in set of unique hashes and remove if true.""" if example["hash"] in uniques: uniques.remove(example["hash"]) return True else: return False ds = load_dataset("some_dataset") ds = ds.map(get_hash) uniques = set(ds.unique("hash")) ds_filter = ds.filter(check_uniques, fn_kwargs={"uniques": uniques}) ``` If the `uniques` could be stored in arrow then no additional memory would used at all but I don't know if this is possible.
[ -0.13008379936218262, 0.19043411314487457, -0.1548040807247162, 0.05934559926390648, 0.06083288788795471, 0.24671906232833862, 0.15498951077461243, -0.05099974200129509, 0.006854057777673006, 0.2417960911989212, -0.03488942235708237, 0.09663286060094833, -0.18279042840003967, 0.08219540119171143, -0.0756075531244278, -0.15518325567245483, 0.02415349707007408, 0.10263936221599579, -0.05426083505153656, 0.06874018162488937, 0.017126942053437233, 0.016045566648244858, 0.11123121529817581, 0.010458404198288918, -0.1097063422203064, 0.019702836871147156, -0.0295888502150774, 0.03185625374317169, 0.08640319108963013, 0.0756293460726738, 0.16127701103687286, 0.07115086168050766, -0.09478536248207092, -0.04505622014403343, 0.00000499802172271302, 0.07430531084537506, 0.10839079320430756, -0.0811079815030098, -0.058932457119226456, -0.07775363326072693, -0.07603329420089722, 0.034456197172403336, 0.013570897281169891, -0.09967637062072754, -0.10706929862499237, -0.09216388314962387, -0.010596314445137978, -0.016554666683077812, 0.12042572349309921, -0.07658979296684265, -0.122757688164711, 0.013605237938463688, -0.08978002518415451, -0.050735555589199066, 0.011567123234272003, 0.08093050867319107, 0.006970520596951246, 0.1671745777130127, -0.3190881907939911, -0.12064507603645325, 0.16066820919513702, -0.032618872821331024, 0.09480764716863632, 0.11174438148736954, -0.04811539500951767, -0.02508579008281231, -0.22765453159809113, 0.06570308655500412, 0.01773706078529358, 0.1591448187828064, -0.12698286771774292, -0.22866694629192352, -0.01970229484140873, -0.09808947145938873, -0.0628974512219429, 0.0225932989269495, -0.14280354976654053, -0.014917567372322083, -0.030006222426891327, 0.12141183018684387, -0.13093721866607666, -0.034524425864219666, 0.08075053244829178, -0.06094416230916977, -0.044000208377838135, -0.29841694235801697, -0.05209674313664436, 0.161355659365654, -0.01520936843007803, 0.029412874951958656, -0.023238979279994965, 0.11434512585401535, -0.049483466893434525, 0.021418262273073196, -0.03817428648471832, 0.13131839036941528, -0.20938700437545776, -0.0825737789273262, 0.09707389026880264, -0.14800074696540833, 0.15772423148155212, 0.040593720972537994, -0.14944005012512207, 0.03361993655562401, 0.18227709829807281, -0.16614538431167603, -0.22028711438179016, -0.06183318421244621, -0.11054283380508423, -0.057602643966674805, -0.13016299903392792, 0.029879363253712654, 0.05823608487844467, -0.11116404086351395, 0.12198897451162338, 0.12879449129104614, -0.003966072574257851, 0.07331574708223343, -0.09669244289398193, 0.07937727123498917, -0.1479797214269638, 0.11955344676971436, -0.007553180679678917, 0.01632249727845192, 0.042468003928661346, -0.10227114707231522, 0.025645054876804352, -0.08600567281246185, -0.0540292002260685, 0.01781521923840046, 0.08226234465837479, 0.02683250792324543, 0.0691726952791214, -0.020525652915239334, 0.024140672758221626, -0.17703087627887726, -0.10674501955509186, -0.05721990764141083, 0.12100064009428024, -0.003530033165588975, 0.2243373841047287, 0.020945627242326736, 0.06480982154607773, 0.0759345144033432, 0.20047900080680847, 0.038583092391490936, -0.00796126015484333, 0.03645460680127144, -0.148573637008667, 0.3183209002017975, 0.01342540979385376, 0.15400220453739166, -0.08897438645362854, 0.2809971570968628, 0.015091067180037498, -0.0363231860101223, 0.08147136121988297, -0.1665048450231552, -0.32621413469314575, -0.006450857035815716, 0.10991615056991577, -0.18503545224666595, -0.08011212199926376, -0.03285693749785423, 0.08320033550262451, 0.1146150603890419, 0.050297513604164124, 0.09774336218833923, -0.03282582387328148, -0.1552824229001999, -0.15595006942749023, -0.00615314207971096, -0.0485009141266346, -0.1751578450202942, 0.004806028679013252, 0.09152712672948837, 0.049501437693834305, 0.10414831340312958, -0.043275173753499985, 0.08988764882087708, 0.14406394958496094, 0.11698175966739655, 0.039331626147031784, -0.09746600687503815, 0.25914841890335083, -0.058685630559921265, -0.006542520597577095, -0.07820210605859756, -0.1772424280643463, -0.05267268791794777, -0.08168091624975204, -0.059347011148929596, 0.09942549467086792, 0.30874526500701904, 0.010613836348056793, 0.02062048204243183, 0.13569454848766327, 0.028595002368092537, 0.10050330311059952, 0.0026823675725609064, -0.18259726464748383, -0.10389185696840286, -0.07902608066797256, -0.045268889516592026, 0.13045604526996613, -0.1135924831032753, -0.09724073857069016, 0.17692025005817413, 0.116411954164505, -0.176546111702919, 0.03477141261100769, -0.1703469306230545, 0.00041296781273558736, -0.07681533694267273, -0.11412417888641357, 0.16106800734996796, -0.15374048054218292, -0.014270973391830921, -0.04543096944689751, -0.023676980286836624, 0.04575502127408981, 0.14813826978206635, 0.004065871238708496, -0.009390302002429962, -0.017121421173214912, 0.10420581698417664, 0.041994914412498474, 0.06601054966449738, -0.002879062667489052, -0.026081090793013573, -0.1293172389268875, -0.07221098989248276, 0.2758592367172241, -0.029434408992528915, -0.08981124311685562, 0.0427657850086689, 0.0205670315772295, 0.07186634093523026, 0.10375756770372391, -0.02601088397204876, -0.24516595900058746, 0.08374572545289993, -0.015076791867613792, 0.0009321403340436518, -0.12253730744123459, 0.21523217856884003, -0.09554511308670044, 0.026317086070775986, -0.06548896431922913, 0.008464762941002846, 0.1385890543460846, 0.13911420106887817, 0.052815891802310944, -0.03979741409420967, -0.04404321685433388, -0.005538733676075935, 0.08837755769491196, 0.16846618056297302, -0.02712336555123329, 0.10781770199537277, -0.1919792741537094, 0.014104850590229034, 0.027209699153900146, 0.05544915795326233, -0.02791307121515274, 0.040745049715042114, -0.007256000768393278, 0.2216682881116867, -0.054745614528656006, 0.11689174175262451, 0.15261007845401764, 0.1224270910024643, 0.0115561094135046, -0.050941262394189835, -0.05221857875585556, -0.10786224901676178, -0.045478180050849915, 0.11756346374750137, 0.09672636538743973, 0.19742363691329956, -0.248430997133255, 0.05905620753765106, 0.17153196036815643, -0.02067973092198372, 0.14240947365760803, -0.0846429243683815, -0.18776467442512512, -0.07430412620306015, 0.194011852145195, 0.19344769418239594, 0.051440972834825516, -0.04003185033798218, 0.045276910066604614, -0.038239676505327225, 0.17734701931476593, 0.019752269610762596, -0.0255589559674263, -0.08887749910354614, -0.14647617936134338, -0.014484872110188007, 0.02450082264840603, -0.03302581608295441, 0.22658073902130127, 0.10471948981285095, 0.05324242264032364, 0.09798777848482132, 0.22876504063606262, 0.13755860924720764, -0.15276044607162476, -0.30087488889694214, 0.14198529720306396, 0.0353584960103035, 0.06989241391420364, 0.08546479791402817, 0.11087203025817871, -0.00035336081054992974, -0.237995445728302, -0.12032858282327652, 0.12865035235881805, -0.01733412593603134, -0.11586849391460419, 0.05138082429766655, -0.1354585736989975, 0.11637375503778458, -0.09650994837284088, 0.14749625325202942, 0.16521377861499786, -0.006600603926926851, 0.13355906307697296, -0.015426062047481537, -0.016797097399830818, -0.11729696393013, 0.004841960500925779, 0.029470300301909447, 0.08794281631708145, -0.08285152167081833, -0.0798020288348198, -0.11416307836771011, 0.21129022538661957, 0.09167589992284775, -0.01770869828760624, 0.13749802112579346, -0.006821012124419212, -0.041961006820201874, 0.307149201631546, -0.06736212223768234, 0.05942511558532715, 0.06726936250925064, -0.013499001041054726, -0.11428900808095932, -0.14003437757492065, 0.05672449246048927, -0.01445452868938446, 0.023421328514814377, 0.042543016374111176, 0.13784831762313843, -0.21690550446510315, 0.07039902359247208, -0.21938744187355042, 0.03888075426220894, 0.04738664627075195, 0.1478254795074463, 0.09194894134998322, -0.16549792885780334, -0.0038680369034409523, -0.01901567354798317, -0.0015346029540523887, 0.06992383301258087, 0.09079176187515259, -0.13553009927272797, -0.16833752393722534, -0.16849924623966217, 0.014824621379375458, -0.021588897332549095, -0.0056173489429056644, -0.026603301987051964, 0.00001184399297926575, -0.0845971331000328, -0.1306852251291275, -0.16572564840316772, 0.0687568411231041, -0.23541846871376038, -0.009770970791578293, -0.053582046180963516, -0.12280071526765823, 0.01291307806968689, -0.02111065573990345, -0.02015891671180725, -0.09740233421325684, 0.20653395354747772, -0.10440786182880402, 0.14222019910812378, 0.09082233160734177, 0.020748566836118698, -0.030697541311383247, 0.06397152692079544, 0.07143504917621613, 0.0262601338326931, 0.15506725013256073, -0.02709376811981201, 0.027249453589320183, 0.03312071040272713, -0.020790407434105873, -0.046080008149147034, 0.07113394141197205, -0.16163505613803864, -0.0505262054502964, 0.09717001765966415, 0.1322421282529831, -0.006280428729951382, -0.06282663345336914, -0.055427730083465576, -0.040142711251974106, -0.09274880588054657, 0.14946851134300232, 0.026461686939001083, -0.15502102673053741, -0.07997433096170425, 0.1243748739361763, -0.01259818859398365, -0.28620442748069763, -0.025964494794607162, -0.022691870108246803, 0.031381577253341675, 0.09213454276323318, -0.12829911708831787, -0.27106475830078125, 0.07244361937046051, 0.12305751442909241, 0.1089240089058876, 0.13603757321834564, 0.1448981761932373, 0.11949038505554199, 0.03727302327752113, 0.16036809980869293, 0.042684923857450485, 0.2542215883731842, -0.10226253420114517, -0.10211694985628128, -0.11897148936986923, -0.1486140787601471, 0.053056180477142334, 0.18207308650016785, -0.03748049959540367, 0.10583573579788208, -0.00495274318382144, -0.14081284403800964, 0.031616535037755966, -0.14897142350673676, 0.004524501971900463, -0.26282215118408203, -0.054785747081041336, -0.12992540001869202, -0.022446276620030403, 0.14614620804786682, -0.01697128266096115, 0.0976373627781868, -0.055547166615724564, -0.0802731141448021, 0.030810069292783737, -0.10927581787109375, -0.06764230132102966, 0.025724025443196297, 0.056056149303913116, -0.22731496393680573, 0.049052730202674866, -0.004525951575487852, 0.05518973618745804, -0.12315560132265091, -0.06950726360082626, -0.1349128931760788, 0.08489766716957092, 0.09671160578727722, 0.0846739336848259, 0.16682159900665283, 0.24410970509052277, -0.09983287751674652, -0.097000852227211, 0.0944671481847763, 0.05801303684711456, 0.15149442851543427, 0.04459763318300247, 0.2516688108444214, 0.05957856774330139, -0.06212395057082176, 0.17195191979408264, -0.25223875045776367, -0.050836194306612015, -0.15656794607639313, 0.06277269870042801, -0.11171045154333115, -0.04212895408272743, -0.13558587431907654, 0.14375492930412292, -0.16334500908851624, -0.04372952878475189, -0.054918672889471054, 0.025190580636262894, -0.040374137461185455, 0.23455242812633514, -0.042839180678129196, -0.10560505837202072, 0.07370030879974365, -0.06464184075593948, 0.09635809063911438, -0.10877060145139694, 0.03908941149711609, -0.2596507966518402, 0.16004355251789093, 0.11284588277339935, -0.0002607860369607806, -0.11472057551145554, 0.08307153731584549, -0.16155502200126648, 0.2076713740825653, -0.10204046219587326, 0.04938572272658348, 0.0064748721197247505, -0.04990112781524658, -0.07450804114341736, -0.16342689096927643, -0.042799439281225204, -0.005911970976740122, 0.023142801597714424, 0.028865357860922813, -0.10919459164142609, 0.04989960044622421, -0.12569555640220642, 0.013496206142008305, 0.11058557033538818, 0.015329753048717976, 0.07976479828357697, 0.011569278314709663, -0.11420141160488129, -0.052250467240810394, 0.005530946888029575, 0.11954649537801743, -0.09502039104700089, 0.22285734117031097, 0.03435671329498291, 0.1763630509376526, -0.17574875056743622, -0.21410687267780304, 0.13848602771759033, 0.14025326073169708, -0.02958895079791546, -0.09330449253320694, 0.15738177299499512, 0.06901707500219345, -0.016410624608397484, 0.12307262420654297, 0.0017198951682075858, 0.03878708556294441, -0.13268639147281647, -0.026632053777575493, -2.354956288952188e-32, 0.12525717914104462, 0.09954995661973953, -0.08299218118190765, -0.11526566743850708, 0.12704282999038696, -0.12168112397193909, -0.11966772377490997, -0.11743432283401489, 0.04292896017432213, 0.02432982251048088, -0.22711610794067383, 0.1390700787305832, 0.17073944211006165, 0.0072967279702425, -0.02926691435277462, 0.05419500544667244, 0.10704351961612701, -0.08538032323122025, 0.14988739788532257, 0.13203194737434387, 0.2496929168701172, -0.05652974173426628, 0.003964364994317293, 0.11122108995914459, -0.25557640194892883, -0.16162870824337006, -0.06691095978021622, 0.07341904938220978, 0.041578564792871475, -0.033189497888088226, -0.16768576204776764, 0.14868290722370148, 0.13459458947181702, -0.01794487237930298, -0.17716966569423676, 0.007100394926965237, -0.27823829650878906, -0.01838354952633381, -0.002638682257384062, 0.03469929099082947, -0.01306365430355072, 0.09951341897249222, 0.3044474422931671, -0.09515199810266495, -0.08586067706346512, 0.12499518692493439, -0.09610073268413544, -0.06717351824045181, -0.0475865975022316, -0.07809840887784958, 0.08475169539451599, -0.015168397687375546, 0.007227384019643068, 0.01282659824937582, -0.055439967662096024, -0.04758657142519951, -0.1296866536140442, -0.11715155839920044, -0.12477390468120575, 0.18931005895137787, 0.07550656050443649, 0.08562355488538742, -0.03388772904872894, -0.10727564245462418, 0.08309757709503174, 0.05302795395255089, 0.2399507761001587, -0.18331564962863922, 0.1565919816493988, 0.11675652116537094, 0.04772981256246567, -0.033403314650058746, -0.12079799920320511, 0.03561645373702049, -0.05862509459257126, -0.029958214610815048, -0.1968851089477539, 0.19092018902301788, -0.1402185559272766, 0.01963163912296295, -0.07899881899356842, -0.03862086683511734, -0.0021673482842743397, 0.04478456452488899, 0.09570890665054321, 0.1617714911699295, 0.0552309975028038, 0.06568366289138794, 0.07425792515277863, -0.08301091939210892, -0.3240722119808197, 0.11653276532888412, -0.09663695842027664, -0.028060274198651314, 0.029328420758247375, 0.26495295763015747, -0.04819227010011673, 0.00887155719101429, -0.09161761403083801, -0.17059358954429626, -0.005261766258627176, -0.07118742167949677, -0.013510146178305149, -0.008397572673857212, 0.026257634162902832, 0.014244887977838516, -0.000636928656604141, 0.09131273627281189, -0.23555579781532288, 0.10197541862726212, -0.0015836936654523015, 0.0003634094027802348, 0.11294589191675186, -0.07245152443647385, -0.06662069261074066, 0.012892384082078934, 0.11655756086111069, 0.04450458288192749, -0.016524696722626686, -0.005195064470171928, -0.0803808867931366, -0.0039049217011779547, 0.04713122174143791, 0.0430176667869091, 0.033050812780857086, 0.05187200754880905, -0.1326257884502411, -0.20779016613960266, 0.2050246000289917, -0.03137030452489853, 0.07654712349176407, 0.1603001356124878, 7.174869551818119e-7, -0.07109048217535019, -0.11370771378278732, 0.04565316438674927, 0.03413774073123932, 0.007169329561293125, 0.16206032037734985, 0.0519847571849823, 0.1999094933271408, -0.18064360320568085, 0.18487796187400818, 0.18895214796066284, -0.14632345736026764, -0.02948453463613987, -0.03984634205698967, -0.06058512628078461, 0.07093363255262375, -0.14867794513702393, -0.06020888686180115, -0.08392637968063354, 0.09328191727399826, -0.08298254758119583, -0.016639452427625656, -0.045794516801834106, -0.1677955538034439, 0.014241850934922695, -0.11600825935602188, -0.14152033627033234, 0.08783040195703506, -0.05118120089173317, 0.042440854012966156, 0.07896459847688675, 0.02253934182226658, -0.03401808440685272, -0.015587172470986843, -0.03869703412055969, 0.021380512043833733, -0.04786054790019989, -0.08531322330236435, -0.023426448926329613, 0.02082960680127144, 0.0076751853339374065, -0.1678694784641266, -0.012981942854821682, 0.0032985417637974024, 0.17896491289138794, -0.018335625529289246, -0.13847415149211884, -0.057271070778369904, 0.052206892520189285, 0.015948381274938583, 0.011606121435761452, 0.19686248898506165, -0.11340899020433426, 0.10454137623310089, -0.1656075268983841, -0.07648663222789764, -0.06559490412473679, -0.07808184623718262, 0.08077690005302429, -0.004303657915443182, -0.07313801348209381, 0.09043395519256592, 0.06100689619779587, -0.08189880102872849, 0.00590294785797596, 0.06475232541561127, -0.009197027422487736, 6.693939250507015e-35, -0.045024145394563675, 0.10382082313299179, 0.018125522881746292, -0.1313370168209076, -0.03125619888305664, -0.08448321372270584, -0.20893916487693787, -0.01440748106688261, -0.011129516176879406, -0.10432366281747818, -0.09715335816144943 ]
https://github.com/huggingface/datasets/issues/2514
Can datasets remove duplicated rows?
@lvwerra hey, could you tell me how reliable is this deduplication method. i am currently using the same deduplication strategy to deduplicate a large text corpus to pretrain LLMs ~ 11B to 20B. just needed to ensure if this strategy would be fine on large datasets for LLMs pretraining.
**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
49
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 @lvwerra hey, could you tell me how reliable is this deduplication method. i am currently using the same deduplication strategy to deduplicate a large text corpus to pretrain LLMs ~ 11B to 20B. just needed to ensure if this strategy would be fine on large datasets for LLMs pretraining.
[ -0.15107792615890503, 0.20602306723594666, -0.14209359884262085, 0.13403953611850739, 0.05406641215085983, 0.24583683907985687, 0.14618174731731415, 0.054494425654411316, -0.06584792584180832, 0.20249350368976593, -0.08181214332580566, 0.15014636516571045, -0.08277320861816406, -0.012392394244670868, -0.058515843003988266, -0.10865403711795807, 0.00981806218624115, 0.04255574196577072, -0.1092342883348465, 0.0796758234500885, 0.06744512915611267, -0.007701179012656212, 0.06357043236494064, 0.050970740616321564, -0.04838845133781433, 0.05097230151295662, 0.015016678720712662, 0.01941717229783535, 0.07438763231039047, 0.07861597090959549, 0.1820898801088333, 0.049425601959228516, 0.011216397397220135, -0.026347968727350235, 0.000005021478955313796, -0.04500913619995117, 0.028765643015503883, -0.10054410248994827, -0.19839106500148773, -0.08561071753501892, -0.13713078200817108, 0.10088643431663513, 0.07779480516910553, -0.0816011056303978, -0.13969136774539948, -0.019637783989310265, 0.010948874987661839, 0.026794910430908203, 0.15143409371376038, 0.02903078682720661, -0.08303693681955338, 0.007486984133720398, -0.11189098656177521, -0.06253162771463394, 0.04248303174972534, 0.11607331037521362, 0.06895292550325394, 0.12274351716041565, -0.28728118538856506, -0.08782393485307693, 0.20353971421718597, -0.07554743438959122, 0.032197218388319016, 0.15845230221748352, -0.11910566687583923, -0.06622827798128128, -0.24002566933631897, -0.00846824049949646, 0.055168092250823975, 0.22075103223323822, -0.057479128241539, -0.1508578658103943, 0.027555031701922417, -0.06855041533708572, -0.0014559628907591105, 0.01796640083193779, -0.1862029731273651, -0.009075812064111233, -0.026001054793596268, 0.1148625984787941, -0.08615031838417053, -0.037320394068956375, 0.032181426882743835, -0.11111374199390411, -0.10075346380472183, -0.09001962095499039, -0.12665189802646637, 0.12123220413923264, -0.0534072183072567, 0.009382876567542553, 0.07416996359825134, 0.10766883939504623, -0.001881941920146346, 0.05220666155219078, -0.11600900441408157, 0.14174045622348785, -0.19145531952381134, -0.046484705060720444, 0.12718258798122406, -0.06120040640234947, 0.1746894270181656, 0.07841220498085022, -0.23240676522254944, -0.022876480594277382, 0.14085924625396729, -0.09571073949337006, -0.2037426382303238, -0.04235730692744255, -0.015286743640899658, -0.003636841895058751, -0.1653674691915512, 0.17313754558563232, 0.019040362909436226, -0.0633445456624031, 0.09185092151165009, 0.19021911919116974, -0.05812492221593857, 0.032807204872369766, -0.13214470446109772, 0.02603900246322155, -0.04668310284614563, 0.06880763173103333, -0.04437009617686272, -0.02838965319097042, -0.01789623685181141, -0.048773255199193954, 0.03926409035921097, 0.020964309573173523, -0.014844724908471107, -0.08612389117479324, 0.09929660707712173, 0.004636008758097887, 0.09408535808324814, -0.07544510811567307, -0.030902810394763947, -0.09140545129776001, -0.10881736129522324, -0.03556689992547035, 0.002454404253512621, -0.052693288773298264, 0.13934560120105743, -0.05946918949484825, -0.006253219675272703, -0.030864981934428215, 0.1701502948999405, -0.020879363641142845, -0.06209098920226097, -0.06666022539138794, -0.16463413834571838, 0.2916007339954376, 0.07467839866876602, 0.3061217963695526, -0.21380917727947235, 0.2542360723018646, 0.015136301517486572, -0.02988782338798046, -0.04036650434136391, -0.09873798489570618, -0.23020386695861816, 0.03060910850763321, 0.11643461138010025, -0.03846808150410652, 0.058101266622543335, 0.10176022350788116, 0.0885184183716774, 0.13030469417572021, -0.013731284998357296, 0.10928818583488464, -0.07107403129339218, -0.129736065864563, -0.0557694286108017, -0.06126170605421066, -0.03597861900925636, -0.11286970973014832, 0.058252524584531784, 0.17465056478977203, 0.05043361335992813, 0.1574346274137497, -0.028670303523540497, 0.12181684374809265, 0.13232168555259705, 0.10293153673410416, 0.10291530936956406, -0.0752459242939949, 0.1930246204137802, -0.07046820968389511, 0.0026081001851707697, -0.03818374127149582, -0.0985414907336235, -0.13673841953277588, -0.04793907329440117, -0.08384192734956741, 0.05990336462855339, 0.2726505994796753, 0.012530773878097534, 0.03602983430027962, 0.08723133057355881, 0.07688619941473007, 0.15013599395751953, -0.1418016403913498, -0.21516737341880798, -0.20767585933208466, -0.10542673617601395, 0.00979701429605484, 0.03502986207604408, -0.16940808296203613, -0.1536305695772171, 0.11948320269584656, 0.0765802189707756, -0.15752455592155457, 0.044441964477300644, -0.11280356347560883, 0.051442794501781464, -0.11751317232847214, -0.09366490691900253, 0.1702755242586136, -0.13408654928207397, 0.00045601933379657567, -0.02026100642979145, 0.02147710882127285, 0.005872086156159639, 0.10396427661180496, 0.011132659390568733, 0.09815765172243118, -0.04157918691635132, 0.09420301020145416, 0.026826286688447, 0.1376716047525406, 0.10841614007949829, -0.004220778588205576, -0.07597129046916962, -0.09758036583662033, 0.31609097123146057, -0.02516629546880722, -0.08979419618844986, 0.03866807371377945, 0.058020032942295074, -0.14239266514778137, 0.14227864146232605, 0.04978206381201744, -0.3821600079536438, 0.10164478421211243, -0.10929258912801743, 0.008485440164804459, -0.1664448231458664, 0.23141275346279144, -0.10937534272670746, -0.06453611701726913, 0.042277466505765915, -0.003775364253669977, 0.21289697289466858, 0.06947006285190582, -0.009568672627210617, -0.09141331166028976, -0.027142930775880814, 0.017050450667738914, 0.012922313064336777, 0.19499193131923676, -0.11712232232093811, 0.16188570857048035, -0.22355946898460388, 0.03871249407529831, 0.0699438527226448, 0.016828615218400955, 0.027763981372117996, 0.059739693999290466, 0.008672304451465607, 0.14022350311279297, -0.04462984576821327, 0.14535841345787048, 0.18941281735897064, 0.08366824686527252, -0.09972908347845078, -0.03995191305875778, -0.019328860566020012, -0.15091794729232788, -0.11553296446800232, 0.06718190759420395, 0.0696801096200943, 0.2590523958206177, -0.25085487961769104, 0.06804218888282776, 0.10237375646829605, 0.08958669751882553, 0.1535656750202179, -0.07556236535310745, -0.20573116838932037, -0.17976431548595428, 0.1424981653690338, 0.2901565134525299, 0.008219500072300434, -0.091694176197052, 0.02262065000832081, -0.015020436607301235, 0.20135867595672607, 0.0668383464217186, -0.004111240152269602, 0.010054067708551884, -0.17094530165195465, 0.0458877794444561, -0.00005429167504189536, 0.022965658456087112, 0.09702950716018677, 0.06215883418917656, 0.07048667222261429, 0.055879317224025726, 0.1975424438714981, -0.00022744471789337695, -0.266445517539978, -0.2688312828540802, 0.1490531712770462, 0.03673778846859932, 0.1621910184621811, 0.11569361388683319, 0.09994557499885559, 0.028647657483816147, -0.22179628908634186, -0.10063863545656204, 0.0018763114931061864, 0.041277214884757996, -0.13906194269657135, 0.004312846343964338, -0.12134648859500885, 0.10359528660774231, -0.1253630816936493, 0.15363958477973938, 0.10098136961460114, -0.02406146749854088, 0.1357247233390808, -0.06516778469085693, -0.07225753366947174, -0.07591622322797775, -0.044604524970054626, 0.006761213764548302, 0.07228545099496841, -0.13259820640087128, -0.13880790770053864, 0.12794481217861176, 0.10272101312875748, 0.08279652893543243, -0.018792783841490746, 0.12065889686346054, 0.006088888738304377, 0.04046737775206566, 0.14736239612102509, -0.1226990595459938, -0.023681627586483955, 0.07618092000484467, -0.043173618614673615, -0.19340923428535461, -0.10935800522565842, 0.06348337233066559, -0.13760730624198914, 0.029954660683870316, 0.06997287273406982, 0.23323874175548553, -0.25475916266441345, 0.14654681086540222, -0.1753442883491516, -0.03287087380886078, -0.01058164145797491, 0.04990891367197037, 0.009088069200515747, -0.17993363738059998, -0.0311382208019495, -0.02497301623225212, -0.02574845217168331, 0.07106110453605652, 0.04670638218522072, -0.1712561845779419, -0.022901583462953568, -0.22593946754932404, 0.040043771266937256, 0.02814599871635437, -0.03621874749660492, -0.03358854725956917, -0.014901322312653065, 0.027431096881628036, -0.05354316532611847, -0.06833937764167786, 0.009439632296562195, -0.2150677740573883, -0.11370695382356644, 0.044587135314941406, -0.060748688876628876, 0.09230986982584, -0.03797396644949913, -0.05671731382608414, -0.14252883195877075, 0.2319592833518982, -0.12147431820631027, 0.10343825817108154, 0.030118782073259354, -0.020743582397699356, 0.010154412128031254, 0.06131225824356079, 0.11241741478443146, 0.14344999194145203, 0.2184440940618515, 0.0026543184649199247, -0.01617308519780636, -0.03785735368728638, -0.03598687797784805, -0.13025784492492676, 0.04639020562171936, -0.0756593719124794, -0.03976292908191681, 0.21942920982837677, 0.06753496080636978, -0.05495939031243324, -0.004321611486375332, -0.10377699136734009, -0.09476780891418457, -0.04450187087059021, 0.25551554560661316, 0.07079720497131348, -0.14072054624557495, -0.1295328438282013, 0.12212946265935898, 0.004063489846885204, -0.24578438699245453, 0.042168255895376205, -0.04770445451140404, -0.000715841946657747, 0.049412503838539124, -0.059941649436950684, -0.28969600796699524, 0.019300740212202072, 0.07503245770931244, 0.14387014508247375, 0.1329246610403061, 0.12326157838106155, -0.012151629664003849, 0.02431648224592209, 0.1724364459514618, 0.006981590762734413, 0.20545099675655365, -0.1553698480129242, -0.016018742695450783, -0.13274803757667542, -0.05400094389915466, 0.04554840177297592, 0.1324639767408371, -0.0248317401856184, 0.1678897738456726, -0.04572518542408943, 0.021327000111341476, -0.003181327600032091, -0.08585107326507568, -0.027247503399848938, -0.2620140612125397, -0.0915416032075882, -0.1209942176938057, -0.022264963015913963, 0.11359251290559769, -0.0013969544088467956, -0.038126278668642044, -0.09966333955526352, -0.04816068708896637, -0.03061353787779808, -0.17671366035938263, -0.05079036206007004, 0.03749482333660126, 0.18807804584503174, -0.2670038342475891, 0.1282985508441925, 0.10001515597105026, 0.04971884563565254, -0.01449629757553339, -0.02389858476817608, -0.06097094342112541, 0.04606930911540985, 0.07420317083597183, -0.005132622551172972, 0.1377185583114624, 0.15255501866340637, -0.1108754426240921, -0.14751961827278137, -0.0008148776250891387, 0.06895823776721954, 0.1545153260231018, 0.027368035167455673, 0.1571657508611679, -0.04301150515675545, -0.16822586953639984, 0.14761613309383392, -0.18012689054012299, -0.01415241789072752, -0.17746801674365997, 0.1230429857969284, -0.05936119705438614, -0.05806916952133179, -0.15556558966636658, 0.11576548963785172, -0.2600553035736084, -0.07997579872608185, -0.050526998937129974, 0.10503438115119934, -0.048727914690971375, 0.24335260689258575, -0.04042040929198265, -0.04483083635568619, 0.06552682816982269, -0.06742502003908157, 0.02529965713620186, -0.09504791349172592, 0.016214923933148384, -0.2704460322856903, 0.08968596160411835, 0.21980811655521393, 0.011030844412744045, -0.10401833802461624, 0.13995148241519928, -0.10035804659128189, 0.20585206151008606, -0.055647093802690506, 0.06617677956819534, 0.03821152448654175, 0.023192262277007103, -0.10549384355545044, -0.1738615334033966, -0.01551891677081585, -0.026773618534207344, -0.054041460156440735, 0.10332760214805603, -0.045260798186063766, 0.010250452905893326, -0.1589530110359192, 0.08390850573778152, 0.1418466567993164, 0.07972604781389236, 0.06200661510229111, 0.03896145150065422, -0.08692053705453873, -0.07164983451366425, -0.0673619881272316, 0.1335708498954773, -0.16099826991558075, 0.2161557525396347, -0.06292480230331421, 0.13166584074497223, -0.15861204266548157, -0.17175069451332092, 0.14027723670005798, 0.0955466479063034, -0.10998775064945221, -0.0934080258011818, 0.14009816944599152, 0.01616331748664379, 0.022970205172896385, 0.10556172579526901, -0.003726414404809475, 0.15131627023220062, -0.17199578881263733, 0.002654995769262314, -2.2626638193653146e-32, 0.12603656947612762, 0.03738034889101982, -0.011896474286913872, -0.05268845707178116, 0.05955817922949791, -0.18319347500801086, -0.09883147478103638, -0.16597579419612885, 0.08746431767940521, 0.057487472891807556, -0.2457667589187622, 0.010342191904783249, 0.12546423077583313, -0.042905520647764206, -0.02567928656935692, 0.015865370631217957, 0.049309197813272476, -0.1803114414215088, 0.11573877930641174, 0.12077590823173523, 0.15825286507606506, 0.018559344112873077, -0.02296065166592598, 0.03968583419919014, -0.1919982135295868, -0.15036365389823914, -0.09050074219703674, 0.1616726666688919, 0.0373900942504406, 0.027846967801451683, -0.11325584352016449, 0.1284644901752472, 0.2210385948419571, -0.024839144200086594, -0.22948279976844788, 0.10254695266485214, -0.2900218069553375, -0.07815533131361008, -0.08904766291379929, 0.036507684737443924, -0.017091210931539536, 0.05239299684762955, 0.40630093216896057, -0.09938620030879974, -0.11868461966514587, 0.14332419633865356, -0.0203134436160326, -0.1364445686340332, 0.02017148584127426, -0.04377705231308937, 0.10268183797597885, 0.024220051243901253, 0.13437004387378693, -0.060802292078733444, 0.07045165449380875, 0.040842242538928986, -0.14014971256256104, -0.06212582439184189, -0.16886627674102783, 0.22925840318202972, 0.17227907478809357, 0.11203637719154358, 0.012739723548293114, -0.07990426570177078, 0.031345587223768234, 0.11168307811021805, 0.27853211760520935, -0.14178034663200378, 0.19197623431682587, 0.018747050315141678, 0.016306402161717415, 0.10729841887950897, -0.10254993289709091, 0.10036927461624146, -0.037252821028232574, -0.08157473057508469, -0.2014557421207428, 0.22062914073467255, -0.22784893214702606, -0.12126771360635757, -0.08203346282243729, -0.09652887284755707, 0.10695081949234009, 0.037002336233854294, 0.07061820477247238, 0.13492396473884583, 0.03849102556705475, 0.14130736887454987, 0.07475615292787552, -0.04462388530373573, -0.09970938414335251, -0.0257724579423666, -0.1407928466796875, -0.037603944540023804, -0.08419843018054962, 0.19579792022705078, -0.04911534860730171, -0.03482373058795929, -0.01689416542649269, -0.1713961809873581, -0.019451256841421127, -0.06764913350343704, 0.023364784196019173, 0.051987867802381516, 0.09937772154808044, -0.03918123245239258, 0.003267204388976097, -0.0006166287930682302, -0.30454015731811523, 0.1765212118625641, -0.048588164150714874, -0.037512388080358505, 0.15103046596050262, -0.08260038495063782, -0.03911057114601135, -0.11852075159549713, 0.11637721210718155, 0.10522355884313583, 0.016574665904045105, -0.06764392554759979, -0.16457904875278473, -0.039864830672740936, 0.059516340494155884, 0.07642008364200592, -0.10439736396074295, 0.12586145102977753, -0.08617624640464783, 0.023579534143209457, 0.11291791498661041, -0.06543871760368347, 0.06849465519189835, 0.09333880990743637, 7.037531304376898e-7, -0.07674197107553482, -0.04966188967227936, 0.11911564320325851, -0.03651967644691467, 0.06706585735082626, 0.21071021258831024, -0.02524665743112564, 0.18920765817165375, -0.12373647838830948, 0.07437539845705032, 0.280403733253479, -0.13374193012714386, -0.004272649995982647, -0.03928862512111664, -0.02463400922715664, 0.023892691358923912, -0.012507013976573944, -0.0610552541911602, -0.1558106392621994, 0.026845328509807587, 0.014302486553788185, 0.05547062307596207, 0.02089310996234417, -0.13651937246322632, 0.09179570525884628, -0.14700672030448914, -0.1990605741739273, 0.063230499625206, -0.0038527483120560646, 0.044366445392370224, 0.18506337702274323, -0.07141411304473877, -0.06730242818593979, 0.06963388621807098, -0.01057321298867464, 0.04865889251232147, -0.0530947707593441, 0.016936974599957466, -0.029814133420586586, 0.0014802321093156934, 0.05455528199672699, -0.15859706699848175, -0.04554658383131027, -0.047300346195697784, 0.16162855923175812, -0.08385059982538223, -0.07183249294757843, -0.013009937480092049, 0.024241475388407707, 0.0012263684766367078, 0.046445492655038834, 0.15278221666812897, -0.08209001272916794, 0.09704097360372543, -0.13064609467983246, -0.02130773849785328, -0.14030016958713531, -0.13353227078914642, 0.03967118635773659, -0.06749925017356873, -0.12274716794490814, -0.05197815224528313, 0.035200171172618866, -0.11012274026870728, 0.04798344150185585, 0.10313158482313156, -0.03185153380036354, 1.8392593913275403e-34, 0.0008556455723010004, 0.11561916768550873, 0.017360998317599297, -0.10111803561449051, -0.028253767639398575, -0.09401227533817291, -0.11036700010299683, 0.06284308433532715, -0.022787969559431076, -0.013834069482982159, -0.10165862739086151 ]
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.038173988461494446, -0.04504919424653053, -0.0571952722966671, -0.0000669493165332824, 0.19951006770133972, 0.0969913899898529, -0.03632477670907974, -0.07031922042369843, -0.02197214402258396, 0.09663719683885574, 0.011791566386818886, -0.02634216845035553, -0.13931000232696533, 0.14907196164131165, 0.08961745351552963, -0.06661150604486465, 0.002336690202355385, 0.023578215390443802, -0.03833362087607384, -0.027090255171060562, -0.03946235775947571, -0.020159941166639328, 0.1675766110420227, -0.2795136272907257, -0.1634625494480133, -0.037077635526657104, -0.1756870150566101, 0.21295399963855743, 0.05905866622924805, -0.21395094692707062, 0.17628158628940582, -0.005006781779229641, 0.01873069256544113, 0.058572858572006226, 0.000006058248800400179, -0.08550748974084854, 0.07093768566846848, -0.039481114596128464, 0.04284975305199623, -0.020619112998247147, 0.08310426771640778, 0.01165264006704092, 0.020341545343399048, -0.06581426411867142, -0.02351592853665352, -0.047127388417720795, -0.01067799050360918, -0.013435632921755314, 0.11389177292585373, 0.1150350347161293, 0.01744592748582363, 0.0895838588476181, 0.11285759508609772, -0.20311887562274933, 0.14793334901332855, -0.030882611870765686, 0.019411349669098854, 0.2603837847709656, -0.09518767148256302, 0.21415814757347107, 0.008864050731062889, -0.003241906873881817, -0.0001694370002951473, 0.0505770668387413, 0.11301933228969574, 0.05643244832754135, -0.19984124600887299, -0.12901674211025238, -0.009529859758913517, 0.10723735392093658, -0.010565255768597126, -0.011062818579375744, -0.006312489043921232, 0.009855895303189754, 0.14116361737251282, -0.13865253329277039, -0.0679607167840004, 0.005262164399027824, 0.029015101492404938, -0.06992591172456741, -0.02618936076760292, -0.06967984884977341, -0.018429551273584366, 0.05461927130818367, 0.04146093502640724, -0.08943288773298264, -0.11056282371282578, -0.019703106954693794, 0.12344416230916977, 0.04880700260400772, 0.011141978204250336, 0.011646322906017303, -0.14953099191188812, 0.011097301729023457, -0.06706459820270538, -0.06618326157331467, 0.012439444661140442, 0.12889553606510162, -0.01249809842556715, -0.05745440721511841, -0.06352442502975464, -0.09318648278713226, -0.016733719035983086, 0.09588202089071274, -0.2943941354751587, -0.1152862086892128, -0.10462401062250137, -0.05619451776146889, -0.004717349540442228, 0.044089242815971375, -0.08104340732097626, 0.007676567882299423, -0.15421460568904877, -0.06947282701730728, 0.03467394411563873, 0.07142277806997299, -0.19444024562835693, 0.1959311068058014, 0.02061719447374344, -0.03191687539219856, 0.12295588105916977, 0.014782692305743694, 0.011120560579001904, 0.30298367142677307, 0.07448416203260422, -0.20397545397281647, 0.05985627323389053, 0.139457106590271, 0.06978145241737366, -0.13906238973140717, -0.015055316500365734, 0.07498200982809067, 0.08543575555086136, -0.004616099875420332, 0.1818571239709854, -0.13552045822143555, 0.07165290415287018, -0.04885537922382355, -0.01953669637441635, -0.082803875207901, -0.09497067332267761, -0.10621444880962372, -0.24922394752502441, -0.09260893613100052, -0.09633785486221313, -0.08982593566179276, 0.05503806471824646, 0.1361050009727478, 0.05370129644870758, -0.06046806648373604, -0.05537610501050949, 0.2486490160226822, -0.33059027791023254, -0.02097870223224163, -0.005835790652781725, -0.04800017923116684, -0.21743936836719513, -0.07449516654014587, -0.20606078207492828, 0.014554719440639019, 0.14760413765907288, 0.06908579915761948, 0.06934333592653275, -0.045557498931884766, 0.03387836739420891, 0.110405832529068, -0.020828306674957275, -0.062393128871917725, -0.005524760577827692, -0.005140467081218958, 0.009013239294290543, -0.14585024118423462, 0.03183906525373459, 0.1024085059762001, 0.03182249888777733, 0.028068045154213905, -0.10577422380447388, -0.03582944720983505, -0.07912170886993408, -0.13086378574371338, -0.08458366245031357, -0.1219727173447609, -0.045466795563697815, 0.021106641739606857, -0.1747027337551117, 0.08967120200395584, -0.0003902346652466804, 0.022703705355525017, -0.072881318628788, -0.20184734463691711, 0.047884002327919006, -0.04279359057545662, 0.08909985423088074, -0.09531676024198532, -0.024274738505482674, 0.01607835851609707, 0.09799318760633469, -0.23902542889118195, 0.11911634355783463, -0.3111717998981476, 0.03787456452846527, -0.02480660006403923, 0.24866457283496857, 0.0003291407192591578, -0.06577549129724503, -0.18787774443626404, -0.23909474909305573, 0.011173443868756294, 0.19330012798309326, -0.11337727308273315, 0.14243067800998688, -0.01172407902777195, -0.10696915537118912, -0.15916851162910461, -0.1498459279537201, -0.06334280222654343, -0.12511657178401947, -0.07205498963594437, 0.060107938945293427, 0.09812954068183899, 0.027420667931437492, 0.06894809752702713, -0.06502886116504669, 0.07823251187801361, 0.013605660758912563, 0.07108277082443237, 0.11335017532110214, -0.022437717765569687, 0.17091351747512817, 0.04638564959168434, 0.016525421291589737, -0.052037231624126434, 0.19525296986103058, 0.051550790667533875, -0.2370845526456833, 0.10116510093212128, 0.09720946848392487, -0.14203572273254395, 0.18467532098293304, -0.066440150141716, -0.11664380878210068, -0.028329994529485703, -0.08604401350021362, 0.0021788575686514378, -0.01514564547687769, 0.061085306107997894, -0.08838603645563126, -0.11337091028690338, 0.07087580859661102, -0.04741942510008812, 0.20207743346691132, 0.07547542452812195, 0.11783957481384277, -0.03189525008201599, 0.025788405910134315, -0.1166597381234169, 0.20690755546092987, -0.022181224077939987, -0.08960941433906555, -0.09520944952964783, -0.03519650921225548, -0.04646678641438484, -0.061571404337882996, -0.0764271691441536, 0.16249431669712067, 0.029975179582834244, 0.1865186244249344, -0.02325372025370598, 0.1231713593006134, 0.22253647446632385, -0.05947302281856537, -0.05319749191403389, -0.06287606805562973, 0.009317934513092041, -0.008782409131526947, -0.2186136543750763, 0.06802674382925034, 0.017337236553430557, 0.048253800719976425, -0.11644165217876434, -0.11351839452981949, 0.07916915416717529, 0.10572448372840881, -0.0500122494995594, 0.02559342235326767, -0.04757477343082428, 0.004189847037196159, -0.05524469166994095, -0.045680053532123566, -0.08450909703969955, 0.04416235536336899, 0.025527674704790115, -0.03575374186038971, -0.05488795414566994, -0.061026088893413544, -0.1260778307914734, -0.000507299555465579, -0.04047717526555061, 0.009571492671966553, -0.03968929871916771, -0.03707873076200485, 0.23930509388446808, 0.12961257994174957, 0.04282747209072113, 0.03426539897918701, 0.05104155093431473, 0.13193975389003754, -0.01725468598306179, -0.076695516705513, -0.13045892119407654, -0.10627715289592743, -0.059998199343681335, -0.09219904243946075, 0.11449668556451797, 0.06534695625305176, 0.11346336454153061, -0.11429790407419205, -0.15281976759433746, -0.08412347733974457, 0.09344523400068283, 0.02423768676817417, -0.05234481021761894, -0.0035703626926988363, -0.02779335342347622, -0.03690679743885994, -0.018082397058606148, -0.11109592765569687, -0.01162243913859129, 0.0876384750008583, 0.07070550322532654, 0.07234606146812439, -0.01012585312128067, 0.0031969978008419275, -0.04369114339351654, 0.07474759966135025, -0.0785919725894928, -0.15098291635513306, -0.0026571929920464754, 0.15921901166439056, -0.11414745450019836, 0.10639525204896927, 0.03273849934339523, -0.14054551720619202, 0.021334202960133553, 0.03275017440319061, -0.0919647067785263, 0.12679171562194824, -0.10767797380685806, 0.16665910184383392, 0.051000963896512985, -0.02386130951344967, 0.15656103193759918, -0.004357652273029089, -0.07228252291679382, -0.19158494472503662, 0.17737287282943726, -0.0033014079090207815, 0.11064884811639786, -0.0023145568557083607, -0.20398923754692078, 0.08133088052272797, 0.06556738168001175, 0.00893059279769659, 0.010782286524772644, -0.32663774490356445, 0.04743695631623268, -0.06034122779965401, 0.1674468070268631, -0.021554017439484596, -0.13627654314041138, 0.12470050156116486, 0.0671023577451706, 0.04138164222240448, 0.07442919164896011, -0.050265245139598846, 0.009604938328266144, 0.039212074130773544, -0.04179178923368454, 0.04533517360687256, 0.08562164008617401, -0.0774436667561531, 0.017199361696839333, 0.006064240355044603, 0.04175148531794548, 0.03560379147529602, -0.03959757462143898, -0.0984528437256813, -0.015622236765921116, 0.0009703831747174263, 0.13309024274349213, -0.008073939010500908, -0.1355431228876114, -0.152882918715477, -0.050388727337121964, -0.01782350055873394, -0.0035916680935770273, -0.010766967199742794, 0.11439184099435806, -0.00012497440911829472, -0.01743382215499878, 0.10339394956827164, 0.1169000193476677, -0.01565156877040863, -0.024823632091283798, -0.020852938294410706, 0.11413924396038055, -0.04180376976728439, 0.04262180253863335, -0.006897933781147003, -0.03551097214221954, 0.18301579356193542, 0.04980068281292915, 0.051054034382104874, 0.04388459026813507, 0.25270846486091614, 0.07691579312086105, -0.049982063472270966, 0.034807879477739334, 0.17416316270828247, 0.012937625870108604, -0.13888028264045715, 0.17560626566410065, 0.03400067985057831, 0.06333333253860474, 0.1416735053062439, -0.06693025678396225, 0.037048112601041794, -0.04630574211478233, 0.19761087000370026, 0.04875965788960457, 0.09549157321453094, 0.3199281394481659, -0.05849158391356468, 0.04453210532665253, -0.014537543058395386, 0.10599593073129654, 0.1726062148809433, -0.2534482777118683, -0.07395771145820618, -0.20278935134410858, -0.08071714639663696, 0.10105821490287781, 0.11102759093046188, 0.0781218633055687, 0.09625259786844254, -0.013715170323848724, -0.1253165453672409, -0.08620163798332214, 0.10393694788217545, 0.0026759200263768435, 0.013313589617609978, -0.10519509762525558, -0.11358847469091415, -0.04067164659500122, -0.01603914424777031, -0.01187389250844717, 0.1536809504032135, 0.1388205885887146, -0.009747098200023174, 0.004860821180045605, 0.11031229794025421, -0.09346014261245728, -0.050857577472925186, -0.04999251291155815, 0.016627520322799683, 0.08405404537916183, 0.3347167372703552, -0.11439313739538193, 0.013602474704384804, 0.016636783257126808, 0.02831459976732731, 0.01694517210125923, 0.022814089432358742, 0.034204743802547455, 0.27531296014785767, 0.0696806088089943, 0.03412732854485512, -0.07895243912935257, 0.04897405579686165, 0.05924529582262039, 0.08639635145664215, 0.11291525512933731, -0.036049287766218185, -0.08745398372411728, -0.09896106272935867, 0.11521178483963013, -0.05738763138651848, -0.04614417999982834, -0.06730735301971436, -0.050085313618183136, -0.052712582051754, -0.04574286565184593, -0.07443387806415558, -0.19225174188613892, -0.04523438960313797, 0.09876559674739838, -0.005167039576917887, 0.011281304061412811, 0.04781462624669075, 0.2094261348247528, 0.04673909395933151, -0.03343048691749573, 0.09274134039878845, -0.05470475181937218, -0.09949558973312378, -0.20022788643836975, 0.019583921879529953, -0.015970170497894287, 0.1027824878692627, -0.011424019001424313, 0.06849309802055359, 0.052104346454143524, -0.153579443693161, 0.14774222671985626, -0.07257489114999771, -0.22744999825954437, -0.015750451013445854, 0.009267481043934822, 0.1357012540102005, 0.08281498402357101, -0.009578492492437363, -0.11955022066831589, 0.1786692887544632, -0.03847799077630043, -0.10169162601232529, 0.10683367401361465, 0.06328297406435013, -0.09777108579874039, 0.023241648450493813, -0.029251599684357643, -0.15476451814174652, 0.10522813349962234, 0.08658677339553833, -0.10953021049499512, -0.09567069262266159, 0.023792197927832603, 0.1911322921514511, -0.0106019526720047, -0.1294230967760086, 0.0024908408522605896, 0.05990849435329437, -0.15878087282180786, -0.092740498483181, 0.12391074746847153, 0.0028121040668338537, 0.20090517401695251, 0.020055899396538734, -0.2380790263414383, -0.07471717149019241, -0.08251995593309402, -0.030185097828507423, 0.13330811262130737, 0.18791235983371735, -0.0437435619533062, 0.10789275169372559, -2.6530881049436136e-32, -0.04851503670215607, -0.08468905836343765, -0.09544167667627335, 0.04270077124238014, -0.08632947504520416, 0.15278133749961853, -0.085849829018116, 0.0047003100626170635, 0.023800531402230263, -0.055199891328811646, 0.11292064189910889, 0.016820570454001427, 0.0580228827893734, -0.011440655216574669, 0.04908991977572441, 0.10622599720954895, 0.02412397228181362, 0.07674561440944672, -0.030805712565779686, 0.17706656455993652, 0.05611376091837883, 0.016701295971870422, 0.006862009409815073, 0.0539228729903698, -0.15264563262462616, 0.03697669506072998, -0.19564376771450043, -0.06876316666603088, -0.12657032907009125, 0.11285623162984848, -0.04808777943253517, 0.0946359634399414, 0.04470641911029816, 0.16296814382076263, 0.001041470211930573, 0.05847201868891716, 0.0439012385904789, -0.019774500280618668, -0.2683860957622528, 0.10155089199542999, 0.06432653963565826, 0.021961065009236336, -0.09228244423866272, -0.14131806790828705, 0.21989047527313232, 0.08362764865159988, 0.09037011861801147, -0.00836226437240839, 0.035988375544548035, -0.002188770566135645, 0.10655445605516434, 0.09059428423643112, -0.0169637780636549, -0.02309422567486763, 0.018567465245723724, 0.0614386685192585, 0.04526933282613754, -0.22084832191467285, -0.04430941492319107, 0.15996699035167694, 0.10121670365333557, -0.003027441445738077, -0.15780945122241974, 0.09550827741622925, 0.02721281163394451, -0.04497262462973595, 0.027164632454514503, -0.14109912514686584, 0.07189861685037613, -0.07535731047391891, 0.012915176339447498, 0.17146766185760498, -0.03306962177157402, 0.0476205088198185, -0.13922305405139923, -0.008322040550410748, -0.038471709936857224, -0.03500071540474892, 0.1526229828596115, -0.158864825963974, -0.10373411327600479, -0.09582961350679398, 0.011701558716595173, -0.005250493995845318, 0.06233277916908264, 0.044214632362127304, -0.11063557863235474, -0.02556842565536499, 0.06513823568820953, -0.03200777247548103, -0.1416979879140854, 0.0631512925028801, 0.01364623848348856, -0.1678391396999359, 0.006731047760695219, -0.0519932322204113, -0.026941681280732155, 0.11682160198688507, -0.04051412269473076, -0.05602693185210228, 0.06413497775793076, -0.12976588308811188, 0.1962955743074417, -0.032828908413648605, 0.1031189039349556, -0.04852878302335739, 0.2766963243484497, 0.227688729763031, -0.24588268995285034, 0.050703465938568115, 0.029399316757917404, 0.07272149622440338, 0.06040424481034279, 0.09163758903741837, 0.004155395086854696, 0.0007094209431670606, -0.07458452135324478, -0.0757642611861229, 0.1795673817396164, 0.08934756368398666, -0.2541722059249878, -0.043109096586704254, -0.10585467517375946, -0.03613821044564247, 0.026393530890345573, 0.17379625141620636, -0.21567897498607635, -0.001728529343381524, 0.02857111021876335, -0.0558428019285202, -0.04354799911379814, -0.00540983397513628, 7.648155815331847e-7, -0.24236001074314117, 0.10162408649921417, -0.14586171507835388, -0.0674193948507309, -0.03330069035291672, -0.08952771127223969, -0.10714229196310043, -0.047602418810129166, -0.08076045662164688, 0.20543383061885834, 0.02121046558022499, -0.1779729574918747, 0.035420529544353485, -0.03931066766381264, 0.10002849996089935, -0.003048318438231945, 0.019212352111935616, 0.01071966253221035, -0.12853573262691498, 0.04739987850189209, 0.03555012866854668, 0.1133953332901001, 0.18590009212493896, 0.0023744837380945683, -0.020637713372707367, -0.018721947446465492, 0.0022114638704806566, -0.009699825197458267, 0.014058725908398628, 0.07607600837945938, 0.047628652304410934, 0.10368127375841141, -0.16874642670154572, 0.2959849238395691, -0.21741187572479248, -0.10105995088815689, -0.035077523440122604, -0.03671346977353096, -0.024713439866900444, 0.004496422130614519, 0.06993654370307922, 0.22243598103523254, -0.07996270060539246, -0.20284977555274963, 0.007801042404025793, 0.1592205911874771, 0.06869815289974213, -0.06360781937837601, -0.29796135425567627, 0.04086976498365402, -0.07933332771062851, 0.05993611365556717, 0.04244751110672951, 0.1086457222700119, 0.020576855167746544, 0.03568696230649948, 0.041959986090660095, -0.03397609293460846, 0.10689402371644974, -0.10919617116451263, -0.0194096639752388, -0.021189287304878235, 0.010133441537618637, 0.05428808182477951, 0.12983544170856476, -0.13351887464523315, -0.0471605509519577, 2.218703342848835e-34, 0.030521327629685402, -0.031068522483110428, 0.15486736595630646, -0.19425445795059204, -0.11162438243627548, 0.14779050648212433, 0.24214611947536469, 0.014759689569473267, 0.021961776539683342, -0.11022644490003586, -0.09644903242588043 ]
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.08685525506734848, 0.049768101423978806, 0.009572216309607029, 0.1543339341878891, 0.1190023198723793, 0.015435479581356049, 0.05650443583726883, -0.1160716712474823, 0.22261680662631989, 0.0074053131975233555, -0.16768606007099152, -0.006628654431551695, -0.04440951347351074, 0.04531638324260712, 0.07347672432661057, -0.0821857899427414, 0.0013873729621991515, 0.1198500469326973, -0.14966750144958496, -0.08169634640216827, 0.07637176662683487, 0.0002636675490066409, 0.21029171347618103, 0.013379055075347424, -0.06643285602331161, 0.027338102459907532, -0.14595088362693787, 0.21957182884216309, 0.04430388659238815, -0.07949724048376083, 0.18985497951507568, 0.06431584060192108, 0.09273774176836014, 0.11844495683908463, 0.000006455594757426297, 0.04119056463241577, -0.0847146287560463, 0.04623902216553688, -0.019584285095334053, -0.15359632670879364, 0.2480987161397934, -0.03398207947611809, 0.032800350338220596, -0.04855277016758919, -0.12457619607448578, -0.028349842876195908, -0.021617107093334198, -0.1268291473388672, 0.06675176322460175, 0.1328144073486328, -0.0033990165684372187, 0.019915316253900528, -0.26109835505485535, -0.16508477926254272, -0.13282771408557892, 0.03890043869614601, 0.029941897839307785, 0.24912461638450623, -0.061148930341005325, -0.10603984445333481, -0.11477610468864441, 0.006362301297485828, 0.08192730695009232, 0.10136210173368454, 0.20212596654891968, 0.1215505450963974, -0.25566354393959045, 0.015674393624067307, -0.0014663689071312547, 0.17381523549556732, -0.04030902683734894, 0.036568500101566315, -0.028518345206975937, -0.03310754522681236, 0.00916358083486557, 0.04256534203886986, -0.028823012486100197, -0.07467927783727646, -0.11799747496843338, 0.047482941299676895, -0.07193323969841003, -0.03046075813472271, -0.061513662338256836, -0.030992088839411736, -0.23671452701091766, -0.17210279405117035, -0.07644850760698318, -0.07488441467285156, 0.04560159519314766, -0.07685776054859161, 0.004127130843698978, -0.012852206826210022, -0.012362465262413025, 0.05222233757376671, 0.18042582273483276, 0.033794570714235306, -0.03231486305594444, 0.023371126502752304, 0.05850424990057945, -0.16695533692836761, 0.07411853224039078, -0.0217775609344244, -0.09553015232086182, 0.20270460844039917, 0.059281688183546066, -0.04915716126561165, -0.06574652343988419, -0.07288040965795517, -0.03826840966939926, 0.11247941106557846, -0.1500524878501892, 0.15643925964832306, -0.25228479504585266, -0.07043756544589996, 0.005998519714921713, -0.06606338173151016, -0.08845523744821548, 0.039637140929698944, 0.11799093335866928, -0.08273708075284958, 0.09794440120458603, 0.19813650846481323, 0.023832477629184723, 0.18431366980075836, 0.13133960962295532, -0.047559015452861786, 0.0018038967391476035, -0.1377514898777008, -0.12345130741596222, -0.08849066495895386, 0.08701400458812714, -0.02252344787120819, 0.024906881153583527, 0.025854917243123055, 0.1733435094356537, -0.2033013105392456, -0.020050855353474617, -0.3077309727668762, -0.05294910445809364, -0.03181719407439232, 0.1256779581308365, 0.04873908311128616, -0.15629182755947113, 0.039364445954561234, 0.039366714656353, -0.13649709522724152, -0.015527158044278622, 0.07966361939907074, -0.1521143913269043, -0.006287469062954187, -0.13996337354183197, 0.0890611931681633, -0.1614067703485489, 0.04479237273335457, 0.0652790516614914, -0.13841210305690765, -0.25906312465667725, -0.05984688922762871, -0.29624998569488525, -0.05612935498356819, 0.021476857364177704, -0.16806501150131226, 0.04523199796676636, -0.008226905949413776, 0.13547727465629578, 0.042220015078783035, -0.026708833873271942, -0.031699128448963165, 0.0021925901528447866, -0.17576807737350464, -0.0688905268907547, -0.11612110584974289, -0.04560933634638786, 0.031140239909291267, -0.23554030060768127, 0.16073694825172424, 0.00615856796503067, -0.19476483762264252, 0.07418476045131683, -0.0043579284101724625, 0.026570528745651245, 0.046032875776290894, -0.027040239423513412, 0.05020873248577118, 0.043937116861343384, -0.027242222800850868, -0.08079659938812256, 0.11035099625587463, -0.05372993275523186, -0.039303120225667953, 0.035475894808769226, -0.063117116689682, 0.031766265630722046, 0.12942974269390106, -0.08138932287693024, 0.018205605447292328, 0.12449008226394653, -0.25694146752357483, 0.08552929013967514, -0.24757185578346252, -0.14354197680950165, 0.09999048709869385, -0.010720177553594112, 0.04848529398441315, -0.07694226503372192, -0.04592515155673027, -0.2124146968126297, 0.2483043223619461, 0.09729717671871185, -0.173120379447937, -0.03449120745062828, 0.01114286296069622, -0.10910050570964813, -0.11049284040927887, -0.16046053171157837, -0.07559538632631302, -0.04804166778922081, 0.1484517902135849, -0.030949147418141365, 0.13917481899261475, -0.031981341540813446, 0.02390500158071518, 0.09974294900894165, 0.11170031130313873, 0.00012847676407545805, -0.007111076731234789, 0.06715849786996841, 0.12780623137950897, 0.06382398307323456, -0.15643607079982758, -0.10452219843864441, -0.0752517506480217, 0.14506900310516357, 0.07445453107357025, -0.06438205391168594, 0.017779087647795677, 0.027558598667383194, 0.09942930936813354, 0.020631195977330208, -0.06562431156635284, -0.035838283598423004, -0.11736523360013962, 0.020628873258829117, -0.008811180479824543, -0.05510500818490982, 0.2604788541793823, -0.09425081312656403, 0.14306983351707458, 0.03005348891019821, -0.0006206007092259824, 0.30117642879486084, 0.1119532510638237, -0.09247693419456482, 0.07699263840913773, 0.11878228932619095, 0.05563487857580185, 0.09374318271875381, 0.25181353092193604, -0.027710329741239548, -0.05718603357672691, 0.07271958887577057, 0.0009374153451062739, -0.06623777747154236, 0.017867373302578926, 0.1696496605873108, -0.043589185923337936, -0.07179657369852066, -0.14436163008213043, 0.0854891762137413, 0.09916099905967712, 0.03526721149682999, -0.035075925290584564, -0.16316401958465576, -0.037346288561820984, -0.06275266408920288, -0.1320873498916626, 0.18021725118160248, -0.03907603770494461, -0.010632036253809929, 0.05600900575518608, -0.16176146268844604, 0.10649467259645462, -0.017881829291582108, -0.16069382429122925, 0.09570538997650146, 0.06043902039527893, -0.03300178050994873, -0.019739201292395592, -0.031108630821108818, -0.2247537523508072, -0.07397738844156265, 0.09060171991586685, 0.03465627506375313, -0.10525578260421753, 0.08205299824476242, -0.09729151427745819, 0.08200721442699432, 0.1718762069940567, -0.03393714874982834, -0.07649195939302444, 0.034550074487924576, 0.05653669312596321, -0.12995712459087372, 0.05081450566649437, 0.03993634134531021, 0.07525727897882462, 0.026862207800149918, 0.04870973527431488, -0.13415823876857758, -0.05055955797433853, -0.07966407388448715, 0.008287359960377216, -0.04989616945385933, 0.06887716799974442, -0.08278355747461319, -0.03654208779335022, 0.01134300883859396, -0.1773797571659088, 0.14705988764762878, -0.016870489344000816, 0.022201085463166237, -0.05734545364975929, 0.12792153656482697, -0.04208330810070038, -0.004875680897384882, 0.004255583044141531, -0.22478871047496796, -0.13921493291854858, 0.028822900727391243, 0.05439591035246849, -0.06947624683380127, 0.24848692119121552, 0.07976359128952026, -0.016627995297312737, 0.037573035806417465, -0.03410757705569267, -0.005649763625115156, -0.30411040782928467, 0.16364823281764984, -0.00839235633611679, -0.02535892464220524, -0.062396541237831116, -0.08555994182825089, -0.009944767691195011, 0.02860511653125286, -0.16712471842765808, -0.009881729260087013, -0.17791995406150818, -0.023648444563150406, -0.06251378357410431, -0.017617380246520042, 0.009369422681629658, -0.07112722843885422, -0.06749281287193298, 0.05990301072597504, 0.05144677683711052, -0.04503718763589859, 0.047667406499385834, -0.15306325256824493, 0.1305246651172638, -0.07865055650472641, 0.001979998080059886, -0.017854390665888786, -0.04414957016706467, -0.17673704028129578, 0.14566315710544586, 0.16628199815750122, 0.052907027304172516, -0.06378636509180069, -0.09002473950386047, -0.029782025143504143, -0.06885964423418045, -0.008708144538104534, 0.03476620838046074, 0.1716812700033188, -0.028324445709586143, -0.15076756477355957, -0.016135340556502342, 0.03932914882898331, 0.0735439658164978, 0.12992295622825623, -0.08732236176729202, 0.005844388157129288, 0.039730530232191086, 0.18081723153591156, 0.05985889583826065, 0.024975165724754333, 0.032631564885377884, -0.007538961246609688, 0.25488266348838806, 0.08609936386346817, 0.14796952903270721, 0.0374828577041626, -0.1335541009902954, -0.10000848770141602, -0.034270428121089935, -0.01817542314529419, 0.15540973842144012, 0.11536312103271484, 0.0740916058421135, 0.22236183285713196, 0.07304319739341736, 0.2420564591884613, -0.09257595986127853, -0.004169920459389687, -0.08685361593961716, -0.0432751327753067, -0.03630112111568451, 0.15664932131767273, -0.04144647344946861, -0.042102083563804626, 0.10823365300893784, -0.007557963486760855, -0.2157115936279297, 0.11800625175237656, -0.001776988967321813, -0.05875144526362419, 0.0008174258400686085, 0.011626613326370716, 0.04687175154685974, 0.014417159371078014, -0.07833539694547653, 0.1343431919813156, 0.15603113174438477, 0.06009010970592499, -0.0014834580942988396, -0.001231239759363234, -0.05316730588674545, 0.04553987458348274, -0.10713043808937073, 0.12104104459285736, 0.2209935188293457, 0.10983497649431229, 0.10696735978126526, 0.23954270780086517, -0.05804875120520592, 0.3121887445449829, -0.12276024371385574, -0.1916120946407318, -0.11505798995494843, 0.012997015379369259, -0.06542924791574478, 0.11255696415901184, 0.05741327255964279, -0.17803721129894257, 0.12442553043365479, -0.011038953438401222, -0.1400778442621231, 0.11855699121952057, -0.08823411166667938, -0.12226028740406036, -0.012241501361131668, -0.06714637577533722, -0.028873279690742493, -0.07521665096282959, -0.03016621805727482, -0.05416408181190491, 0.10314321517944336, -0.014899835921823978, -0.007237561512738466, 0.05687824264168739, -0.09102755784988403, -0.03480568528175354, 0.04398012533783913, -0.13361221551895142, 0.1027851328253746, 0.18484550714492798, -0.004524834919720888, -0.042888034135103226, 0.07753905653953552, -0.10882322490215302, 0.03742283210158348, -0.13087402284145355, 0.01191334705799818, 0.11208444088697433, 0.04468624293804169, -0.13996988534927368, -0.039881423115730286, -0.0791592001914978, 0.07063069194555283, 0.14584152400493622, 0.1298651248216629, 0.037504468113183975, -0.1526983380317688, -0.030263667926192284, 0.09951897710561752, 0.12593485414981842, -0.09126758575439453, -0.1599944829940796, 0.07188127189874649, 0.1448463350534439, 0.057205069810152054, -0.02151951752603054, -0.2273818999528885, 0.09960886836051941, 0.05335994437336922, 0.007010264787822962, 0.023892389610409737, 0.13615471124649048, 0.11011137813329697, -0.014151787385344505, -0.02597038261592388, 0.023973161354660988, -0.07738134264945984, 0.04689829796552658, -0.07462545484304428, -0.10055134445428848, 0.1064700335264206, -0.016560347750782967, 0.13169176876544952, -0.05214766040444374, 0.0385299026966095, 0.012051550671458244, -0.037341706454753876, 0.11761978268623352, 0.13526271283626556, -0.027627727016806602, 0.01892418973147869, -0.06934357434511185, 0.031197819858789444, 0.06613033264875412, -0.07150419056415558, -0.009790344163775444, 0.06248456984758377, -0.1793576329946518, 0.24599908292293549, -0.07527878880500793, 0.03125327080488205, 0.15773122012615204, -0.12071886658668518, -0.11508948355913162, -0.008940736763179302, 0.196730375289917, -0.01056868676096201, -0.025183936581015587, 0.05522320047020912, 0.25225088000297546, -0.0146214310079813, 0.06000194326043129, 0.12230309098958969, -0.03948893025517464, -0.24166551232337952, 0.15951211750507355, 0.1377032846212387, -0.09817831963300705, 0.07510556280612946, -0.01953907124698162, -0.11420853435993195, 0.026456592604517937, -0.04864128306508064, 0.03994122892618179, 0.18664205074310303, -0.006807886529713869, 0.018136972561478615, -0.11123508214950562, -2.550118914041809e-32, -0.058129291981458664, 0.006491396110504866, 0.0296601802110672, 0.08918910473585129, 0.010761620476841927, 0.07887624204158783, 0.027442362159490585, -0.05633329227566719, -0.05863330885767937, -0.00841866061091423, 0.05164126679301262, -0.0776151791214943, 0.0713462233543396, 0.012654773890972137, -0.16226603090763092, -0.02405649423599243, -0.10206752270460129, -0.08031810075044632, 0.04207652062177658, 0.025850191712379456, 0.058882590383291245, 0.1584327667951584, -0.01894817128777504, -0.20540910959243774, 0.04720030352473259, -0.11281969398260117, 0.09095179289579391, -0.07648242264986038, 0.005404600407928228, -0.03075571171939373, -0.15409627556800842, -0.027841411530971527, -0.1259469836950302, 0.027035852894186974, 0.04461589455604553, 0.05576799064874649, -0.2534421384334564, 0.025208398699760437, -0.00888894498348236, 0.025618907064199448, 0.05335445702075958, 0.0856502428650856, 0.018514933064579964, -0.1181577518582344, 0.07657922804355621, 0.10889196395874023, 0.06809426099061966, 0.012061310932040215, -0.03157246485352516, -0.11624080687761307, -0.07491519302129745, 0.04772826284170151, 0.007217068690806627, -0.19612853229045868, 0.12358905375003815, -0.06260064989328384, 0.0004177201190032065, 0.06179407611489296, 0.07771037518978119, -0.16979213058948517, -0.08426643162965775, -0.04310426861047745, -0.0021477171685546637, -0.07824840396642685, 0.11123098433017731, -0.08706194907426834, 0.25648337602615356, -0.040015604346990585, 0.023915700614452362, -0.14904004335403442, 0.21169798076152802, 0.11797069013118744, -0.026537394151091576, 0.02785833552479744, -0.019487878307700157, -0.09433142840862274, -0.06578118354082108, -0.007114737760275602, 0.08029335737228394, -0.10669725388288498, -0.10201761871576309, -0.053215425461530685, -0.12473168224096298, 0.09895848482847214, 0.09561356902122498, -0.08464185148477554, -0.07137954235076904, -0.015024274587631226, -0.15586282312870026, 0.03440609201788902, 0.002776308683678508, -0.17931422591209412, -0.06822820752859116, 0.03605381026864052, 0.0038932228926569223, -0.04842016100883484, 0.037576206028461456, 0.05596240609884262, -0.000663509767036885, 0.16331006586551666, 0.06876377016305923, 0.02320846915245056, 0.22809985280036926, -0.06575983017683029, 0.04243481904268265, 0.1371265947818756, 0.09975852072238922, 0.05324368178844452, -0.14519190788269043, -0.056195568293333054, -0.07169628143310547, 0.0006990940310060978, 0.14833740890026093, 0.08202239125967026, 0.17806458473205566, 0.11816602945327759, -0.08755435794591904, -0.01748928241431713, -0.05370140075683594, 0.1192912608385086, -0.14390483498573303, -0.12224079668521881, 0.12305837124586105, 0.04634728655219078, -0.08401378244161606, 0.19417619705200195, -0.16030821204185486, 0.07838663458824158, -0.1199922114610672, -0.06846120208501816, 0.08034688979387283, 0.055382899940013885, 7.404059374493954e-7, 0.0028306024614721537, 0.13703715801239014, 0.07092831283807755, 0.03324364870786667, -0.08298537135124207, -0.01305854320526123, -0.28028130531311035, 0.007843644358217716, 0.07664331793785095, 0.06112149357795715, 0.12483912706375122, -0.029159629717469215, -0.12718410789966583, 0.04352620244026184, -0.06424769759178162, -0.08075863867998123, -0.017671644687652588, -0.057669300585985184, -0.046512458473443985, -0.03170394152402878, 0.03047279454767704, 0.2125406265258789, -0.11372311413288116, -0.06972943991422653, 0.009645000100135803, -0.14385990798473358, 0.020980779081583023, 0.14007973670959473, 0.0955173447728157, -0.1515439748764038, -0.09880384802818298, 0.10823886841535568, -0.07855284959077835, 0.09135228395462036, 0.08585153520107269, -0.02067999728024006, -0.14335332810878754, -0.04403252154588699, -0.0319388248026371, 0.0063428329303860664, 0.11075320094823837, 0.06791715323925018, -0.07817880809307098, -0.010075237601995468, 0.13672104477882385, -0.1308489590883255, -0.011294490657746792, -0.036264240741729736, -0.16464392840862274, 0.08065704256296158, 0.06100739166140556, -0.022422799840569496, 0.04762003943324089, 0.20275473594665527, 0.06089306250214577, -0.13282166421413422, -0.10046446323394775, -0.20975591242313385, 0.08828895539045334, -0.06359320133924484, -0.00492645101621747, -0.05808955058455467, -0.027113590389490128, -0.06025261804461479, 0.1702335625886917, 0.0842217355966568, 0.054830193519592285, 6.784319728022753e-35, 0.07573206722736359, -0.01776120811700821, 0.08972152322530746, 0.010632150806486607, -0.060335807502269745, 0.02008097432553768, -0.06289862096309662, -0.04091338440775871, 0.10721956193447113, -0.1425618678331375, -0.02858824096620083 ]
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.12943388521671295, 0.046386633068323135, 0.01006982009857893, 0.15524619817733765, 0.1239028126001358, 0.0040226103737950325, 0.031712859869003296, -0.10157284140586853, 0.25197699666023254, -0.003631451865658164, -0.1469910889863968, 0.01657649129629135, -0.0758538544178009, 0.008643938228487968, 0.09181953966617584, -0.11171658337116241, -0.013539239764213562, 0.12959474325180054, -0.17124366760253906, -0.09949619323015213, 0.10944467782974243, 0.007444976828992367, 0.19627900421619415, 0.0019561119843274355, -0.054314177483320236, 0.04938323423266411, -0.13634799420833588, 0.22181129455566406, 0.04244723543524742, -0.05381205305457115, 0.18755219876766205, 0.04629563167691231, 0.10618960857391357, 0.11441311985254288, 0.0000065579019974393304, 0.02491004578769207, -0.0913408026099205, 0.04498713091015816, -0.012548508122563362, -0.15371985733509064, 0.20636895298957825, -0.05665011703968048, 0.031610339879989624, -0.04587826877832413, -0.14736230671405792, -0.053918324410915375, -0.003619131166487932, -0.12185626477003098, 0.04954633489251137, 0.11142652481794357, -0.010128684341907501, 0.04862459748983383, -0.23956845700740814, -0.1694265604019165, -0.10471828281879425, 0.06995633244514465, 0.03264184296131134, 0.22630105912685394, -0.05750530585646629, -0.09132969379425049, -0.12921954691410065, -0.013694634661078453, 0.08641389012336731, 0.11106362193822861, 0.1937071532011032, 0.12325292825698853, -0.24474278092384338, 0.03430141136050224, 0.0024025372695177794, 0.1583825647830963, -0.04433944448828697, 0.06227909028530121, -0.008228765800595284, -0.024925051257014275, 0.04843603074550629, 0.079208143055439, -0.013143809512257576, -0.06133965775370598, -0.10554824024438858, 0.02711104229092598, -0.11253083497285843, -0.05056774616241455, -0.06892890483140945, -0.0339362807571888, -0.2222503423690796, -0.1758277416229248, -0.06954348087310791, -0.08793947845697403, 0.0133482301607728, -0.05205715075135231, -0.0022367199417203665, -0.028065484017133713, -0.03390028700232506, 0.032989129424095154, 0.19745990633964539, 0.04895072057843208, -0.03202283754944801, 0.03190511837601662, 0.026652613654732704, -0.19125908613204956, 0.10536493360996246, -0.01530278567224741, -0.13269416987895966, 0.1822357028722763, 0.026894783601164818, -0.03595444932579994, -0.027471458539366722, -0.09617048501968384, -0.00682321609929204, 0.11162162572145462, -0.14121535420417786, 0.16597890853881836, -0.27702465653419495, -0.07023221999406815, -0.017667172476649284, -0.052041176706552505, -0.08360660821199417, 0.05642009526491165, 0.12070979177951813, -0.12406817078590393, 0.07652605324983597, 0.1716577559709549, -0.004693325143307447, 0.15163815021514893, 0.1021842435002327, -0.05920187756419182, -0.019004395231604576, -0.13975943624973297, -0.11746551841497421, -0.13244354724884033, 0.08806606382131577, -0.03290862590074539, -0.002452486427500844, 0.020049266517162323, 0.12696559727191925, -0.1984744369983673, -0.019918842241168022, -0.31794074177742004, -0.07006534934043884, 0.008526308462023735, 0.1202930361032486, 0.04905172437429428, -0.1940757781267166, 0.024022119119763374, 0.048720717430114746, -0.1365697681903839, -0.026146553456783295, 0.13390567898750305, -0.1392420381307602, -0.015224190428853035, -0.12166723608970642, 0.08384646475315094, -0.19046124815940857, -0.005540359299629927, 0.08234338462352753, -0.12199358642101288, -0.22570918500423431, -0.039954956620931625, -0.3157963454723358, -0.04364467039704323, -0.0061148833483457565, -0.16485488414764404, 0.01938818022608757, 0.007222934626042843, 0.12911437451839447, 0.03431981801986694, -0.05194666236639023, -0.03233080729842186, 0.0206455010920763, -0.15748724341392517, -0.06209456920623779, -0.13316144049167633, -0.09284039586782455, 0.043828219175338745, -0.23638106882572174, 0.17226800322532654, 0.005625478457659483, -0.15241074562072754, 0.05882228538393974, -0.015449117869138718, 0.018308518454432487, 0.02528342790901661, -0.045066919177770615, 0.06216944381594658, 0.039292145520448685, -0.029579561203718185, -0.08134055882692337, 0.10344754904508591, -0.05657556653022766, -0.0495525598526001, 0.0004591492470353842, -0.07959848642349243, 0.0474596731364727, 0.1470256745815277, -0.09825466573238373, 0.023248888552188873, 0.13017666339874268, -0.20776785910129547, 0.05913962423801422, -0.21813635528087616, -0.14627765119075775, 0.10385174304246902, -0.057563550770282745, 0.05581572279334068, -0.05683878809213638, -0.02747025340795517, -0.18893925845623016, 0.23771488666534424, 0.12105326354503632, -0.15761201083660126, -0.01665419340133667, 0.027910882607102394, -0.10758930444717407, -0.10951355844736099, -0.16065974533557892, -0.0773240253329277, -0.04492901265621185, 0.1604829728603363, -0.016546495258808136, 0.1573251634836197, -0.03075685352087021, 0.026653587818145752, 0.11360947042703629, 0.1133006140589714, -0.03458746522665024, -0.011775358580052853, 0.09972206503152847, 0.11042468994855881, 0.08513901382684708, -0.1725919097661972, -0.11384338140487671, -0.07587848603725433, 0.1568567156791687, 0.039657652378082275, -0.08442366123199463, -0.007638324052095413, 0.06997159123420715, 0.09787267446517944, 0.052487220615148544, -0.0974455401301384, -0.017744245007634163, -0.10172251611948013, 0.02625214122235775, 0.00969628430902958, -0.0695422887802124, 0.2162005454301834, -0.07384858280420303, 0.09241922199726105, 0.02090764418244362, 0.016653655096888542, 0.27493369579315186, 0.08182193338871002, -0.07176709920167923, 0.06731046736240387, 0.13793888688087463, 0.03978941589593887, 0.07256932556629181, 0.20941439270973206, -0.011646521277725697, -0.04099344462156296, 0.05887766554951668, 0.012904971837997437, -0.052493348717689514, 0.021829795092344284, 0.16063089668750763, -0.03138304501771927, -0.07242961972951889, -0.18555021286010742, 0.08755191415548325, 0.11248594522476196, 0.025072399526834488, -0.04108624532818794, -0.152269184589386, -0.03866967931389809, -0.07956218719482422, -0.17071618139743805, 0.1845799684524536, -0.027744760736823082, -0.0036197879817336798, 0.06414192914962769, -0.18549461662769318, 0.10614093393087387, 0.02606700360774994, -0.16464368999004364, 0.06594919413328171, -0.0056783827021718025, -0.05939953029155731, -0.007282377686351538, -0.01899857446551323, -0.22962631285190582, -0.08787659555673599, 0.07858901470899582, 0.0570407398045063, -0.1122061163187027, 0.07403755933046341, -0.1140393614768982, 0.09671381860971451, 0.19492600858211517, 0.0058132354170084, -0.05471077188849449, 0.005303991958498955, 0.05965961143374443, -0.1486821174621582, 0.06042862311005592, 0.04402599483728409, 0.0849781408905983, 0.003435928374528885, 0.0342266783118248, -0.12860596179962158, -0.08309487253427505, -0.07391718029975891, -0.010103318840265274, -0.028892353177070618, 0.06354870647192001, -0.08079018443822861, -0.055795684456825256, 0.025919673964381218, -0.1407122164964676, 0.13578666746616364, -0.02529262751340866, 0.04055042937397957, -0.05869431048631668, 0.15570418536663055, -0.043920256197452545, -0.013014327734708786, 0.023259680718183517, -0.21091686189174652, -0.1446959376335144, 0.012734008021652699, 0.026398519054055214, -0.06475211679935455, 0.17170916497707367, 0.10691744089126587, -0.010778306052088737, -0.004535571672022343, -0.028912844136357307, 0.001353748026303947, -0.260625958442688, 0.1659211665391922, -0.0084607545286417, -0.0644105076789856, -0.06852073222398758, -0.05394041910767555, -0.029516054317355156, 0.048478566110134125, -0.17494499683380127, -0.03861464560031891, -0.1486928015947342, -0.03992803022265434, -0.05097109451889992, -0.012032619677484035, 0.008550764061510563, -0.0878201425075531, -0.06572193652391434, 0.07244046032428741, 0.0358305387198925, -0.010501745156943798, 0.03493889793753624, -0.11575042456388474, 0.1192144826054573, -0.08247736096382141, 0.012056968174874783, 0.003336629830300808, -0.07721298187971115, -0.15924270451068878, 0.13337993621826172, 0.19929829239845276, 0.060156360268592834, -0.03523395583033562, -0.06761716306209564, -0.03724050521850586, -0.03197357803583145, 0.00792237650603056, 0.04445924982428551, 0.16178852319717407, 0.01266646757721901, -0.15564340353012085, -0.014512610621750355, 0.10355481505393982, 0.08054784685373306, 0.13200025260448456, -0.11551424860954285, 0.017484255135059357, 0.024256182834506035, 0.18679045140743256, 0.07487309724092484, -0.0002930783375632018, 0.030931631103157997, -0.013179298490285873, 0.24315215647220612, 0.09394613653421402, 0.1471450924873352, 0.08569885790348053, -0.11690836399793625, -0.09763175249099731, -0.015052258037030697, -0.01584673672914505, 0.14940817654132843, 0.10903597623109818, 0.0849069207906723, 0.2515762448310852, 0.0739055648446083, 0.26108548045158386, -0.08468789607286453, -0.02330605871975422, -0.10285712033510208, -0.05367913097143173, -0.05002044513821602, 0.1667938083410263, -0.05094307288527489, -0.04432983323931694, 0.08219178766012192, -0.0204220712184906, -0.19487328827381134, 0.10805463045835495, -0.06436823308467865, -0.05328964442014694, 0.02382596768438816, 0.03689538314938545, 0.09471350163221359, 0.054377634078264236, -0.09862937778234482, 0.17796219885349274, 0.14952805638313293, 0.08123590052127838, 0.010275937616825104, -0.037900298833847046, -0.05340208113193512, 0.05046438053250313, -0.11582084745168686, 0.11768784373998642, 0.1873302310705185, 0.11339300125837326, 0.1350138783454895, 0.2428210973739624, -0.051609888672828674, 0.29584985971450806, -0.1403956562280655, -0.22376754879951477, -0.0862632691860199, -0.016545213758945465, -0.08510380238294601, 0.11106520891189575, 0.07268563657999039, -0.18249699473381042, 0.09984252601861954, -0.00399247370660305, -0.14214958250522614, 0.1259184628725052, -0.09959082305431366, -0.11418408155441284, -0.0023775517474859953, -0.03872295469045639, -0.028709078207612038, -0.06553463637828827, -0.0019090003333985806, -0.05242835357785225, 0.10134350508451462, -0.002564487047493458, -0.05197399482131004, 0.0809197649359703, -0.09167537093162537, -0.029486682265996933, 0.019995639100670815, -0.14199016988277435, 0.08475438505411148, 0.2099144458770752, -0.029942505061626434, -0.046006713062524796, 0.08662974089384079, -0.08233929425477982, 0.038416918367147446, -0.13126437366008759, 0.012867727316915989, 0.09806711226701736, 0.04157581552863121, -0.14579546451568604, -0.040096037089824677, -0.11736029386520386, 0.07892847806215286, 0.12956225872039795, 0.18467625975608826, 0.01766115427017212, -0.1265556812286377, -0.00046319852117449045, 0.09396419674158096, 0.0879380851984024, -0.06647580116987228, -0.18242448568344116, 0.08171585947275162, 0.16077345609664917, 0.059193145483732224, -0.007602601312100887, -0.21649712324142456, 0.09437400847673416, 0.06702147424221039, 0.00016947000403888524, -0.0005636069108732045, 0.13211292028427124, 0.08774752169847488, -0.01657792739570141, -0.010687442496418953, 0.015575448982417583, -0.09142233431339264, 0.037955254316329956, -0.07323481142520905, -0.09442339837551117, 0.12810708582401276, 0.017425047233700752, 0.1525457352399826, -0.011693472974002361, 0.03221777454018593, 0.008325090631842613, -0.060726746916770935, 0.09216723591089249, 0.1425018161535263, -0.02495005913078785, 0.01878196932375431, -0.0657523050904274, 0.030469853430986404, 0.05385825037956238, -0.07820862531661987, -0.008487523533403873, 0.05872216820716858, -0.1975863128900528, 0.2439308762550354, -0.057933155447244644, 0.028278987854719162, 0.13784632086753845, -0.1646578162908554, -0.07422950863838196, -0.03382563591003418, 0.18929557502269745, -0.012905688025057316, -0.02226075530052185, 0.0037661860696971416, 0.3022008538246155, -0.04355178028345108, 0.06803804636001587, 0.09886500984430313, -0.044158853590488434, -0.2114643156528473, 0.14058198034763336, 0.12227142602205276, -0.12790626287460327, 0.06604712456464767, 0.00908193551003933, -0.09495668113231659, 0.016092633828520775, -0.10233718156814575, 0.026428652927279472, 0.18615694344043732, -0.005876917392015457, 0.04274728521704674, -0.09608975052833557, -2.5079950739800924e-32, -0.057699453085660934, 0.0050682793371379375, 0.02561459131538868, 0.0835600346326828, 0.011889760382473469, 0.0813588798046112, 0.055004946887493134, -0.07379361242055893, -0.05914920195937157, -0.03447216749191284, 0.07263593375682831, -0.06447280943393707, 0.06929440051317215, 0.022741831839084625, -0.13932575285434723, -0.04211966693401337, -0.09702812135219574, -0.10365886986255646, 0.05650411173701286, 0.034209299832582474, 0.05690864473581314, 0.14377763867378235, -0.02700519561767578, -0.146784245967865, 0.048288241028785706, -0.0920323058962822, 0.11625906080007553, -0.0755690485239029, -0.0016788868233561516, -0.03129792958498001, -0.13976430892944336, -0.06102731451392174, -0.14232616126537323, 0.014785047620534897, 0.04722142592072487, 0.0397660993039608, -0.25269442796707153, 0.007509318646043539, 0.0029307056684046984, 0.02660110406577587, 0.01124739833176136, 0.10097644478082657, -0.02942524291574955, -0.12134784460067749, 0.054599516093730927, 0.10350271314382553, 0.05972382053732872, 0.02764361910521984, -0.04136870428919792, -0.11395986378192902, -0.05421506613492966, 0.04794822633266449, 0.002521979156881571, -0.1898459643125534, 0.11892511695623398, -0.023343168199062347, 0.004439257550984621, 0.024778813123703003, 0.08045487850904465, -0.18323713541030884, -0.04108981415629387, -0.04110245406627655, 0.0033967674244195223, -0.04975209757685661, 0.1265794038772583, -0.07167772948741913, 0.26764819025993347, -0.05012308806180954, 0.006381767801940441, -0.13916008174419403, 0.24049712717533112, 0.13773968815803528, -0.006959665101021528, 0.02185327559709549, -0.03450246900320053, -0.05211132764816284, -0.06688807159662247, -0.014537623152136803, 0.08633891493082047, -0.1001911610364914, -0.08724087476730347, -0.03406677022576332, -0.10586593300104141, 0.07997556775808334, 0.08381195366382599, -0.08045408874750137, -0.07402768731117249, -0.0306535791605711, -0.12772351503372192, 0.027603207156062126, 0.0034065961372107267, -0.21262772381305695, -0.027319882065057755, 0.01013058889657259, 0.0143209807574749, -0.023816820234060287, 0.03099464625120163, 0.034455448389053345, 0.0022099404595792294, 0.16785266995429993, 0.03627597540616989, 0.02115692012012005, 0.23739364743232727, -0.05559128150343895, 0.024537526071071625, 0.1310674250125885, 0.0884583592414856, 0.04534877836704254, -0.12396261096000671, -0.04544724524021149, -0.07878245413303375, 0.030973589047789574, 0.1524215191602707, 0.07009495049715042, 0.18304364383220673, 0.10843075811862946, -0.06186739727854729, 0.03615160658955574, -0.059851646423339844, 0.12471792101860046, -0.1274004578590393, -0.09744536876678467, 0.14269208908081055, 0.0355398915708065, -0.06390497088432312, 0.22364981472492218, -0.16239550709724426, 0.05202220007777214, -0.14346736669540405, -0.09764935821294785, 0.0961105152964592, 0.043478455394506454, 7.449414169968804e-7, -0.036721616983413696, 0.14211279153823853, 0.09875676035881042, 0.007167687173932791, -0.0637454092502594, -0.02503025531768799, -0.2373315542936325, 0.049199748784303665, 0.09025093913078308, 0.04455987736582756, 0.11947906762361526, -0.03128433600068092, -0.08747441321611404, 0.05481063202023506, -0.08635326474905014, -0.060586169362068176, -0.04852532967925072, -0.04740848019719124, -0.06627054512500763, -0.04147789999842644, 0.05837756022810936, 0.1995931714773178, -0.129659503698349, -0.03618348017334938, 0.018486501649022102, -0.16224701702594757, 0.0475604385137558, 0.12640121579170227, 0.06521053612232208, -0.15525980293750763, -0.08275355398654938, 0.10959987342357635, -0.09368198364973068, 0.0920797660946846, 0.07587775588035583, -0.015728022903203964, -0.14839577674865723, -0.029404129832983017, -0.0371476374566555, -0.007420481648296118, 0.10564570128917694, 0.04081438109278679, -0.0967567190527916, -0.018609292805194855, 0.14791758358478546, -0.12008119374513626, -0.00454354053363204, 0.022758005186915398, -0.16732706129550934, 0.037232235074043274, 0.07935530692338943, -0.045677125453948975, 0.04939709231257439, 0.2143586277961731, 0.09641531109809875, -0.14972558617591858, -0.10178615152835846, -0.17919640243053436, 0.0645723044872284, -0.06349261850118637, 0.009593595750629902, -0.048909518867731094, -0.04059682413935661, -0.020346079021692276, 0.16221646964550018, 0.07839246839284897, 0.029395196586847305, 6.487821941014467e-35, 0.07090238481760025, 0.01511529739946127, 0.0650215819478035, 0.009488879702985287, -0.018389392644166946, -0.00965830311179161, -0.08827821910381317, -0.00253063696436584, 0.13641265034675598, -0.16682204604148865, -0.03214479610323906 ]
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.11553101986646652, 0.06356141716241837, 0.0046292869374156, 0.1353534311056137, 0.14276009798049927, 0.018086329102516174, 0.03871838003396988, -0.10779324918985367, 0.2585800588130951, -0.008539468050003052, -0.1448783427476883, 0.02720334567129612, -0.05259346589446068, 0.03755651041865349, 0.0931093692779541, -0.11405877023935318, -0.018575405701994896, 0.130351722240448, -0.14996519684791565, -0.07669269293546677, 0.06838519126176834, -0.007574031595140696, 0.19383123517036438, 0.0008786876569502056, -0.07160967588424683, 0.024470515549182892, -0.15231221914291382, 0.23295699059963226, 0.03679046407341957, -0.08441979438066483, 0.1968662291765213, 0.07404223829507828, 0.10012780874967575, 0.1250826120376587, 0.000006589521944988519, 0.026271378621459007, -0.06617812812328339, 0.05559787154197693, -0.03592946007847786, -0.11558989435434341, 0.2016497701406479, -0.07785649597644806, 0.03520989790558815, -0.06792350113391876, -0.1270294487476349, -0.0818030908703804, -0.035697855055332184, -0.0956280380487442, 0.10864262282848358, 0.14096443355083466, -0.008499355055391788, 0.04169771820306778, -0.2148284614086151, -0.1915697157382965, -0.11113953590393066, 0.04557992145419121, 0.03455327823758125, 0.23480576276779175, -0.0647951290011406, -0.10858424007892609, -0.08840537071228027, -0.005826740525662899, 0.044957924634218216, 0.11246543377637863, 0.19108369946479797, 0.11768647283315659, -0.1872636079788208, 0.007925789803266525, 0.013271249830722809, 0.15847113728523254, -0.028929267078638077, 0.08101988583803177, -0.043302785605192184, -0.030209844931960106, 0.03434986248612404, 0.06358268857002258, -0.043877359479665756, -0.08517636358737946, -0.10534971207380295, 0.05150727555155754, -0.10693525522947311, -0.0316888652741909, -0.0756492018699646, -0.046116456389427185, -0.2253628820180893, -0.1609024703502655, -0.06921812891960144, -0.09971696883440018, 0.030516894534230232, -0.032952237874269485, 0.04169069603085518, -0.0025491693522781134, -0.019098006188869476, 0.01659451238811016, 0.18367475271224976, 0.04439467936754227, -0.017548032104969025, 0.029374923557043076, 0.05323197692632675, -0.19575101137161255, 0.08293803781270981, -0.02863583341240883, -0.11179882287979126, 0.18201704323291779, 0.04124003276228905, -0.03812197968363762, -0.02248893678188324, -0.10710460692644119, -0.001916794921271503, 0.11566347628831863, -0.14371196925640106, 0.18128392100334167, -0.2686663269996643, -0.0834314227104187, 0.007531394250690937, -0.0706423819065094, -0.058288026601076126, 0.06575287133455276, 0.1357257068157196, -0.08653855323791504, 0.07763820886611938, 0.16785132884979248, 0.011766803450882435, 0.1676163375377655, 0.10598070919513702, -0.025003720074892044, -0.03308109566569328, -0.11057176440954208, -0.11593382805585861, -0.10486835986375809, 0.07526114583015442, -0.05996460095047951, 0.02072388119995594, 0.00895965937525034, 0.15098443627357483, -0.21290399134159088, -0.029574044048786163, -0.27919965982437134, -0.09350891411304474, -0.0007123675313778222, 0.12709960341453552, 0.052594076842069626, -0.19367046654224396, 0.051748525351285934, 0.030987001955509186, -0.11775847524404526, -0.021512851119041443, 0.06846501678228378, -0.14060617983341217, -0.019280077889561653, -0.16545367240905762, 0.10703577101230621, -0.1791291981935501, 0.04831885173916817, 0.05628926679491997, -0.1300986409187317, -0.2404884248971939, -0.03292623162269592, -0.32074856758117676, -0.041010499000549316, 0.009765280410647392, -0.16108347475528717, -0.005273886024951935, -0.00931943766772747, 0.12748773396015167, 0.07477978616952896, -0.04976382106542587, -0.04508230462670326, 0.023237476125359535, -0.1533091813325882, -0.05645475909113884, -0.11764252930879593, -0.0678650289773941, 0.03463149815797806, -0.19734466075897217, 0.1550401896238327, -0.02979312464594841, -0.13710257411003113, 0.03429868072271347, 0.008890665136277676, 0.016317743808031082, 0.04428388923406601, -0.016919659450650215, 0.029429679736495018, 0.018361417576670647, -0.006402390543371439, -0.06544124335050583, 0.13394473493099213, -0.053444359451532364, -0.057163745164871216, 0.011187254451215267, -0.06933604180812836, 0.06700111925601959, 0.15642540156841278, -0.07402471452951431, 0.009407395496964455, 0.10637075453996658, -0.19455112516880035, 0.08258963376283646, -0.23509551584720612, -0.14161723852157593, 0.08310294151306152, -0.051874611526727676, 0.07931444048881531, -0.06209372356534004, -0.04059750959277153, -0.21542911231517792, 0.24133144319057465, 0.10998199135065079, -0.15916192531585693, -0.03924199938774109, 0.011174065060913563, -0.10528990626335144, -0.07774186134338379, -0.1674526482820511, -0.094712033867836, -0.022444110363721848, 0.13773392140865326, 0.008932349272072315, 0.17980225384235382, -0.04803268238902092, 0.047677576541900635, 0.10475457459688187, 0.1299302875995636, -0.0055224718526005745, -0.013492557220160961, 0.07424141466617584, 0.11530138552188873, 0.058656785637140274, -0.1502865105867386, -0.11242552101612091, -0.07663562148809433, 0.1323603093624115, 0.05983935296535492, -0.06980185955762863, -0.014742939732968807, 0.06183483451604843, 0.08405046164989471, 0.06075451150536537, -0.07544725388288498, -0.05981633812189102, -0.06250408291816711, 0.01739991270005703, 0.004378982353955507, -0.06180592626333237, 0.23311133682727814, -0.09240912646055222, 0.09992871433496475, 0.02434309385716915, 0.02980423904955387, 0.297552227973938, 0.08621883392333984, -0.08279336243867874, 0.06625445187091827, 0.14509201049804688, 0.023094501346349716, 0.08615431189537048, 0.24006623029708862, 0.001771719311363995, -0.06248762458562851, 0.05676504597067833, -0.005794175900518894, -0.04196849837899208, 0.02250836417078972, 0.15711794793605804, -0.0423787496984005, -0.08118098974227905, -0.15393595397472382, 0.09473081678152084, 0.12166468799114227, 0.02945706807076931, -0.02333238534629345, -0.1573316901922226, -0.05397668108344078, -0.08914602547883987, -0.13189737498760223, 0.17076832056045532, -0.045517340302467346, -0.02916053868830204, 0.051760993897914886, -0.17001308500766754, 0.12377090007066727, 0.0296756774187088, -0.14354170858860016, 0.09265391528606415, 0.007014032918959856, -0.035536713898181915, -0.012590617872774601, -0.016327988356351852, -0.23315151035785675, -0.09105142205953598, 0.07627154886722565, 0.06177520006895065, -0.13412398099899292, 0.057848475873470306, -0.09432821720838547, 0.0906994640827179, 0.13385210931301117, -0.011900179088115692, -0.06362832337617874, 0.006216566544026136, 0.04531651735305786, -0.12399091571569443, 0.06696534901857376, 0.04251547157764435, 0.07907210290431976, 0.0371093675494194, 0.02230089157819748, -0.1351320594549179, -0.0572664737701416, -0.06918461620807648, -0.033589351922273636, -0.016714952886104584, 0.07130428403615952, -0.06924411654472351, -0.020442921668291092, -0.006794983986765146, -0.14709794521331787, 0.13553963601589203, -0.023812470957636833, 0.03144189715385437, -0.07055708765983582, 0.14079366624355316, -0.049066994339227676, -0.034376826137304306, 0.02878088317811489, -0.24684573709964752, -0.12371232360601425, 0.011415289714932442, 0.03204340115189552, -0.08465662598609924, 0.18951711058616638, 0.08210497349500656, 0.0038320987951010466, 0.017253577709197998, -0.030360396951436996, -0.007398846093565226, -0.24960088729858398, 0.16802339255809784, -0.001735673169605434, -0.06313131749629974, -0.06459604203701019, -0.07523375004529953, -0.02921510674059391, 0.03443768620491028, -0.16666077077388763, -0.03866070136427879, -0.17775258421897888, -0.03778328746557236, -0.03909381851553917, 0.0047275349497795105, 0.028141966089606285, -0.09473986178636551, -0.07519398629665375, 0.06426720321178436, 0.03310590609908104, -0.01931740902364254, 0.006719361059367657, -0.17403271794319153, 0.1221381351351738, -0.09221304953098297, -0.0064345053397119045, -0.03401309624314308, -0.04438089579343796, -0.15804331004619598, 0.13641975820064545, 0.16455280780792236, 0.04067373648285866, -0.02005285583436489, -0.08302513509988785, -0.07003173977136612, -0.032538507133722305, -0.005327322985976934, 0.054758138954639435, 0.16519543528556824, 0.012253431603312492, -0.15287677943706512, -0.03602048382163048, 0.07939516752958298, 0.07010934501886368, 0.1324400156736374, -0.06815586984157562, -0.0010212125489488244, 0.04099750518798828, 0.18765997886657715, 0.09261608868837357, 0.019894171506166458, 0.02901368774473667, -0.001382125774398446, 0.26384079456329346, 0.09655410796403885, 0.10390027612447739, 0.08596011251211166, -0.1503073275089264, -0.08990258723497391, -0.03173420578241348, 0.014580633491277695, 0.14405058324337006, 0.11807481944561005, 0.06658482551574707, 0.2112976312637329, 0.09496898949146271, 0.24400652945041656, -0.062328800559043884, -0.01784854382276535, -0.10596438497304916, -0.0491478405892849, -0.019225185737013817, 0.15879899263381958, -0.07202725112438202, -0.018620682880282402, 0.09764984995126724, -0.016203001141548157, -0.18169401586055756, 0.11807288229465485, -0.029250165447592735, -0.05338303744792938, 0.013799861073493958, 0.01163682620972395, 0.05562834069132805, 0.028223689645528793, -0.09796357899904251, 0.18064391613006592, 0.17462128400802612, 0.07775869220495224, 0.017616240307688713, -0.01844928041100502, -0.03402649983763695, 0.0655946284532547, -0.09871474653482437, 0.1260625422000885, 0.17831547558307648, 0.12008566409349442, 0.1562674641609192, 0.2484314888715744, -0.059958700090646744, 0.2938888370990753, -0.16080284118652344, -0.22128461301326752, -0.12978847324848175, 0.014279242604970932, -0.06140420585870743, 0.09051929414272308, 0.06417720764875412, -0.16613972187042236, 0.08722450584173203, -0.010593976825475693, -0.14585493505001068, 0.1172139048576355, -0.09658640623092651, -0.12438172847032547, -0.01611664518713951, -0.10982091724872589, -0.013425313867628574, -0.01943265274167061, -0.015635162591934204, -0.03546923026442528, 0.12382133305072784, -0.008453438058495522, -0.02511383779346943, 0.0678088441491127, -0.08834227919578552, -0.039381079375743866, 0.04076280817389488, -0.12497741729021072, 0.07277599722146988, 0.23741208016872406, -0.006805215496569872, -0.07158470898866653, 0.09572995454072952, -0.07321681827306747, 0.05732599273324013, -0.12419062852859497, 0.01997288502752781, 0.12075169384479523, 0.004530827980488539, -0.150918111205101, -0.023549547418951988, -0.12345906347036362, 0.0656808540225029, 0.15086320042610168, 0.160374715924263, 0.03831930458545685, -0.1865496188402176, -0.03845277801156044, 0.10408326983451843, 0.09603068977594376, -0.08003682643175125, -0.20043618977069855, 0.05823575332760811, 0.14749248325824738, 0.06964029371738434, 0.0026093837805092335, -0.2315184324979782, 0.09839004278182983, 0.06403115391731262, -0.0018103061011061072, -0.004933325108140707, 0.1639862060546875, 0.11187954246997833, -0.024256957694888115, -0.04459337145090103, 0.0113524766638875, -0.1131429374217987, 0.05269935727119446, -0.07839301973581314, -0.08925478160381317, 0.12039124220609665, -0.01746014691889286, 0.1212160587310791, -0.023722300305962563, 0.037600088864564896, -0.009814873337745667, -0.06511344015598297, 0.09465489536523819, 0.12452016770839691, -0.0422433577477932, 0.03763435408473015, -0.05519125238060951, 0.04044061899185181, 0.05377073585987091, -0.07199814170598984, 0.019565943628549576, 0.036395829170942307, -0.1875922530889511, 0.18107202649116516, -0.06649617105722427, 0.035741839557886124, 0.18890832364559174, -0.1448078751564026, -0.11690922826528549, -0.016631588339805603, 0.20110967755317688, -0.015557202510535717, -0.03746342658996582, 0.005372051615267992, 0.2634021043777466, -0.029230967164039612, 0.06201043352484703, 0.11930882930755615, -0.029693931341171265, -0.20689232647418976, 0.09850912541151047, 0.11815433204174042, -0.10973867028951645, 0.06156645342707634, -0.0027681845240294933, -0.1141255646944046, 0.009903638623654842, -0.05247191712260246, 0.01660756580531597, 0.19773882627487183, -0.0022903953213244677, 0.045113690197467804, -0.1355343759059906, -2.559224881030454e-32, -0.05530283972620964, 0.01949438638985157, -0.010248549282550812, 0.05457860231399536, -0.007623130921274424, 0.07763218879699707, 0.019171925261616707, -0.06567513942718506, -0.04958275333046913, -0.022706538438796997, 0.04695342108607292, -0.08720304816961288, 0.07248644530773163, 0.02918541058897972, -0.16097144782543182, -0.023978840559720993, -0.09094712138175964, -0.0762825757265091, 0.05035799741744995, 0.06535106897354126, 0.07281719893217087, 0.15223811566829681, -0.05103017017245293, -0.1378645896911621, 0.06345648318529129, -0.1050739586353302, 0.115645632147789, -0.09231823682785034, 0.012259295210242271, -0.07387420535087585, -0.15620766580104828, -0.05987994745373726, -0.1338333934545517, 0.012087748385965824, 0.039663638919591904, 0.04620768129825592, -0.23543870449066162, -0.005053205881267786, -0.030645662918686867, 0.031240636482834816, 0.059060316532850266, 0.13104352355003357, -0.002786260563880205, -0.1461593359708786, 0.07891789823770523, 0.08318611979484558, 0.06575790047645569, 0.004832281265407801, -0.050328969955444336, -0.06760808080434799, -0.06462469696998596, 0.05124836787581444, 0.01255499105900526, -0.18976880609989166, 0.08946152031421661, -0.06381668895483017, 0.02989353984594345, 0.03127141669392586, 0.09107059240341187, -0.1637074500322342, 0.030009128153324127, -0.044872671365737915, -0.016206873580813408, -0.09078595042228699, 0.12869995832443237, -0.07669094204902649, 0.26615583896636963, -0.040063612163066864, 0.02081015333533287, -0.1474912464618683, 0.220123291015625, 0.11574918031692505, -0.008413500152528286, -0.0018249618588015437, -0.004623951390385628, -0.046735744923353195, -0.057485487312078476, 0.0035203879233449697, 0.12447015196084976, -0.1315326988697052, -0.09165740013122559, -0.05192965269088745, -0.1129346489906311, 0.07280412316322327, 0.09195881336927414, -0.07404520362615585, -0.06179513409733772, -0.04670608416199684, -0.1532687246799469, 0.022774342447519302, 0.0035501776728779078, -0.2047557383775711, -0.06459071487188339, 0.001860713236965239, -0.009916557930409908, -0.04749331623315811, 0.026784583926200867, 0.05367077887058258, -0.011503376066684723, 0.11234450340270996, 0.07026420533657074, 0.0023858891800045967, 0.2225005328655243, -0.03510163724422455, 0.048920318484306335, 0.1316954642534256, 0.08844120055437088, 0.04798518493771553, -0.1312873363494873, -0.04157671332359314, -0.0876043438911438, 0.037042099982500076, 0.16720010340213776, 0.0927145853638649, 0.18637976050376892, 0.08106444776058197, -0.07879980653524399, -0.027328534051775932, -0.043466717004776, 0.1612028032541275, -0.12143146991729736, -0.07353480905294418, 0.11391349881887436, 0.023312367498874664, -0.06773781776428223, 0.2251436859369278, -0.17917269468307495, 0.01282317191362381, -0.13038139045238495, -0.0750114917755127, 0.09946022927761078, 0.020875491201877594, 7.468809712918301e-7, -0.05042371153831482, 0.13325126469135284, 0.08486035466194153, 0.021418260410428047, -0.07523814588785172, -0.021478142589330673, -0.29669442772865295, 0.017480483278632164, 0.09685855358839035, 0.05081652104854584, 0.1264762133359909, -0.049676161259412766, -0.09681013226509094, 0.06309259682893753, -0.10037621110677719, -0.08112375438213348, -0.020913098007440567, -0.021198134869337082, -0.05225345119833946, -0.037373390048742294, 0.030138729140162468, 0.20783695578575134, -0.10499196499586105, -0.05159568414092064, 0.031553715467453, -0.1816864311695099, 0.022034790366888046, 0.12904144823551178, 0.12979860603809357, -0.12788300216197968, -0.06369199603796005, 0.10747207701206207, -0.07407020032405853, 0.127094566822052, 0.05759008228778839, -0.006335792597383261, -0.1541794091463089, -0.008786438964307308, -0.0353890061378479, 0.01496522594243288, 0.11964632570743561, 0.0513426698744297, -0.06125830113887787, -0.044796280562877655, 0.16468513011932373, -0.12586839497089386, -0.02509237267076969, -0.016905801370739937, -0.17465251684188843, 0.06027580052614212, 0.08592897653579712, -0.03438306599855423, 0.0457114614546299, 0.20314733684062958, 0.06849402189254761, -0.09944041073322296, -0.08977733552455902, -0.18153131008148193, 0.06089207902550697, -0.046692363917827606, -0.010409011505544186, -0.06015825644135475, -0.03599731624126434, -0.009283951483666897, 0.15602822601795197, 0.05432526394724846, 0.06355114281177521, 5.74604827144714e-35, 0.07829702645540237, 0.0012815501540899277, 0.08364890515804291, -0.001479329657740891, -0.03818945586681366, -0.0036228811368346214, -0.05917248874902725, -0.035065535455942154, 0.11610136926174164, -0.1349835842847824, -0.026044100522994995 ]
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.18717145919799805, 0.23090632259845734, -0.08760005235671997, 0.14123445749282837, 0.057864829897880554, 0.0975116416811943, 0.0408584363758564, -0.05114106461405754, -0.03164728730916977, -0.1434212177991867, -0.010953983291983604, -0.025001483038067818, -0.008235309273004532, -0.00852349866181612, -0.02621435560286045, 0.20599263906478882, 0.2695586681365967, 0.023238223046064377, -0.12083032727241516, -0.04856276884675026, -0.1806843876838684, -0.010401792824268341, -0.12174277752637863, -0.006742933765053749, -0.10926248878240585, -0.01263189222663641, -0.05864054709672928, -0.02927115187048912, 0.005681822542101145, 0.0009342730627395213, 0.032147448509931564, 0.11997511237859726, -0.2522166073322296, 0.06304299831390381, 0.000006309755463007605, -0.03976115956902504, 0.006981954909861088, -0.01089062262326479, -0.025241345167160034, 0.12561850249767303, -0.031532809138298035, 0.1457567662000656, 0.0027455103117972612, 0.032624829560518265, -0.06074371933937073, -0.1807814985513687, 0.007389212492853403, 0.0712222307920456, 0.06766072660684586, -0.05036259815096855, -0.020624153316020966, 0.01477049570530653, -0.008282254450023174, 0.03301112726330757, 0.09992702305316925, -0.0709538534283638, -0.0023404844105243683, 0.06652398407459259, -0.043824974447488785, 0.025447044521570206, 0.07008786499500275, -0.22339478135108948, -0.026823682710528374, 0.042579516768455505, -0.12080961465835571, -0.0706479549407959, -0.1837167739868164, -0.04396195709705353, 0.16444872319698334, 0.0885896161198616, 0.11540079861879349, 0.10906721651554108, -0.0777743011713028, 0.07512861490249634, 0.029532594606280327, -0.02807893604040146, 0.16774502396583557, -0.007778269238770008, 0.04917764291167259, -0.09989934414625168, 0.01332087442278862, 0.25129377841949463, -0.01142765861004591, -0.0296759232878685, -0.1355464905500412, 0.15107369422912598, -0.07086993753910065, 0.04664596915245056, -0.13615043461322784, -0.23146815598011017, 0.026864519342780113, -0.017994524911046028, -0.06506649404764175, -0.06913857161998749, -0.11242050677537918, 0.008216707035899162, -0.09774229675531387, 0.05293543264269829, 0.02364320121705532, -0.09777054935693741, -0.04638230428099632, 0.11664824187755585, -0.033806804567575455, -0.01433499064296484, 0.11185430735349655, 0.04744559898972511, 0.20295104384422302, -0.11085783690214157, -0.005020934622734785, -0.06641495227813721, 0.09849482029676437, 0.03056630864739418, 0.0859154760837555, 0.03834718465805054, 0.06311554461717606, 0.014803587459027767, -0.044597774744033813, 0.009200504049658775, -0.02819198928773403, 0.020085575059056282, -0.022521406412124634, -0.019246872514486313, -0.22943100333213806, -0.015246090479195118, -0.06304900348186493, 0.05212825536727905, 0.07572664320468903, 0.06212000548839569, -0.09582850337028503, -0.010133136995136738, 0.013401223346590996, -0.016176801174879074, -0.059158798307180405, 0.025427190586924553, 0.015322432853281498, 0.05367475748062134, 0.01285526156425476, 0.14055873453617096, -0.0639006718993187, -0.07557262480258942, -0.14295420050621033, -0.09173116087913513, 0.004997769836336374, 0.06795096397399902, -0.10194388031959534, 0.01334593165665865, 0.04114701598882675, 0.10038549453020096, 0.09239528328180313, -0.003998677246272564, -0.15461069345474243, 0.21141265332698822, -0.08493053913116455, -0.08136043697595596, -0.07033062726259232, 0.07416705787181854, 0.056311048567295074, 0.05846092104911804, 0.12097784876823425, -0.07849755138158798, 0.0812649354338646, 0.06243853643536568, -0.025947801768779755, -0.14923715591430664, -0.06749578565359116, 0.005711324978619814, 0.017302053049206734, -0.18082016706466675, -0.06759379804134369, -0.043670009821653366, 0.09179157763719559, 0.08993389457464218, 0.03842875733971596, 0.07070060074329376, -0.051314596086740494, 0.08009153604507446, -0.10900707542896271, -0.012118062935769558, -0.23224204778671265, -0.039913151413202286, 0.03462843596935272, 0.10263228416442871, 0.031219955533742905, -0.08850788325071335, 0.11564736813306808, -0.04413249343633652, 0.0697690024971962, -0.017200004309415817, 0.00977360736578703, -0.2217998206615448, -0.08885635435581207, 0.03858831152319908, -0.16746263206005096, -0.18293291330337524, 0.0024175443686544895, 0.07765493541955948, -0.10468742996454239, -0.2923959791660309, 0.1572650969028473, -0.09885692596435547, 0.016839606687426567, -0.007986634038388729, 0.1142227053642273, -0.04643344506621361, 0.03801076114177704, -0.08718225359916687, -0.049087073653936386, 0.07236853241920471, -0.005105973221361637, -0.0622047558426857, 0.04099908098578453, 0.011219916865229607, -0.13916361331939697, 0.017253248021006584, -0.08151461184024811, -0.09680967032909393, 0.07632387429475784, -0.1403139978647232, -0.2624596655368805, -0.024648241698741913, -0.13514401018619537, -0.08873888105154037, -0.03261170908808708, -0.02084493264555931, -0.02117908000946045, -0.07516657561063766, 0.06656882911920547, 0.10466529428958893, 0.02744748443365097, 0.0822349488735199, 0.09356360882520676, 0.002728220773860812, 0.02778095006942749, -0.04736318811774254, -0.026539664715528488, 0.10845276713371277, -0.011187710799276829, -0.2592298090457916, 0.06974181532859802, -0.022398438304662704, -0.10602651536464691, 0.18467086553573608, -0.020572908222675323, 0.09942904859781265, 0.008679976686835289, -0.05197560042142868, 0.00419989600777626, -0.09538573771715164, -0.058762695640325546, 0.02550056204199791, 0.021025516092777252, -0.03371235728263855, -0.06052413210272789, -0.15516620874404907, -0.2286091297864914, -0.11482030898332596, -0.17081321775913239, 0.10580424219369888, 0.11847761273384094, 0.17473657429218292, 0.24500127136707306, 0.07457000762224197, 0.04066241532564163, -0.24294236302375793, 0.05828685685992241, -0.1200612336397171, 0.04758470132946968, 0.048181552439928055, 0.00607162993401289, 0.0842883363366127, 0.08748385310173035, -0.06275640428066254, 0.000632618903182447, -0.026795916259288788, 0.016781339421868324, -0.02457822486758232, -0.09919580817222595, -0.006850849837064743, -0.0034855136182159185, -0.006359329912811518, -0.12331496179103851, 0.36488670110702515, -0.05736447125673294, -0.10148777067661285, -0.1461898386478424, 0.2521055042743683, -0.1431165188550949, 0.004725481383502483, 0.00034228473668918014, 0.012752850539982319, -0.08224891871213913, -0.10548259317874908, 0.027209561318159103, -0.08880674093961716, -0.14869995415210724, 0.034175973385572433, 0.11565977334976196, 0.07597290724515915, 0.03509322926402092, -0.061382535845041275, -0.008707747794687748, 0.11748068779706955, 0.019893109798431396, 0.11466586589813232, 0.009226372465491295, -0.17216365039348602, 0.18697917461395264, -0.11767273396253586, -0.1618523895740509, -0.01742831990122795, 0.02711706981062889, -0.010753891430795193, 0.08782608062028885, 0.3458375334739685, -0.18155412375926971, 0.11261479556560516, -0.13324254751205444, -0.00548600684851408, 0.007593391928821802, 0.18686668574810028, 0.06069771945476532, 0.09950082004070282, -0.02325386367738247, 0.09262509644031525, 0.03629177063703537, -0.14905132353305817, 0.07048381119966507, 0.03645071014761925, -0.07125888019800186, -0.1233203336596489, 0.19092735648155212, 0.11358083039522171, -0.053305983543395996, -0.2055579423904419, 0.03600860759615898, -0.19241823256015778, -0.1134282574057579, -0.06967630982398987, 0.27738693356513977, 0.012923099100589752, -0.09176824241876602, -0.06866234540939331, -0.06246388703584671, 0.16432851552963257, -0.007546321954578161, -0.08674457669258118, 0.037902675569057465, 0.01143533457070589, 0.022206362336874008, 0.12394363433122635, 0.014855761080980301, -0.005376748740673065, -0.11996226757764816, -0.11014093458652496, -0.09396210312843323, 0.052438508719205856, 0.07183992862701416, 0.06774371862411499, 0.15964967012405396, 0.04958879202604294, 0.047682564705610275, 0.014839010313153267, -0.13832589983940125, 0.08330973237752914, 0.08998455107212067, 0.11694565415382385, 0.01882047951221466, 0.024915169924497604, -0.0275148656219244, -0.13688386976718903, 0.039377361536026, 0.13857506215572357, -0.04126599803566933, 0.01607399992644787, 0.17928805947303772, 0.061432305723428726, 0.11178544163703918, 0.005151188466697931, -0.11871417611837387, 0.05889232084155083, -0.03616498410701752, -0.14221608638763428, -0.15773695707321167, 0.0988917350769043, 0.3095462918281555, 0.16318538784980774, 0.002620251616463065, 0.026311615481972694, -0.2291761338710785, 0.21705564856529236, 0.14262902736663818, -0.15282635390758514, -0.013572058640420437, 0.13230416178703308, 0.05380553379654884, -0.057642705738544464, 0.3256087303161621, 0.13942189514636993, -0.08969125151634216, 0.15199865400791168, -0.011566057801246643, -0.020937249064445496, 0.07335000485181808, 0.20773395895957947, 0.057949382811784744, 0.06630396842956543, 0.004985736683011055, -0.003795120632275939, 0.03189178556203842, -0.022179193794727325, 0.16539540886878967, -0.0691625326871872, 0.030964111909270287, -0.06257171928882599, 0.11783121526241302, -0.17055456340312958, -0.09388179332017899, -0.2432018220424652, -0.0737895518541336, -0.19192352890968323, 0.05448219180107117, -0.21576327085494995, 0.10680048167705536, 0.000662467849906534, 0.05089187249541283, -0.08612656593322754, 0.15993551909923553, -0.28544068336486816, 0.1530943214893341, -0.014948729425668716, -0.06825105845928192, -0.04227377846837044, 0.14404329657554626, -0.004869624972343445, 0.038369107991456985, -0.02058783359825611, 0.094023197889328, 0.0787566602230072, -0.03305843099951744, -0.07227011770009995, -0.14920921623706818, -0.06304481625556946, -0.07184057682752609, -0.20564603805541992, -0.024191787466406822, -0.01561653520911932, -0.027456263080239296, -0.09110986441373825, -0.07741180062294006, 0.010508607141673565, -0.018718892708420753, -0.10086070746183395, 0.06164959445595741, -0.03184353932738304, 0.04860565438866615, -0.11224081367254257, -0.05298096686601639, -0.00520036555826664, 0.06146319583058357, 0.13898776471614838, 0.17527996003627777, -0.04997837170958519, -0.20046502351760864, 0.013051696121692657, -0.022364363074302673, -0.22840383648872375, 0.12699081003665924, -0.035266440361738205, 0.1488763391971588, -0.09757779538631439, -0.046213533729314804, 0.04509201645851135, -0.020749030634760857, 0.011097808368504047, 0.016404777765274048, -0.03846227377653122, 0.15609514713287354, 0.006604531314224005, 0.010579530149698257, -0.032785091549158096, 0.02410232461988926, 0.022684277966618538, 0.1139531284570694, -0.09313478320837021, -0.08976421505212784, 0.11723123490810394, -0.022546924650669098, -0.10575809329748154, -0.06865230202674866, -0.005358806345611811, -0.03644440323114395, 0.09468493610620499, -0.053973034024238586, 0.08063603192567825, -0.1492900252342224, 0.23982679843902588, 0.0745110884308815, -0.07428959012031555, 0.14273466169834137, 0.12008492648601532, 0.034843429923057556, -0.19469742476940155, 0.08072956651449203, -0.0045589907094836235, 0.040064286440610886, -0.007149054203182459, 0.01559117529541254, 0.07135497033596039, 0.02906855195760727, -0.0007767274510115385, -0.2324209213256836, 0.1228351816534996, -0.03175785392522812, -0.1474166363477707, 0.1301882117986679, 0.0034100741613656282, 0.03253839164972305, 0.09446540474891663, -0.15384751558303833, 0.10579141974449158, 0.013050958514213562, -0.028340835124254227, -0.06525179743766785, 0.08267920464277267, 0.08726895600557327, 0.16507524251937866, -0.015606609173119068, -0.11869452148675919, 0.2312634289264679, 0.13076230883598328, 0.09007559716701508, 0.17826874554157257, 0.1141565665602684, 0.026692843064665794, -0.04083922877907753, 0.08885519951581955, 0.1961050033569336, 0.06667778640985489, -0.10942177474498749, -0.16812042891979218, -0.15472136437892914, -0.16502362489700317, 0.017023518681526184, 0.006646688096225262, 0.03568097576498985, -0.09092527627944946, -0.10638550668954849, -0.001535765128210187, 0.03612260892987251, -0.25543347001075745, 0.03621433302760124, 0.028245873749256134, -0.051311928778886795, 0.04415951669216156, 0.016905078664422035, -2.4071508829909869e-32, -0.10828060656785965, -0.024897500872612, -0.08052091300487518, -0.02200772427022457, -0.02962384931743145, 0.08387450873851776, 0.1052069142460823, -0.010386640205979347, -0.025699438527226448, -0.022320421412587166, -0.0012568418169394135, 0.04468826577067375, 0.06245870143175125, -0.18029993772506714, -0.07428910583257675, -0.17610673606395721, 0.11683377623558044, -0.08660709112882614, 0.007371294777840376, 0.08690758794546127, -0.0016736448742449284, 0.03148506209254265, 0.15052540600299835, -0.05420849844813347, 0.021968672052025795, 0.033765822649002075, -0.07602877169847488, -0.03607718646526337, -0.1666276454925537, 0.09942471981048584, -0.02047499641776085, 0.0008616704144515097, -0.04908565431833267, 0.1529158353805542, -0.02954714559018612, -0.15264572203159332, 0.03814980015158653, -0.08477187901735306, -0.11306210607290268, 0.09509877115488052, -0.12812522053718567, -0.060875654220581055, 0.05685640126466751, 0.00640826066955924, -0.15552034974098206, -0.0634460598230362, -0.05225588008761406, -0.029304418712854385, 0.0009690026636235416, -0.28402402997016907, -0.032497894018888474, -0.08604320883750916, 0.031603194773197174, 0.00975080393254757, -0.1907336413860321, 0.023695874959230423, 0.1421326994895935, 0.07084303349256516, -0.034975774586200714, -0.024647310376167297, 0.08191677182912827, -0.0037527133245021105, 0.11324959993362427, -0.056417230516672134, -0.11619942635297775, -0.03971389681100845, 0.3461673855781555, 0.19813300669193268, 0.1609967052936554, 0.09673105180263519, 0.06489650160074234, 0.04842711240053177, 0.01874645985662937, 0.07889226824045181, 0.017529472708702087, 0.014420242980122566, -0.25166478753089905, 0.07704386860132217, -0.17176887392997742, 0.0933878943324089, -0.05035563185811043, -0.034647393971681595, -0.07569184899330139, 0.0423513725399971, -0.1570858508348465, -0.12319182604551315, -0.1197224110364914, 0.0838913545012474, 0.0041039446368813515, -0.17746473848819733, -0.0039881314150989056, -0.018699558451771736, -0.17813558876514435, -0.05233621224761009, -0.10228697210550308, -0.047891926020383835, -0.08527937531471252, -0.05858916416764259, -0.10070738196372986, 0.14659430086612701, -0.09129311144351959, 0.11159956455230713, 0.03700163960456848, -0.035794954746961594, 0.005785174667835236, 0.14449988305568695, 0.04149364307522774, 0.038621701300144196, -0.15261326730251312, 0.032568398863077164, 0.027417173609137535, 0.08605187386274338, 0.0924653634428978, 0.1777644157409668, 0.12592713534832, -0.09797119349241257, 0.04063941538333893, 0.0245025884360075, 0.1450798213481903, 0.25445476174354553, -0.10377198457717896, -0.03578284755349159, -0.17468884587287903, 0.046742457896471024, 0.11287429928779602, 0.08914285153150558, -0.17606811225414276, -0.018014589324593544, -0.1600855588912964, -0.10470116883516312, 0.022182371467351913, 0.030501578003168106, 7.747846666461555e-7, -0.13180330395698547, 0.13239581882953644, -0.10909927636384964, 0.014273878186941147, -0.0006815055967308581, 0.17539259791374207, -0.09824520349502563, -0.005226901266723871, 0.07721777260303497, 0.2535718083381653, -0.1202927976846695, -0.022393887862563133, -0.019768573343753815, -0.08951910585165024, 0.12090929597616196, 0.09629329293966293, 0.04468366503715515, 0.030490588396787643, -0.28659704327583313, -0.05443035066127777, 0.11080727726221085, 0.11444442719221115, 0.09432360529899597, -0.02219354920089245, 0.209058478474617, 0.02464819699525833, -0.015918375924229622, 0.043147336691617966, -0.17801648378372192, 0.09883178025484085, -0.012900622561573982, -0.04305138438940048, 0.20409944653511047, -0.016780762001872063, 0.0783163383603096, -0.09685501456260681, -0.159112349152565, 0.08753716945648193, 0.014359771274030209, -0.062343910336494446, -0.1681411862373352, 0.09861515462398529, 0.10795460641384125, -0.032570980489254, 0.1485433578491211, 0.10062626749277115, 0.08146359771490097, -0.07693395018577576, 0.024575479328632355, 0.045310743153095245, 0.24194498360157013, 0.03683967515826225, -0.07694197446107864, 0.07808409631252289, 0.01845276914536953, 0.017786787822842598, -0.01631031557917595, -0.002734252717345953, 0.09696909040212631, -0.20494288206100464, 0.12045279890298843, -0.24270512163639069, 0.17790159583091736, 0.17760668694972992, 0.0050294408574700356, -0.07256539911031723, 0.009632859379053116, 2.7331396192094967e-34, 0.05204937234520912, 0.16240055859088898, 0.12696948647499084, -0.21278101205825806, 0.016644086688756943, -0.014320305548608303, 0.043793946504592896, 0.06134553253650665, -0.10368210822343826, 0.0498320534825325, -0.013402924872934818 ]
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.17944033443927765, 0.25695616006851196, -0.07147216796875, 0.12706060707569122, 0.04566993936896324, 0.0730038732290268, 0.05090056732296944, -0.052783653140068054, -0.053888678550720215, -0.17265470325946808, -0.012062483467161655, -0.023102877661585808, -0.009937354363501072, -0.02044922672212124, -0.028797520324587822, 0.20403115451335907, 0.28185543417930603, 0.0191801805049181, -0.10780175775289536, -0.05855824798345566, -0.20378045737743378, -0.014205440878868103, -0.12962089478969574, -0.015859372913837433, -0.09242844581604004, -0.011700820177793503, -0.04573877155780792, -0.04469023272395134, -0.008103001862764359, 0.006312798708677292, 0.025486180558800697, 0.12636177241802216, -0.23787622153759003, 0.06740625947713852, 0.000006226511686691083, -0.044759225100278854, -0.004103629384189844, 0.015020237304270267, 0.0015042569721117616, 0.1418280452489853, -0.027771050110459328, 0.13720545172691345, 0.001402821158990264, 0.03096151538193226, -0.06113157421350479, -0.17560386657714844, -0.01668977178633213, 0.08563035726547241, 0.04556102678179741, -0.06236499920487404, -0.030449900776147842, 0.008165339007973671, 0.012074153870344162, 0.035958196967840195, 0.10582447797060013, -0.07613441348075867, -0.0025219714734703302, 0.058076053857803345, -0.018915360793471336, 0.01927495189011097, 0.08539766073226929, -0.20257174968719482, -0.0329652801156044, 0.05363570526242256, -0.10883884131908417, -0.06258060038089752, -0.1814100742340088, -0.04405386373400688, 0.15936127305030823, 0.07007977366447449, 0.1159723550081253, 0.11176540702581406, -0.07776323705911636, 0.07022947072982788, 0.019686752930283546, -0.003736211219802499, 0.16179998219013214, -0.015795178711414337, 0.06189673766493797, -0.11010179668664932, 0.02414313331246376, 0.269813597202301, -0.020444942638278008, -0.013433984480798244, -0.1404547393321991, 0.1837775707244873, -0.05603066831827164, 0.04354281723499298, -0.11534664779901505, -0.23925131559371948, 0.01962103880941868, -0.010771295987069607, -0.05780996009707451, -0.06811030954122543, -0.10147128999233246, -0.00444673141464591, -0.06530740112066269, 0.06288941949605942, 0.04309163615107536, -0.10589562356472015, -0.03024350479245186, 0.11158668249845505, -0.020127855241298676, -0.016469964757561684, 0.12665048241615295, 0.041791368275880814, 0.19382953643798828, -0.10397734493017197, 0.023162808269262314, -0.05767637491226196, 0.11110977083444595, 0.03221440315246582, 0.0869751051068306, 0.021233106032013893, 0.07138073444366455, 0.013636292889714241, -0.0321320965886116, 0.012253595516085625, -0.016419876366853714, 0.028692642226815224, -0.029857473447918892, -0.015443271026015282, -0.24339725077152252, -0.021106529980897903, -0.0735563263297081, 0.06860470026731491, 0.09084922075271606, 0.04319312795996666, -0.09688492119312286, 0.019949274137616158, 0.021160103380680084, -0.02686004713177681, -0.08024825900793076, 0.01277041807770729, 0.015197597444057465, 0.056026097387075424, 0.018310733139514923, 0.13736288249492645, -0.038484781980514526, -0.09592355787754059, -0.16441740095615387, -0.09660260379314423, 0.0059911273419857025, 0.07395859062671661, -0.10643777251243591, 0.026407180353999138, 0.03868481516838074, 0.10252811014652252, 0.08173783123493195, -0.013695796951651573, -0.1395791471004486, 0.20664717257022858, -0.10317891836166382, -0.09295296669006348, -0.0829065591096878, 0.07894353568553925, 0.045162711292505264, 0.05770754814147949, 0.1223345398902893, -0.0822770819067955, 0.0847909152507782, 0.06546380370855331, -0.02240188978612423, -0.15185049176216125, -0.053318340331315994, -0.010918961837887764, 0.04994000494480133, -0.15934592485427856, -0.06182973086833954, -0.022584978491067886, 0.09320519864559174, 0.08151018619537354, 0.048564765602350235, 0.05897895246744156, -0.042639847844839096, 0.07927756011486053, -0.12161041051149368, -0.007923165336251259, -0.2382839173078537, -0.02210562489926815, 0.045615460723638535, 0.11575772613286972, 0.035307854413986206, -0.09311270713806152, 0.1011916920542717, -0.032936181873083115, 0.0688946396112442, -0.028239401057362556, 0.017547015100717545, -0.2151954174041748, -0.07479003816843033, 0.03868219628930092, -0.19032976031303406, -0.19226382672786713, 0.028987141326069832, 0.06795808672904968, -0.10104493051767349, -0.29764416813850403, 0.16155751049518585, -0.08415767550468445, 0.01426016353070736, 0.004670938476920128, 0.1261068731546402, -0.062244582921266556, 0.05311612784862518, -0.0865190327167511, -0.04667549207806587, 0.08856336027383804, -0.009412422776222229, -0.06872183829545975, 0.037187233567237854, 0.016740038990974426, -0.13930398225784302, 0.016682032495737076, -0.07355229556560516, -0.09801644086837769, 0.07521852850914001, -0.1475081741809845, -0.25955256819725037, -0.04432225972414017, -0.118321992456913, -0.07717934995889664, -0.02839748002588749, -0.02895274944603443, -0.01883198507130146, -0.056677479296922684, 0.06244366616010666, 0.08713594824075699, 0.040333256125450134, 0.08148811757564545, 0.08969595283269882, -0.0020979265682399273, 0.042447831481695175, -0.05664069950580597, -0.03296661004424095, 0.10250743478536606, -0.01573706977069378, -0.23058508336544037, 0.06821732223033905, -0.019420230761170387, -0.0850127637386322, 0.19049634039402008, -0.014935098588466644, 0.11248484253883362, -0.015570790506899357, -0.044733572751283646, 0.004226617515087128, -0.10041523724794388, -0.07450353354215622, 0.023643480613827705, 0.02595890499651432, -0.027290483936667442, -0.06934009492397308, -0.14147251844406128, -0.21367941796779633, -0.10343080759048462, -0.16997958719730377, 0.09723670780658722, 0.10637430846691132, 0.1724085807800293, 0.2563147246837616, 0.08666616678237915, 0.037658337503671646, -0.240309476852417, 0.07154732197523117, -0.12098420411348343, 0.02894539386034012, 0.05427715182304382, 0.015663348138332367, 0.08042725175619125, 0.09709367901086807, -0.06327653676271439, -0.009554307907819748, -0.019507763907313347, 0.029772015288472176, -0.017313869670033455, -0.09011882543563843, -0.013205875642597675, 0.0014267686055973172, 0.00681420648470521, -0.09936460852622986, 0.3690779507160187, -0.05267893522977829, -0.10232869535684586, -0.14309845864772797, 0.2516099214553833, -0.13144341111183167, 0.009107714518904686, 0.007262092083692551, 0.017176644876599312, -0.10104626417160034, -0.12040933966636658, 0.01872989535331726, -0.08182264119386673, -0.15945696830749512, 0.02230953611433506, 0.1004621833562851, 0.08557426184415817, 0.045219726860523224, -0.06061834469437599, -0.012002482078969479, 0.11025943607091904, 0.016317151486873627, 0.11059331893920898, 0.00004045481182402, -0.16860875487327576, 0.1920533925294876, -0.12217221409082413, -0.14713968336582184, -0.005966891068965197, 0.017306499183177948, -0.01244624424725771, 0.07277370244264603, 0.3415885865688324, -0.1748008131980896, 0.08560998737812042, -0.11332858353853226, 0.022015675902366638, 0.013291750103235245, 0.1796187162399292, 0.06938408315181732, 0.10263360291719437, -0.020388241857290268, 0.06721220165491104, 0.025760363787412643, -0.16387459635734558, 0.08876461535692215, 0.026259100064635277, -0.09506881237030029, -0.12161344289779663, 0.20626753568649292, 0.11155133694410324, -0.035895317792892456, -0.1887897253036499, 0.03545183315873146, -0.19556871056556702, -0.10302224010229111, -0.08551932126283646, 0.2853185534477234, 0.017090333625674248, -0.09853512048721313, -0.06499268859624863, -0.03172057121992111, 0.1565384715795517, 0.006451813969761133, -0.0658746063709259, 0.048981159925460815, 0.003956248518079519, 0.001519230892881751, 0.14999642968177795, 0.041233088821172714, -0.009367591701447964, -0.13907578587532043, -0.12090740352869034, -0.09906083345413208, 0.040585581213235855, 0.08216501772403717, 0.045064378529787064, 0.16891704499721527, 0.06115935370326042, 0.03893449530005455, 0.02599073015153408, -0.13654936850070953, 0.10249773412942886, 0.1019395962357521, 0.12449315935373306, 0.017649788409471512, 0.018863284960389137, -0.04308614134788513, -0.1353500336408615, 0.033024393022060394, 0.14476370811462402, -0.044882193207740784, 0.011105348356068134, 0.18749818205833435, 0.050941113382577896, 0.10388065874576569, -0.004297187551856041, -0.10565073043107986, 0.05544043332338333, -0.039456527680158615, -0.12141403555870056, -0.15356415510177612, 0.0802542194724083, 0.31066644191741943, 0.15574896335601807, 0.004985008388757706, 0.01979183964431286, -0.19543033838272095, 0.22705259919166565, 0.1454443782567978, -0.15386000275611877, 0.01823122426867485, 0.11499309539794922, 0.05702844262123108, -0.059829894453287125, 0.33423030376434326, 0.14981013536453247, -0.10979072004556656, 0.16342534124851227, -0.02306469716131687, -0.04344352334737778, 0.06089625135064125, 0.20406503975391388, 0.06651468575000763, 0.06770320236682892, -0.020130587741732597, 0.005224222782999277, 0.03353417292237282, -0.03509935364127159, 0.16082815825939178, -0.08424346894025803, 0.016149573028087616, -0.10666605085134506, 0.12132467329502106, -0.18153004348278046, -0.0712837427854538, -0.24095627665519714, -0.07996572554111481, -0.18499672412872314, 0.06298812478780746, -0.22378653287887573, 0.122610904276371, 0.0010066312970593572, 0.03162873536348343, -0.09397949278354645, 0.1850750744342804, -0.2908007800579071, 0.159940704703331, -0.019053885713219643, -0.07139813154935837, -0.05575310438871384, 0.14284014701843262, 0.005793042480945587, 0.03605087101459503, -0.02292109839618206, 0.07938288897275925, 0.07356676459312439, -0.03968421369791031, -0.0585910826921463, -0.1399182230234146, -0.06809329241514206, -0.051994580775499344, -0.2083553522825241, -0.04277827590703964, -0.02121623419225216, -0.02376684360206127, -0.09078385680913925, -0.08495086431503296, 0.008211796171963215, -0.024546202272176743, -0.09603925794363022, 0.08309377729892731, -0.012613633647561073, 0.05150114372372627, -0.1246558129787445, -0.033868566155433655, 0.011533841490745544, 0.05184306204319, 0.13490723073482513, 0.1806303709745407, -0.04667029157280922, -0.19943217933177948, 0.01024743914604187, -0.03256536275148392, -0.20852135121822357, 0.10399659723043442, -0.03801734372973442, 0.16080789268016815, -0.07797256857156754, -0.05442969501018524, 0.032952893525362015, -0.03235175833106041, 0.020985431969165802, 0.005557592958211899, -0.06306477636098862, 0.16321858763694763, 0.007600071374326944, 0.004709785804152489, -0.0447530522942543, 0.02101767063140869, 0.004207054153084755, 0.11306501924991608, -0.08307989686727524, -0.08111422508955002, 0.12512587010860443, -0.04071443900465965, -0.10048045963048935, -0.07444993406534195, -0.024004464969038963, -0.048890870064496994, 0.079689159989357, -0.052045904099941254, 0.07842207700014114, -0.15612903237342834, 0.2512127161026001, 0.08638987690210342, -0.07710324227809906, 0.14950525760650635, 0.12809455394744873, 0.035326939076185226, -0.20579886436462402, 0.06867825984954834, -0.019916759803891182, 0.02444935403764248, 0.010445988737046719, 0.0019176824716851115, 0.074943408370018, 0.028354350477457047, -0.0002490703482180834, -0.2431827336549759, 0.1092589795589447, -0.06425149738788605, -0.1327192336320877, 0.13055738806724548, -0.008305909112095833, 0.03365333005785942, 0.11380787193775177, -0.11952397972345352, 0.09310637414455414, 0.006896459497511387, -0.024525979533791542, -0.04810294508934021, 0.08692747354507446, 0.09608875215053558, 0.14186127483844757, -0.022001566365361214, -0.11505185067653656, 0.24522529542446136, 0.11417916417121887, 0.11763422191143036, 0.14730210602283478, 0.12833760678768158, 0.02451547048985958, -0.051316432654857635, 0.06955395638942719, 0.19119656085968018, 0.09944970160722733, -0.11136607825756073, -0.19497983157634735, -0.17506584525108337, -0.14921583235263824, 0.029178272932767868, -0.0025978079065680504, 0.015041448175907135, -0.10644467175006866, -0.12808336317539215, -0.0042788744904100895, 0.045542508363723755, -0.2781486511230469, 0.04502896964550018, 0.018399009481072426, -0.06074503809213638, 0.053500961512327194, 0.013397268019616604, -2.404675438824949e-32, -0.11465350538492203, -0.03615834563970566, -0.09813907742500305, -0.012214865535497665, -0.029788333922624588, 0.08781121671199799, 0.09777528792619705, -0.03157808259129524, -0.021100958809256554, -0.02118842490017414, -0.0020781997591257095, 0.0365549698472023, 0.057462483644485474, -0.1865711212158203, -0.09412750601768494, -0.156977117061615, 0.10558658093214035, -0.09197991341352463, 0.0032029980793595314, 0.10617981106042862, -0.017028363421559334, 0.02685047872364521, 0.1493297666311264, -0.05415322631597519, 0.03760198503732681, 0.0428253635764122, -0.06795397400856018, -0.05032519996166229, -0.18782669305801392, 0.09519753605127335, -0.019492359831929207, 0.00917835719883442, -0.047167807817459106, 0.15995268523693085, -0.025626717135310173, -0.15482662618160248, 0.03780260309576988, -0.07089654356241226, -0.09678594768047333, 0.09419262409210205, -0.13086888194084167, -0.06027624383568764, 0.036248378455638885, 0.017681922763586044, -0.15939387679100037, -0.0693628191947937, -0.054849717766046524, -0.030541066080331802, -0.0220075361430645, -0.29116925597190857, -0.018845468759536743, -0.08231144398450851, 0.041523173451423645, 0.02407364919781685, -0.18754160404205322, 0.03349173069000244, 0.14332108199596405, 0.08018570393323898, -0.041192427277565, -0.026925519108772278, 0.0773247629404068, 0.007449377328157425, 0.11679977178573608, -0.09880566596984863, -0.10786674171686172, -0.05182557553052902, 0.33032697439193726, 0.2194284200668335, 0.17316502332687378, 0.08676749467849731, 0.09626204520463943, 0.036068499088287354, 0.02116476185619831, 0.07772010564804077, 0.026759561151266098, 0.0358097068965435, -0.24098405241966248, 0.058225926011800766, -0.17837806046009064, 0.09139002114534378, -0.014097703620791435, -0.04370367154479027, -0.0912778228521347, 0.057009484618902206, -0.16454917192459106, -0.13375701010227203, -0.12478553503751755, 0.0812232568860054, 0.002126312581822276, -0.19442544877529144, 0.0063314251601696014, -0.0177394300699234, -0.1810884028673172, -0.04245051369071007, -0.10755836218595505, -0.028800245374441147, -0.08754442632198334, -0.04249342530965805, -0.11648187041282654, 0.15162818133831024, -0.10080468654632568, 0.12460588663816452, 0.03535694628953934, -0.015456873923540115, 0.01740933768451214, 0.13518625497817993, 0.040764160454273224, 0.033429890871047974, -0.13959266245365143, 0.021983308717608452, 0.027424393221735954, 0.09332701563835144, 0.09400316327810287, 0.16445764899253845, 0.10193797945976257, -0.11032755672931671, 0.0368260033428669, 0.02072707936167717, 0.14216116070747375, 0.2595435082912445, -0.08176419883966446, -0.020460739731788635, -0.16413207352161407, 0.05361035093665123, 0.12719349563121796, 0.08709605038166046, -0.1739235520362854, -0.00814772117882967, -0.1520392894744873, -0.1014891043305397, 0.01634695939719677, 0.024253027513623238, 7.712546903348994e-7, -0.12570980191230774, 0.14811906218528748, -0.12852820754051208, 0.01205076090991497, -0.003361648414283991, 0.17908912897109985, -0.10648775100708008, -0.017384851351380348, 0.10311640053987503, 0.2781386077404022, -0.11913540214300156, -0.008192458190023899, -0.01542122382670641, -0.08912308514118195, 0.12197379767894745, 0.09341010451316833, 0.038588881492614746, 0.03667526692152023, -0.2884187400341034, -0.05321478098630905, 0.1005391851067543, 0.09396057575941086, 0.07468810677528381, -0.02263377606868744, 0.19241419434547424, 0.018215559422969818, 0.0023315255530178547, 0.03521645814180374, -0.18906725943088531, 0.11408145725727081, -0.0026522616390138865, -0.052929796278476715, 0.20333336293697357, -0.04069006070494652, 0.06888633966445923, -0.09301682561635971, -0.1875029057264328, 0.09799119085073471, 0.003644772805273533, -0.057424139231443405, -0.17693747580051422, 0.09727305173873901, 0.10688888281583786, -0.044244807213544846, 0.15219658613204956, 0.09444736689329147, 0.06459250301122665, -0.09082381427288055, 0.02310141548514366, 0.03834113851189613, 0.2547902762889862, 0.030722374096512794, -0.08976234495639801, 0.07492431253194809, 0.015472600236535072, 0.01093274261802435, -0.02177511155605316, 0.010253590531647205, 0.08376996964216232, -0.18206778168678284, 0.12342757731676102, -0.2474408596754074, 0.16915324330329895, 0.18191856145858765, 0.009316515177488327, -0.08670127391815186, 0.02297193929553032, 3.000881875660793e-34, 0.05878067761659622, 0.15991553664207458, 0.11174267530441284, -0.1976650506258011, 0.016418468207120895, -0.011625239625573158, 0.052034854888916016, 0.04904752969741821, -0.09837566316127777, 0.051256414502859116, -0.005662629380822182 ]
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.19839787483215332, 0.01621200703084469, 0.021374713629484177, 0.06744762510061264, 0.06126543879508972, 0.09056518226861954, 0.02803940139710903, 0.011785213835537434, -0.005651532672345638, -0.020020753145217896, 0.18218779563903809, 0.03765655308961868, -0.029459165409207344, 0.21666082739830017, -0.11325832456350327, -0.14841438829898834, -0.05044783279299736, -0.138018399477005, 0.04941904544830322, 0.1469121128320694, -0.16557848453521729, 0.1600799709558487, -0.12009146064519882, -0.055653709918260574, 0.06903587281703949, -0.018576236441731453, -0.0365692563354969, -0.03753392770886421, -0.057428229600191116, -0.1810796558856964, -0.04469096660614014, 0.03430075943470001, 0.06213352829217911, 0.14992067217826843, 0.0000057608472161518876, -0.09956897050142288, 0.10511857271194458, -0.07222780585289001, -0.14241880178451538, -0.06602542102336884, 0.028266914188861847, 0.017140818759799004, 0.027223912999033928, -0.004233025014400482, -0.16768574714660645, -0.040106359869241714, 0.05882888287305832, -0.06532540172338486, 0.2401064783334732, 0.08575807511806488, 0.09578597545623779, 0.010498221963644028, -0.07111672312021255, 0.0005497348611243069, 0.08048034459352493, 0.03561973571777344, -0.16582117974758148, -0.06456252187490463, -0.0008965092711150646, -0.09398702532052994, 0.17866002023220062, -0.0106535404920578, 0.03021407499909401, -0.009800313040614128, 0.02955794893205166, -0.05574798956513405, -0.1726139336824417, -0.18741539120674133, -0.08523524552583694, 0.009556550532579422, 0.028048425912857056, -0.08119256049394608, -0.050834715366363525, 0.021724265068769455, 0.03583352267742157, -0.0649275928735733, -0.1775941103696823, 0.1678437888622284, 0.13646146655082703, -0.15989480912685394, -0.04579117149114609, -0.019387615844607353, 0.049479179084300995, -0.1575486660003662, -0.11554636061191559, 0.1280752718448639, -0.03810206428170204, 0.002297717146575451, -0.015495378524065018, -0.03597240522503853, 0.07008326798677444, -0.1585308164358139, 0.03882763907313347, 0.2556634843349457, -0.13622219860553741, -0.07184729725122452, -0.12343496829271317, 0.05031643435359001, -0.0021693839225918055, 0.03706992417573929, -0.1125311404466629, 0.037801630795001984, 0.09791497886180878, 0.00979255884885788, 0.00523806968703866, 0.006796009372919798, -0.11336782574653625, -0.027024749666452408, -0.22759206593036652, 0.14998537302017212, 0.04636812582612038, -0.1518252193927765, -0.019167562946677208, 0.06313800066709518, 0.037343282252550125, 0.13577255606651306, 0.04260996729135513, 0.11447148025035858, -0.023618604987859726, 0.34074947237968445, -0.07028495520353317, 0.1358276754617691, -0.0013694053050130606, 0.09160056710243225, -0.04236028343439102, 0.034596871584653854, 0.05107763037085533, -0.10931272804737091, 0.0036437453236430883, 0.136073499917984, -0.1010332778096199, 0.07120826840400696, 0.0770796537399292, -0.04369201511144638, 0.11194654554128647, 0.16763316094875336, 0.13581979274749756, 0.09411347657442093, -0.041578419506549835, -0.17746476829051971, 0.01713946834206581, -0.21359200775623322, 0.02081402949988842, -0.18853922188282013, -0.13143551349639893, -0.003041196381673217, 0.08308055251836777, 0.07927197962999344, 0.08885517716407776, 0.02192331664264202, -0.019868815317749977, 0.13571693003177643, 0.02798467129468918, 0.027812033891677856, -0.071959488093853, 0.04504285752773285, 0.010148872621357441, -0.13536377251148224, -0.10530029982328415, 0.13696065545082092, 0.04208573326468468, -0.2336958348751068, 0.10580416023731232, -0.21299128234386444, 0.12915730476379395, 0.09200100600719452, 0.20817288756370544, -0.09272320568561554, -0.01905471831560135, -0.012541096657514572, -0.20976723730564117, -0.0070168632082641125, 0.2062978595495224, 0.04866110906004906, -0.07992583513259888, 0.17641307413578033, -0.17001400887966156, -0.18189284205436707, 0.22557926177978516, -0.13421732187271118, 0.04001910984516144, 0.1467183530330658, -0.10440468788146973, 0.16662205755710602, 0.125661239027977, 0.041346628218889236, -0.023925241082906723, 0.1604718118906021, -0.050869088619947433, -0.06877654045820236, -0.031905680894851685, 0.18136942386627197, 0.10210896283388138, 0.09008915722370148, 0.019216259941458702, -0.12107931822538376, -0.013344292528927326, -0.043747127056121826, 0.03305952250957489, -0.17133168876171112, -0.22315676510334015, -0.033601898699998856, -0.018789809197187424, 0.1136934906244278, 0.037933848798274994, -0.09820675849914551, -0.2048206478357315, 0.023749802261590958, -0.02076188661158085, 0.0076900264248251915, 0.02787345089018345, 0.03658246621489525, 0.10453302413225174, 0.019016878679394722, -0.020369522273540497, -0.20183208584785461, 0.027788979932665825, -0.16105492413043976, -0.08158151060342789, -0.1610160917043686, 0.10444437712430954, 0.0307592935860157, 0.015010884031653404, 0.2090153843164444, 0.006878845859318972, -0.0014230330707505345, -0.0369299091398716, 0.0960429310798645, -0.014284160919487476, 0.024354450404644012, -0.006883887108415365, -0.0028479460161179304, 0.23343484103679657, 0.08535876125097275, 0.0525626540184021, -0.1380065381526947, 0.00803242065012455, -0.03220903500914574, 0.018186934292316437, -0.05844489857554436, -0.16339567303657532, 0.04672005772590637, -0.016292976215481758, 0.049389924854040146, 0.1063690185546875, -0.01996154896914959, -0.03872278705239296, 0.1052422821521759, 0.13298967480659485, 0.057545024901628494, 0.07603561878204346, 0.0313953198492527, -0.09595538675785065, 0.14483025670051575, 0.16486254334449768, 0.031193450093269348, -0.14780567586421967, 0.18638662993907928, -0.08250125497579575, -0.04037529602646828, -0.03474759683012962, -0.08480022102594376, -0.03044247440993786, 0.0243756752461195, 0.23250797390937805, -0.06204042211174965, 0.0294993594288826, 0.29302263259887695, -0.029112879186868668, -0.02828148938715458, -0.0007985287229530513, 0.11839360743761063, -0.009263232350349426, 0.04504575952887535, -0.03648194670677185, -0.09595935791730881, -0.12346978485584259, -0.05192595347762108, -0.09016400575637817, 0.1183244064450264, 0.07011933624744415, -0.019858799874782562, 0.031732622534036636, -0.04324209317564964, 0.10778237879276276, 0.13559886813163757, 0.024891730397939682, -0.0474504679441452, 0.017203055322170258, 0.12553977966308594, 0.0036930134519934654, -0.150612011551857, 0.035193122923374176, -0.1372908502817154, -0.00552532309666276, -0.04600180312991142, 0.12062885612249374, 0.0744025781750679, -0.05519908666610718, 0.1476854681968689, 0.06240719184279442, 0.040246523916721344, 0.15519210696220398, 0.04677995294332504, 0.07182447612285614, 0.029294002801179886, 0.3156856894493103, -0.028715115040540695, -0.03221546858549118, 0.04285391420125961, -0.10582780092954636, 0.05542116239666939, -0.10910707712173462, 0.28557178378105164, 0.12346179783344269, -0.0627412423491478, -0.1320824772119522, -0.03174278140068054, 0.08993358910083771, 0.3081076443195343, 0.0591777078807354, -0.02359350584447384, 0.092524953186512, 0.04252582788467407, 0.03879775479435921, -0.05128422752022743, -0.20761588215827942, -0.026460254564881325, 0.17852866649627686, -0.06053755432367325, 0.06788657605648041, 0.08547528833150864, -0.29000088572502136, -0.22651565074920654, 0.11560867726802826, 0.011259910650551319, -0.06744149327278137, -0.05025625228881836, -0.0925590991973877, -0.02167370542883873, 0.026933183893561363, -0.00026745698414742947, -0.061404820531606674, 0.1013031154870987, 0.06259792298078537, -0.05587203428149223, 0.06456445157527924, -0.19287624955177307, 0.163630411028862, -0.03675820305943489, 0.10770419239997864, 0.00711432658135891, 0.18524180352687836, 0.016604121774435043, 0.024305615574121475, -0.06810089945793152, -0.3215320408344269, 0.13463623821735382, -0.17864634096622467, -0.06548498570919037, -0.04810105264186859, 0.029492057859897614, 0.09419893473386765, 0.20892703533172607, 0.050835154950618744, 0.032545942813158035, 0.06383722275495529, -0.035654835402965546, -0.08128143846988678, 0.022500555962324142, -0.11890139430761337, -0.19532066583633423, -0.0702471137046814, 0.08642275631427765, 0.07138847559690475, 0.10711335390806198, 0.035905592143535614, -0.17365355789661407, -0.06225559487938881, 0.11450833827257156, 0.12792938947677612, -0.2074401080608368, -0.06933070719242096, -0.016668645665049553, -0.004700320307165384, -0.014766333624720573, 0.08346974104642868, -0.07751180976629257, -0.0578293576836586, 0.10434164106845856, -0.027316464111208916, 0.0244296882301569, -0.1362554132938385, 0.0016593581531196833, -0.2607896625995636, -0.09730883687734604, -0.09633465111255646, 0.2040165513753891, -0.10488016158342361, 0.0968421921133995, -0.08122461289167404, 0.05261804535984993, 0.00087844452355057, -0.05547623708844185, 0.1272028088569641, -0.049500495195388794, 0.04316406324505806, 0.1320865899324417, -0.11301559209823608, -0.01514577679336071, 0.0729651004076004, 0.09995795786380768, 0.03628374636173248, 0.0402752161026001, 0.19703367352485657, 0.18410974740982056, -0.07999890297651291, 0.032304178923368454, -0.04026335850358009, -0.08622296899557114, -0.1306649148464203, 0.035975344479084015, -0.08859271556138992, -0.029993541538715363, -0.035710424184799194, -0.05627022683620453, -0.008404026739299297, -0.06972434371709824, 0.021199507638812065, 0.1778516322374344, -0.021853739395737648, -0.135330468416214, -0.07338006794452667, 0.012790304608643055, -0.0061281174421310425, -0.028224870562553406, 0.11081323027610779, 0.03617164120078087, 0.03716469556093216, -0.08976005017757416, 0.043691471219062805, -0.03248842433094978, 0.08977796882390976, -0.02378714270889759, -0.14306741952896118, -0.14751394093036652, 0.07262517511844635, -0.17637398838996887, -0.09520130604505539, 0.10877587646245956, 0.10176382958889008, -0.0694676861166954, -0.012503562495112419, 0.0338326171040535, -0.00644310936331749, -0.07607103884220123, 0.09443426132202148, -0.2982153594493866, -0.003819843987002969, 0.08230987191200256, -0.0882973000407219, 0.016031311824917793, -0.06512235850095749, 0.019807860255241394, 0.0831751599907875, -0.1286778748035431, 0.15205511450767517, -0.04125260189175606, 0.13670885562896729, -0.13467338681221008, 0.026103852316737175, 0.11718036234378815, -0.0534178763628006, -0.026833873242139816, -0.09957581758499146, 0.13073515892028809, 0.06261187046766281, -0.015139304101467133, 0.03590894490480423, 0.14058281481266022, 0.21622323989868164, -0.12663331627845764, 0.18237170577049255, -0.1407383531332016, -0.12481643259525299, 0.10230492055416107, -0.018851280212402344, -0.12299162149429321, -0.09062229096889496, 0.04931582883000374, -0.00040474749403074384, -0.018665527924895287, 0.10788138210773468, 0.07394696027040482, 0.005852925591170788, 0.15825869143009186, 0.0777757465839386, 0.13961918652057648, -0.05902782082557678, 0.10306363552808762, 0.1320553421974182, -0.0793977677822113, -0.012994169257581234, 0.1233643963932991, -0.012936623767018318, 0.17127519845962524, 0.05431031808257103, 0.08142095804214478, -0.07327993959188461, -0.00866689346730709, -0.13602465391159058, 0.11490864306688309, -0.09927739202976227, -0.17913152277469635, -0.06290251761674881, 0.032721780240535736, 0.03611738234758377, -0.09602566808462143, -0.12187348306179047, -0.08731395751237869, 0.008987776935100555, -0.03053203597664833, 0.03764259070158005, 0.056113351136446, -0.08542095869779587, -0.2500806450843811, 0.055106062442064285, -0.11738167703151703, -0.050749342888593674, 0.1506098359823227, -0.16711468994617462, 0.08411791175603867, 0.2065340131521225, 0.06666390597820282, -0.09678449481725693, 0.16344453394412994, 0.1686089038848877, 0.032019589096307755, 0.04084938019514084, 0.1826198697090149, -0.06595398485660553, -0.1673302799463272, -0.11302057653665543, 0.0810513123869896, 0.17028996348381042, 0.042117081582546234, -0.11079894751310349, 0.033453620970249176, -0.015837498009204865, 0.10513195395469666, -0.13188160955905914, 0.08278006315231323, -0.006687235552817583, -0.09100087732076645, -0.0532197542488575, -2.6513516059138613e-32, -0.14112091064453125, -0.12337090820074081, 0.028423458337783813, 0.02826831489801407, -0.04913341626524925, -0.10532479733228683, 0.06628686189651489, 0.08196833729743958, -0.2678150236606598, -0.2084200084209442, -0.0351453572511673, 0.16248902678489685, 0.048223353922367096, -0.015160572715103626, -0.04985992982983589, -0.0054327985271811485, -0.09519258141517639, 0.15212340652942657, -0.14161980152130127, 0.005600284785032272, 0.21705269813537598, -0.1326809823513031, 0.11407754570245743, -0.052804313600063324, -0.1487531065940857, 0.09846280515193939, -0.019602196291089058, -0.036689627915620804, -0.22116568684577942, -0.014354955404996872, -0.02103590965270996, -0.05154484137892723, 0.07699507474899292, -0.07843341678380966, -0.015620412304997444, 0.02603098563849926, 0.14552350342273712, -0.18356844782829285, -0.1207670196890831, -0.1230703666806221, -0.10411392897367477, -0.1733667254447937, 0.1800202876329422, -0.04515194892883301, -0.012761342339217663, 0.03760838136076927, 0.014326678588986397, -0.1304023414850235, 0.14374978840351105, 0.09180918335914612, -0.021033089607954025, -0.02037820592522621, -0.19007253646850586, 0.0468420684337616, 0.0275473203510046, -0.251229852437973, -0.12870410084724426, -0.014962569810450077, 0.06195314601063728, 0.1980189085006714, 0.03976435959339142, 0.11491340398788452, -0.04842402786016464, -0.09402869641780853, -0.030441951006650925, -0.004362042993307114, -0.014312688261270523, -0.010501783341169357, 0.14871206879615784, 0.1910838782787323, -0.101544089615345, 0.13727131485939026, 0.0489678680896759, -0.05582910403609276, -0.011121939867734909, -0.038663629442453384, -0.20031365752220154, -0.10759135335683823, -0.0838521420955658, -0.07368186116218567, -0.03275373578071594, -0.012823722325265408, 0.0934644266963005, 0.04625263065099716, -0.09803400188684464, 0.16777406632900238, -0.059194907546043396, 0.03212149813771248, 0.002932068658992648, -0.009970911778509617, -0.21186143159866333, 0.024572838097810745, -0.09674744307994843, 0.022473350167274475, 0.08473017811775208, -0.11095558851957321, -0.010365677997469902, -0.030954131856560707, -0.030968576669692993, -0.026558062061667442, 0.14724761247634888, 0.07925494015216827, 0.10092379152774811, -0.10393489897251129, 0.14538875222206116, -0.007204652763903141, -0.1543983668088913, 0.07374511659145355, -0.1373547911643982, -0.06617052853107452, -0.11024139076471329, -0.058483973145484924, 0.03039957396686077, 0.03574952855706215, 0.03041834570467472, -0.052567895501852036, -0.034913599491119385, -0.04129297658801079, 0.036979805678129196, -0.17131663858890533, -0.1665305346250534, 0.10687067359685898, -0.04861346632242203, -0.057569652795791626, -0.21179360151290894, -0.00032688837382011116, -0.07545153796672821, -0.010768785141408443, -0.06453309208154678, 0.19920262694358826, -0.17577044665813446, 0.018114479258656502, 7.511490593969938e-7, 0.010293832048773766, 0.025017304345965385, 0.04000130668282509, 0.31553366780281067, -0.0982150062918663, 0.05050896108150482, -0.02197885327041149, 0.03228605538606644, -0.013347703032195568, -0.04027003422379494, -0.018577519804239273, -0.2199222296476364, 0.05416984483599663, 0.060457900166511536, 0.03483773395419121, 0.16774120926856995, -0.0037535219453275204, -0.24419762194156647, -0.11773913353681564, 0.020511632785201073, 0.15511482954025269, 0.10659606009721756, 0.1392812430858612, 0.004142616875469685, 0.05898673087358475, -0.10645303130149841, -0.1452767699956894, 0.07418154925107956, 0.18889997899532318, 0.16526372730731964, -0.1735089123249054, -0.01819133758544922, 0.0710320919752121, 0.038600414991378784, -0.11888165026903152, -0.14759056270122528, -0.04582556337118149, -0.013456548564136028, -0.0006327972514554858, 0.014759078621864319, 0.030574707314372063, -0.08733080327510834, 0.09398911893367767, -0.07382923364639282, -0.01763072796165943, 0.10034459084272385, -0.07489185035228729, 0.051921285688877106, -0.06140550971031189, -0.027250247076153755, 0.009852658957242966, 0.0772026851773262, 0.16715730726718903, 0.10084860026836395, -0.11170201748609543, 0.14879794418811798, -0.05983130633831024, -0.0412275567650795, 0.012190856039524078, -0.11361183226108551, 0.06724183261394501, -0.1030678078532219, 0.12772125005722046, 0.010130798444151878, 0.06139294430613518, -0.09035765379667282, -0.030380673706531525, 2.0400718233845223e-34, 0.0133387241512537, -0.030190978199243546, 0.12161912769079208, 0.059931620955467224, 0.0027617947198450565, 0.04603302851319313, -0.07957800477743149, -0.1025838553905487, 0.01364255789667368, -0.028389735147356987, -0.11920531839132309 ]
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.11883822828531265, 0.16306379437446594, -0.1083887591958046, -0.001332283136434853, -0.08068305999040604, -0.019639287143945694, 0.09920649975538254, 0.2937559187412262, -0.16615261137485504, -0.133849635720253, -0.1209469735622406, 0.11728517711162567, -0.09816189855337143, 0.0810495913028717, -0.06285826116800308, -0.23150232434272766, -0.0381409116089344, -0.025896195322275162, 0.05988885834813118, 0.11049521714448929, -0.08881425857543945, -0.10119785368442535, 0.13778339326381683, -0.16025657951831818, -0.005690921563655138, -0.10142558068037033, -0.14522352814674377, 0.031842779368162155, 0.015236818231642246, -0.1379425823688507, 0.04617726430296898, 0.20017901062965393, -0.06095150113105774, 0.20791660249233246, 0.000005690186299034394, -0.028230983763933182, -0.08265750110149384, 0.05904816463589668, -0.011004110798239708, 0.25812751054763794, 0.30795276165008545, -0.11764455586671829, -0.01749098300933838, 0.08950190246105194, -0.08168687671422958, -0.013317767530679703, -0.1187252476811409, -0.004642309155315161, -0.04767441004514694, 0.04709259420633316, 0.016705289483070374, 0.10467980802059174, -0.07876234501600266, -0.05964488908648491, 0.03383680060505867, 0.14280150830745697, -0.16255450248718262, 0.027372825890779495, 0.1039399728178978, -0.016987062990665436, -0.06442239135503769, 0.04627646505832672, 0.05510058254003525, -0.11506824195384979, 0.10739481449127197, 0.11887188255786896, -0.25162404775619507, 0.0558130219578743, 0.11302885413169861, 0.10207601636648178, -0.14782176911830902, -0.09732267260551453, -0.14595451951026917, -0.018687935546040535, -0.06267787516117096, -0.21370916068553925, -0.12104778736829758, 0.07260260730981827, -0.08625916391611099, 0.008218453265726566, -0.0757700502872467, 0.08034807443618774, 0.04058659449219704, -0.07390021532773972, -0.23531484603881836, 0.016051223501563072, 0.2067103534936905, -0.07264702767133713, 0.13996171951293945, 0.08822683244943619, 0.21892794966697693, -0.11988377571105957, 0.00927069503813982, 0.025499247014522552, -0.20803864300251007, -0.07671790570020676, -0.16782206296920776, -0.135110542178154, -0.05779460817575455, -0.08279649168252945, 0.059098225086927414, 0.2626301646232605, -0.06669386476278305, -0.06701944768428802, -0.23467373847961426, -0.02419922687113285, -0.1312120258808136, -0.174810990691185, -0.07673633843660355, -0.00998618733137846, 0.1970105618238449, 0.09643664956092834, -0.11914364248514175, -0.07300101220607758, -0.1194596216082573, -0.006627651862800121, -0.05461837723851204, 0.06399892270565033, 0.05394270643591881, -0.06948944926261902, 0.07713863998651505, 0.12451167404651642, -0.11948752403259277, 0.04282219707965851, -0.05381803214550018, 0.1393357515335083, -0.012257545255124569, -0.09724906831979752, -0.08342595398426056, -0.025141078978776932, 0.06373770534992218, 0.040348269045352936, 0.10759232938289642, -0.06028914451599121, 0.02534639462828636, 0.022555820643901825, -0.07445227354764938, -0.11207214742898941, -0.025612905621528625, 0.09823004901409149, 0.01038079708814621, 0.021650172770023346, 0.22766606509685516, -0.016398504376411438, -0.010942687280476093, 0.03301875293254852, 0.007432373706251383, 0.3170333206653595, -0.1579727828502655, -0.0006033303798176348, 0.08601102232933044, 0.09297700226306915, -0.2278481423854828, -0.01801919937133789, -0.006680417340248823, -0.026498813182115555, 0.07648016512393951, -0.21290601789951324, -0.03064901940524578, 0.025889001786708832, 0.05582715570926666, -0.2380698323249817, 0.008179555647075176, 0.037750404328107834, 0.04152938351035118, 0.10737056285142899, 0.020877743139863014, 0.11759082227945328, 0.1721089780330658, 0.21474780142307281, 0.3142072558403015, 0.109914131462574, -0.08629069477319717, -0.019980713725090027, 0.12379482388496399, -0.019698025658726692, -0.02217750810086727, -0.10348810255527496, -0.024150101467967033, 0.02279600128531456, 0.02294481359422207, 0.1378050297498703, -0.014458704739809036, 0.03803001344203949, 0.31501340866088867, 0.09803534299135208, 0.21799418330192566, 0.04480806738138199, -0.06425708532333374, -0.03007296472787857, 0.001535835792310536, -0.14465849101543427, 0.1273719221353531, -0.015776271000504494, -0.011183330789208412, -0.15786592662334442, -0.15543097257614136, -0.05131829157471657, 0.18436263501644135, -0.25981229543685913, -0.03596219792962074, -0.027921484783291817, -0.14083126187324524, 0.06640544533729553, -0.0958324521780014, 0.11686520278453827, -0.14375731348991394, 0.0523659810423851, -0.0915028378367424, 0.010479683987796307, -0.11909182369709015, -0.04614997282624245, 0.11514025181531906, -0.05269905924797058, -0.03634972497820854, -0.13591423630714417, -0.029305540025234222, 0.03728073090314865, -0.1830618679523468, -0.09600164741277695, 0.08161363750696182, 0.22747813165187836, 0.01944044977426529, 0.03833679109811783, 0.013650807552039623, -0.016284257173538208, 0.1025657206773758, 0.04087549448013306, 0.05686068907380104, 0.09200839698314667, -0.057894267141819, -0.08596408367156982, 0.14834903180599213, -0.17141102254390717, -0.06982573866844177, 0.018308328464627266, 0.002095078583806753, -0.2244603931903839, 0.10701648145914078, 0.041851069778203964, -0.02074182592332363, -0.06231636554002762, -0.08071725070476532, -0.08928461372852325, -0.09943633526563644, -0.026111464947462082, 0.1656862199306488, 0.11544785648584366, -0.09951584786176682, 0.04418021813035011, -0.019908159971237183, -0.0026318395975977182, 0.1071360781788826, 0.14400021731853485, 0.12168461829423904, 0.021106040105223656, 0.056908681988716125, 0.07414524257183075, -0.07450494915246964, 0.11477231979370117, -0.03821595758199692, 0.008227991871535778, -0.12383369356393814, 0.15080668032169342, 0.08701453357934952, -0.09923573583364487, 0.14925383031368256, -0.31942376494407654, 0.03270987793803215, -0.06788767874240875, 0.10020282864570618, 0.1488596796989441, 0.061490174382925034, -0.015815675258636475, -0.06739553809165955, -0.1093866154551506, -0.10826199501752853, 0.04474368318915367, 0.07238730043172836, 0.08452441543340683, -0.047157395631074905, -0.033911753445863724, 0.0632767304778099, 0.030927591025829315, 0.07933471351861954, -0.040351707488298416, -0.161393940448761, 0.10122688114643097, -0.11063645035028458, -0.00774203659966588, 0.04062995687127113, -0.13008517026901245, 0.10593481361865997, -0.03869682177901268, 0.0002652212278917432, 0.13908754289150238, 0.16645199060440063, 0.14507612586021423, -0.05422527715563774, -0.13134460151195526, -0.04888258874416351, 0.10111977905035019, 0.04707079753279686, 0.010677219368517399, 0.08880917727947235, 0.047995757311582565, 0.02254774235188961, -0.03805701807141304, -0.09540624171495438, -0.036482032388448715, 0.04662146419286728, -0.02097558230161667, -0.045252326875925064, -0.24623219668865204, -0.000853062083479017, -0.013833596371114254, -0.035698022693395615, -0.14603722095489502, -0.001383613795042038, 0.04314323142170906, 0.10387943685054779, -0.07165595889091492, -0.11833768337965012, -0.13272923231124878, -0.08002393692731857, -0.002130871871486306, -0.09447835385799408, -0.06572792679071426, -0.1801357865333557, 0.08546368032693863, -0.032861173152923584, 0.0029676815029233694, -0.06281700730323792, -0.04819406569004059, 0.09103383868932724, -0.07226306200027466, -0.010125681757926941, -0.1350266933441162, 0.22623193264007568, 0.09599015861749649, -0.19161875545978546, -0.11790703982114792, -0.0712648406624794, 0.041975412517786026, 0.15071770548820496, -0.10718566179275513, 0.06550222635269165, -0.16642116010189056, 0.03901198133826256, -0.007569864392280579, -0.012703496031463146, 0.14562690258026123, -0.04066553711891174, -0.08546952903270721, 0.029598034918308258, 0.1775760054588318, -0.2537045180797577, -0.14448846876621246, 0.047839824110269547, -0.1119556650519371, -0.11610018461942673, 0.16148990392684937, 0.18774962425231934, -0.05892620608210564, -0.24157880246639252, -0.1526496559381485, 0.006040741689503193, -0.016398370265960693, -0.21405759453773499, -0.08452031016349792, 0.02783329226076603, -0.11109238862991333, 0.06167428568005562, 0.306680828332901, 0.014125844463706017, -0.005087526049464941, 0.1138705164194107, -0.06754004955291748, 0.15844641625881195, 0.02259805053472519, 0.21759560704231262, -0.13619743287563324, -0.0599103607237339, -0.059196460992097855, 0.11996845155954361, -0.04031473398208618, -0.036428891122341156, 0.0336885079741478, -0.18482446670532227, -0.01908804662525654, -0.06094813346862793, 0.16912613809108734, -0.04593990370631218, -0.09327084571123123, -0.03413528949022293, 0.01760927215218544, 0.15331505239009857, 0.08581989258527756, 0.049274396151304245, 0.20256800949573517, 0.18500955402851105, 0.03457510098814964, 0.016907671466469765, -0.12096162885427475, 0.039171136915683746, -0.17014388740062714, 0.012031057849526405, 0.029928022995591164, 0.059064384549856186, 0.004489374812692404, 0.06439661234617233, 0.20744812488555908, -0.04721708595752716, -0.17150837182998657, 0.14170166850090027, 0.028625208884477615, -0.03685656189918518, 0.04992753267288208, 0.16885273158550262, -0.14576970040798187, -0.05057321488857269, -0.17456163465976715, 0.057020366191864014, -0.05232900008559227, 0.10654284805059433, -0.08018732070922852, -0.04715650901198387, 0.07986880093812943, 0.10845238715410233, 0.1098048985004425, 0.02456674724817276, 0.21681563556194305, -0.05872057005763054, 0.10424735397100449, 0.11649191379547119, -0.019547300413250923, 0.026735935360193253, -0.07979077845811844, -0.05223144218325615, 0.05927479267120361, -0.12318804115056992, -0.04789566993713379, 0.3197777569293976, -0.010963221080601215, 0.004752787761390209, -0.20069314539432526, -0.05326935276389122, 0.06700316816568375, -0.059151068329811096, -0.058927021920681, -0.18320448696613312, -0.14381414651870728, -0.164193794131279, -0.15023359656333923, 0.1566782146692276, 0.08643178641796112, -0.033660467714071274, -0.21268533170223236, 0.000941713631618768, 0.05836385488510132, 0.09756821393966675, -0.03704777732491493, 0.03562270849943161, 0.13659749925136566, -0.049640171229839325, -0.007165150251239538, 0.011651230044662952, -0.22804208099842072, 0.18088750541210175, -0.08428800106048584, -0.06352529674768448, -0.0020119412802159786, 0.08089140057563782, 0.0655423179268837, -0.00832749716937542, 0.03806781396269798, 0.09370806068181992, 0.03734217584133148, -0.06571966409683228, 0.03938763588666916, 0.09520935267210007, 0.10320558398962021, -0.1257425993680954, -0.1216907948255539, 0.11396659165620804, 0.09139472991228104, -0.14080944657325745, -0.018120665103197098, -0.15175774693489075, 0.02774379774928093, 0.008988110348582268, 0.09948159754276276, -0.11343388259410858, 0.000028701804694719613, 0.18482458591461182, -0.06787512451410294, -0.1783338040113449, 0.027134189382195473, -0.0461580716073513, -0.09338925033807755, -0.02375025860965252, -0.010982650332152843, 0.08713268488645554, 0.07791897654533386, 0.14204300940036774, 0.03598795086145401, -0.062363091856241226, -0.05498922988772392, 0.10940346121788025, 0.0912942886352539, 0.034015677869319916, 0.022942475974559784, -0.0029224036261439323, -0.12866151332855225, 0.048069607466459274, 0.22661514580249786, 0.0058241537772119045, 0.015599790029227734, -0.12392554432153702, 0.03914396092295647, -0.010733443312346935, 0.002152608474716544, 0.10683254897594452, 0.13827936351299286, 0.12935058772563934, 0.05133403465151787, -0.07119912654161453, -0.15030330419540405, 0.040063418447971344, 0.11253884434700012, 0.032886624336242676, 0.08421388268470764, 0.2670772075653076, -0.0492391400039196, -0.17231838405132294, 0.0783260241150856, 0.13097409904003143, 0.013949624262750149, -0.11578965932130814, -0.06696983426809311, 0.06658989191055298, -0.167466938495636, -0.07341371476650238, 0.1879834234714508, -0.02855263650417328, -0.1793215572834015, 0.06951646506786346, -0.05668727681040764, -0.033123619854450226, -0.04899625852704048, 0.09254173934459686, 0.0802173763513565, 0.05021306872367859, -0.13440434634685516, 0.06311117112636566, -2.634349255623568e-32, -0.14567254483699799, 0.10958664864301682, 0.022403355687856674, -0.027079304680228233, 0.0019842886831611395, -0.020343760028481483, -0.04752274602651596, -0.14969870448112488, 0.04701082035899162, -0.0029860008507966995, -0.13698872923851013, 0.017674820497632027, 0.033175334334373474, -0.009995604865252972, 0.03555327653884888, 0.03868730366230011, 0.29156091809272766, -0.08755695819854736, -0.2332383096218109, 0.0849398821592331, 0.14701233804225922, 0.225900337100029, 0.06894829124212265, 0.0992051437497139, -0.15019188821315765, 0.10571347177028656, 0.013328658416867256, 0.0285396259278059, 0.04314783215522766, -0.08388643711805344, -0.12094298750162125, -0.0007217046222649515, -0.12121447920799255, 0.013941756449639797, -0.08199018985033035, 0.04392873868346214, -0.14110954105854034, -0.02185039594769478, 0.025636976584792137, 0.10579648613929749, -0.029918724671006203, -0.13221918046474457, 0.0758875384926796, 0.016011936590075493, -0.07294770330190659, 0.05316255986690521, -0.07177091389894485, -0.04869323968887329, -0.07021074742078781, -0.15228530764579773, -0.23572885990142822, 0.12069105356931686, -0.0007068831473588943, 0.11619844287633896, 0.0757455974817276, -0.04487856850028038, 0.1113806664943695, 0.005164533853530884, -0.17002750933170319, -0.09718786925077438, 0.12450852990150452, 0.22239191830158234, 0.03934326767921448, 0.02501058578491211, -0.06359022855758667, -0.03906940296292305, 0.22727680206298828, 0.0901135727763176, 0.2884526252746582, 0.16501976549625397, 0.1680814027786255, -0.053666647523641586, 0.02375086024403572, -0.11250550299882889, -0.020109811797738075, 0.0397823303937912, -0.132205069065094, 0.13786277174949646, 0.12929128110408783, -0.08362245559692383, -0.164950892329216, 0.1576361209154129, 0.10818986594676971, 0.06146269664168358, 0.04000743851065636, 0.22563536465168, 0.08067145943641663, 0.06219927966594696, -0.09028305113315582, -0.03653227910399437, -0.15653109550476074, 0.03211839497089386, 0.20697662234306335, -0.08983630686998367, 0.05625096708536148, 0.05455663427710533, -0.08139705657958984, 0.08358053117990494, -0.1515149474143982, -0.10490600764751434, -0.04438750818371773, -0.04274289682507515, -0.0005932293133810163, -0.06100614741444588, 0.22077585756778717, -0.11964307725429535, 0.04748415946960449, 0.08293520659208298, -0.32652661204338074, -0.008674335666000843, 0.033676933497190475, -0.06357257813215256, 0.1480514258146286, 0.028104186058044434, 0.09964101761579514, 0.045360539108514786, 0.027188554406166077, 0.0758574828505516, 0.07875875383615494, 0.037971366196870804, -0.0341067872941494, -0.08728684484958649, 0.13386644423007965, -0.13725018501281738, -0.09154471755027771, -0.07394642382860184, -0.05232315883040428, 0.009060048498213291, -0.048064082860946655, -0.03639025613665581, -0.17919586598873138, 0.00636901194229722, 6.985127356529119e-7, 0.0559762679040432, 0.1500197947025299, 0.09943659603595734, -0.044151365756988525, -0.020518559962511063, 0.14983680844306946, 0.05565166845917702, 0.0324261449277401, -0.04938717931509018, 0.021231932565569878, 0.07271839678287506, -0.0685974508523941, 0.019101634621620178, 0.012218020856380463, 0.09487083554267883, -0.2161211520433426, 0.010661231353878975, -0.06971488893032074, -0.1880747526884079, 0.052158620208501816, 0.0243685245513916, 0.27122530341148376, -0.06097225844860077, -0.1791486144065857, 0.2627328038215637, 0.057548169046640396, -0.014274529181420803, -0.00029395302408374846, -0.04185447469353676, 0.06571102887392044, 0.11151216924190521, -0.06645311415195465, -0.24488112330436707, 0.06893810629844666, -0.11519978940486908, -0.044504258781671524, -0.19075369834899902, 0.11768924444913864, 0.15984749794006348, 0.15780115127563477, 0.03177301585674286, -0.02282915636897087, 0.024139784276485443, -0.16595372557640076, 0.014781294390559196, 0.1941472440958023, 0.020130785182118416, 0.11852403730154037, -0.06380180269479752, -0.05491466820240021, -0.05736317113041878, 0.06758308410644531, -0.031128689646720886, 0.1988278478384018, 0.038816310465335846, -0.0792609229683876, -0.1438027024269104, -0.15787923336029053, -0.0308604147285223, -0.04333774372935295, -0.040175240486860275, -0.06916093826293945, -0.09768238663673401, 0.0856141671538353, 0.23418259620666504, -0.049798984080553055, -0.08235353231430054, 2.763623952981661e-34, -0.008120251819491386, 0.08617989718914032, 0.14236699044704437, 0.10515589267015457, 0.08724866062402725, -0.05931452661752701, 0.020904183387756348, 0.008697597309947014, 0.06991482526063919, -0.2999711334705353, -0.16076892614364624 ]
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.11883822828531265, 0.16306379437446594, -0.1083887591958046, -0.001332283136434853, -0.08068305999040604, -0.019639287143945694, 0.09920649975538254, 0.2937559187412262, -0.16615261137485504, -0.133849635720253, -0.1209469735622406, 0.11728517711162567, -0.09816189855337143, 0.0810495913028717, -0.06285826116800308, -0.23150232434272766, -0.0381409116089344, -0.025896195322275162, 0.05988885834813118, 0.11049521714448929, -0.08881425857543945, -0.10119785368442535, 0.13778339326381683, -0.16025657951831818, -0.005690921563655138, -0.10142558068037033, -0.14522352814674377, 0.031842779368162155, 0.015236818231642246, -0.1379425823688507, 0.04617726430296898, 0.20017901062965393, -0.06095150113105774, 0.20791660249233246, 0.000005690186299034394, -0.028230983763933182, -0.08265750110149384, 0.05904816463589668, -0.011004110798239708, 0.25812751054763794, 0.30795276165008545, -0.11764455586671829, -0.01749098300933838, 0.08950190246105194, -0.08168687671422958, -0.013317767530679703, -0.1187252476811409, -0.004642309155315161, -0.04767441004514694, 0.04709259420633316, 0.016705289483070374, 0.10467980802059174, -0.07876234501600266, -0.05964488908648491, 0.03383680060505867, 0.14280150830745697, -0.16255450248718262, 0.027372825890779495, 0.1039399728178978, -0.016987062990665436, -0.06442239135503769, 0.04627646505832672, 0.05510058254003525, -0.11506824195384979, 0.10739481449127197, 0.11887188255786896, -0.25162404775619507, 0.0558130219578743, 0.11302885413169861, 0.10207601636648178, -0.14782176911830902, -0.09732267260551453, -0.14595451951026917, -0.018687935546040535, -0.06267787516117096, -0.21370916068553925, -0.12104778736829758, 0.07260260730981827, -0.08625916391611099, 0.008218453265726566, -0.0757700502872467, 0.08034807443618774, 0.04058659449219704, -0.07390021532773972, -0.23531484603881836, 0.016051223501563072, 0.2067103534936905, -0.07264702767133713, 0.13996171951293945, 0.08822683244943619, 0.21892794966697693, -0.11988377571105957, 0.00927069503813982, 0.025499247014522552, -0.20803864300251007, -0.07671790570020676, -0.16782206296920776, -0.135110542178154, -0.05779460817575455, -0.08279649168252945, 0.059098225086927414, 0.2626301646232605, -0.06669386476278305, -0.06701944768428802, -0.23467373847961426, -0.02419922687113285, -0.1312120258808136, -0.174810990691185, -0.07673633843660355, -0.00998618733137846, 0.1970105618238449, 0.09643664956092834, -0.11914364248514175, -0.07300101220607758, -0.1194596216082573, -0.006627651862800121, -0.05461837723851204, 0.06399892270565033, 0.05394270643591881, -0.06948944926261902, 0.07713863998651505, 0.12451167404651642, -0.11948752403259277, 0.04282219707965851, -0.05381803214550018, 0.1393357515335083, -0.012257545255124569, -0.09724906831979752, -0.08342595398426056, -0.025141078978776932, 0.06373770534992218, 0.040348269045352936, 0.10759232938289642, -0.06028914451599121, 0.02534639462828636, 0.022555820643901825, -0.07445227354764938, -0.11207214742898941, -0.025612905621528625, 0.09823004901409149, 0.01038079708814621, 0.021650172770023346, 0.22766606509685516, -0.016398504376411438, -0.010942687280476093, 0.03301875293254852, 0.007432373706251383, 0.3170333206653595, -0.1579727828502655, -0.0006033303798176348, 0.08601102232933044, 0.09297700226306915, -0.2278481423854828, -0.01801919937133789, -0.006680417340248823, -0.026498813182115555, 0.07648016512393951, -0.21290601789951324, -0.03064901940524578, 0.025889001786708832, 0.05582715570926666, -0.2380698323249817, 0.008179555647075176, 0.037750404328107834, 0.04152938351035118, 0.10737056285142899, 0.020877743139863014, 0.11759082227945328, 0.1721089780330658, 0.21474780142307281, 0.3142072558403015, 0.109914131462574, -0.08629069477319717, -0.019980713725090027, 0.12379482388496399, -0.019698025658726692, -0.02217750810086727, -0.10348810255527496, -0.024150101467967033, 0.02279600128531456, 0.02294481359422207, 0.1378050297498703, -0.014458704739809036, 0.03803001344203949, 0.31501340866088867, 0.09803534299135208, 0.21799418330192566, 0.04480806738138199, -0.06425708532333374, -0.03007296472787857, 0.001535835792310536, -0.14465849101543427, 0.1273719221353531, -0.015776271000504494, -0.011183330789208412, -0.15786592662334442, -0.15543097257614136, -0.05131829157471657, 0.18436263501644135, -0.25981229543685913, -0.03596219792962074, -0.027921484783291817, -0.14083126187324524, 0.06640544533729553, -0.0958324521780014, 0.11686520278453827, -0.14375731348991394, 0.0523659810423851, -0.0915028378367424, 0.010479683987796307, -0.11909182369709015, -0.04614997282624245, 0.11514025181531906, -0.05269905924797058, -0.03634972497820854, -0.13591423630714417, -0.029305540025234222, 0.03728073090314865, -0.1830618679523468, -0.09600164741277695, 0.08161363750696182, 0.22747813165187836, 0.01944044977426529, 0.03833679109811783, 0.013650807552039623, -0.016284257173538208, 0.1025657206773758, 0.04087549448013306, 0.05686068907380104, 0.09200839698314667, -0.057894267141819, -0.08596408367156982, 0.14834903180599213, -0.17141102254390717, -0.06982573866844177, 0.018308328464627266, 0.002095078583806753, -0.2244603931903839, 0.10701648145914078, 0.041851069778203964, -0.02074182592332363, -0.06231636554002762, -0.08071725070476532, -0.08928461372852325, -0.09943633526563644, -0.026111464947462082, 0.1656862199306488, 0.11544785648584366, -0.09951584786176682, 0.04418021813035011, -0.019908159971237183, -0.0026318395975977182, 0.1071360781788826, 0.14400021731853485, 0.12168461829423904, 0.021106040105223656, 0.056908681988716125, 0.07414524257183075, -0.07450494915246964, 0.11477231979370117, -0.03821595758199692, 0.008227991871535778, -0.12383369356393814, 0.15080668032169342, 0.08701453357934952, -0.09923573583364487, 0.14925383031368256, -0.31942376494407654, 0.03270987793803215, -0.06788767874240875, 0.10020282864570618, 0.1488596796989441, 0.061490174382925034, -0.015815675258636475, -0.06739553809165955, -0.1093866154551506, -0.10826199501752853, 0.04474368318915367, 0.07238730043172836, 0.08452441543340683, -0.047157395631074905, -0.033911753445863724, 0.0632767304778099, 0.030927591025829315, 0.07933471351861954, -0.040351707488298416, -0.161393940448761, 0.10122688114643097, -0.11063645035028458, -0.00774203659966588, 0.04062995687127113, -0.13008517026901245, 0.10593481361865997, -0.03869682177901268, 0.0002652212278917432, 0.13908754289150238, 0.16645199060440063, 0.14507612586021423, -0.05422527715563774, -0.13134460151195526, -0.04888258874416351, 0.10111977905035019, 0.04707079753279686, 0.010677219368517399, 0.08880917727947235, 0.047995757311582565, 0.02254774235188961, -0.03805701807141304, -0.09540624171495438, -0.036482032388448715, 0.04662146419286728, -0.02097558230161667, -0.045252326875925064, -0.24623219668865204, -0.000853062083479017, -0.013833596371114254, -0.035698022693395615, -0.14603722095489502, -0.001383613795042038, 0.04314323142170906, 0.10387943685054779, -0.07165595889091492, -0.11833768337965012, -0.13272923231124878, -0.08002393692731857, -0.002130871871486306, -0.09447835385799408, -0.06572792679071426, -0.1801357865333557, 0.08546368032693863, -0.032861173152923584, 0.0029676815029233694, -0.06281700730323792, -0.04819406569004059, 0.09103383868932724, -0.07226306200027466, -0.010125681757926941, -0.1350266933441162, 0.22623193264007568, 0.09599015861749649, -0.19161875545978546, -0.11790703982114792, -0.0712648406624794, 0.041975412517786026, 0.15071770548820496, -0.10718566179275513, 0.06550222635269165, -0.16642116010189056, 0.03901198133826256, -0.007569864392280579, -0.012703496031463146, 0.14562690258026123, -0.04066553711891174, -0.08546952903270721, 0.029598034918308258, 0.1775760054588318, -0.2537045180797577, -0.14448846876621246, 0.047839824110269547, -0.1119556650519371, -0.11610018461942673, 0.16148990392684937, 0.18774962425231934, -0.05892620608210564, -0.24157880246639252, -0.1526496559381485, 0.006040741689503193, -0.016398370265960693, -0.21405759453773499, -0.08452031016349792, 0.02783329226076603, -0.11109238862991333, 0.06167428568005562, 0.306680828332901, 0.014125844463706017, -0.005087526049464941, 0.1138705164194107, -0.06754004955291748, 0.15844641625881195, 0.02259805053472519, 0.21759560704231262, -0.13619743287563324, -0.0599103607237339, -0.059196460992097855, 0.11996845155954361, -0.04031473398208618, -0.036428891122341156, 0.0336885079741478, -0.18482446670532227, -0.01908804662525654, -0.06094813346862793, 0.16912613809108734, -0.04593990370631218, -0.09327084571123123, -0.03413528949022293, 0.01760927215218544, 0.15331505239009857, 0.08581989258527756, 0.049274396151304245, 0.20256800949573517, 0.18500955402851105, 0.03457510098814964, 0.016907671466469765, -0.12096162885427475, 0.039171136915683746, -0.17014388740062714, 0.012031057849526405, 0.029928022995591164, 0.059064384549856186, 0.004489374812692404, 0.06439661234617233, 0.20744812488555908, -0.04721708595752716, -0.17150837182998657, 0.14170166850090027, 0.028625208884477615, -0.03685656189918518, 0.04992753267288208, 0.16885273158550262, -0.14576970040798187, -0.05057321488857269, -0.17456163465976715, 0.057020366191864014, -0.05232900008559227, 0.10654284805059433, -0.08018732070922852, -0.04715650901198387, 0.07986880093812943, 0.10845238715410233, 0.1098048985004425, 0.02456674724817276, 0.21681563556194305, -0.05872057005763054, 0.10424735397100449, 0.11649191379547119, -0.019547300413250923, 0.026735935360193253, -0.07979077845811844, -0.05223144218325615, 0.05927479267120361, -0.12318804115056992, -0.04789566993713379, 0.3197777569293976, -0.010963221080601215, 0.004752787761390209, -0.20069314539432526, -0.05326935276389122, 0.06700316816568375, -0.059151068329811096, -0.058927021920681, -0.18320448696613312, -0.14381414651870728, -0.164193794131279, -0.15023359656333923, 0.1566782146692276, 0.08643178641796112, -0.033660467714071274, -0.21268533170223236, 0.000941713631618768, 0.05836385488510132, 0.09756821393966675, -0.03704777732491493, 0.03562270849943161, 0.13659749925136566, -0.049640171229839325, -0.007165150251239538, 0.011651230044662952, -0.22804208099842072, 0.18088750541210175, -0.08428800106048584, -0.06352529674768448, -0.0020119412802159786, 0.08089140057563782, 0.0655423179268837, -0.00832749716937542, 0.03806781396269798, 0.09370806068181992, 0.03734217584133148, -0.06571966409683228, 0.03938763588666916, 0.09520935267210007, 0.10320558398962021, -0.1257425993680954, -0.1216907948255539, 0.11396659165620804, 0.09139472991228104, -0.14080944657325745, -0.018120665103197098, -0.15175774693489075, 0.02774379774928093, 0.008988110348582268, 0.09948159754276276, -0.11343388259410858, 0.000028701804694719613, 0.18482458591461182, -0.06787512451410294, -0.1783338040113449, 0.027134189382195473, -0.0461580716073513, -0.09338925033807755, -0.02375025860965252, -0.010982650332152843, 0.08713268488645554, 0.07791897654533386, 0.14204300940036774, 0.03598795086145401, -0.062363091856241226, -0.05498922988772392, 0.10940346121788025, 0.0912942886352539, 0.034015677869319916, 0.022942475974559784, -0.0029224036261439323, -0.12866151332855225, 0.048069607466459274, 0.22661514580249786, 0.0058241537772119045, 0.015599790029227734, -0.12392554432153702, 0.03914396092295647, -0.010733443312346935, 0.002152608474716544, 0.10683254897594452, 0.13827936351299286, 0.12935058772563934, 0.05133403465151787, -0.07119912654161453, -0.15030330419540405, 0.040063418447971344, 0.11253884434700012, 0.032886624336242676, 0.08421388268470764, 0.2670772075653076, -0.0492391400039196, -0.17231838405132294, 0.0783260241150856, 0.13097409904003143, 0.013949624262750149, -0.11578965932130814, -0.06696983426809311, 0.06658989191055298, -0.167466938495636, -0.07341371476650238, 0.1879834234714508, -0.02855263650417328, -0.1793215572834015, 0.06951646506786346, -0.05668727681040764, -0.033123619854450226, -0.04899625852704048, 0.09254173934459686, 0.0802173763513565, 0.05021306872367859, -0.13440434634685516, 0.06311117112636566, -2.634349255623568e-32, -0.14567254483699799, 0.10958664864301682, 0.022403355687856674, -0.027079304680228233, 0.0019842886831611395, -0.020343760028481483, -0.04752274602651596, -0.14969870448112488, 0.04701082035899162, -0.0029860008507966995, -0.13698872923851013, 0.017674820497632027, 0.033175334334373474, -0.009995604865252972, 0.03555327653884888, 0.03868730366230011, 0.29156091809272766, -0.08755695819854736, -0.2332383096218109, 0.0849398821592331, 0.14701233804225922, 0.225900337100029, 0.06894829124212265, 0.0992051437497139, -0.15019188821315765, 0.10571347177028656, 0.013328658416867256, 0.0285396259278059, 0.04314783215522766, -0.08388643711805344, -0.12094298750162125, -0.0007217046222649515, -0.12121447920799255, 0.013941756449639797, -0.08199018985033035, 0.04392873868346214, -0.14110954105854034, -0.02185039594769478, 0.025636976584792137, 0.10579648613929749, -0.029918724671006203, -0.13221918046474457, 0.0758875384926796, 0.016011936590075493, -0.07294770330190659, 0.05316255986690521, -0.07177091389894485, -0.04869323968887329, -0.07021074742078781, -0.15228530764579773, -0.23572885990142822, 0.12069105356931686, -0.0007068831473588943, 0.11619844287633896, 0.0757455974817276, -0.04487856850028038, 0.1113806664943695, 0.005164533853530884, -0.17002750933170319, -0.09718786925077438, 0.12450852990150452, 0.22239191830158234, 0.03934326767921448, 0.02501058578491211, -0.06359022855758667, -0.03906940296292305, 0.22727680206298828, 0.0901135727763176, 0.2884526252746582, 0.16501976549625397, 0.1680814027786255, -0.053666647523641586, 0.02375086024403572, -0.11250550299882889, -0.020109811797738075, 0.0397823303937912, -0.132205069065094, 0.13786277174949646, 0.12929128110408783, -0.08362245559692383, -0.164950892329216, 0.1576361209154129, 0.10818986594676971, 0.06146269664168358, 0.04000743851065636, 0.22563536465168, 0.08067145943641663, 0.06219927966594696, -0.09028305113315582, -0.03653227910399437, -0.15653109550476074, 0.03211839497089386, 0.20697662234306335, -0.08983630686998367, 0.05625096708536148, 0.05455663427710533, -0.08139705657958984, 0.08358053117990494, -0.1515149474143982, -0.10490600764751434, -0.04438750818371773, -0.04274289682507515, -0.0005932293133810163, -0.06100614741444588, 0.22077585756778717, -0.11964307725429535, 0.04748415946960449, 0.08293520659208298, -0.32652661204338074, -0.008674335666000843, 0.033676933497190475, -0.06357257813215256, 0.1480514258146286, 0.028104186058044434, 0.09964101761579514, 0.045360539108514786, 0.027188554406166077, 0.0758574828505516, 0.07875875383615494, 0.037971366196870804, -0.0341067872941494, -0.08728684484958649, 0.13386644423007965, -0.13725018501281738, -0.09154471755027771, -0.07394642382860184, -0.05232315883040428, 0.009060048498213291, -0.048064082860946655, -0.03639025613665581, -0.17919586598873138, 0.00636901194229722, 6.985127356529119e-7, 0.0559762679040432, 0.1500197947025299, 0.09943659603595734, -0.044151365756988525, -0.020518559962511063, 0.14983680844306946, 0.05565166845917702, 0.0324261449277401, -0.04938717931509018, 0.021231932565569878, 0.07271839678287506, -0.0685974508523941, 0.019101634621620178, 0.012218020856380463, 0.09487083554267883, -0.2161211520433426, 0.010661231353878975, -0.06971488893032074, -0.1880747526884079, 0.052158620208501816, 0.0243685245513916, 0.27122530341148376, -0.06097225844860077, -0.1791486144065857, 0.2627328038215637, 0.057548169046640396, -0.014274529181420803, -0.00029395302408374846, -0.04185447469353676, 0.06571102887392044, 0.11151216924190521, -0.06645311415195465, -0.24488112330436707, 0.06893810629844666, -0.11519978940486908, -0.044504258781671524, -0.19075369834899902, 0.11768924444913864, 0.15984749794006348, 0.15780115127563477, 0.03177301585674286, -0.02282915636897087, 0.024139784276485443, -0.16595372557640076, 0.014781294390559196, 0.1941472440958023, 0.020130785182118416, 0.11852403730154037, -0.06380180269479752, -0.05491466820240021, -0.05736317113041878, 0.06758308410644531, -0.031128689646720886, 0.1988278478384018, 0.038816310465335846, -0.0792609229683876, -0.1438027024269104, -0.15787923336029053, -0.0308604147285223, -0.04333774372935295, -0.040175240486860275, -0.06916093826293945, -0.09768238663673401, 0.0856141671538353, 0.23418259620666504, -0.049798984080553055, -0.08235353231430054, 2.763623952981661e-34, -0.008120251819491386, 0.08617989718914032, 0.14236699044704437, 0.10515589267015457, 0.08724866062402725, -0.05931452661752701, 0.020904183387756348, 0.008697597309947014, 0.06991482526063919, -0.2999711334705353, -0.16076892614364624 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Sounds like a plan @lhoestq If you create a PR I'll pick it up and try it out right away!
**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%.
20
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%. Sounds like a plan @lhoestq If you create a PR I'll pick it up and try it out right away!
[ -0.11883822828531265, 0.16306379437446594, -0.1083887591958046, -0.001332283136434853, -0.08068305999040604, -0.019639287143945694, 0.09920649975538254, 0.2937559187412262, -0.16615261137485504, -0.133849635720253, -0.1209469735622406, 0.11728517711162567, -0.09816189855337143, 0.0810495913028717, -0.06285826116800308, -0.23150232434272766, -0.0381409116089344, -0.025896195322275162, 0.05988885834813118, 0.11049521714448929, -0.08881425857543945, -0.10119785368442535, 0.13778339326381683, -0.16025657951831818, -0.005690921563655138, -0.10142558068037033, -0.14522352814674377, 0.031842779368162155, 0.015236818231642246, -0.1379425823688507, 0.04617726430296898, 0.20017901062965393, -0.06095150113105774, 0.20791660249233246, 0.000005690186299034394, -0.028230983763933182, -0.08265750110149384, 0.05904816463589668, -0.011004110798239708, 0.25812751054763794, 0.30795276165008545, -0.11764455586671829, -0.01749098300933838, 0.08950190246105194, -0.08168687671422958, -0.013317767530679703, -0.1187252476811409, -0.004642309155315161, -0.04767441004514694, 0.04709259420633316, 0.016705289483070374, 0.10467980802059174, -0.07876234501600266, -0.05964488908648491, 0.03383680060505867, 0.14280150830745697, -0.16255450248718262, 0.027372825890779495, 0.1039399728178978, -0.016987062990665436, -0.06442239135503769, 0.04627646505832672, 0.05510058254003525, -0.11506824195384979, 0.10739481449127197, 0.11887188255786896, -0.25162404775619507, 0.0558130219578743, 0.11302885413169861, 0.10207601636648178, -0.14782176911830902, -0.09732267260551453, -0.14595451951026917, -0.018687935546040535, -0.06267787516117096, -0.21370916068553925, -0.12104778736829758, 0.07260260730981827, -0.08625916391611099, 0.008218453265726566, -0.0757700502872467, 0.08034807443618774, 0.04058659449219704, -0.07390021532773972, -0.23531484603881836, 0.016051223501563072, 0.2067103534936905, -0.07264702767133713, 0.13996171951293945, 0.08822683244943619, 0.21892794966697693, -0.11988377571105957, 0.00927069503813982, 0.025499247014522552, -0.20803864300251007, -0.07671790570020676, -0.16782206296920776, -0.135110542178154, -0.05779460817575455, -0.08279649168252945, 0.059098225086927414, 0.2626301646232605, -0.06669386476278305, -0.06701944768428802, -0.23467373847961426, -0.02419922687113285, -0.1312120258808136, -0.174810990691185, -0.07673633843660355, -0.00998618733137846, 0.1970105618238449, 0.09643664956092834, -0.11914364248514175, -0.07300101220607758, -0.1194596216082573, -0.006627651862800121, -0.05461837723851204, 0.06399892270565033, 0.05394270643591881, -0.06948944926261902, 0.07713863998651505, 0.12451167404651642, -0.11948752403259277, 0.04282219707965851, -0.05381803214550018, 0.1393357515335083, -0.012257545255124569, -0.09724906831979752, -0.08342595398426056, -0.025141078978776932, 0.06373770534992218, 0.040348269045352936, 0.10759232938289642, -0.06028914451599121, 0.02534639462828636, 0.022555820643901825, -0.07445227354764938, -0.11207214742898941, -0.025612905621528625, 0.09823004901409149, 0.01038079708814621, 0.021650172770023346, 0.22766606509685516, -0.016398504376411438, -0.010942687280476093, 0.03301875293254852, 0.007432373706251383, 0.3170333206653595, -0.1579727828502655, -0.0006033303798176348, 0.08601102232933044, 0.09297700226306915, -0.2278481423854828, -0.01801919937133789, -0.006680417340248823, -0.026498813182115555, 0.07648016512393951, -0.21290601789951324, -0.03064901940524578, 0.025889001786708832, 0.05582715570926666, -0.2380698323249817, 0.008179555647075176, 0.037750404328107834, 0.04152938351035118, 0.10737056285142899, 0.020877743139863014, 0.11759082227945328, 0.1721089780330658, 0.21474780142307281, 0.3142072558403015, 0.109914131462574, -0.08629069477319717, -0.019980713725090027, 0.12379482388496399, -0.019698025658726692, -0.02217750810086727, -0.10348810255527496, -0.024150101467967033, 0.02279600128531456, 0.02294481359422207, 0.1378050297498703, -0.014458704739809036, 0.03803001344203949, 0.31501340866088867, 0.09803534299135208, 0.21799418330192566, 0.04480806738138199, -0.06425708532333374, -0.03007296472787857, 0.001535835792310536, -0.14465849101543427, 0.1273719221353531, -0.015776271000504494, -0.011183330789208412, -0.15786592662334442, -0.15543097257614136, -0.05131829157471657, 0.18436263501644135, -0.25981229543685913, -0.03596219792962074, -0.027921484783291817, -0.14083126187324524, 0.06640544533729553, -0.0958324521780014, 0.11686520278453827, -0.14375731348991394, 0.0523659810423851, -0.0915028378367424, 0.010479683987796307, -0.11909182369709015, -0.04614997282624245, 0.11514025181531906, -0.05269905924797058, -0.03634972497820854, -0.13591423630714417, -0.029305540025234222, 0.03728073090314865, -0.1830618679523468, -0.09600164741277695, 0.08161363750696182, 0.22747813165187836, 0.01944044977426529, 0.03833679109811783, 0.013650807552039623, -0.016284257173538208, 0.1025657206773758, 0.04087549448013306, 0.05686068907380104, 0.09200839698314667, -0.057894267141819, -0.08596408367156982, 0.14834903180599213, -0.17141102254390717, -0.06982573866844177, 0.018308328464627266, 0.002095078583806753, -0.2244603931903839, 0.10701648145914078, 0.041851069778203964, -0.02074182592332363, -0.06231636554002762, -0.08071725070476532, -0.08928461372852325, -0.09943633526563644, -0.026111464947462082, 0.1656862199306488, 0.11544785648584366, -0.09951584786176682, 0.04418021813035011, -0.019908159971237183, -0.0026318395975977182, 0.1071360781788826, 0.14400021731853485, 0.12168461829423904, 0.021106040105223656, 0.056908681988716125, 0.07414524257183075, -0.07450494915246964, 0.11477231979370117, -0.03821595758199692, 0.008227991871535778, -0.12383369356393814, 0.15080668032169342, 0.08701453357934952, -0.09923573583364487, 0.14925383031368256, -0.31942376494407654, 0.03270987793803215, -0.06788767874240875, 0.10020282864570618, 0.1488596796989441, 0.061490174382925034, -0.015815675258636475, -0.06739553809165955, -0.1093866154551506, -0.10826199501752853, 0.04474368318915367, 0.07238730043172836, 0.08452441543340683, -0.047157395631074905, -0.033911753445863724, 0.0632767304778099, 0.030927591025829315, 0.07933471351861954, -0.040351707488298416, -0.161393940448761, 0.10122688114643097, -0.11063645035028458, -0.00774203659966588, 0.04062995687127113, -0.13008517026901245, 0.10593481361865997, -0.03869682177901268, 0.0002652212278917432, 0.13908754289150238, 0.16645199060440063, 0.14507612586021423, -0.05422527715563774, -0.13134460151195526, -0.04888258874416351, 0.10111977905035019, 0.04707079753279686, 0.010677219368517399, 0.08880917727947235, 0.047995757311582565, 0.02254774235188961, -0.03805701807141304, -0.09540624171495438, -0.036482032388448715, 0.04662146419286728, -0.02097558230161667, -0.045252326875925064, -0.24623219668865204, -0.000853062083479017, -0.013833596371114254, -0.035698022693395615, -0.14603722095489502, -0.001383613795042038, 0.04314323142170906, 0.10387943685054779, -0.07165595889091492, -0.11833768337965012, -0.13272923231124878, -0.08002393692731857, -0.002130871871486306, -0.09447835385799408, -0.06572792679071426, -0.1801357865333557, 0.08546368032693863, -0.032861173152923584, 0.0029676815029233694, -0.06281700730323792, -0.04819406569004059, 0.09103383868932724, -0.07226306200027466, -0.010125681757926941, -0.1350266933441162, 0.22623193264007568, 0.09599015861749649, -0.19161875545978546, -0.11790703982114792, -0.0712648406624794, 0.041975412517786026, 0.15071770548820496, -0.10718566179275513, 0.06550222635269165, -0.16642116010189056, 0.03901198133826256, -0.007569864392280579, -0.012703496031463146, 0.14562690258026123, -0.04066553711891174, -0.08546952903270721, 0.029598034918308258, 0.1775760054588318, -0.2537045180797577, -0.14448846876621246, 0.047839824110269547, -0.1119556650519371, -0.11610018461942673, 0.16148990392684937, 0.18774962425231934, -0.05892620608210564, -0.24157880246639252, -0.1526496559381485, 0.006040741689503193, -0.016398370265960693, -0.21405759453773499, -0.08452031016349792, 0.02783329226076603, -0.11109238862991333, 0.06167428568005562, 0.306680828332901, 0.014125844463706017, -0.005087526049464941, 0.1138705164194107, -0.06754004955291748, 0.15844641625881195, 0.02259805053472519, 0.21759560704231262, -0.13619743287563324, -0.0599103607237339, -0.059196460992097855, 0.11996845155954361, -0.04031473398208618, -0.036428891122341156, 0.0336885079741478, -0.18482446670532227, -0.01908804662525654, -0.06094813346862793, 0.16912613809108734, -0.04593990370631218, -0.09327084571123123, -0.03413528949022293, 0.01760927215218544, 0.15331505239009857, 0.08581989258527756, 0.049274396151304245, 0.20256800949573517, 0.18500955402851105, 0.03457510098814964, 0.016907671466469765, -0.12096162885427475, 0.039171136915683746, -0.17014388740062714, 0.012031057849526405, 0.029928022995591164, 0.059064384549856186, 0.004489374812692404, 0.06439661234617233, 0.20744812488555908, -0.04721708595752716, -0.17150837182998657, 0.14170166850090027, 0.028625208884477615, -0.03685656189918518, 0.04992753267288208, 0.16885273158550262, -0.14576970040798187, -0.05057321488857269, -0.17456163465976715, 0.057020366191864014, -0.05232900008559227, 0.10654284805059433, -0.08018732070922852, -0.04715650901198387, 0.07986880093812943, 0.10845238715410233, 0.1098048985004425, 0.02456674724817276, 0.21681563556194305, -0.05872057005763054, 0.10424735397100449, 0.11649191379547119, -0.019547300413250923, 0.026735935360193253, -0.07979077845811844, -0.05223144218325615, 0.05927479267120361, -0.12318804115056992, -0.04789566993713379, 0.3197777569293976, -0.010963221080601215, 0.004752787761390209, -0.20069314539432526, -0.05326935276389122, 0.06700316816568375, -0.059151068329811096, -0.058927021920681, -0.18320448696613312, -0.14381414651870728, -0.164193794131279, -0.15023359656333923, 0.1566782146692276, 0.08643178641796112, -0.033660467714071274, -0.21268533170223236, 0.000941713631618768, 0.05836385488510132, 0.09756821393966675, -0.03704777732491493, 0.03562270849943161, 0.13659749925136566, -0.049640171229839325, -0.007165150251239538, 0.011651230044662952, -0.22804208099842072, 0.18088750541210175, -0.08428800106048584, -0.06352529674768448, -0.0020119412802159786, 0.08089140057563782, 0.0655423179268837, -0.00832749716937542, 0.03806781396269798, 0.09370806068181992, 0.03734217584133148, -0.06571966409683228, 0.03938763588666916, 0.09520935267210007, 0.10320558398962021, -0.1257425993680954, -0.1216907948255539, 0.11396659165620804, 0.09139472991228104, -0.14080944657325745, -0.018120665103197098, -0.15175774693489075, 0.02774379774928093, 0.008988110348582268, 0.09948159754276276, -0.11343388259410858, 0.000028701804694719613, 0.18482458591461182, -0.06787512451410294, -0.1783338040113449, 0.027134189382195473, -0.0461580716073513, -0.09338925033807755, -0.02375025860965252, -0.010982650332152843, 0.08713268488645554, 0.07791897654533386, 0.14204300940036774, 0.03598795086145401, -0.062363091856241226, -0.05498922988772392, 0.10940346121788025, 0.0912942886352539, 0.034015677869319916, 0.022942475974559784, -0.0029224036261439323, -0.12866151332855225, 0.048069607466459274, 0.22661514580249786, 0.0058241537772119045, 0.015599790029227734, -0.12392554432153702, 0.03914396092295647, -0.010733443312346935, 0.002152608474716544, 0.10683254897594452, 0.13827936351299286, 0.12935058772563934, 0.05133403465151787, -0.07119912654161453, -0.15030330419540405, 0.040063418447971344, 0.11253884434700012, 0.032886624336242676, 0.08421388268470764, 0.2670772075653076, -0.0492391400039196, -0.17231838405132294, 0.0783260241150856, 0.13097409904003143, 0.013949624262750149, -0.11578965932130814, -0.06696983426809311, 0.06658989191055298, -0.167466938495636, -0.07341371476650238, 0.1879834234714508, -0.02855263650417328, -0.1793215572834015, 0.06951646506786346, -0.05668727681040764, -0.033123619854450226, -0.04899625852704048, 0.09254173934459686, 0.0802173763513565, 0.05021306872367859, -0.13440434634685516, 0.06311117112636566, -2.634349255623568e-32, -0.14567254483699799, 0.10958664864301682, 0.022403355687856674, -0.027079304680228233, 0.0019842886831611395, -0.020343760028481483, -0.04752274602651596, -0.14969870448112488, 0.04701082035899162, -0.0029860008507966995, -0.13698872923851013, 0.017674820497632027, 0.033175334334373474, -0.009995604865252972, 0.03555327653884888, 0.03868730366230011, 0.29156091809272766, -0.08755695819854736, -0.2332383096218109, 0.0849398821592331, 0.14701233804225922, 0.225900337100029, 0.06894829124212265, 0.0992051437497139, -0.15019188821315765, 0.10571347177028656, 0.013328658416867256, 0.0285396259278059, 0.04314783215522766, -0.08388643711805344, -0.12094298750162125, -0.0007217046222649515, -0.12121447920799255, 0.013941756449639797, -0.08199018985033035, 0.04392873868346214, -0.14110954105854034, -0.02185039594769478, 0.025636976584792137, 0.10579648613929749, -0.029918724671006203, -0.13221918046474457, 0.0758875384926796, 0.016011936590075493, -0.07294770330190659, 0.05316255986690521, -0.07177091389894485, -0.04869323968887329, -0.07021074742078781, -0.15228530764579773, -0.23572885990142822, 0.12069105356931686, -0.0007068831473588943, 0.11619844287633896, 0.0757455974817276, -0.04487856850028038, 0.1113806664943695, 0.005164533853530884, -0.17002750933170319, -0.09718786925077438, 0.12450852990150452, 0.22239191830158234, 0.03934326767921448, 0.02501058578491211, -0.06359022855758667, -0.03906940296292305, 0.22727680206298828, 0.0901135727763176, 0.2884526252746582, 0.16501976549625397, 0.1680814027786255, -0.053666647523641586, 0.02375086024403572, -0.11250550299882889, -0.020109811797738075, 0.0397823303937912, -0.132205069065094, 0.13786277174949646, 0.12929128110408783, -0.08362245559692383, -0.164950892329216, 0.1576361209154129, 0.10818986594676971, 0.06146269664168358, 0.04000743851065636, 0.22563536465168, 0.08067145943641663, 0.06219927966594696, -0.09028305113315582, -0.03653227910399437, -0.15653109550476074, 0.03211839497089386, 0.20697662234306335, -0.08983630686998367, 0.05625096708536148, 0.05455663427710533, -0.08139705657958984, 0.08358053117990494, -0.1515149474143982, -0.10490600764751434, -0.04438750818371773, -0.04274289682507515, -0.0005932293133810163, -0.06100614741444588, 0.22077585756778717, -0.11964307725429535, 0.04748415946960449, 0.08293520659208298, -0.32652661204338074, -0.008674335666000843, 0.033676933497190475, -0.06357257813215256, 0.1480514258146286, 0.028104186058044434, 0.09964101761579514, 0.045360539108514786, 0.027188554406166077, 0.0758574828505516, 0.07875875383615494, 0.037971366196870804, -0.0341067872941494, -0.08728684484958649, 0.13386644423007965, -0.13725018501281738, -0.09154471755027771, -0.07394642382860184, -0.05232315883040428, 0.009060048498213291, -0.048064082860946655, -0.03639025613665581, -0.17919586598873138, 0.00636901194229722, 6.985127356529119e-7, 0.0559762679040432, 0.1500197947025299, 0.09943659603595734, -0.044151365756988525, -0.020518559962511063, 0.14983680844306946, 0.05565166845917702, 0.0324261449277401, -0.04938717931509018, 0.021231932565569878, 0.07271839678287506, -0.0685974508523941, 0.019101634621620178, 0.012218020856380463, 0.09487083554267883, -0.2161211520433426, 0.010661231353878975, -0.06971488893032074, -0.1880747526884079, 0.052158620208501816, 0.0243685245513916, 0.27122530341148376, -0.06097225844860077, -0.1791486144065857, 0.2627328038215637, 0.057548169046640396, -0.014274529181420803, -0.00029395302408374846, -0.04185447469353676, 0.06571102887392044, 0.11151216924190521, -0.06645311415195465, -0.24488112330436707, 0.06893810629844666, -0.11519978940486908, -0.044504258781671524, -0.19075369834899902, 0.11768924444913864, 0.15984749794006348, 0.15780115127563477, 0.03177301585674286, -0.02282915636897087, 0.024139784276485443, -0.16595372557640076, 0.014781294390559196, 0.1941472440958023, 0.020130785182118416, 0.11852403730154037, -0.06380180269479752, -0.05491466820240021, -0.05736317113041878, 0.06758308410644531, -0.031128689646720886, 0.1988278478384018, 0.038816310465335846, -0.0792609229683876, -0.1438027024269104, -0.15787923336029053, -0.0308604147285223, -0.04333774372935295, -0.040175240486860275, -0.06916093826293945, -0.09768238663673401, 0.0856141671538353, 0.23418259620666504, -0.049798984080553055, -0.08235353231430054, 2.763623952981661e-34, -0.008120251819491386, 0.08617989718914032, 0.14236699044704437, 0.10515589267015457, 0.08724866062402725, -0.05931452661752701, 0.020904183387756348, 0.008697597309947014, 0.06991482526063919, -0.2999711334705353, -0.16076892614364624 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
I’m not exactly sure how to read the graph but it seems that to_categorical take a lot of time here. Could you share more informations on the features/stats of your datasets so we could maybe design a synthetic datasets that looks more similar for debugging testing?
**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%.
46
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%. I’m not exactly sure how to read the graph but it seems that to_categorical take a lot of time here. Could you share more informations on the features/stats of your datasets so we could maybe design a synthetic datasets that looks more similar for debugging testing?
[ -0.11883822828531265, 0.16306379437446594, -0.1083887591958046, -0.001332283136434853, -0.08068305999040604, -0.019639287143945694, 0.09920649975538254, 0.2937559187412262, -0.16615261137485504, -0.133849635720253, -0.1209469735622406, 0.11728517711162567, -0.09816189855337143, 0.0810495913028717, -0.06285826116800308, -0.23150232434272766, -0.0381409116089344, -0.025896195322275162, 0.05988885834813118, 0.11049521714448929, -0.08881425857543945, -0.10119785368442535, 0.13778339326381683, -0.16025657951831818, -0.005690921563655138, -0.10142558068037033, -0.14522352814674377, 0.031842779368162155, 0.015236818231642246, -0.1379425823688507, 0.04617726430296898, 0.20017901062965393, -0.06095150113105774, 0.20791660249233246, 0.000005690186299034394, -0.028230983763933182, -0.08265750110149384, 0.05904816463589668, -0.011004110798239708, 0.25812751054763794, 0.30795276165008545, -0.11764455586671829, -0.01749098300933838, 0.08950190246105194, -0.08168687671422958, -0.013317767530679703, -0.1187252476811409, -0.004642309155315161, -0.04767441004514694, 0.04709259420633316, 0.016705289483070374, 0.10467980802059174, -0.07876234501600266, -0.05964488908648491, 0.03383680060505867, 0.14280150830745697, -0.16255450248718262, 0.027372825890779495, 0.1039399728178978, -0.016987062990665436, -0.06442239135503769, 0.04627646505832672, 0.05510058254003525, -0.11506824195384979, 0.10739481449127197, 0.11887188255786896, -0.25162404775619507, 0.0558130219578743, 0.11302885413169861, 0.10207601636648178, -0.14782176911830902, -0.09732267260551453, -0.14595451951026917, -0.018687935546040535, -0.06267787516117096, -0.21370916068553925, -0.12104778736829758, 0.07260260730981827, -0.08625916391611099, 0.008218453265726566, -0.0757700502872467, 0.08034807443618774, 0.04058659449219704, -0.07390021532773972, -0.23531484603881836, 0.016051223501563072, 0.2067103534936905, -0.07264702767133713, 0.13996171951293945, 0.08822683244943619, 0.21892794966697693, -0.11988377571105957, 0.00927069503813982, 0.025499247014522552, -0.20803864300251007, -0.07671790570020676, -0.16782206296920776, -0.135110542178154, -0.05779460817575455, -0.08279649168252945, 0.059098225086927414, 0.2626301646232605, -0.06669386476278305, -0.06701944768428802, -0.23467373847961426, -0.02419922687113285, -0.1312120258808136, -0.174810990691185, -0.07673633843660355, -0.00998618733137846, 0.1970105618238449, 0.09643664956092834, -0.11914364248514175, -0.07300101220607758, -0.1194596216082573, -0.006627651862800121, -0.05461837723851204, 0.06399892270565033, 0.05394270643591881, -0.06948944926261902, 0.07713863998651505, 0.12451167404651642, -0.11948752403259277, 0.04282219707965851, -0.05381803214550018, 0.1393357515335083, -0.012257545255124569, -0.09724906831979752, -0.08342595398426056, -0.025141078978776932, 0.06373770534992218, 0.040348269045352936, 0.10759232938289642, -0.06028914451599121, 0.02534639462828636, 0.022555820643901825, -0.07445227354764938, -0.11207214742898941, -0.025612905621528625, 0.09823004901409149, 0.01038079708814621, 0.021650172770023346, 0.22766606509685516, -0.016398504376411438, -0.010942687280476093, 0.03301875293254852, 0.007432373706251383, 0.3170333206653595, -0.1579727828502655, -0.0006033303798176348, 0.08601102232933044, 0.09297700226306915, -0.2278481423854828, -0.01801919937133789, -0.006680417340248823, -0.026498813182115555, 0.07648016512393951, -0.21290601789951324, -0.03064901940524578, 0.025889001786708832, 0.05582715570926666, -0.2380698323249817, 0.008179555647075176, 0.037750404328107834, 0.04152938351035118, 0.10737056285142899, 0.020877743139863014, 0.11759082227945328, 0.1721089780330658, 0.21474780142307281, 0.3142072558403015, 0.109914131462574, -0.08629069477319717, -0.019980713725090027, 0.12379482388496399, -0.019698025658726692, -0.02217750810086727, -0.10348810255527496, -0.024150101467967033, 0.02279600128531456, 0.02294481359422207, 0.1378050297498703, -0.014458704739809036, 0.03803001344203949, 0.31501340866088867, 0.09803534299135208, 0.21799418330192566, 0.04480806738138199, -0.06425708532333374, -0.03007296472787857, 0.001535835792310536, -0.14465849101543427, 0.1273719221353531, -0.015776271000504494, -0.011183330789208412, -0.15786592662334442, -0.15543097257614136, -0.05131829157471657, 0.18436263501644135, -0.25981229543685913, -0.03596219792962074, -0.027921484783291817, -0.14083126187324524, 0.06640544533729553, -0.0958324521780014, 0.11686520278453827, -0.14375731348991394, 0.0523659810423851, -0.0915028378367424, 0.010479683987796307, -0.11909182369709015, -0.04614997282624245, 0.11514025181531906, -0.05269905924797058, -0.03634972497820854, -0.13591423630714417, -0.029305540025234222, 0.03728073090314865, -0.1830618679523468, -0.09600164741277695, 0.08161363750696182, 0.22747813165187836, 0.01944044977426529, 0.03833679109811783, 0.013650807552039623, -0.016284257173538208, 0.1025657206773758, 0.04087549448013306, 0.05686068907380104, 0.09200839698314667, -0.057894267141819, -0.08596408367156982, 0.14834903180599213, -0.17141102254390717, -0.06982573866844177, 0.018308328464627266, 0.002095078583806753, -0.2244603931903839, 0.10701648145914078, 0.041851069778203964, -0.02074182592332363, -0.06231636554002762, -0.08071725070476532, -0.08928461372852325, -0.09943633526563644, -0.026111464947462082, 0.1656862199306488, 0.11544785648584366, -0.09951584786176682, 0.04418021813035011, -0.019908159971237183, -0.0026318395975977182, 0.1071360781788826, 0.14400021731853485, 0.12168461829423904, 0.021106040105223656, 0.056908681988716125, 0.07414524257183075, -0.07450494915246964, 0.11477231979370117, -0.03821595758199692, 0.008227991871535778, -0.12383369356393814, 0.15080668032169342, 0.08701453357934952, -0.09923573583364487, 0.14925383031368256, -0.31942376494407654, 0.03270987793803215, -0.06788767874240875, 0.10020282864570618, 0.1488596796989441, 0.061490174382925034, -0.015815675258636475, -0.06739553809165955, -0.1093866154551506, -0.10826199501752853, 0.04474368318915367, 0.07238730043172836, 0.08452441543340683, -0.047157395631074905, -0.033911753445863724, 0.0632767304778099, 0.030927591025829315, 0.07933471351861954, -0.040351707488298416, -0.161393940448761, 0.10122688114643097, -0.11063645035028458, -0.00774203659966588, 0.04062995687127113, -0.13008517026901245, 0.10593481361865997, -0.03869682177901268, 0.0002652212278917432, 0.13908754289150238, 0.16645199060440063, 0.14507612586021423, -0.05422527715563774, -0.13134460151195526, -0.04888258874416351, 0.10111977905035019, 0.04707079753279686, 0.010677219368517399, 0.08880917727947235, 0.047995757311582565, 0.02254774235188961, -0.03805701807141304, -0.09540624171495438, -0.036482032388448715, 0.04662146419286728, -0.02097558230161667, -0.045252326875925064, -0.24623219668865204, -0.000853062083479017, -0.013833596371114254, -0.035698022693395615, -0.14603722095489502, -0.001383613795042038, 0.04314323142170906, 0.10387943685054779, -0.07165595889091492, -0.11833768337965012, -0.13272923231124878, -0.08002393692731857, -0.002130871871486306, -0.09447835385799408, -0.06572792679071426, -0.1801357865333557, 0.08546368032693863, -0.032861173152923584, 0.0029676815029233694, -0.06281700730323792, -0.04819406569004059, 0.09103383868932724, -0.07226306200027466, -0.010125681757926941, -0.1350266933441162, 0.22623193264007568, 0.09599015861749649, -0.19161875545978546, -0.11790703982114792, -0.0712648406624794, 0.041975412517786026, 0.15071770548820496, -0.10718566179275513, 0.06550222635269165, -0.16642116010189056, 0.03901198133826256, -0.007569864392280579, -0.012703496031463146, 0.14562690258026123, -0.04066553711891174, -0.08546952903270721, 0.029598034918308258, 0.1775760054588318, -0.2537045180797577, -0.14448846876621246, 0.047839824110269547, -0.1119556650519371, -0.11610018461942673, 0.16148990392684937, 0.18774962425231934, -0.05892620608210564, -0.24157880246639252, -0.1526496559381485, 0.006040741689503193, -0.016398370265960693, -0.21405759453773499, -0.08452031016349792, 0.02783329226076603, -0.11109238862991333, 0.06167428568005562, 0.306680828332901, 0.014125844463706017, -0.005087526049464941, 0.1138705164194107, -0.06754004955291748, 0.15844641625881195, 0.02259805053472519, 0.21759560704231262, -0.13619743287563324, -0.0599103607237339, -0.059196460992097855, 0.11996845155954361, -0.04031473398208618, -0.036428891122341156, 0.0336885079741478, -0.18482446670532227, -0.01908804662525654, -0.06094813346862793, 0.16912613809108734, -0.04593990370631218, -0.09327084571123123, -0.03413528949022293, 0.01760927215218544, 0.15331505239009857, 0.08581989258527756, 0.049274396151304245, 0.20256800949573517, 0.18500955402851105, 0.03457510098814964, 0.016907671466469765, -0.12096162885427475, 0.039171136915683746, -0.17014388740062714, 0.012031057849526405, 0.029928022995591164, 0.059064384549856186, 0.004489374812692404, 0.06439661234617233, 0.20744812488555908, -0.04721708595752716, -0.17150837182998657, 0.14170166850090027, 0.028625208884477615, -0.03685656189918518, 0.04992753267288208, 0.16885273158550262, -0.14576970040798187, -0.05057321488857269, -0.17456163465976715, 0.057020366191864014, -0.05232900008559227, 0.10654284805059433, -0.08018732070922852, -0.04715650901198387, 0.07986880093812943, 0.10845238715410233, 0.1098048985004425, 0.02456674724817276, 0.21681563556194305, -0.05872057005763054, 0.10424735397100449, 0.11649191379547119, -0.019547300413250923, 0.026735935360193253, -0.07979077845811844, -0.05223144218325615, 0.05927479267120361, -0.12318804115056992, -0.04789566993713379, 0.3197777569293976, -0.010963221080601215, 0.004752787761390209, -0.20069314539432526, -0.05326935276389122, 0.06700316816568375, -0.059151068329811096, -0.058927021920681, -0.18320448696613312, -0.14381414651870728, -0.164193794131279, -0.15023359656333923, 0.1566782146692276, 0.08643178641796112, -0.033660467714071274, -0.21268533170223236, 0.000941713631618768, 0.05836385488510132, 0.09756821393966675, -0.03704777732491493, 0.03562270849943161, 0.13659749925136566, -0.049640171229839325, -0.007165150251239538, 0.011651230044662952, -0.22804208099842072, 0.18088750541210175, -0.08428800106048584, -0.06352529674768448, -0.0020119412802159786, 0.08089140057563782, 0.0655423179268837, -0.00832749716937542, 0.03806781396269798, 0.09370806068181992, 0.03734217584133148, -0.06571966409683228, 0.03938763588666916, 0.09520935267210007, 0.10320558398962021, -0.1257425993680954, -0.1216907948255539, 0.11396659165620804, 0.09139472991228104, -0.14080944657325745, -0.018120665103197098, -0.15175774693489075, 0.02774379774928093, 0.008988110348582268, 0.09948159754276276, -0.11343388259410858, 0.000028701804694719613, 0.18482458591461182, -0.06787512451410294, -0.1783338040113449, 0.027134189382195473, -0.0461580716073513, -0.09338925033807755, -0.02375025860965252, -0.010982650332152843, 0.08713268488645554, 0.07791897654533386, 0.14204300940036774, 0.03598795086145401, -0.062363091856241226, -0.05498922988772392, 0.10940346121788025, 0.0912942886352539, 0.034015677869319916, 0.022942475974559784, -0.0029224036261439323, -0.12866151332855225, 0.048069607466459274, 0.22661514580249786, 0.0058241537772119045, 0.015599790029227734, -0.12392554432153702, 0.03914396092295647, -0.010733443312346935, 0.002152608474716544, 0.10683254897594452, 0.13827936351299286, 0.12935058772563934, 0.05133403465151787, -0.07119912654161453, -0.15030330419540405, 0.040063418447971344, 0.11253884434700012, 0.032886624336242676, 0.08421388268470764, 0.2670772075653076, -0.0492391400039196, -0.17231838405132294, 0.0783260241150856, 0.13097409904003143, 0.013949624262750149, -0.11578965932130814, -0.06696983426809311, 0.06658989191055298, -0.167466938495636, -0.07341371476650238, 0.1879834234714508, -0.02855263650417328, -0.1793215572834015, 0.06951646506786346, -0.05668727681040764, -0.033123619854450226, -0.04899625852704048, 0.09254173934459686, 0.0802173763513565, 0.05021306872367859, -0.13440434634685516, 0.06311117112636566, -2.634349255623568e-32, -0.14567254483699799, 0.10958664864301682, 0.022403355687856674, -0.027079304680228233, 0.0019842886831611395, -0.020343760028481483, -0.04752274602651596, -0.14969870448112488, 0.04701082035899162, -0.0029860008507966995, -0.13698872923851013, 0.017674820497632027, 0.033175334334373474, -0.009995604865252972, 0.03555327653884888, 0.03868730366230011, 0.29156091809272766, -0.08755695819854736, -0.2332383096218109, 0.0849398821592331, 0.14701233804225922, 0.225900337100029, 0.06894829124212265, 0.0992051437497139, -0.15019188821315765, 0.10571347177028656, 0.013328658416867256, 0.0285396259278059, 0.04314783215522766, -0.08388643711805344, -0.12094298750162125, -0.0007217046222649515, -0.12121447920799255, 0.013941756449639797, -0.08199018985033035, 0.04392873868346214, -0.14110954105854034, -0.02185039594769478, 0.025636976584792137, 0.10579648613929749, -0.029918724671006203, -0.13221918046474457, 0.0758875384926796, 0.016011936590075493, -0.07294770330190659, 0.05316255986690521, -0.07177091389894485, -0.04869323968887329, -0.07021074742078781, -0.15228530764579773, -0.23572885990142822, 0.12069105356931686, -0.0007068831473588943, 0.11619844287633896, 0.0757455974817276, -0.04487856850028038, 0.1113806664943695, 0.005164533853530884, -0.17002750933170319, -0.09718786925077438, 0.12450852990150452, 0.22239191830158234, 0.03934326767921448, 0.02501058578491211, -0.06359022855758667, -0.03906940296292305, 0.22727680206298828, 0.0901135727763176, 0.2884526252746582, 0.16501976549625397, 0.1680814027786255, -0.053666647523641586, 0.02375086024403572, -0.11250550299882889, -0.020109811797738075, 0.0397823303937912, -0.132205069065094, 0.13786277174949646, 0.12929128110408783, -0.08362245559692383, -0.164950892329216, 0.1576361209154129, 0.10818986594676971, 0.06146269664168358, 0.04000743851065636, 0.22563536465168, 0.08067145943641663, 0.06219927966594696, -0.09028305113315582, -0.03653227910399437, -0.15653109550476074, 0.03211839497089386, 0.20697662234306335, -0.08983630686998367, 0.05625096708536148, 0.05455663427710533, -0.08139705657958984, 0.08358053117990494, -0.1515149474143982, -0.10490600764751434, -0.04438750818371773, -0.04274289682507515, -0.0005932293133810163, -0.06100614741444588, 0.22077585756778717, -0.11964307725429535, 0.04748415946960449, 0.08293520659208298, -0.32652661204338074, -0.008674335666000843, 0.033676933497190475, -0.06357257813215256, 0.1480514258146286, 0.028104186058044434, 0.09964101761579514, 0.045360539108514786, 0.027188554406166077, 0.0758574828505516, 0.07875875383615494, 0.037971366196870804, -0.0341067872941494, -0.08728684484958649, 0.13386644423007965, -0.13725018501281738, -0.09154471755027771, -0.07394642382860184, -0.05232315883040428, 0.009060048498213291, -0.048064082860946655, -0.03639025613665581, -0.17919586598873138, 0.00636901194229722, 6.985127356529119e-7, 0.0559762679040432, 0.1500197947025299, 0.09943659603595734, -0.044151365756988525, -0.020518559962511063, 0.14983680844306946, 0.05565166845917702, 0.0324261449277401, -0.04938717931509018, 0.021231932565569878, 0.07271839678287506, -0.0685974508523941, 0.019101634621620178, 0.012218020856380463, 0.09487083554267883, -0.2161211520433426, 0.010661231353878975, -0.06971488893032074, -0.1880747526884079, 0.052158620208501816, 0.0243685245513916, 0.27122530341148376, -0.06097225844860077, -0.1791486144065857, 0.2627328038215637, 0.057548169046640396, -0.014274529181420803, -0.00029395302408374846, -0.04185447469353676, 0.06571102887392044, 0.11151216924190521, -0.06645311415195465, -0.24488112330436707, 0.06893810629844666, -0.11519978940486908, -0.044504258781671524, -0.19075369834899902, 0.11768924444913864, 0.15984749794006348, 0.15780115127563477, 0.03177301585674286, -0.02282915636897087, 0.024139784276485443, -0.16595372557640076, 0.014781294390559196, 0.1941472440958023, 0.020130785182118416, 0.11852403730154037, -0.06380180269479752, -0.05491466820240021, -0.05736317113041878, 0.06758308410644531, -0.031128689646720886, 0.1988278478384018, 0.038816310465335846, -0.0792609229683876, -0.1438027024269104, -0.15787923336029053, -0.0308604147285223, -0.04333774372935295, -0.040175240486860275, -0.06916093826293945, -0.09768238663673401, 0.0856141671538353, 0.23418259620666504, -0.049798984080553055, -0.08235353231430054, 2.763623952981661e-34, -0.008120251819491386, 0.08617989718914032, 0.14236699044704437, 0.10515589267015457, 0.08724866062402725, -0.05931452661752701, 0.020904183387756348, 0.008697597309947014, 0.06991482526063919, -0.2999711334705353, -0.16076892614364624 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
> I’m not exactly sure how to read the graph but it seems that to_categorical take a lot of time here. Could you share more informations on the features/stats of your datasets so we could maybe design a synthetic datasets that looks more similar for debugging testing? @thomwolf starting from the top, each rectangle represents the cumulative amount of it takes to execute the method call. Therefore, format_batch in torch_formatter.py takes ~20 sec, and the largest portion of that call is taken by to_pandas call and the smaller portion (grey rectangle) by the other method invocation(s) in format_batch (series_to_numpy etc). Features of the dataset are BERT pre-training model input columns i.e: ``` f = Features({ "input_ids": Sequence(feature=Value(dtype="int32")), "attention_mask": Sequence(feature=Value(dtype="int8")), "token_type_ids": Sequence(feature=Value(dtype="int8")), "labels": Sequence(feature=Value(dtype="int32")), "next_sentence_label": Value(dtype="int8") }) ``` I'll work with @lhoestq till we get to the bottom of this one.
**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%.
140
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%. > I’m not exactly sure how to read the graph but it seems that to_categorical take a lot of time here. Could you share more informations on the features/stats of your datasets so we could maybe design a synthetic datasets that looks more similar for debugging testing? @thomwolf starting from the top, each rectangle represents the cumulative amount of it takes to execute the method call. Therefore, format_batch in torch_formatter.py takes ~20 sec, and the largest portion of that call is taken by to_pandas call and the smaller portion (grey rectangle) by the other method invocation(s) in format_batch (series_to_numpy etc). Features of the dataset are BERT pre-training model input columns i.e: ``` f = Features({ "input_ids": Sequence(feature=Value(dtype="int32")), "attention_mask": Sequence(feature=Value(dtype="int8")), "token_type_ids": Sequence(feature=Value(dtype="int8")), "labels": Sequence(feature=Value(dtype="int32")), "next_sentence_label": Value(dtype="int8") }) ``` I'll work with @lhoestq till we get to the bottom of this one.
[ -0.11883822828531265, 0.16306379437446594, -0.1083887591958046, -0.001332283136434853, -0.08068305999040604, -0.019639287143945694, 0.09920649975538254, 0.2937559187412262, -0.16615261137485504, -0.133849635720253, -0.1209469735622406, 0.11728517711162567, -0.09816189855337143, 0.0810495913028717, -0.06285826116800308, -0.23150232434272766, -0.0381409116089344, -0.025896195322275162, 0.05988885834813118, 0.11049521714448929, -0.08881425857543945, -0.10119785368442535, 0.13778339326381683, -0.16025657951831818, -0.005690921563655138, -0.10142558068037033, -0.14522352814674377, 0.031842779368162155, 0.015236818231642246, -0.1379425823688507, 0.04617726430296898, 0.20017901062965393, -0.06095150113105774, 0.20791660249233246, 0.000005690186299034394, -0.028230983763933182, -0.08265750110149384, 0.05904816463589668, -0.011004110798239708, 0.25812751054763794, 0.30795276165008545, -0.11764455586671829, -0.01749098300933838, 0.08950190246105194, -0.08168687671422958, -0.013317767530679703, -0.1187252476811409, -0.004642309155315161, -0.04767441004514694, 0.04709259420633316, 0.016705289483070374, 0.10467980802059174, -0.07876234501600266, -0.05964488908648491, 0.03383680060505867, 0.14280150830745697, -0.16255450248718262, 0.027372825890779495, 0.1039399728178978, -0.016987062990665436, -0.06442239135503769, 0.04627646505832672, 0.05510058254003525, -0.11506824195384979, 0.10739481449127197, 0.11887188255786896, -0.25162404775619507, 0.0558130219578743, 0.11302885413169861, 0.10207601636648178, -0.14782176911830902, -0.09732267260551453, -0.14595451951026917, -0.018687935546040535, -0.06267787516117096, -0.21370916068553925, -0.12104778736829758, 0.07260260730981827, -0.08625916391611099, 0.008218453265726566, -0.0757700502872467, 0.08034807443618774, 0.04058659449219704, -0.07390021532773972, -0.23531484603881836, 0.016051223501563072, 0.2067103534936905, -0.07264702767133713, 0.13996171951293945, 0.08822683244943619, 0.21892794966697693, -0.11988377571105957, 0.00927069503813982, 0.025499247014522552, -0.20803864300251007, -0.07671790570020676, -0.16782206296920776, -0.135110542178154, -0.05779460817575455, -0.08279649168252945, 0.059098225086927414, 0.2626301646232605, -0.06669386476278305, -0.06701944768428802, -0.23467373847961426, -0.02419922687113285, -0.1312120258808136, -0.174810990691185, -0.07673633843660355, -0.00998618733137846, 0.1970105618238449, 0.09643664956092834, -0.11914364248514175, -0.07300101220607758, -0.1194596216082573, -0.006627651862800121, -0.05461837723851204, 0.06399892270565033, 0.05394270643591881, -0.06948944926261902, 0.07713863998651505, 0.12451167404651642, -0.11948752403259277, 0.04282219707965851, -0.05381803214550018, 0.1393357515335083, -0.012257545255124569, -0.09724906831979752, -0.08342595398426056, -0.025141078978776932, 0.06373770534992218, 0.040348269045352936, 0.10759232938289642, -0.06028914451599121, 0.02534639462828636, 0.022555820643901825, -0.07445227354764938, -0.11207214742898941, -0.025612905621528625, 0.09823004901409149, 0.01038079708814621, 0.021650172770023346, 0.22766606509685516, -0.016398504376411438, -0.010942687280476093, 0.03301875293254852, 0.007432373706251383, 0.3170333206653595, -0.1579727828502655, -0.0006033303798176348, 0.08601102232933044, 0.09297700226306915, -0.2278481423854828, -0.01801919937133789, -0.006680417340248823, -0.026498813182115555, 0.07648016512393951, -0.21290601789951324, -0.03064901940524578, 0.025889001786708832, 0.05582715570926666, -0.2380698323249817, 0.008179555647075176, 0.037750404328107834, 0.04152938351035118, 0.10737056285142899, 0.020877743139863014, 0.11759082227945328, 0.1721089780330658, 0.21474780142307281, 0.3142072558403015, 0.109914131462574, -0.08629069477319717, -0.019980713725090027, 0.12379482388496399, -0.019698025658726692, -0.02217750810086727, -0.10348810255527496, -0.024150101467967033, 0.02279600128531456, 0.02294481359422207, 0.1378050297498703, -0.014458704739809036, 0.03803001344203949, 0.31501340866088867, 0.09803534299135208, 0.21799418330192566, 0.04480806738138199, -0.06425708532333374, -0.03007296472787857, 0.001535835792310536, -0.14465849101543427, 0.1273719221353531, -0.015776271000504494, -0.011183330789208412, -0.15786592662334442, -0.15543097257614136, -0.05131829157471657, 0.18436263501644135, -0.25981229543685913, -0.03596219792962074, -0.027921484783291817, -0.14083126187324524, 0.06640544533729553, -0.0958324521780014, 0.11686520278453827, -0.14375731348991394, 0.0523659810423851, -0.0915028378367424, 0.010479683987796307, -0.11909182369709015, -0.04614997282624245, 0.11514025181531906, -0.05269905924797058, -0.03634972497820854, -0.13591423630714417, -0.029305540025234222, 0.03728073090314865, -0.1830618679523468, -0.09600164741277695, 0.08161363750696182, 0.22747813165187836, 0.01944044977426529, 0.03833679109811783, 0.013650807552039623, -0.016284257173538208, 0.1025657206773758, 0.04087549448013306, 0.05686068907380104, 0.09200839698314667, -0.057894267141819, -0.08596408367156982, 0.14834903180599213, -0.17141102254390717, -0.06982573866844177, 0.018308328464627266, 0.002095078583806753, -0.2244603931903839, 0.10701648145914078, 0.041851069778203964, -0.02074182592332363, -0.06231636554002762, -0.08071725070476532, -0.08928461372852325, -0.09943633526563644, -0.026111464947462082, 0.1656862199306488, 0.11544785648584366, -0.09951584786176682, 0.04418021813035011, -0.019908159971237183, -0.0026318395975977182, 0.1071360781788826, 0.14400021731853485, 0.12168461829423904, 0.021106040105223656, 0.056908681988716125, 0.07414524257183075, -0.07450494915246964, 0.11477231979370117, -0.03821595758199692, 0.008227991871535778, -0.12383369356393814, 0.15080668032169342, 0.08701453357934952, -0.09923573583364487, 0.14925383031368256, -0.31942376494407654, 0.03270987793803215, -0.06788767874240875, 0.10020282864570618, 0.1488596796989441, 0.061490174382925034, -0.015815675258636475, -0.06739553809165955, -0.1093866154551506, -0.10826199501752853, 0.04474368318915367, 0.07238730043172836, 0.08452441543340683, -0.047157395631074905, -0.033911753445863724, 0.0632767304778099, 0.030927591025829315, 0.07933471351861954, -0.040351707488298416, -0.161393940448761, 0.10122688114643097, -0.11063645035028458, -0.00774203659966588, 0.04062995687127113, -0.13008517026901245, 0.10593481361865997, -0.03869682177901268, 0.0002652212278917432, 0.13908754289150238, 0.16645199060440063, 0.14507612586021423, -0.05422527715563774, -0.13134460151195526, -0.04888258874416351, 0.10111977905035019, 0.04707079753279686, 0.010677219368517399, 0.08880917727947235, 0.047995757311582565, 0.02254774235188961, -0.03805701807141304, -0.09540624171495438, -0.036482032388448715, 0.04662146419286728, -0.02097558230161667, -0.045252326875925064, -0.24623219668865204, -0.000853062083479017, -0.013833596371114254, -0.035698022693395615, -0.14603722095489502, -0.001383613795042038, 0.04314323142170906, 0.10387943685054779, -0.07165595889091492, -0.11833768337965012, -0.13272923231124878, -0.08002393692731857, -0.002130871871486306, -0.09447835385799408, -0.06572792679071426, -0.1801357865333557, 0.08546368032693863, -0.032861173152923584, 0.0029676815029233694, -0.06281700730323792, -0.04819406569004059, 0.09103383868932724, -0.07226306200027466, -0.010125681757926941, -0.1350266933441162, 0.22623193264007568, 0.09599015861749649, -0.19161875545978546, -0.11790703982114792, -0.0712648406624794, 0.041975412517786026, 0.15071770548820496, -0.10718566179275513, 0.06550222635269165, -0.16642116010189056, 0.03901198133826256, -0.007569864392280579, -0.012703496031463146, 0.14562690258026123, -0.04066553711891174, -0.08546952903270721, 0.029598034918308258, 0.1775760054588318, -0.2537045180797577, -0.14448846876621246, 0.047839824110269547, -0.1119556650519371, -0.11610018461942673, 0.16148990392684937, 0.18774962425231934, -0.05892620608210564, -0.24157880246639252, -0.1526496559381485, 0.006040741689503193, -0.016398370265960693, -0.21405759453773499, -0.08452031016349792, 0.02783329226076603, -0.11109238862991333, 0.06167428568005562, 0.306680828332901, 0.014125844463706017, -0.005087526049464941, 0.1138705164194107, -0.06754004955291748, 0.15844641625881195, 0.02259805053472519, 0.21759560704231262, -0.13619743287563324, -0.0599103607237339, -0.059196460992097855, 0.11996845155954361, -0.04031473398208618, -0.036428891122341156, 0.0336885079741478, -0.18482446670532227, -0.01908804662525654, -0.06094813346862793, 0.16912613809108734, -0.04593990370631218, -0.09327084571123123, -0.03413528949022293, 0.01760927215218544, 0.15331505239009857, 0.08581989258527756, 0.049274396151304245, 0.20256800949573517, 0.18500955402851105, 0.03457510098814964, 0.016907671466469765, -0.12096162885427475, 0.039171136915683746, -0.17014388740062714, 0.012031057849526405, 0.029928022995591164, 0.059064384549856186, 0.004489374812692404, 0.06439661234617233, 0.20744812488555908, -0.04721708595752716, -0.17150837182998657, 0.14170166850090027, 0.028625208884477615, -0.03685656189918518, 0.04992753267288208, 0.16885273158550262, -0.14576970040798187, -0.05057321488857269, -0.17456163465976715, 0.057020366191864014, -0.05232900008559227, 0.10654284805059433, -0.08018732070922852, -0.04715650901198387, 0.07986880093812943, 0.10845238715410233, 0.1098048985004425, 0.02456674724817276, 0.21681563556194305, -0.05872057005763054, 0.10424735397100449, 0.11649191379547119, -0.019547300413250923, 0.026735935360193253, -0.07979077845811844, -0.05223144218325615, 0.05927479267120361, -0.12318804115056992, -0.04789566993713379, 0.3197777569293976, -0.010963221080601215, 0.004752787761390209, -0.20069314539432526, -0.05326935276389122, 0.06700316816568375, -0.059151068329811096, -0.058927021920681, -0.18320448696613312, -0.14381414651870728, -0.164193794131279, -0.15023359656333923, 0.1566782146692276, 0.08643178641796112, -0.033660467714071274, -0.21268533170223236, 0.000941713631618768, 0.05836385488510132, 0.09756821393966675, -0.03704777732491493, 0.03562270849943161, 0.13659749925136566, -0.049640171229839325, -0.007165150251239538, 0.011651230044662952, -0.22804208099842072, 0.18088750541210175, -0.08428800106048584, -0.06352529674768448, -0.0020119412802159786, 0.08089140057563782, 0.0655423179268837, -0.00832749716937542, 0.03806781396269798, 0.09370806068181992, 0.03734217584133148, -0.06571966409683228, 0.03938763588666916, 0.09520935267210007, 0.10320558398962021, -0.1257425993680954, -0.1216907948255539, 0.11396659165620804, 0.09139472991228104, -0.14080944657325745, -0.018120665103197098, -0.15175774693489075, 0.02774379774928093, 0.008988110348582268, 0.09948159754276276, -0.11343388259410858, 0.000028701804694719613, 0.18482458591461182, -0.06787512451410294, -0.1783338040113449, 0.027134189382195473, -0.0461580716073513, -0.09338925033807755, -0.02375025860965252, -0.010982650332152843, 0.08713268488645554, 0.07791897654533386, 0.14204300940036774, 0.03598795086145401, -0.062363091856241226, -0.05498922988772392, 0.10940346121788025, 0.0912942886352539, 0.034015677869319916, 0.022942475974559784, -0.0029224036261439323, -0.12866151332855225, 0.048069607466459274, 0.22661514580249786, 0.0058241537772119045, 0.015599790029227734, -0.12392554432153702, 0.03914396092295647, -0.010733443312346935, 0.002152608474716544, 0.10683254897594452, 0.13827936351299286, 0.12935058772563934, 0.05133403465151787, -0.07119912654161453, -0.15030330419540405, 0.040063418447971344, 0.11253884434700012, 0.032886624336242676, 0.08421388268470764, 0.2670772075653076, -0.0492391400039196, -0.17231838405132294, 0.0783260241150856, 0.13097409904003143, 0.013949624262750149, -0.11578965932130814, -0.06696983426809311, 0.06658989191055298, -0.167466938495636, -0.07341371476650238, 0.1879834234714508, -0.02855263650417328, -0.1793215572834015, 0.06951646506786346, -0.05668727681040764, -0.033123619854450226, -0.04899625852704048, 0.09254173934459686, 0.0802173763513565, 0.05021306872367859, -0.13440434634685516, 0.06311117112636566, -2.634349255623568e-32, -0.14567254483699799, 0.10958664864301682, 0.022403355687856674, -0.027079304680228233, 0.0019842886831611395, -0.020343760028481483, -0.04752274602651596, -0.14969870448112488, 0.04701082035899162, -0.0029860008507966995, -0.13698872923851013, 0.017674820497632027, 0.033175334334373474, -0.009995604865252972, 0.03555327653884888, 0.03868730366230011, 0.29156091809272766, -0.08755695819854736, -0.2332383096218109, 0.0849398821592331, 0.14701233804225922, 0.225900337100029, 0.06894829124212265, 0.0992051437497139, -0.15019188821315765, 0.10571347177028656, 0.013328658416867256, 0.0285396259278059, 0.04314783215522766, -0.08388643711805344, -0.12094298750162125, -0.0007217046222649515, -0.12121447920799255, 0.013941756449639797, -0.08199018985033035, 0.04392873868346214, -0.14110954105854034, -0.02185039594769478, 0.025636976584792137, 0.10579648613929749, -0.029918724671006203, -0.13221918046474457, 0.0758875384926796, 0.016011936590075493, -0.07294770330190659, 0.05316255986690521, -0.07177091389894485, -0.04869323968887329, -0.07021074742078781, -0.15228530764579773, -0.23572885990142822, 0.12069105356931686, -0.0007068831473588943, 0.11619844287633896, 0.0757455974817276, -0.04487856850028038, 0.1113806664943695, 0.005164533853530884, -0.17002750933170319, -0.09718786925077438, 0.12450852990150452, 0.22239191830158234, 0.03934326767921448, 0.02501058578491211, -0.06359022855758667, -0.03906940296292305, 0.22727680206298828, 0.0901135727763176, 0.2884526252746582, 0.16501976549625397, 0.1680814027786255, -0.053666647523641586, 0.02375086024403572, -0.11250550299882889, -0.020109811797738075, 0.0397823303937912, -0.132205069065094, 0.13786277174949646, 0.12929128110408783, -0.08362245559692383, -0.164950892329216, 0.1576361209154129, 0.10818986594676971, 0.06146269664168358, 0.04000743851065636, 0.22563536465168, 0.08067145943641663, 0.06219927966594696, -0.09028305113315582, -0.03653227910399437, -0.15653109550476074, 0.03211839497089386, 0.20697662234306335, -0.08983630686998367, 0.05625096708536148, 0.05455663427710533, -0.08139705657958984, 0.08358053117990494, -0.1515149474143982, -0.10490600764751434, -0.04438750818371773, -0.04274289682507515, -0.0005932293133810163, -0.06100614741444588, 0.22077585756778717, -0.11964307725429535, 0.04748415946960449, 0.08293520659208298, -0.32652661204338074, -0.008674335666000843, 0.033676933497190475, -0.06357257813215256, 0.1480514258146286, 0.028104186058044434, 0.09964101761579514, 0.045360539108514786, 0.027188554406166077, 0.0758574828505516, 0.07875875383615494, 0.037971366196870804, -0.0341067872941494, -0.08728684484958649, 0.13386644423007965, -0.13725018501281738, -0.09154471755027771, -0.07394642382860184, -0.05232315883040428, 0.009060048498213291, -0.048064082860946655, -0.03639025613665581, -0.17919586598873138, 0.00636901194229722, 6.985127356529119e-7, 0.0559762679040432, 0.1500197947025299, 0.09943659603595734, -0.044151365756988525, -0.020518559962511063, 0.14983680844306946, 0.05565166845917702, 0.0324261449277401, -0.04938717931509018, 0.021231932565569878, 0.07271839678287506, -0.0685974508523941, 0.019101634621620178, 0.012218020856380463, 0.09487083554267883, -0.2161211520433426, 0.010661231353878975, -0.06971488893032074, -0.1880747526884079, 0.052158620208501816, 0.0243685245513916, 0.27122530341148376, -0.06097225844860077, -0.1791486144065857, 0.2627328038215637, 0.057548169046640396, -0.014274529181420803, -0.00029395302408374846, -0.04185447469353676, 0.06571102887392044, 0.11151216924190521, -0.06645311415195465, -0.24488112330436707, 0.06893810629844666, -0.11519978940486908, -0.044504258781671524, -0.19075369834899902, 0.11768924444913864, 0.15984749794006348, 0.15780115127563477, 0.03177301585674286, -0.02282915636897087, 0.024139784276485443, -0.16595372557640076, 0.014781294390559196, 0.1941472440958023, 0.020130785182118416, 0.11852403730154037, -0.06380180269479752, -0.05491466820240021, -0.05736317113041878, 0.06758308410644531, -0.031128689646720886, 0.1988278478384018, 0.038816310465335846, -0.0792609229683876, -0.1438027024269104, -0.15787923336029053, -0.0308604147285223, -0.04333774372935295, -0.040175240486860275, -0.06916093826293945, -0.09768238663673401, 0.0856141671538353, 0.23418259620666504, -0.049798984080553055, -0.08235353231430054, 2.763623952981661e-34, -0.008120251819491386, 0.08617989718914032, 0.14236699044704437, 0.10515589267015457, 0.08724866062402725, -0.05931452661752701, 0.020904183387756348, 0.008697597309947014, 0.06991482526063919, -0.2999711334705353, -0.16076892614364624 ]